summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2022-01-19 19:27:12 -0300
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2022-01-20 02:23:42 +0000
commit4209c510da67ebdac1fcab2fb0f6723fe127cef8 (patch)
tree3999f343abc0fcd03b2e5891df73b1a56ad4d232 /shell
parentbcd969f052da84a9974ff2aaec7f674250e1a05c (diff)
downloadgnome-control-center-4209c510da67ebdac1fcab2fb0f6723fe127cef8.tar.gz
window: Remove panel headerbar widgetry
Now that panels handle their own titlebars, remove the corresponding widgetry from CcWindow.
Diffstat (limited to 'shell')
-rw-r--r--shell/cc-window.c22
-rw-r--r--shell/cc-window.ui45
2 files changed, 0 insertions, 67 deletions
diff --git a/shell/cc-window.c b/shell/cc-window.c
index 6c525badd..589f5a45a 100644
--- a/shell/cc-window.c
+++ b/shell/cc-window.c
@@ -50,14 +50,10 @@ struct _CcWindow
{
AdwApplicationWindow parent;
- GtkRevealer *back_revealer;
GtkMessageDialog *development_warning_dialog;
AdwHeaderBar *header;
AdwLeaflet *main_leaflet;
- AdwHeaderBar *panel_headerbar;
CcPanelList *panel_list;
- AdwWindowTitle *panel_title_widget;
- GtkStack *panel_titlebar_stack;
GtkButton *previous_button;
GtkSearchBar *search_bar;
GtkToggleButton *search_button;
@@ -65,8 +61,6 @@ struct _CcWindow
GtkBox *sidebar_box;
AdwWindowTitle *sidebar_title_widget;
GtkStack *stack;
- GtkBox *top_left_box;
- GtkBox *top_right_box;
GtkWidget *current_panel;
char *current_panel_id;
@@ -170,9 +164,6 @@ activate_panel (CcWindow *self,
gtk_widget_show (self->current_panel);
gtk_stack_set_visible_child_name (self->stack, id);
- /* set the title of the window */
- adw_window_title_set_title (self->panel_title_widget, name);
-
sidebar_widget = cc_panel_get_sidebar_widget (CC_PANEL (self->current_panel));
cc_panel_list_add_sidebar_widget (self->panel_list, sidebar_widget);
/* Ensure we show the panel when the leaflet is folded and a sidebar widget's
@@ -526,12 +517,6 @@ search_entry_activate_cb (CcWindow *self)
}
static void
-back_button_clicked_cb (CcWindow *self)
-{
- adw_leaflet_navigate (self->main_leaflet, ADW_NAVIGATION_DIRECTION_BACK);
-}
-
-static void
previous_button_clicked_cb (CcWindow *self)
{
g_debug ("Num previous panels? %d", g_queue_get_length (self->previous_panels));
@@ -797,14 +782,10 @@ cc_window_class_init (CcWindowClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/ControlCenter/gtk/cc-window.ui");
- gtk_widget_class_bind_template_child (widget_class, CcWindow, back_revealer);
gtk_widget_class_bind_template_child (widget_class, CcWindow, development_warning_dialog);
gtk_widget_class_bind_template_child (widget_class, CcWindow, header);
gtk_widget_class_bind_template_child (widget_class, CcWindow, main_leaflet);
- gtk_widget_class_bind_template_child (widget_class, CcWindow, panel_headerbar);
gtk_widget_class_bind_template_child (widget_class, CcWindow, panel_list);
- gtk_widget_class_bind_template_child (widget_class, CcWindow, panel_title_widget);
- gtk_widget_class_bind_template_child (widget_class, CcWindow, panel_titlebar_stack);
gtk_widget_class_bind_template_child (widget_class, CcWindow, previous_button);
gtk_widget_class_bind_template_child (widget_class, CcWindow, search_bar);
gtk_widget_class_bind_template_child (widget_class, CcWindow, search_button);
@@ -812,10 +793,7 @@ cc_window_class_init (CcWindowClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcWindow, sidebar_box);
gtk_widget_class_bind_template_child (widget_class, CcWindow, sidebar_title_widget);
gtk_widget_class_bind_template_child (widget_class, CcWindow, stack);
- gtk_widget_class_bind_template_child (widget_class, CcWindow, top_left_box);
- gtk_widget_class_bind_template_child (widget_class, CcWindow, top_right_box);
- gtk_widget_class_bind_template_callback (widget_class, back_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, on_main_leaflet_folded_changed_cb);
gtk_widget_class_bind_template_callback (widget_class, on_development_warning_dialog_responded_cb);
gtk_widget_class_bind_template_callback (widget_class, previous_button_clicked_cb);
diff --git a/shell/cc-window.ui b/shell/cc-window.ui
index 45a160dda..6f0f3f979 100644
--- a/shell/cc-window.ui
+++ b/shell/cc-window.ui
@@ -116,51 +116,6 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <!-- Panel titlebar -->
- <child>
- <object class="GtkStack" id="panel_titlebar_stack">
- <property name="hexpand">True</property>
- <child>
- <object class="AdwHeaderBar" id="panel_headerbar">
- <property name="hexpand">True</property>
- <property name="show-start-title-buttons" bind-source="main_leaflet" bind-property="folded" bind-flags="sync-create"/>
- <property name="show-end-title-buttons">True</property>
- <property name="title-widget">
- <object class="AdwWindowTitle" id="panel_title_widget" />
- </property>
- <child>
- <object class="GtkRevealer" id="back_revealer">
- <property name="transition-type">crossfade</property>
- <property name="transition-duration" bind-source="main_leaflet" bind-property="mode-transition-duration" bind-flags="bidirectional|sync-create"/>
- <property name="visible" bind-source="main_leaflet" bind-property="folded" bind-flags="sync-create"/>
- <property name="reveal-child" bind-source="main_leaflet" bind-property="folded" bind-flags="sync-create"/>
- <child>
- <object class="GtkButton" id="back">
- <property name="receives_default">False</property>
- <property name="valign">center</property>
- <property name="icon-name">go-previous-symbolic</property>
- <signal name="clicked" handler="back_button_clicked_cb" object="CcWindow" swapped="yes" />
- <style>
- <class name="image-button"/>
- </style>
- <accessibility>
- <property name="label" translatable="yes">Back</property>
- </accessibility>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="top_left_box" />
- </child>
- <child type="end">
- <object class="GtkBox" id="top_right_box" />
- </child>
- </object>
- </child>
- </object>
- </child>
-
<child>
<object class="GtkStack" id="stack">
<property name="hexpand">True</property>