menu-button: hide the process list when whole-system is enabled

No sense in showing a desensitized widget that cannot be toggled except
for discover-ability. But progressive disclosure is probably better.
This commit is contained in:
Christian Hergert
2016-04-16 18:21:26 -07:00
parent 4fdd7aca71
commit 9e082a257d
2 changed files with 26 additions and 18 deletions

View File

@ -45,9 +45,11 @@
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
<property name="width-request">425</property>
<property name="visible">true</property> <property name="visible">true</property>
<property name="hexpand">true</property> <property name="hexpand">true</property>
<property name="margin">10</property> <property name="margin">10</property>
<property name="spacing">12</property>
<child type="center"> <child type="center">
<object class="GtkLabel"> <object class="GtkLabel">
<property name="hexpand">true</property> <property name="hexpand">true</property>
@ -75,6 +77,10 @@
<property name="interpolate-size">true</property> <property name="interpolate-size">true</property>
<property name="visible">true</property> <property name="visible">true</property>
<property name="border-width">10</property> <property name="border-width">10</property>
<child>
<object class="GtkBox">
<!-- box with single child is used so we can toggle visibility of the child -->
<property name="visible">true</property>
<child> <child>
<object class="GtkBox" id="processes_box"> <object class="GtkBox" id="processes_box">
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
@ -103,6 +109,8 @@
</object> </object>
</child> </child>
</object> </object>
</child>
</object>
<packing> <packing>
<property name="name">existing</property> <property name="name">existing</property>
<property name="title" translatable="yes">Existing Process</property> <property name="title" translatable="yes">Existing Process</property>

View File

@ -203,7 +203,7 @@ sp_profiler_menu_button_connect (SpProfilerMenuButton *self)
add_binding (&priv->list_sensitive_binding, add_binding (&priv->list_sensitive_binding,
priv->profiler, "whole-system", priv->profiler, "whole-system",
priv->processes_box, "sensitive", priv->processes_box, "visible",
G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN); G_BINDING_SYNC_CREATE | G_BINDING_INVERT_BOOLEAN);
add_binding (&priv->inherit_binding, add_binding (&priv->inherit_binding,