[gnumeric] GUI: Add ctrl-shift-z as alternate accelerator for redo.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: Add ctrl-shift-z as alternate accelerator for redo.
- Date: Fri, 3 May 2013 18:44:17 +0000 (UTC)
commit 3dba4ead14718ce24b56ab3810c5079a55b9e030
Author: Morten Welinder <terra gnome org>
Date: Fri May 3 14:43:49 2013 -0400
GUI: Add ctrl-shift-z as alternate accelerator for redo.
ChangeLog | 3 +++
NEWS | 1 +
src/wbc-gtk.c | 18 ++++++++++++------
3 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index af6fd13..6c7c4aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2013-05-03 Morten Welinder <terra gnome org>
+ * src/wbc-gtk.c (create_undo_redo): Add Ctrl-Shift-z as alternate
+ accelerator for redo. Fixes #699579.
+
* src/sheet.c (sheet_range_set_text_cb): Add redraw.
2013-05-01 Morten Welinder <terra gnome org>
diff --git a/NEWS b/NEWS
index 735f8b8..e56df01 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Morten:
* Improve xlsx import of style-only cells.
* Don't write empty cells to .gnumeric.
* Add MPSEUDOINVERSE function.
+ * Add ctrl-shift-z as extra accelerator for redo. [#699579]
--------------------------------------------------------------------------
Gnumeric 1.12.2
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index f6f5246..35237ee 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -3212,7 +3212,8 @@ create_undo_redo (GOActionComboStack **haction, char const *hname,
GCallback vcb,
WBCGtk *gtk,
char const *tooltip,
- char const *stock_id, char const *accel)
+ char const *stock_id,
+ char const *accel, const char *alt_accel)
{
*haction = g_object_new
(go_action_combo_stack_get_type (),
@@ -3222,8 +3223,10 @@ create_undo_redo (GOActionComboStack **haction, char const *hname,
"sensitive", FALSE,
"visible-vertical", FALSE,
NULL);
- gtk_action_group_add_action_with_accel (gtk->semi_permanent_actions,
- GTK_ACTION (*haction), accel);
+ gtk_action_group_add_action_with_accel
+ (gtk->semi_permanent_actions,
+ GTK_ACTION (*haction),
+ accel);
g_signal_connect (G_OBJECT (*haction), "activate", hcb, gtk);
*vaction = gtk_action_new (vname, NULL, tooltip, stock_id);
@@ -3231,7 +3234,10 @@ create_undo_redo (GOActionComboStack **haction, char const *hname,
"sensitive", FALSE,
"visible-horizontal", FALSE,
NULL);
- gtk_action_group_add_action (gtk->semi_permanent_actions, GTK_ACTION (*vaction));
+ gtk_action_group_add_action_with_accel
+ (gtk->semi_permanent_actions,
+ GTK_ACTION (*vaction),
+ alt_accel);
g_signal_connect_swapped (G_OBJECT (*vaction), "activate", vcb, gtk);
g_signal_connect (G_OBJECT (*haction), "notify::sensitive",
@@ -3264,12 +3270,12 @@ wbc_gtk_init_undo_redo (WBCGtk *gtk)
>k->redo_haction, "Redo", G_CALLBACK (cb_redo_activated),
>k->redo_vaction, "VRedo", G_CALLBACK (command_redo),
gtk, _("Redo the undone action"),
- GTK_STOCK_REDO, "<control>y");
+ GTK_STOCK_REDO, "<control>y", "<control><shift>z");
create_undo_redo (
>k->undo_haction, "Undo", G_CALLBACK (cb_undo_activated),
>k->undo_vaction, "VUndo", G_CALLBACK (command_undo),
gtk, _("Undo the last action"),
- GTK_STOCK_UNDO, "<control>z");
+ GTK_STOCK_UNDO, "<control>z", NULL);
}
/****************************************************************************/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]