[sysprof] libsysprof-ui: reload process model when not in whole-system
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof-ui: reload process model when not in whole-system
- Date: Wed, 29 May 2019 22:22:05 +0000 (UTC)
commit d7014ac4e8a2eaae5444f3113be4d7d94880e059
Author: Christian Hergert <chergert redhat com>
Date: Fri May 10 19:49:29 2019 -0700
libsysprof-ui: reload process model when not in whole-system
src/libsysprof-ui/sysprof-profiler-menu-button.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
---
diff --git a/src/libsysprof-ui/sysprof-profiler-menu-button.c
b/src/libsysprof-ui/sysprof-profiler-menu-button.c
index 48d0172..0482163 100644
--- a/src/libsysprof-ui/sysprof-profiler-menu-button.c
+++ b/src/libsysprof-ui/sysprof-profiler-menu-button.c
@@ -847,6 +847,21 @@ sysprof_profiler_menu_button_validate_spawn (SysprofProfilerMenuButton *self,
}
}
+static void
+sysprof_profiler_menu_button_notify_whole_system (SysprofProfilerMenuButton *self,
+ GParamSpec *pspec,
+ GtkSwitch *whole_system)
+{
+ SysprofProfilerMenuButtonPrivate *priv = sysprof_profiler_menu_button_get_instance_private (self);
+
+ g_assert (SYSPROF_IS_PROFILER_MENU_BUTTON (self));
+ g_assert (GTK_IS_SWITCH (whole_system));
+
+ /* Reload when process view is shown */
+ if (!gtk_switch_get_active (whole_system))
+ sysprof_process_model_queue_reload (priv->process_model);
+}
+
static void
sysprof_profiler_menu_button_init (SysprofProfilerMenuButton *self)
{
@@ -878,6 +893,12 @@ sysprof_profiler_menu_button_init (SysprofProfilerMenuButton *self)
self,
G_CONNECT_SWAPPED);
+ g_signal_connect_object (priv->whole_system_switch,
+ "notify::active",
+ G_CALLBACK (sysprof_profiler_menu_button_notify_whole_system),
+ self,
+ G_CONNECT_SWAPPED);
+
g_signal_connect_object (priv->process_list_box,
"row-activated",
G_CALLBACK (sysprof_profiler_menu_button_row_activated),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]