From 1797f521c22956948021b9a2c51ff848b405bd40 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Mon, 18 Aug 2008 00:34:25 +0000 Subject: Groundwork for new LPETool tool (which consists of subtools that are constructed from LPEs) (bzr r6645) --- src/tools-switch.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 4c51f4e10..6ee162f1d 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -43,6 +43,7 @@ #include "eraser-context.h" #include "pen-context.h" #include "pencil-context.h" +#include "lpe-tool-context.h" #include "text-context.h" #include "sp-text.h" #include "sp-flowtext.h" @@ -76,6 +77,7 @@ static char const *const tool_names[] = { "tools.connector", "tools.paintbucket", "tools.eraser", + "tools.lpetool", NULL }; @@ -99,6 +101,7 @@ static char const *const tool_ids[] = { "connector", "paintbucket", "eraser", + "lpetool", NULL }; @@ -246,6 +249,12 @@ tools_switch(SPDesktop *dt, int num) inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to erase.")); break; + case TOOLS_LPETOOL: + dt->set_event_context(SP_TYPE_LPETOOL_CONTEXT, tool_names[num]); + dt->activate_guides(false); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Choose a subtool from the toolbar")); + break; } } -- cgit v1.2.3