[gnome-control-center/gbsneto/panel-headerbar-cleanup: 5/14] panel: Add empty UI template file
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gbsneto/panel-headerbar-cleanup: 5/14] panel: Add empty UI template file
- Date: Wed, 19 Jan 2022 22:43:21 +0000 (UTC)
commit 7cd69f01c4894987660d77271049400bf5cc1067
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Jan 19 12:00:07 2022 -0300
panel: Add empty UI template file
The UI file currently has nothing, but we'll increment it soon
with the headerbar.
shell/cc-panel.c | 4 ++++
shell/cc-panel.ui | 5 +++++
shell/gnome-control-center.gresource.xml | 1 +
3 files changed, 10 insertions(+)
---
diff --git a/shell/cc-panel.c b/shell/cc-panel.c
index a72c2a377..bca7178cb 100644
--- a/shell/cc-panel.c
+++ b/shell/cc-panel.c
@@ -170,6 +170,7 @@ static void
cc_panel_class_init (CcPanelClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->get_property = cc_panel_get_property;
object_class->set_property = cc_panel_set_property;
@@ -203,11 +204,14 @@ cc_panel_class_init (CcPanelClass *klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPS, properties);
+
+ gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/ControlCenter/gtk/cc-panel.ui");
}
static void
cc_panel_init (CcPanel *panel)
{
+ gtk_widget_init_template (GTK_WIDGET (panel));
}
/**
diff --git a/shell/cc-panel.ui b/shell/cc-panel.ui
new file mode 100644
index 000000000..7c38d323c
--- /dev/null
+++ b/shell/cc-panel.ui
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <template class="CcPanel" parent="AdwBin">
+ </template>
+</interface>
diff --git a/shell/gnome-control-center.gresource.xml b/shell/gnome-control-center.gresource.xml
index 5550440e1..bdd1ec209 100644
--- a/shell/gnome-control-center.gresource.xml
+++ b/shell/gnome-control-center.gresource.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/ControlCenter/gtk">
+ <file preprocess="xml-stripblanks">cc-panel.ui</file>
<file preprocess="xml-stripblanks">cc-panel-list.ui</file>
<file preprocess="xml-stripblanks">cc-window.ui</file>
<file preprocess="xml-stripblanks">help-overlay.ui</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]