diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-09-19 22:33:11 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-09-19 22:33:11 +0000 |
| commit | 4bda89e32e33c7bdff5d3ea3c1ceee1f806de9f7 (patch) | |
| tree | caeb924426bcc861badc6fa81318b67460b26d47 /src/interface.cpp | |
| parent | Update to trunk (diff) | |
| parent | updates for cmake (diff) | |
| download | inkscape-4bda89e32e33c7bdff5d3ea3c1ceee1f806de9f7.tar.gz inkscape-4bda89e32e33c7bdff5d3ea3c1ceee1f806de9f7.zip | |
Update to trunk
(bzr r11950.1.141)
Diffstat (limited to 'src/interface.cpp')
| -rw-r--r-- | src/interface.cpp | 92 |
1 files changed, 65 insertions, 27 deletions
diff --git a/src/interface.cpp b/src/interface.cpp index 026890c67..ea5eaf16a 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -47,7 +47,6 @@ #include "widgets/desktop-widget.h" #include "sp-item-group.h" #include "sp-text.h" -#include "sp-gradient-fns.h" #include "sp-gradient.h" #include "sp-flowtext.h" #include "sp-namedview.h" @@ -1607,32 +1606,56 @@ void ContextMenu::AppendItemFromVerb(Inkscape::Verb *verb)//, SPDesktop *view)// void ContextMenu::MakeObjectMenu(void) { - GObjectClass *klass = G_OBJECT_GET_CLASS(_object); //to deduce the object's type from its class - - if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_ITEM)) - { - MakeItemMenu (); - } - if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_GROUP)) - { - MakeGroupMenu(); - } - if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_ANCHOR)) - { - MakeAnchorMenu(); - } - if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_IMAGE)) - { - MakeImageMenu(); - } - if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_SHAPE)) - { - MakeShapeMenu(); - } - if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_TEXT)) - { - MakeTextMenu(); - } +// GObjectClass *klass = G_OBJECT_GET_CLASS(_object); //to deduce the object's type from its class +// +// if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_ITEM)) +// { +// MakeItemMenu (); +// } +// if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_GROUP)) +// { +// MakeGroupMenu(); +// } +// if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_ANCHOR)) +// { +// MakeAnchorMenu(); +// } +// if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_IMAGE)) +// { +// MakeImageMenu(); +// } +// if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_SHAPE)) +// { +// MakeShapeMenu(); +// } +// if (G_TYPE_CHECK_CLASS_TYPE(klass, SP_TYPE_TEXT)) +// { +// MakeTextMenu(); +// } + + if (SP_IS_ITEM(_object)) { + MakeItemMenu(); + } + + if (SP_IS_GROUP(_object)) { + MakeGroupMenu(); + } + + if (SP_IS_ANCHOR(_object)) { + MakeAnchorMenu(); + } + + if (SP_IS_IMAGE(_object)) { + MakeImageMenu(); + } + + if (SP_IS_SHAPE(_object)) { + MakeShapeMenu(); + } + + if (SP_IS_TEXT(_object)) { + MakeTextMenu(); + } } void ContextMenu::MakeItemMenu (void) @@ -1986,6 +2009,15 @@ void ContextMenu::MakeImageMenu (void) mi->set_sensitive(FALSE); } + /* Trace Pixel Art */ + mi = manage(new Gtk::MenuItem(_("Trace Pixel Art"),1)); + mi->signal_activate().connect(sigc::mem_fun(*this, &ContextMenu::ImageTracePixelArt)); + mi->show(); + insert(*mi,positionOfLastDialog++); + if (_desktop->selection->isEmpty()) { + mi->set_sensitive(FALSE); + } + /* Embed image */ if (Inkscape::Verb::getbyid( "org.ekips.filter.embedselectedimages" )) { mi = manage(new Gtk::MenuItem(C_("Context menu", "Embed Image"))); @@ -2103,6 +2135,12 @@ void ContextMenu::ImageTraceBitmap(void) _desktop->_dlg_mgr->showDialog("Trace"); } +void ContextMenu::ImageTracePixelArt(void) +{ + inkscape_dialogs_unhide(); + _desktop->_dlg_mgr->showDialog("PixelArt"); +} + void ContextMenu::ImageEmbed(void) { if (_desktop->selection->isEmpty()) { |
