[gnome-photos/wip/rishi/collection: 23/27] main-toolbar: Show the attached devices



commit fda65b5a3e76dbdefa6e15a13b255638ed39d3db
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Jan 12 07:52:45 2018 +0100

    main-toolbar: Show the attached devices
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751212

 src/photos-main-toolbar.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/src/photos-main-toolbar.c b/src/photos-main-toolbar.c
index e6a8eeaa..c4fd549c 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -33,6 +33,7 @@
 #include "photos-item-manager.h"
 #include "photos-main-toolbar.h"
 #include "photos-remote-display-manager.h"
+#include "photos-removable-devices-button.h"
 #include "photos-search-context.h"
 #include "photos-searchbar.h"
 #include "photos-selection-controller.h"
@@ -183,6 +184,16 @@ photos_main_toolbar_add_back_button (PhotosMainToolbar *self)
 }
 
 
+static void
+photos_main_toolbar_add_devices_button (PhotosMainToolbar *self)
+{
+  GtkWidget *devices_button;
+
+  devices_button = photos_removable_devices_button_new ();
+  gtk_header_bar_pack_start (GTK_HEADER_BAR (self->header_bar), devices_button);
+}
+
+
 static void
 photos_main_toolbar_remote_display_button_clicked (PhotosMainToolbar *self)
 {
@@ -403,6 +414,7 @@ photos_main_toolbar_populate_for_collections (PhotosMainToolbar *self)
   gtk_header_bar_set_custom_title (GTK_HEADER_BAR (self->header_bar), self->stack_switcher);
   gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (self->header_bar), TRUE);
 
+  photos_main_toolbar_add_devices_button (self);
   photos_main_toolbar_add_selection_button (self);
   photos_main_toolbar_add_search_button (self);
 }
@@ -444,6 +456,7 @@ photos_main_toolbar_populate_for_overview (PhotosMainToolbar *self)
   gtk_header_bar_set_custom_title (GTK_HEADER_BAR (self->header_bar), self->stack_switcher);
   gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (self->header_bar), TRUE);
 
+  photos_main_toolbar_add_devices_button (self);
   photos_main_toolbar_add_selection_button (self);
   photos_main_toolbar_add_search_button (self);
 }


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