diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2013-09-19 02:05:00 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2013-09-19 02:05:00 +0000 |
| commit | f6e99d7d1b76dd7a7933f55ba095bdcb534f81b3 (patch) | |
| tree | cbee5d1eec2e1afe8c3f8033d528cab4504c3c49 /src/interface.cpp | |
| parent | Encapsulate the shared memory hack for Cairo and GdkPixbuf in a class (diff) | |
| parent | Added gpl notice (diff) | |
| download | inkscape-f6e99d7d1b76dd7a7933f55ba095bdcb534f81b3.tar.gz inkscape-f6e99d7d1b76dd7a7933f55ba095bdcb534f81b3.zip | |
Merge C++ification of the SP tree by Markus Engel
(bzr r12532)
Diffstat (limited to 'src/interface.cpp')
| -rw-r--r-- | src/interface.cpp | 77 |
1 files changed, 50 insertions, 27 deletions
diff --git a/src/interface.cpp b/src/interface.cpp index 026890c67..63d507f3e 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) |
