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



commit e20da86d253f1eb0f9b3235e68672d59fe9cf984
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 bcca9ae..b8d07df 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -1458,8 +1458,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 */
 
@@ -1469,12 +1470,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]