From 8443720ce6429b9beec839e60b8a808595f4ba72 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Tue, 2 Apr 2013 23:01:45 +0200 Subject: Cleaned up a bit. Uses some C++11 features. (bzr r11608.1.72) --- src/interface.cpp | 76 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 26 deletions(-) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index 986d3107f..ab1e550a3 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -1701,32 +1701,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) -- cgit v1.2.3 From b0cc47554b385fb68643d07efe6e42366c7121ad Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 6 Apr 2013 01:36:16 +0200 Subject: Merged PaintServer and subclasses; moved Gradient classes to own files. (bzr r11608.1.82) --- src/interface.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/interface.cpp') diff --git a/src/interface.cpp b/src/interface.cpp index ab1e550a3..3f480d5e8 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" -- cgit v1.2.3