[gnome-photos/wip/rishi/edit-mode: 31/31] application: crop
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/edit-mode: 31/31] application: crop
- Date: Fri, 6 Nov 2015 18:29:55 +0000 (UTC)
commit 589670f6c87216f2e12c3cc2240d54194edbd411
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Nov 6 19:26:39 2015 +0100
application: crop
src/photos-application.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 5520df1..68571ed 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -65,6 +65,7 @@ struct _PhotosApplicationPrivate
GResource *resource;
GSettings *bg_settings;
GSettings *ss_settings;
+ GSimpleAction *crop_action;
GSimpleAction *fs_action;
GSimpleAction *gear_action;
GSimpleAction *insta_action;
@@ -858,6 +859,7 @@ photos_application_window_mode_changed (PhotosApplication *self, PhotosWindowMod
gboolean enable;
enable = (mode == PHOTOS_WINDOW_MODE_EDIT);
+ g_simple_action_set_enabled (priv->crop_action, enable);
g_simple_action_set_enabled (priv->insta_action, enable);
g_simple_action_set_enabled (priv->sharpen_action, enable);
g_simple_action_set_enabled (priv->undo_action, enable);
@@ -1023,6 +1025,11 @@ photos_application_startup (GApplication *application)
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (action));
g_object_unref (action);
+ parameter_type = g_variant_type_new ("a{sd}");
+ priv->crop_action = g_simple_action_new ("crop-current", parameter_type);
+ g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (priv->crop_action));
+ g_variant_type_free (parameter_type);
+
action = g_simple_action_new ("delete", NULL);
g_action_map_add_action (G_ACTION_MAP (self), G_ACTION (action));
g_object_unref (action);
@@ -1194,6 +1201,7 @@ photos_application_dispose (GObject *object)
g_clear_object (&priv->create_window_cancellable);
g_clear_object (&priv->bg_settings);
g_clear_object (&priv->ss_settings);
+ g_clear_object (&priv->crop_action);
g_clear_object (&priv->fs_action);
g_clear_object (&priv->gear_action);
g_clear_object (&priv->insta_action);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]