diff options
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/sp-color-slider.cpp | 18 | ||||
| -rw-r--r-- | src/widgets/sp-color-wheel-selector.cpp | 4 |
2 files changed, 6 insertions, 16 deletions
diff --git a/src/widgets/sp-color-slider.cpp b/src/widgets/sp-color-slider.cpp index 0e30b1ce6..0690caaab 100644 --- a/src/widgets/sp-color-slider.cpp +++ b/src/widgets/sp-color-slider.cpp @@ -1,5 +1,3 @@ -#define __SP_COLOR_SLIDER_C__ - /* * A slider with colored background * @@ -329,21 +327,17 @@ 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); - } -#if GTK_CHECK_VERSION (2,14,0) - else { + if (!adjustment) { + adjustment = (GtkAdjustment *) gtk_adjustment_new (0.0, 0.0, 1.0, 0.01, 0.0, 0.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 2e36a024e..784dd23ad 100644 --- a/src/widgets/sp-color-wheel-selector.cpp +++ b/src/widgets/sp-color-wheel-selector.cpp @@ -135,14 +135,12 @@ 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*/) { @@ -220,10 +218,8 @@ 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 |
