[gnome-builder/wip/gtk4-port] plugins/sysprof: disable run action when already running



commit a7b29010e316a9904c879401f069fb796a77a3bb
Author: Christian Hergert <chergert redhat com>
Date:   Tue May 24 13:05:30 2022 -0700

    plugins/sysprof: disable run action when already running

 src/plugins/sysprof/gbp-sysprof-workspace-addin.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c 
b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
index d92188087..861365bae 100644
--- a/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
+++ b/src/plugins/sysprof/gbp-sysprof-workspace-addin.c
@@ -471,6 +471,12 @@ gbp_sysprof_workspace_addin_load (IdeWorkspaceAddin *addin,
                                    G_N_ELEMENTS (entries),
                                    self);
 
+  g_object_bind_property (self->run_manager,
+                          "busy",
+                          g_action_map_lookup_action (G_ACTION_MAP (self->actions), "run"),
+                          "enabled",
+                          G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN);
+
   sysprof_check_supported_async (NULL,
                                  gbp_sysprof_workspace_addin_check_supported_cb,
                                  g_object_ref (self));


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