[gnome-control-center] region: Use header bar in all the dialogs
- From: Yosef Or Boczko <yoseforb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] region: Use header bar in all the dialogs
- Date: Mon, 28 Apr 2014 14:37:41 +0000 (UTC)
commit 8913ad2f362bd73e7b7e6054a81b030b3633db0c
Author: Yosef Or Boczko <yoseforb src gnome org>
Date: Mon Mar 24 09:24:54 2014 +0200
region: Use header bar in all the dialogs
https://bugzilla.gnome.org/show_bug.cgi?id=724299
panels/region/cc-region-panel.c | 2 +-
panels/region/format-chooser.ui | 31 +-------------------
panels/region/input-chooser.ui | 62 ++++++++++++++++++++++++--------------
3 files changed, 41 insertions(+), 54 deletions(-)
---
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index 564470c..16935df 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -1128,7 +1128,7 @@ apologize_for_no_ibus_login (CcRegionPanel *self)
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (self));
dialog = gtk_message_dialog_new (GTK_WINDOW (toplevel),
- GTK_DIALOG_MODAL,
+ GTK_DIALOG_MODAL | GTK_DIALOG_USE_HEADER_BAR,
GTK_MESSAGE_OTHER,
GTK_BUTTONS_OK,
_("Sorry"));
diff --git a/panels/region/format-chooser.ui b/panels/region/format-chooser.ui
index 4d2594f..742b140 100644
--- a/panels/region/format-chooser.ui
+++ b/panels/region/format-chooser.ui
@@ -8,38 +8,12 @@
<property name="type_hint">dialog</property>
<property name="resizable">False</property>
<property name="modal">True</property>
+ <property name="use_header_bar">1</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="homogeneous">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="ok-button">
- <property name="label" translatable="yes">_Done</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_underline">True</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">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
@@ -340,8 +314,5 @@
</child>
</object>
</child>
- <action-widgets>
- <action-widget response="-5">ok-button</action-widget>
- </action-widgets>
</object>
</interface>
diff --git a/panels/region/input-chooser.ui b/panels/region/input-chooser.ui
index 13be9ec..747d7ae 100644
--- a/panels/region/input-chooser.ui
+++ b/panels/region/input-chooser.ui
@@ -7,6 +7,45 @@
<property name="modal">True</property>
<property name="destroy_with_parent">True</property>
<property name="resizable">True</property>
+ <property name="use_header_bar">1</property>
+ <child internal-child="headerbar">
+ <object class="GtkHeaderBar" id="input-dialog-header-bar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_close_button">False</property>
+ <child>
+ <object class="GtkButton" id="cancel-button">
+ <property name="label" translatable="yes">_Cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="use_underline">True</property>
+ <property name="valign">center</property>
+ <style>
+ <class name="text-button"/>
+ </style>
+ </object>
+ <packing>
+ <property name="pack_type">start</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="add-button">
+ <property name="label" translatable="yes">_Add</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="use_underline">True</property>
+ <property name="valign">center</property>
+ <style>
+ <class name="text-button"/>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ <packing>
+ <property name="pack_type">end</property>
+ </packing>
+ </child>
+ </object>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="vbox">
<property name="visible">True</property>
@@ -48,29 +87,6 @@
<property name="margin-bottom">6</property>
</object>
</child>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="action-area">
- <property name="visible">True</property>
- <property name="orientation">horizontal</property>
- <child>
- <object class="GtkButton" id="cancel-button">
- <property name="visible">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="use_underline" >True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="add-button">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="use_underline" >True</property>
- </object>
- </child>
- </object>
- </child>
</object>
</child>
<action-widgets>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]