diff options
| author | MenTaLguY <mental@rydia.net> | 2006-04-17 04:46:51 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-04-17 04:46:51 +0000 |
| commit | 805747f6b136ad2e89f5ca1020ca43506d2b5391 (patch) | |
| tree | beded9b49a5f2f5a3ac956ded5604cee5d61cd0c /src/tools-switch.cpp | |
| parent | SP_DT_DOCUMENT -> sp_desktop_document (diff) | |
| download | inkscape-805747f6b136ad2e89f5ca1020ca43506d2b5391.tar.gz inkscape-805747f6b136ad2e89f5ca1020ca43506d2b5391.zip | |
Get rid of the SP_DT_* macros which do nothing more than provide additional, confusing, names for other functions. If shorter names are desired, the actual functions should be renamed -- or better, made into member functions.
(bzr r532)
Diffstat (limited to 'src/tools-switch.cpp')
| -rw-r--r-- | src/tools-switch.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
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, <b>click</b>, <b>Shift+click</b>, or <b>drag around</b> nodes to select them, then <b>drag</b> nodes and handles. <b>Click</b> 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, _("<b>Drag</b> to create a rectangle. <b>Drag controls</b> to round corners and resize. <b>Click</b> 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, _("<b>Drag</b> to create an ellipse. <b>Drag controls</b> to make an arc or segment. <b>Click</b> 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, _("<b>Drag</b> to create a star. <b>Drag controls</b> to edit the star shape. <b>Click</b> 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, _("<b>Drag</b> to create a spiral. <b>Drag controls</b> to edit the spiral shape. <b>Click</b> 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, _("<b>Drag</b> to create a freehand line. Start drawing with <b>Shift</b> 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, _("<b>Click</b> or <b>click and drag</b> to start a path; with <b>Shift</b> 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, _("<b>Drag</b> to paint a calligraphic stroke. <b>Left</b>/<b>right</b> arrow keys adjust width, <b>up</b>/<b>down</b> 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, _("<b>Click</b> to select or create text, <b>drag</b> 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, _("<b>Drag</b> or <b>double click</b> to create a gradient on selected objects, <b>drag handles</b> 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, _("<b>Click</b> or <b>drag around an area</b> to zoom in, <b>Shift+click</b> 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, _("<b>Click</b> to set fill, <b>Shift+click</b> to set stroke; <b>drag</b> to average color in area; with <b>Alt</b> to pick inverse color; <b>Ctrl+C</b> 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, _("<b>Click and drag</b> between shapes to create a connector.")); break; } |
