[gnome-control-center] user-accounts: move Add User dialog buttons to ui file
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: move Add User dialog buttons to ui file
- Date: Tue, 14 Jun 2016 11:14:10 +0000 (UTC)
commit 09cbc05608b16fadad3c5d11a38282c6515fabe7
Author: Felipe Borges <felipeborges gnome org>
Date: Fri Jun 10 13:12:12 2016 +0200
user-accounts: move Add User dialog buttons to ui file
https://bugzilla.gnome.org/show_bug.cgi?id=767065
panels/user-accounts/data/account-dialog.ui | 57 +++++++++++++++++++++++++++
panels/user-accounts/um-account-dialog.c | 10 -----
2 files changed, 57 insertions(+), 10 deletions(-)
---
diff --git a/panels/user-accounts/data/account-dialog.ui b/panels/user-accounts/data/account-dialog.ui
index ce976ea..ee511ee 100644
--- a/panels/user-accounts/data/account-dialog.ui
+++ b/panels/user-accounts/data/account-dialog.ui
@@ -18,6 +18,52 @@
<property name="title" translatable="yes">Add User</property>
<property name="icon_name">system-users</property>
<property name="use_header_bar">1</property>
+ <child internal-child="headerbar">
+ <object class="GtkHeaderBar" id="headerbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_close_button">False</property>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="label" translatable="yes">_Cancel</property>
+ <property name="visible">True</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</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="button2">
+ <property name="label" translatable="yes">_Add</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">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="account-dialog">
<property name="visible">True</property>
@@ -718,6 +764,10 @@
</child>
</object>
</child>
+ <action-widgets>
+ <action-widget response="-6">button1</action-widget>
+ <action-widget response="-5">button2</action-widget>
+ </action-widgets>
</template>
<object class="GtkSizeGroup" id="labels_sizegroup">
<widgets>
@@ -750,4 +800,11 @@
<widget name="account-type-admin"/>
</widgets>
</object>
+ <object class="GtkSizeGroup">
+ <property name="mode">horizontal</property>
+ <widgets>
+ <widget name="button1"/>
+ <widget name="button2"/>
+ </widgets>
+ </object>
</interface>
diff --git a/panels/user-accounts/um-account-dialog.c b/panels/user-accounts/um-account-dialog.c
index f7a476c..c0dcf1b 100644
--- a/panels/user-accounts/um-account-dialog.c
+++ b/panels/user-accounts/um-account-dialog.c
@@ -1410,18 +1410,8 @@ mode_init (UmAccountDialog *self)
static void
um_account_dialog_init (UmAccountDialog *self)
{
- GtkWidget *widget;
- GtkDialog *dialog;
-
gtk_widget_init_template (GTK_WIDGET (self));
- dialog = GTK_DIALOG (self);
-
- gtk_dialog_add_button (dialog, _("_Cancel"), GTK_RESPONSE_CANCEL);
- widget = gtk_dialog_add_button (dialog, _("_Add"), GTK_RESPONSE_OK);
- gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
- gtk_widget_grab_default (widget);
-
local_init (self);
enterprise_init (self);
join_init (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]