From 63a1f0eab3e15e0d64e24bd5a2659a61347cfe9c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 10 Jan 2014 17:18:49 +0100 Subject: Bug #333184 - Add Undo support to component editors --- calendar/gui/dialogs/comp-editor.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'calendar/gui/dialogs/comp-editor.c') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index bbf4662275..f635ab739a 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -158,6 +158,9 @@ static const gchar *ui = " " " " " " +" " +" " +" " " " " " " " @@ -179,6 +182,9 @@ static const gchar *ui = " \n" " \n" " " +" " +" " +" " " \n" " " ""; @@ -1288,6 +1294,21 @@ static GtkActionEntry core_entries[] = { N_("Select all text"), NULL }, /* Handled by EFocusTracker */ + { "undo", + GTK_STOCK_UNDO, + NULL, + "z", + N_("Undo"), + NULL }, /* Handled by EFocusTracker */ + + { "redo", + GTK_STOCK_REDO, + NULL, + "y", + N_("Redo"), + NULL }, /* Handled by EFocusTracker */ + + /* Menus */ { "classification-menu", @@ -2199,6 +2220,12 @@ comp_editor_init (CompEditor *editor) action = comp_editor_get_action (editor, "select-all"); e_focus_tracker_set_select_all_action (focus_tracker, action); + action = comp_editor_get_action (editor, "undo"); + e_focus_tracker_set_undo_action (focus_tracker, action); + + action = comp_editor_get_action (editor, "redo"); + e_focus_tracker_set_redo_action (focus_tracker, action); + priv->focus_tracker = focus_tracker; /* Fine Tuning */ -- cgit v1.2.3