summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f5563be)
raw | patch | inline | side by side (parent: f5563be)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 21 Nov 2007 03:45:10 +0000 (03:45 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 21 Nov 2007 03:45:10 +0000 (03:45 +0000) |
src/gradient-context.cpp | patch | blob | history | |
src/node-context.cpp | patch | blob | history | |
src/select-context.cpp | patch | blob | history | |
src/text-context.cpp | patch | blob | history |
index df4726967404fd4fa375a1f274d3c27cfd0093fe..24742885db2565c5c7dd8c2af9ebd0450ded71a6 100644 (file)
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -703,13 +703,15 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_KP_Left:
case GDK_KP_4:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) drag->selected_move_screen(-10, 0); // shift
- else drag->selected_move_screen(-1, 0); // no shift
+ if (MOD__SHIFT) drag->selected_move_screen(mul*-10, 0); // shift
+ else drag->selected_move_screen(mul*-1, 0); // no shift
}
else { // no alt
- if (MOD__SHIFT) drag->selected_move(-10*nudge, 0); // shift
- else drag->selected_move(-nudge, 0); // no shift
+ if (MOD__SHIFT) drag->selected_move(mul*-10*nudge, 0); // shift
+ else drag->selected_move(mul*-nudge, 0); // no shift
}
ret = TRUE;
}
@@ -718,13 +720,15 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_KP_Up:
case GDK_KP_8:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) drag->selected_move_screen(0, 10); // shift
- else drag->selected_move_screen(0, 1); // no shift
+ if (MOD__SHIFT) drag->selected_move_screen(0, mul*10); // shift
+ else drag->selected_move_screen(0, mul*1); // no shift
}
else { // no alt
- if (MOD__SHIFT) drag->selected_move(0, 10*nudge); // shift
- else drag->selected_move(0, nudge); // no shift
+ if (MOD__SHIFT) drag->selected_move(0, mul*10*nudge); // shift
+ else drag->selected_move(0, mul*nudge); // no shift
}
ret = TRUE;
}
@@ -733,13 +737,15 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_KP_Right:
case GDK_KP_6:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) drag->selected_move_screen(10, 0); // shift
- else drag->selected_move_screen(1, 0); // no shift
+ if (MOD__SHIFT) drag->selected_move_screen(mul*10, 0); // shift
+ else drag->selected_move_screen(mul*1, 0); // no shift
}
else { // no alt
- if (MOD__SHIFT) drag->selected_move(10*nudge, 0); // shift
- else drag->selected_move(nudge, 0); // no shift
+ if (MOD__SHIFT) drag->selected_move(mul*10*nudge, 0); // shift
+ else drag->selected_move(mul*nudge, 0); // no shift
}
ret = TRUE;
}
@@ -748,13 +754,15 @@ sp_gradient_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_KP_Down:
case GDK_KP_2:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) drag->selected_move_screen(0, -10); // shift
- else drag->selected_move_screen(0, -1); // no shift
+ if (MOD__SHIFT) drag->selected_move_screen(0, mul*-10); // shift
+ else drag->selected_move_screen(0, mul*-1); // no shift
}
else { // no alt
- if (MOD__SHIFT) drag->selected_move(0, -10*nudge); // shift
- else drag->selected_move(0, -nudge); // no shift
+ if (MOD__SHIFT) drag->selected_move(0, mul*-10*nudge); // shift
+ else drag->selected_move(0, mul*-nudge); // no shift
}
ret = TRUE;
}
diff --git a/src/node-context.cpp b/src/node-context.cpp
index 56b6dd760ff13ff44159feb5af7b115bca8dc3a0..3e7903227c3c11d01bb8de5f483b15551fd013f1 100644 (file)
--- a/src/node-context.cpp
+++ b/src/node-context.cpp
case GDK_KP_Left:
case GDK_KP_4:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) nc->shape_editor->move_nodes_screen(-10, 0); // shift
- else nc->shape_editor->move_nodes_screen(-1, 0); // no shift
+ if (MOD__SHIFT) nc->shape_editor->move_nodes_screen(mul*-10, 0); // shift
+ else nc->shape_editor->move_nodes_screen(mul*-1, 0); // no shift
}
else { // no alt
- if (MOD__SHIFT) nc->shape_editor->move_nodes(-10*nudge, 0); // shift
- else nc->shape_editor->move_nodes(-nudge, 0); // no shift
+ if (MOD__SHIFT) nc->shape_editor->move_nodes(mul*-10*nudge, 0); // shift
+ else nc->shape_editor->move_nodes(mul*-nudge, 0); // no shift
}
ret = TRUE;
}
case GDK_KP_Up:
case GDK_KP_8:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) nc->shape_editor->move_nodes_screen(0, 10); // shift
- else nc->shape_editor->move_nodes_screen(0, 1); // no shift
+ if (MOD__SHIFT) nc->shape_editor->move_nodes_screen(0, mul*10); // shift
+ else nc->shape_editor->move_nodes_screen(0, mul*1); // no shift
}
else { // no alt
- if (MOD__SHIFT) nc->shape_editor->move_nodes(0, 10*nudge); // shift
- else nc->shape_editor->move_nodes(0, nudge); // no shift
+ if (MOD__SHIFT) nc->shape_editor->move_nodes(0, mul*10*nudge); // shift
+ else nc->shape_editor->move_nodes(0, mul*nudge); // no shift
}
ret = TRUE;
}
case GDK_KP_Right:
case GDK_KP_6:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) nc->shape_editor->move_nodes_screen(10, 0); // shift
- else nc->shape_editor->move_nodes_screen(1, 0); // no shift
+ if (MOD__SHIFT) nc->shape_editor->move_nodes_screen(mul*10, 0); // shift
+ else nc->shape_editor->move_nodes_screen(mul*1, 0); // no shift
}
else { // no alt
- if (MOD__SHIFT) nc->shape_editor->move_nodes(10*nudge, 0); // shift
- else nc->shape_editor->move_nodes(nudge, 0); // no shift
+ if (MOD__SHIFT) nc->shape_editor->move_nodes(mul*10*nudge, 0); // shift
+ else nc->shape_editor->move_nodes(mul*nudge, 0); // no shift
}
ret = TRUE;
}
case GDK_KP_Down:
case GDK_KP_2:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) nc->shape_editor->move_nodes_screen(0, -10); // shift
- else nc->shape_editor->move_nodes_screen(0, -1); // no shift
+ if (MOD__SHIFT) nc->shape_editor->move_nodes_screen(0, mul*-10); // shift
+ else nc->shape_editor->move_nodes_screen(0, mul*-1); // no shift
}
else { // no alt
- if (MOD__SHIFT) nc->shape_editor->move_nodes(0, -10*nudge); // shift
- else nc->shape_editor->move_nodes(0, -nudge); // no shift
+ if (MOD__SHIFT) nc->shape_editor->move_nodes(0, mul*-10*nudge); // shift
+ else nc->shape_editor->move_nodes(0, mul*-nudge); // no shift
}
ret = TRUE;
}
diff --git a/src/select-context.cpp b/src/select-context.cpp
index c8186b1fd1ef4b86c15ea6ceb1390c6ba91738c1..f0972acc8fb4a3edc31bcc399efed5726c1190ab 100644 (file)
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
@@ -712,13 +712,15 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_KP_Left:
case GDK_KP_4:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) sp_selection_move_screen(-10, 0); // shift
- else sp_selection_move_screen(-1, 0); // no shift
+ if (MOD__SHIFT) sp_selection_move_screen(mul*-10, 0); // shift
+ else sp_selection_move_screen(mul*-1, 0); // no shift
}
else { // no alt
- if (MOD__SHIFT) sp_selection_move(-10*nudge, 0); // shift
- else sp_selection_move(-nudge, 0); // no shift
+ if (MOD__SHIFT) sp_selection_move(mul*-10*nudge, 0); // shift
+ else sp_selection_move(mul*-nudge, 0); // no shift
}
ret = TRUE;
}
@@ -727,13 +729,15 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_KP_Up:
case GDK_KP_8:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) sp_selection_move_screen(0, 10); // shift
- else sp_selection_move_screen(0, 1); // no shift
+ if (MOD__SHIFT) sp_selection_move_screen(0, mul*10); // shift
+ else sp_selection_move_screen(0, mul*1); // no shift
}
else { // no alt
- if (MOD__SHIFT) sp_selection_move(0, 10*nudge); // shift
- else sp_selection_move(0, nudge); // no shift
+ if (MOD__SHIFT) sp_selection_move(0, mul*10*nudge); // shift
+ else sp_selection_move(0, mul*nudge); // no shift
}
ret = TRUE;
}
@@ -742,13 +746,15 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_KP_Right:
case GDK_KP_6:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) sp_selection_move_screen(10, 0); // shift
- else sp_selection_move_screen(1, 0); // no shift
+ if (MOD__SHIFT) sp_selection_move_screen(mul*10, 0); // shift
+ else sp_selection_move_screen(mul*1, 0); // no shift
}
else { // no alt
- if (MOD__SHIFT) sp_selection_move(10*nudge, 0); // shift
- else sp_selection_move(nudge, 0); // no shift
+ if (MOD__SHIFT) sp_selection_move(mul*10*nudge, 0); // shift
+ else sp_selection_move(mul*nudge, 0); // no shift
}
ret = TRUE;
}
@@ -757,13 +763,15 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
case GDK_KP_Down:
case GDK_KP_2:
if (!MOD__CTRL) { // not ctrl
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) sp_selection_move_screen(0, -10); // shift
- else sp_selection_move_screen(0, -1); // no shift
+ if (MOD__SHIFT) sp_selection_move_screen(0, mul*-10); // shift
+ else sp_selection_move_screen(0, mul*-1); // no shift
}
else { // no alt
- if (MOD__SHIFT) sp_selection_move(0, -10*nudge); // shift
- else sp_selection_move(0, -nudge); // no shift
+ if (MOD__SHIFT) sp_selection_move(0, mul*-10*nudge); // shift
+ else sp_selection_move(0, mul*-nudge); // no shift
}
ret = TRUE;
}
diff --git a/src/text-context.cpp b/src/text-context.cpp
index 579309c1e5ca2414a5555f9a3bc12e38a397a27f..6ebd6c9598e7e2698332810eb44b7284efb2dc11 100644 (file)
--- a/src/text-context.cpp
+++ b/src/text-context.cpp
@@ -999,10 +999,12 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
case GDK_KP_4:
if (tc->text) {
if (MOD__ALT) {
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__SHIFT)
- sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(-10, 0));
+ sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(mul*-10, 0));
else
- sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(-1, 0));
+ sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(mul*-1, 0));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
sp_document_maybe_done(sp_desktop_document(desktop), "kern:left", SP_VERB_CONTEXT_TEXT,
@@ -1019,10 +1021,12 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
case GDK_KP_6:
if (tc->text) {
if (MOD__ALT) {
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__SHIFT)
- sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(10, 0));
+ sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(mul*10, 0));
else
- sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(1, 0));
+ sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(mul*1, 0));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
sp_document_maybe_done(sp_desktop_document(desktop), "kern:right", SP_VERB_CONTEXT_TEXT,
@@ -1039,10 +1043,12 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
case GDK_KP_8:
if (tc->text) {
if (MOD__ALT) {
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__SHIFT)
- sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, -10));
+ sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, mul*-10));
else
- sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, -1));
+ sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, mul*-1));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
sp_document_maybe_done(sp_desktop_document(desktop), "kern:up", SP_VERB_CONTEXT_TEXT,
@@ -1060,10 +1066,12 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
case GDK_KP_2:
if (tc->text) {
if (MOD__ALT) {
+ gint mul = 1 + gobble_key_events(
+ get_group0_keyval(&event->key), 0); // with any mask
if (MOD__SHIFT)
- sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, 10));
+ sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, mul*10));
else
- sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, 1));
+ sp_te_adjust_kerning_screen(tc->text, tc->text_sel_start, tc->text_sel_end, desktop, NR::Point(0, mul*1));
sp_text_context_update_cursor(tc);
sp_text_context_update_text_selection(tc);
sp_document_maybe_done(sp_desktop_document(desktop), "kern:down", SP_VERB_CONTEXT_TEXT,