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>
<object class="GtkBox">
<property name="width-request">425</property>
<property name="visible">true</property>
<property name="hexpand">true</property>
<property name="margin">10</property>
<property name="spacing">12</property>
<child type="center">
<object class="GtkLabel">
<property name="hexpand">true</property>
@ -76,30 +78,36 @@
<property name="visible">true</property>
<property name="border-width">10</property>
<child>
<object class="GtkBox" id="processes_box">
<property name="orientation">vertical</property>
<object class="GtkBox">
<!-- box with single child is used so we can toggle visibility of the child -->
<property name="visible">true</property>
<style>
<class name="linked"/>
</style>
<child>
<object class="GtkEntry" id="process_filter_entry">
<property name="placeholder-text" translatable="yes">Search</property>
<property name="visible">true</property>
</object>
</child>
<child>
<object class="SpScrolledWindow">
<property name="min-content-width">100</property>
<property name="max-content-width">400</property>
<property name="max-content-height">450</property>
<property name="shadow-type">in</property>
<object class="GtkBox" id="processes_box">
<property name="orientation">vertical</property>
<property name="visible">true</property>
<style>
<class name="linked"/>
</style>
<child>
<object class="GtkListBox" id="process_list_box">
<object class="GtkEntry" id="process_filter_entry">
<property name="placeholder-text" translatable="yes">Search</property>
<property name="visible">true</property>
</object>
</child>
<child>
<object class="SpScrolledWindow">
<property name="min-content-width">100</property>
<property name="max-content-width">400</property>
<property name="max-content-height">450</property>
<property name="shadow-type">in</property>
<property name="visible">true</property>
<child>
<object class="GtkListBox" id="process_list_box">
<property name="visible">true</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>

View File

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