summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2008-11-27 09:58:19 +0000
committerjoncruz <joncruz@users.sourceforge.net>2008-11-27 09:58:19 +0000
commited8347592a5a7ec2ce61af61ee9baf133b7ae10f (patch)
treeb93720405639ddc34fe178015925dbf89a1ec811 /src
parentplease don't forget to update Makefile_insert (diff)
downloadinkscape-ed8347592a5a7ec2ce61af61ee9baf133b7ae10f.tar.gz
inkscape-ed8347592a5a7ec2ce61af61ee9baf133b7ae10f.zip
List color profile search locations in preference tooltip
(bzr r6908)
Diffstat (limited to 'src')
-rw-r--r--src/color-profile.cpp8
-rw-r--r--src/color-profile.h1
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp17
3 files changed, 24 insertions, 2 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index fbfa8efb1..2aec6c2f0 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -562,7 +562,7 @@ Glib::ustring Inkscape::get_path_for_profile(Glib::ustring const& name)
return result;
}
-static void findThings() {
+std::list<gchar *> ColorProfile::getProfileDirs() {
std::list<gchar *> sources;
gchar* base = profile_path("XXX");
@@ -584,6 +584,12 @@ static void findThings() {
sources.push_back(g_build_filename(dataDirs[i], "color", "icc", NULL));
}
+ return sources;
+}
+
+static void findThings() {
+ std::list<gchar *> sources = ColorProfile::getProfileDirs();
+
while (!sources.empty()) {
gchar *dirname = sources.front();
if ( g_file_test( dirname, G_FILE_TEST_EXISTS ) && g_file_test( dirname, G_FILE_TEST_IS_DIR ) ) {
diff --git a/src/color-profile.h b/src/color-profile.h
index 7fbc7812e..0c4ec8e09 100644
--- a/src/color-profile.h
+++ b/src/color-profile.h
@@ -34,6 +34,7 @@ struct ColorProfile : public SPObject {
#if ENABLE_LCMS
static cmsHPROFILE getSRGBProfile();
+ static std::list<gchar *> getProfileDirs();
icColorSpaceSignature getColorSpace() const {return _profileSpace;}
icProfileClassSignature getProfileClass() const {return _profileClass;}
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index e680115fe..cfca21247 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -39,6 +39,7 @@
#include "display/nr-filter-gaussian.h"
#include "display/nr-filter-types.h"
#include "color-profile-fns.h"
+#include "color-profile.h"
#include "display/canvas-grid.h"
namespace Inkscape {
@@ -815,8 +816,22 @@ void InkscapePreferences::initPageCMS()
_page_cms.add_group_header( _("Display adjustment"));
+ Glib::ustring tmpStr;
+ std::list<gchar *> sources = ColorProfile::getProfileDirs();
+ while (!sources.empty()) {
+ gchar* dirname = sources.front();
+ gchar* part = g_strdup_printf("\n%s", dirname);
+ tmpStr += part;
+ g_free(part);
+ g_free(dirname);
+ sources.pop_front();
+ }
+
+ gchar* profileTip = g_strdup_printf(_("The ICC profile to use to calibrate display output.\nSearched directories:%s"), tmpStr.c_str());
_page_cms.add_line( false, _("Display profile:"), _cms_display_profile, "",
- _("The ICC profile to use to calibrate display output."), false);
+ profileTip, false);
+ g_free(profileTip);
+ profileTip = 0;
_cms_from_display.init( _("Retrieve profile from display"), "/options/displayprofile/from_display", false);
_page_cms.add_line( false, "", _cms_from_display, "",