X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ftools-switch.cpp;h=e9fca952eb93c65ba2c4671169091b1135295710;hb=c7cf14ac71346f76ae219ce67fb88c1bd34832e2;hp=380267408d4385cdd8062dbef4fe5da53279c253;hpb=44aa4bdf094f63e3f9e5ccf1c84b835c3e06863b;p=inkscape.git diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 380267408..e9fca952e 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -28,6 +28,7 @@ #include "select-context.h" #include "ui/tool/node-tool.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", @@ -134,6 +136,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); @@ -269,4 +277,4 @@ void tools_switch_by_item(SPDesktop *dt, SPItem *item, Geom::Point const p) fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :