G_CALLBACK(inc_dialog_delete_cb), dialog);
/* manage_window_set_transient(GTK_WINDOW(progress->window)); */
- progress_dialog_set_value(progress, 0.0);
+ progress_dialog_get_fraction(progress);
stock_pixmap_gdk(progress->clist, STOCK_PIXMAP_COMPLETE,
&okxpm, &okxpmmask);
static void inc_progress_dialog_clear(IncProgressDialog *inc_dialog)
{
- progress_dialog_set_value(inc_dialog->dialog, 0.0);
+ progress_dialog_get_fraction(inc_dialog->dialog);
progress_dialog_set_label(inc_dialog->dialog, "");
if (inc_dialog->mainwin)
main_window_progress_off(inc_dialog->mainwin);
}
g_slist_free(msglist);
+ statusbar_pop_all();
+
new_msgs += pop3_session->cur_total_num;
if (pop3_session->error_val == PS_AUTHFAIL &&
progress_dialog_set_label(inc_dialog->dialog, buf);
}
- progress_dialog_set_percentage
+ progress_dialog_set_fraction
(inc_dialog->dialog,(gfloat)cur_total / (gfloat)total);
- gtk_progress_set_show_text
- (GTK_PROGRESS(inc_dialog->mainwin->progressbar), TRUE);
g_snprintf(buf, sizeof(buf), "%d / %d",
pop3_session->cur_msg, pop3_session->count);
- gtk_progress_set_format_string
- (GTK_PROGRESS(inc_dialog->mainwin->progressbar), buf);
- gtk_progress_bar_update
+ gtk_progress_bar_set_text
+ (GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar), buf);
+ gtk_progress_bar_set_fraction
(GTK_PROGRESS_BAR(inc_dialog->mainwin->progressbar),
(gfloat)cur_total / (gfloat)total);
static void inc_notify_cmd(gint new_msgs, gboolean notify)
{
- gchar *buf;
+ gchar *buf, *numpos;
if (!(new_msgs && notify && prefs_common.newmail_notify_cmd &&
*prefs_common.newmail_notify_cmd))
return;
- if ((buf = strchr(prefs_common.newmail_notify_cmd, '%')) &&
- buf[1] == 'd' && !strchr(&buf[1], '%'))
- buf = g_strdup_printf(prefs_common.newmail_notify_cmd,
- new_msgs);
- else
- buf = g_strdup(prefs_common.newmail_notify_cmd);
+ buf = g_strdup(prefs_common.newmail_notify_cmd);
+ if ((numpos = strstr(buf, "%d")) != NULL) {
+ gchar *buf2;
+
+ *numpos = '\0';
+ buf2 = g_strdup_printf("%s%d%s", buf, new_msgs, numpos + 2);
+ g_free(buf);
+ buf = buf2;
+ }
+ debug_print("executing new mail notification command: %s\n", buf);
execute_command_line(buf, TRUE);
g_free(buf);