summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/color-profile.cpp23
-rw-r--r--src/display/sp-canvas.cpp6
-rw-r--r--src/selection-chemistry.cpp2
-rw-r--r--src/style.cpp2
-rw-r--r--src/widgets/eek-preview.cpp4
5 files changed, 27 insertions, 10 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index e6a9ac71c..f0a06f73b 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -4,7 +4,12 @@
#define noDEBUG_LCMS
-#include <gdkmm/color.h>
+#if WITH_GTKMM_3_0
+# include <gdkmm/rgba.h>
+#else
+# include <gdkmm/color.h>
+#endif
+
#include <glibmm/checksum.h>
#include <glib/gstdio.h>
#include <fcntl.h>
@@ -973,7 +978,13 @@ void loadProfiles()
} // namespace
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)
static bool lastPreserveBlack = false;
@@ -1118,7 +1129,12 @@ 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)
@@ -1288,7 +1304,12 @@ 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)
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index 9adb96642..455f628bc 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -2301,8 +2301,6 @@ int SPCanvasImpl::do_update(SPCanvas *canvas)
gint SPCanvasImpl::idle_handler(gpointer data)
{
- GDK_THREADS_ENTER ();
-
SPCanvas *canvas = SP_CANVAS (data);
int const ret = do_update (canvas);
@@ -2312,15 +2310,13 @@ gint SPCanvasImpl::idle_handler(gpointer data)
canvas->idle_id = 0;
}
- GDK_THREADS_LEAVE ();
-
return !ret;
}
void SPCanvasImpl::add_idle(SPCanvas *canvas)
{
if (canvas->idle_id == 0) {
- canvas->idle_id = g_idle_add_full(UPDATE_PRIORITY, idle_handler, canvas, NULL);
+ canvas->idle_id = gdk_threads_add_idle_full(UPDATE_PRIORITY, idle_handler, canvas, NULL);
}
}
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 5463c3f94..c5169fff5 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -785,7 +785,7 @@ void sp_selection_ungroup(Inkscape::Selection *selection, SPDesktop *desktop)
SPItem *group = static_cast<SPItem *>(i->data);
// when ungrouping cloned groups with their originals, some objects that were selected may no more exist due to unlinking
- if (!SP_IS_OBJECT(group)) {
+ if (!SP_IS_OBJECT(group) || !group->getRepr()) {
continue;
}
diff --git a/src/style.cpp b/src/style.cpp
index bea56e7b1..c581fde7b 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -2469,9 +2469,7 @@ sp_style_set_ipaint_to_uri(SPStyle *style, SPIPaint *paint, const Inkscape::URI
if (paint->value.href->getObject()){
paint->value.href->detach();
}
- }
- if (paint->value.href) {
try {
paint->value.href->attach(*uri);
} catch (Inkscape::BadURIException &e) {
diff --git a/src/widgets/eek-preview.cpp b/src/widgets/eek-preview.cpp
index 988aa2453..19dbb04ab 100644
--- a/src/widgets/eek-preview.cpp
+++ b/src/widgets/eek-preview.cpp
@@ -245,12 +245,14 @@ gboolean eek_preview_draw(GtkWidget *widget,
GtkAllocation allocation;
gtk_widget_get_allocation(widget, &allocation);
-
+
+#if !GTK_CHECK_VERSION(3,0,0)
GdkColor fg = { 0,
static_cast<guint16>(priv->r),
static_cast<guint16>(priv->g),
static_cast<guint16>(priv->b)
};
+#endif
gint insetTop = 0, insetBottom = 0;
gint insetLeft = 0, insetRight = 0;