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



commit 0f42e9a8b0f6ca6b77c8e16171cf3a6c213b1c0b
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 3d7fc32f..377b1b21 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"
@@ -186,6 +187,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)
 {
@@ -398,6 +409,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_favorites (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]