[geary/pantheon_mail: 30/32] update trash properly, don't sublass PillHeaderbar
- From: Javier Jardón Cabezas <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/pantheon_mail: 30/32] update trash properly, don't sublass PillHeaderbar
- Date: Wed, 25 Nov 2015 19:53:16 +0000 (UTC)
commit 743adc2dde2f8da0218fc6b2c8a55d4435ba671d
Author: Daniel Foré <daniel elementary io>
Date: Tue Nov 24 19:13:52 2015 -0800
update trash properly, don't sublass PillHeaderbar
src/client/components/main-toolbar.vala | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index 3719600..bf3e293 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -17,20 +17,19 @@ public class MainToolbar : Gtk.Box {
public int left_pane_width { get; set; }
private PillHeaderbar folder_header;
- private PillHeaderbar conversation_header;
+ private Gtk.HeaderBar conversation_header;
private Gtk.Button archive_button;
- private Gtk.Button trash_delete_button;
+ private Gtk.Button trash_delete;
private Binding guest_header_binding;
public MainToolbar() {
Object(orientation: Gtk.Orientation.HORIZONTAL, spacing: 0);
folder_header = new PillHeaderbar(GearyApplication.instance.actions);
- conversation_header = new PillHeaderbar(GearyApplication.instance.actions);
+ conversation_header = new Gtk.HeaderBar ();
folder_header.get_style_context().add_class("titlebar");
folder_header.get_style_context().add_class("geary-titlebar-left");
conversation_header.get_style_context().add_class("titlebar");
- conversation_header.get_style_context().add_class("geary-titlebar-right");
// Instead of putting a separator between the two headerbars, as other applications do,
// we put a separator at the right end of the left headerbar. This greatly improves
@@ -165,10 +164,10 @@ public class MainToolbar : Gtk.Box {
/// Updates the trash button as trash or delete, and shows or hides the archive button.
public void update_trash_archive_buttons(bool trash, bool archive) {
- string action_name = (trash ? GearyController.ACTION_TRASH_MESSAGE
- : GearyController.ACTION_DELETE_MESSAGE);
- conversation_header.setup_button(trash_delete_button, null, action_name, false);
+ string action_name = (trash ? GearyController.ACTION_TRASH_MESSAGE :
GearyController.ACTION_DELETE_MESSAGE);
+ trash_delete.related_action = GearyApplication.instance.actions.get_action(action_name);
+ trash_delete.tooltip_text = trash_delete.related_action.tooltip;
archive_button.visible = archive;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]