[geary/wip/721828-undo] Place Undo button into pill with Archive/Trash
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/721828-undo] Place Undo button into pill with Archive/Trash
- Date: Sat, 3 Jan 2015 00:48:57 +0000 (UTC)
commit 5cc78e1fa4e4bfcd1a7487e1a31114c5737bbd80
Author: Jim Nelson <jim yorba org>
Date: Fri Jan 2 16:48:43 2015 -0800
Place Undo button into pill with Archive/Trash
src/client/components/main-toolbar.vala | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index ecf7999..2a8da06 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -17,6 +17,7 @@ public class MainToolbar : PillHeaderbar {
private Gtk.Button archive_button;
private Gtk.Button trash_buttons[2];
+ private Gtk.Button undo_buttons[2];
private Gtk.SearchEntry search_entry = new Gtk.SearchEntry();
private Geary.ProgressMonitor? search_upgrade_progress_monitor = null;
private MonitoredProgressBar search_upgrade_progress_bar = new MonitoredProgressBar();
@@ -68,15 +69,13 @@ public class MainToolbar : PillHeaderbar {
insert.clear();
insert.add(archive_button = create_toolbar_button(null, GearyController.ACTION_ARCHIVE_MESSAGE,
true));
insert.add(trash_buttons[0] = create_toolbar_button(null, GearyController.ACTION_TRASH_MESSAGE,
true));
- Gtk.Box trash_archive = create_pill_buttons(insert);
+ insert.add(undo_buttons[0] = create_toolbar_button("edit-undo-symbolic",
GearyController.ACTION_UNDO));
+ Gtk.Box trash_archive = create_pill_buttons(insert, false, false);
insert.clear();
insert.add(trash_buttons[1] = create_toolbar_button(null, GearyController.ACTION_TRASH_MESSAGE,
true));
+ insert.add(undo_buttons[1] = create_toolbar_button("edit-undo-symbolic",
GearyController.ACTION_UNDO));
Gtk.Box trash = create_pill_buttons(insert, false, false);
- insert.clear();
- insert.add(create_toolbar_button("edit-undo-symbolic", GearyController.ACTION_UNDO));
- Gtk.Box undo = create_pill_buttons(insert, false, false);
-
// Search bar.
search_entry.width_chars = 28;
search_entry.tooltip_text = _("Search all mail in account for keywords (Ctrl+S)");
@@ -94,7 +93,6 @@ public class MainToolbar : PillHeaderbar {
#if !GTK_3_12
add_end(trash_archive);
add_end(trash);
- add_end(undo);
add_end(search_upgrade_progress_bar);
add_end(search_entry);
#endif
@@ -110,7 +108,6 @@ public class MainToolbar : PillHeaderbar {
#if GTK_3_12
add_end(search_entry);
add_end(search_upgrade_progress_bar);
- add_end(undo);
add_end(trash);
add_end(trash_archive);
#endif
@@ -121,12 +118,12 @@ public class MainToolbar : PillHeaderbar {
private void show_archive_button(bool show) {
if (show) {
archive_button.show();
- trash_buttons[0].show();
- trash_buttons[1].hide();
+ trash_buttons[0].visible = undo_buttons[0].visible = true;
+ trash_buttons[1].visible = undo_buttons[1].visible = false;
} else {
archive_button.hide();
- trash_buttons[0].hide();
- trash_buttons[1].show();
+ trash_buttons[0].visible = undo_buttons[0].visible = false;
+ trash_buttons[1].visible = undo_buttons[1].visible = true;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]