[gthumb] align the current folder to the top if it's an entry point



commit f176003af791ccf84d17e33555c9aeacc6fa7905
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Mar 28 21:25:35 2011 +0200

    align the current folder to the top if it's an entry point

 gthumb/gth-browser.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index d127b1d..1574d9a 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -1489,8 +1489,9 @@ load_data_continue (LoadData *load_data,
 	case GTH_ACTION_VIEW:
 	case GTH_ACTION_LIST_CHILDREN:
 		if (path != NULL) {
-			GList *entry_points;
-			GList *scan;
+			GList    *entry_points;
+			GList    *scan;
+			gboolean  is_entry_point = FALSE;
 
 			/* expand the path if it's an entry point */
 
@@ -1500,12 +1501,18 @@ load_data_continue (LoadData *load_data,
 
 				if (g_file_equal (file_data->file, load_data->requested_folder->file)) {
 					gtk_tree_view_expand_row (GTK_TREE_VIEW (browser->priv->folder_tree), path, FALSE);
+					is_entry_point = TRUE;
 					break;
 				}
 			}
 
 			if (load_data->action != GTH_ACTION_LIST_CHILDREN) {
-				gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (browser->priv->folder_tree), path, NULL, FALSE, 0.0, 0.0);
+				gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (browser->priv->folder_tree),
+							      path,
+							      NULL,
+							      is_entry_point,
+							      0.0,
+							      0.0);
 				gth_folder_tree_select_path (GTH_FOLDER_TREE (browser->priv->folder_tree), path);
 			}
 



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