aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-09-09 07:19:52 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-09-09 07:19:52 +0000
commitf7ca35cbcbb20c446d2fc392adcb67bf3ccacc77 (patch)
tree23096150e8bea463a5b7ff6d4e63eaa7eee1b9b8 /src
parent1bddee29d23efedb91b43a1fa6667090a52f54f9 (diff)
update progress bar when executing long IMAP4 operations.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@567 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/main.c1
-rw-r--r--src/mainwindow.c14
-rw-r--r--src/mainwindow.h3
3 files changed, 18 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 3b7c4a18..6a632277 100644
--- a/src/main.c
+++ b/src/main.c
@@ -196,6 +196,7 @@ int main(int argc, char *argv[])
set_log_file("sylpheed.log");
set_ui_update_func(gtkut_events_flush);
+ set_progress_func(main_window_progress_show);
set_input_query_password_func(input_dialog_query_password);
CHDIR_EXIT_IF_FAIL(get_home_dir(), 1);
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)
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 3184ca8b..d78f08c7 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -155,6 +155,9 @@ void main_window_progress_set (MainWindow *mainwin,
gint cur,
gint total);
+void main_window_progress_show (gint cur,
+ gint total);
+
void main_window_toggle_online (MainWindow *mainwin,
gboolean online);
gboolean main_window_toggle_online_if_offline (MainWindow *mainwin);