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



commit 421f2bb439191d9723ced2862060c85660ce9bf3
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 9db15c2c..a32d1505 100644
--- a/src/photos-main-toolbar.c
+++ b/src/photos-main-toolbar.c
@@ -37,6 +37,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"
@@ -176,6 +177,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)
 {
@@ -388,6 +399,7 @@ photos_main_toolbar_populate_for_collections (PhotosMainToolbar *self)
 {
   gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (self->header_bar), TRUE);
   photos_header_bar_set_mode (PHOTOS_HEADER_BAR (self->header_bar), PHOTOS_HEADER_BAR_MODE_NORMAL);
+  photos_main_toolbar_add_devices_button (self);
   photos_main_toolbar_add_selection_button (self);
   photos_main_toolbar_add_search_button (self);
 }
@@ -429,6 +441,7 @@ photos_main_toolbar_populate_for_overview (PhotosMainToolbar *self)
 {
   gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (self->header_bar), TRUE);
   photos_header_bar_set_mode (PHOTOS_HEADER_BAR (self->header_bar), PHOTOS_HEADER_BAR_MODE_NORMAL);
+  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]