[gnome-photos/wip/uajain/de_dup: 9/11] Add share icon in main toolbar



commit 2e32787716eca4d2b042cba18ca273143f13c73f
Author: Umang Jain <mailumangjain gmail com>
Date:   Sun Jul 10 00:48:56 2016 +0530

    Add share icon in main toolbar
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751181

 src/photos-icons.h        |    1 +
 src/photos-main-toolbar.c |    5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-icons.h b/src/photos-icons.h
index 8968e8b..70d41a4 100644
--- a/src/photos-icons.h
+++ b/src/photos-icons.h
@@ -40,6 +40,7 @@ G_BEGIN_DECLS
 #define PHOTOS_ICON_IMAGE_CROP_SYMBOLIC "image-crop-symbolic"
 #define PHOTOS_ICON_IMAGE_EDIT_SYMBOLIC "image-edit-symbolic"
 #define PHOTOS_ICON_IMAGE_FILTER_SYMBOLIC "image-filter-symbolic"
+#define PHOTOS_ICON_IMAGE_SHARE_SYMBOLIC "emblem-shared-symbolic"
 
 #define PHOTOS_ICON_IMAGE_X_GENERIC_SYMBOLIC "image-x-generic-symbolic"
 
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index d26da9b..4027d5e 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -543,6 +543,7 @@ photos_main_toolbar_populate_for_preview (PhotosMainToolbar *self)
   GtkWidget *edit_button;
   GtkWidget *image;
   GtkWidget *menu_button;
+  GtkWidget *share_button;
   GApplication *app;
   PhotosBaseItem *item;
   gboolean favorite;
@@ -569,6 +570,10 @@ photos_main_toolbar_populate_for_preview (PhotosMainToolbar *self)
   gtk_actionable_set_action_name (GTK_ACTIONABLE (edit_button), "app.edit-current");
   gtk_header_bar_pack_end (GTK_HEADER_BAR (self->toolbar), edit_button);
 
+  share_button = gtk_button_new_from_icon_name (PHOTOS_ICON_IMAGE_SHARE_SYMBOLIC, GTK_ICON_SIZE_BUTTON);
+  gtk_actionable_set_action_name (GTK_ACTIONABLE (share_button), "app.share-current");
+  gtk_header_bar_pack_end (GTK_HEADER_BAR (self->toolbar), share_button);
+
   self->favorite_button = gtk_button_new ();
   gtk_header_bar_pack_end (GTK_HEADER_BAR (self->toolbar), self->favorite_button);
   g_signal_connect_swapped (self->favorite_button,


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