[gnome-control-center] notifications: Use content style for listboxes
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] notifications: Use content style for listboxes
- Date: Wed, 19 May 2021 03:31:12 +0000 (UTC)
commit 7f4703d7ad829cc5816fc56f062873995040be3a
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Wed May 12 19:11:34 2021 +0530
notifications: Use content style for listboxes
panels/notifications/cc-notifications-panel.c | 6 ---
panels/notifications/cc-notifications-panel.ui | 74 ++++++++++----------------
2 files changed, 28 insertions(+), 52 deletions(-)
---
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index 358b87e62..4273feeca 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -187,16 +187,10 @@ cc_notifications_panel_init (CcNotificationsPanel *panel)
panel->sections = g_list_append (panel->sections, panel->options_listbox);
panel->sections_reverse = g_list_prepend (panel->sections_reverse, panel->options_listbox);
- gtk_list_box_set_header_func (panel->options_listbox,
- cc_list_box_update_header_func,
- NULL, NULL);
panel->sections = g_list_append (panel->sections, panel->app_listbox);
panel->sections_reverse = g_list_prepend (panel->sections_reverse, panel->app_listbox);
gtk_list_box_set_sort_func (panel->app_listbox, (GtkListBoxSortFunc)sort_apps, NULL, NULL);
- gtk_list_box_set_header_func (panel->app_listbox,
- cc_list_box_update_header_func,
- NULL, NULL);
build_app_store (panel);
diff --git a/panels/notifications/cc-notifications-panel.ui b/panels/notifications/cc-notifications-panel.ui
index 184b7c807..dac894c5f 100644
--- a/panels/notifications/cc-notifications-panel.ui
+++ b/panels/notifications/cc-notifications-panel.ui
@@ -28,40 +28,31 @@
<property name="orientation">vertical</property>
<property name="hexpand">True</property>
<child>
- <object class="GtkFrame">
+ <object class="GtkListBox" id="options_listbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_bottom">32</property>
<property name="hexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
+ <property name="selection_mode">none</property>
+ <property name="margin_bottom">32</property>
+ <signal name="keynav-failed" handler="keynav_failed" object="CcNotificationsPanel"
swapped="yes" />
+ <style>
+ <class name="content"/>
+ </style>
<child>
- <object class="GtkListBox" id="options_listbox">
+ <object class="CcListRow" id="dnd_row">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="selection_mode">none</property>
- <signal name="keynav-failed" handler="keynav_failed"
object="CcNotificationsPanel" swapped="yes" />
- <child>
- <object class="CcListRow" id="dnd_row">
- <property name="visible">True</property>
- <property name="title" translatable="yes">_Do Not Disturb</property>
- <property name="use-underline">True</property>
- <property name="show-switch">True</property>
- </object>
- </child>
- <child>
- <object class="CcListRow" id="lock_screen_row">
- <property name="visible">True</property>
- <property name="title" translatable="yes">_Lock Screen
Notifications</property>
- <property name="use-underline">True</property>
- <property name="show-switch">True</property>
- </object>
- </child>
+ <property name="title" translatable="yes">_Do Not Disturb</property>
+ <property name="use-underline">True</property>
+ <property name="show-switch">True</property>
</object>
</child>
- <child type="label_item">
- <placeholder/>
+ <child>
+ <object class="CcListRow" id="lock_screen_row">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">_Lock Screen Notifications</property>
+ <property name="use-underline">True</property>
+ <property name="show-switch">True</property>
+ </object>
</child>
</object>
<packing>
@@ -91,28 +82,19 @@
</packing>
</child>
<child>
- <object class="GtkFrame">
+ <object class="GtkListBox" id="app_listbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkListBox" id="app_listbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="selection_mode">none</property>
- <signal name="keynav-failed" handler="keynav_failed"
object="CcNotificationsPanel" swapped="yes" />
- <signal name="row-activated" handler="select_app" object="CcNotificationsPanel"
swapped="yes" />
- <accessibility>
- <relation type="labelled-by" target="app_list_heading_label"/>
- </accessibility>
- </object>
- </child>
- <child>
- <placeholder/>
- </child>
+ <property name="selection_mode">none</property>
+ <signal name="keynav-failed" handler="keynav_failed" object="CcNotificationsPanel"
swapped="yes" />
+ <signal name="row-activated" handler="select_app" object="CcNotificationsPanel"
swapped="yes" />
+ <style>
+ <class name="content"/>
+ </style>
+ <accessibility>
+ <relation type="labelled-by" target="app_list_heading_label"/>
+ </accessibility>
</object>
<packing>
<property name="expand">False</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]