[gnome-photos/wip/rishi/edit-mode: 12/14] preview-nav-buttons: Add a button for using the desaturation operation



commit 9fecad5c5a4f3ee6b03ef20ebc2f81acf0a28710
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu May 21 09:21:58 2015 +0200

    preview-nav-buttons: Add a button for using the desaturation operation

 src/photos-preview-nav-buttons.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index 0698857..18bf3b6 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -365,6 +365,7 @@ photos_preview_nav_buttons_constructed (GObject *object)
 {
   PhotosPreviewNavButtons *self = PHOTOS_PREVIEW_NAV_BUTTONS (object);
   PhotosPreviewNavButtonsPrivate *priv = self->priv;
+  GtkBox *button_area;
   GtkStyleContext *context;
   GtkWidget *bar;
   GtkWidget *button;
@@ -373,6 +374,7 @@ photos_preview_nav_buttons_constructed (GObject *object)
   G_OBJECT_CLASS (photos_preview_nav_buttons_parent_class)->constructed (object);
 
   priv->bar_widget = gtk_revealer_new ();
+  gtk_widget_set_halign (priv->bar_widget, GTK_ALIGN_CENTER);
   gtk_widget_set_margin_start (priv->bar_widget, 30);
   gtk_widget_set_margin_end (priv->bar_widget, 30);
   gtk_widget_set_margin_bottom (priv->bar_widget, 30);
@@ -387,6 +389,12 @@ photos_preview_nav_buttons_constructed (GObject *object)
   gtk_container_add (GTK_CONTAINER (priv->bar_widget), bar);
   g_signal_connect (bar, "notify::hover", G_CALLBACK (photos_preview_nav_buttons_notify_hover), self);
 
+  button_area = photos_edit_bar_get_button_area (PHOTOS_EDIT_BAR (bar));
+
+  button = gtk_button_new_with_label (_("Gray"));
+  gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "app.gray-current");
+  gtk_box_pack_start (button_area, button, FALSE, FALSE, 0);
+
   priv->prev_widget = gtk_revealer_new ();
   gtk_widget_set_halign (priv->prev_widget, GTK_ALIGN_START);
   gtk_widget_set_margin_start (priv->prev_widget, 30);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]