window: Remove panel headerbar widgetry
Now that panels handle their own titlebars, remove the corresponding widgetry from CcWindow.
This commit is contained in:
parent
bcd969f052
commit
4209c510da
2 changed files with 0 additions and 67 deletions
|
@ -50,14 +50,10 @@ struct _CcWindow
|
||||||
{
|
{
|
||||||
AdwApplicationWindow parent;
|
AdwApplicationWindow parent;
|
||||||
|
|
||||||
GtkRevealer *back_revealer;
|
|
||||||
GtkMessageDialog *development_warning_dialog;
|
GtkMessageDialog *development_warning_dialog;
|
||||||
AdwHeaderBar *header;
|
AdwHeaderBar *header;
|
||||||
AdwLeaflet *main_leaflet;
|
AdwLeaflet *main_leaflet;
|
||||||
AdwHeaderBar *panel_headerbar;
|
|
||||||
CcPanelList *panel_list;
|
CcPanelList *panel_list;
|
||||||
AdwWindowTitle *panel_title_widget;
|
|
||||||
GtkStack *panel_titlebar_stack;
|
|
||||||
GtkButton *previous_button;
|
GtkButton *previous_button;
|
||||||
GtkSearchBar *search_bar;
|
GtkSearchBar *search_bar;
|
||||||
GtkToggleButton *search_button;
|
GtkToggleButton *search_button;
|
||||||
|
@ -65,8 +61,6 @@ struct _CcWindow
|
||||||
GtkBox *sidebar_box;
|
GtkBox *sidebar_box;
|
||||||
AdwWindowTitle *sidebar_title_widget;
|
AdwWindowTitle *sidebar_title_widget;
|
||||||
GtkStack *stack;
|
GtkStack *stack;
|
||||||
GtkBox *top_left_box;
|
|
||||||
GtkBox *top_right_box;
|
|
||||||
|
|
||||||
GtkWidget *current_panel;
|
GtkWidget *current_panel;
|
||||||
char *current_panel_id;
|
char *current_panel_id;
|
||||||
|
@ -170,9 +164,6 @@ activate_panel (CcWindow *self,
|
||||||
gtk_widget_show (self->current_panel);
|
gtk_widget_show (self->current_panel);
|
||||||
gtk_stack_set_visible_child_name (self->stack, id);
|
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));
|
sidebar_widget = cc_panel_get_sidebar_widget (CC_PANEL (self->current_panel));
|
||||||
cc_panel_list_add_sidebar_widget (self->panel_list, sidebar_widget);
|
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
|
/* Ensure we show the panel when the leaflet is folded and a sidebar widget's
|
||||||
|
@ -525,12 +516,6 @@ search_entry_activate_cb (CcWindow *self)
|
||||||
gtk_search_bar_set_search_mode (self->search_bar, !changed);
|
gtk_search_bar_set_search_mode (self->search_bar, !changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
back_button_clicked_cb (CcWindow *self)
|
|
||||||
{
|
|
||||||
adw_leaflet_navigate (self->main_leaflet, ADW_NAVIGATION_DIRECTION_BACK);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
previous_button_clicked_cb (CcWindow *self)
|
previous_button_clicked_cb (CcWindow *self)
|
||||||
{
|
{
|
||||||
|
@ -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_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, development_warning_dialog);
|
||||||
gtk_widget_class_bind_template_child (widget_class, CcWindow, header);
|
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, 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_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, previous_button);
|
||||||
gtk_widget_class_bind_template_child (widget_class, CcWindow, search_bar);
|
gtk_widget_class_bind_template_child (widget_class, CcWindow, search_bar);
|
||||||
gtk_widget_class_bind_template_child (widget_class, CcWindow, search_button);
|
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_box);
|
||||||
gtk_widget_class_bind_template_child (widget_class, CcWindow, sidebar_title_widget);
|
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, 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_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, on_development_warning_dialog_responded_cb);
|
||||||
gtk_widget_class_bind_template_callback (widget_class, previous_button_clicked_cb);
|
gtk_widget_class_bind_template_callback (widget_class, previous_button_clicked_cb);
|
||||||
|
|
|
@ -116,51 +116,6 @@
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="vexpand">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>
|
<child>
|
||||||
<object class="GtkStack" id="stack">
|
<object class="GtkStack" id="stack">
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
|
|
Loading…
Add table
Reference in a new issue