2005-06-14 [paul] 1.9.11cvs66
[claws.git] / src / send_message.c
index fa9bd5b651b2c620b8ec0b1d1ef2eb4949d95b1f..3eb019eebc5fc59ece455baf079cf317d11103e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2003 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2005 Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -28,7 +28,6 @@
 #include <gtk/gtkmain.h>
 #include <gtk/gtksignal.h>
 #include <gtk/gtkwindow.h>
-#include <gtk/gtkclist.h>
 #include <stdio.h>
 #include <string.h>
 #include <signal.h>
@@ -253,17 +252,18 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
                dialog->session = session;
                smtp_session->dialog = dialog;
 
-               progress_dialog_list_set(dialog->dialog, 0, NULL, 
-                                        ac_prefs->smtp_server, 
-                                        _("Connecting"));
+               progress_dialog_append(dialog->dialog, NULL, ac_prefs->smtp_server,
+                                      _("Connecting"), NULL);
 
+               
                if (ac_prefs->pop_before_smtp
                    && (ac_prefs->protocol == A_APOP || ac_prefs->protocol == A_POP3)
                    && (time(NULL) - ac_prefs->last_pop_login_time) > (60 * ac_prefs->pop_before_smtp_timeout)) {
                        g_snprintf(buf, sizeof(buf), _("Doing POP before SMTP..."));
-                       log_message(buf);
+                       log_message("%s\n", buf);
                        progress_dialog_set_label(dialog->dialog, buf);
-                       progress_dialog_list_set_status(dialog->dialog, 0, _("POP before SMTP"));
+                       progress_dialog_append(dialog->dialog, NULL, ac_prefs->smtp_server,
+                                              _("POP before SMTP"), NULL);
                        GTK_EVENTS_FLUSH();
                        inc_pop_before_smtp(ac_prefs);
                }
@@ -424,7 +424,7 @@ static gint send_recv_message(Session *session, const gchar *msg, gpointer data)
        }
 
        progress_dialog_set_label(dialog->dialog, buf);
-       progress_dialog_list_set_status(dialog->dialog, 0, state_str);
+       progress_dialog_set_row_status(dialog->dialog, 0, state_str);
 
        return 0;
 }
@@ -444,7 +444,7 @@ static gint send_send_data_progressive(Session *session, guint cur_len,
        g_snprintf(buf, sizeof(buf), _("Sending message (%d / %d bytes)"),
                   cur_len, total_len);
        progress_dialog_set_label(dialog->dialog, buf);
-       progress_dialog_set_fraction
+       progress_dialog_set_percentage
                (dialog->dialog, (gfloat)cur_len / (gfloat)total_len);
 
        return 0;
@@ -477,7 +477,9 @@ static SendProgressDialog *send_progress_dialog_create(void)
        gtk_window_set_modal(GTK_WINDOW(progress->window), TRUE);
        manage_window_set_transient(GTK_WINDOW(progress->window));
 
-       progress_dialog_get_fraction(progress);
+       progress_dialog_set_value(progress, 0.0);
+
+       gtk_widget_show_now(progress->window);
 
        if (prefs_common.send_dialog_mode == SEND_DIALOG_ALWAYS) {
                gtk_widget_show_now(progress->window);