[gtk/wip/baedert/for-master: 56/57] filechooserwidget: Fold function into only caller



commit c80a75806915abf5847c2dcc6c725020b9ff1788
Author: Timm Bäder <mail baedert org>
Date:   Wed Feb 19 09:18:25 2020 +0100

    filechooserwidget: Fold function into only caller

 gtk/gtkfilechooserwidget.c | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 546b32d62a..265f5de88d 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -2103,19 +2103,6 @@ static GActionEntry entries[] = {
   { "toggle-sort-dirs-first", NULL, NULL, "false", change_sort_directories_first_state }
 };
 
-static void
-add_actions (GtkFileChooserWidget *impl)
-{
-  GtkFileChooserWidgetPrivate *priv = gtk_file_chooser_widget_get_instance_private (impl);
-
-  priv->item_actions = G_ACTION_GROUP (g_simple_action_group_new ());
-  g_action_map_add_action_entries (G_ACTION_MAP (priv->item_actions),
-                                   entries, G_N_ELEMENTS (entries),
-                                   impl);
-  gtk_widget_insert_action_group (GTK_WIDGET (priv->browse_files_tree_view), "item",
-                                  priv->item_actions);
-}
-
 static void
 file_list_build_popover (GtkFileChooserWidget *impl)
 {
@@ -8408,7 +8395,12 @@ post_process_ui (GtkFileChooserWidget *impl)
   gtk_popover_set_default_widget (GTK_POPOVER (priv->rename_file_popover), priv->rename_file_rename_button);
   gtk_popover_set_relative_to (GTK_POPOVER (priv->rename_file_popover), priv->browse_files_tree_view);
 
-  add_actions (impl);
+  priv->item_actions = G_ACTION_GROUP (g_simple_action_group_new ());
+  g_action_map_add_action_entries (G_ACTION_MAP (priv->item_actions),
+                                   entries, G_N_ELEMENTS (entries),
+                                   impl);
+  gtk_widget_insert_action_group (GTK_WIDGET (priv->browse_files_tree_view), "item",
+                                  priv->item_actions);
 
   gtk_search_entry_set_key_capture_widget (GTK_SEARCH_ENTRY (priv->search_entry), priv->search_entry);
 }


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