[gnome-photos/wip/facebook] preview-nav-buttons: Remove redundant check



commit ab8ca382130a715e90c891a2f4bac3f97a4afec6
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Sep 2 14:45:43 2013 +0200

    preview-nav-buttons: Remove redundant check
    
    PhotosEmbed is already careful not to call
    photos_preview_nav_buttons_set_model when we are navigating within the
    preview. Therefore this check is not that useful.

 src/photos-preview-nav-buttons.c |   15 ---------------
 1 files changed, 0 insertions(+), 15 deletions(-)
---
diff --git a/src/photos-preview-nav-buttons.c b/src/photos-preview-nav-buttons.c
index d41b074..02f0af8 100644
--- a/src/photos-preview-nav-buttons.c
+++ b/src/photos-preview-nav-buttons.c
@@ -548,18 +548,6 @@ void
 photos_preview_nav_buttons_set_model (PhotosPreviewNavButtons *self, GtkTreeModel *model, GtkTreePath 
*current_path)
 {
   PhotosPreviewNavButtonsPrivate *priv = self->priv;
-  GtkTreePath *child_path = NULL;
-
-  if (priv->model != NULL && gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (priv->model)) == model)
-    {
-      if (priv->current_path != NULL)
-        {
-          child_path = gtk_tree_model_filter_convert_path_to_child_path (GTK_TREE_MODEL_FILTER (priv->model),
-                                                                         priv->current_path);
-          if (gtk_tree_path_compare (child_path, current_path) == 0)
-            goto out;
-        }
-    }
 
   g_clear_object (&priv->model);
   if (model != NULL)
@@ -573,9 +561,6 @@ photos_preview_nav_buttons_set_model (PhotosPreviewNavButtons *self, GtkTreeMode
     }
 
   photos_preview_nav_buttons_update_visibility (self);
-
- out:
-  g_clear_pointer (&child_path, (GDestroyNotify) gtk_tree_path_free);
 }
 
 


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