[geary/mjog/233-entry-undo: 3/4] Update MainWindow undo/redo actions before in-app notifications
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/233-entry-undo: 3/4] Update MainWindow undo/redo actions before in-app notifications
- Date: Thu, 7 Nov 2019 23:07:16 +0000 (UTC)
commit 8833b6d2424e2854991d814fa6f80d277713a65b
Author: Michael Gratton <mike vee net>
Date: Fri Nov 8 10:04:25 2019 +1100
Update MainWindow undo/redo actions before in-app notifications
This prevents the in-app notifications button needing to have it state
updated after the actions are updated.
src/client/components/main-window.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index bc000bbb..3779edee 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -1612,6 +1612,7 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
}
private void on_command_undo(Application.Command command) {
+ update_command_actions();
Application.EmailCommand? email = command as Application.EmailCommand;
if (email != null) {
if (email.conversations.size > 1) {
@@ -1630,17 +1631,16 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
ian.set_button(_("Redo"), Action.Edit.prefix(Action.Edit.REDO));
add_notification(ian);
}
- update_command_actions();
}
private void on_command_redo(Application.Command command) {
+ update_command_actions();
if (command.executed_label != null) {
Components.InAppNotification ian =
new Components.InAppNotification(command.executed_label);
ian.set_button(_("Undo"), Action.Edit.prefix(Action.Edit.UNDO));
add_notification(ian);
}
- update_command_actions();
}
private void on_conversation_view_added(ConversationListBox list) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]