From 0ea9b448ee16fe941d46395c2877f4d2e815b9ed Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 23 May 2012 14:00:49 +0200 Subject: Add Mesh tool (experimental, requires Cario >= 1.11.4, disabled by default). (bzr r11406) --- 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 42eaf4474..cbf269387 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -49,6 +49,7 @@ #include "sp-text.h" #include "sp-flowtext.h" #include "gradient-context.h" +#include "mesh-context.h" #include "zoom-context.h" #include "measure-context.h" #include "dropper-context.h" @@ -75,6 +76,7 @@ static char const *const tool_names[] = { "/tools/calligraphic", "/tools/text", "/tools/gradient", + "/tools/mesh", "/tools/zoom", "/tools/measure", "/tools/dropper", @@ -204,7 +206,14 @@ tools_switch(SPDesktop *dt, int num) 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_MESH: + dt->set_event_context(SP_TYPE_MESH_CONTEXT, tool_names[num]); + dt->activate_guides(false); + inkscape_eventcontext_set(sp_desktop_event_context(dt)); + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag or double click to create a mesh on selected objects, drag handles to adjust meshes.")); + break; case TOOLS_ZOOM: + std::cout << "tools-switch.cpp: TOOLS_ZOOM" << std::endl; dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]); dt->activate_guides(false); inkscape_eventcontext_set(sp_desktop_event_context(dt)); -- cgit v1.2.3 From 9cffd82661a0aa17fdb4f6333b8a45ee896901b0 Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Mon, 3 Dec 2012 15:10:10 +0100 Subject: Translations. Removing sp-color-gtkselector.cpp from translatable files. UI. Fix for Bug #836477 (Spray Tool: Descriptions in status bar "... scroll to spray something" need more words). Translations. Translation template update. (bzr r11926) --- src/tools-switch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index cbf269387..f0535e2ff 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -144,7 +144,7 @@ tools_switch(SPDesktop *dt, int num) 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, _("Drag, click or scroll to spray the selected objects.")); + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag, click or click and scroll to spray the selected objects.")); break; case TOOLS_SHAPES_RECT: dt->set_event_context(SP_TYPE_RECT_CONTEXT, tool_names[num]); -- cgit v1.2.3 From 708181e0ec7ef17e7e19cd11e539aa2f5188cd29 Mon Sep 17 00:00:00 2001 From: Craig Marshall Date: Tue, 26 Mar 2013 19:35:00 +1100 Subject: Fixed broken logic in zoom history to fix bug 1106031 (and removed some unrelated and unnecessary debug output) (bzr r12245) --- src/tools-switch.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index f0535e2ff..9e7dfa3f9 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -213,7 +213,6 @@ tools_switch(SPDesktop *dt, int num) dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag or double click to create a mesh on selected objects, drag handles to adjust meshes.")); break; case TOOLS_ZOOM: - std::cout << "tools-switch.cpp: TOOLS_ZOOM" << std::endl; dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]); dt->activate_guides(false); inkscape_eventcontext_set(sp_desktop_event_context(dt)); -- cgit v1.2.3 From 1227ca0189590b281116fcc808bdd8c674b2196c Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 20 Apr 2013 21:16:13 +0200 Subject: Further changes to EventContexts; they work without GObject (bzr r11608.1.97) --- src/tools-switch.cpp | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 9e7dfa3f9..ec917f331 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -122,134 +122,136 @@ tools_switch(SPDesktop *dt, int num) dt->_tool_changed.emit(num); } + dt->set_event_context2(tool_names[num]); + switch (num) { case TOOLS_SELECT: - dt->set_event_context(SP_TYPE_SELECT_CONTEXT, tool_names[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_desktop_event_context(dt)); break; case TOOLS_NODES: - dt->set_event_context(INK_TYPE_NODE_TOOL, tool_names[num]); + //dt->set_event_context(INK_TYPE_NODE_TOOL, tool_names[num]); dt->activate_guides(true); inkscape_eventcontext_set(sp_desktop_event_context(dt)); break; case TOOLS_TWEAK: - dt->set_event_context(SP_TYPE_TWEAK_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_TWEAK_CONTEXT, tool_names[num]); dt->activate_guides(true); 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->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, _("Drag, click or click and scroll to spray the selected objects.")); break; case TOOLS_SHAPES_RECT: - dt->set_event_context(SP_TYPE_RECT_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_RECT_CONTEXT, tool_names[num]); dt->activate_guides(false); 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_3DBOX: - dt->set_event_context(SP_TYPE_BOX3D_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_BOX3D_CONTEXT, tool_names[num]); dt->activate_guides(false); inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a 3D box. Drag controls to resize in perspective. Click to select (with Ctrl+Alt for single faces).")); break; case TOOLS_SHAPES_ARC: - dt->set_event_context(SP_TYPE_ARC_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_ARC_CONTEXT, tool_names[num]); dt->activate_guides(false); 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->set_event_context(SP_TYPE_STAR_CONTEXT, tool_names[num]); dt->activate_guides(false); 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->set_event_context(SP_TYPE_SPIRAL_CONTEXT, tool_names[num]); dt->activate_guides(false); 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->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, _("Drag to create a freehand line. Shift appends to selected path, Alt activates sketch mode.")); break; case TOOLS_FREEHAND_PEN: - dt->set_event_context(SP_TYPE_PEN_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_PEN_CONTEXT, tool_names[num]); dt->activate_guides(false); 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. Ctrl+click to create single dots (straight line modes only).")); break; case TOOLS_CALLIGRAPHIC: - dt->set_event_context(SP_TYPE_DYNA_DRAW_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_DYNA_DRAW_CONTEXT, tool_names[num]); dt->activate_guides(false); inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to draw a calligraphic stroke; with Ctrl to track a guide path. Arrow keys adjust width (left/right) and angle (up/down).")); break; case TOOLS_TEXT: - dt->set_event_context(SP_TYPE_TEXT_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_TEXT_CONTEXT, tool_names[num]); dt->activate_guides(false); 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->set_event_context(SP_TYPE_GRADIENT_CONTEXT, tool_names[num]); dt->activate_guides(false); 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_MESH: - dt->set_event_context(SP_TYPE_MESH_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_MESH_CONTEXT, tool_names[num]); dt->activate_guides(false); inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag or double click to create a mesh on selected objects, drag handles to adjust meshes.")); break; case TOOLS_ZOOM: - dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]); dt->activate_guides(false); 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_MEASURE: - dt->set_event_context(SP_TYPE_MEASURE_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_MEASURE_CONTEXT, tool_names[num]); dt->activate_guides(false); inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to measure the dimensions of objects.")); break; case TOOLS_DROPPER: - dt->set_event_context(SP_TYPE_DROPPER_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_DROPPER_CONTEXT, tool_names[num]); dt->activate_guides(false); 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->set_event_context(SP_TYPE_CONNECTOR_CONTEXT, tool_names[num]); dt->activate_guides(false); inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click and drag between shapes to create a connector.")); break; case TOOLS_PAINTBUCKET: - dt->set_event_context(SP_TYPE_FLOOD_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_FLOOD_CONTEXT, tool_names[num]); dt->activate_guides(false); inkscape_eventcontext_set(sp_desktop_event_context(dt)); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click to paint a bounded area, Shift+click to union the new fill with the current selection, Ctrl+click to change the clicked object's fill and stroke to the current setting.")); break; case TOOLS_ERASER: - dt->set_event_context(SP_TYPE_ERASER_CONTEXT, tool_names[num]); + //dt->set_event_context(SP_TYPE_ERASER_CONTEXT, tool_names[num]); dt->activate_guides(false); 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->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")); -- cgit v1.2.3 From b2dd3583e7372d23d18bbc6e861f4f645ec3dc37 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Tue, 30 Jul 2013 23:17:21 +0200 Subject: Further refactoring of EventContexts. (bzr r11608.1.109) --- src/tools-switch.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index ec917f331..fd160e518 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -129,131 +129,131 @@ 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_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); break; case TOOLS_NODES: //dt->set_event_context(INK_TYPE_NODE_TOOL, tool_names[num]); dt->activate_guides(true); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); break; case TOOLS_TWEAK: //dt->set_event_context(SP_TYPE_TWEAK_CONTEXT, tool_names[num]); dt->activate_guides(true); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); 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)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag, click or click and scroll to spray the selected objects.")); break; case TOOLS_SHAPES_RECT: //dt->set_event_context(SP_TYPE_RECT_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); 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_3DBOX: //dt->set_event_context(SP_TYPE_BOX3D_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a 3D box. Drag controls to resize in perspective. Click to select (with Ctrl+Alt for single faces).")); break; case TOOLS_SHAPES_ARC: //dt->set_event_context(SP_TYPE_ARC_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); 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_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); 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_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); 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_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a freehand line. Shift appends to selected path, Alt activates sketch mode.")); break; case TOOLS_FREEHAND_PEN: //dt->set_event_context(SP_TYPE_PEN_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click or click and drag to start a path; with Shift to append to selected path. Ctrl+click to create single dots (straight line modes only).")); break; case TOOLS_CALLIGRAPHIC: //dt->set_event_context(SP_TYPE_DYNA_DRAW_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to draw a calligraphic stroke; with Ctrl to track a guide path. Arrow keys adjust width (left/right) and angle (up/down).")); break; case TOOLS_TEXT: //dt->set_event_context(SP_TYPE_TEXT_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); 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_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); 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_MESH: //dt->set_event_context(SP_TYPE_MESH_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag or double click to create a mesh on selected objects, drag handles to adjust meshes.")); break; case TOOLS_ZOOM: //dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click or drag around an area to zoom in, Shift+click to zoom out.")); break; case TOOLS_MEASURE: //dt->set_event_context(SP_TYPE_MEASURE_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to measure the dimensions of objects.")); break; case TOOLS_DROPPER: //dt->set_event_context(SP_TYPE_DROPPER_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); 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_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click and drag between shapes to create a connector.")); break; case TOOLS_PAINTBUCKET: //dt->set_event_context(SP_TYPE_FLOOD_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click to paint a bounded area, Shift+click to union the new fill with the current selection, Ctrl+click to change the clicked object's fill and stroke to the current setting.")); break; case TOOLS_ERASER: //dt->set_event_context(SP_TYPE_ERASER_CONTEXT, tool_names[num]); dt->activate_guides(false); - inkscape_eventcontext_set(sp_desktop_event_context(dt)); + inkscape_eventcontext_set(dt->getEventContext()); 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)); + inkscape_eventcontext_set(dt->getEventContext()); dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Choose a subtool from the toolbar")); break; } -- cgit v1.2.3 From df16775103cd981612d363bd6937cd2d68801b5f Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Mon, 30 Sep 2013 04:43:12 -0400 Subject: Reduce tools-switcher code, add description for node and select toos. (bzr r12630) --- src/tools-switch.cpp | 164 ++++++++++----------------------------------------- 1 file changed, 30 insertions(+), 134 deletions(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index fd160e518..32fab9f7e 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -86,6 +86,31 @@ static char const *const tool_names[] = { "/tools/lpetool", NULL }; +static char const *const tool_msg[] = { + NULL, + _("Click to Select and Tranform objects, Drag to select many objects."), + _("Modify selected path points (nodes) directly."), + _("To tweak a path by pushing, select it and drag over it."), + _("Drag, click or click and scroll to spray the selected objects."), + _("Drag to create a rectangle. Drag controls to round corners and resize. Click to select."), + _("Drag to create a 3D box. Drag controls to resize in perspective. Click to select (with Ctrl+Alt for single faces)."), + _("Drag to create an ellipse. Drag controls to make an arc or segment. Click to select."), + _("Drag to create a star. Drag controls to edit the star shape. Click to select."), + _("Drag to create a spiral. Drag controls to edit the spiral shape. Click to select."), + _("Drag to create a freehand line. Shift appends to selected path, Alt activates sketch mode."), + _("Click or click and drag to start a path; with Shift to append to selected path. Ctrl+click to create single dots (straight line modes only)."), + _("Drag to draw a calligraphic stroke; with Ctrl to track a guide path. Arrow keys adjust width (left/right) and angle (up/down)."), + _("Click to select or create text, drag to create flowed text; then type."), + _("Drag or double click to create a gradient on selected objects, drag handles to adjust gradients."), + _("Drag or double click to create a mesh on selected objects, drag handles to adjust meshes."), + _("Click or drag around an area to zoom in, Shift+click to zoom out."), + _("Drag to measure the dimensions of objects."), + _("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"), + _("Click and drag between shapes to create a connector."), + _("Click to paint a bounded area, Shift+click to union the new fill with the current selection, Ctrl+click to change the clicked object's fill and stroke to the current setting."), + _("Drag to erase."), + _("Choose a subtool from the toolbar"), +}; static int tools_prefpath2num(char const *id) @@ -123,140 +148,11 @@ tools_switch(SPDesktop *dt, int num) } dt->set_event_context2(tool_names[num]); - - switch (num) { - case TOOLS_SELECT: - //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(dt->getEventContext()); - break; - case TOOLS_NODES: - //dt->set_event_context(INK_TYPE_NODE_TOOL, tool_names[num]); - dt->activate_guides(true); - inkscape_eventcontext_set(dt->getEventContext()); - break; - case TOOLS_TWEAK: - //dt->set_event_context(SP_TYPE_TWEAK_CONTEXT, tool_names[num]); - dt->activate_guides(true); - inkscape_eventcontext_set(dt->getEventContext()); - 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(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag, click or click and scroll to spray the selected objects.")); - break; - case TOOLS_SHAPES_RECT: - //dt->set_event_context(SP_TYPE_RECT_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - 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_3DBOX: - //dt->set_event_context(SP_TYPE_BOX3D_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a 3D box. Drag controls to resize in perspective. Click to select (with Ctrl+Alt for single faces).")); - break; - case TOOLS_SHAPES_ARC: - //dt->set_event_context(SP_TYPE_ARC_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - 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(dt->getEventContext()); - 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(dt->getEventContext()); - 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(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to create a freehand line. Shift appends to selected path, Alt activates sketch mode.")); - break; - case TOOLS_FREEHAND_PEN: - //dt->set_event_context(SP_TYPE_PEN_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click or click and drag to start a path; with Shift to append to selected path. Ctrl+click to create single dots (straight line modes only).")); - break; - case TOOLS_CALLIGRAPHIC: - //dt->set_event_context(SP_TYPE_DYNA_DRAW_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to draw a calligraphic stroke; with Ctrl to track a guide path. Arrow keys adjust width (left/right) and angle (up/down).")); - break; - case TOOLS_TEXT: - //dt->set_event_context(SP_TYPE_TEXT_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - 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(dt->getEventContext()); - 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_MESH: - //dt->set_event_context(SP_TYPE_MESH_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag or double click to create a mesh on selected objects, drag handles to adjust meshes.")); - break; - case TOOLS_ZOOM: - //dt->set_event_context(SP_TYPE_ZOOM_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click or drag around an area to zoom in, Shift+click to zoom out.")); - break; - case TOOLS_MEASURE: - //dt->set_event_context(SP_TYPE_MEASURE_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Drag to measure the dimensions of objects.")); - break; - case TOOLS_DROPPER: - //dt->set_event_context(SP_TYPE_DROPPER_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - 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(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click and drag between shapes to create a connector.")); - break; - case TOOLS_PAINTBUCKET: - //dt->set_event_context(SP_TYPE_FLOOD_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Click to paint a bounded area, Shift+click to union the new fill with the current selection, Ctrl+click to change the clicked object's fill and stroke to the current setting.")); - break; - case TOOLS_ERASER: - //dt->set_event_context(SP_TYPE_ERASER_CONTEXT, tool_names[num]); - dt->activate_guides(false); - inkscape_eventcontext_set(dt->getEventContext()); - 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(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, _("Choose a subtool from the toolbar")); - break; - } + /* fixme: This is really ugly hack. We should bind and unbind class methods */ + /* First 4 tools use guides, first is undefined but we don't care */ + dt->activate_guides(num < 5); + inkscape_eventcontext_set(dt->getEventContext()); + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, tool_msg[num] ); } void tools_switch_by_item(SPDesktop *dt, SPItem *item, Geom::Point const p) -- cgit v1.2.3 From c6867ca8cc751a4cd04b029a6358740dbd4929d4 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Mon, 30 Sep 2013 11:38:50 -0400 Subject: Fix translations for tool messages (bzr r12631) --- src/tools-switch.cpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 32fab9f7e..a3c0f2daa 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -88,28 +88,28 @@ static char const *const tool_names[] = { }; static char const *const tool_msg[] = { NULL, - _("Click to Select and Tranform objects, Drag to select many objects."), - _("Modify selected path points (nodes) directly."), - _("To tweak a path by pushing, select it and drag over it."), - _("Drag, click or click and scroll to spray the selected objects."), - _("Drag to create a rectangle. Drag controls to round corners and resize. Click to select."), - _("Drag to create a 3D box. Drag controls to resize in perspective. Click to select (with Ctrl+Alt for single faces)."), - _("Drag to create an ellipse. Drag controls to make an arc or segment. Click to select."), - _("Drag to create a star. Drag controls to edit the star shape. Click to select."), - _("Drag to create a spiral. Drag controls to edit the spiral shape. Click to select."), - _("Drag to create a freehand line. Shift appends to selected path, Alt activates sketch mode."), - _("Click or click and drag to start a path; with Shift to append to selected path. Ctrl+click to create single dots (straight line modes only)."), - _("Drag to draw a calligraphic stroke; with Ctrl to track a guide path. Arrow keys adjust width (left/right) and angle (up/down)."), - _("Click to select or create text, drag to create flowed text; then type."), - _("Drag or double click to create a gradient on selected objects, drag handles to adjust gradients."), - _("Drag or double click to create a mesh on selected objects, drag handles to adjust meshes."), - _("Click or drag around an area to zoom in, Shift+click to zoom out."), - _("Drag to measure the dimensions of objects."), - _("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"), - _("Click and drag between shapes to create a connector."), - _("Click to paint a bounded area, Shift+click to union the new fill with the current selection, Ctrl+click to change the clicked object's fill and stroke to the current setting."), - _("Drag to erase."), - _("Choose a subtool from the toolbar"), + N_("Click to Select and Tranform objects, Drag to select many objects."), + N_("Modify selected path points (nodes) directly."), + N_("To tweak a path by pushing, select it and drag over it."), + N_("Drag, click or click and scroll to spray the selected objects."), + N_("Drag to create a rectangle. Drag controls to round corners and resize. Click to select."), + N_("Drag to create a 3D box. Drag controls to resize in perspective. Click to select (with Ctrl+Alt for single faces)."), + N_("Drag to create an ellipse. Drag controls to make an arc or segment. Click to select."), + N_("Drag to create a star. Drag controls to edit the star shape. Click to select."), + N_("Drag to create a spiral. Drag controls to edit the spiral shape. Click to select."), + N_("Drag to create a freehand line. Shift appends to selected path, Alt activates sketch mode."), + N_("Click or click and drag to start a path; with Shift to append to selected path. Ctrl+click to create single dots (straight line modes only)."), + N_("Drag to draw a calligraphic stroke; with Ctrl to track a guide path. Arrow keys adjust width (left/right) and angle (up/down)."), + N_("Click to select or create text, drag to create flowed text; then type."), + N_("Drag or double click to create a gradient on selected objects, drag handles to adjust gradients."), + N_("Drag or double click to create a mesh on selected objects, drag handles to adjust meshes."), + N_("Click or drag around an area to zoom in, Shift+click to zoom out."), + N_("Drag to measure the dimensions of objects."), + N_("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"), + N_("Click and drag between shapes to create a connector."), + N_("Click to paint a bounded area, Shift+click to union the new fill with the current selection, Ctrl+click to change the clicked object's fill and stroke to the current setting."), + N_("Drag to erase."), + N_("Choose a subtool from the toolbar"), }; static int @@ -152,7 +152,7 @@ tools_switch(SPDesktop *dt, int num) /* First 4 tools use guides, first is undefined but we don't care */ dt->activate_guides(num < 5); inkscape_eventcontext_set(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, tool_msg[num] ); + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, gettext( tool_msg[num] ) ); } void tools_switch_by_item(SPDesktop *dt, SPItem *item, Geom::Point const p) -- cgit v1.2.3 From cdf669d01c5b35cad39a4c7a2bd16041c2216e1b Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Sun, 6 Oct 2013 13:24:36 -0400 Subject: Order of message setting for tools Fixed bugs: - https://launchpad.net/bugs/1235792 (bzr r12664) --- src/tools-switch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index a3c0f2daa..1c07f07cc 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -143,7 +143,9 @@ tools_active(SPDesktop *dt) void tools_switch(SPDesktop *dt, int num) { + dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, gettext( tool_msg[num] ) ); if (dt) { + // This event may change the above message dt->_tool_changed.emit(num); } @@ -152,7 +154,6 @@ tools_switch(SPDesktop *dt, int num) /* First 4 tools use guides, first is undefined but we don't care */ dt->activate_guides(num < 5); inkscape_eventcontext_set(dt->getEventContext()); - dt->tipsMessageContext()->set(Inkscape::NORMAL_MESSAGE, gettext( tool_msg[num] ) ); } void tools_switch_by_item(SPDesktop *dt, SPItem *item, Geom::Point const p) -- cgit v1.2.3 From 30422af227381c9aa900690586d25adec4fa262f Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Wed, 9 Oct 2013 21:09:49 +0200 Subject: Documentation/Translation. Fix for Bug #1236382 (Typos in comments and message, localization context needed) by Yuri Chornoivan. Fixed bugs: - https://launchpad.net/bugs/1236382 (bzr r12673) --- src/tools-switch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 1c07f07cc..5f54ad15a 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -88,7 +88,7 @@ static char const *const tool_names[] = { }; static char const *const tool_msg[] = { NULL, - N_("Click to Select and Tranform objects, Drag to select many objects."), + N_("Click to Select and Transform objects, Drag to select many objects."), N_("Modify selected path points (nodes) directly."), N_("To tweak a path by pushing, select it and drag over it."), N_("Drag, click or click and scroll to spray the selected objects."), -- cgit v1.2.3 From 55b451bf382e0c3d5ed8728e42fbb535acfa8a33 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Thu, 7 Nov 2013 21:44:00 +0100 Subject: First step of moving tools into appropriate namespaces. (bzr r12782) --- src/tools-switch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index 5f54ad15a..beff0e5f3 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -169,7 +169,7 @@ void tools_switch_by_item(SPDesktop *dt, SPItem *item, Geom::Point const p) } else if (SP_IS_SPIRAL(item)) { tools_switch(dt, TOOLS_SHAPES_SPIRAL); } else if (SP_IS_PATH(item)) { - if (cc_item_is_connector(item)) { + if (Inkscape::UI::Tools::cc_item_is_connector(item)) { tools_switch(dt, TOOLS_CONNECTOR); } else { -- cgit v1.2.3 From c04e30df241a3ee039077425bab9b9c37abe2854 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 9 Nov 2013 23:36:13 +0100 Subject: Moved and renamed some tool-related files. (bzr r12785) --- src/tools-switch.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/tools-switch.cpp') diff --git a/src/tools-switch.cpp b/src/tools-switch.cpp index beff0e5f3..fe9d32f43 100644 --- a/src/tools-switch.cpp +++ b/src/tools-switch.cpp @@ -25,36 +25,36 @@ #include -#include "select-context.h" -#include "ui/tool/node-tool.h" -#include "tweak-context.h" -#include "spray-context.h" +#include "ui/tools/select-tool.h" +#include "ui/tools/node-tool.h" +#include "ui/tools/tweak-tool.h" +#include "ui/tools/spray-tool.h" #include "sp-path.h" -#include "rect-context.h" +#include "ui/tools/rect-tool.h" #include "sp-rect.h" -#include "box3d-context.h" +#include "ui/tools/box3d-tool.h" #include "box3d.h" -#include "arc-context.h" +#include "ui/tools/arc-tool.h" #include "sp-ellipse.h" -#include "star-context.h" +#include "ui/tools/tweak-tool.h" #include "sp-star.h" -#include "spiral-context.h" +#include "ui/tools/spiral-tool.h" #include "sp-spiral.h" -#include "dyna-draw-context.h" -#include "eraser-context.h" -#include "pen-context.h" -#include "pencil-context.h" -#include "lpe-tool-context.h" -#include "text-context.h" +#include "ui/tools/calligraphic-tool.h" +#include "ui/tools/eraser-tool.h" +#include "ui/tools/pen-tool.h" +#include "ui/tools/pencil-tool.h" +#include "ui/tools/lpe-tool.h" +#include "ui/tools/text-tool.h" #include "sp-text.h" #include "sp-flowtext.h" -#include "gradient-context.h" -#include "mesh-context.h" -#include "zoom-context.h" -#include "measure-context.h" -#include "dropper-context.h" -#include "connector-context.h" -#include "flood-context.h" +#include "ui/tools/gradient-tool.h" +#include "ui/tools/mesh-tool.h" +#include "ui/tools/zoom-tool.h" +#include "ui/tools/measure-tool.h" +#include "ui/tools/dropper-tool.h" +#include "ui/tools/connector-tool.h" +#include "ui/tools/flood-tool.h" #include "sp-offset.h" #include "message-context.h" -- cgit v1.2.3