[gnome-photos/wip/rishi/zoom: 9/9] preview-nav-buttons: ...
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/zoom: 9/9] preview-nav-buttons: ...
- Date: Wed, 14 Jun 2017 19:09:02 +0000 (UTC)
commit feb357e6f9ca5b392a51e0f01d0da3b41d2a055b
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jun 14 20:42:48 2017 +0200
preview-nav-buttons: ...
src/photos-preview-nav-buttons.c | 18 ++++++++++++++++--
src/photos-preview-nav-buttons.h | 3 +++
2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index 8ab43f2..ebcab6f 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -54,6 +54,7 @@ struct _PhotosPreviewNavButtons
PhotosWindowMode old_mode;
gboolean enable_next;
gboolean enable_prev;
+ gboolean show_navigation;
gboolean visible;
gboolean visible_internal;
guint auto_hide_id;
@@ -219,12 +220,12 @@ photos_preview_nav_buttons_update_visibility (PhotosPreviewNavButtons *self)
if (item == NULL || !self->visible)
enable_zoom = FALSE;
- if (self->visible_internal && self->enable_next)
+ if (self->visible_internal && self->show_navigation && self->enable_next)
photos_preview_nav_buttons_fade_in_button (self, self->next_widget);
else
photos_preview_nav_buttons_fade_out_button (self, self->next_widget);
- if (self->visible_internal && self->enable_prev)
+ if (self->visible_internal && self->show_navigation && self->enable_prev)
photos_preview_nav_buttons_fade_in_button (self, self->prev_widget);
else
photos_preview_nav_buttons_fade_out_button (self, self->prev_widget);
@@ -675,6 +676,19 @@ photos_preview_nav_buttons_set_mode (PhotosPreviewNavButtons *self, PhotosWindow
void
+photos_preview_nav_buttons_set_show_navigation (PhotosPreviewNavButtons *self, gboolean show_navigation)
+{
+ g_return_if_fail (PHOTOS_IS_PREVIEW_NAV_BUTTONS (self));
+
+ if (self->show_navigation == show_navigation)
+ return;
+
+ self->show_navigation = show_navigation;
+ photos_preview_nav_buttons_update_visibility (self);
+}
+
+
+void
photos_preview_nav_buttons_show (PhotosPreviewNavButtons *self)
{
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 986c7e8..128c286 100644
--- a/src/photos-preview-nav-buttons.h
+++ b/src/photos-preview-nav-buttons.h
@@ -44,6 +44,9 @@ void photos_preview_nav_buttons_hide (Photo
void photos_preview_nav_buttons_set_mode (PhotosPreviewNavButtons *self,
PhotosWindowMode old_mode);
+void photos_preview_nav_buttons_set_show_navigation (PhotosPreviewNavButtons *self,
+ gboolean show_navigation);
+
void photos_preview_nav_buttons_show (PhotosPreviewNavButtons *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]