Code

use touchpath selection when rubberbanding with Alt; do move-selected with Alt only...
[inkscape.git] / src / draw-context.cpp
index bb1f56044b0813eddb55a8d905093128f5623d0a..30b2e612c40281b751541f04367a5a4807798e71 100644 (file)
@@ -209,30 +209,11 @@ sp_draw_context_set(SPEventContext *ec, const gchar *key, const gchar *value)
 gint
 sp_draw_context_root_handler(SPEventContext *ec, GdkEvent *event)
 {
-    //SPDrawContext *dc = SP_DRAW_CONTEXT(ec);
-    SPDesktop *desktop = ec->desktop;
-
     gint ret = FALSE;
 
     switch (event->type) {
         case GDK_KEY_PRESS:
             switch (get_group0_keyval (&event->key)) {
-                case GDK_Escape:
-                    sp_desktop_selection(desktop)->clear();
-                    ret = TRUE;
-                    break;
-                case GDK_Tab: // Tab - cycle selection forward
-                    if (!(MOD__CTRL_ONLY || (MOD__CTRL && MOD__SHIFT))) {
-                        sp_selection_item_next();
-                        ret = TRUE;
-                    }
-                    break;
-                case GDK_ISO_Left_Tab: // Shift Tab - cycle selection backward
-                    if (!(MOD__CTRL_ONLY || (MOD__CTRL && MOD__SHIFT))) {
-                        sp_selection_item_prev();
-                        ret = TRUE;
-                    }
-                    break;
                 case GDK_Up:
                 case GDK_Down:
                 case GDK_KP_Up:
@@ -530,6 +511,7 @@ spdc_flush_white(SPDrawContext *dc, SPCurve *gc)
 
     SPDesktop *desktop = SP_EVENT_CONTEXT_DESKTOP(dc);
     SPDocument *doc = sp_desktop_document(desktop);
+    Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
 
     if ( c && !sp_curve_empty(c) ) {
         /* We actually have something to write */
@@ -538,7 +520,7 @@ spdc_flush_white(SPDrawContext *dc, SPCurve *gc)
         if (dc->white_item) {
             repr = SP_OBJECT_REPR(dc->white_item);
         } else {
-            repr = sp_repr_new("svg:path");
+            repr = xml_doc->createElement("svg:path");
             /* Set style */
             sp_desktop_apply_style_tool(desktop, repr, tool_name(dc), false);
         }
@@ -558,7 +540,7 @@ spdc_flush_white(SPDrawContext *dc, SPCurve *gc)
         }
 
         sp_document_done(doc, SP_IS_PEN_CONTEXT(dc)? SP_VERB_CONTEXT_PEN : SP_VERB_CONTEXT_PENCIL, 
-                         /* TODO: annotate */ "draw-context.cpp:561");
+                         _("Draw path"));
     }
 
     sp_curve_unref(c);