X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Ftools-switch.cpp;h=d42354e8dae86083fc4e7cca0ebeafe84a02c1b2;hb=2ebae4c87c79dc0f626084f038a7710177eaabe9;hp=0a2b2b3c8a1f552b986d34d05a9ed14041d903bc;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 0a2b2b3c8..d42354e8d 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -124,84 +124,84 @@ tools_switch(SPDesktop *dt, int num) dt->set_event_context(SP_TYPE_SELECT_CONTEXT, tool_names[num]); /* fixme: This is really ugly hack. We should bind and unbind class methods */ dt->activate_guides(true); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); break; case TOOLS_NODES: dt->set_event_context(SP_TYPE_NODE_CONTEXT, tool_names[num]); dt->activate_guides(true); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("To edit a path, click, Shift+click, or drag around nodes to select them, then drag nodes and handles. Click on an object to select.")); break; case TOOLS_SHAPES_RECT: dt->set_event_context(SP_TYPE_RECT_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a rectangle. Drag controls to round corners and resize. Click to select.")); break; case TOOLS_SHAPES_ARC: dt->set_event_context(SP_TYPE_ARC_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create an ellipse. Drag controls to make an arc or segment. Click to select.")); break; case TOOLS_SHAPES_STAR: dt->set_event_context(SP_TYPE_STAR_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a star. Drag controls to edit the star shape. Click to select.")); break; case TOOLS_SHAPES_SPIRAL: dt->set_event_context(SP_TYPE_SPIRAL_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a spiral. Drag controls to edit the spiral shape. Click to select.")); break; case TOOLS_FREEHAND_PENCIL: dt->set_event_context(SP_TYPE_PENCIL_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a freehand line. Start drawing with Shift to append to selected path.")); break; case TOOLS_FREEHAND_PEN: dt->set_event_context(SP_TYPE_PEN_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click or click and drag to start a path; with Shift to append to selected path.")); break; case TOOLS_CALLIGRAPHIC: dt->set_event_context(SP_TYPE_DYNA_DRAW_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to paint a calligraphic stroke. Left/right arrow keys adjust width, up/down adjust angle.")); break; case TOOLS_TEXT: dt->set_event_context(SP_TYPE_TEXT_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click to select or create text, drag to create flowed text; then type.")); break; case TOOLS_GRADIENT: dt->set_event_context(SP_TYPE_GRADIENT_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag or double click to create a gradient on selected objects, drag handles to adjust gradients.")); break; case TOOLS_ZOOM: dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click or drag around an area to zoom in, Shift+click to zoom out.")); break; case TOOLS_DROPPER: dt->set_event_context(SP_TYPE_DROPPER_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click to set fill, Shift+click to set stroke; drag to average color in area; with Alt to pick inverse color; Ctrl+C to copy the color under mouse to clipboard")); break; case TOOLS_CONNECTOR: dt->set_event_context(SP_TYPE_CONNECTOR_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(SP_DT_EVENTCONTEXT(dt)); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click and drag between shapes to create a connector.")); break; }