diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2007-11-20 09:20:42 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2007-11-20 09:20:42 +0000 |
| commit | c724e396729e2f2482b84bab8a8eee2b01cff987 (patch) | |
| tree | fb2dfedee0a8d448df4c617d9d9d1affc7275522 /src/ui | |
| parent | add one fractional digit to zooms less than 10% (diff) | |
| download | inkscape-c724e396729e2f2482b84bab8a8eee2b01cff987.tar.gz inkscape-c724e396729e2f2482b84bab8a8eee2b01cff987.zip | |
Display CMS adjustment per-desktop view
(bzr r4114)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 44 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.h | 1 |
2 files changed, 15 insertions, 30 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index cd4727973..5d747807b 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -627,22 +627,18 @@ void InkscapePreferences::initPageImportExport() } #if ENABLE_LCMS -static void forceUpdates() { - std::list<SPDesktop*> tops; - inkscape_get_all_desktops( tops ); - for ( std::list<SPDesktop*>::iterator it = tops.begin(); it != tops.end(); ++it ) { - (*it)->requestRedraw(); - } -} - static void profileComboChanged( Gtk::ComboBoxText* combo ) { - Glib::ustring active = combo->get_active_text(); - - Glib::ustring path = get_path_for_profile(active); - if ( !path.empty() ) { - prefs_set_string_attribute( "options.displayprofile", "uri", path.c_str() ); - forceUpdates(); + int rowNum = combo->get_active_row_number(); + if ( rowNum < 1 ) { + prefs_set_string_attribute( "options.displayprofile", "uri", "" ); + } else { + Glib::ustring active = combo->get_active_text(); + + Glib::ustring path = get_path_for_profile(active); + if ( !path.empty() ) { + prefs_set_string_attribute( "options.displayprofile", "uri", path.c_str() ); + } } } @@ -653,7 +649,6 @@ static void proofComboChanged( Gtk::ComboBoxText* combo ) Glib::ustring path = get_path_for_profile(active); if ( !path.empty() ) { prefs_set_string_attribute( "options.softproof", "uri", path.c_str() ); - forceUpdates(); } } @@ -667,7 +662,6 @@ static void gamutColorChanged( Gtk::ColorButton* btn ) { prefs_set_string_attribute( "options.softproof", "gamutcolor", tmp ); g_free(tmp); - forceUpdates(); } #endif // ENABLE_LCMS @@ -685,10 +679,6 @@ void InkscapePreferences::initPageCMS() _page_cms.add_group_header( _("Display Calibration")); - _cms_display.init( _("Enable display calibration"), "options.displayprofile", "enable", false); - _page_cms.add_line( false, "", _cms_display, "", - _("Enables application of the display using an ICC profile."), false); - _page_cms.add_line( false, _("Display profile:"), _cms_display_profile, "", _("The ICC profile to use to calibrate display output."), false); @@ -743,6 +733,8 @@ void InkscapePreferences::initPageCMS() Glib::ustring current = prefs_get_string_attribute( "options.displayprofile", "uri" ); gint index = 0; + _cms_display_profile.append_text(_("<none>")); + index++; for ( std::vector<Glib::ustring>::iterator it = names.begin(); it != names.end(); ++it ) { _cms_display_profile.append_text( *it ); Glib::ustring path = get_path_for_profile(*it); @@ -751,6 +743,9 @@ void InkscapePreferences::initPageCMS() } index++; } + if ( current.empty() ) { + _cms_display_profile.set_active(0); + } names = ::Inkscape::colorprofile_get_softproof_names(); const gchar * tmp = prefs_get_string_attribute( "options.softproof", "uri" ); @@ -766,21 +761,12 @@ void InkscapePreferences::initPageCMS() } } - _cms_display.signal_toggled().connect( sigc::ptr_fun(forceUpdates) ); - _cms_softproof.signal_toggled().connect( sigc::ptr_fun(forceUpdates) ); - _cms_gamutwarn.signal_toggled().connect( sigc::ptr_fun(forceUpdates) ); _cms_gamutcolor.signal_color_set().connect( sigc::bind( sigc::ptr_fun(gamutColorChanged), &_cms_gamutcolor) ); - _cms_proof_blackpoint.signal_toggled().connect( sigc::ptr_fun(forceUpdates) ); - _cms_proof_preserveblack.signal_toggled().connect( sigc::ptr_fun(forceUpdates) ); - - _cms_intent.signal_changed().connect( sigc::ptr_fun(forceUpdates) ); - _cms_proof_intent.signal_changed().connect( sigc::ptr_fun(forceUpdates) ); _cms_display_profile.signal_changed().connect( sigc::bind( sigc::ptr_fun(profileComboChanged), &_cms_display_profile) ); _cms_proof_profile.signal_changed().connect( sigc::bind( sigc::ptr_fun(proofComboChanged), &_cms_proof_profile) ); #else // disable it, but leave it visible - _cms_display.set_sensitive( false ); _cms_intent.set_sensitive( false ); _cms_display_profile.set_sensitive( false ); _cms_softproof.set_sensitive( false ); diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index a6da63617..12a73d017 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -165,7 +165,6 @@ protected: PrefCheckButton _misc_small_tools; PrefCombo _misc_overs_bitmap; - PrefCheckButton _cms_display; Gtk::ComboBoxText _cms_display_profile; PrefCombo _cms_intent; |
