[gnome-photos/gnome-3-16] preview-nav-buttons: Untie keynav from the visibility of the buttons



commit b3d5e50bb021508c37fa9151991dbef1755acb02
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Mar 15 01:01:45 2015 +0100

    preview-nav-buttons: Untie keynav from the visibility of the buttons
    
    We can not tie the ability to go forward or backward to the visibility
    of the buttons. Otherwise, if we have hidden them due to an internal
    condition (eg., no mouse movement or tapping on the touchscreen), then
    the ability to navigate using the keyboard will also be disabled.
    
    Fall out from b3ed6640d3cd2ef9052b9fa18e515b1c9c515380
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746152

 src/photos-preview-nav-buttons.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index 962b67e..0f9b005 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -123,7 +123,6 @@ photos_preview_nav_buttons_update_visibility (PhotosPreviewNavButtons *self)
   if (priv->model == NULL
       || priv->current_path == NULL
       || !priv->visible
-      || !priv->visible_internal
       || !gtk_tree_model_get_iter (priv->model, &iter, priv->current_path))
     {
       priv->enable_prev = FALSE;
@@ -138,12 +137,12 @@ photos_preview_nav_buttons_update_visibility (PhotosPreviewNavButtons *self)
   priv->enable_next = gtk_tree_model_iter_next (priv->model, &tmp);
 
  out:
-  if (priv->enable_next)
+  if (priv->visible_internal && priv->enable_next)
     photos_preview_nav_buttons_fade_in_button (self, priv->next_widget);
   else
     photos_preview_nav_buttons_fade_out_button (self, priv->next_widget);
 
-  if (priv->enable_prev)
+  if (priv->visible_internal && priv->enable_prev)
     photos_preview_nav_buttons_fade_in_button (self, priv->prev_widget);
   else
     photos_preview_nav_buttons_fade_out_button (self, priv->prev_widget);


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