diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2009-07-22 13:26:39 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@novell.com> | 2009-07-22 13:29:57 +0800 |
commit | 70c950a1f923e4326164f8e1c4b9834c8fb5e44e (patch) | |
tree | cccd64ef1edf9e80444f61c601af0e2ac884d27a /mail/mail-send-recv.c | |
parent | 00fb71381d3ea6c289b995ed21ae0f0b613b7805 (diff) | |
download | gsoc2013-evolution-70c950a1f923e4326164f8e1c4b9834c8fb5e44e.tar.gz gsoc2013-evolution-70c950a1f923e4326164f8e1c4b9834c8fb5e44e.tar.zst gsoc2013-evolution-70c950a1f923e4326164f8e1c4b9834c8fb5e44e.zip |
Make it possible to have send receive with out dialog
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r-- | mail/mail-send-recv.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 68bad60576..04a5defa34 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -360,7 +360,7 @@ get_receive_type(const gchar *url) } static struct _send_data * -build_dialog (EAccountList *accounts, CamelFolder *outbox, const gchar *destination) +build_dialog (EAccountList *accounts, CamelFolder *outbox, const gchar *destination, gboolean show_dialog) { GtkDialog *gd; GtkWidget *table; @@ -611,7 +611,8 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const gchar *destinat } gtk_widget_show_all (table); - gtk_widget_show (GTK_WIDGET (gd)); + if (show_dialog) + gtk_widget_show (GTK_WIDGET (gd)); g_signal_connect (gd, "response", G_CALLBACK (dialog_response), data); @@ -906,7 +907,7 @@ receive_update_got_store (gchar *uri, CamelStore *store, gpointer data) } GtkWidget * -mail_send_receive (void) +mail_send_receive_dialog (gboolean show_dialog) { CamelFolder *outbox_folder; struct _send_data *data; @@ -915,7 +916,7 @@ mail_send_receive (void) GList *scan; if (send_recv_dialog != NULL) { - if (GTK_WIDGET_REALIZED(send_recv_dialog)) { + if (show_dialog && GTK_WIDGET_REALIZED(send_recv_dialog)) { gdk_window_show(send_recv_dialog->window); gdk_window_raise(send_recv_dialog->window); } @@ -932,7 +933,7 @@ mail_send_receive (void) accounts = mail_config_get_accounts (); outbox_folder = mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX); - data = build_dialog (accounts, outbox_folder, account->transport->url); + data = build_dialog (accounts, outbox_folder, account->transport->url, show_dialog); scan = data->infos; while (scan) { struct _send_info *info = scan->data; @@ -967,6 +968,12 @@ mail_send_receive (void) return send_recv_dialog; } +GtkWidget * +mail_send_receive () +{ + return mail_send_receive_dialog(TRUE); +} + struct _auto_data { EAccount *account; gint period; /* in seconds */ |