summaryrefslogtreecommitdiffstats
path: root/src/color-profile.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2013-08-29 21:06:10 +0000
committer~suv <suv-sf@users.sourceforge.net>2013-08-29 21:06:10 +0000
commit4d331e73a76dce7d703716093923ca01b3cc5936 (patch)
treeb444657ba269b25f60684e66858a138b74fe240d /src/color-profile.cpp
parentFix compiler warnings (diff)
parentUpdating outdated test. Fixes bug #1202271. (diff)
downloadinkscape-4d331e73a76dce7d703716093923ca01b3cc5936.tar.gz
inkscape-4d331e73a76dce7d703716093923ca01b3cc5936.zip
merge from trunk (r12487)
(bzr r11668.1.75)
Diffstat (limited to 'src/color-profile.cpp')
-rw-r--r--src/color-profile.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index 5fb84d8ac..01e6d7062 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -5,6 +5,7 @@
#define noDEBUG_LCMS
#include <gdkmm/color.h>
+#include <glibmm/checksum.h>
#include <glib/gstdio.h>
#include <fcntl.h>
#include <glib/gi18n.h>
@@ -41,7 +42,6 @@
#include "preferences.h"
#include "dom/uri.h"
-#include "dom/util/digest.h"
#ifdef WIN32
#include <icm.h>
@@ -1285,8 +1285,6 @@ Glib::ustring Inkscape::CMSSystem::getDisplayId( int screen, int monitor )
Glib::ustring Inkscape::CMSSystem::setDisplayPer( gpointer buf, guint bufLen, int screen, int monitor )
{
- Glib::ustring id;
-
while ( static_cast<int>(perMonitorProfiles.size()) <= screen ) {
std::vector<MemProfile> tmp;
perMonitorProfiles.push_back(tmp);
@@ -1302,11 +1300,13 @@ Glib::ustring Inkscape::CMSSystem::setDisplayPer( gpointer buf, guint bufLen, in
cmsCloseProfile( item.hprof );
item.hprof = 0;
}
- id.clear();
+
+ Glib::ustring id;
if ( buf && bufLen ) {
- id = Digest::hashHex(Digest::HASH_MD5,
- reinterpret_cast<unsigned char*>(buf), bufLen);
+ gsize len = bufLen; // len is an inout parameter
+ id = Glib::Checksum::compute_checksum(Glib::Checksum::CHECKSUM_MD5,
+ reinterpret_cast<guchar*>(buf), len);
// Note: if this is not a valid profile, item.hprof will be set to null.
item.hprof = cmsOpenProfileFromMem(buf, bufLen);