From cff2447d07a2c5f04834bd5d97ef96dc1cdb0d3c Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Wed, 26 Sep 2007 03:58:51 +0000 Subject: Added display profile calibration (bzr r3804) --- src/ui/dialog/inkscape-preferences.cpp | 26 ++++++++++++++++++++++++++ src/ui/dialog/inkscape-preferences.h | 4 ++++ 2 files changed, 30 insertions(+) (limited to 'src/ui') diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 138f36c29..7ee381bff 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -627,14 +627,40 @@ void InkscapePreferences::initPageImportExport() this->AddPage(_page_importexport, _("Import/Export"), PREFS_PAGE_IMPORTEXPORT); } +#if ENABLE_LCMS +static void forceUpdates() { + std::list tops; + inkscape_get_all_desktops( tops ); + for ( std::list::iterator it = tops.begin(); it != tops.end(); ++it ) { + (*it)->requestRedraw(); + } +} +#endif // ENABLE_LCMS + void InkscapePreferences::initPageMisc() { _misc_comment.init( _("Add label comments to printing output"), "printing.debug", "show-label-comments", false); _page_misc.add_line( false, "", _misc_comment, "", _("When on, a comment will be added to the raw print output, marking the rendered output for an object with its label"), true); + _misc_small_toolbar.init( _("Make commands toolbar smaller"), "toolbox", "small", true); _page_misc.add_line( false, "", _misc_small_toolbar, "", _("Make the commands toolbar use the 'secondary' toolbar size (requires restart)"), true); + + _misc_cms_display.init( _("Enable display calibration"), "options.displayprofile", "enable", false); + _page_misc.add_line( false, "", _misc_cms_display, "", + _("Enables application of the display using an ICC profile."), true); + _misc_cms_display_profile.init("options.displayprofile", "uri", true); + _page_misc.add_line( false, _("Display profile:"), _misc_cms_display_profile, "", + _("The ICC profile to use to calibrate display output."), true); +#if ENABLE_LCMS + _misc_cms_display.signal_toggled().connect( sigc::ptr_fun(forceUpdates) ); +#else + // disable it, but leave it visible + _misc_cms_display.set_sensitive( false ); + _misc_cms_display_profile.set_sensitive( false ); +#endif // ENABLE_LCMS + _misc_recent.init("options.maxrecentdocuments", "value", 0.0, 1000.0, 1.0, 1.0, 1.0, true, false); _page_misc.add_line( false, _("Max recent documents:"), _misc_recent, "", _("The maximum length of the Open Recent list in the File menu"), false); diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index 6798de21d..03ed72f63 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -161,6 +161,10 @@ protected: PrefCheckButton _importexport_imp_bitmap, _misc_comment, _misc_scripts; PrefCheckButton _misc_small_toolbar; PrefCombo _misc_overs_bitmap; + + PrefCheckButton _misc_cms_display; + PrefEntry _misc_cms_display_profile; + PrefEntryButtonHBox _importexport_ocal_url; PrefEntry _importexport_ocal_username; PrefEntry _importexport_ocal_password; -- cgit v1.2.3