notifications: Use GtkTemplate

Switch from GtkBuilder to using GtkTemplate.
Rename widget IDs to be more readable.
Drop widget IDs that are not used.
Move code into the .ui file that can be.
Connect signals in swapped form.
This commit is contained in:
Robert Ancell 2018-10-10 15:41:37 +13:00 committed by Georges Basile Stavracas Neto
parent 044eeb0d06
commit 9fa1e73da8
6 changed files with 303 additions and 312 deletions

View file

@ -37,8 +37,15 @@
struct _CcNotificationsPanel { struct _CcNotificationsPanel {
CcPanel parent_instance; CcPanel parent_instance;
GtkListBox *app_listbox;
GtkSwitch *lock_screen_switch;
GtkScrolledWindow *main_scrolled_window;
GtkBox *main_box;
GtkListBox *options_listbox;
GtkSwitch *popups_switch;
GtkSizeGroup *sizegroup1;
GSettings *master_settings; GSettings *master_settings;
GtkBuilder *builder;
GCancellable *apps_load_cancellable; GCancellable *apps_load_cancellable;
@ -67,7 +74,7 @@ typedef struct {
} Application; } Application;
static void build_app_store (CcNotificationsPanel *panel); static void build_app_store (CcNotificationsPanel *panel);
static void select_app (GtkListBox *box, GtkListBoxRow *row, CcNotificationsPanel *panel); static void select_app (CcNotificationsPanel *panel, GtkListBoxRow *row);
static int sort_apps (gconstpointer one, gconstpointer two, gpointer user_data); static int sort_apps (gconstpointer one, gconstpointer two, gpointer user_data);
CC_PANEL_REGISTER (CcNotificationsPanel, cc_notifications_panel); CC_PANEL_REGISTER (CcNotificationsPanel, cc_notifications_panel);
@ -77,7 +84,6 @@ cc_notifications_panel_dispose (GObject *object)
{ {
CcNotificationsPanel *panel = CC_NOTIFICATIONS_PANEL (object); CcNotificationsPanel *panel = CC_NOTIFICATIONS_PANEL (object);
g_clear_object (&panel->builder);
g_clear_object (&panel->master_settings); g_clear_object (&panel->master_settings);
g_clear_pointer (&panel->known_applications, g_hash_table_unref); g_clear_pointer (&panel->known_applications, g_hash_table_unref);
g_clear_pointer (&panel->sections, g_list_free); g_clear_pointer (&panel->sections, g_list_free);
@ -100,9 +106,9 @@ cc_notifications_panel_finalize (GObject *object)
} }
static gboolean static gboolean
keynav_failed (GtkWidget *widget, keynav_failed (CcNotificationsPanel *panel,
GtkDirectionType direction, GtkDirectionType direction,
CcNotificationsPanel *panel) GtkWidget *widget)
{ {
gdouble value, lower, upper, page; gdouble value, lower, upper, page;
GList *item, *sections; GList *item, *sections;
@ -164,79 +170,41 @@ on_perm_store_ready (GObject *source_object,
static void static void
cc_notifications_panel_init (CcNotificationsPanel *panel) cc_notifications_panel_init (CcNotificationsPanel *panel)
{ {
GtkWidget *w;
GtkWidget *label;
g_autoptr(GError) error = NULL;
g_resources_register (cc_notifications_get_resource ()); g_resources_register (cc_notifications_get_resource ());
gtk_widget_init_template (GTK_WIDGET (panel));
panel->known_applications = g_hash_table_new_full (g_str_hash, g_str_equal, panel->known_applications = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, g_free); NULL, g_free);
panel->builder = gtk_builder_new ();
if (gtk_builder_add_from_resource (panel->builder,
"/org/gnome/control-center/notifications/notifications.ui",
&error) == 0)
{
g_error ("Error loading UI file: %s", error->message);
return;
}
panel->master_settings = g_settings_new (MASTER_SCHEMA); panel->master_settings = g_settings_new (MASTER_SCHEMA);
g_settings_bind (panel->master_settings, "show-banners", g_settings_bind (panel->master_settings, "show-banners",
gtk_builder_get_object (panel->builder, "ccnotify-switch-banners"), panel->popups_switch,
"active", G_SETTINGS_BIND_DEFAULT); "active", G_SETTINGS_BIND_DEFAULT);
g_settings_bind (panel->master_settings, "show-in-lock-screen", g_settings_bind (panel->master_settings, "show-in-lock-screen",
gtk_builder_get_object (panel->builder, "ccnotify-switch-lock-screen"), panel->lock_screen_switch,
"active", G_SETTINGS_BIND_DEFAULT); "active", G_SETTINGS_BIND_DEFAULT);
w = GTK_WIDGET (gtk_builder_get_object (panel->builder, panel->focus_adjustment = gtk_scrolled_window_get_vadjustment (panel->main_scrolled_window);
"ccnotify-main-scrolled-window"));
panel->focus_adjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (w));
w = GTK_WIDGET (gtk_builder_get_object (panel->builder, gtk_container_set_focus_vadjustment (GTK_CONTAINER (panel->main_box), panel->focus_adjustment);
"ccnotify-main-box"));
gtk_container_set_focus_vadjustment (GTK_CONTAINER (w), panel->focus_adjustment);
w = GTK_WIDGET (gtk_builder_get_object (panel->builder, panel->sections = g_list_append (panel->sections, panel->options_listbox);
"ccnotify-switch-listbox")); panel->sections_reverse = g_list_prepend (panel->sections_reverse, panel->options_listbox);
panel->sections = g_list_append (panel->sections, w); gtk_list_box_set_header_func (panel->options_listbox,
panel->sections_reverse = g_list_prepend (panel->sections_reverse, w);
g_signal_connect_object (w, "keynav-failed", G_CALLBACK (keynav_failed), panel, 0);
gtk_list_box_set_header_func (GTK_LIST_BOX (w),
cc_list_box_update_header_func, cc_list_box_update_header_func,
NULL, NULL); NULL, NULL);
label = GTK_WIDGET (gtk_builder_get_object (panel->builder, panel->sections = g_list_append (panel->sections, panel->app_listbox);
"label1")); panel->sections_reverse = g_list_prepend (panel->sections_reverse, panel->app_listbox);
w = GTK_WIDGET (gtk_builder_get_object (panel->builder, gtk_list_box_set_sort_func (panel->app_listbox, (GtkListBoxSortFunc)sort_apps, NULL, NULL);
"ccnotify-app-listbox")); gtk_list_box_set_header_func (panel->app_listbox,
atk_object_add_relationship (ATK_OBJECT (gtk_widget_get_accessible (label)),
ATK_RELATION_LABEL_FOR,
ATK_OBJECT (gtk_widget_get_accessible (w)));
atk_object_add_relationship (ATK_OBJECT (gtk_widget_get_accessible (w)),
ATK_RELATION_LABELLED_BY,
ATK_OBJECT (gtk_widget_get_accessible (label)));
panel->sections = g_list_append (panel->sections, w);
panel->sections_reverse = g_list_prepend (panel->sections_reverse, w);
g_signal_connect_object (w, "keynav-failed", G_CALLBACK (keynav_failed), panel, 0);
gtk_list_box_set_sort_func (GTK_LIST_BOX (w), (GtkListBoxSortFunc)sort_apps, NULL, NULL);
gtk_list_box_set_header_func (GTK_LIST_BOX (w),
cc_list_box_update_header_func, cc_list_box_update_header_func,
NULL, NULL); NULL, NULL);
g_signal_connect_object (GTK_LIST_BOX (w), "row-activated",
G_CALLBACK (select_app), panel, 0);
build_app_store (panel); build_app_store (panel);
w = GTK_WIDGET (gtk_builder_get_object (panel->builder,
"ccnotify-main-scrolled-window"));
gtk_container_add (GTK_CONTAINER (panel), w);
gtk_widget_show (w);
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE, G_DBUS_PROXY_FLAGS_NONE,
NULL, NULL,
@ -258,6 +226,7 @@ static void
cc_notifications_panel_class_init (CcNotificationsPanelClass *klass) cc_notifications_panel_class_init (CcNotificationsPanelClass *klass)
{ {
GObjectClass *object_class = G_OBJECT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
CcPanelClass *panel_class = CC_PANEL_CLASS (klass); CcPanelClass *panel_class = CC_PANEL_CLASS (klass);
panel_class->get_help_uri = cc_notifications_panel_get_help_uri; panel_class->get_help_uri = cc_notifications_panel_get_help_uri;
@ -267,6 +236,19 @@ cc_notifications_panel_class_init (CcNotificationsPanelClass *klass)
* gets finalized */ * gets finalized */
object_class->dispose = cc_notifications_panel_dispose; object_class->dispose = cc_notifications_panel_dispose;
object_class->finalize = cc_notifications_panel_finalize; object_class->finalize = cc_notifications_panel_finalize;
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/notifications/cc-notifications-panel.ui");
gtk_widget_class_bind_template_child (widget_class, CcNotificationsPanel, app_listbox);
gtk_widget_class_bind_template_child (widget_class, CcNotificationsPanel, lock_screen_switch);
gtk_widget_class_bind_template_child (widget_class, CcNotificationsPanel, main_scrolled_window);
gtk_widget_class_bind_template_child (widget_class, CcNotificationsPanel, main_box);
gtk_widget_class_bind_template_child (widget_class, CcNotificationsPanel, options_listbox);
gtk_widget_class_bind_template_child (widget_class, CcNotificationsPanel, popups_switch);
gtk_widget_class_bind_template_child (widget_class, CcNotificationsPanel, sizegroup1);
gtk_widget_class_bind_template_callback (widget_class, keynav_failed);
gtk_widget_class_bind_template_callback (widget_class, select_app);
} }
static inline GQuark static inline GQuark
@ -306,7 +288,7 @@ static void
add_application (CcNotificationsPanel *panel, add_application (CcNotificationsPanel *panel,
Application *app) Application *app)
{ {
GtkWidget *box, *w, *row, *list_box; GtkWidget *box, *w, *row;
g_autoptr(GIcon) icon = NULL; g_autoptr(GIcon) icon = NULL;
const gchar *app_name; const gchar *app_name;
int size; int size;
@ -330,17 +312,14 @@ add_application (CcNotificationsPanel *panel,
g_object_set_qdata_full (G_OBJECT (row), application_quark (), g_object_set_qdata_full (G_OBJECT (row), application_quark (),
app, (GDestroyNotify) application_free); app, (GDestroyNotify) application_free);
list_box = GTK_WIDGET (gtk_builder_get_object (panel->builder, gtk_container_add (GTK_CONTAINER (panel->app_listbox), row);
"ccnotify-app-listbox"));
gtk_container_add (GTK_CONTAINER (list_box), row);
gtk_container_add (GTK_CONTAINER (row), box); gtk_container_add (GTK_CONTAINER (row), box);
w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG); w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
gtk_widget_show (w); gtk_widget_show (w);
gtk_icon_size_lookup (GTK_ICON_SIZE_DND, &size, NULL); gtk_icon_size_lookup (GTK_ICON_SIZE_DND, &size, NULL);
gtk_image_set_pixel_size (GTK_IMAGE (w), size); gtk_image_set_pixel_size (GTK_IMAGE (w), size);
gtk_size_group_add_widget (GTK_SIZE_GROUP (gtk_builder_get_object (panel->builder, "sizegroup1")), w); gtk_size_group_add_widget (panel->sizegroup1, w);
gtk_container_add (GTK_CONTAINER (box), w); gtk_container_add (GTK_CONTAINER (box), w);
w = gtk_label_new (app_name); w = gtk_label_new (app_name);
@ -527,9 +506,8 @@ load_apps_async (CcNotificationsPanel *panel)
} }
static void static void
children_changed (GSettings *settings, children_changed (CcNotificationsPanel *panel,
const char *key, const char *key)
CcNotificationsPanel *panel)
{ {
int i; int i;
g_auto (GStrv) new_app_ids = NULL; g_auto (GStrv) new_app_ids = NULL;
@ -545,19 +523,18 @@ static void
build_app_store (CcNotificationsPanel *panel) build_app_store (CcNotificationsPanel *panel)
{ {
/* Build application entries for known applications */ /* Build application entries for known applications */
children_changed (panel->master_settings, NULL, panel); children_changed (panel, NULL);
g_signal_connect_object (panel->master_settings, g_signal_connect_object (panel->master_settings,
"changed::application-children", "changed::application-children",
G_CALLBACK (children_changed), panel, 0); G_CALLBACK (children_changed), panel, G_CONNECT_SWAPPED);
/* Scan applications that statically declare to show notifications */ /* Scan applications that statically declare to show notifications */
load_apps_async (panel); load_apps_async (panel);
} }
static void static void
select_app (GtkListBox *list_box, select_app (CcNotificationsPanel *panel,
GtkListBoxRow *row, GtkListBoxRow *row)
CcNotificationsPanel *panel)
{ {
Application *app; Application *app;
g_autofree gchar *app_id = NULL; g_autofree gchar *app_id = NULL;

View file

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.12"/>
<template class="CcNotificationsPanel" parent="CcPanel">
<property name="visible">True</property>
<child>
<object class="GtkScrolledWindow" id="main_scrolled_window">
<property name="height_request">400</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<!-- Stub boxes to make the content cover 1/3 of the screen -->
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<!-- Content -->
<child>
<object class="GtkBox" id="main_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin">32</property>
<property name="orientation">vertical</property>
<property name="hexpand">True</property>
<child>
<object class="GtkFrame">
<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>
<child>
<object class="GtkListBox" id="options_listbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="selection_mode">none</property>
<property name="activate_on_single_click">False</property>
<signal name="keynav-failed" handler="keynav_failed" object="CcNotificationsPanel" swapped="yes" />
<child>
<object class="GtkListBoxRow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="activatable">False</property>
<property name="selectable">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel">
<property name="height_request">32</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_start">12</property>
<property name="margin_top">8</property>
<property name="margin_bottom">8</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Notification _Popups</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">popups_switch</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="popups_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="margin_end">12</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="activatable">False</property>
<property name="selectable">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel">
<property name="height_request">32</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_start">12</property>
<property name="margin_top">8</property>
<property name="margin_bottom">8</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Lock Screen Notifications</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">lock_screen_switch</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="lock_screen_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="margin_end">12</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="app_list_heading_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="margin_bottom">12</property>
<property name="label" translatable="yes" comments="List of applications.">Applications</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
<accessibility>
<relation type="label-for" target="app_listbox"/>
</accessibility>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">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="vexpand">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>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
<object class="GtkSizeGroup" id="sizegroup1">
<property name="mode">both</property>
</object>
</interface>

View file

@ -24,7 +24,7 @@ sources = files(
resource_data = files( resource_data = files(
'cc-app-notifications-dialog.ui', 'cc-app-notifications-dialog.ui',
'notifications.ui' 'cc-notifications-panel.ui'
) )
sources += gnome.compile_resources( sources += gnome.compile_resources(

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<gresources> <gresources>
<gresource prefix="/org/gnome/control-center/notifications"> <gresource prefix="/org/gnome/control-center/notifications">
<file preprocess="xml-stripblanks">notifications.ui</file>
<file preprocess="xml-stripblanks">cc-app-notifications-dialog.ui</file> <file preprocess="xml-stripblanks">cc-app-notifications-dialog.ui</file>
<file preprocess="xml-stripblanks">cc-notifications-panel.ui</file>
</gresource> </gresource>
</gresources> </gresources>

View file

@ -1,228 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.12"/>
<object class="GtkScrolledWindow" id="ccnotify-main-scrolled-window">
<property name="height_request">400</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkViewport" id="ccnotify-viewport">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<!-- Stub boxes to make the content cover 1/3 of the screen -->
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="pack_type">end</property>
</packing>
</child>
<!-- Content -->
<child>
<object class="GtkBox" id="ccnotify-main-box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin">32</property>
<property name="orientation">vertical</property>
<property name="hexpand">True</property>
<child>
<object class="GtkFrame" id="ccnotify-switchbox-frame">
<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>
<child>
<object class="GtkListBox" id="ccnotify-switch-listbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="selection_mode">none</property>
<property name="activate_on_single_click">False</property>
<child>
<object class="GtkListBoxRow" id="ccnotify-listboxrow-banners">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="activatable">False</property>
<property name="selectable">False</property>
<child>
<object class="GtkBox" id="ccnotify-box-banners">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel" id="ccnotify-label-banners">
<property name="height_request">32</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_start">12</property>
<property name="margin_top">8</property>
<property name="margin_bottom">8</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Notification _Popups</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">ccnotify-switch-banners</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="ccnotify-switch-banners">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="margin_end">12</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="ccnotify-listboxrow-screen">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="activatable">False</property>
<property name="selectable">False</property>
<child>
<object class="GtkBox" id="ccnotify-box-screen">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<child>
<object class="GtkLabel" id="ccnotify-label-lock-screen">
<property name="height_request">32</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_start">12</property>
<property name="margin_top">8</property>
<property name="margin_bottom">8</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Lock Screen Notifications</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">ccnotify-switch-lock-screen</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="ccnotify-switch-lock-screen">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="margin_end">12</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="margin_bottom">12</property>
<property name="label" translatable="yes" comments="List of applications.">Applications</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="ccnotify-app-frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkListBox" id="ccnotify-app-listbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="selection_mode">none</property>
</object>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<property name="mode">both</property>
</object>
</interface>

View file

@ -123,8 +123,8 @@ panels/network/wireless-security/ws-wpa-psk.c
panels/network/wireless-security/ws-wpa-psk.ui panels/network/wireless-security/ws-wpa-psk.ui
panels/notifications/cc-app-notifications-dialog.ui panels/notifications/cc-app-notifications-dialog.ui
panels/notifications/cc-notifications-panel.c panels/notifications/cc-notifications-panel.c
panels/notifications/cc-notifications-panel.ui
panels/notifications/gnome-notifications-panel.desktop.in.in panels/notifications/gnome-notifications-panel.desktop.in.in
panels/notifications/notifications.ui
panels/online-accounts/cc-online-accounts-panel.c panels/online-accounts/cc-online-accounts-panel.c
panels/online-accounts/gnome-online-accounts-panel.desktop.in.in panels/online-accounts/gnome-online-accounts-panel.desktop.in.in
panels/online-accounts/online-accounts.ui panels/online-accounts/online-accounts.ui