[geary/wip/741240-headerbar] Patch from Georges Basile Stavracas Neto
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/741240-headerbar] Patch from Georges Basile Stavracas Neto
- Date: Mon, 8 Dec 2014 18:37:42 +0000 (UTC)
commit f78e37669dd5b8938c7773f26911b3880d495ccd
Author: Jim Nelson <jim yorba org>
Date: Mon Dec 8 10:37:22 2014 -0800
Patch from Georges Basile Stavracas Neto
.../accounts/account-dialog-account-list-pane.vala | 3 -
src/client/accounts/account-dialog.vala | 11 ++---
ui/account_list.glade | 40 ++-----------------
3 files changed, 10 insertions(+), 44 deletions(-)
---
diff --git a/src/client/accounts/account-dialog-account-list-pane.vala
b/src/client/accounts/account-dialog-account-list-pane.vala
index 79a4eeb..0e11c06 100644
--- a/src/client/accounts/account-dialog-account-list-pane.vala
+++ b/src/client/accounts/account-dialog-account-list-pane.vala
@@ -22,8 +22,6 @@ public class AccountDialogAccountListPane : AccountDialogPane {
public signal void delete_account(string email_address);
- public signal void close();
-
public AccountDialogAccountListPane(Gtk.Stack stack) {
base(stack);
Gtk.Builder builder = GearyApplication.instance.create_builder("account_list.glade");
@@ -58,7 +56,6 @@ public class AccountDialogAccountListPane : AccountDialogPane {
on_account_added(account);
// Hook up signals.
- actions.get_action("close").activate.connect(() => { close(); });
actions.get_action("add_account").activate.connect(() => { add_account(); });
edit_action.activate.connect(notify_edit_account);
delete_action.activate.connect(notify_delete_account);
diff --git a/src/client/accounts/account-dialog.vala b/src/client/accounts/account-dialog.vala
index 192be9d..09b7a49 100644
--- a/src/client/accounts/account-dialog.vala
+++ b/src/client/accounts/account-dialog.vala
@@ -13,15 +13,19 @@ public class AccountDialog : Gtk.Dialog {
private AccountDialogSpinnerPane spinner_pane;
private AccountDialogRemoveConfirmPane remove_confirm_pane;
private AccountDialogRemoveFailPane remove_fail_pane;
+ private Gtk.HeaderBar headerbar = new Gtk.HeaderBar();
public AccountDialog(Gtk.Window parent) {
set_size_request(450, -1); // Sets min size.
- title = _("Accounts");
+ headerbar.title = _("Accounts");
+ headerbar.show_close_button = true;
set_transient_for(parent);
set_modal(true);
+ set_titlebar (headerbar);
get_content_area().margin_top = MARGIN;
get_content_area().margin_left = MARGIN;
get_content_area().margin_right = MARGIN;
+ get_content_area().margin_bottom = MARGIN;
// Add pages to stack.
account_list_pane = new AccountDialogAccountListPane(stack);
@@ -31,7 +35,6 @@ public class AccountDialog : Gtk.Dialog {
remove_fail_pane = new AccountDialogRemoveFailPane(stack);
// Connect signals from pages.
- account_list_pane.close.connect(on_close);
account_list_pane.add_account.connect(on_add_account);
account_list_pane.edit_account.connect(on_edit_account);
account_list_pane.delete_account.connect(on_delete_account);
@@ -51,10 +54,6 @@ public class AccountDialog : Gtk.Dialog {
}
- private void on_close() {
- response(Gtk.ResponseType.CLOSE);
- }
-
private void on_add_account() {
add_edit_pane.reset_all();
add_edit_pane.set_mode(AddEditPage.PageMode.ADD);
diff --git a/ui/account_list.glade b/ui/account_list.glade
index 2265a77..0cc9782 100644
--- a/ui/account_list.glade
+++ b/ui/account_list.glade
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkActionGroup" id="account list actions">
<child>
<object class="GtkAction" id="add_account">
@@ -60,9 +61,6 @@
<property name="toolbar_style">icons</property>
<property name="show_arrow">False</property>
<property name="icon_size">2</property>
- <style>
- <class name="inline-toolbar"/>
- </style>
<child>
<object class="GtkToolButton" id="add_button">
<property name="related_action">add_account</property>
@@ -102,6 +100,9 @@
<property name="homogeneous">True</property>
</packing>
</child>
+ <style>
+ <class name="inline-toolbar"/>
+ </style>
</object>
<packing>
<property name="expand">False</property>
@@ -109,36 +110,5 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkButtonBox" id="buttonbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">5</property>
- <property name="spacing">5</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="close_button">
- <property name="label" translatable="yes">_Close</property>
- <property name="use_action_appearance">False</property>
- <property name="related_action">close</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="yalign">0.54000002145767212</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]