[gnome-photos] preview-nav-buttons: Re-evaluate the ability to navigate at each step
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] preview-nav-buttons: Re-evaluate the ability to navigate at each step
- Date: Wed, 18 Mar 2015 09:18:43 +0000 (UTC)
commit 0aa7c1c28df77ae5a3b908d076a0cb2f70a925e6
Author: Debarshi Ray <debarshir gnome org>
Date: Sun Mar 15 01:01:45 2015 +0100
preview-nav-buttons: Re-evaluate the ability to navigate at each step
We only call photos_preview_nav_buttons_show when we first move to the
preview, instead of every time a GeglNode is set. This is logical since
we don't want to affect the visibility of the buttons as we navigate.
However, we need to re-evaluate the ability to navigate in each
direction after every step. Otherwise the controls won't match the
realities of our location within the model.
There was an earlier broken attempt to address this in
113d48bc7ea6a3cc7e40bd2fec1e6a85684e942f and it became worse after
949246eab98663c8d84d575cbe785f982f4c5de0
https://bugzilla.gnome.org/show_bug.cgi?id=746152
src/photos-preview-nav-buttons.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index 0f9b005..9af5d29 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -518,6 +518,7 @@ photos_preview_nav_buttons_next (PhotosPreviewNavButtons *self)
priv->action = PHOTOS_PREVIEW_ACTION_NEXT;
gtk_tree_path_next (priv->current_path);
photos_preview_nav_buttons_set_active_path (self);
+ photos_preview_nav_buttons_update_visibility (self);
g_signal_emit (self, signals[ACTIVATED], 0, priv->action);
}
@@ -534,6 +535,7 @@ photos_preview_nav_buttons_previous (PhotosPreviewNavButtons *self)
priv->action = PHOTOS_PREVIEW_ACTION_PREVIOUS;
gtk_tree_path_prev (priv->current_path);
photos_preview_nav_buttons_set_active_path (self);
+ photos_preview_nav_buttons_update_visibility (self);
g_signal_emit (self, signals[ACTIVATED], 0, priv->action);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]