panel-list: Dynamically show Details/Devices row
This is just a nicety for the test mode; when there are no panels added under those categories, do not show the rows.
This commit is contained in:
parent
14583e9630
commit
c4c901f95d
2 changed files with 8 additions and 2 deletions
|
@ -952,6 +952,12 @@ cc_panel_list_add_panel (CcPanelList *self,
|
|||
|
||||
g_hash_table_insert (self->id_to_data, data->id, data);
|
||||
g_hash_table_insert (self->id_to_search_data, search_data->id, search_data);
|
||||
|
||||
/* Only show the Devices/Details rows when there's at least one panel */
|
||||
if (category == CC_CATEGORY_DEVICES)
|
||||
gtk_widget_show (GTK_WIDGET (self->devices_row));
|
||||
else if (category == CC_CATEGORY_DETAILS)
|
||||
gtk_widget_show (GTK_WIDGET (self->details_row));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<signal name="row-activated" handler="row_activated_cb" object="CcPanelList" swapped="no" />
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="devices_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
|
@ -72,7 +72,7 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="details_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="visible">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue