From 44e0fbe45d29178fdd3954e21471b64a4f371b86 Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Thu, 23 Aug 2001 05:54:21 +0000 Subject: [PATCH] sync with sylpheed 0.5.3cvs5 --- ChangeLog | 12 ++++++++++++ ChangeLog.claws | 7 +++++++ ChangeLog.jp | 12 ++++++++++++ configure.in | 2 +- src/inc.c | 17 +++++++++++++++++ src/mainwindow.c | 41 ++++++++++++++++++++++++++++++----------- src/mainwindow.h | 5 +++-- src/summaryview.c | 12 +++--------- 8 files changed, 85 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 732ae7793..4668c6b45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-08-22 + + * src/mainwindow.[ch]: added progressbar and status label to the + statusbar. + * src/inc.c: update the progressbar of main window, too. + +2001-08-22 + + * src/mainwindow.[ch]: main_window_set_toolbar_sensitive(): removed + the second argument, and determine the sensitivity with the + state of summary view. + 2001-08-21 * src/pop.c: pop3_getsize_list_recv(), pop3_retr_recv(), diff --git a/ChangeLog.claws b/ChangeLog.claws index 99dc0719d..cc5eabc9d 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,10 @@ +2001-08-23 [paul] + + * configure.in + Change version number to 0.5.3claws3 + + * sync with sylpheed 0.5.3cvs5 + 2001-08-22 [alte] * src/Makefile.am, src/compose.[ch], src/defs.h, src/mainwindow.c, src/prefs_templates.[ch], src/template.[ch], src/template_select.[ch] diff --git a/ChangeLog.jp b/ChangeLog.jp index 991bd2f80..ad508fd6a 100644 --- a/ChangeLog.jp +++ b/ChangeLog.jp @@ -1,3 +1,15 @@ +2001-08-22 + + * src/mainwindow.[ch]: ¥¹¥Æ¡¼¥¿¥¹¥Ð¡¼¤Ë¥×¥í¥°¥ì¥¹¥Ð¡¼¤È¥¹¥Æ¡¼¥¿¥¹ + ¥é¥Ù¥ë¤òÄɲᣠ+ * src/inc.c: ¥á¥¤¥ó¥¦¥£¥ó¥É¥¦¤Î¥×¥í¥°¥ì¥¹¥Ð¡¼¤â¹¹¿·¤¹¤ë¤è¤¦¤Ë¤·¤¿¡£ + +2001-08-22 + + * src/mainwindow.[ch]: main_window_set_toolbar_sensitive(): 2ÈÖÌܤΠ+ °ú¿ô¤òºï½ü¤·¡¢¥µ¥Þ¥ê¥Ó¥å¡¼¤Î¾õÂÖ¤Ç sensitivity ¤ò·èÄꤹ¤ë¤è¤¦¤Ë + ¤·¤¿¡£ + 2001-08-21 * src/pop.c: pop3_getsize_list_recv(), pop3_retr_recv(), diff --git a/configure.in b/configure.in index 362971e0e..b691f0da7 100644 --- a/configure.in +++ b/configure.in @@ -11,7 +11,7 @@ MINOR_VERSION=5 MICRO_VERSION=3 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws2 +EXTRA_VERSION=claws3 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl diff --git a/src/inc.c b/src/inc.c index 35d1bc63e..c43fa7977 100644 --- a/src/inc.c +++ b/src/inc.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -332,12 +333,16 @@ static void inc_progress_dialog_clear(IncProgressDialog *inc_dialog) { progress_dialog_set_value(inc_dialog->dialog, 0.0); progress_dialog_set_label(inc_dialog->dialog, ""); + gtk_progress_bar_update + (GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar), 0.0); } static void inc_progress_dialog_destroy(IncProgressDialog *inc_dialog) { g_return_if_fail(inc_dialog != NULL); + gtk_progress_bar_update + (GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar), 0.0); progress_dialog_destroy(inc_dialog->dialog); g_free(inc_dialog); @@ -417,6 +422,9 @@ static gint inc_start(IncProgressDialog *inc_dialog) gint error_num = 0; gint new_msgs = 0; + /* gtk_label_set_text(GTK_LABEL(inc_dialog->mainwin->statuslabel), + _("Receiving")); */ + while (inc_dialog->queue_list != NULL) { session = inc_dialog->queue_list->data; pop3_state = session->pop3_state; @@ -527,6 +535,8 @@ static gint inc_start(IncProgressDialog *inc_dialog) num++; } + /* gtk_label_set_text(GTK_LABEL(inc_dialog->mainwin->statuslabel), ""); */ + if (error_num) { if (inc_dialog->show_dialog) manage_window_focus_in(inc_dialog->dialog->window, @@ -826,6 +836,9 @@ static void inc_pop3_recv_func(SockInfo *sock, gint count, gint read_bytes, progress_dialog_set_percentage (dialog, (gfloat)cur_total / (gfloat)state->total_bytes); + gtk_progress_bar_update + (GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar), + (gfloat)cur_total / (gfloat)state->total_bytes); GTK_EVENTS_FLUSH(); } @@ -880,6 +893,10 @@ void inc_progress_update(Pop3State *state, Pop3Phase phase) (dialog, (gfloat)(state->cur_total_bytes) / (gfloat)(state->total_bytes)); + gtk_progress_bar_update + (GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar), + (gfloat)(state->cur_total_bytes) / + (gfloat)(state->total_bytes)); break; case POP3_DELETE_SEND: case POP3_DELETE_RECV: diff --git a/src/mainwindow.c b/src/mainwindow.c index 4891cce2d..1e9a39fe7 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -596,6 +597,8 @@ MainWindow *main_window_create(SeparateType type) GtkWidget *vbox_body; GtkWidget *hbox_stat; GtkWidget *statusbar; + GtkWidget *progressbar; + GtkWidget *statuslabel; GtkWidget *ac_button; GtkWidget *ac_label; @@ -655,6 +658,13 @@ MainWindow *main_window_create(SeparateType type) statusbar = statusbar_create(); gtk_box_pack_start(GTK_BOX(hbox_stat), statusbar, TRUE, TRUE, 0); + progressbar = gtk_progress_bar_new(); + gtk_widget_set_usize(progressbar, 120, -1); + gtk_box_pack_start(GTK_BOX(hbox_stat), progressbar, FALSE, FALSE, 0); + + statuslabel = gtk_label_new(""); + gtk_box_pack_start(GTK_BOX(hbox_stat), statuslabel, FALSE, FALSE, 0); + ac_button = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(ac_button), GTK_RELIEF_NONE); GTK_WIDGET_UNSET_FLAGS(ac_button, GTK_CAN_FOCUS); @@ -686,15 +696,17 @@ MainWindow *main_window_create(SeparateType type) messageview->mainwin = mainwin; - mainwin->window = window; - mainwin->vbox = vbox; - mainwin->menubar = menubar; - mainwin->handlebox = handlebox; - mainwin->vbox_body = vbox_body; - mainwin->hbox_stat = hbox_stat; - mainwin->statusbar = statusbar; - mainwin->ac_button = ac_button; - mainwin->ac_label = ac_label; + mainwin->window = window; + mainwin->vbox = vbox; + mainwin->menubar = menubar; + mainwin->handlebox = handlebox; + mainwin->vbox_body = vbox_body; + mainwin->hbox_stat = hbox_stat; + mainwin->statusbar = statusbar; + mainwin->progressbar = progressbar; + mainwin->statuslabel = statuslabel; + mainwin->ac_button = ac_button; + mainwin->ac_label = ac_label; /* set context IDs for status bar */ mainwin->mainwin_cid = gtk_statusbar_get_context_id @@ -799,7 +811,7 @@ MainWindow *main_window_create(SeparateType type) GTK_SIGNAL_FUNC(ac_menu_popup_closed), mainwin); mainwin->ac_menu = ac_menu; - main_window_set_toolbar_sensitive(mainwin, FALSE); + main_window_set_toolbar_sensitive(mainwin); /* show main window */ gtk_widget_set_uposition(mainwin->window, @@ -1163,8 +1175,15 @@ void main_window_add_mbox(MainWindow *mainwin) folderview_set(mainwin->folderview); } -void main_window_set_toolbar_sensitive(MainWindow *mainwin, gboolean sensitive) +void main_window_set_toolbar_sensitive(MainWindow *mainwin) { + gboolean sensitive; + + if (GTK_CLIST(mainwin->summaryview->ctree)->row_list) + sensitive = TRUE; + else + sensitive = FALSE; + gtk_widget_set_sensitive(mainwin->reply_btn, sensitive); gtk_widget_set_sensitive(mainwin->replyall_btn, sensitive); gtk_widget_set_sensitive(mainwin->replysender_btn, sensitive); diff --git a/src/mainwindow.h b/src/mainwindow.h index e8cb412b3..5315d105b 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -111,6 +111,8 @@ struct _MainWindow GtkWidget *vbox_body; GtkWidget *hbox_stat; GtkWidget *statusbar; + GtkWidget *progressbar; + GtkWidget *statuslabel; GtkWidget *ac_button; GtkWidget *ac_label; GtkWidget *ac_menu; @@ -152,8 +154,7 @@ void main_window_empty_trash (MainWindow *mainwin, gboolean confirm); void main_window_add_mailbox (MainWindow *mainwin); -void main_window_set_toolbar_sensitive (MainWindow *mainwin, - gboolean sensitive); +void main_window_set_toolbar_sensitive (MainWindow *mainwin); void main_window_set_menu_sensitive (MainWindow *mainwin); void main_window_popup (MainWindow *mainwin); diff --git a/src/summaryview.c b/src/summaryview.c index ff946d102..5e8587569 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -917,13 +917,8 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item, gint sort_type; static gboolean locked = FALSE; - if (locked) { - g_print("Summary view is locked, waiting...\n"); + if (locked) return FALSE; - /* while (locked) - gtk_main_iteration(); - g_print("unlocked.\n"); */ - } locked = TRUE; STATUSBAR_POP(summaryview->mainwin); @@ -1096,8 +1091,7 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item, summary_set_menu_sensitive(summaryview); - main_window_set_toolbar_sensitive - (summaryview->mainwin, summaryview->selected ? TRUE : FALSE); + main_window_set_toolbar_sensitive(summaryview->mainwin); debug_print("\n"); STATUSBAR_PUSH(summaryview->mainwin, _("Done.")); @@ -1165,7 +1159,7 @@ void summary_clear_all(SummaryView *summaryview) { summary_clear_list(summaryview); summary_set_menu_sensitive(summaryview); - main_window_set_toolbar_sensitive(summaryview->mainwin, FALSE); + main_window_set_toolbar_sensitive(summaryview->mainwin); summary_status_show(summaryview); } -- 2.25.1