CVS: sylpheedclaws/sylpheed-claws/src statusbar.c,1.5.2.13,1.5.2.14

[email protected] Tue, 26 Dec 2006 23:03:21 +0000
Newsgroups gmane.mail.sylpheed.claws.cvs
Message-ID <[email protected]>
Update of /pack/anoncvs/sylpheedclaws/sylpheed-claws/src
In directory sunsite.dk:/tmp/cvs-serv4065/src

Modified Files:
      Tag: gtk2
	statusbar.c 
Log Message:
2006-12-26 [colin]	2.6.1cvs77

	* src/statusbar.c
		Revert previous patch

Index: statusbar.c
===================================================================
RCS file: /pack/anoncvs/sylpheedclaws/sylpheed-claws/src/statusbar.c,v
retrieving revision 1.5.2.13
retrieving revision 1.5.2.14
diff -u -d -r1.5.2.13 -r1.5.2.14
--- statusbar.c	2006/12/26 22:37:40	1.5.2.13
+++ statusbar.c	2006/12/26 23:03:14	1.5.2.14
@@ -161,22 +161,17 @@
 void statusbar_progress_all (gint done, gint total, gint step) 
 {
 	gchar buf[32];
-	static time_t last_update = (time_t)NULL;
-	time_t now = time(NULL);
-	if (total && (now - last_update > 0 || total < 20)) {
+	if (total && done % step == 0) {
 		g_snprintf(buf, sizeof(buf), "%d / %d", done, total);
 		gtk_progress_bar_set_text
 			(GTK_PROGRESS_BAR(mainwindow_get_mainwindow()->progressbar), buf);
 		gtk_progress_bar_set_fraction
 			(GTK_PROGRESS_BAR(mainwindow_get_mainwindow()->progressbar),
 			 (total == 0) ? 0 : (gfloat)done / (gfloat)total);
-		last_update = now;
 	} else if (total == 0) {
-		last_update = (time_t)NULL;
 		gtk_progress_bar_set_text
 			(GTK_PROGRESS_BAR(mainwindow_get_mainwindow()->progressbar), "");
 		gtk_progress_bar_set_fraction
 			(GTK_PROGRESS_BAR(mainwindow_get_mainwindow()->progressbar), 0.0);
 	}
-	
 }