summaryrefslogtreecommitdiff
path: root/gtk/gtkscale.c
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2012-01-09 18:54:49 +0100
committerStefan Sauer <ensonic@users.sf.net>2012-01-20 21:57:21 +0100
commit9adc078e2512099f33fcbd4ca5e8160eeb6e6243 (patch)
tree233c6602c1ea426576335ab8c676095b9d37d888 /gtk/gtkscale.c
parent165d2c0ca278ada18f2b53f4be086abcd9b9f5ff (diff)
downloadgtk+-9adc078e2512099f33fcbd4ca5e8160eeb6e6243.tar.gz
scale: remove the match argument from find_next_pos()
Using the 'pos' argument is enough.
Diffstat (limited to 'gtk/gtkscale.c')
-rw-r--r--gtk/gtkscale.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 42d178897f..21605d0958 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -932,8 +932,7 @@ static gint
find_next_pos (GtkWidget *widget,
GSList *list,
gint *marks,
- GtkPositionType pos,
- gint match)
+ GtkPositionType pos)
{
GSList *m;
gint i;
@@ -942,7 +941,7 @@ find_next_pos (GtkWidget *widget,
{
GtkScaleMark *mark = m->data;
- if (match == (mark->position == pos))
+ if (mark->position == pos)
return marks[i];
}
@@ -1011,14 +1010,14 @@ gtk_scale_expose (GtkWidget *widget,
y1 = widget->allocation.y + range->range_rect.y;
y2 = y1 - slider_width / 2;
min_pos = min_pos_before;
- max_pos = widget->allocation.x + find_next_pos (widget, m, marks + i, GTK_POS_TOP, 1) - min_sep;
+ max_pos = widget->allocation.x + find_next_pos (widget, m, marks + i, GTK_POS_TOP) - min_sep;
}
else
{
y1 = widget->allocation.y + range->range_rect.y + range->range_rect.height;
y2 = y1 + slider_width / 2;
min_pos = min_pos_after;
- max_pos = widget->allocation.x + find_next_pos (widget, m, marks + i, GTK_POS_TOP, 0) - min_sep;
+ max_pos = widget->allocation.x + find_next_pos (widget, m, marks + i, GTK_POS_BOTTOM) - min_sep;
}
gtk_paint_vline (widget->style, widget->window, state_type,
@@ -1059,14 +1058,14 @@ gtk_scale_expose (GtkWidget *widget,
x1 = widget->allocation.x + range->range_rect.x;
x2 = widget->allocation.x + range->range_rect.x - slider_width / 2;
min_pos = min_pos_before;
- max_pos = widget->allocation.y + find_next_pos (widget, m, marks + i, GTK_POS_LEFT, 1) - min_sep;
+ max_pos = widget->allocation.y + find_next_pos (widget, m, marks + i, GTK_POS_LEFT) - min_sep;
}
else
{
x1 = widget->allocation.x + range->range_rect.x + range->range_rect.width;
x2 = widget->allocation.x + range->range_rect.x + range->range_rect.width + slider_width / 2;
min_pos = min_pos_after;
- max_pos = widget->allocation.y + find_next_pos (widget, m, marks + i, GTK_POS_LEFT, 0) - min_sep;
+ max_pos = widget->allocation.y + find_next_pos (widget, m, marks + i, GTK_POS_RIGHT) - min_sep;
}
y1 = widget->allocation.y + marks[i];