[gnome-control-center/wip/feborges/new-users-panel: 54/55] 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/wip/feborges/new-users-panel: 54/55] user-accounts: move Add User dialog buttons to ui file
- Date: Fri, 10 Jun 2016 11:32:53 +0000 (UTC)
commit 51836dd6228494cdd692b2cd30b6e26943dc58c7
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 647040b..68e5d1f 100644
--- a/panels/user-accounts/data/account-dialog.ui
+++ b/panels/user-accounts/data/account-dialog.ui
@@ -10,6 +10,52 @@
</object>
<template class="UmAccountDialog" parent="GtkDialog">
<property name="can_focus">False</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>
@@ -710,6 +756,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>
@@ -742,4 +792,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 8053595..64772fb 100644
--- a/panels/user-accounts/um-account-dialog.c
+++ b/panels/user-accounts/um-account-dialog.c
@@ -1408,18 +1408,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]