summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-05-19 04:43:01 +0000
committerJon A. Cruz <jon@joncruz.org>2011-05-19 04:43:01 +0000
commita622000f4859173bb7ac484b86cefe9fa4f169e4 (patch)
tree67346f20e163a5ff4fec535627547454369ccaa1 /src/widgets
parentAdding inkscape:label parameter to guidelines so that our guidelanes can disp... (diff)
downloadinkscape-a622000f4859173bb7ac484b86cefe9fa4f169e4.tar.gz
inkscape-a622000f4859173bb7ac484b86cefe9fa4f169e4.zip
Revert version bump so win devlibs can catch up.
(bzr r10210)
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/sp-color-slider.cpp18
-rw-r--r--src/widgets/sp-color-wheel-selector.cpp4
2 files changed, 16 insertions, 6 deletions
diff --git a/src/widgets/sp-color-slider.cpp b/src/widgets/sp-color-slider.cpp
index 0690caaab..0e30b1ce6 100644
--- a/src/widgets/sp-color-slider.cpp
+++ b/src/widgets/sp-color-slider.cpp
@@ -1,3 +1,5 @@
+#define __SP_COLOR_SLIDER_C__
+
/*
* A slider with colored background
*
@@ -327,17 +329,21 @@ sp_color_slider_new (GtkAdjustment *adjustment)
return GTK_WIDGET (slider);
}
-void sp_color_slider_set_adjustment(SPColorSlider *slider, GtkAdjustment *adjustment)
+void
+sp_color_slider_set_adjustment (SPColorSlider *slider, GtkAdjustment *adjustment)
{
- g_return_if_fail (slider != NULL);
- g_return_if_fail (SP_IS_COLOR_SLIDER (slider));
+ g_return_if_fail (slider != NULL);
+ g_return_if_fail (SP_IS_COLOR_SLIDER (slider));
- if (!adjustment) {
- adjustment = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, 1.0, 0.01, 0.0, 0.0);
- } else {
+ if (!adjustment) {
+ adjustment = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, 1.0, 0.01, 0.0, 0.0);
+ }
+#if GTK_CHECK_VERSION (2,14,0)
+ else {
gtk_adjustment_set_page_increment(adjustment, 0.0);
gtk_adjustment_set_page_size(adjustment, 0.0);
}
+#endif
if (slider->adjustment != adjustment) {
if (slider->adjustment) {
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