From f7ca35cbcbb20c446d2fc392adcb67bf3ccacc77 Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 9 Sep 2005 07:19:52 +0000 Subject: update progress bar when executing long IMAP4 operations. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@567 ee746299-78ed-0310-b773-934348b2243d --- src/mainwindow.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/mainwindow.c') diff --git a/src/mainwindow.c b/src/mainwindow.c index 14e7e0e9..5bd94bfe 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1520,6 +1520,20 @@ void main_window_progress_set(MainWindow *mainwin, gint cur, gint total) (gfloat)cur / (gfloat)total); } +void main_window_progress_show(gint cur, gint total) +{ + MainWindow *mainwin; + + mainwin = main_window_get(); + + if (total > 0) { + gtk_progress_set_show_text(GTK_PROGRESS(mainwin->progressbar), + TRUE); + main_window_progress_set(mainwin, cur, total); + } else + main_window_progress_off(mainwin); +} + void main_window_toggle_online(MainWindow *mainwin, gboolean online) { if (prefs_common.online_mode != online) -- cgit v1.2.3