summaryrefslogtreecommitdiffstats
path: root/src/color-profile.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-11-23 23:36:49 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-11-23 23:36:49 +0000
commit0969085ddf607a7a98cf7fd6d9b10da5fbebe62d (patch)
tree59b2bc9ed3412ab2de4c703ef30342dfe2401704 /src/color-profile.cpp
parentrefactor from lastApplied (diff)
parentFixed a bug pointed by suv running from comand line, also removed another des... (diff)
downloadinkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.tar.gz
inkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.zip
fixing to trunk
(bzr r12588.1.34)
Diffstat (limited to 'src/color-profile.cpp')
-rw-r--r--src/color-profile.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index ed4b9029e..28550b75d 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -19,6 +19,7 @@
#include <gtk/gtk.h>
#endif // DEBUG_LCMS
+#include <unistd.h>
#include <cstring>
#include <string>
#include <io/sys.h>
@@ -322,17 +323,15 @@ void ColorProfile::set(unsigned key, gchar const *value) {
}
//# 1. Get complete URI of document
gchar const *docbase = doc->getURI();
- if (!docbase)
- {
- // Normal for files that have not yet been saved.
- docbase = "";
- }
gchar* escaped = g_uri_escape_string(this->href, "!*'();:@=+$,/?#[]", TRUE);
//g_message("docbase:%s\n", docbase);
//org::w3c::dom::URI docUri(docbase);
- Inkscape::URI docUri(docbase);
+ Inkscape::URI docUri("");
+ if (docbase) { // The file has already been saved
+ docUri = Inkscape::URI::from_native_filename(docbase);
+ }
//# 2. Get href of icc file. we don't care if it's rel or abs
//org::w3c::dom::URI hrefUri(escaped);
@@ -912,7 +911,7 @@ Glib::ustring getNameFromProfile(cmsHPROFILE profile)
if ( name && !g_utf8_validate(name, -1, NULL) ) {
name = _("(invalid UTF-8 string)");
}
- nameStr = (name) ? name : _("None");
+ nameStr = (name) ? name : C_("Profile name", "None");
#elif HAVE_LIBLCMS2
cmsUInt32Number byteLen = cmsGetProfileInfo(profile, cmsInfoDescription, "en", "US", NULL, 0);
if (byteLen > 0) {