[gnome-photos] preview-nav-buttons: Remove redundant check
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] preview-nav-buttons: Remove redundant check
- Date: Mon, 2 Sep 2013 14:05:03 +0000 (UTC)
commit 3c238edd6bd8d6ad5eec6520610134c1c394ee49
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]