changeset 25525:8d561be489f5

propagate from branch 'im.pidgin.pidgin' (head e2ba19f94867654f67522ab62256281645a9df9f) to branch 'im.pidgin.pidgin.yaz' (head 2ddf6c33ecceb6aa2e316037a8a5f85abca2309b)
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 29 Jun 2007 13:52:07 +0000
parents b95ad3473623 (current diff) cafecb0e4147 (diff)
children 162a767a20d4
files
diffstat 2 files changed, 18 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntslider.c	Fri Jun 29 07:48:14 2007 +0000
+++ b/finch/libgnt/gntslider.c	Fri Jun 29 13:52:07 2007 +0000
@@ -70,11 +70,9 @@
 	int position, size = 0;
 
 	if (slider->vertical)
-		mvwvline(widget->window, 0, 0, ACS_VLINE | COLOR_PAIR(GNT_COLOR_NORMAL),
-				(size = widget->priv.height));
+		size = widget->priv.height;
 	else
-		mvwhline(widget->window, 0, 0, ACS_HLINE | COLOR_PAIR(GNT_COLOR_NORMAL),
-				(size = widget->priv.width));
+		size = widget->priv.width;
 
 	if (gnt_widget_has_focus(widget))
 		attr |= GNT_COLOR_HIGHLIGHT;
@@ -85,10 +83,22 @@
 		position = ((size - 1) * (slider->current - slider->min)) / (slider->max - slider->min);
 	else
 		position = 0;
+	if (slider->vertical) {
+		mvwvline(widget->window, size-position, 0, ACS_VLINE | COLOR_PAIR(GNT_COLOR_NORMAL) | A_BOLD,
+				position);
+		mvwvline(widget->window, 0, 0, ACS_VLINE | COLOR_PAIR(GNT_COLOR_NORMAL),
+				size-position);
+	} else {
+		mvwhline(widget->window, 0, 0, ACS_HLINE | COLOR_PAIR(GNT_COLOR_NORMAL) | A_BOLD,
+				position);
+		mvwhline(widget->window, 0, position, ACS_HLINE | COLOR_PAIR(GNT_COLOR_NORMAL),
+				size - position);
+	}
+
 	mvwaddch(widget->window,
 			slider->vertical ? (size - position - 1) : 0,
 			slider->vertical ? 0 : position,
-			ACS_BLOCK | COLOR_PAIR(attr));
+			ACS_CKBOARD | COLOR_PAIR(attr));
 }
 
 static void
@@ -117,10 +127,7 @@
 	GntSlider *slider = GNT_SLIDER(bindable);
 	if (slider->current <= slider->min)
 		return FALSE;
-	slider->current -= slider->step;
-	sanitize_value(slider);
-	redraw_slider(slider);
-	slider_value_changed(slider);
+	gnt_slider_advance_step(slider, -1);
 	return TRUE;
 }
 
@@ -130,10 +137,7 @@
 	GntSlider *slider = GNT_SLIDER(bindable);
 	if (slider->current >= slider->max)
 		return FALSE;
-	slider->current += slider->step;
-	sanitize_value(slider);
-	redraw_slider(slider);
-	slider_value_changed(slider);
+	gnt_slider_advance_step(slider, 1);
 	return TRUE;
 }
 
--- a/finch/libgnt/gntwidget.c	Fri Jun 29 07:48:14 2007 +0000
+++ b/finch/libgnt/gntwidget.c	Fri Jun 29 13:52:07 2007 +0000
@@ -389,7 +389,7 @@
 
 	g_signal_emit(widget, signals[SIG_DRAW], 0);
 	gnt_widget_queue_update(widget);
-	GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_DRAWING | GNT_WIDGET_INVISIBLE);
+	GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_DRAWING);
 }
 
 gboolean