info-overview: Use AdwPreferences{Page,Group}

This commit is contained in:
Christopher Davis 2022-01-06 13:59:05 -08:00 committed by Georges Basile Stavracas Neto
parent 079bf51086
commit 96ecd3acdf
2 changed files with 130 additions and 157 deletions

View file

@ -60,13 +60,11 @@ struct _CcInfoOverviewPanel
CcListRow *disk_row; CcListRow *disk_row;
CcListRow *gnome_version_row; CcListRow *gnome_version_row;
CcListRow *graphics_row; CcListRow *graphics_row;
GtkListBox *hardware_box;
CcListRow *hardware_model_row; CcListRow *hardware_model_row;
GtkDialog *hostname_editor; GtkDialog *hostname_editor;
CcHostnameEntry *hostname_entry; CcHostnameEntry *hostname_entry;
CcListRow *hostname_row; CcListRow *hostname_row;
CcListRow *memory_row; CcListRow *memory_row;
GtkListBox *os_box;
GtkPicture *os_logo; GtkPicture *os_logo;
CcListRow *os_name_row; CcListRow *os_name_row;
CcListRow *os_type_row; CcListRow *os_type_row;
@ -939,13 +937,11 @@ cc_info_overview_panel_class_init (CcInfoOverviewPanelClass *klass)
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, disk_row); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, disk_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, gnome_version_row); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, gnome_version_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, graphics_row); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, graphics_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hardware_box);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hardware_model_row); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hardware_model_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_editor); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_editor);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_entry); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_entry);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_row); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, hostname_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, memory_row); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, memory_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, os_box);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, os_logo); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, os_logo);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, os_name_row); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, os_name_row);
gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, os_type_row); gtk_widget_class_bind_template_child (widget_class, CcInfoOverviewPanel, os_type_row);

View file

