From 3db9d97dfa15339c967c85f8d0f504e6c76a2abc Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Mon, 16 Jun 2008 16:17:12 +0000 Subject: Temporarily add shortcuts in pen context to activate some LPEs which need path input. Will be removed soon when we have a UI for this. (bzr r5962) --- src/pen-context.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'src/pen-context.cpp') diff --git a/src/pen-context.cpp b/src/pen-context.cpp index 1a9f3e39f..6074eaa4b 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -991,6 +991,39 @@ pen_handle_key_press(SPPenContext *const pc, GdkEvent *event) } break; + case GDK_P: + case GDK_p: + if (MOD__SHIFT_ONLY) { + pc->polylines_only = !pc->polylines_only; + g_print ("polylines_only mode is now %s\n", pc->polylines_only ? "true" : "false"); + ret = TRUE; + } + break; + + case GDK_C: + case GDK_c: + if (MOD__SHIFT_ONLY) { + sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::CIRCLE_3PTS, 3); + ret = TRUE; + } + break; + + case GDK_B: + case GDK_b: + if (MOD__SHIFT_ONLY) { + sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::PERP_BISECTOR, 2); + ret = TRUE; + } + break; + + case GDK_A: + case GDK_a: + if (MOD__SHIFT_ONLY) { + sp_pen_context_wait_for_LPE_mouse_clicks(pc, Inkscape::LivePathEffect::ANGLE_BISECTOR, 3); + ret = TRUE; + } + break; + case GDK_U: case GDK_u: if (MOD__SHIFT_ONLY) { @@ -1297,6 +1330,8 @@ void sp_pen_context_wait_for_LPE_mouse_clicks(SPPenContext *pc, Inkscape::LivePathEffect::EffectType effect_type, unsigned int num_clicks, bool use_polylines) { + g_print ("Now waiting for %s to be applied\n", + Inkscape::LivePathEffect::LPETypeConverter.get_label(effect_type).c_str()); pc->expecting_clicks_for_LPE = num_clicks; pc->polylines_only = use_polylines; pc->waiting_LPE_type = effect_type; -- cgit v1.2.3