diff options
author | Jonathon Jongsma <jonathon@quotidian.org> | 2009-12-08 00:19:37 +0800 |
---|---|---|
committer | Jonathon Jongsma <jonathon@quotidian.org> | 2009-12-08 02:25:23 +0800 |
commit | 31204c9cc21ec32c8006124cf18763161daa99d2 (patch) | |
tree | 7e2173da211f3e844172ea0dbdfb0e87638d8e85 /mail | |
parent | f20528381a13299e8d160195d4b731e10b7ed437 (diff) | |
download | gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.gz gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.bz2 gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.lz gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.xz gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.zst gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.zip |
Port all error code to use GObject-ified EAlert / EAlertDialog
The changes are mainly including the e-alert-header.h header instead of just
e-alert.h. This allows us to include e-alert.h in non-UI situations when
necessary.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-reader-utils.c | 4 | ||||
-rw-r--r-- | mail/em-account-editor.c | 4 | ||||
-rw-r--r-- | mail/em-composer-utils.c | 2 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 2 | ||||
-rw-r--r-- | mail/em-folder-utils.c | 10 | ||||
-rw-r--r-- | mail/em-utils.c | 12 | ||||
-rw-r--r-- | mail/mail-autofilter.c | 4 | ||||
-rw-r--r-- | mail/mail-mt.c | 8 | ||||
-rw-r--r-- | mail/mail-session.c | 4 | ||||
-rw-r--r-- | mail/mail-vfolder.c | 8 |
10 files changed, 29 insertions, 29 deletions
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index ff129a4a87..8249187057 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -29,7 +29,7 @@ #include <camel/camel-vee-folder.h> #include <camel/camel-vee-store.h> -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "filter/e-filter-rule.h" #include "mail/e-mail-browser.h" @@ -94,7 +94,7 @@ e_mail_reader_confirm_delete (EMailReader *reader) if (!prompt_delete_in_vfolder) return TRUE; - dialog = e_alert_new_dialog_for_args ( + dialog = e_alert_dialog_new_for_args ( window, "mail:ask-delete-vfolder-msg", folder->full_name, NULL); diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 2cd24a9ae2..0986424c88 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -48,7 +48,7 @@ #include "shell/e-shell.h" #include "e-util/e-util.h" -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "e-util/e-account-utils.h" #include "e-util/e-signature-list.h" #include "e-util/e-signature-utils.h" @@ -1894,7 +1894,7 @@ static void emae_check_authtype (GtkWidget *w, EMAccountEditorService *service) uri = e_account_get_string (account, emae_service_info[service->type].account_uri_key); g_object_ref (emae); - service->check_dialog = e_alert_new_dialog_for_args (emae->editor ? (GtkWindow *)gtk_widget_get_toplevel (emae->editor) : (GtkWindow *)gtk_widget_get_toplevel (w), + service->check_dialog = e_alert_dialog_new_for_args (emae->editor ? (GtkWindow *)gtk_widget_get_toplevel (emae->editor) : (GtkWindow *)gtk_widget_get_toplevel (w), "mail:checking-service", NULL); g_signal_connect (service->check_dialog, "response", G_CALLBACK(emae_check_authtype_response), service); gtk_widget_show (service->check_dialog); diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 7a6034b296..e0da3b5679 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -40,7 +40,7 @@ #include "mail-send-recv.h" #include "e-util/e-account-utils.h" -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "e-util/e-util.h" #include "shell/e-shell.h" diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 3a8f2dc3d5..4a336d1fe4 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -51,7 +51,7 @@ #include "e-util/e-account-utils.h" #include "e-util/e-mktemp.h" #include "e-util/e-icon-factory.h" -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "e-util/e-util.h" #include "em-vfolder-rule.h" diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index 4fe72c7584..cf805f3b27 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -48,7 +48,7 @@ #include "e-util/e-mktemp.h" -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "em-vfolder-rule.h" @@ -290,7 +290,7 @@ emfu_copy_folder_selected (const gchar *uri, gpointer data) if (cfd->delete && fromstore == local_store && emfu_is_special_local_folder (cfd->fi->full_name)) { GtkWidget *w; - w = e_alert_new_dialog_for_args ( + w = e_alert_dialog_new_for_args ( e_shell_get_active_window (NULL), "mail:no-rename-special-folder", cfd->fi->full_name, NULL); em_utils_show_error_silent (w); @@ -405,7 +405,7 @@ emfu_delete_done (CamelFolder *folder, gboolean removed, CamelException *ex, gpo if (ex && camel_exception_is_set (ex)) { GtkWidget *w; - w = e_alert_new_dialog_for_args ( + w = e_alert_dialog_new_for_args ( e_shell_get_active_window (NULL), "mail:no-delete-folder", folder->full_name, camel_exception_get_description (ex), NULL); em_utils_show_error_silent (w); @@ -441,7 +441,7 @@ em_folder_utils_delete_folder (CamelFolder *folder) local_store = e_mail_local_get_store (); if (folder->parent_store == local_store && emfu_is_special_local_folder (folder->full_name)) { - dialog = e_alert_new_dialog_for_args ( + dialog = e_alert_dialog_new_for_args ( parent, "mail:no-delete-special-folder", folder->full_name, NULL); em_utils_show_error_silent (dialog); @@ -456,7 +456,7 @@ em_folder_utils_delete_folder (CamelFolder *folder) camel_object_ref (folder); - dialog = e_alert_new_dialog_for_args (parent, + dialog = e_alert_dialog_new_for_args (parent, (folder->parent_store && CAMEL_IS_VEE_STORE(folder->parent_store))?"mail:ask-delete-vfolder":"mail:ask-delete-folder", folder->full_name, NULL); g_object_set_data_full ((GObject *) dialog, "folder", folder, camel_object_unref); diff --git a/mail/em-utils.c b/mail/em-utils.c index 3cb662e5bd..ca824d9bbe 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -70,7 +70,7 @@ #include "e-util/e-account-utils.h" #include "e-util/e-dialog-utils.h" #include "e-util/e-alert-activity.h" -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "shell/e-shell.h" #include "widgets/misc/e-attachment.h" @@ -170,11 +170,11 @@ em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag return TRUE; va_start(ap, arg0); - alert = e_alert_newv (tag, arg0, ap); + alert = e_alert_new_valist (tag, arg0, ap); va_end(ap); - mbox = e_alert_new_dialog (parent, alert); - e_alert_free (alert); + mbox = e_alert_dialog_new (parent, alert); + g_object_unref (alert); if (promptkey) { check = gtk_check_button_new_with_mnemonic (_("_Do not show this message again.")); @@ -322,7 +322,7 @@ em_utils_edit_filters (GtkWidget *parent) g_free (system); if (((ERuleContext *) fc)->error) { - GtkWidget *w = e_alert_new_dialog_for_args ((GtkWindow *)parent, "mail:filter-load-error", ((ERuleContext *)fc)->error, NULL); + GtkWidget *w = e_alert_dialog_new_for_args ((GtkWindow *)parent, "mail:filter-load-error", ((ERuleContext *)fc)->error, NULL); em_utils_show_error_silent (w); return; } @@ -950,7 +950,7 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode) tmpdir = e_mkdtemp("evolution-tmp-XXXXXX"); if (tmpdir == NULL) { - w = e_alert_new_dialog_for_args ((GtkWindow *)parent, "mail:no-create-tmp-path", g_strerror(errno), NULL); + w = e_alert_dialog_new_for_args ((GtkWindow *)parent, "mail:no-create-tmp-path", g_strerror(errno), NULL); em_utils_show_error_silent (w); return NULL; } diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index dedb49f635..bbb3694ee8 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -33,7 +33,7 @@ #include "mail-vfolder.h" #include "mail-autofilter.h" #include "em-utils.h" -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "e-util/e-util-private.h" #include "em-vfolder-context.h" @@ -432,7 +432,7 @@ mail_filter_delete_uri(CamelStore *store, const gchar *uri) l = l->next; } - dialog = e_alert_new_dialog_for_args (e_shell_get_active_window (NULL), "mail:filter-updated", s->str, euri, NULL); + dialog = e_alert_dialog_new_for_args (e_shell_get_active_window (NULL), "mail:filter-updated", s->str, euri, NULL); g_string_free(s, TRUE); em_utils_show_info_silent (dialog); diff --git a/mail/mail-mt.c b/mail/mail-mt.c index 2c06561770..b0c8ee8895 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -35,9 +35,9 @@ #include "shell/e-shell.h" #include "misc/e-gui-utils.h" -#include "e-util/e-alert.h" -#include "e-util/e-icon-factory.h" #include "e-util/e-alert-activity.h" +#include "e-util/e-alert-dialog.h" +#include "e-util/e-icon-factory.h" #include "mail-config.h" #include "mail-session.h" @@ -274,10 +274,10 @@ mail_msg_check_error (gpointer msg) if (m->info->desc && (what = m->info->desc (m))) { - gd = (GtkDialog *)e_alert_new_dialog_for_args (parent, "mail:async-error", what, camel_exception_get_description(&m->ex), NULL); + gd = (GtkDialog *)e_alert_dialog_new_for_args (parent, "mail:async-error", what, camel_exception_get_description(&m->ex), NULL); g_free(what); } else - gd = (GtkDialog *)e_alert_new_dialog_for_args (parent, "mail:async-error-nodescribe", camel_exception_get_description(&m->ex), NULL); + gd = (GtkDialog *)e_alert_dialog_new_for_args (parent, "mail:async-error-nodescribe", camel_exception_get_description(&m->ex), NULL); g_hash_table_insert(active_errors, m->info, gd); g_signal_connect(gd, "response", G_CALLBACK(error_response), m->info); diff --git a/mail/mail-session.c b/mail/mail-session.c index 92bb551458..b7b26bf8dc 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -45,7 +45,7 @@ #include <camel/camel-i18n.h> #include "e-util/e-util.h" -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "e-util/e-util-private.h" #include "e-account-combo-box.h" #include "shell/e-shell.h" @@ -352,7 +352,7 @@ user_message_exec (struct _user_message_msg *m) g_return_if_reached (); } - user_message_dialog = e_alert_new_dialog_for_args ( + user_message_dialog = e_alert_dialog_new_for_args ( e_shell_get_active_window (NULL), error_type, m->prompt, NULL); g_object_set ( user_message_dialog, "allow_shrink", TRUE, diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 4ab49d1869..d95ee2b876 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -32,7 +32,7 @@ #include <camel/camel-vtrash-folder.h> #include <libedataserver/e-account-list.h> -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "e-util/e-util-private.h" #include "e-util/e-account-utils.h" @@ -600,7 +600,7 @@ done: const gchar *data_dir; gchar *user; - dialog = e_alert_new_dialog_for_args (e_shell_get_active_window (NULL), "mail:vfolder-updated", changed->str, uri, NULL); + dialog = e_alert_dialog_new_for_args (e_shell_get_active_window (NULL), "mail:vfolder-updated", changed->str, uri, NULL); em_utils_show_info_silent (dialog); data_dir = em_utils_get_data_dir (); @@ -1094,7 +1094,7 @@ vfolder_edit_rule(const gchar *uri) GtkWidget *w; /* TODO: we should probably just create it ... */ - w = e_alert_new_dialog_for_args (e_shell_get_active_window (NULL), "mail:vfolder-notexist", uri, NULL); + w = e_alert_dialog_new_for_args (e_shell_get_active_window (NULL), "mail:vfolder-notexist", uri, NULL); em_utils_show_error_silent (w); } @@ -1113,7 +1113,7 @@ new_rule_clicked(GtkWidget *w, gint button, gpointer data) if (!e_filter_rule_validate (rule, &alert)) { e_alert_run_dialog (GTK_WINDOW (w), alert); - e_alert_free (alert); + g_object_unref (alert); return; } |