[gtk/gbsneto/filechooser-column-view: 56/82] filechooserwidget: Compare focus against column view




commit 4bb82db86e905b2249eb3c8499dd09eca3ad6c60
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Oct 8 14:49:35 2022 -0300

    filechooserwidget: Compare focus against column view
    
    This effectively doesn't work, but focus will be reworked at some
    point, and this gets us a tiny bit closer to that.

 gtk/gtkfilechooserwidget.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index f2a3e3eece..d266b42103 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -2397,7 +2397,7 @@ location_mode_set (GtkFileChooserWidget *impl,
           location_switch_to_path_bar (impl);
 
           if (switch_to_file_list)
-            gtk_widget_grab_focus (impl->browse_files_tree_view);
+            gtk_widget_grab_focus (impl->browse_files_column_view);
 
           break;
 
@@ -4913,7 +4913,7 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser)
     current_focus = NULL;
 
   file_list_seen = FALSE;
-  if (current_focus == impl->browse_files_tree_view)
+  if (current_focus == impl->browse_files_column_view)
     {
       GtkTreeSelection *selection;
 
@@ -4961,7 +4961,7 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser)
       else
         goto empty;
     }
-  else if (impl->toplevel_last_focus_widget == impl->browse_files_tree_view)
+  else if (impl->toplevel_last_focus_widget == impl->browse_files_column_view)
     goto file_list;
   else if (impl->location_entry && impl->toplevel_last_focus_widget == impl->location_entry)
     goto file_entry;
@@ -5632,7 +5632,7 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserWidget *impl)
 
   current_focus = gtk_root_get_focus (GTK_ROOT (toplevel));
 
-  if (current_focus == impl->browse_files_tree_view)
+  if (current_focus == impl->browse_files_column_view)
     {
       /* The following array encodes what we do based on the impl->action and the
        * number of files selected.
@@ -5834,7 +5834,7 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserWidget *impl)
 
       g_object_unref (file);
     }
-  else if (impl->toplevel_last_focus_widget == impl->browse_files_tree_view)
+  else if (impl->toplevel_last_focus_widget == impl->browse_files_column_view)
     {
       /* The focus is on a dialog's action area button, *and* the widget that
        * was focused immediately before it is the file list.
@@ -5878,7 +5878,7 @@ gtk_file_chooser_widget_initial_focus (GtkFileChooserWidget *impl)
     {
       if (impl->location_mode == LOCATION_MODE_PATH_BAR
           || impl->operation_mode == OPERATION_MODE_RECENT)
-        widget = impl->browse_files_tree_view;
+        widget = impl->browse_files_column_view;
       else
         widget = impl->location_entry;
     }


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