diff --git a/src/interface.cpp b/src/interface.cpp
index c913d1122c44e85f68b770f363de208f73a14137..212a7b9a0b11f1a79706dde6a25d4c9b4c4a7d23 100644 (file)
--- a/src/interface.cpp
+++ b/src/interface.cpp
#include "message-context.h"
// Added for color drag-n-drop
+#if ENABLE_LCMS
+#include "lcms.h"
+#endif // ENABLE_LCMS
#include "display/sp-canvas.h"
#include "color.h"
#include "svg/svg-color.h"
{"image/svg", 0, SVG_DATA},
{"image/png", 0, PNG_DATA},
{"image/jpeg", 0, JPEG_DATA},
+#if ENABLE_LCMS
{"application/x-inkscape-color", 0, APP_X_INKY_COLOR},
+#endif // ENABLE_LCMS
{"application/x-color", 0, APP_X_COLOR}
};
gpointer user_data)
{
switch (info) {
+#if ENABLE_LCMS
case APP_X_INKY_COLOR:
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if ( item )
{
if ( data->length >= 8 ) {
+ cmsHPROFILE srgbProf = cmsCreate_sRGBProfile();
+
gchar c[64] = {0};
// Careful about endian issues.
guint16* dataVals = (guint16*)data->data;
str = 0;
sp_object_setAttribute( SP_OBJECT(item),
- (drag_context->action != GDK_ACTION_MOVE) ? "HOTFill":"HOTStroke",
+ (drag_context->action != GDK_ACTION_MOVE) ? "inkscape:x-fill-tag":"inkscape:x-stroke-tag",
palName.c_str(),
false );
item->updateRepr();
SPDocument *doc = SP_ACTIVE_DOCUMENT;
sp_document_done( doc );
+
+ if ( srgbProf ) {
+ cmsCloseProfile( srgbProf );
+ }
}
}
}
break;
+#endif // ENABLE_LCMS
case APP_X_COLOR:
{