Commit a739ebf3 authored by Felipe Borges's avatar Felipe Borges
Browse files

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
parent 658b5d50
......@@ -88,6 +88,7 @@ struct _CcRegionPanelPrivate {
GtkWidget *overlay;
GtkWidget *notification;
GtkWidget *restart_notification;
GtkWidget *language_section;
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->restart_notification), TRUE);
if (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_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");
gtk_list_box_set_selection_mode (GTK_LIST_BOX (widget),
GTK_SELECTION_NONE);
......
......@@ -75,40 +75,100 @@
<object class="GtkBox" id="language_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="language_heading">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</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="label" translatable="yes">_Language</property>
<property name="use_underline">True</property>
<child>
<object class="GtkLabel" id="language_heading">
<property name="visible">True</property>
<property name="can_focus">False</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="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>
<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">
<object class="GtkRevealer" id="restart-revealer">
<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>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<child>
<object class="GtkLabel">
<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="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>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment