[gtk+/refactor: 106/110] Added _gtk_range_set_steppers () internal function



commit c20131162df641aeef25710319d971b222cb6eef
Author: Javier Jardón <jjardon gnome org>
Date:   Fri Aug 13 03:22:59 2010 +0200

    Added _gtk_range_set_steppers () internal function
    
    It's needed by gtkscrollbar

 gtk/gtkrange.c     |   13 +++++++++++++
 gtk/gtkrange.h     |    6 +++++-
 gtk/gtkscrollbar.c |    7 ++-----
 3 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 44728e3..9fca36c 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -4004,3 +4004,16 @@ _gtk_range_set_round_digits (GtkRange *range,
 {
   range->round_digits = round_digits;
 }
+
+void
+_gtk_range_set_steppers (GtkRange      *range,
+                         gboolean       has_a,
+                         gboolean       has_b,
+                         gboolean       has_c,
+                         gboolean       has_d)
+{
+  range->has_stepper_a = has_a;
+  range->has_stepper_b = has_b;
+  range->has_stepper_c = has_c;
+  range->has_stepper_d = has_d;
+}
diff --git a/gtk/gtkrange.h b/gtk/gtkrange.h
index d4ed7ef..9075632 100644
--- a/gtk/gtkrange.h
+++ b/gtk/gtkrange.h
@@ -203,7 +203,11 @@ gint               _gtk_range_get_stop_positions           (GtkRange      *range
                                                             gint         **values);          
 void               _gtk_range_set_round_digits             (GtkRange      *range,
                                                             gint           round_digits);
-
+void               _gtk_range_set_steppers                 (GtkRange      *range,
+                                                            gboolean       has_a,
+                                                            gboolean       has_b,
+                                                            gboolean       has_c,
+                                                            gboolean       has_d);
 
 G_END_DECLS
 
diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c
index 34ef5b6..a903e87 100644
--- a/gtk/gtkscrollbar.c
+++ b/gtk/gtkscrollbar.c
@@ -115,11 +115,8 @@ gtk_scrollbar_style_set (GtkWidget *widget,
 
   range->min_slider_size = slider_length;
   range->slider_size_fixed = fixed_size;
-
-  range->has_stepper_a = has_a;
-  range->has_stepper_b = has_b;
-  range->has_stepper_c = has_c;
-  range->has_stepper_d = has_d;
+  _gtk_range_set_steppers (range,
+                           has_a, has_b, has_c, has_d);
 
   GTK_WIDGET_CLASS (gtk_scrollbar_parent_class)->style_set (widget, previous);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]