Code

Connector tool: make connectors avoid the convex hull of shapes.
[inkscape.git] / src / tools-switch.cpp
index a066c37a021ccf46716648f436b4d34af41a6139..6c53ce61c8183d8e9532d8ba7fc4562e213d5c50 100644 (file)
@@ -28,6 +28,7 @@
 #include "select-context.h"
 #include "node-context.h"
 #include "tweak-context.h"
+#include "spray-context.h"
 #include "sp-path.h"
 #include "rect-context.h"
 #include "sp-rect.h"
@@ -62,6 +63,7 @@ static char const *const tool_names[] = {
     "/tools/select",
     "/tools/nodes",
     "/tools/tweak",
+    "/tools/spray",
     "/tools/shapes/rect",
     "/tools/shapes/3dbox",
     "/tools/shapes/arc",
@@ -135,6 +137,12 @@ tools_switch(SPDesktop *dt, int num)
             inkscape_eventcontext_set(sp_desktop_event_context(dt));
             dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("To tweak a path by pushing, select it and drag over it."));
             break;
+        case TOOLS_SPRAY:
+            dt->set_event_context(SP_TYPE_SPRAY_CONTEXT, tool_names[num]);
+            dt->activate_guides(true);
+            inkscape_eventcontext_set(sp_desktop_event_context(dt));
+            dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("To spray a path by pushing, select it and drag over it."));
+            break;
         case TOOLS_SHAPES_RECT:
             dt->set_event_context(SP_TYPE_RECT_CONTEXT, tool_names[num]);
             dt->activate_guides(false);
@@ -169,7 +177,7 @@ tools_switch(SPDesktop *dt, int num)
             dt->set_event_context(SP_TYPE_PENCIL_CONTEXT, tool_names[num]);
             dt->activate_guides(false);
             inkscape_eventcontext_set(sp_desktop_event_context(dt));
-            dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Drag</b> to create a freehand line. Start drawing with <b>Shift</b> to append to selected path."));
+            dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("<b>Drag</b> to create a freehand line. <b>Shift</b> appends to selected path, <b>Alt</b> activates sketch mode."));
             break;
         case TOOLS_FREEHAND_PEN:
             dt->set_event_context(SP_TYPE_PEN_CONTEXT, tool_names[num]);