summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-12-08 07:13:41 +0000
committerJon A. Cruz <jon@joncruz.org>2010-12-08 07:13:41 +0000
commit839cd59ddc7b6ee31f5bfacd6b4d2eadaba5ef7e (patch)
tree1eccf62ad3af220240006b14cdb4ddff44f49c81
parentWorkaround for GTK not scaling the color wheel to match available space. (diff)
downloadinkscape-839cd59ddc7b6ee31f5bfacd6b4d2eadaba5ef7e.tar.gz
inkscape-839cd59ddc7b6ee31f5bfacd6b4d2eadaba5ef7e.zip
Fix version check for wheel selector.
(bzr r9943)
-rw-r--r--src/widgets/sp-color-wheel-selector.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/sp-color-wheel-selector.cpp b/src/widgets/sp-color-wheel-selector.cpp
index 784dd23ad..2e36a024e 100644
--- a/src/widgets/sp-color-wheel-selector.cpp
+++ b/src/widgets/sp-color-wheel-selector.cpp
@@ -135,12 +135,14 @@ static void resizeHSVWheel( GtkHSV *hsv, GtkAllocation *allocation )
gtk_hsv_set_metrics( hsv, diam, ring );
}
+#if GTK_CHECK_VERSION(2,18,0)
static void handleWheelStyleSet(GtkHSV *hsv, GtkStyle* /*previous*/, gpointer /*userData*/)
{
GtkAllocation allocation = {0, 0, 0, 0};
gtk_widget_get_allocation( GTK_WIDGET(hsv), &allocation );
resizeHSVWheel( hsv, &allocation );
}
+#endif // GTK_CHECK_VERSION(2,18,0)
static void handleWheelAllocation(GtkHSV *hsv, GtkAllocation *allocation, gpointer /*userData*/)
{
@@ -218,8 +220,10 @@ void ColorWheelSelector::init()
// GTK does not automatically scale the color wheel, so we have to add that in:
gtk_signal_connect( GTK_OBJECT(_wheel), "size-allocate",
GTK_SIGNAL_FUNC(handleWheelAllocation), _csel );
+#if GTK_CHECK_VERSION(2,18,0)
gtk_signal_connect( GTK_OBJECT(_wheel), "style-set",
GTK_SIGNAL_FUNC(handleWheelStyleSet), _csel );
+#endif // GTK_CHECK_VERSION(2,18,0)
}
static void