=== modified file 'share/keys/default.xml'
--- share/keys/default.xml 2012-07-10 16:26:54 +0000
+++ share/keys/default.xml 2012-07-23 05:00:36 +0000
@@ -581,6 +581,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -600,9 +621,11 @@
+
+
=== modified file 'src/ui/dialog/align-and-distribute.cpp'
--- src/ui/dialog/align-and-distribute.cpp 2012-04-14 20:12:19 +0000
+++ src/ui/dialog/align-and-distribute.cpp 2012-07-23 04:20:25 +0000
@@ -57,216 +57,190 @@
/////////helper classes//////////////////////////////////
-class Action {
-public :
- Action(const Glib::ustring &id,
- const Glib::ustring &tiptext,
- guint row, guint column,
-#if WITH_GTKMM_3_0
- Gtk::Grid &parent,
-#else
- Gtk::Table &parent,
-#endif
- AlignAndDistribute &dialog):
- _dialog(dialog),
- _id(id),
- _parent(parent)
- {
- Gtk::Widget* pIcon = Gtk::manage( sp_icon_get_icon( _id, Inkscape::ICON_SIZE_LARGE_TOOLBAR) );
- Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
- pButton->set_relief(Gtk::RELIEF_NONE);
- pIcon->show();
- pButton->add(*pIcon);
- pButton->show();
-
- pButton->signal_clicked()
- .connect(sigc::mem_fun(*this, &Action::on_button_click));
- pButton->set_tooltip_text(tiptext);
-#if WITH_GTKMM_3_0
- parent.attach(*pButton, column, row, 1, 1);
-#else
- parent.attach(*pButton, column, column+1, row, row+1, Gtk::FILL, Gtk::FILL);
-#endif
- }
- virtual ~Action(){}
-
- AlignAndDistribute &_dialog;
-
-private :
- virtual void on_button_click(){}
-
- Glib::ustring _id;
-
-#if WITH_GTKMM_3_0
- Gtk::Grid &_parent;
-#else
- Gtk::Table &_parent;
-#endif
-};
-
-
-class ActionAlign : public Action {
-public :
- struct Coeffs {
- double mx0, mx1, my0, my1;
- double sx0, sx1, sy0, sy1;
- };
- ActionAlign(const Glib::ustring &id,
- const Glib::ustring &tiptext,
- guint row, guint column,
- AlignAndDistribute &dialog,
- guint coeffIndex):
- Action(id, tiptext, row, column,
- dialog.align_table(), dialog),
- _index(coeffIndex),
- _dialog(dialog)
- {}
-
-private :
-
- virtual void on_button_click() {
- //Retreive selected objects
- SPDesktop *desktop = _dialog.getDesktop();
- if (!desktop) return;
-
- Inkscape::Selection *selection = sp_desktop_selection(desktop);
- if (!selection) return;
-
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- bool sel_as_group = prefs->getBool("/dialogs/align/sel-as-groups");
- int prefs_bbox = prefs->getBool("/tools/bounding_box");
-
- using Inkscape::Util::GSListConstIterator;
- std::list selected;
- selected.insert >(selected.end(), selection->itemList(), NULL);
- if (selected.empty()) return;
-
- Geom::Point mp; //Anchor point
- AlignAndDistribute::AlignTarget target = _dialog.getAlignTarget();
- const Coeffs &a= _allCoeffs[_index];
- switch (target)
- {
- case AlignAndDistribute::LAST:
- case AlignAndDistribute::FIRST:
- case AlignAndDistribute::BIGGEST:
- case AlignAndDistribute::SMALLEST:
- {
- //Check 2 or more selected objects
- std::list::iterator second(selected.begin());
- ++second;
- if (second == selected.end())
- return;
- //Find the master (anchor on which the other objects are aligned)
- std::list::iterator master(
- _dialog.find_master (
- selected,
- (a.mx0 != 0.0) ||
- (a.mx1 != 0.0) )
- );
- //remove the master from the selection
- SPItem * thing = *master;
- // TODO: either uncomment or remove the following commented lines, depending on which
- // behaviour of moving objects makes most sense; also cf. discussion at
- // https://bugs.launchpad.net/inkscape/+bug/255933
- /*if (!sel_as_group) { */
- selected.erase(master);
- /*}*/
- //Compute the anchor point
- Geom::OptRect b = !prefs_bbox ? thing->desktopVisualBounds() : thing->desktopGeometricBounds();
- if (b) {
- mp = Geom::Point(a.mx0 * b->min()[Geom::X] + a.mx1 * b->max()[Geom::X],
- a.my0 * b->min()[Geom::Y] + a.my1 * b->max()[Geom::Y]);
- } else {
- return;
- }
- break;
- }
-
- case AlignAndDistribute::PAGE:
- mp = Geom::Point(a.mx1 * sp_desktop_document(desktop)->getWidth(),
- a.my1 * sp_desktop_document(desktop)->getHeight());
- break;
-
- case AlignAndDistribute::DRAWING:
- {
- Geom::OptRect b = !prefs_bbox ? sp_desktop_document(desktop)->getRoot()->desktopVisualBounds()
- : sp_desktop_document(desktop)->getRoot()->desktopGeometricBounds();
- if (b) {
- mp = Geom::Point(a.mx0 * b->min()[Geom::X] + a.mx1 * b->max()[Geom::X],
- a.my0 * b->min()[Geom::Y] + a.my1 * b->max()[Geom::Y]);
- } else {
- return;
- }
- break;
- }
-
- case AlignAndDistribute::SELECTION:
- {
- Geom::OptRect b = !prefs_bbox ? selection->visualBounds() : selection->geometricBounds();
- if (b) {
- mp = Geom::Point(a.mx0 * b->min()[Geom::X] + a.mx1 * b->max()[Geom::X],
- a.my0 * b->min()[Geom::Y] + a.my1 * b->max()[Geom::Y]);
- } else {
- return;
- }
- break;
- }
-
- default:
- g_assert_not_reached ();
- break;
- }; // end of switch
-
- // Top hack: temporarily set clone compensation to unmoved, so that we can align/distribute
- // clones with their original (and the move of the original does not disturb the
- // clones). The only problem with this is that if there are outside-of-selection clones of
- // a selected original, they will be unmoved too, possibly contrary to user's
- // expecation. However this is a minor point compared to making align/distribute always
- // work as expected, and "unmoved" is the default option anyway.
- int saved_compensation = prefs->getInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
- prefs->setInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
-
- bool changed = false;
- Geom::OptRect b;
- if (sel_as_group)
- b = !prefs_bbox ? selection->visualBounds() : selection->geometricBounds();
-
- //Move each item in the selected list separately
- for (std::list::iterator it(selected.begin());
- it != selected.end();
- it++)
- {
- sp_desktop_document (desktop)->ensureUpToDate();
- if (!sel_as_group)
- b = !prefs_bbox ? (*it)->desktopVisualBounds() : (*it)->desktopGeometricBounds();
- if (b) {
- Geom::Point const sp(a.sx0 * b->min()[Geom::X] + a.sx1 * b->max()[Geom::X],
- a.sy0 * b->min()[Geom::Y] + a.sy1 * b->max()[Geom::Y]);
- Geom::Point const mp_rel( mp - sp );
- if (LInfty(mp_rel) > 1e-9) {
- sp_item_move_rel(*it, Geom::Translate(mp_rel));
- changed = true;
- }
- }
- }
-
- // restore compensation setting
- prefs->setInt("/options/clonecompensation/value", saved_compensation);
-
- if (changed) {
- DocumentUndo::done( sp_desktop_document(desktop) , SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
- _("Align"));
- }
-
-
- }
- guint _index;
- AlignAndDistribute &_dialog;
-
- static const Coeffs _allCoeffs[10];
-
-};
-ActionAlign::Coeffs const ActionAlign::_allCoeffs[10] = {
+Action::Action(const Glib::ustring &id,
+ const Glib::ustring &tiptext,
+ guint row, guint column,
+#if WITH_GTKMM_3_0
+ Gtk::Grid &parent,
+#else
+ Gtk::Table &parent,
+#endif
+ AlignAndDistribute &dialog):
+ _dialog(dialog),
+ _id(id),
+ _parent(parent)
+{
+ Gtk::Widget* pIcon = Gtk::manage( sp_icon_get_icon( _id, Inkscape::ICON_SIZE_LARGE_TOOLBAR) );
+ Gtk::Button * pButton = Gtk::manage(new Gtk::Button());
+ pButton->set_relief(Gtk::RELIEF_NONE);
+ pIcon->show();
+ pButton->add(*pIcon);
+ pButton->show();
+
+ pButton->signal_clicked()
+ .connect(sigc::mem_fun(*this, &Action::on_button_click));
+ pButton->set_tooltip_text(tiptext);
+#if WITH_GTKMM_3_0
+ parent.attach(*pButton, column, row, 1, 1);
+#else
+ parent.attach(*pButton, column, column+1, row, row+1, Gtk::FILL, Gtk::FILL);
+#endif
+}
+
+
+void ActionAlign::do_action(SPDesktop *desktop, int index) {
+
+ Inkscape::Selection *selection = sp_desktop_selection(desktop);
+ if (!selection) return;
+
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ bool sel_as_group = prefs->getBool("/dialogs/align/sel-as-groups");
+ int prefs_bbox = prefs->getBool("/tools/bounding_box");
+
+ using Inkscape::Util::GSListConstIterator;
+ std::list selected;
+ selected.insert >(selected.end(), selection->itemList(), NULL);
+ if (selected.empty()) return;
+
+ Geom::Point mp; //Anchor point
+ AlignAndDistribute::AlignTarget target = AlignAndDistribute::getAlignTarget();
+ const Coeffs &a= _allCoeffs[index];
+ switch (target)
+ {
+ case AlignAndDistribute::LAST:
+ case AlignAndDistribute::FIRST:
+ case AlignAndDistribute::BIGGEST:
+ case AlignAndDistribute::SMALLEST:
+ {
+ //Check 2 or more selected objects
+ std::list::iterator second(selected.begin());
+ ++second;
+ if (second == selected.end())
+ return;
+ //Find the master (anchor on which the other objects are aligned)
+ std::list::iterator master(
+ AlignAndDistribute::find_master (
+ selected,
+ (a.mx0 != 0.0) ||
+ (a.mx1 != 0.0) )
+ );
+ //remove the master from the selection
+ SPItem * thing = *master;
+ // TODO: either uncomment or remove the following commented lines, depending on which
+ // behaviour of moving objects makes most sense; also cf. discussion at
+ // https://bugs.launchpad.net/inkscape/+bug/255933
+ /*if (!sel_as_group) { */
+ selected.erase(master);
+ /*}*/
+ //Compute the anchor point
+ Geom::OptRect b = !prefs_bbox ? thing->desktopVisualBounds() : thing->desktopGeometricBounds();
+ if (b) {
+ mp = Geom::Point(a.mx0 * b->min()[Geom::X] + a.mx1 * b->max()[Geom::X],
+ a.my0 * b->min()[Geom::Y] + a.my1 * b->max()[Geom::Y]);
+ } else {
+ return;
+ }
+ break;
+ }
+
+ case AlignAndDistribute::PAGE:
+ mp = Geom::Point(a.mx1 * sp_desktop_document(desktop)->getWidth(),
+ a.my1 * sp_desktop_document(desktop)->getHeight());
+ break;
+
+ case AlignAndDistribute::DRAWING:
+ {
+ Geom::OptRect b = !prefs_bbox ? sp_desktop_document(desktop)->getRoot()->desktopVisualBounds()
+ : sp_desktop_document(desktop)->getRoot()->desktopGeometricBounds();
+ if (b) {
+ mp = Geom::Point(a.mx0 * b->min()[Geom::X] + a.mx1 * b->max()[Geom::X],
+ a.my0 * b->min()[Geom::Y] + a.my1 * b->max()[Geom::Y]);
+ } else {
+ return;
+ }
+ break;
+ }
+
+ case AlignAndDistribute::SELECTION:
+ {
+ Geom::OptRect b = !prefs_bbox ? selection->visualBounds() : selection->geometricBounds();
+ if (b) {
+ mp = Geom::Point(a.mx0 * b->min()[Geom::X] + a.mx1 * b->max()[Geom::X],
+ a.my0 * b->min()[Geom::Y] + a.my1 * b->max()[Geom::Y]);
+ } else {
+ return;
+ }
+ break;
+ }
+
+ default:
+ g_assert_not_reached ();
+ break;
+ }; // end of switch
+
+ // Top hack: temporarily set clone compensation to unmoved, so that we can align/distribute
+ // clones with their original (and the move of the original does not disturb the
+ // clones). The only problem with this is that if there are outside-of-selection clones of
+ // a selected original, they will be unmoved too, possibly contrary to user's
+ // expecation. However this is a minor point compared to making align/distribute always
+ // work as expected, and "unmoved" is the default option anyway.
+ int saved_compensation = prefs->getInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
+ prefs->setInt("/options/clonecompensation/value", SP_CLONE_COMPENSATION_UNMOVED);
+
+ bool changed = false;
+ Geom::OptRect b;
+ if (sel_as_group)
+ b = !prefs_bbox ? selection->visualBounds() : selection->geometricBounds();
+
+ //Move each item in the selected list separately
+ for (std::list::iterator it(selected.begin());
+ it != selected.end();
+ it++)
+ {
+ sp_desktop_document (desktop)->ensureUpToDate();
+ if (!sel_as_group)
+ b = !prefs_bbox ? (*it)->desktopVisualBounds() : (*it)->desktopGeometricBounds();
+ if (b) {
+ Geom::Point const sp(a.sx0 * b->min()[Geom::X] + a.sx1 * b->max()[Geom::X],
+ a.sy0 * b->min()[Geom::Y] + a.sy1 * b->max()[Geom::Y]);
+ Geom::Point const mp_rel( mp - sp );
+ if (LInfty(mp_rel) > 1e-9) {
+ sp_item_move_rel(*it, Geom::Translate(mp_rel));
+ changed = true;
+ }
+ }
+ }
+
+ // restore compensation setting
+ prefs->setInt("/options/clonecompensation/value", saved_compensation);
+
+ if (changed) {
+ DocumentUndo::done( sp_desktop_document(desktop) , SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ _("Align"));
+ }
+
+
+}
+
+
+/*
+ * Name of each align, should correspond to _allCoeffs
+ */
+enum AlignNames {
+ ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR=0,
+ ALIGN_HORIZONTAL_LEFT,
+ ALIGN_HORIZONTAL_CENTER,
+ ALIGN_HORIZONTAL_RIGHT,
+ ALIGN_HORIZONTAL_LEFT_TO_ANCHOR,
+ ALIGN_VERTICAL_BOTTOM_TO_ANCHOR,
+ ALIGN_VERTICAL_TOP,
+ ALIGN_VERTICAL_CENTER,
+ ALIGN_VERTICAL_BOTTOM,
+ ALIGN_VERTICAL_TOP_TO_ANCHOR,
+ ALIGN_VERTICAL_HORIZONTAL_CENTER
+};
+
+ActionAlign::Coeffs const ActionAlign::_allCoeffs[11] = {
{1., 0., 0., 0., 0., 1., 0., 0.},
{1., 0., 0., 0., 1., 0., 0., 0.},
{.5, .5, 0., 0., .5, .5, 0., 0.},
@@ -276,9 +250,70 @@
{0., 0., 0., 1., 0., 0., 0., 1.},
{0., 0., .5, .5, 0., 0., .5, .5},
{0., 0., 1., 0., 0., 0., 1., 0.},
- {0., 0., 1., 0., 0., 0., 0., 1.}
+ {0., 0., 1., 0., 0., 0., 0., 1.},
+ {.5, .5, .5, .5, .5, .5, .5, .5},
};
+
+void ActionAlign::do_verb_action(SPDesktop *desktop, int verb)
+{
+ do_action(desktop, verb_to_coeff(verb));
+}
+
+int ActionAlign::verb_to_coeff(int verb) {
+
+ switch (verb) {
+ case SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR:
+ return ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR;
+ break;
+
+ case SP_VERB_ALIGN_HORIZONTAL_LEFT:
+ return ALIGN_HORIZONTAL_LEFT;
+ break;
+
+ case SP_VERB_ALIGN_HORIZONTAL_CENTER:
+ return ALIGN_HORIZONTAL_CENTER;
+ break;
+
+ case SP_VERB_ALIGN_HORIZONTAL_RIGHT:
+ return ALIGN_HORIZONTAL_RIGHT;
+ break;
+
+ case SP_VERB_ALIGN_HORIZONTAL_LEFT_TO_ANCHOR:
+ return ALIGN_HORIZONTAL_LEFT_TO_ANCHOR;
+ break;
+
+ case SP_VERB_ALIGN_VERTICAL_BOTTOM_TO_ANCHOR:
+ return ALIGN_VERTICAL_BOTTOM_TO_ANCHOR;
+ break;
+
+ case SP_VERB_ALIGN_VERTICAL_TOP:
+ return ALIGN_VERTICAL_TOP;
+ break;
+
+ case SP_VERB_ALIGN_VERTICAL_CENTER:
+ return ALIGN_VERTICAL_CENTER;
+ break;
+
+ case SP_VERB_ALIGN_VERTICAL_BOTTOM:
+ return ALIGN_VERTICAL_BOTTOM;
+ break;
+
+ case SP_VERB_ALIGN_VERTICAL_TOP_TO_ANCHOR:
+ return ALIGN_VERTICAL_TOP_TO_ANCHOR;
+ break;
+
+ case SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER:
+ return ALIGN_VERTICAL_HORIZONTAL_CENTER;
+ break;
+
+ default:
+ break;
+ };
+
+ return -1;
+}
+
BBoxSort::BBoxSort(SPItem *pItem, Geom::Rect const &bounds, Geom::Dim2 orientation, double kBegin, double kEnd) :
item(pItem),
bbox (bounds)
@@ -1346,8 +1381,10 @@
return master;
}
-AlignAndDistribute::AlignTarget AlignAndDistribute::getAlignTarget()const {
- return AlignTarget(_combo.get_active_row_number());
+AlignAndDistribute::AlignTarget AlignAndDistribute::getAlignTarget() {
+ //return AlignTarget(_combo.get_active_row_number());
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ return AlignTarget(prefs->getInt("/dialogs/align/align-to", 6));
}
=== modified file 'src/ui/dialog/align-and-distribute.h'
--- src/ui/dialog/align-and-distribute.h 2012-04-17 08:31:13 +0000
+++ src/ui/dialog/align-and-distribute.h 2012-07-23 04:20:31 +0000
@@ -48,7 +48,9 @@
enum AlignTarget { LAST=0, FIRST, BIGGEST, SMALLEST, PAGE, DRAWING, SELECTION };
- AlignTarget getAlignTarget() const;
+
+
+ static AlignTarget getAlignTarget();
#if WITH_GTKMM_3_0
Gtk::Grid &align_table(){return _alignTable;}
@@ -64,7 +66,7 @@
Gtk::Table &nodes_table(){return _nodesTable;}
#endif
- std::list::iterator find_master(std::list &list, bool horizontal);
+ static std::list::iterator find_master(std::list &list, bool horizontal);
void setMode(bool nodeEdit);
Geom::OptRect randomize_bbox;
@@ -138,6 +140,81 @@
};
bool operator< (const BBoxSort &a, const BBoxSort &b);
+
+class Action {
+public :
+
+ Action(const Glib::ustring &id,
+ const Glib::ustring &tiptext,
+ guint row, guint column,
+ #if WITH_GTKMM_3_0
+ Gtk::Grid &parent,
+ #else
+ Gtk::Table &parent,
+ #endif
+ AlignAndDistribute &dialog);
+
+ virtual ~Action(){}
+
+ AlignAndDistribute &_dialog;
+
+private :
+ virtual void on_button_click(){}
+
+ Glib::ustring _id;
+
+#if WITH_GTKMM_3_0
+ Gtk::Grid &_parent;
+#else
+ Gtk::Table &_parent;
+#endif
+};
+
+
+class ActionAlign : public Action {
+public :
+ struct Coeffs {
+ double mx0, mx1, my0, my1;
+ double sx0, sx1, sy0, sy1;
+ };
+ ActionAlign(const Glib::ustring &id,
+ const Glib::ustring &tiptext,
+ guint row, guint column,
+ AlignAndDistribute &dialog,
+ guint coeffIndex):
+ Action(id, tiptext, row, column,
+ dialog.align_table(), dialog),
+ _index(coeffIndex),
+ _dialog(dialog)
+ {}
+
+ /*
+ * Static function called to align from a keyboard shortcut
+ */
+ static void do_verb_action(SPDesktop *desktop, int verb);
+
+private :
+
+
+ virtual void on_button_click() {
+ //Retreive selected objects
+ SPDesktop *desktop = _dialog.getDesktop();
+ if (!desktop) return;
+
+ ActionAlign::do_action(desktop, _index);
+ }
+
+ static void do_action(SPDesktop *desktop, int index);
+ static int verb_to_coeff(int verb);
+
+ guint _index;
+ AlignAndDistribute &_dialog;
+
+ static const Coeffs _allCoeffs[11];
+
+};
+
+
} // namespace Dialog
} // namespace UI
} // namespace Inkscape
=== modified file 'src/verbs.cpp'
--- src/verbs.cpp 2012-07-21 02:19:56 +0000
+++ src/verbs.cpp 2012-07-23 04:20:58 +0000
@@ -66,6 +66,7 @@
#include "sp-namedview.h"
#include "text-chemistry.h"
#include "tools-switch.h"
+#include "ui/dialog/align-and-distribute.h"
#include "ui/dialog/clonetiler.h"
#include "ui/dialog/dialog-manager.h"
#include "ui/dialog/document-properties.h"
@@ -85,6 +86,7 @@
#include
using Inkscape::DocumentUndo;
+using Inkscape::UI::Dialog::ActionAlign;
//#ifdef WITH_INKBOARD
//#include "jabber_whiteboard/session-manager.h"
@@ -1631,6 +1633,19 @@
prefs->setInt("/dialogs/preferences/page", PREFS_PAGE_TOOLS_LPETOOL);
dt->_dlg_mgr->showDialog("InkscapePreferences");
break;
+ case SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR:
+ case SP_VERB_ALIGN_HORIZONTAL_LEFT:
+ case SP_VERB_ALIGN_HORIZONTAL_CENTER:
+ case SP_VERB_ALIGN_HORIZONTAL_RIGHT:
+ case SP_VERB_ALIGN_HORIZONTAL_LEFT_TO_ANCHOR:
+ case SP_VERB_ALIGN_VERTICAL_BOTTOM_TO_ANCHOR:
+ case SP_VERB_ALIGN_VERTICAL_TOP:
+ case SP_VERB_ALIGN_VERTICAL_CENTER:
+ case SP_VERB_ALIGN_VERTICAL_BOTTOM:
+ case SP_VERB_ALIGN_VERTICAL_TOP_TO_ANCHOR:
+ case SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER:
+ ActionAlign::do_verb_action(dt, verb);
+ break;
default:
break;
@@ -2594,7 +2609,6 @@
N_("Open Preferences for the Eraser tool"), NULL),
new ContextVerb(SP_VERB_CONTEXT_LPETOOL_PREFS, "LPEToolPrefs", N_("LPE Tool Preferences"),
N_("Open Preferences for the LPETool tool"), NULL),
-
// Zoom/View
new ZoomVerb(SP_VERB_ZOOM_IN, "ZoomIn", N_("Zoom In"), N_("Zoom in"), INKSCAPE_ICON("zoom-in")),
new ZoomVerb(SP_VERB_ZOOM_OUT, "ZoomOut", N_("Zoom Out"), N_("Zoom out"), INKSCAPE_ICON("zoom-out")),
@@ -2776,6 +2790,32 @@
N_("Link an ICC color profile"), NULL),
new EditVerb(SP_VERB_EDIT_REMOVE_COLOR_PROFILE, "RemoveColorProfile", N_("Remove Color Profile"),
N_("Remove a linked ICC color profile"), NULL),
+
+ // Align
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR, "AlignHorizontalRightToAnchor", N_("Align right edges of objects to the left edge of the anchor"),
+ N_("Align right edges of objects to the left edge of the anchor"), INKSCAPE_ICON("align-horizontal-right-to-anchor")),
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_LEFT, "AlignHorizontalLeft", N_("Align left edges"),
+ N_("Align left edges"), INKSCAPE_ICON("align-horizontal-left")),
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_CENTER, "AlignHorizontalCenter", N_("Center on vertical axis"),
+ N_("Center on vertical axis"), INKSCAPE_ICON("align-horizontal-center")),
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_RIGHT, "AlignHorizontalRight", N_("Align right sides"),
+ N_("Align right sides"), INKSCAPE_ICON("align-horizontal-right")),
+ new ContextVerb(SP_VERB_ALIGN_HORIZONTAL_LEFT_TO_ANCHOR, "AlignHorizontalLeftToAnchor", N_("Align left edges of objects to the right edge of the anchor"),
+ N_("Align left edges of objects to the right edge of the anchor"), INKSCAPE_ICON("align-horizontal-left-to-anchor")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_BOTTOM_TO_ANCHOR, "AlignVerticalBottomToAnchor", N_("Align bottom edges of objects to the top edge of the anchor"),
+ N_("Align bottom edges of objects to the top edge of the anchor"), INKSCAPE_ICON("align-vertical-bottom-to-anchor")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_TOP, "AlignVerticalTop", N_("Align top edges"),
+ N_("Align top edges"), INKSCAPE_ICON("align-vertical-top")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_CENTER, "AlignVerticalCenter", N_("Center on horizontal axis"),
+ N_("Center on horizontal axis"), INKSCAPE_ICON("align-vertical-center")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_BOTTOM, "AlignVerticalBottom", N_("Align bottom edges"),
+ N_("Align bottom edges"), INKSCAPE_ICON("align-vertical-bottom")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_TOP_TO_ANCHOR, "AlignVerticalTopToAnchor", N_("Align top edges of objects to the bottom edge of the anchor"),
+ N_("Align top edges of objects to the bottom edge of the anchor"), INKSCAPE_ICON("align-vertical-top-to-anchor")),
+ new ContextVerb(SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER, "AlignVerticalHorizontalCenter", N_("Center on horizontal and vertical axis"),
+ N_("Center on horizontal and vertical axis"), INKSCAPE_ICON("align-vertical-center")),
+
+
// Footer
new Verb(SP_VERB_LAST, " '\"invalid id", NULL, NULL, NULL)
};
=== modified file 'src/verbs.h'
--- src/verbs.h 2012-07-12 09:42:23 +0000
+++ src/verbs.h 2012-07-22 13:11:25 +0000
@@ -313,6 +313,18 @@
SP_VERB_EDIT_EMBEDDED_SCRIPT,
SP_VERB_EDIT_REMOVE_EXTERNAL_SCRIPT,
SP_VERB_EDIT_REMOVE_EMBEDDED_SCRIPT,
+ /* Alignment */
+ SP_VERB_ALIGN_HORIZONTAL_RIGHT_TO_ANCHOR,
+ SP_VERB_ALIGN_HORIZONTAL_LEFT,
+ SP_VERB_ALIGN_HORIZONTAL_CENTER,
+ SP_VERB_ALIGN_HORIZONTAL_RIGHT,
+ SP_VERB_ALIGN_HORIZONTAL_LEFT_TO_ANCHOR,
+ SP_VERB_ALIGN_VERTICAL_BOTTOM_TO_ANCHOR,
+ SP_VERB_ALIGN_VERTICAL_TOP,
+ SP_VERB_ALIGN_VERTICAL_CENTER,
+ SP_VERB_ALIGN_VERTICAL_BOTTOM,
+ SP_VERB_ALIGN_VERTICAL_TOP_TO_ANCHOR,
+ SP_VERB_ALIGN_VERTICAL_HORIZONTAL_CENTER,
/* Footer */
SP_VERB_LAST
};