region: "Language" and "Format" headers and descriptions

This commit is contained in:
Ian Douglas Scott 2020-07-31 13:32:04 -07:00
parent e39a2916f3
commit 9366de52cd
2 changed files with 68 additions and 6 deletions

View file

@ -50,6 +50,7 @@ struct _CcRegionPanel {
CcPanel parent_instance;
GtkLabel *formats_label;
GtkListBox *formats_list;
GtkListBoxRow *formats_row;
GtkSizeGroup *input_size_group;
GtkToggleButton *login_button;
@ -551,14 +552,18 @@ setup_language_section (CcRegionPanel *self)
g_signal_connect_object (self->locale_settings, "changed::" KEY_REGION,
G_CALLBACK (update_region_from_setting), self, G_CONNECT_SWAPPED);
gtk_list_box_set_selection_mode (self->language_list,
GTK_SELECTION_NONE);
gtk_list_box_set_header_func (self->language_list,
cc_list_box_update_header_func,
NULL, NULL);
g_signal_connect_object (self->language_list, "row-activated",
G_CALLBACK (activate_language_row), self, G_CONNECT_SWAPPED);
gtk_list_box_set_header_func (self->formats_list,
cc_list_box_update_header_func,
NULL, NULL);
g_signal_connect_object (self->formats_list, "row-activated",
G_CALLBACK (activate_language_row), self, G_CONNECT_SWAPPED);
update_language_from_user (self);
update_region_from_setting (self);
}
@ -776,6 +781,7 @@ cc_region_panel_class_init (CcRegionPanelClass * klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/control-center/region/cc-region-panel.ui");
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, formats_label);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, formats_list);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, formats_row);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, login_label);
gtk_widget_class_bind_template_child (widget_class, CcRegionPanel, language_label);

View file

@ -26,6 +26,28 @@
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<property name="hexpand">True</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Language</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">The language used for text in windows and web pages.</property>
<style>
<class name="dim-label"/>
</style>
</object>
</child>
<child>
<object class="GtkFrame" id="language_section_frame">
<property name="visible">True</property>
@ -36,6 +58,7 @@
<object class="GtkListBox" id="language_list">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selection-mode">none</property>
<child>
<object class="GtkListBoxRow" id="language_row">
<property name="visible">True</property>
@ -124,6 +147,42 @@
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Formats</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">The format used for numbers, dates, and currencies.</property>
<style>
<class name="dim-label"/>
</style>
</object>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkListBox" id="formats_list">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="selection-mode">none</property>
<child>
<object class="GtkListBoxRow" id="formats_row">
<property name="visible">True</property>
@ -162,9 +221,6 @@
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
</child>
<child>
@ -186,4 +242,4 @@
</object>
</child>
</template>
</interface>
</interface>