[gthumb] folder tree: use single click activation



commit 067aea74aa7f95f8f6712a9d9936572c52610f0d
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Nov 1 06:52:52 2019 +0100

    folder tree: use single click activation
    
    ...instead of activating on selection change.

 gthumb/gth-browser.c     | 13 -------------
 gthumb/gth-folder-tree.c |  1 +
 2 files changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index e6b7c595..2ff675e3 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -2883,15 +2883,6 @@ folder_tree_list_children_cb (GthFolderTree *folder_tree,
 }
 
 
-static void
-folder_tree_load_cb (GthFolderTree *folder_tree,
-                    GFile         *file,
-                    GthBrowser    *browser)
-{
-       _gth_browser_load (browser, file, NULL, NULL, 0, GTH_ACTION_VIEW, FALSE);
-}
-
-
 static void
 folder_tree_folder_popup_cb (GthFolderTree *folder_tree,
                             GthFileData   *file_data,
@@ -4736,10 +4727,6 @@ gth_browser_init (GthBrowser *browser)
                          "list_children",
                          G_CALLBACK (folder_tree_list_children_cb),
                          browser);
-       g_signal_connect (browser->priv->folder_tree,
-                         "load",
-                         G_CALLBACK (folder_tree_load_cb),
-                         browser);
        g_signal_connect (browser->priv->folder_tree,
                          "folder_popup",
                          G_CALLBACK (folder_tree_folder_popup_cb),
diff --git a/gthumb/gth-folder-tree.c b/gthumb/gth-folder-tree.c
index 60a52e66..8fad9878 100644
--- a/gthumb/gth-folder-tree.c
+++ b/gthumb/gth-folder-tree.c
@@ -1299,6 +1299,7 @@ gth_folder_tree_init (GthFolderTree *folder_tree)
 
        add_columns (folder_tree, GTK_TREE_VIEW (folder_tree));
 
+       gtk_tree_view_set_activate_on_single_click (GTK_TREE_VIEW (folder_tree), TRUE);
        gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (folder_tree), FALSE);
        gtk_tree_view_set_enable_search (GTK_TREE_VIEW (folder_tree), TRUE);
        gtk_tree_view_set_search_column (GTK_TREE_VIEW (folder_tree), COLUMN_NAME);


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