region: Embed "Restart session" button below the Language entry
This change is based on the mockups available at https://wiki.gnome.org/Design/SystemSettings/RegionAndLanguage https://bugzilla.gnome.org/show_bug.cgi?id=702351
This commit is contained in:
parent
658b5d5033
commit
a739ebf377
2 changed files with 93 additions and 27 deletions
|
@ -88,6 +88,7 @@ struct _CcRegionPanelPrivate {
|
||||||
|
|
||||||
GtkWidget *overlay;
|
GtkWidget *overlay;
|
||||||
GtkWidget *notification;
|
GtkWidget *notification;
|
||||||
|
GtkWidget *restart_notification;
|
||||||
|
|
||||||
GtkWidget *language_section;
|
GtkWidget *language_section;
|
||||||
GtkListBoxRow *language_row;
|
GtkListBoxRow *language_row;
|
||||||
|
@ -229,6 +230,7 @@ show_restart_notification (CcRegionPanel *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_revealer_set_reveal_child (GTK_REVEALER (priv->notification), TRUE);
|
gtk_revealer_set_reveal_child (GTK_REVEALER (priv->notification), TRUE);
|
||||||
|
gtk_revealer_set_reveal_child (GTK_REVEALER (priv->restart_notification), TRUE);
|
||||||
|
|
||||||
if (locale) {
|
if (locale) {
|
||||||
setlocale (LC_MESSAGES, current_locale);
|
setlocale (LC_MESSAGES, current_locale);
|
||||||
|
@ -645,6 +647,10 @@ setup_language_section (CcRegionPanel *self)
|
||||||
priv->formats_row = GTK_LIST_BOX_ROW (WID ("formats_row"));
|
priv->formats_row = GTK_LIST_BOX_ROW (WID ("formats_row"));
|
||||||
priv->formats_label = WID ("formats_label");
|
priv->formats_label = WID ("formats_label");
|
||||||
|
|
||||||
|
priv->restart_notification = WID ("restart-revealer");
|
||||||
|
widget = WID ("restart-button1");
|
||||||
|
g_signal_connect_swapped (widget, "clicked", G_CALLBACK (restart_now), self);
|
||||||
|
|
||||||
widget = WID ("language_list");
|
widget = WID ("language_list");
|
||||||
gtk_list_box_set_selection_mode (GTK_LIST_BOX (widget),
|
gtk_list_box_set_selection_mode (GTK_LIST_BOX (widget),
|
||||||
GTK_SELECTION_NONE);
|
GTK_SELECTION_NONE);
|
||||||
|
|
|
@ -75,40 +75,100 @@
|
||||||
<object class="GtkBox" id="language_box">
|
<object class="GtkBox" id="language_box">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="language_heading">
|
<object class="GtkBox">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<child>
|
||||||
<property name="margin_start">20</property>
|
<object class="GtkLabel" id="language_heading">
|
||||||
<property name="margin_end">20</property>
|
<property name="visible">True</property>
|
||||||
<property name="margin_top">12</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="margin_bottom">12</property>
|
<property name="margin_start">20</property>
|
||||||
<property name="xalign">0</property>
|
<property name="margin_end">20</property>
|
||||||
<property name="label" translatable="yes">_Language</property>
|
<property name="margin_top">12</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="margin_bottom">12</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">_Language</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="language_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="xalign">1</property>
|
||||||
|
<property name="margin_start">20</property>
|
||||||
|
<property name="margin_end">20</property>
|
||||||
|
<property name="margin_top">12</property>
|
||||||
|
<property name="margin_bottom">12</property>
|
||||||
|
<property name="label" translatable="yes">English (United Kingdom)</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="language_label">
|
<object class="GtkRevealer" id="restart-revealer">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<child>
|
||||||
<property name="xalign">1</property>
|
<object class="GtkBox">
|
||||||
<property name="margin_start">20</property>
|
<property name="visible">True</property>
|
||||||
<property name="margin_end">20</property>
|
<child>
|
||||||
<property name="margin_top">12</property>
|
<object class="GtkLabel">
|
||||||
<property name="margin_bottom">12</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">English (United Kingdom)</property>
|
<property name="margin_start">20</property>
|
||||||
|
<property name="margin_end">20</property>
|
||||||
|
<property name="margin_top">12</property>
|
||||||
|
<property name="margin_bottom">12</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="wrap">True</property>
|
||||||
|
<property name="max-width-chars">35</property>
|
||||||
|
<property name="label" translatable="yes">Restart the session for changes to take effect</property>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label"/>
|
||||||
|
</style>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="scale" value="0.9"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="restart-button1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="margin_start">20</property>
|
||||||
|
<property name="margin_end">20</property>
|
||||||
|
<property name="margin_top">12</property>
|
||||||
|
<property name="margin_bottom">12</property>
|
||||||
|
<property name="valign">end</property>
|
||||||
|
<property name="label" translatable="yes">Restart…</property>
|
||||||
|
<style>
|
||||||
|
<class name="suggested-action"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue