From d93d6009eefa7020c87fcf57ccc1b89734caf9a9 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Thu, 6 Dec 2007 04:37:52 +0000 Subject: [PATCH] speed up keyboard scale and rotation too --- src/select-context.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/select-context.cpp b/src/select-context.cpp index f0972acc8..2eff4297f 100644 --- a/src/select-context.cpp +++ b/src/select-context.cpp @@ -805,7 +805,9 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) break; case GDK_bracketleft: if (MOD__ALT) { - sp_selection_rotate_screen(selection, 1); + gint mul = 1 + gobble_key_events( + get_group0_keyval(&event->key), 0); // with any mask + sp_selection_rotate_screen(selection, mul*1); } else if (MOD__CTRL) { sp_selection_rotate(selection, 90); } else if (snaps) { @@ -815,7 +817,9 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) break; case GDK_bracketright: if (MOD__ALT) { - sp_selection_rotate_screen(selection, -1); + gint mul = 1 + gobble_key_events( + get_group0_keyval(&event->key), 0); // with any mask + sp_selection_rotate_screen(selection, -1*mul); } else if (MOD__CTRL) { sp_selection_rotate(selection, -90); } else if (snaps) { @@ -826,22 +830,30 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) case GDK_less: case GDK_comma: if (MOD__ALT) { - sp_selection_scale_screen(selection, -2); + gint mul = 1 + gobble_key_events( + get_group0_keyval(&event->key), 0); // with any mask + sp_selection_scale_screen(selection, -2*mul); } else if (MOD__CTRL) { sp_selection_scale_times(selection, 0.5); } else { - sp_selection_scale(selection, -offset); + gint mul = 1 + gobble_key_events( + get_group0_keyval(&event->key), 0); // with any mask + sp_selection_scale(selection, -offset*mul); } ret = TRUE; break; case GDK_greater: case GDK_period: if (MOD__ALT) { - sp_selection_scale_screen(selection, 2); + gint mul = 1 + gobble_key_events( + get_group0_keyval(&event->key), 0); // with any mask + sp_selection_scale_screen(selection, 2*mul); } else if (MOD__CTRL) { sp_selection_scale_times(selection, 2); } else { - sp_selection_scale(selection, offset); + gint mul = 1 + gobble_key_events( + get_group0_keyval(&event->key), 0); // with any mask + sp_selection_scale(selection, offset*mul); } ret = TRUE; break; -- 2.30.2