summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorKarl Cheng <qantas94heavy@gmail.com>2019-05-10 07:56:07 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2019-05-12 12:45:27 +0000
commite6ad8433954db069908bac240f39911fc32e5025 (patch)
treee655e16ddc932b6e936ca8ff85626ee5c0fdf023 /src/widgets
parentrename to avoid name clashes. (diff)
downloadinkscape-e6ad8433954db069908bac240f39911fc32e5025.tar.gz
inkscape-e6ad8433954db069908bac240f39911fc32e5025.zip
Remove support for LCMS 1
Now that all platforms (including macOS) now support LCMS 2, we no longer need to support LCMS 1. Fixes: https://bugs.launchpad.net/inkscape/+bug/1133014
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/desktop-widget.cpp36
-rw-r--r--src/widgets/desktop-widget.h2
2 files changed, 19 insertions, 19 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index a50427c09..40bada366 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -165,7 +165,7 @@ private:
friend class SoftproofWatcher;
};
-#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#if defined(HAVE_LIBLCMS2)
void CMSPrefWatcher::hook(EgeColorProfTracker * /*tracker*/, gint monitor, CMSPrefWatcher * /*watcher*/)
{
unsigned char* buf = nullptr;
@@ -178,22 +178,22 @@ void CMSPrefWatcher::hook(EgeColorProfTracker * /*tracker*/, gint monitor, CMSPr
void CMSPrefWatcher::hook(EgeColorProfTracker * /*tracker*/, gint /*monitor*/, CMSPrefWatcher * /*watcher*/)
{
}
-#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#endif // defined(HAVE_LIBLCMS2)
/// @todo Use conditional compilation in saner places. The whole PrefWatcher
-/// object is unnecessary if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) is not defined.
+/// object is unnecessary if defined(HAVE_LIBLCMS2) is not defined.
void CMSPrefWatcher::_refreshAll()
{
-#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#if defined(HAVE_LIBLCMS2)
for (auto & it : _widget_list) {
it->requestCanvasUpdate();
}
-#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#endif // defined(HAVE_LIBLCMS2)
}
void CMSPrefWatcher::_setCmsSensitive(bool enabled)
{
-#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#if defined(HAVE_LIBLCMS2)
for ( auto dtw : _widget_list ) {
auto cms_adj = dtw->get_cms_adjust();
if ( cms_adj->get_sensitive() != enabled ) {
@@ -202,7 +202,7 @@ void CMSPrefWatcher::_setCmsSensitive(bool enabled)
}
#else
(void) enabled;
-#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#endif // defined(HAVE_LIBLCMS2)
}
static CMSPrefWatcher* watcher = nullptr;
@@ -455,7 +455,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
tip ));
dtw->_cms_adjust->set_name("CMS_Adjust");
-#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#if defined(HAVE_LIBLCMS2)
{
Glib::ustring current = prefs->getString("/options/displayprofile/uri");
bool enabled = current.length() > 0;
@@ -470,7 +470,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
g_signal_connect_after( G_OBJECT(dtw->_cms_adjust->gobj()), "clicked", G_CALLBACK(SPDesktopWidget::cms_adjust_toggled), dtw );
#else
dtw->cms_adjust_set_sensitive(false);
-#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#endif // defined(HAVE_LIBLCMS2)
dtw->_canvas_tbl->attach(*dtw->_cms_adjust, 2, 2, 1, 1);
{
@@ -481,9 +481,9 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
}
/* Canvas */
dtw->_canvas = SP_CANVAS(SPCanvas::createAA());
-#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#if defined(HAVE_LIBLCMS2)
dtw->_canvas->_enable_cms_display_adj = prefs->getBool("/options/displayprofile/enable");
-#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#endif // defined(HAVE_LIBLCMS2)
gtk_widget_set_can_focus (GTK_WIDGET (dtw->_canvas), TRUE);
sp_ruler_add_track_widget(SP_RULER(dtw->_hruler->gobj()), GTK_WIDGET(dtw->_canvas));
@@ -667,7 +667,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
// --------------- Color Management ---------------- //
dtw->_tracker = ege_color_prof_tracker_new(GTK_WIDGET(dtw->layer_selector->gobj()));
-#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#if defined(HAVE_LIBLCMS2)
bool fromDisplay = prefs->getBool( "/options/displayprofile/from_display");
if ( fromDisplay ) {
Glib::ustring id = Inkscape::CMSSystem::getDisplayId( 0 );
@@ -678,7 +678,7 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw )
dtw->cms_adjust_set_sensitive(enabled);
}
g_signal_connect( G_OBJECT(dtw->_tracker), "changed", G_CALLBACK(SPDesktopWidget::color_profile_event), dtw );
-#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#endif // defined(HAVE_LIBLCMS2)
// ------------------ Finish Up -------------------- //
dtw->_vbox->show_all();
@@ -982,7 +982,7 @@ SPDesktopWidget::event(GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dtw)
}
-#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#if defined(HAVE_LIBLCMS2)
void
SPDesktopWidget::color_profile_event(EgeColorProfTracker */*tracker*/, SPDesktopWidget *dtw)
{
@@ -1016,11 +1016,11 @@ SPDesktopWidget::color_profile_event(EgeColorProfTracker */*tracker*/, SPDesktop
enabled = !dtw->_canvas->_cms_key.empty();
dtw->cms_adjust_set_sensitive(enabled);
}
-#else // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#else // defined(HAVE_LIBLCMS2)
void sp_dtw_color_profile_event(EgeColorProfTracker */*tracker*/, SPDesktopWidget * /*dtw*/)
{
}
-#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#endif // defined(HAVE_LIBLCMS2)
void
SPDesktopWidget::update_guides_lock()
@@ -1042,7 +1042,7 @@ SPDesktopWidget::update_guides_lock()
}
}
-#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#if defined(HAVE_LIBLCMS2)
void
SPDesktopWidget::cms_adjust_toggled( GtkWidget */*button*/, gpointer data )
{
@@ -1061,7 +1061,7 @@ SPDesktopWidget::cms_adjust_toggled( GtkWidget */*button*/, gpointer data )
}
}
}
-#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#endif // defined(HAVE_LIBLCMS2)
void
SPDesktopWidget::cms_adjust_set_sensitive(bool enabled)
diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h
index 141d6b057..f0b42222d 100644
--- a/src/widgets/desktop-widget.h
+++ b/src/widgets/desktop-widget.h
@@ -321,7 +321,7 @@ public:
void rotation_populate_popup(Gtk::Menu *menu);
void canvas_tbl_size_allocate(Gtk::Allocation &allocation);
-#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
+#if defined(HAVE_LIBLCMS2)
static void cms_adjust_toggled( GtkWidget *button, gpointer data );
static void color_profile_event(EgeColorProfTracker *tracker, SPDesktopWidget *dtw);
#endif