From d5aed59bbcefe89a34da745a0f7e2abe7bcdcae6 Mon Sep 17 00:00:00 2001 From: GMT 1999 Tony Gale Date: Mon, 22 Feb 1999 08:51:02 +0000 Subject: - Complete the ProgressBar API - Fix the CList example code Mon Feb 22 08:45:10 GMT 1999 Tony Gale * docs/gtk_tut.sgml: - Complete the ProgressBar API - Fix the CList example code * examples/clist/clist.c, examples/progressbar/progressbar.c: Update from tutorial --- examples/progressbar/progressbar.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'examples/progressbar') diff --git a/examples/progressbar/progressbar.c b/examples/progressbar/progressbar.c index efb20cc59..073e74fa7 100644 --- a/examples/progressbar/progressbar.c +++ b/examples/progressbar/progressbar.c @@ -15,11 +15,12 @@ gint progress_timeout( gpointer data ) gfloat new_val; GtkAdjustment *adj; - adj = GTK_PROGRESS (data)->adjustment; - /* Calculate the value of the progress bar using the * value range set in the adjustment object */ - new_val = adj->value + 1; + + new_val = gtk_progress_get_value( GTK_PROGRESS(data) ) + 1; + + adj = GTK_PROGRESS (data)->adjustment; if (new_val > adj->upper) new_val = adj->lower; -- cgit v1.2.1