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



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

    main-toolbar: Show the attached devices
    
    https://gitlab.gnome.org/GNOME/gnome-photos/issues/29

 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]