summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/objects.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-02 21:29:52 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-03-02 21:29:52 +0000
commit8830d1ad5ab0693313d760cc99e2df0f35c9f6d9 (patch)
treefa4a009d301ce0558041dd2e019e86c23981aa52 /src/ui/dialog/objects.cpp
parentAttempt at merging certaing features of Ponyscape to trunk (will not link) (diff)
downloadinkscape-8830d1ad5ab0693313d760cc99e2df0f35c9f6d9.tar.gz
inkscape-8830d1ad5ab0693313d760cc99e2df0f35c9f6d9.zip
Updated to include (non-functional) Objects dialogue
(bzr r13090.1.6)
Diffstat (limited to 'src/ui/dialog/objects.cpp')
-rw-r--r--src/ui/dialog/objects.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp
index 5023a8813..ebfa16f02 100644
--- a/src/ui/dialog/objects.cpp
+++ b/src/ui/dialog/objects.cpp
@@ -37,6 +37,7 @@
#include "ui/widget/insertordericon.h"
#include "ui/widget/clipmaskicon.h"
#include "ui/widget/highlight-picker.h"
+#include "ui/tools/node-tool.h"
#include "verbs.h"
#include "widgets/icon.h"
#include "xml/node.h"
@@ -54,6 +55,7 @@
#include "sp-clippath.h"
#include "sp-mask.h"
#include "layer-manager.h"
+#include "tools-switch.h"
//#define DUMP_LAYERS 1
@@ -2037,6 +2039,9 @@ void ObjectsPanel::setDesktop( SPDesktop* desktop )
} //namespace UI
} //namespace Inkscape
+//should be okay to put these here because they are never referenced anywhere else
+using namespace Inkscape::UI::Tools;
+
guint get_group0_keyval(GdkEventKey *event) {
guint keyval = 0;
gdk_keymap_translate_keyboard_state(gdk_keymap_get_for_display(
@@ -2046,6 +2051,42 @@ guint get_group0_keyval(GdkEventKey *event) {
return keyval;
}
+void SPItem::setHighlightColor(guint32 const color)
+{
+ g_free(_highlightColor);
+ if (color & 0x000000ff)
+ {
+ _highlightColor = g_strdup_printf("%u", color);
+ }
+ else
+ {
+ _highlightColor = NULL;
+ }
+
+ NodeTool *tool = 0;
+ if (SP_ACTIVE_DESKTOP ) {
+ ToolBase *ec = SP_ACTIVE_DESKTOP->event_context;
+ if (INK_IS_NODE_TOOL(ec)) {
+ tool = static_cast<NodeTool*>(ec);
+ tools_switch(tool->desktop, TOOLS_NODES);
+ }
+ }
+}
+
+void SPItem::unsetHighlightColor()
+{
+ g_free(_highlightColor);
+ _highlightColor = NULL;
+ NodeTool *tool = 0;
+ if (SP_ACTIVE_DESKTOP ) {
+ ToolBase *ec = SP_ACTIVE_DESKTOP->event_context;
+ if (INK_IS_NODE_TOOL(ec)) {
+ tool = static_cast<NodeTool*>(ec);
+ tools_switch(tool->desktop, TOOLS_NODES);
+ }
+ }
+}
+
/*
Local Variables:
mode:c++