[gthumb/ext] keep the current folder visible after showing the file properties



commit ea91e79e2400afd8973766a0ea61f26fa0550d7f
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Wed Sep 9 20:20:28 2009 +0200

    keep the current folder visible after showing the file properties

 gthumb/gth-browser.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index 0e3ec08..bf6d2b0 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -4220,8 +4220,16 @@ _gth_browser_load_file (GthBrowser  *browser,
 		return;
 	}
 	else if (! GTK_WIDGET_VISIBLE (browser->priv->file_properties)) {
+		GtkTreePath *path;
+
 		gtk_paned_set_position (GTK_PANED (browser->priv->browser_sidebar), browser->priv->browser_sidebar->allocation.height / 2);
 		gtk_widget_show (browser->priv->file_properties);
+
+		path = gth_folder_tree_get_path (GTH_FOLDER_TREE (browser->priv->folder_tree), browser->priv->location->file);
+		if (path != NULL) {
+			gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (browser->priv->folder_tree), path, NULL, TRUE, .25, .0);
+			gtk_tree_path_free (path);
+		}
 	}
 
 	g_object_ref (file_data);



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