diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2016-07-28 15:16:18 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2016-07-28 15:16:18 +0000 |
| commit | dcd91f59f597ab4af07cee5929ce0e2e1f9104d5 (patch) | |
| tree | 2cf4e55d031d71cc18a213d76d15a4a5a8128fe5 /src/color-profile.cpp | |
| parent | ui/widgets: Drop GTK2 fallbacks (diff) | |
| download | inkscape-dcd91f59f597ab4af07cee5929ce0e2e1f9104d5.tar.gz inkscape-dcd91f59f597ab4af07cee5929ce0e2e1f9104d5.zip | |
Drop remaining GTKMM 2 fallback support
(bzr r15023.2.7)
Diffstat (limited to 'src/color-profile.cpp')
| -rw-r--r-- | src/color-profile.cpp | 45 |
1 files changed, 7 insertions, 38 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp index aea9ccab0..031d3f6f5 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -4,11 +4,7 @@ #define noDEBUG_LCMS -#if WITH_GTKMM_3_0 -# include <gdkmm/rgba.h> -#else -# include <gdkmm/color.h> -#endif +#include <gdkmm/rgba.h> #include <glibmm/checksum.h> #include <glib/gstdio.h> @@ -1002,11 +998,7 @@ void loadProfiles() static bool gamutWarn = false; -#if WITH_GTKMM_3_0 static Gdk::RGBA lastGamutColor("#808080"); -#else -static Gdk::Color lastGamutColor("#808080"); -#endif static bool lastBPC = false; #if defined(cmsFLAGS_PRESERVEBLACK) @@ -1152,12 +1144,7 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayTransform() bool preserveBlack = prefs->getBool( "/options/softproof/preserveblack"); #endif //defined(cmsFLAGS_PRESERVEBLACK) Glib::ustring colorStr = prefs->getString("/options/softproof/gamutcolor"); - -#if WITH_GTKMM_3_0 Gdk::RGBA gamutColor( colorStr.empty() ? "#808080" : colorStr ); -#else - Gdk::Color gamutColor( colorStr.empty() ? "#808080" : colorStr ); -#endif if ( (warn != gamutWarn) || (lastIntent != intent) @@ -1189,15 +1176,9 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayTransform() if ( gamutWarn ) { dwFlags |= cmsFLAGS_GAMUTCHECK; -#if WITH_GTKMM_3_0 - gushort gamutColor_r = gamutColor.get_red_u(); - gushort gamutColor_g = gamutColor.get_green_u(); - gushort gamutColor_b = gamutColor.get_blue_u(); -#else - gushort gamutColor_r = gamutColor.get_red(); - gushort gamutColor_g = gamutColor.get_green(); - gushort gamutColor_b = gamutColor.get_blue(); -#endif + auto gamutColor_r = gamutColor.get_red_u(); + auto gamutColor_g = gamutColor.get_green_u(); + auto gamutColor_b = gamutColor.get_blue_u(); #if HAVE_LIBLCMS1 cmsSetAlarmCodes(gamutColor_r >> 8, gamutColor_g >> 8, gamutColor_b >> 8); @@ -1338,12 +1319,7 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayPer( Glib::ustring const& id ) bool preserveBlack = prefs->getBool( "/options/softproof/preserveblack"); #endif //defined(cmsFLAGS_PRESERVEBLACK) Glib::ustring colorStr = prefs->getString("/options/softproof/gamutcolor"); - -#if WITH_GTKMM_3_0 Gdk::RGBA gamutColor( colorStr.empty() ? "#808080" : colorStr ); -#else - Gdk::Color gamutColor( colorStr.empty() ? "#808080" : colorStr ); -#endif if ( (warn != gamutWarn) || (lastIntent != intent) @@ -1373,16 +1349,9 @@ cmsHTRANSFORM Inkscape::CMSSystem::getDisplayPer( Glib::ustring const& id ) cmsUInt32Number dwFlags = cmsFLAGS_SOFTPROOFING; if ( gamutWarn ) { dwFlags |= cmsFLAGS_GAMUTCHECK; - -#if WITH_GTKMM_3_0 - gushort gamutColor_r = gamutColor.get_red_u(); - gushort gamutColor_g = gamutColor.get_green_u(); - gushort gamutColor_b = gamutColor.get_blue_u(); -#else - gushort gamutColor_r = gamutColor.get_red(); - gushort gamutColor_g = gamutColor.get_green(); - gushort gamutColor_b = gamutColor.get_blue(); -#endif + auto gamutColor_r = gamutColor.get_red_u(); + auto gamutColor_g = gamutColor.get_green_u(); + auto gamutColor_b = gamutColor.get_blue_u(); #if HAVE_LIBLCMS1 cmsSetAlarmCodes(gamutColor_r >> 8, gamutColor_g >> 8, gamutColor_b >> 8); |
