[gnome-photos/wip/rishi/zoom: 10/10] preview-nav-buttons: auto-hide



commit edb186e4b2ef38b3ded45439c208dd79875395f9
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Jun 16 00:09:32 2017 +0200

    preview-nav-buttons: auto-hide

 src/photos-preview-nav-buttons.c |   21 +++++++++++++++++++++
 src/photos-preview-nav-buttons.h |    3 +++
 2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index b8fbda0..e065bc1 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -52,6 +52,7 @@ struct _PhotosPreviewNavButtons
   PhotosBaseManager *item_mngr;
   PhotosModeController *mode_cntrlr;
   PhotosWindowMode old_mode;
+  gboolean auto_hide;
   gboolean enable_next;
   gboolean enable_prev;
   gboolean show_navigation;
@@ -667,6 +668,26 @@ photos_preview_nav_buttons_hide (PhotosPreviewNavButtons *self)
 
 
 void
+photos_preview_nav_buttons_set_auto_hide (PhotosPreviewNavButtons *self, gboolean auto_hide)
+{
+  g_return_if_fail (PHOTOS_IS_PREVIEW_NAV_BUTTONS (self));
+
+  if (self->auto_hide == auto_hide)
+    return;
+
+  self->auto_hide = auto_hide;
+
+  if (self->auto_hide)
+    {
+    }
+  else
+    {
+      photos_preview_nav_buttons_unqueue_auto_hide (self);
+    }
+}
+
+
+void
 photos_preview_nav_buttons_set_mode (PhotosPreviewNavButtons *self, PhotosWindowMode old_mode)
 {
   g_return_if_fail (PHOTOS_IS_PREVIEW_NAV_BUTTONS (self));
diff --git a/src/photos-preview-nav-buttons.h b/src/photos-preview-nav-buttons.h
index 128c286..3e8dc8d 100644
--- a/src/photos-preview-nav-buttons.h
+++ b/src/photos-preview-nav-buttons.h
@@ -41,6 +41,9 @@ PhotosPreviewNavButtons    *photos_preview_nav_buttons_new                (Photo
 
 void                        photos_preview_nav_buttons_hide               (PhotosPreviewNavButtons *self);
 
+void                        photos_preview_nav_buttons_set_auto_hide      (PhotosPreviewNavButtons *self,
+                                                                           gboolean auto_hide);
+
 void                        photos_preview_nav_buttons_set_mode           (PhotosPreviewNavButtons *self,
                                                                            PhotosWindowMode old_mode);
 


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