diff options
Diffstat (limited to 'src/widgets/sp-color-slider.cpp')
| -rw-r--r-- | src/widgets/sp-color-slider.cpp | 18 |
1 files changed, 12 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) { |
