[gnome-builder] project-tree: add missing gsetting actions



commit 1a1f80c77cc104cba4209e178db706f32c4d0354
Author: Christian Hergert <chergert redhat com>
Date:   Thu Feb 14 11:54:33 2019 -0800

    project-tree: add missing gsetting actions

 src/plugins/project-tree/gbp-project-tree-pane-actions.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/plugins/project-tree/gbp-project-tree-pane-actions.c 
b/src/plugins/project-tree/gbp-project-tree-pane-actions.c
index acb795a0a..21237fef4 100644
--- a/src/plugins/project-tree/gbp-project-tree-pane-actions.c
+++ b/src/plugins/project-tree/gbp-project-tree-pane-actions.c
@@ -568,14 +568,23 @@ void
 _gbp_project_tree_pane_init_actions (GbpProjectTreePane *self)
 {
   g_autoptr(GSimpleActionGroup) actions = NULL;
+  g_autoptr(GSettings) settings = NULL;
+  g_autoptr(GAction) ignored_action = NULL;
+  g_autoptr(GAction) sort_action = NULL;
 
   g_assert (GBP_IS_PROJECT_TREE_PANE (self));
 
+  settings = g_settings_new ("org.gnome.builder.project-tree");
+  sort_action = g_settings_create_action (settings, "sort-directories-first");
+  ignored_action = g_settings_create_action (settings, "show-ignored-files");
+
   actions = g_simple_action_group_new ();
   g_action_map_add_action_entries (G_ACTION_MAP (actions),
                                    entries,
                                    G_N_ELEMENTS (entries),
                                    self);
+  g_action_map_add_action (G_ACTION_MAP (actions), ignored_action);
+  g_action_map_add_action (G_ACTION_MAP (actions), sort_action);
   gtk_widget_insert_action_group (GTK_WIDGET (self->tree),
                                   "project-tree",
                                   G_ACTION_GROUP (actions));


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