@ -3,165 +3,142 @@
<!-- interface-requires gtk+ 3.0 --> <!-- interface-requires gtk+ 3.0 -->
<template class="CcInfoOverviewPanel" parent="CcPanel"> <template class="CcInfoOverviewPanel" parent="CcPanel">
<child> <child>
<object class="GtkScrolledWindow"> <object class="AdwPreferencesPage">
<property name="min-content-height">480</property>
<property name="hscrollbar-policy">never</property>
<child> <child>
<object class="AdwClamp"> <object class="AdwPreferencesGroup">
<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> <child>
<object class="GtkBox"> <object class="GtkPicture" id="os_logo">
<property name="valign">center</property> <property name="can-shrink">False</property>
<property name="spacing">30</property> <property name="alternative-text" translatable="yes">System Logo</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkPicture" id="os_logo">
<property name="can-shrink">False</property>
<property name="alternative-text" translatable="yes">System Logo</property>
</object>
</child>
<child>
<object class="GtkListBox">
<property name="selection-mode">none</property>
<signal name="row-activated" handler="cc_info_panel_row_activated_cb" swapped="yes"/>
<style>
<class name="boxed-list" />
</style>
<!-- Device name -->
<child>
<object class="CcListRow" id="hostname_row">
<property name="title" translatable="yes">Device Name</property>
<property name="secondary-label" bind-source="hostname_entry" bind-property="text" bind-flags="sync-create" />
<property name="show-arrow">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBox" id="hardware_box">
<property name="selection-mode">none</property>
<style>
<class name="boxed-list" />
</style>
<!-- Hardware Model -->
<child>
<object class="CcListRow" id="hardware_model_row">
<property name="visible">False</property>
<property name="activatable">False</property>
<property name="title" translatable="yes">Hardware Model</property>
</object>
</child>
<!-- Memory -->
<child>
<object class="CcListRow" id="memory_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Memory</property>
</object>
</child>
<!-- Processor -->
<child>
<object class="CcListRow" id="processor_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Processor</property>
</object>
</child>
<!-- Graphics -->
<child>
<object class="CcListRow" id="graphics_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Graphics</property>
</object>
</child>
<!-- Disk Capacity -->
<child>
<object class="CcListRow" id="disk_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Disk Capacity</property>
<property name="secondary-label" translatable="yes">Calculating…</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBox" id="os_box">
<property name="selection-mode">none</property>
<signal name="row-activated" handler="cc_info_panel_row_activated_cb" swapped="yes"/>
<style>
<class name="boxed-list" />
</style>
<!-- OS Name -->
<child>
<object class="CcListRow" id="os_name_row">
<property name="activatable">False</property>
<property name="title" translatable="yes"
comments="translators: this field contains the distro name and version">OS Name</property>
</object>
</child>
<!-- OS Type -->
<child>
<object class="CcListRow" id="os_type_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">OS Type</property>
</object>
</child>
<!-- GNOME Version -->
<child>
<object class="CcListRow" id="gnome_version_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">GNOME Version</property>
<property name="secondary-label">3.0</property>
</object>
</child>
<!-- Windowing System -->
<child>
<object class="CcListRow" id="windowing_system_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Windowing System</property>
</object>
</child>
<!-- Virtualization -->
<child>
<object class="CcListRow" id="virtualization_row">
<property name="visible">False</property>
<property name="title" translatable="yes">Virtualization</property>
<property name="activatable">False</property>
</object>
</child>
<!-- Software Updates -->
<child>
<object class="CcListRow" id="software_updates_row">
<property name="title" translatable="yes">Software Updates</property>
<property name="icon-name">go-next-symbolic</property>
</object>
</child>
</object>
</child>
</object> </object>
</child> </child>
</object> </object>
</child> </child>
<child>
<object class="AdwPreferencesGroup">
<!-- Device name -->
<child>
<object class="CcListRow" id="hostname_row">
<property name="title" translatable="yes">Device Name</property>
<property name="secondary-label" bind-source="hostname_entry" bind-property="text" bind-flags="sync-create" />
<property name="show-arrow">True</property>
<signal name="activated" handler="cc_info_panel_row_activated_cb" swapped="yes"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<!-- Hardware Model -->
<child>
<object class="CcListRow" id="hardware_model_row">
<property name="visible">False</property>
<property name="activatable">False</property>
<property name="title" translatable="yes">Hardware Model</property>
</object>
</child>
<!-- Memory -->
<child>
<object class="CcListRow" id="memory_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Memory</property>
</object>
</child>
<!-- Processor -->
<child>
<object class="CcListRow" id="processor_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Processor</property>
</object>
</child>
<!-- Graphics -->
<child>
<object class="CcListRow" id="graphics_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Graphics</property>
</object>
</child>
<!-- Disk Capacity -->
<child>
<object class="CcListRow" id="disk_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Disk Capacity</property>
<property name="secondary-label" translatable="yes">Calculating…</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<!-- OS Name -->
<child>
<object class="CcListRow" id="os_name_row">
<property name="activatable">False</property>
<property name="title" translatable="yes"
comments="translators: this field contains the distro name and version">OS Name</property>
</object>
</child>
<!-- OS Type -->
<child>
<object class="CcListRow" id="os_type_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">OS Type</property>
</object>
</child>
<!-- GNOME Version -->
<child>
<object class="CcListRow" id="gnome_version_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">GNOME Version</property>
<property name="secondary-label">3.0</property>
</object>
</child>
<!-- Windowing System -->
<child>
<object class="CcListRow" id="windowing_system_row">
<property name="activatable">False</property>
<property name="title" translatable="yes">Windowing System</property>
</object>
</child>
<!-- Virtualization -->
<child>
<object class="CcListRow" id="virtualization_row">
<property name="visible">False</property>
<property name="title" translatable="yes">Virtualization</property>
<property name="activatable">False</property>
</object>
</child>
<!-- Software Updates -->
<child>
<object class="CcListRow" id="software_updates_row">
<property name="title" translatable="yes">Software Updates</property>
<property name="icon-name">go-next-symbolic</property>
<signal name="activated" handler="cc_info_panel_row_activated_cb" swapped="yes"/>
</object>
</child>
</object>
</child>
</object> </object>
</child> </child>
</template> </template>