[gnome-builder/wip/gtk4-port: 1485/1774] libide/foundry: set current config action state




commit 041e3300e89779781e702f7cecba58deaa07d6da
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jun 13 16:38:34 2022 -0700

    libide/foundry: set current config action state

 src/libide/foundry/ide-config-manager.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/libide/foundry/ide-config-manager.c b/src/libide/foundry/ide-config-manager.c
index 55d4588e1..22602bb36 100644
--- a/src/libide/foundry/ide-config-manager.c
+++ b/src/libide/foundry/ide-config-manager.c
@@ -912,6 +912,8 @@ ide_config_manager_set_current (IdeConfigManager *self,
 
   if (self->current != current)
     {
+      const char *id = "";
+
       if (self->current != NULL)
         {
           g_signal_handlers_disconnect_by_func (self->current,
@@ -943,8 +945,12 @@ ide_config_manager_set_current (IdeConfigManager *self,
               g_autofree gchar *new_id = g_strdup (ide_config_get_id (current));
               g_settings_set_string (self->project_settings, "config-id", new_id);
             }
+
+          id = ide_config_get_id (self->current);
         }
 
+      ide_config_manager_set_action_state (self, "current", g_variant_new_string (id));
+
       g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_CURRENT]);
       g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_CURRENT_DISPLAY_NAME]);
       g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_READY]);


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