[gnome-control-center/wip/cdavis/40-consistency] applications: Re-arrange hierarchy of panel
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/cdavis/40-consistency] applications: Re-arrange hierarchy of panel
- Date: Fri, 19 Feb 2021 22:41:49 +0000 (UTC)
commit d2c471a4859a14f29fc9570e310a7be938d80f31
Author: Christopher Davis <brainblasted disroot org>
Date: Thu Feb 11 21:18:58 2021 -0800
applications: Re-arrange hierarchy of panel
To make the use of HdyStatusPage and HdyPreferencesPage
easier, we need to change how the widgets are set up so
that the statuspage is separate from the scrolledwindow.
panels/applications/cc-applications-panel.c | 168 +++++++++++++--------------
panels/applications/cc-applications-panel.ui | 122 +++++++++----------
2 files changed, 145 insertions(+), 145 deletions(-)
---
diff --git a/panels/applications/cc-applications-panel.c b/panels/applications/cc-applications-panel.c
index 6b9a1c05b..42e655df3 100644
--- a/panels/applications/cc-applications-panel.c
+++ b/panels/applications/cc-applications-panel.c
@@ -55,92 +55,92 @@
struct _CcApplicationsPanel
{
- CcPanel parent;
-
- GtkBox *sidebar_box;
- GtkListBox *sidebar_listbox;
- GtkEntry *sidebar_search_entry;
- GtkButton *header_button;
- GtkLabel *title_label;
- GAppInfoMonitor *monitor;
- gulong monitor_id;
+ CcPanel parent;
+
+ GtkBox *sidebar_box;
+ GtkListBox *sidebar_listbox;
+ GtkEntry *sidebar_search_entry;
+ GtkButton *header_button;
+ GtkLabel *title_label;
+ GAppInfoMonitor *monitor;
+ gulong monitor_id;
#ifdef HAVE_MALCONTENT
- GCancellable *cancellable;
+ GCancellable *cancellable;
- MctAppFilter *app_filter;
- MctManager *manager;
- guint app_filter_id;
+ MctAppFilter *app_filter;
+ MctManager *manager;
+ guint app_filter_id;
#endif
- gchar *current_app_id;
- gchar *current_portal_app_id;
-
- GHashTable *globs;
- GHashTable *search_providers;
-
- GDBusProxy *perm_store;
- GSettings *notification_settings;
- GSettings *location_settings;
- GSettings *privacy_settings;
- GSettings *search_settings;
-
- GtkStack *stack;
- GtkBox *empty_box;
- GtkBox *settings_box;
- GtkButton *install_button;
-
- GtkBox *permission_section;
- GtkListBox *permission_list;
- CcToggleRow *camera;
- CcInfoRow *no_camera;
- CcToggleRow *location;
- CcInfoRow *no_location;
- CcToggleRow *shortcuts;
- CcToggleRow *microphone;
- CcInfoRow *no_microphone;
- CcInfoRow *builtin;
- GtkDialog *builtin_dialog;
- GtkLabel *builtin_label;
- GtkListBox *builtin_list;
-
- GtkBox *integration_section;
- GtkListBox *integration_list;
- CcToggleRow *notification;
- CcToggleRow *background;
- CcToggleRow *wallpaper;
- CcToggleRow *sound;
- CcInfoRow *no_sound;
- CcToggleRow *search;
- CcInfoRow *no_search;
-
- GtkBox *handler_section;
- GtkButton *handler_reset;
- GtkListBox *handler_list;
- CcInfoRow *hypertext;
- CcInfoRow *text;
- CcInfoRow *images;
- CcInfoRow *fonts;
- CcInfoRow *archives;
- CcInfoRow *packages;
- CcInfoRow *audio;
- CcInfoRow *video;
- CcInfoRow *other;
- CcInfoRow *link;
-
- GtkBox *usage_section;
- GtkListBox *usage_list;
- CcInfoRow *storage;
- GtkDialog *storage_dialog;
- GtkListBox *storage_list;
- CcInfoRow *app;
- CcInfoRow *data;
- CcInfoRow *cache;
- CcInfoRow *total;
- GtkButton *clear_cache_button;
-
- guint64 app_size;
- guint64 cache_size;
- guint64 data_size;
+ gchar *current_app_id;
+ gchar *current_portal_app_id;
+
+ GHashTable *globs;
+ GHashTable *search_providers;
+
+ GDBusProxy *perm_store;
+ GSettings *notification_settings;
+ GSettings *location_settings;
+ GSettings *privacy_settings;
+ GSettings *search_settings;
+
+ GtkStack *stack;
+ GtkBox *empty_box;
+ GtkScrolledWindow *settings_page;
+ GtkButton *install_button;
+
+ GtkBox *permission_section;
+ GtkListBox *permission_list;
+ CcToggleRow *camera;
+ CcInfoRow *no_camera;
+ CcToggleRow *location;
+ CcInfoRow *no_location;
+ CcToggleRow *shortcuts;
+ CcToggleRow *microphone;
+ CcInfoRow *no_microphone;
+ CcInfoRow *builtin;
+ GtkDialog *builtin_dialog;
+ GtkLabel *builtin_label;
+ GtkListBox *builtin_list;
+
+ GtkBox *integration_section;
+ GtkListBox *integration_list;
+ CcToggleRow *notification;
+ CcToggleRow *background;
+ CcToggleRow *wallpaper;
+ CcToggleRow *sound;
+ CcInfoRow *no_sound;
+ CcToggleRow *search;
+ CcInfoRow *no_search;
+
+ GtkBox *handler_section;
+ GtkButton *handler_reset;
+ GtkListBox *handler_list;
+ CcInfoRow *hypertext;
+ CcInfoRow *text;
+ CcInfoRow *images;
+ CcInfoRow *fonts;
+ CcInfoRow *archives;
+ CcInfoRow *packages;
+ CcInfoRow *audio;
+ CcInfoRow *video;
+ CcInfoRow *other;
+ CcInfoRow *link;
+
+ GtkBox *usage_section;
+ GtkListBox *usage_list;
+ CcInfoRow *storage;
+ GtkDialog *storage_dialog;
+ GtkListBox *storage_list;
+ CcInfoRow *app;
+ CcInfoRow *data;
+ CcInfoRow *cache;
+ CcInfoRow *total;
+ GtkButton *clear_cache_button;
+
+ guint64 app_size;
+ guint64 cache_size;
+ guint64 data_size;
};
static void select_app (CcApplicationsPanel *self,
@@ -1666,7 +1666,7 @@ update_panel (CcApplicationsPanel *self,
info = cc_applications_row_get_info (CC_APPLICATIONS_ROW (row));
gtk_label_set_label (self->title_label, g_app_info_get_display_name (info));
- gtk_stack_set_visible_child (self->stack, GTK_WIDGET (self->settings_box));
+ gtk_stack_set_visible_child (self->stack, GTK_WIDGET (self->settings_page));
gtk_widget_set_visible (GTK_WIDGET (self->header_button), gnome_software_is_installed ());
g_clear_pointer (&self->current_app_id, g_free);
@@ -2003,7 +2003,7 @@ cc_applications_panel_class_init (CcApplicationsPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, sidebar_listbox);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, sidebar_search_entry);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, search);
- gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, settings_box);
+ gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, settings_page);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, sound);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, stack);
gtk_widget_class_bind_template_child (widget_class, CcApplicationsPanel, storage);
diff --git a/panels/applications/cc-applications-panel.ui b/panels/applications/cc-applications-panel.ui
index 13f26d457..5260461c6 100644
--- a/panels/applications/cc-applications-panel.ui
+++ b/panels/applications/cc-applications-panel.ui
@@ -4,72 +4,72 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
- <object class="GtkScrolledWindow" id="main_scroll">
+ <object class="GtkStack" id="stack">
<property name="visible">1</property>
- <property name="hscrollbar-policy">never</property>
<child>
- <object class="HdyClamp">
- <property name="visible">True</property>
- <property name="margin_top">32</property>
- <property name="margin_bottom">32</property>
- <property name="margin_start">12</property>
- <property name="margin_end">12</property>
+ <object class="GtkBox" id="empty_box">
+ <property name="visible">1</property>
+ <property name="orientation">vertical</property>
+ <property name="valign">center</property>
<child>
- <object class="GtkStack" id="stack">
+ <object class="GtkImage">
<property name="visible">1</property>
+ <property name="valign">start</property>
+ <property name="pixel-size">80</property>
+ <property name="icon-name">org.gnome.Software-symbolic</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="fill">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">1</property>
+ <property name="margin-bottom">15</property>
+ <property name="label" translatable="yes">No applications</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ <attributes>
+ <attribute name="scale" value="1.2"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="install_button">
+ <property name="label" translatable="yes">Install some…</property>
+ <property name="visible">1</property>
+ <property name="can-focus">1</property>
+ <property name="receives-default">1</property>
+ <property name="halign">center</property>
+ <signal name="clicked" handler="open_software_cb" object="CcApplicationsPanel"
swapped="yes"/>
+ </object>
+ <packing>
+ <property name="fill">0</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkScrolledWindow" id="settings_page">
+ <property name="visible">1</property>
+ <property name="hscrollbar-policy">never</property>
+ <child>
+ <object class="HdyClamp">
+ <property name="visible">True</property>
+ <property name="margin_top">32</property>
+ <property name="margin_bottom">32</property>
+ <property name="margin_start">12</property>
+ <property name="margin_end">12</property>
<child>
- <object class="GtkBox" id="empty_box">
- <property name="visible">1</property>
- <property name="orientation">vertical</property>
- <property name="valign">center</property>
- <child>
- <object class="GtkImage">
- <property name="visible">1</property>
- <property name="valign">start</property>
- <property name="pixel-size">80</property>
- <property name="icon-name">org.gnome.Software-symbolic</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="fill">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel">
- <property name="visible">1</property>
- <property name="margin-bottom">15</property>
- <property name="label" translatable="yes">No applications</property>
- <style>
- <class name="dim-label"/>
- </style>
- <attributes>
- <attribute name="scale" value="1.2"/>
- </attributes>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="install_button">
- <property name="label" translatable="yes">Install some…</property>
- <property name="visible">1</property>
- <property name="can-focus">1</property>
- <property name="receives-default">1</property>
- <property name="halign">center</property>
- <signal name="clicked" handler="open_software_cb" object="CcApplicationsPanel"
swapped="yes"/>
- </object>
- <packing>
- <property name="fill">0</property>
- <property name="position">2</property>
- </packing>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkBox" id="settings_box">
+ <object class="GtkBox">
<property name="visible">1</property>
<property name="orientation">vertical</property>
<property name="spacing">24</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]