diff options
100 files changed, 451 insertions, 465 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 2973730788..501af7d97e 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -43,7 +43,7 @@ #include "addressbook/printing/e-contact-print.h" #include "addressbook/gui/widgets/eab-gui-util.h" #include "e-util/e-util.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "misc/e-dateedit.h" #include "misc/e-image-chooser.h" #include "misc/e-url-entry.h" @@ -2345,7 +2345,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) if ((height > 96 || width > 96)) { prompt_response = - e_error_run_dialog_for_args + e_alert_run_dialog_for_args (GTK_WINDOW (editor->app), "addressbook:prompt-resize", NULL); @@ -2773,7 +2773,7 @@ categories_clicked (GtkWidget *button, EContactEditor *editor) g_free (categories); return; }else if (!(dialog = GTK_DIALOG (e_categories_dialog_new (categories)))) { - e_error_run_dialog_for_args (GTK_WINDOW (editor->app), + e_alert_run_dialog_for_args (GTK_WINDOW (editor->app), "addressbook:edit-categories", NULL); g_free (categories); @@ -3061,7 +3061,7 @@ save_contact (EContactEditor *ce, gboolean should_close) return; if (ce->target_editable && !e_book_is_writable (ce->source_book)) { - if (e_error_run_dialog_for_args (GTK_WINDOW (ce->app), + if (e_alert_run_dialog_for_args (GTK_WINDOW (ce->app), "addressbook:prompt-move", NULL) == GTK_RESPONSE_NO) return; @@ -3209,7 +3209,7 @@ e_contact_editor_is_valid (EABEditor *editor) if (validation_error) { g_string_append (errmsg, "."); - e_error_run_dialog_for_args (GTK_WINDOW (ce->app), + e_alert_run_dialog_for_args (GTK_WINDOW (ce->app), "addressbook:generic-error", _("Invalid contact."), errmsg->str, NULL); diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index ced2f2ec12..bc750d15ef 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -33,7 +33,7 @@ #include "e-contact-editor.h" #include "e-contact-quick-add.h" #include "eab-contact-merging.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" typedef struct _QuickAdd QuickAdd; struct _QuickAdd { @@ -129,7 +129,7 @@ merge_cb (EBook *book, EBookStatus status, gpointer closure) if (e_book_is_writable (book)) eab_merging_book_add_contact (book, qa->contact, NULL, NULL); else - e_error_run_dialog_for_args (e_shell_get_active_window (NULL), + e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), "addressbook:error-read-only", e_source_peek_name (e_book_get_source (book)), NULL); diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index dff1b3da83..7eb07007da 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -24,7 +24,7 @@ #include "e-contact-list-editor.h" #include <e-util/e-util-private.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include "shell/e-shell.h" #include <string.h> @@ -262,7 +262,7 @@ contact_list_editor_contact_exists (EContactListModel *model, if (!e_contact_list_model_has_email (model, email)) return FALSE; - return (e_error_run_dialog_for_args (e_shell_get_active_window (NULL), + return (e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), tag, email, NULL) != GTK_RESPONSE_YES); } diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c index 87fd8e8fec..5359d8d607 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-model.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c @@ -23,7 +23,7 @@ #include <string.h> #include "e-contact-list-model.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "shell/e-shell.h" static gpointer parent_class; @@ -153,7 +153,7 @@ e_contact_list_model_add_email (EContactListModel *model, g_return_if_fail (email != NULL); if (e_contact_list_model_has_email (model, email)) - if (e_error_run_dialog_for_args (e_shell_get_active_window + if (e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), tag, email, NULL) != GTK_RESPONSE_YES) return; diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 3e10722c00..cb64e36272 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -52,7 +52,7 @@ #include "e-addressbook-table-adapter.h" #include "eab-contact-merging.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util-private.h" #include <gdk/gdkkeysyms.h> @@ -894,7 +894,7 @@ backend_died (EAddressbookView *view) model = e_addressbook_view_get_model (view); book = e_addressbook_model_get_book (model); - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "addressbook:backend-died", e_book_get_uri (book), NULL); @@ -1013,7 +1013,7 @@ delete_contacts_cb (EBook *book, EBookStatus status, gpointer closure) case E_BOOK_ERROR_CANCELLED : break; case E_BOOK_ERROR_PERMISSION_DENIED : - e_error_run_dialog_for_args (e_shell_get_active_window (NULL), + e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), "addressbook:contact-delete-error-perm", NULL); break; @@ -1217,7 +1217,7 @@ e_addressbook_view_view (EAddressbookView *view) if (length > 5) { GtkWidget *dialog; - /* XXX Use e_error_new(). */ + /* XXX Use e_alert_new(). */ /* XXX Provide a parent window. */ dialog = gtk_message_dialog_new ( NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index e80e65575f..efc97e682e 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -35,7 +35,7 @@ #include "eab-gui-util.h" #include "util/eab-book-util.h" #include <libebook/e-destination.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-html-utils.h" #include "shell/e-shell.h" #include "misc/e-image-chooser.h" @@ -86,7 +86,7 @@ eab_error_dialog (const gchar *msg, EBookStatus status) status_str = status_to_string [status]; if (status_str) - e_error_run_dialog_for_args (e_shell_get_active_window (NULL), + e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), "addressbook:generic-error", msg, _(status_str), NULL); } @@ -147,7 +147,7 @@ eab_load_error_dialog (GtkWidget *parent, ESource *source, EBookStatus status) } } - dialog = e_error_new_dialog_for_args ((GtkWindow *) parent, "addressbook:load-error", label_string, NULL); + dialog = e_alert_new_dialog_for_args ((GtkWindow *) parent, "addressbook:load-error", label_string, NULL); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_widget_show (dialog); @@ -189,13 +189,13 @@ eab_search_result_dialog (GtkWidget *parent, g_return_if_reached (); } - e_error_run_dialog_for_args ((GtkWindow *) parent, "addressbook:search-error", str, NULL); + e_alert_run_dialog_for_args ((GtkWindow *) parent, "addressbook:search-error", str, NULL); } gint eab_prompt_save_dialog (GtkWindow *parent) { - return e_error_run_dialog_for_args (parent, "addressbook:prompt-save", NULL); + return e_alert_run_dialog_for_args (parent, "addressbook:prompt-save", NULL); } static gchar * diff --git a/addressbook/util/addressbook.c b/addressbook/util/addressbook.c index 6e70e5f3f3..7fe470a4f3 100644 --- a/addressbook/util/addressbook.c +++ b/addressbook/util/addressbook.c @@ -30,7 +30,7 @@ #include <libedataserver/e-url.h> #include <libedataserverui/e-passwords.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "shell/e-shell.h" #include "addressbook.h" @@ -108,7 +108,7 @@ load_source_auth_cb (EBook *book, EBookStatus status, gpointer closure) goto done; } } else if (status == E_BOOK_ERROR_INVALID_SERVER_VERSION) { - e_error_run_dialog_for_args (e_shell_get_active_window (NULL), + e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), "addressbook:server-version", NULL); status = E_BOOK_ERROR_OK; diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 25010a649d..f7160451bb 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -48,7 +48,6 @@ #include "alarm-notify.h" #include "config-data.h" #include "util.h" -#include "e-util/e-error.h" #define d(x) diff --git a/calendar/gui/dialogs/cancel-comp.c b/calendar/gui/dialogs/cancel-comp.c index 69331f03a1..81ac2b6f82 100644 --- a/calendar/gui/dialogs/cancel-comp.c +++ b/calendar/gui/dialogs/cancel-comp.c @@ -28,7 +28,7 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "cancel-comp.h" @@ -105,7 +105,7 @@ cancel_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, g return FALSE; } - if (e_error_run_dialog_for_args (parent, id, NULL) == GTK_RESPONSE_YES) + if (e_alert_run_dialog_for_args (parent, id, NULL) == GTK_RESPONSE_YES) return TRUE; else return FALSE; diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 85f2304d8a..07d68806a5 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -65,7 +65,7 @@ #include "widgets/misc/e-attachment-view.h" #include "widgets/misc/e-attachment-paned.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #define COMP_EDITOR_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE \ @@ -833,7 +833,7 @@ action_save_cb (GtkAction *action, } if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) { - e_error_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL); + e_alert_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL); return; } @@ -1833,7 +1833,7 @@ prompt_and_save_changes (CompEditor *editor, gboolean send) switch (save_component_dialog (GTK_WINDOW(editor), priv->comp)) { case GTK_RESPONSE_YES: /* Save */ if (!e_cal_is_read_only (priv->client, &read_only, NULL) || read_only) { - e_error_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL); + e_alert_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET (editor)), "calendar:prompt-read-only-cal-editor", e_source_peek_name (e_cal_get_source (priv->client)), NULL); /* don't discard changes when selected readonly calendar */ return FALSE; } diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c index c205f3bd8d..d5f5929e6a 100644 --- a/calendar/gui/dialogs/delete-comp.c +++ b/calendar/gui/dialogs/delete-comp.c @@ -27,7 +27,7 @@ #endif #include <glib/gi18n.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "../calendar-config.h" #include "delete-comp.h" @@ -159,7 +159,7 @@ delete_component_dialog (ECalComponent *comp, arg0 = g_strdup_printf ("%d", n_comps); } - response = e_error_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (widget), id, arg0, NULL); + response = e_alert_run_dialog_for_args ((GtkWindow *) gtk_widget_get_toplevel (widget), id, arg0, NULL); g_free (arg0); return response == GTK_RESPONSE_YES; diff --git a/calendar/gui/dialogs/save-comp.c b/calendar/gui/dialogs/save-comp.c index 91f55a0ca7..dc698b4596 100644 --- a/calendar/gui/dialogs/save-comp.c +++ b/calendar/gui/dialogs/save-comp.c @@ -25,7 +25,7 @@ #include <config.h> #endif -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "save-comp.h" #include "comp-editor.h" @@ -50,13 +50,13 @@ save_component_dialog (GtkWindow *parent, ECalComponent *comp) case E_CAL_COMPONENT_EVENT: flags = comp_editor_get_flags (COMP_EDITOR(parent)); if (flags & COMP_EDITOR_MEETING) - return e_error_run_dialog_for_args (parent, "calendar:prompt-save-meeting", NULL); + return e_alert_run_dialog_for_args (parent, "calendar:prompt-save-meeting", NULL); else - return e_error_run_dialog_for_args (parent, "calendar:prompt-save-appointment", NULL); + return e_alert_run_dialog_for_args (parent, "calendar:prompt-save-appointment", NULL); case E_CAL_COMPONENT_TODO: - return e_error_run_dialog_for_args (parent, "calendar:prompt-save-task", NULL); + return e_alert_run_dialog_for_args (parent, "calendar:prompt-save-task", NULL); case E_CAL_COMPONENT_JOURNAL: - return e_error_run_dialog_for_args (parent, "calendar:prompt-save-memo", NULL); + return e_alert_run_dialog_for_args (parent, "calendar:prompt-save-memo", NULL); default: return GTK_RESPONSE_NO; } diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c index 13f016982e..1d663478c8 100644 --- a/calendar/gui/dialogs/send-comp.c +++ b/calendar/gui/dialogs/send-comp.c @@ -27,7 +27,7 @@ #endif #include <glib/gi18n-lib.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "send-comp.h" @@ -154,7 +154,7 @@ send_component_dialog (GtkWindow *parent, ECal *client, ECalComponent *comp, gbo strip_alarms = NULL; } - dialog = e_error_new_dialog_for_args (parent, id, NULL); + dialog = e_alert_new_dialog_for_args (parent, id, NULL); if (strip_alarms) sa_checkbox = add_checkbox (GTK_BOX (GTK_DIALOG (dialog)->vbox), _("Send my alarms with this event")); @@ -199,7 +199,7 @@ send_component_prompt_subject (GtkWindow *parent, ECal *client, ECalComponent *c return FALSE; } - if (e_error_run_dialog_for_args (parent, id, NULL) == GTK_RESPONSE_YES) + if (e_alert_run_dialog_for_args (parent, id, NULL) == GTK_RESPONSE_YES) return TRUE; else return FALSE; diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 885cd66a90..840c5526c6 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -32,7 +32,7 @@ #include <gdk/gdkkeysyms.h> #include <libedataserver/e-time-utils.h> #include <e-util/e-util.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-selection.h> #include <e-util/e-datetime-format.h> #include <e-util/e-dialog-utils.h> @@ -1202,7 +1202,7 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, if (e_cal_is_read_only (default_client, &readonly, NULL) && readonly) { GtkWidget *widget; - widget = e_error_new_dialog_for_args (parent, "calendar:prompt-read-only-cal", e_source_peek_name (e_cal_get_source (default_client)), NULL); + widget = e_alert_new_dialog_for_args (parent, "calendar:prompt-read-only-cal", e_source_peek_name (e_cal_get_source (default_client)), NULL); g_signal_connect ((GtkDialog *)widget, "response", G_CALLBACK (gtk_widget_destroy), widget); diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 1d6629aa61..22791b31c3 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -46,7 +46,7 @@ #include <widgets/menus/gal-define-views-dialog.h> #include "e-util/e-binding.h" #include "e-util/e-util.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util-private.h" #include "shell/e-shell.h" #include "dialogs/delete-error.h" @@ -1900,7 +1900,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) return; } - w = e_error_new_dialog_for_args (parent, "calendar:server-version", NULL); + w = e_alert_new_dialog_for_args (parent, "calendar:server-version", NULL); /*e_calendar_utils_show_error_silent (w); KILL-BONOBO */ g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(w)); g_signal_connect(w, "destroy", G_CALLBACK(non_intrusive_error_remove), id); @@ -1922,7 +1922,7 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) return; } - w = e_error_new_dialog_for_args (parent, "calendar:unable-to-load-the-calendar", e_cal_get_error_message (status), NULL); + w = e_alert_new_dialog_for_args (parent, "calendar:unable-to-load-the-calendar", e_cal_get_error_message (status), NULL); /*e_calendar_utils_show_error_silent (w); KILL-BONOBO */ g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(w)); g_signal_connect(w, "destroy", G_CALLBACK(non_intrusive_error_remove), id); @@ -1987,7 +1987,7 @@ default_client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar e_cal_open_async (ecal, FALSE); return; case E_CALENDAR_STATUS_INVALID_SERVER_VERSION: - e_error_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), "calendar:server-version", NULL); + e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))), "calendar:server-version", NULL); default: /* Make sure the source doesn't disappear on us */ g_object_ref (source); @@ -2067,7 +2067,7 @@ backend_error_cb (ECal *client, const gchar *message, gpointer data) return; } - dialog = (GtkDialog *)e_error_new(parent, "calendar:error-on-loading-the-calendar", uristr, message, NULL); + dialog = (GtkDialog *)e_alert_new(parent, "calendar:error-on-loading-the-calendar", uristr, message, NULL); /* e_calendar_utils_show_error_silent(GTK_WIDGET (dialog)); KILL-BONOBO */ g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(dialog)); @@ -2114,7 +2114,7 @@ backend_died_cb (ECal *ecal, gpointer data) return; } - w = e_error_new_dialog_for_args (parent, "calendar:backend_died", NULL); + w = e_alert_new_dialog_for_args (parent, "calendar:backend_died", NULL); /* e_calendar_utils_show_error_silent (w); KILL-BONOBO */ g_hash_table_insert (non_intrusive_error_table, (gpointer) id, g_object_ref(w)); g_signal_connect((GtkObject *)w, "destroy", G_CALLBACK(non_intrusive_error_remove), (gpointer) id); diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c index 6a09c36e03..b7b2b515ad 100644 --- a/calendar/importers/icalendar-importer.c +++ b/calendar/importers/icalendar-importer.c @@ -284,13 +284,13 @@ ivcal_import_items(gpointer d) case E_CAL_SOURCE_TYPE_EVENT: prepare_events (ici->icalcomp, NULL); if (!update_objects (ici->client, ici->icalcomp)) { - /* FIXME: e_error ... */; + /* FIXME: e_alert ... */; } break; case E_CAL_SOURCE_TYPE_TODO: prepare_tasks (ici->icalcomp, NULL); if (!update_objects (ici->client, ici->icalcomp)) { - /* FIXME: e_error ... */; + /* FIXME: e_alert ... */; } break; default: diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c index f7ea281f78..31c069a088 100644 --- a/composer/e-composer-actions.c +++ b/composer/e-composer-actions.c @@ -21,7 +21,7 @@ #include <errno.h> #include <fcntl.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> static void action_attach_cb (GtkAction *action, @@ -78,7 +78,7 @@ action_close_cb (GtkAction *action, if (subject == NULL || *subject == '\0') subject = _("Untitled Message"); - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( GTK_WINDOW (composer), "mail-composer:exit-unsaved", subject, NULL); @@ -162,16 +162,16 @@ action_save_cb (GtkAction *action, if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) { gint response; - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( GTK_WINDOW (composer), - E_ERROR_ASK_FILE_EXISTS_OVERWRITE, + E_ALERT_ASK_FILE_EXISTS_OVERWRITE, filename, NULL); if (response != GTK_RESPONSE_OK) return; } else { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (composer), - E_ERROR_NO_SAVE_FILE, filename, + E_ALERT_NO_SAVE_FILE, filename, g_strerror (errno_saved), NULL); return; } @@ -179,9 +179,9 @@ action_save_cb (GtkAction *action, close (fd); if (!gtkhtml_editor_save (editor, filename, TRUE, &error)) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (composer), - E_ERROR_NO_SAVE_FILE, + E_ALERT_NO_SAVE_FILE, filename, error->message, NULL); g_error_free (error); return; diff --git a/composer/e-composer-autosave.c b/composer/e-composer-autosave.c index 5a9c95705b..638ca9b019 100644 --- a/composer/e-composer-autosave.c +++ b/composer/e-composer-autosave.c @@ -22,7 +22,7 @@ #include <glib/gi18n.h> #include <glib/gstdio.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-util.h> #include <camel/camel-stream-fs.h> #include <camel/camel-stream-mem.h> @@ -123,7 +123,7 @@ composer_autosave_finish_cb (EMsgComposer *composer, e_composer_autosave_snapshot_finish (composer, result, &error); if (error != NULL) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (composer), "mail-composer:no-autosave", "", error->message, NULL); diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 77a7014c47..07bec1ac13 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -47,7 +47,7 @@ #include <gconf/gconf-client.h> #include "e-util/e-dialog-utils.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-mktemp.h" #include "e-util/e-plugin-ui.h" #include "e-util/e-util-private.h" @@ -174,7 +174,7 @@ emcu_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, c va_list ap; gint button; GConfClient *gconf = gconf_client_get_default (); - EError *error = NULL; + EAlert *alert = NULL; if (promptkey && !gconf_client_get_bool(gconf, promptkey, NULL)) { @@ -183,11 +183,11 @@ emcu_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, c } va_start(ap, arg0); - error = e_error_newv(tag, arg0, ap); + alert = e_alert_newv(tag, arg0, ap); va_end(ap); - mbox = e_error_new_dialog (parent, error); - e_error_free (error); + mbox = e_alert_new_dialog (parent, alert); + e_alert_free (alert); if (promptkey) { check = gtk_check_button_new_with_mnemonic (_("_Do not show this message again.")); @@ -1085,7 +1085,7 @@ skip_content: camel_object_unref (new); if (ex.id != CAMEL_EXCEPTION_USER_CANCEL) { - e_error_run_dialog_for_args ((GtkWindow *)composer, "mail-composer:no-build-message", + e_alert_run_dialog_for_args ((GtkWindow *)composer, "mail-composer:no-build-message", camel_exception_get_description (&ex), NULL); } @@ -1377,7 +1377,7 @@ autosave_load_draft_cb (EMsgComposer *composer, g_unlink (filename); else { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (composer), "mail-composer:no-autosave", (filename != NULL) ? filename : "", @@ -4020,7 +4020,7 @@ e_msg_composer_check_autosave (GtkWindow *parent) } /* Ask if the user wants to recover the orphaned files. */ - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( parent, "mail-composer:recover-autosave", NULL); /* Based on the user's response, recover or delete them. */ diff --git a/e-util/Makefile.am b/e-util/Makefile.am index c0b12d63c1..51fa43428e 100644 --- a/e-util/Makefile.am +++ b/e-util/Makefile.am @@ -22,7 +22,7 @@ eutilinclude_HEADERS = \ e-datetime-format.h \ e-dialog-utils.h \ e-dialog-widgets.h \ - e-error.h \ + e-alert.h \ e-event.h \ e-file-utils.h \ e-folder-map.h \ @@ -95,7 +95,7 @@ libeutil_la_SOURCES = \ e-datetime-format.c \ e-dialog-utils.c \ e-dialog-widgets.c \ - e-error.c \ + e-alert.c \ e-event.c \ e-file-utils.c \ e-folder-map.c \ diff --git a/e-util/e-error.c b/e-util/e-alert.c index 47d7548c70..cc7488744e 100644 --- a/e-util/e-error.c +++ b/e-util/e-alert.c @@ -35,35 +35,35 @@ #include "e-util.h" #include "e-util-private.h" -#include "e-error.h" +#include "e-alert.h" #define d(x) -struct _EError +struct _EAlert { gchar *tag; GPtrArray *args; }; void -e_error_free (EError *error) +e_alert_free (EAlert *alert) { - if (error == NULL) + if (alert == NULL) return; - g_free (error->tag); + g_free (alert->tag); /* arg strings will be freed automatically since we set a free func when * creating the ptr array */ - g_ptr_array_free (error->args, TRUE); + g_ptr_array_free (alert->args, TRUE); } -struct _e_error_button { - struct _e_error_button *next; +struct _e_alert_button { + struct _e_alert_button *next; const gchar *stock; const gchar *label; gint response; }; -struct _e_error { +struct _e_alert { guint32 flags; const gchar *id; gint type; @@ -73,24 +73,24 @@ struct _e_error { const gchar *secondary; const gchar *help_uri; gboolean scroll; - struct _e_error_button *buttons; + struct _e_alert_button *buttons; }; -struct _e_error_table { +struct _e_alert_table { const gchar *domain; const gchar *translation_domain; - GHashTable *errors; + GHashTable *alerts; }; -static GHashTable *error_table; +static GHashTable *alert_table; /* ********************************************************************** */ -static struct _e_error_button default_ok_button = { +static struct _e_alert_button default_ok_button = { NULL, "gtk-ok", NULL, GTK_RESPONSE_OK }; -static struct _e_error default_errors[] = { +static struct _e_alert default_alerts[] = { { GTK_DIALOG_MODAL, "error", 3, GTK_RESPONSE_OK, N_("Evolution Error"), "{0}", "{1}", NULL, FALSE, &default_ok_button }, { GTK_DIALOG_MODAL, "error-primary", 3, GTK_RESPONSE_OK, N_("Evolution Error"), "{0}", NULL, NULL, FALSE, &default_ok_button }, { GTK_DIALOG_MODAL, "warning", 1, GTK_RESPONSE_OK, N_("Evolution Warning"), "{0}", "{1}", NULL, FALSE, &default_ok_button }, @@ -170,9 +170,9 @@ ee_load(const gchar *path) { xmlDocPtr doc = NULL; xmlNodePtr root, error, scan; - struct _e_error *e; - struct _e_error_button *lastbutton; - struct _e_error_table *table; + struct _e_alert *e; + struct _e_alert_button *lastbutton; + struct _e_alert_table *table; gchar *tmp; d(printf("loading error file %s\n", path)); @@ -192,14 +192,14 @@ ee_load(const gchar *path) return; } - table = g_hash_table_lookup(error_table, tmp); + table = g_hash_table_lookup(alert_table, tmp); if (table == NULL) { gchar *tmp2; table = g_malloc0(sizeof(*table)); table->domain = g_strdup(tmp); - table->errors = g_hash_table_new(g_str_hash, g_str_equal); - g_hash_table_insert(error_table, (gpointer) table->domain, table); + table->alerts = g_hash_table_new(g_str_hash, g_str_equal); + g_hash_table_insert(alert_table, (gpointer) table->domain, table); tmp2 = (gchar *)xmlGetProp(root, (const guchar *)"translation-domain"); if (tmp2) { @@ -227,7 +227,7 @@ ee_load(const gchar *path) e->scroll = FALSE; xmlFree(tmp); - lastbutton = (struct _e_error_button *)&e->buttons; + lastbutton = (struct _e_alert_button *)&e->buttons; tmp = (gchar *)xmlGetProp(error, (const guchar *)"modal"); if (tmp) { @@ -277,7 +277,7 @@ ee_load(const gchar *path) xmlFree(tmp); } } else if (!strcmp((gchar *)scan->name, "button")) { - struct _e_error_button *b; + struct _e_alert_button *b; gchar *label = NULL; gchar *stock = NULL; @@ -312,7 +312,7 @@ ee_load(const gchar *path) } } - g_hash_table_insert(table->errors, (gpointer) e->id, e); + g_hash_table_insert(table->alerts, (gpointer) e->id, e); } } @@ -325,23 +325,23 @@ ee_load_tables(void) GDir *dir; const gchar *d; gchar *base; - struct _e_error_table *table; + struct _e_alert_table *table; gint i; - if (error_table != NULL) + if (alert_table != NULL) return; - error_table = g_hash_table_new(g_str_hash, g_str_equal); + alert_table = g_hash_table_new(g_str_hash, g_str_equal); - /* setup system error types */ + /* setup system alert types */ table = g_malloc0(sizeof(*table)); table->domain = "builtin"; - table->errors = g_hash_table_new(g_str_hash, g_str_equal); - for (i = 0; i < G_N_ELEMENTS (default_errors); i++) - g_hash_table_insert(table->errors, (gpointer) default_errors[i].id, &default_errors[i]); - g_hash_table_insert(error_table, (gpointer) table->domain, table); + table->alerts = g_hash_table_new(g_str_hash, g_str_equal); + for (i = 0; i < G_N_ELEMENTS (default_alerts); i++) + g_hash_table_insert(table->alerts, (gpointer) default_alerts[i].id, &default_alerts[i]); + g_hash_table_insert(alert_table, (gpointer) table->domain, table); - /* look for installed error tables */ + /* look for installed alert tables */ base = g_build_filename (EVOLUTION_PRIVDATADIR, "errors", NULL); dir = g_dir_open(base, 0, NULL); if (dir == NULL) { @@ -412,7 +412,7 @@ ee_build_label(GString *out, const gchar *fmt, GPtrArray *args, } static void -ee_response(GtkWidget *w, guint button, struct _e_error *e) +ee_response(GtkWidget *w, guint button, struct _e_alert *e) { if (button == GTK_RESPONSE_HELP) { g_signal_stop_emission_by_name(w, "response"); @@ -420,12 +420,12 @@ ee_response(GtkWidget *w, guint button, struct _e_error *e) } } -EError * -e_error_newv(const gchar *tag, const gchar *arg0, va_list ap) +EAlert * +e_alert_newv(const gchar *tag, const gchar *arg0, va_list ap) { gchar *tmp; GPtrArray *args; - EError *err = g_slice_new0 (EError); + EAlert *err = g_slice_new0 (EAlert); err->tag = g_strdup (tag); err->args = g_ptr_array_new_with_free_func (g_free); @@ -439,35 +439,35 @@ e_error_newv(const gchar *tag, const gchar *arg0, va_list ap) } /** - * e_error_new: - * @tag: error identifier - * @arg0: The first argument for the error formatter. The list must + * e_alert_new: + * @tag: alert identifier + * @arg0: The first argument for the alert formatter. The list must * be NULL terminated. * - * Creates a new EError. The @tag argument is used to determine - * which error to use, it is in the format domain:error-id. The NULL + * Creates a new EAlert. The @tag argument is used to determine + * which alert to use, it is in the format domain:alert-id. The NULL * terminated list of arguments, starting with @arg0 is used to fill - * out the error definition. + * out the alert definition. **/ -EError * -e_error_new(const gchar *tag, const gchar *arg0, ...) +EAlert * +e_alert_new(const gchar *tag, const gchar *arg0, ...) { - EError *e; + EAlert *e; va_list ap; va_start(ap, arg0); - e = e_error_newv(tag, arg0, ap); + e = e_alert_newv(tag, arg0, ap); va_end(ap); return e; } GtkWidget * -e_error_new_dialog(GtkWindow *parent, EError *error) +e_alert_new_dialog(GtkWindow *parent, EAlert *alert) { - struct _e_error_table *table; - struct _e_error *e; - struct _e_error_button *b; + struct _e_alert_table *table; + struct _e_alert *e; + struct _e_alert_button *b; GtkWidget *hbox, *w, *scroll=NULL; GtkWidget *action_area; GtkWidget *content_area; @@ -476,9 +476,9 @@ e_error_new_dialog(GtkWindow *parent, EError *error) GtkDialog *dialog; gchar *str, *perr=NULL, *serr=NULL; - g_return_val_if_fail (error != NULL, NULL); + g_return_val_if_fail (alert != NULL, NULL); - if (error_table == NULL) + if (alert_table == NULL) ee_load_tables(); dialog = (GtkDialog *)gtk_dialog_new(); @@ -498,17 +498,17 @@ e_error_new_dialog(GtkWindow *parent, EError *error) "Something called %s() with a NULL parent window. " "This is no longer legal, please fix it.", G_STRFUNC); - domain = alloca(strlen(error->tag)+1); - strcpy(domain, error->tag); + domain = alloca(strlen(alert->tag)+1); + strcpy(domain, alert->tag); id = strchr(domain, ':'); if (id) *id++ = 0; if ( id == NULL - || (table = g_hash_table_lookup(error_table, domain)) == NULL - || (e = g_hash_table_lookup(table->errors, id)) == NULL) { - /* setup a dummy error */ - str = g_strdup_printf(_("Internal error, unknown error '%s' requested"), error->tag); + || (table = g_hash_table_lookup(alert_table, domain)) == NULL + || (e = g_hash_table_lookup(table->alerts, id)) == NULL) { + /* setup a dummy alert */ + str = g_strdup_printf(_("Internal error, unknown error '%s' requested"), alert->tag); tmp = g_strdup_printf("<span weight=\"bold\">%s</span>", str); g_free(str); w = gtk_label_new(NULL); @@ -568,7 +568,7 @@ e_error_new_dialog(GtkWindow *parent, EError *error) out = g_string_new(""); if (e->title && *e->title) { - ee_build_label(out, e->title, error->args, FALSE); + ee_build_label(out, e->title, alert->args, FALSE); gtk_window_set_title((GtkWindow *)dialog, out->str); g_string_truncate(out, 0); } else @@ -576,19 +576,19 @@ e_error_new_dialog(GtkWindow *parent, EError *error) if (e->primary) { g_string_append(out, "<span weight=\"bold\" size=\"larger\">"); - ee_build_label(out, e->primary, error->args, TRUE); + ee_build_label(out, e->primary, alert->args, TRUE); g_string_append(out, "</span>\n\n"); oerr = g_string_new(""); - ee_build_label(oerr, e->primary, error->args, FALSE); + ee_build_label(oerr, e->primary, alert->args, FALSE); perr = g_strdup (oerr->str); g_string_free (oerr, TRUE); } else perr = g_strdup (gtk_window_get_title (GTK_WINDOW (dialog))); if (e->secondary) { - ee_build_label(out, e->secondary, error->args, TRUE); + ee_build_label(out, e->secondary, alert->args, TRUE); oerr = g_string_new(""); - ee_build_label(oerr, e->secondary, error->args, TRUE); + ee_build_label(oerr, e->secondary, alert->args, TRUE); serr = g_strdup (oerr->str); g_string_free (oerr, TRUE); } @@ -620,12 +620,12 @@ e_error_new_dialog(GtkWindow *parent, EError *error) } gint -e_error_run_dialog(GtkWindow *parent, EError *error) +e_alert_run_dialog(GtkWindow *parent, EAlert *alert) { GtkWidget *w; gint res; - w = e_error_new_dialog(parent, error); + w = e_alert_new_dialog(parent, alert); res = gtk_dialog_run((GtkDialog *)w); gtk_widget_destroy(w); @@ -634,7 +634,7 @@ e_error_run_dialog(GtkWindow *parent, EError *error) } /** - * e_error_dialog_count_buttons: + * e_alert_dialog_count_buttons: * @dialog: a #GtkDialog * * Counts the number of buttons in @dialog's action area. @@ -642,7 +642,7 @@ e_error_run_dialog(GtkWindow *parent, EError *error) * Returns: number of action area buttons **/ guint -e_error_dialog_count_buttons (GtkDialog *dialog) +e_alert_dialog_count_buttons (GtkDialog *dialog) { GtkWidget *container; GList *children, *iter; @@ -664,35 +664,35 @@ e_error_dialog_count_buttons (GtkDialog *dialog) } GtkWidget * -e_error_new_dialog_for_args (GtkWindow *parent, const gchar *tag, const gchar *arg0, ...) +e_alert_new_dialog_for_args (GtkWindow *parent, const gchar *tag, const gchar *arg0, ...) { GtkWidget *w; - EError *e; + EAlert *e; va_list ap; va_start(ap, arg0); - e = e_error_newv(tag, arg0, ap); + e = e_alert_newv(tag, arg0, ap); va_end(ap); - w = e_error_new_dialog (parent, e); - e_error_free (e); + w = e_alert_new_dialog (parent, e); + e_alert_free (e); return w; } gint -e_error_run_dialog_for_args (GtkWindow *parent, const gchar *tag, const gchar *arg0, ...) +e_alert_run_dialog_for_args (GtkWindow *parent, const gchar *tag, const gchar *arg0, ...) { - EError *e; + EAlert *e; va_list ap; gint response; va_start(ap, arg0); - e = e_error_newv(tag, arg0, ap); + e = e_alert_newv(tag, arg0, ap); va_end(ap); - response = e_error_run_dialog (parent, e); - e_error_free (e); + response = e_alert_run_dialog (parent, e); + e_alert_free (e); return response; } diff --git a/e-util/e-alert.h b/e-util/e-alert.h new file mode 100644 index 0000000000..d38f0a4c62 --- /dev/null +++ b/e-util/e-alert.h @@ -0,0 +1,66 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see <http://www.gnu.org/licenses/> + * + * + * Authors: + * Michael Zucchi <notzed@ximian.com> + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * + */ + +#ifndef _E_ALERT_H +#define _E_ALERT_H + +#include <stdarg.h> +#include <gtk/gtk.h> + +/* + * Some standard alerts, if these are altered or added to, + * update devel-docs/misc/errors.txt + * + * Several more basic ones are needed. + */ + +#define E_ALERT_INFO "builtin:info" +#define E_ALERT_INFO_PRIMARY "builtin:info-primary" +#define E_ALERT_WARNING "builtin:warning" +#define E_ALERT_WARNING_PRIMARY "builtin:warning-primary" +#define E_ALERT_ERROR "builtin:error" +#define E_ALERT_ERROR_PRIMARY "builtin:error-primary" + +/* takes filename, returns OK if yes */ +#define E_ALERT_ASK_FILE_EXISTS_OVERWRITE "system:ask-save-file-exists-overwrite" +/* takes filename, reason */ +#define E_ALERT_NO_SAVE_FILE "system:no-save-file" +/* takes filename, reason */ +#define E_ALERT_NO_LOAD_FILE "system:no-save-file" + +typedef struct _EAlert EAlert; + +EAlert *e_alert_new(const gchar *tag, const gchar *arg0, ...); +EAlert *e_alert_newv(const gchar *tag, const gchar *arg0, va_list ap); + +void e_alert_free (EAlert *alert); + +/* Convenience functions for displaying the alert in a GtkDialog */ +GtkWidget *e_alert_new_dialog(GtkWindow *parent, EAlert *alert); +GtkWidget *e_alert_new_dialog_for_args (GtkWindow *parent, const gchar *tag, const gchar *arg0, ...); + +gint e_alert_run_dialog(GtkWindow *parent, EAlert *alert); +gint e_alert_run_dialog_for_args (GtkWindow *parent, const gchar *tag, const gchar *arg0, ...); + +guint e_alert_dialog_count_buttons (GtkDialog *dialog); + +#endif /* !_E_ALERT_H */ diff --git a/e-util/e-error.h b/e-util/e-error.h deleted file mode 100644 index 8068668a26..0000000000 --- a/e-util/e-error.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see <http://www.gnu.org/licenses/> - * - * - * Authors: - * Michael Zucchi <notzed@ximian.com> - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * - */ - -#ifndef _E_ERROR_H -#define _E_ERROR_H - -#include <stdarg.h> -#include <gtk/gtk.h> - -/* - * Some standard errors, if these are altered or added to, - * update devel-docs/misc/errors.txt - * - * Several more basic ones are needed. - */ - -#define E_ERROR_INFO "builtin:info" -#define E_ERROR_INFO_PRIMARY "builtin:info-primary" -#define E_ERROR_WARNING "builtin:warning" -#define E_ERROR_WARNING_PRIMARY "builtin:warning-primary" -#define E_ERROR_ERROR "builtin:error" -#define E_ERROR_ERROR_PRIMARY "builtin:error-primary" - -/* takes filename, returns OK if yes */ -#define E_ERROR_ASK_FILE_EXISTS_OVERWRITE "system:ask-save-file-exists-overwrite" -/* takes filename, reason */ -#define E_ERROR_NO_SAVE_FILE "system:no-save-file" -/* takes filename, reason */ -#define E_ERROR_NO_LOAD_FILE "system:no-save-file" - -typedef struct _EError EError; - -EError *e_error_new(const gchar *tag, const gchar *arg0, ...); -EError *e_error_newv(const gchar *tag, const gchar *arg0, va_list ap); - -void e_error_free (EError *error); - -/* Convenience functions for displaying the error in a GtkDialog */ -GtkWidget *e_error_new_dialog(GtkWindow *parent, EError *error); -GtkWidget *e_error_new_dialog_for_args (GtkWindow *parent, const gchar *tag, const gchar *arg0, ...); - -gint e_error_run_dialog(GtkWindow *parent, EError *error); -gint e_error_run_dialog_for_args (GtkWindow *parent, const gchar *tag, const gchar *arg0, ...); - -guint e_error_dialog_count_buttons (GtkDialog *dialog); - -#endif /* !_E_ERROR_H */ diff --git a/e-util/e-non-intrusive-error-dialog.h b/e-util/e-non-intrusive-error-dialog.h index 4c38808ea2..2b03a7ec7c 100644 --- a/e-util/e-non-intrusive-error-dialog.h +++ b/e-util/e-non-intrusive-error-dialog.h @@ -23,7 +23,6 @@ #define __E_ERROR_DIALOG_H__ #include <glib-object.h> -#include "e-error.h" #include "e-icon-factory.h" #include "e-logger.h" diff --git a/e-util/e-util.c b/e-util/e-util.c index b5e9f101c4..ade2b38fbf 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -1426,6 +1426,7 @@ e_util_guess_mime_type (const gchar *filename, gboolean localfile) return mime_type; } +/* XXX: Should e-util/ really depend on filter/ ?? */ GSList * e_util_get_category_filter_options (void) { diff --git a/filter/e-filter-datespec.c b/filter/e-filter-datespec.c index f85de14953..00aaad7e01 100644 --- a/filter/e-filter-datespec.c +++ b/filter/e-filter-datespec.c @@ -33,7 +33,7 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util.h" #include "e-util/e-util-private.h" @@ -299,17 +299,17 @@ button_clicked (GtkButton *button, EFilterDatespec *fds) static gboolean filter_datespec_validate (EFilterElement *element, - EError **error) + EAlert **alert) { EFilterDatespec *fds = E_FILTER_DATESPEC (element); gboolean valid; - g_warn_if_fail (error == NULL || *error == NULL); + g_warn_if_fail (alert == NULL || *alert == NULL); valid = fds->type != FDST_UNKNOWN; if (!valid) { - if (error) - *error = e_error_new ("filter:no-date", NULL); + if (alert) + *alert = e_alert_new ("filter:no-date", NULL); } return valid; diff --git a/filter/e-filter-element.c b/filter/e-filter-element.c index 2165ea22c9..61ca68295c 100644 --- a/filter/e-filter-element.c +++ b/filter/e-filter-element.c @@ -42,7 +42,7 @@ static gpointer parent_class; static gboolean filter_element_validate (EFilterElement *element, - EError **error) + EAlert **alert) { return TRUE; } @@ -249,7 +249,7 @@ e_filter_element_new (void) gboolean e_filter_element_validate (EFilterElement *element, - EError **error) + EAlert **alert) { EFilterElementClass *class; @@ -258,7 +258,7 @@ e_filter_element_validate (EFilterElement *element, class = E_FILTER_ELEMENT_GET_CLASS (element); g_return_val_if_fail (class->validate != NULL, FALSE); - return class->validate (element, error); + return class->validate (element, alert); } gint diff --git a/filter/e-filter-element.h b/filter/e-filter-element.h index e7abc77d6f..9abd83ca0a 100644 --- a/filter/e-filter-element.h +++ b/filter/e-filter-element.h @@ -27,7 +27,7 @@ #include <gtk/gtk.h> #include <libxml/parser.h> #include <libxml/xmlmemory.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #define E_TYPE_FILTER_ELEMENT \ (e_filter_element_get_type ()) @@ -69,7 +69,7 @@ struct _EFilterElementClass { GObjectClass parent_class; gboolean (*validate) (EFilterElement *element, - EError **error); + EAlert **alert); gint (*eq) (EFilterElement *element_a, EFilterElement *element_b); @@ -96,7 +96,7 @@ EFilterElement *e_filter_element_new (void); void e_filter_element_set_data (EFilterElement *element, gpointer data); gboolean e_filter_element_validate (EFilterElement *element, - EError **error); + EAlert **alert); gint e_filter_element_eq (EFilterElement *element_a, EFilterElement *element_b); void e_filter_element_xml_create (EFilterElement *element, diff --git a/filter/e-filter-file.c b/filter/e-filter-file.c index b518f91f1b..2a622f8e93 100644 --- a/filter/e-filter-file.c +++ b/filter/e-filter-file.c @@ -31,7 +31,7 @@ #include <libedataserver/e-sexp.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-filter-file.h" #include "e-filter-part.h" @@ -65,15 +65,15 @@ filter_file_finalize (GObject *object) static gboolean filter_file_validate (EFilterElement *element, - EError **error) + EAlert **alert) { EFilterFile *file = E_FILTER_FILE (element); - g_warn_if_fail (error == NULL || *error == NULL); + g_warn_if_fail (alert == NULL || *alert == NULL); if (!file->path) { - if (error) - *error = e_error_new ("filter:no-file", NULL); + if (alert) + *alert = e_alert_new ("filter:no-file", NULL); return FALSE; } @@ -81,8 +81,8 @@ filter_file_validate (EFilterElement *element, if (g_strcmp0 (file->type, "file") == 0) { if (!g_file_test (file->path, G_FILE_TEST_IS_REGULAR)) { - if (error) - *error = e_error_new ( "filter:bad-file", + if (alert) + *alert = e_alert_new ( "filter:bad-file", file->path, NULL); return FALSE; } diff --git a/filter/e-filter-input.c b/filter/e-filter-input.c index 9166d9272f..f8315d99e3 100644 --- a/filter/e-filter-input.c +++ b/filter/e-filter-input.c @@ -34,7 +34,7 @@ #include <libedataserver/e-sexp.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-filter-input.h" @@ -70,12 +70,12 @@ filter_input_finalize (GObject *object) static gboolean filter_input_validate (EFilterElement *element, - EError **error) + EAlert **alert) { EFilterInput *input = E_FILTER_INPUT (element); gboolean valid = TRUE; - g_warn_if_fail (error == NULL || *error == NULL); + g_warn_if_fail (alert == NULL || *alert == NULL); if (input->values && !strcmp (input->type, "regex")) { const gchar *pattern; @@ -85,7 +85,7 @@ filter_input_validate (EFilterElement *element, pattern = input->values->data; if ((regerr = regcomp (®expat, pattern, REG_EXTENDED | REG_NEWLINE | REG_ICASE))) { - if (error) { + if (alert) { gsize reglen; gchar *regmsg; @@ -95,7 +95,7 @@ filter_input_validate (EFilterElement *element, regmsg = g_malloc0 (reglen + 1); regerror (regerr, ®expat, regmsg, reglen); - *error = e_error_new ("filter:bad-regexp", + *alert = e_alert_new ("filter:bad-regexp", pattern, regmsg, NULL); g_free (regmsg); } diff --git a/filter/e-filter-part.c b/filter/e-filter-part.c index 3128f58d31..a999b8adb6 100644 --- a/filter/e-filter-part.c +++ b/filter/e-filter-part.c @@ -105,7 +105,7 @@ e_filter_part_new (void) gboolean e_filter_part_validate (EFilterPart *part, - EError **error) + EAlert **alert) { GList *link; @@ -115,7 +115,7 @@ e_filter_part_validate (EFilterPart *part, for (link = part->elements; link != NULL; link = g_list_next (link)) { EFilterElement *element = link->data; - if (!e_filter_element_validate (element, error)) + if (!e_filter_element_validate (element, alert)) return FALSE; } diff --git a/filter/e-filter-part.h b/filter/e-filter-part.h index fe1f3cc8cf..dcf1e8b4ca 100644 --- a/filter/e-filter-part.h +++ b/filter/e-filter-part.h @@ -25,7 +25,10 @@ #define E_FILTER_PART_H #include <gtk/gtk.h> -#include "e-filter-input.h" +#include <libxml/parser.h> +#include <libxml/xmlmemory.h> +#include "e-util/e-alert.h" +#include "e-filter-element.h" /* Standard GObject macros */ #define E_TYPE_FILTER_PART \ @@ -71,7 +74,7 @@ struct _EFilterPartClass { GType e_filter_part_get_type (void); EFilterPart * e_filter_part_new (void); gboolean e_filter_part_validate (EFilterPart *part, - EError **error); + EAlert **alert); gint e_filter_part_eq (EFilterPart *part_a, EFilterPart *part_b); gint e_filter_part_xml_create (EFilterPart *part, diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c index fb496a5b87..61d6270ab1 100644 --- a/filter/e-filter-rule.c +++ b/filter/e-filter-rule.c @@ -30,7 +30,7 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-filter-rule.h" #include "e-rule-context.h" @@ -239,12 +239,12 @@ more_parts (GtkWidget *button, if (data->rule->parts) { EFilterPart *part; GList *l; - EError *error = NULL; + EAlert *alert = NULL; l = g_list_last (data->rule->parts); part = l->data; - if (!e_filter_part_validate (part, &error)) { - e_error_run_dialog (GTK_WINDOW (gtk_widget_get_toplevel (button)), error); + if (!e_filter_part_validate (part, &alert)) { + e_alert_run_dialog (GTK_WINDOW (gtk_widget_get_toplevel (button)), alert); return; } } @@ -356,15 +356,15 @@ filter_rule_finalize (GObject *object) static gint filter_rule_validate (EFilterRule *rule, - EError **error) + EAlert **alert) { gint valid = TRUE; GList *parts; - g_warn_if_fail (error == NULL || *error == NULL); + g_warn_if_fail (alert == NULL || *alert == NULL); if (!rule->name || !*rule->name) { - if (error) - *error = e_error_new ("filter:no-name", NULL); + if (alert) + *alert = e_alert_new ("filter:no-name", NULL); return FALSE; } @@ -373,7 +373,7 @@ filter_rule_validate (EFilterRule *rule, parts = rule->parts; valid = parts != NULL; while (parts && valid) { - valid = e_filter_part_validate ((EFilterPart *) parts->data, error); + valid = e_filter_part_validate ((EFilterPart *) parts->data, alert); parts = parts->next; } @@ -912,7 +912,7 @@ e_filter_rule_set_source (EFilterRule *rule, gint e_filter_rule_validate (EFilterRule *rule, - EError **error) + EAlert **alert) { EFilterRuleClass *class; @@ -921,7 +921,7 @@ e_filter_rule_validate (EFilterRule *rule, class = E_FILTER_RULE_GET_CLASS (rule); g_return_val_if_fail (class->validate != NULL, FALSE); - return class->validate (rule, error); + return class->validate (rule, alert); } gint diff --git a/filter/e-filter-rule.h b/filter/e-filter-rule.h index 5f0c9a519f..924fb14074 100644 --- a/filter/e-filter-rule.h +++ b/filter/e-filter-rule.h @@ -96,7 +96,7 @@ struct _EFilterRuleClass { /* virtual methods */ gint (*validate) (EFilterRule *rule, - EError **error); + EAlert **alert); gint (*eq) (EFilterRule *rule_a, EFilterRule *rule_b); @@ -126,7 +126,7 @@ void e_filter_rule_set_name (EFilterRule *rule, void e_filter_rule_set_source (EFilterRule *rule, const gchar *source); gint e_filter_rule_validate (EFilterRule *rule, - EError **error); + EAlert **alert); gint e_filter_rule_eq (EFilterRule *rule_a, EFilterRule *rule_b); xmlNodePtr e_filter_rule_xml_encode (EFilterRule *rule); diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c index 67a1df2293..2ad1acc3c2 100644 --- a/filter/e-rule-context.c +++ b/filter/e-rule-context.c @@ -40,7 +40,7 @@ #include <libedataserver/e-xml-utils.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-xml-utils.h" #include "e-filter-code.h" @@ -92,15 +92,15 @@ new_rule_response (GtkWidget *dialog, if (button == GTK_RESPONSE_OK) { EFilterRule *rule = g_object_get_data ((GObject *) dialog, "rule"); gchar *user = g_object_get_data ((GObject *) dialog, "path"); - EError *error = NULL; + EAlert *alert = NULL; - if (!e_filter_rule_validate (rule, &error)) { - e_error_run_dialog (GTK_WINDOW (dialog), error); - e_error_free (error); + if (!e_filter_rule_validate (rule, &alert)) { + e_alert_run_dialog (GTK_WINDOW (dialog), alert); + e_alert_free (alert); } if (e_rule_context_find_rule (context, rule->name, rule->source)) { - e_error_run_dialog_for_args ((GtkWindow *)dialog, + e_alert_run_dialog_for_args ((GtkWindow *)dialog, "filter:bad-name-notunique", rule->name, NULL); diff --git a/filter/e-rule-editor.c b/filter/e-rule-editor.c index a919fad7d0..c6170f09e8 100644 --- a/filter/e-rule-editor.c +++ b/filter/e-rule-editor.c @@ -31,7 +31,7 @@ #include <glib/gi18n.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util-private.h" #include "e-util/e-util.h" @@ -143,15 +143,15 @@ add_editor_response (GtkWidget *dialog, gint button, ERuleEditor *editor) GtkTreeIter iter; if (button == GTK_RESPONSE_OK) { - EError *error = NULL; - if (!e_filter_rule_validate (editor->edit, &error)) { - e_error_run_dialog (GTK_WINDOW (dialog), error); - e_error_free (error); + EAlert *alert = NULL; + if (!e_filter_rule_validate (editor->edit, &alert)) { + e_alert_run_dialog (GTK_WINDOW (dialog), alert); + e_alert_free (alert); return; } if (e_rule_context_find_rule (editor->context, editor->edit->name, editor->edit->source)) { - e_error_run_dialog_for_args ((GtkWindow *)dialog, + e_alert_run_dialog_for_args ((GtkWindow *)dialog, "filter:bad-name-notunique", editor->edit->name, NULL); return; @@ -291,16 +291,16 @@ edit_editor_response (GtkWidget *dialog, gint button, ERuleEditor *editor) gint pos; if (button == GTK_RESPONSE_OK) { - EError *error = NULL; - if (!e_filter_rule_validate (editor->edit, &error)) { - e_error_run_dialog (GTK_WINDOW (dialog), error); - e_error_free (error); + EAlert *alert = NULL; + if (!e_filter_rule_validate (editor->edit, &alert)) { + e_alert_run_dialog (GTK_WINDOW (dialog), alert); + e_alert_free (alert); return; } rule = e_rule_context_find_rule (editor->context, editor->edit->name, editor->edit->source); if (rule != NULL && rule != editor->current) { - e_error_run_dialog_for_args ((GtkWindow *)dialog, + e_alert_run_dialog_for_args ((GtkWindow *)dialog, "filter:bad-name-notunique", rule->name, NULL); diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index d4ab07f2f4..e7a294f349 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-error.h" +#include "e-util/e-alert.h" #include "filter/e-filter-rule.h" #include "mail/e-mail-browser.h" @@ -96,7 +96,7 @@ e_mail_reader_confirm_delete (EMailReader *reader) if (!prompt_delete_in_vfolder) return TRUE; - dialog = e_error_new_dialog_for_args ( + dialog = e_alert_new_dialog_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 d3c3b78514..2cd24a9ae2 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-error.h" +#include "e-util/e-alert.h" #include "e-util/e-account-utils.h" #include "e-util/e-signature-list.h" #include "e-util/e-signature-utils.h" @@ -594,7 +594,7 @@ emae_display_license (EMAccountEditor *emae, CamelProvider *prov) gtk_text_view_set_editable ((GtkTextView *)w, FALSE); response = gtk_dialog_run ((GtkDialog *)dialog); } else { - e_error_run_dialog_for_args (emae->editor ? (GtkWindow *)gtk_widget_get_toplevel (emae->editor) : e_shell_get_active_window (NULL), + e_alert_run_dialog_for_args (emae->editor ? (GtkWindow *)gtk_widget_get_toplevel (emae->editor) : e_shell_get_active_window (NULL), "mail:no-load-license", prov->license_file, NULL); } @@ -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_error_new_dialog_for_args (emae->editor ? (GtkWindow *)gtk_widget_get_toplevel (emae->editor) : (GtkWindow *)gtk_widget_get_toplevel (w), + service->check_dialog = e_alert_new_dialog_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 62dbb4b27d..7a6034b296 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-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util.h" #include "shell/e-shell.h" @@ -410,12 +410,12 @@ composer_get_message (EMsgComposer *composer, gboolean save_html_object_data) /* I'm sensing a lack of love, er, I mean recipients. */ if (num == 0 && num_post == 0) { - e_error_run_dialog_for_args ((GtkWindow *)composer, "mail:send-no-recipients", NULL); + e_alert_run_dialog_for_args ((GtkWindow *)composer, "mail:send-no-recipients", NULL); goto finished; } if (invalid_addrs) { - if (e_error_run_dialog_for_args ((GtkWindow *)composer, strstr (invalid_addrs->str, ", ") ? "mail:ask-send-invalid-recip-multi" : "mail:ask-send-invalid-recip-one", invalid_addrs->str, NULL) == GTK_RESPONSE_CANCEL) { + if (e_alert_run_dialog_for_args ((GtkWindow *)composer, strstr (invalid_addrs->str, ", ") ? "mail:ask-send-invalid-recip-multi" : "mail:ask-send-invalid-recip-one", invalid_addrs->str, NULL) == GTK_RESPONSE_CANCEL) { g_string_free (invalid_addrs, TRUE); goto finished; } @@ -521,7 +521,7 @@ em_utils_composer_send_cb (EMsgComposer *composer) table = e_msg_composer_get_header_table (composer); account = e_composer_header_table_get_account (table); if (!account || !account->enabled) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (composer), "mail:send-no-account-enabled", NULL); return; @@ -680,7 +680,7 @@ em_utils_composer_save_draft_cb (EMsgComposer *composer) mail_msg_wait (id); if (!folder || !account->enabled) { - if (e_error_run_dialog_for_args ((GtkWindow *)composer, "mail:ask-default-drafts", NULL) != GTK_RESPONSE_YES) { + if (e_alert_run_dialog_for_args ((GtkWindow *)composer, "mail:ask-default-drafts", NULL) != GTK_RESPONSE_YES) { g_object_unref(composer); camel_object_unref(msg); if (sdi->emcs) @@ -1505,7 +1505,7 @@ em_utils_handle_receipt (CamelFolder *folder, const gchar *uid, CamelMimeMessage } if (account && (account->receipt_policy == E_ACCOUNT_RECEIPT_ALWAYS || account->receipt_policy == E_ACCOUNT_RECEIPT_ASK) - && e_error_run_dialog_for_args (e_shell_get_active_window (NULL), "mail:ask-receipt", addr, camel_mime_message_get_subject(msg), NULL) == GTK_RESPONSE_YES) + && e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), "mail:ask-receipt", addr, camel_mime_message_get_subject(msg), NULL) == GTK_RESPONSE_YES) em_utils_send_receipt(folder, msg); } diff --git a/mail/em-filter-folder-element.c b/mail/em-filter-folder-element.c index 7685c91274..3b80e0da77 100644 --- a/mail/em-filter-folder-element.c +++ b/mail/em-filter-folder-element.c @@ -36,11 +36,11 @@ #include "mail/em-utils.h" #include "filter/e-filter-part.h" #include "libedataserver/e-sexp.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #define d(x) -static gboolean validate(EFilterElement *fe, EError **error); +static gboolean validate(EFilterElement *fe, EAlert **alert); static gint folder_eq(EFilterElement *fe, EFilterElement *cm); static void xml_create(EFilterElement *fe, xmlNodePtr node); static xmlNodePtr xml_encode(EFilterElement *fe); @@ -139,17 +139,17 @@ em_filter_folder_element_set_value(EMFilterFolderElement *ff, const gchar *uri) } static gboolean -validate(EFilterElement *fe, EError **error) +validate(EFilterElement *fe, EAlert **alert) { EMFilterFolderElement *ff = (EMFilterFolderElement *)fe; - g_warn_if_fail (error == NULL || *error == NULL); + g_warn_if_fail (alert == NULL || *alert == NULL); if (ff->uri && *ff->uri) { return TRUE; } else { - if (error) - *error = e_error_new ("mail:no-folder", NULL); + if (alert) + *alert = e_alert_new ("mail:no-folder", NULL); return FALSE; } diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index 94fa734434..b6349b61ba 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -35,7 +35,7 @@ #define d(x) -static gint validate(EFilterRule *fr, EError **error); +static gint validate(EFilterRule *fr, EAlert **alert); static gint filter_eq(EFilterRule *fr, EFilterRule *cm); static xmlNodePtr xml_encode(EFilterRule *fr); static gint xml_decode(EFilterRule *fr, xmlNodePtr, ERuleContext *rc); @@ -172,18 +172,18 @@ em_filter_rule_build_action(EMFilterRule *fr, GString *out) } static gint -validate(EFilterRule *fr, EError **error) +validate(EFilterRule *fr, EAlert **alert) { EMFilterRule *ff =(EMFilterRule *)fr; GList *parts; gint valid; - valid = E_FILTER_RULE_CLASS(parent_class)->validate (fr, error); + valid = E_FILTER_RULE_CLASS(parent_class)->validate (fr, alert); /* validate rule actions */ parts = ff->actions; while (parts && valid) { - valid = e_filter_part_validate ((EFilterPart *)parts->data, error); + valid = e_filter_part_validate ((EFilterPart *)parts->data, alert); parts = parts->next; } diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 9cc15c2bbb..3a8f2dc3d5 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-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util.h" #include "em-vfolder-rule.h" @@ -439,7 +439,7 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree, /* Check for invalid characters. */ if (strchr (new_name, '/') != NULL) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( parent, "mail:no-rename-folder", old_name, new_name, _("Folder names cannot contain '/'"), NULL); @@ -458,7 +458,7 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree, folder_info = camel_store_get_folder_info ( store, new_full_name, CAMEL_STORE_FOLDER_INFO_FAST, &ex); if (folder_info != NULL) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( parent, "mail:no-rename-folder-exists", old_name, new_name, NULL); camel_store_free_folder_info (store, folder_info); @@ -468,7 +468,7 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree, /* XXX This needs to be asynchronous. */ camel_store_rename_folder (store, old_full_name, new_full_name, &ex); if (camel_exception_is_set (&ex)) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( parent, "mail:no-rename-folder", old_full_name, new_full_name, ex.desc, NULL); goto exit; diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index 14d09ee8fb..4fe72c7584 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-error.h" +#include "e-util/e-alert.h" #include "em-vfolder-rule.h" @@ -282,7 +282,7 @@ emfu_copy_folder_selected (const gchar *uri, gpointer data) local_store = e_mail_local_get_store (); if (!(fromstore = camel_session_get_store (session, cfd->fi->uri, &ex))) { - e_error_run_dialog_for_args (e_shell_get_active_window (NULL), + e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), cfd->delete?"mail:no-move-folder-notexist":"mail:no-copy-folder-notexist", cfd->fi->full_name, uri, ex.desc, NULL); goto fail; } @@ -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_error_new_dialog_for_args ( + w = e_alert_new_dialog_for_args ( e_shell_get_active_window (NULL), "mail:no-rename-special-folder", cfd->fi->full_name, NULL); em_utils_show_error_silent (w); @@ -298,7 +298,7 @@ emfu_copy_folder_selected (const gchar *uri, gpointer data) } if (!(tostore = camel_session_get_store (session, uri, &ex))) { - e_error_run_dialog_for_args (e_shell_get_active_window (NULL), + e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), cfd->delete?"mail:no-move-folder-to-notexist":"mail:no-copy-folder-to-notexist", cfd->fi->full_name, uri, ex.desc, NULL); goto fail; } @@ -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_error_new_dialog_for_args ( + w = e_alert_new_dialog_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_error_new_dialog_for_args ( + dialog = e_alert_new_dialog_for_args ( parent, "mail:no-delete-special-folder", folder->full_name, NULL); em_utils_show_error_silent (dialog); @@ -450,13 +450,13 @@ em_folder_utils_delete_folder (CamelFolder *folder) if (mail_folder_cache_get_folder_info_flags (folder, &flags) && (flags & CAMEL_FOLDER_SYSTEM)) { - e_error_run_dialog_for_args (parent,"mail:no-delete-special-folder", folder->name, NULL); + e_alert_run_dialog_for_args (parent,"mail:no-delete-special-folder", folder->name, NULL); return; } camel_object_ref (folder); - dialog = e_error_new_dialog_for_args (parent, + dialog = e_alert_new_dialog_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 7714742a30..cb8ebc3306 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-error.h" +#include "e-util/e-alert.h" #include "shell/e-shell.h" #include "widgets/misc/e-attachment.h" @@ -140,7 +140,7 @@ em_utils_ask_open_many (GtkWindow *parent, * em_utils_prompt_user: * @parent: parent window * @promptkey: gconf key to check if we should prompt the user or not. - * @tag: e_error tag. + * @tag: e_alert tag. * @arg0: The first of a NULL terminated list of arguments for the error. * * Convenience function to query the user with a Yes/No dialog and a @@ -157,18 +157,18 @@ em_utils_prompt_user(GtkWindow *parent, const gchar *promptkey, const gchar *tag va_list ap; gint button; GConfClient *gconf = mail_config_get_gconf_client(); - EError *error = NULL; + EAlert *alert = NULL; if (promptkey && !gconf_client_get_bool(gconf, promptkey, NULL)) return TRUE; va_start(ap, arg0); - error = e_error_newv (tag, arg0, ap); + alert = e_alert_newv (tag, arg0, ap); va_end(ap); - mbox = e_error_new_dialog (parent, error); - e_error_free (error); + mbox = e_alert_new_dialog (parent, alert); + e_alert_free (alert); if (promptkey) { check = gtk_check_button_new_with_mnemonic (_("_Do not show this message again.")); @@ -316,7 +316,7 @@ em_utils_edit_filters (GtkWidget *parent) g_free (system); if (((ERuleContext *) fc)->error) { - GtkWidget *w = e_error_new_dialog_for_args ((GtkWindow *)parent, "mail:filter-load-error", ((ERuleContext *)fc)->error, NULL); + GtkWidget *w = e_alert_new_dialog_for_args ((GtkWindow *)parent, "mail:filter-load-error", ((ERuleContext *)fc)->error, NULL); em_utils_show_error_silent (w); return; } @@ -944,7 +944,7 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part, gboolean mode) tmpdir = e_mkdtemp("evolution-tmp-XXXXXX"); if (tmpdir == NULL) { - w = e_error_new_dialog_for_args ((GtkWindow *)parent, "mail:no-create-tmp-path", g_strerror(errno), NULL); + w = e_alert_new_dialog_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/em-vfolder-rule.c b/mail/em-vfolder-rule.c index c7cf0845b8..b094cced75 100644 --- a/mail/em-vfolder-rule.c +++ b/mail/em-vfolder-rule.c @@ -39,12 +39,12 @@ #include "mail/em-folder-selector.h" #include "e-util/e-util.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util-private.h" #define d(x) -static gint validate(EFilterRule *, EError **error); +static gint validate(EFilterRule *, EAlert **alert); static gint vfolder_eq(EFilterRule *fr, EFilterRule *cm); static xmlNodePtr xml_encode(EFilterRule *); static gint xml_decode(EFilterRule *, xmlNodePtr, ERuleContext *f); @@ -208,26 +208,26 @@ em_vfolder_rule_next_source(EMVFolderRule *vr, const gchar *last) } static gint -validate(EFilterRule *fr, EError **error) +validate(EFilterRule *fr, EAlert **alert) { g_return_val_if_fail(fr != NULL, 0); - g_warn_if_fail (error == NULL || *error == NULL); + g_warn_if_fail (alert == NULL || *alert == NULL); if (!fr->name || !*fr->name) { - if (error) - *error = e_error_new ("mail:no-name-vfolder", NULL); + if (alert) + *alert = e_alert_new ("mail:no-name-vfolder", NULL); return 0; } /* We have to have at least one source set in the "specific" case. Do not translate this string! */ if (((EMVFolderRule *)fr)->with == EM_VFOLDER_RULE_WITH_SPECIFIC && ((EMVFolderRule *)fr)->sources == NULL) { - if (error) - *error = e_error_new ("mail:vfolder-no-source", NULL); + if (alert) + *alert = e_alert_new ("mail:vfolder-no-source", NULL); return 0; } - return E_FILTER_RULE_CLASS(parent_class)->validate (fr, error); + return E_FILTER_RULE_CLASS(parent_class)->validate (fr, alert); } static gint diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c index e6cfa6a862..c2d45a25f6 100644 --- a/mail/importers/elm-importer.c +++ b/mail/importers/elm-importer.c @@ -44,7 +44,6 @@ #include "mail/mail-mt.h" #include "e-util/e-import.h" -#include "e-util/e-error.h" #define d(x) diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c index d00394fa75..c3d4b15bf8 100644 --- a/mail/importers/pine-importer.c +++ b/mail/importers/pine-importer.c @@ -47,7 +47,6 @@ #include "mail/mail-mt.h" #include "e-util/e-import.h" -#include "e-util/e-error.h" #define d(x) diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index fe04b77782..dedb49f635 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-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util-private.h" #include "em-vfolder-context.h" @@ -44,6 +44,7 @@ #include "em-filter-rule.h" #include "em-filter-editor.h" #include "filter/e-filter-option.h" +#include "filter/e-filter-input.h" #include <camel/camel-internet-address.h> #include <camel/camel-mime-message.h> @@ -431,7 +432,7 @@ mail_filter_delete_uri(CamelStore *store, const gchar *uri) l = l->next; } - dialog = e_error_new_dialog_for_args (e_shell_get_active_window (NULL), "mail:filter-updated", s->str, euri, NULL); + dialog = e_alert_new_dialog_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 8d939617b1..ff7a30e97c 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -35,7 +35,7 @@ #include "shell/e-shell.h" #include "misc/e-gui-utils.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-icon-factory.h" #include "e-util/e-alert-activity.h" @@ -269,10 +269,10 @@ mail_msg_check_error (gpointer msg) if (m->info->desc && (what = m->info->desc (m))) { - gd = (GtkDialog *)e_error_new_dialog_for_args (parent, "mail:async-error", what, camel_exception_get_description(&m->ex), NULL); + gd = (GtkDialog *)e_alert_new_dialog_for_args (parent, "mail:async-error", what, camel_exception_get_description(&m->ex), NULL); g_free(what); } else - gd = (GtkDialog *)e_error_new_dialog_for_args (parent, "mail:async-error-nodescribe", camel_exception_get_description(&m->ex), NULL); + gd = (GtkDialog *)e_alert_new_dialog_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 ee035c7a6f..92bb551458 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-error.h" +#include "e-util/e-alert.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_error_new_dialog_for_args ( + user_message_dialog = e_alert_new_dialog_for_args ( e_shell_get_active_window (NULL), error_type, m->prompt, NULL); g_object_set ( user_message_dialog, "allow_shrink", TRUE, @@ -362,7 +362,7 @@ user_message_exec (struct _user_message_msg *m) * emit a status bar message or present the dialog immediately, the * thought being if there's more than one button then something is * probably blocked until the user responds. */ - if (e_error_dialog_count_buttons (user_message_dialog) > 1) { + if (e_alert_dialog_count_buttons (user_message_dialog) > 1) { if (m->ismain) { gint response; diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 4fabc848c0..4ab49d1869 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-error.h" +#include "e-util/e-alert.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_error_new_dialog_for_args (e_shell_get_active_window (NULL), "mail:vfolder-updated", changed->str, uri, NULL); + dialog = e_alert_new_dialog_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_error_new_dialog_for_args (e_shell_get_active_window (NULL), "mail:vfolder-notexist", uri, NULL); + w = e_alert_new_dialog_for_args (e_shell_get_active_window (NULL), "mail:vfolder-notexist", uri, NULL); em_utils_show_error_silent (w); } @@ -1109,16 +1109,16 @@ new_rule_clicked(GtkWidget *w, gint button, gpointer data) const gchar *data_dir; gchar *user; EFilterRule *rule = g_object_get_data((GObject *)w, "rule"); - EError *error = NULL; + EAlert *alert = NULL; - if (!e_filter_rule_validate (rule, &error)) { - e_error_run_dialog (GTK_WINDOW (w), error); - e_error_free (error); + if (!e_filter_rule_validate (rule, &alert)) { + e_alert_run_dialog (GTK_WINDOW (w), alert); + e_alert_free (alert); return; } if (e_rule_context_find_rule ((ERuleContext *)context, rule->name, rule->source)) { - e_error_run_dialog_for_args ((GtkWindow *)w, "mail:vfolder-notunique", rule->name, NULL); + e_alert_run_dialog_for_args ((GtkWindow *)w, "mail:vfolder-notunique", rule->name, NULL); return; } diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c index 10ab0a33e1..11b3eca445 100644 --- a/modules/addressbook/addressbook-config.c +++ b/modules/addressbook/addressbook-config.c @@ -45,7 +45,7 @@ #include "addressbook-config.h" #include "e-util/e-util.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util-private.h" #include "addressbook/gui/widgets/eab-config.h" @@ -267,7 +267,7 @@ addressbook_ldap_init (GtkWidget *window, ESource *source) return NULL; if (!(ldap = ldap_init (host, port))) { - e_error_run ((GtkWindow *) window, "addressbook:ldap-init", NULL); + e_alert_run_dialog_for_args ((GtkWindow *) window, "addressbook:ldap-init", NULL); goto done; } @@ -290,7 +290,7 @@ addressbook_ldap_auth (GtkWidget *window, LDAP *ldap) /* XXX use auth info from source */ ldap_error = ldap_simple_bind_s (ldap, NULL, NULL); if (LDAP_SUCCESS != ldap_error) - e_error_run ((GtkWindow *) window, "addressbook:ldap-auth", NULL); + e_alert_run_dialog_for_args ((GtkWindow *) window, "addressbook:ldap-auth", NULL); return ldap_error; } @@ -310,7 +310,7 @@ addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap, "(objectclass=*)", (gchar **) attrs, 0, NULL, NULL, &timeout, LDAP_NO_LIMIT, resp); if (LDAP_SUCCESS != ldap_error) - e_error_run (GTK_WINDOW (dialog->window), "addressbook:ldap-search-base", NULL); + e_alert_run_dialog_for_args (GTK_WINDOW (dialog->window), "addressbook:ldap-search-base", NULL); return ldap_error; } @@ -342,7 +342,7 @@ do_ldap_root_dse_query (AddressbookSourceDialog *sdialog, GtkListStore *model, E values = ldap_get_values (ldap, resp, "namingContexts"); if (!values || values[0] == NULL || strlen (values[0]) == 0) { - e_error_run (GTK_WINDOW (sdialog->window), "addressbook:ldap-search-base", NULL); + e_alert_run_dialog_for_args (GTK_WINDOW (sdialog->window), "addressbook:ldap-search-base", NULL); goto fail; } diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c index a12dc7f6de..cf5c615238 100644 --- a/modules/addressbook/e-book-shell-view-actions.c +++ b/modules/addressbook/e-book-shell-view-actions.c @@ -21,7 +21,7 @@ #include "e-book-shell-view-private.h" -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-util.h> #include <filter/e-filter-rule.h> @@ -68,7 +68,7 @@ action_address_book_delete_cb (GtkAction *action, source = e_source_selector_peek_primary_selection (selector); g_return_if_fail (source != NULL); - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "addressbook:ask-delete-addressbook", e_source_peek_name (source)); @@ -84,7 +84,7 @@ action_address_book_delete_cb (GtkAction *action, } if (!e_book_remove (book, NULL)) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "addressbook:remove-addressbook", NULL); g_object_unref (book); @@ -274,7 +274,7 @@ action_address_book_save_as_cb (GtkAction *action, /* XXX No callback means errors are discarded. * - * There's an EError for this which I'm not using + * There's an EAlert for this which I'm not using * until I figure out a better way to display errors: * * "addressbook:save-error" @@ -575,7 +575,7 @@ action_contact_save_as_cb (GtkAction *action, /* XXX No callback means errors are discarded. * - * There an EError for this which I'm not using + * There an EAlert for this which I'm not using * until I figure out a better way to display errors: * * "addressbook:save-error" diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index af49db3c3b..70ddebf4f9 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -24,7 +24,7 @@ #include <string.h> #include <glib/gi18n.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-binding.h" #include "e-util/gconf-bridge.h" #include "widgets/misc/e-paned.h" @@ -119,7 +119,7 @@ cal_shell_sidebar_backend_died_cb (ECalShellSidebar *cal_shell_sidebar, g_hash_table_remove (client_table, uid); cal_shell_sidebar_emit_status_message (cal_shell_sidebar, NULL); - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:calendar-crashed", NULL); @@ -200,7 +200,7 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar, break; case E_CALENDAR_STATUS_REPOSITORY_OFFLINE: - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:prompt-no-contents-offline-calendar", NULL); diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index f95461419c..c1aebdbc33 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -19,6 +19,7 @@ * */ +#include "e-util/e-alert.h" #include "e-cal-shell-view-private.h" /* This is for radio action groups whose value is persistent. We @@ -87,7 +88,7 @@ action_calendar_delete_cb (GtkAction *action, g_return_if_fail (E_IS_SOURCE (source)); /* Ask for confirmation. */ - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:prompt-delete-calendar", e_source_peek_name (source)); diff --git a/modules/calendar/e-cal-shell-view-private.h b/modules/calendar/e-cal-shell-view-private.h index c92fb8cffe..1f9dc17f87 100644 --- a/modules/calendar/e-cal-shell-view-private.h +++ b/modules/calendar/e-cal-shell-view-private.h @@ -35,7 +35,6 @@ #include "e-util/e-selection.h" #include "e-util/e-dialog-utils.h" #include "e-util/e-file-utils.h" -#include "e-util/e-error.h" #include "e-util/e-util.h" #include "shell/e-shell-utils.h" #include "widgets/misc/e-popup-action.h" diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c index 8af86fa4fa..378fe51964 100644 --- a/modules/calendar/e-memo-shell-sidebar.c +++ b/modules/calendar/e-memo-shell-sidebar.c @@ -26,7 +26,7 @@ #include <libecal/e-cal.h> #include "e-util/e-binding.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util.h" #include "calendar/common/authentication.h" #include "calendar/gui/calendar-config.h" @@ -116,7 +116,7 @@ memo_shell_sidebar_backend_died_cb (EMemoShellSidebar *memo_shell_sidebar, g_hash_table_remove (client_table, uid); memo_shell_sidebar_emit_status_message (memo_shell_sidebar, NULL); - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:memos-crashed", NULL); @@ -197,7 +197,7 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar, break; case E_CALENDAR_STATUS_REPOSITORY_OFFLINE: - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:prompt-no-contents-offline-memos", NULL); diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index cbf52fd1a2..aa95991c96 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -19,6 +19,7 @@ * */ +#include "e-util/e-alert.h" #include "e-memo-shell-view-private.h" static void @@ -188,7 +189,7 @@ action_memo_list_delete_cb (GtkAction *action, g_return_if_fail (E_IS_SOURCE (source)); /* Ask for confirmation. */ - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:prompt-delete-memo-list", e_source_peek_name (source)); diff --git a/modules/calendar/e-memo-shell-view-private.h b/modules/calendar/e-memo-shell-view-private.h index 1818ba0808..ac50d209a4 100644 --- a/modules/calendar/e-memo-shell-view-private.h +++ b/modules/calendar/e-memo-shell-view-private.h @@ -32,7 +32,6 @@ #include "e-util/e-binding.h" #include "e-util/e-dialog-utils.h" #include "e-util/e-file-utils.h" -#include "e-util/e-error.h" #include "e-util/e-util.h" #include "e-util/gconf-bridge.h" #include "shell/e-shell-utils.h" diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index 0015028f43..09f8baeb74 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -25,7 +25,7 @@ #include <glib/gi18n.h> #include <libecal/e-cal.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util.h" #include "calendar/common/authentication.h" #include "calendar/gui/calendar-config.h" @@ -114,7 +114,7 @@ task_shell_sidebar_backend_died_cb (ETaskShellSidebar *task_shell_sidebar, g_hash_table_remove (client_table, uid); task_shell_sidebar_emit_status_message (task_shell_sidebar, NULL); - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:tasks-crashed", NULL); @@ -195,7 +195,7 @@ task_shell_sidebar_client_opened_cb (ETaskShellSidebar *task_shell_sidebar, break; case E_CALENDAR_STATUS_REPOSITORY_OFFLINE: - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:prompt-no-contents-offline-tasks", NULL); diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c index 0b78b85794..e5d861526d 100644 --- a/modules/calendar/e-task-shell-view-actions.c +++ b/modules/calendar/e-task-shell-view-actions.c @@ -19,6 +19,7 @@ * */ +#include "e-util/e-alert.h" #include "e-task-shell-view-private.h" static void @@ -219,7 +220,7 @@ action_task_list_delete_cb (GtkAction *action, g_return_if_fail (E_IS_SOURCE (source)); /* Ask for confirmation. */ - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "calendar:prompt-delete-task-list", e_source_peek_name (source)); diff --git a/modules/calendar/e-task-shell-view-private.h b/modules/calendar/e-task-shell-view-private.h index 4418fd7136..a76403f721 100644 --- a/modules/calendar/e-task-shell-view-private.h +++ b/modules/calendar/e-task-shell-view-private.h @@ -33,7 +33,6 @@ #include "e-util/e-binding.h" #include "e-util/e-dialog-utils.h" #include "e-util/e-file-utils.h" -#include "e-util/e-error.h" #include "e-util/e-util.h" #include "e-util/gconf-bridge.h" #include "shell/e-shell-utils.h" diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c index 2cde45083f..a1946c6f68 100644 --- a/modules/mail/e-mail-attachment-handler.c +++ b/modules/mail/e-mail-attachment-handler.c @@ -25,7 +25,7 @@ #include <camel/camel-folder.h> #include <camel/camel-stream-mem.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "mail/em-composer-utils.h" #include "mail/mail-tools.h" @@ -358,7 +358,7 @@ exit: else folder_name = g_strdup (data); - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( parent, "mail-composer:attach-nomessages", folder_name, camel_exception_get_description (&ex), NULL); diff --git a/modules/mail/e-mail-junk-hook.c b/modules/mail/e-mail-junk-hook.c index 6089ffc570..47637eb1d4 100644 --- a/modules/mail/e-mail-junk-hook.c +++ b/modules/mail/e-mail-junk-hook.c @@ -24,7 +24,7 @@ #include <glib/gi18n.h> #include <camel/camel-junk-plugin.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "shell/e-shell.h" #include "mail/em-junk.h" @@ -52,7 +52,7 @@ mail_junk_hook_idle_cb (struct ErrorData *data) { GtkWidget *widget; - widget = e_error_new_dialog_for_args (e_shell_get_active_window (NULL), + widget = e_alert_new_dialog_for_args (e_shell_get_active_window (NULL), data->error_message, data->error->message, NULL); em_utils_show_error_silent (widget); diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index c19ab0d336..8dd3caf643 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -29,7 +29,7 @@ #include "e-util/e-account-utils.h" #include "e-util/e-binding.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-import.h" #include "e-util/e-util.h" #include "shell/e-shell.h" @@ -673,7 +673,7 @@ mail_shell_backend_quit_requested_cb (EShell *shell, if (unsent == 0) return; - response = e_error_run_dialog_for_args (e_shell_get_active_window (shell), "mail:exit-unsaved", NULL); + response = e_alert_run_dialog_for_args (e_shell_get_active_window (shell), "mail:exit-unsaved", NULL); if (response == GTK_RESPONSE_YES) return; diff --git a/modules/mail/e-mail-shell-migrate.c b/modules/mail/e-mail-shell-migrate.c index 2e39c18a62..7231cc8061 100644 --- a/modules/mail/e-mail-shell-migrate.c +++ b/modules/mail/e-mail-shell-migrate.c @@ -58,7 +58,7 @@ #include "e-util/e-account-utils.h" #include "e-util/e-bconf-map.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util-private.h" #include "e-util/e-plugin.h" #include "e-util/e-signature-utils.h" @@ -1598,7 +1598,7 @@ em_migrate_folder(EMMigrateSession *session, const gchar *dirname, const gchar * if (errno == EEXIST) { gint save = errno; - switch (e_error_run_dialog_for_args (e_shell_get_active_window (NULL), "mail:ask-migrate-existing", src->str, dest->str, NULL)) { + switch (e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), "mail:ask-migrate-existing", src->str, dest->str, NULL)) { case GTK_RESPONSE_ACCEPT: mode = CP_OVERWRITE; goto retry_copy; diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index 895bd33903..c18b3e68b0 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -20,6 +20,7 @@ */ #include "e-mail-shell-view-private.h" +#include "filter/e-filter-input.h" static gpointer parent_class; static GType mail_shell_view_type; diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c index d0cc34f608..81ce907e18 100644 --- a/modules/mail/em-account-prefs.c +++ b/modules/mail/em-account-prefs.c @@ -34,7 +34,7 @@ #include <glib/gi18n.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-mail-store.h" #include "em-config.h" @@ -82,7 +82,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view) parent = gtk_widget_get_toplevel (GTK_WIDGET (tree_view)); parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL; - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( parent, "mail:ask-delete-proxy-accounts", NULL); if (response != GTK_RESPONSE_YES) { @@ -201,7 +201,7 @@ account_prefs_delete_account (EAccountManager *manager) has_proxies = e_account_list_account_has_proxies (account_list, account); - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( parent, has_proxies ? "mail:ask-delete-account-with-proxies" : "mail:ask-delete-account", NULL); diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index 57ce4dd4c8..ba7e2296c9 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -48,7 +48,6 @@ #include <editor/gtkhtml-spell-language.h> #include "e-util/e-util.h" -#include "e-util/e-error.h" #include "e-util/e-util-private.h" #include "widgets/misc/e-charset-combo-box.h" #include "widgets/misc/e-signature-editor.h" diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c index baed9ca948..6b419d0c2e 100644 --- a/modules/mail/em-network-prefs.c +++ b/modules/mail/em-network-prefs.c @@ -38,7 +38,6 @@ #include <glib/gstdio.h> #include "e-util/e-util.h" -#include "e-util/e-error.h" #include "e-util/e-util-private.h" #include "mail-config.h" diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c index ab13ca914c..b023cbc5ce 100644 --- a/plugins/attachment-reminder/attachment-reminder.c +++ b/plugins/attachment-reminder/attachment-reminder.c @@ -39,7 +39,7 @@ #include <camel/camel-mime-message.h> #include <camel/camel-multipart.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-plugin.h> #include <mail/em-utils.h> @@ -122,7 +122,7 @@ ask_for_missing_attachment (EPlugin *ep, GtkWindow *window) GtkDialog *dialog = NULL; gint response; - dialog = (GtkDialog*)e_error_new(window, "org.gnome.evolution.plugins.attachment_reminder:attachment-reminder", NULL); + dialog = (GtkDialog*)e_alert_new_dialog_for_args(window, "org.gnome.evolution.plugins.attachment_reminder:attachment-reminder", NULL); /*Check buttons*/ check = gtk_check_button_new_with_mnemonic (_("_Do not show this message again.")); diff --git a/plugins/backup-restore/backup-restore.c b/plugins/backup-restore/backup-restore.c index 19905a6537..9f3413cbbe 100644 --- a/plugins/backup-restore/backup-restore.c +++ b/plugins/backup-restore/backup-restore.c @@ -33,7 +33,7 @@ #include <glib/gstdio.h> #include "mail/em-config.h" #include "mail/em-account-editor.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-util.h" #include "e-util/e-dialog-utils.h" #include "shell/e-shell-utils.h" @@ -101,14 +101,14 @@ dialog_prompt_user(GtkWindow *parent, const gchar *string, const gchar *tag, con va_list ap; gint button; guint32 mask = 0; - EError *error = NULL; + EAlert *alert = NULL; va_start(ap, arg0); - error = e_error_newv(tag, arg0, ap); + alert = e_alert_newv(tag, arg0, ap); va_end(ap); - mbox = e_error_new_dialog (parent, error); - e_error_free (error); + mbox = e_alert_new_dialog (parent, alert); + e_alert_free (alert); check = gtk_check_button_new_with_mnemonic (string); /* We should hardcode this to true */ @@ -188,7 +188,7 @@ action_settings_backup_cb (GtkAction *action, g_free (path); } } else { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "org.gnome.backup-restore:insufficient-permissions", NULL); } @@ -224,7 +224,7 @@ action_settings_restore_cb (GtkAction *action, if (mask & BR_OK) restore (path, mask & BR_START); } else { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "org.gnome.backup-restore:invalid-backup", NULL); } @@ -331,7 +331,7 @@ backup_restore_commit (EPlugin *ep, EMConfigTargetAccount *target) if (state) { if (!file || !sanity_check (file)) { - e_error_run_dialog_for_args ((GtkWindow *)assistant, + e_alert_run_dialog_for_args ((GtkWindow *)assistant, "org.gnome.backup-restore:invalid-backup", NULL); } else { diff --git a/plugins/default-mailer/default-mailer.c b/plugins/default-mailer/default-mailer.c index ebfa0f829e..93c100631b 100644 --- a/plugins/default-mailer/default-mailer.c +++ b/plugins/default-mailer/default-mailer.c @@ -25,7 +25,6 @@ #include <string.h> #include <gconf/gconf-client.h> -#include <e-util/e-error.h> #include <mail/em-utils.h> #include <shell/es-event.h> diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c index d30a40afa6..a4e1ef2e65 100644 --- a/plugins/email-custom-header/email-custom-header.c +++ b/plugins/email-custom-header/email-custom-header.c @@ -27,7 +27,6 @@ #include <string.h> #include <glib/gi18n.h> #include <gconf/gconf-client.h> -#include <e-util/e-error.h> #include "mail/em-utils.h" #include "mail/em-event.h" #include "composer/e-msg-composer.h" diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c index adc9678550..e75c47fc1c 100644 --- a/plugins/external-editor/external-editor.c +++ b/plugins/external-editor/external-editor.c @@ -29,7 +29,7 @@ #include <mail/em-config.h> #include <mail/em-composer-utils.h> #include <mail/mail-config.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-msg-composer.h> #include <camel/camel-mime-filter-tohtml.h> @@ -208,7 +208,7 @@ run_error_dialog (struct run_error_dialog_data *data) { g_return_val_if_fail (data != NULL, FALSE); - e_error_run (GTK_WINDOW (data->composer), data->text, NULL); + e_alert_run_dialog_for_args (GTK_WINDOW (data->composer), data->text, NULL); enable_composer (data->composer); g_free (data); @@ -430,7 +430,7 @@ static gboolean delete_cb (GtkWidget *widget, EMsgComposer *composer) { if (editor_running()) { - e_error_run (NULL, "org.gnome.evolution.plugins.external-editor:editor-still-running", NULL); + e_alert_run_dialog_for_args (NULL, "org.gnome.evolution.plugins.external-editor:editor-still-running", NULL); return TRUE; } diff --git a/plugins/face/face.c b/plugins/face/face.c index 67c37f7cd0..10864c0103 100644 --- a/plugins/face/face.c +++ b/plugins/face/face.c @@ -29,7 +29,7 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> #include <mail/em-event.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-util.h> #include <e-util/e-icon-factory.h> @@ -172,7 +172,7 @@ prepare_image (const gchar *image_filename, gchar **file_contents, gsize *length err = error->message; if (can_claim) - e_error_run (NULL, "org.gnome.evolution.plugins.face:not-an-image", err, NULL); + e_alert_run_dialog_for_args (NULL, "org.gnome.evolution.plugins.face:not-an-image", err, NULL); if (error) g_error_free (error); @@ -184,7 +184,7 @@ prepare_image (const gchar *image_filename, gchar **file_contents, gsize *length if (height <= 0 || width <= 0) { if (can_claim) - e_error_run (NULL, "org.gnome.evolution.plugins.face:invalid-image-size", NULL, NULL); + e_alert_run_dialog_for_args (NULL, "org.gnome.evolution.plugins.face:invalid-image-size", NULL, NULL); } else if (height != 48 || width != 48) { GdkPixbuf *copy, *scale; guchar *pixels; @@ -242,7 +242,7 @@ prepare_image (const gchar *image_filename, gchar **file_contents, gsize *length g_object_unref (loader); } else { if (can_claim) - e_error_run (NULL, "org.gnome.evolution.plugins.face:file-not-found", NULL, NULL); + e_alert_run_dialog_for_args (NULL, "org.gnome.evolution.plugins.face:file-not-found", NULL, NULL); } return res; diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c index 27bd49e36c..db3bcac4f7 100644 --- a/plugins/groupwise-features/camel-gw-listener.c +++ b/plugins/groupwise-features/camel-gw-listener.c @@ -29,7 +29,7 @@ #include <camel/camel-i18n.h> #include <e-gw-connection.h> #include <libedataserverui/e-passwords.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include <libedataserver/e-account.h> #include <libecal/e-cal.h> #include <shell/e-shell.h> @@ -542,7 +542,7 @@ get_addressbook_names_from_server (gchar *source_url) /*FIXME: This error message should be relocated to addressbook and should reflect * that it actually failed to get the addressbooks*/ - e_error_run_dialog_for_args (e_shell_get_active_window (NULL), + e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), "mail:gw-accountsetup-error", poa_address, NULL); return NULL; @@ -656,7 +656,7 @@ add_addressbook_sources (EAccount *account) if (!is_frequent_contacts) { /* display warning message */ - e_error_run_dialog_for_args (e_shell_get_active_window (NULL), + e_alert_run_dialog_for_args (e_shell_get_active_window (NULL), "addressbook:gw-book-list-init", NULL); } return TRUE; diff --git a/plugins/groupwise-features/junk-settings.c b/plugins/groupwise-features/junk-settings.c index ac985fd213..23f4a0833f 100644 --- a/plugins/groupwise-features/junk-settings.c +++ b/plugins/groupwise-features/junk-settings.c @@ -27,7 +27,6 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> #include <e-util/e-util.h> -#include <e-util/e-error.h> #include <e-util/e-util-private.h> #include <e-gw-connection.h> #define ROOTNODE "vboxSettings" diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c index cffc371454..70b79d7c80 100644 --- a/plugins/groupwise-features/mail-retract.c +++ b/plugins/groupwise-features/mail-retract.c @@ -29,7 +29,7 @@ #include <camel/camel-store.h> #include <camel/camel-folder.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <mail/e-mail-reader.h> @@ -100,7 +100,7 @@ gw_retract_mail_cb (GtkAction *action, EShellView *shell_view) if (n == GTK_RESPONSE_YES) { if (e_gw_connection_retract_request (cnc, id, NULL, FALSE, FALSE) != E_GW_CONNECTION_STATUS_OK ) - e_error_run_dialog_for_args (GTK_WINDOW (e_shell_view_get_shell_window (shell_view)), + e_alert_run_dialog_for_args (GTK_WINDOW (e_shell_view_get_shell_window (shell_view)), "org.gnome.evolution.message.retract:retract-failure", NULL); else { diff --git a/plugins/groupwise-features/process-meeting.c b/plugins/groupwise-features/process-meeting.c index 611213bd42..5f12a9a0e5 100644 --- a/plugins/groupwise-features/process-meeting.c +++ b/plugins/groupwise-features/process-meeting.c @@ -30,7 +30,7 @@ #include <gtk/gtk.h> #include <libecal/e-cal.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <shell/e-shell-view.h> #include <calendar/gui/e-calendar-view.h> @@ -176,7 +176,7 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status) else msg = "org.gnome.evolution.process_meeting:recurrence-decline"; - response = e_error_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel ((GtkWidget *)cal_view)), + response = e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel ((GtkWidget *)cal_view)), msg, NULL); if (response == GTK_RESPONSE_YES) { icalproperty *prop; @@ -347,7 +347,7 @@ object_created_cb (CompEditor *ce, gpointer data) gtk_widget_hide (GTK_WIDGET (ce)); - response = e_error_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel ((GtkWidget *)ce)), + response = e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel ((GtkWidget *)ce)), "org.gnome.evolution.process_meeting:resend-retract", NULL); if (response == GTK_RESPONSE_NO) { @@ -392,7 +392,7 @@ gw_resend_meeting_cb (GtkAction *action, EShellView *shell_view) else msg = "org.gnome.evolution.process_meeting:resend"; - response = e_error_run_dialog_for_args (GTK_WINDOW (e_shell_view_get_shell_window (shell_view)), + response = e_alert_run_dialog_for_args (GTK_WINDOW (e_shell_view_get_shell_window (shell_view)), msg, NULL); if (response == GTK_RESPONSE_YES) { mod = CALOBJ_MOD_ALL; diff --git a/plugins/groupwise-features/proxy-login.c b/plugins/groupwise-features/proxy-login.c index 684dcd6d38..b885b1445b 100644 --- a/plugins/groupwise-features/proxy-login.c +++ b/plugins/groupwise-features/proxy-login.c @@ -38,7 +38,7 @@ #include <mail/mail-ops.h> #include <libedataserver/e-account.h> #include <e-util/e-util.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-icon-factory.h> #include <e-util/e-util-private.h> #include <e-util/e-account-utils.h> @@ -320,7 +320,7 @@ proxy_soap_login (gchar *email, GtkWindow *error_parent) if (email[i]=='@') name = g_strndup(email, i); else { - e_error_run_dialog_for_args (error_parent, + e_alert_run_dialog_for_args (error_parent, "org.gnome.evolution.proxy-login:invalid-user", email, NULL); return; @@ -330,7 +330,7 @@ proxy_soap_login (gchar *email, GtkWindow *error_parent) If so, it is violating the (li)unix philosophy of User creation. So dont care about that scenario*/ if (e_account_list_find (accounts, E_ACCOUNT_FIND_ID_ADDRESS, email) != NULL) { - e_error_run_dialog_for_args (error_parent, + e_alert_run_dialog_for_args (error_parent, "org.gnome.evolution.proxy-login:already-loggedin", email, NULL); g_free (name); @@ -367,7 +367,7 @@ proxy_soap_login (gchar *email, GtkWindow *error_parent) g_free (parent_source_url); camel_url_free (parent); } else { - e_error_run_dialog_for_args (error_parent, + e_alert_run_dialog_for_args (error_parent, "org.gnome.evolution.proxy-login:invalid-user", email, NULL); return; diff --git a/plugins/groupwise-features/proxy.c b/plugins/groupwise-features/proxy.c index bac1f9ba80..a6c1b58f90 100644 --- a/plugins/groupwise-features/proxy.c +++ b/plugins/groupwise-features/proxy.c @@ -31,7 +31,7 @@ #include <libedataserverui/e-contact-store.h> #include <e-util/e-util.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-util-private.h> #include <e-gw-container.h> #include <e-gw-connection.h> @@ -330,7 +330,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog, GtkWindow *pa tmp = destinations; if (!tmp) { - e_error_run_dialog_for_args (parent, + e_alert_run_dialog_for_args (parent, "org.gnome.evolution.proxy:no-user", NULL, NULL); return -1; @@ -344,13 +344,13 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog, GtkWindow *pa continue; if (g_strrstr (email, "@") == NULL) { - e_error_run_dialog_for_args (parent, + e_alert_run_dialog_for_args (parent, "org.gnome.evolution.proxy:invalid-user", email, NULL); return -1; } if (! g_ascii_strcasecmp(e_gw_connection_get_user_email (prd->cnc), email)) { - e_error_run_dialog_for_args (parent, + e_alert_run_dialog_for_args (parent, "org.gnome.evolution.proxy:invalid-user", email, NULL); return -1; @@ -371,7 +371,7 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog, GtkWindow *pa return 0; } - e_error_run_dialog_for_args (parent, + e_alert_run_dialog_for_args (parent, "org.gnome.evolution.proxy:user-is-proxy", email, NULL); return -1; diff --git a/plugins/groupwise-features/share-folder.c b/plugins/groupwise-features/share-folder.c index c7850c50e7..d417f4ce77 100644 --- a/plugins/groupwise-features/share-folder.c +++ b/plugins/groupwise-features/share-folder.c @@ -27,7 +27,7 @@ #include <glib/gi18n-lib.h> #include <libedataserverui/e-contact-store.h> #include <e-util/e-util.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-util-private.h> #include <e-gw-container.h> #include <e-gw-connection.h> @@ -339,12 +339,12 @@ add_clicked(GtkButton *button, ShareFolder *sf) email = e_destination_get_email (tmp->data); /* You can't share a folder with yourself*/ if (g_strrstr (email, "@") == NULL || (!g_ascii_strcasecmp (email , self_email))) - e_error_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))), + e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))), "org.gnome.evolution.mail_shared_folder:invalid-user", email, NULL); else { if (!g_ascii_strcasecmp (email, "" )) { - e_error_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))), + e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))), "org.gnome.evolution.mail_shared_folder:no-user", NULL); return; diff --git a/plugins/hula-account-setup/camel-hula-listener.c b/plugins/hula-account-setup/camel-hula-listener.c index 23e0dbe5d6..e6adef04fc 100644 --- a/plugins/hula-account-setup/camel-hula-listener.c +++ b/plugins/hula-account-setup/camel-hula-listener.c @@ -27,7 +27,6 @@ #include <string.h> #include <camel/camel-i18n.h> #include <libedataserverui/e-passwords.h> -#include <e-util/e-error.h> #include <libedataserver/e-account.h> #include "camel-hula-listener.h" diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index d6c06fbdf8..f9de6c7f9f 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -52,7 +52,7 @@ #include <mail/mail-tools.h> #include <mail/mail-mt.h> #include <libedataserver/e-account-list.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <calendar/gui/calendar-config.h> #include <calendar/gui/itip-utils.h> #include <calendar/common/authentication.h> @@ -1319,7 +1319,7 @@ update_attendee_status (struct _itip_puri *pitip) if ((a->status == ICAL_PARTSTAT_DELEGATED) && (del_prop = find_attendee (org_icalcomp, itip_strip_mailto (a->delto))) && !(find_attendee (icalcomp, itip_strip_mailto (a->delto)))) { gint response; delegate = icalproperty_get_attendee (del_prop); - response = e_error_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (pitip->view)), + response = e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (pitip->view)), "org.gnome.itip-formatter:add-delegate", itip_strip_mailto (a->value), itip_strip_mailto (delegate), NULL); @@ -1338,7 +1338,7 @@ update_attendee_status (struct _itip_puri *pitip) gint response; if (a->delfrom && *a->delfrom) { - response = e_error_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (pitip->view)), + response = e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (pitip->view)), "org.gnome.itip-formatter:add-delegate", itip_strip_mailto (a->delfrom), itip_strip_mailto (a->value), NULL); @@ -1358,7 +1358,7 @@ update_attendee_status (struct _itip_puri *pitip) } } - response = e_error_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (pitip->view)), + response = e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (pitip->view)), "org.gnome.itip-formatter:add-unknown-attendee", NULL); if (response == GTK_RESPONSE_YES) { diff --git a/plugins/mailing-list-actions/mailing-list-actions.c b/plugins/mailing-list-actions/mailing-list-actions.c index 9e88b356bd..c665f33227 100644 --- a/plugins/mailing-list-actions/mailing-list-actions.c +++ b/plugins/mailing-list-actions/mailing-list-actions.c @@ -45,12 +45,12 @@ #include "mail/mail-mt.h" #include "mail/mail-config.h" #include "e-util/e-util.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "shell/e-shell-view.h" #include "shell/e-shell-window.h" #include "shell/e-shell-window-actions.h" -/* EError Message IDs */ +/* EAlert Message IDs */ #define MESSAGE_PREFIX "org.gnome.mailing-list-actions:" #define MESSAGE_NO_ACTION MESSAGE_PREFIX "no-action" #define MESSAGE_NO_HEADER MESSAGE_PREFIX "no-header" @@ -122,7 +122,7 @@ emla_list_action_do (CamelFolder *folder, if (!header) { /* there was no header matching the action */ - e_error_run_dialog_for_args (parent, MESSAGE_NO_HEADER, NULL); + e_alert_run_dialog_for_args (parent, MESSAGE_NO_HEADER, NULL); goto exit; } @@ -131,7 +131,7 @@ emla_list_action_do (CamelFolder *folder, if (action == EMLA_ACTION_POST) { while (*headerpos == ' ') headerpos++; if (g_ascii_strcasecmp (headerpos, "NO") == 0) { - e_error_run_dialog_for_args (parent, MESSAGE_POSTING_NOT_ALLOWED, NULL); + e_alert_run_dialog_for_args (parent, MESSAGE_POSTING_NOT_ALLOWED, NULL); goto exit; } } @@ -141,7 +141,7 @@ emla_list_action_do (CamelFolder *folder, /* skip whitespace */ while (*headerpos == ' ') headerpos++; if (*headerpos != '<' || (end = strchr (headerpos++, '>')) == NULL) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( parent, MESSAGE_MALFORMED_HEADER, emla_action_headers[t].header, header, NULL); goto exit; @@ -154,7 +154,7 @@ emla_list_action_do (CamelFolder *folder, if (emla_action_headers[t].interactive) send_message_response = GTK_RESPONSE_NO; else - send_message_response = e_error_run_dialog_for_args ( + send_message_response = e_alert_run_dialog_for_args ( parent, MESSAGE_ASK_SEND_MESSAGE, url, NULL); @@ -188,7 +188,7 @@ emla_list_action_do (CamelFolder *folder, } /* if we got here, there's no valid action */ - e_error_run_dialog_for_args (parent, MESSAGE_NO_ACTION, header, NULL); + e_alert_run_dialog_for_args (parent, MESSAGE_NO_ACTION, header, NULL); exit: g_object_unref (action_data->reader); diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c index cb36dc01a2..baaa80c573 100644 --- a/plugins/mark-all-read/mark-all-read.c +++ b/plugins/mark-all-read/mark-all-read.c @@ -33,7 +33,6 @@ #include <mail/mail-ops.h> #include <mail/mail-mt.h> #include <camel/camel-vee-folder.h> -#include "e-util/e-error.h" #include <shell/e-shell-sidebar.h> #include <shell/e-shell-view.h> diff --git a/plugins/save-calendar/csv-format.c b/plugins/save-calendar/csv-format.c index 7a4e856d68..63798106f1 100644 --- a/plugins/save-calendar/csv-format.c +++ b/plugins/save-calendar/csv-format.c @@ -34,8 +34,6 @@ #include "calendar/common/authentication.h" #include <string.h> -#include "e-util/e-error.h" - #include "format-handler.h" typedef struct _CsvConfig CsvConfig; diff --git a/plugins/save-calendar/ical-format.c b/plugins/save-calendar/ical-format.c index 7888ecc4c1..0c5a18f252 100644 --- a/plugins/save-calendar/ical-format.c +++ b/plugins/save-calendar/ical-format.c @@ -35,7 +35,6 @@ #include <string.h> #include "format-handler.h" -#include "e-util/e-error.h" static void display_error_message (GtkWidget *parent, const gchar *message) diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c index 8734e17710..d28d2ef587 100644 --- a/plugins/save-calendar/rdf-format.c +++ b/plugins/save-calendar/rdf-format.c @@ -38,9 +38,7 @@ #include <libxml/xpath.h> #include <string.h> -#include "e-util/e-error.h" #include "calendar/common/authentication.c" - #include "format-handler.h" static void diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c index ab6afad801..2fbf0d7bbe 100644 --- a/plugins/save-calendar/save-calendar.c +++ b/plugins/save-calendar/save-calendar.c @@ -33,7 +33,7 @@ #include <libedataserver/e-source.h> #include <libedataserverui/e-source-selector.h> #include <libecal/e-cal.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <string.h> #include <shell/e-shell-sidebar.h> @@ -239,7 +239,7 @@ open_for_writing (GtkWindow *parent, const gchar *uri, GError **error) if (err && err->code == G_IO_ERROR_EXISTS) { g_clear_error (&err); - if (e_error_run_dialog_for_args (parent, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, uri, NULL) == GTK_RESPONSE_OK) { + if (e_alert_run_dialog_for_args (parent, E_ALERT_ASK_FILE_EXISTS_OVERWRITE, uri, NULL) == GTK_RESPONSE_OK) { fostream = g_file_replace (file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &err); if (err && fostream) { diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c index 7b691853fd..8205040086 100644 --- a/plugins/startup-wizard/startup-wizard.c +++ b/plugins/startup-wizard/startup-wizard.c @@ -24,7 +24,7 @@ #include <gconf/gconf-client.h> #include <glib/gi18n.h> #include <gtk/gtk.h> -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-import.h" #include "shell/e-shell.h" #include "shell/es-event.h" @@ -227,7 +227,7 @@ startup_wizard_commit (EPlugin *ep, EMConfigTargetAccount *target) import_iterator = import_importers; import_importer = import_iterator->data; - import_dialog = e_error_new (e_shell_get_active_window (shell), "shell:importing", _("Importing data."), NULL); + import_dialog = e_alert_new_dialog_for_args (e_shell_get_active_window (shell), "shell:importing", _("Importing data."), NULL); g_signal_connect(import_dialog, "response", G_CALLBACK(import_dialog_response), NULL); import_label = gtk_label_new(_("Please wait")); import_progress = gtk_progress_bar_new(); diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c index c3e1ff20dd..b96c01b868 100644 --- a/plugins/templates/templates.c +++ b/plugins/templates/templates.c @@ -42,7 +42,6 @@ #include <mail/mail-session.h> #include <mail/mail-ops.h> #include <mail/message-list.h> -#include <e-util/e-error.h> #include <e-util/e-plugin.h> #include <e-util/e-util.h> #include <shell/e-shell-view.h> diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c index 3ef047d526..f353d15366 100644 --- a/plugins/tnef-attachments/tnef-plugin.c +++ b/plugins/tnef-attachments/tnef-plugin.c @@ -49,7 +49,6 @@ #include <em-format/em-format.h> #include <mail/em-format-hook.h> #include <mail/em-utils.h> -#include <e-util/e-error.h> #include <e-util/e-mktemp.h> gint verbose = 0; diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c index e10d1094c6..44d2ff9604 100644 --- a/shell/e-shell-content.c +++ b/shell/e-shell-content.c @@ -1472,7 +1472,7 @@ e_shell_content_run_advanced_search_dialog (EShellContent *shell_content) ERuleContext *context; const gchar *user_filename; gint response; - EError *error = NULL; + EAlert *alert = NULL; g_return_if_fail (E_IS_SHELL_CONTENT (shell_content)); @@ -1517,10 +1517,10 @@ run: if (response != GTK_RESPONSE_OK && response != GTK_RESPONSE_APPLY) goto exit; - if (!e_filter_rule_validate (rule, &error)) { - e_error_run_dialog (GTK_WINDOW (dialog), error); - e_error_free (error); - error = NULL; + if (!e_filter_rule_validate (rule, &alert)) { + e_alert_run_dialog (GTK_WINDOW (dialog), alert); + e_alert_free (alert); + alert = NULL; goto run; } @@ -1576,7 +1576,7 @@ e_shell_content_run_save_search_dialog (EShellContent *shell_content) const gchar *user_filename; gchar *search_name; gint response; - EError *error = NULL; + EAlert *alert = NULL; g_return_if_fail (E_IS_SHELL_CONTENT (shell_content)); @@ -1625,10 +1625,10 @@ run: if (response != GTK_RESPONSE_OK) goto exit; - if (!e_filter_rule_validate (rule, &error)) { - e_error_run_dialog (GTK_WINDOW (dialog), error); - e_error_free (error); - error = NULL; + if (!e_filter_rule_validate (rule, &alert)) { + e_alert_run_dialog (GTK_WINDOW (dialog), alert); + e_alert_free (alert); + alert = NULL; goto run; } diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c index 0c17c97fe8..e2aacc451e 100644 --- a/shell/e-shell-migrate.c +++ b/shell/e-shell-migrate.c @@ -28,7 +28,7 @@ #include <libedataserver/e-xml-utils.h> #include "e-util/e-bconf-map.h" -#include "e-util/e-error.h" +#include "e-util/e-alert.h" #include "e-util/e-file-utils.h" #include "e-util/e-util.h" @@ -70,7 +70,7 @@ shell_migrate_attempt (EShell *shell, if (error != NULL) { gint response; - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( e_shell_get_active_window (shell), "shell:upgrade-failed", error->message, NULL); @@ -242,7 +242,7 @@ e_shell_migrate_attempt (EShell *shell) need = g_strdup_printf (_("%ld KB"), usage); have = g_strdup_printf (_("%ld KB"), avail); - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( e_shell_get_active_window (shell), "shell:upgrade-nospace", need, have, NULL); @@ -285,13 +285,13 @@ check_old: string = g_strdup_printf ( "%d.%d.%d", last_major, last_minor, last_micro); - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( e_shell_get_active_window (shell), "shell:upgrade-remove-1-4", string, NULL); g_free (string); switch (response) { case GTK_RESPONSE_OK: /* delete */ - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( e_shell_get_active_window (shell), "shell:upgrade-remove-1-4-confirm", NULL); diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c index 82970092c3..d961ebef55 100644 --- a/shell/e-shell-window-actions.c +++ b/shell/e-shell-window-actions.c @@ -23,7 +23,7 @@ #include "e-preferences-window.h" #include <e-util/e-dialog-utils.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-print.h> #include <gal-define-views-dialog.h> @@ -752,7 +752,7 @@ action_forget_passwords_cb (GtkAction *action, { gint response; - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( GTK_WINDOW (shell_window), "shell:forget-passwords", NULL); if (response == GTK_RESPONSE_OK) diff --git a/shell/main.c b/shell/main.c index c37ccc4d6c..7a09f60d12 100644 --- a/shell/main.c +++ b/shell/main.c @@ -54,7 +54,6 @@ #include "e-util/e-bconf-map.h" #include "e-util/e-dialog-utils.h" -#include "e-util/e-error.h" #include "e-util/e-plugin.h" #include "e-util/e-plugin-ui.h" #include "e-util/e-profile-event.h" diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c index 2a1b980eb5..4e61799512 100644 --- a/widgets/misc/e-import-assistant.c +++ b/widgets/misc/e-import-assistant.c @@ -29,7 +29,6 @@ #include <glib/gi18n.h> #include <gdk/gdkkeysyms.h> -#include "e-util/e-error.h" #include "e-util/e-import.h" #include "e-util/e-util-private.h" diff --git a/widgets/misc/e-signature-editor.c b/widgets/misc/e-signature-editor.c index b5de5042ba..49ce3c6a32 100644 --- a/widgets/misc/e-signature-editor.c +++ b/widgets/misc/e-signature-editor.c @@ -24,7 +24,7 @@ #include <string.h> #include <glib/gi18n.h> -#include <e-util/e-error.h> +#include <e-util/e-alert.h> #include <e-util/e-signature-utils.h> #define E_SIGNATURE_EDITOR_GET_PRIVATE(obj) \ @@ -89,7 +89,7 @@ action_close_cb (GtkAction *action, if (something_changed) { gint response; - response = e_error_run_dialog_for_args ( + response = e_alert_run_dialog_for_args ( GTK_WINDOW (editor), "mail:ask-signature-changed", NULL); if (response == GTK_RESPONSE_YES) { @@ -144,7 +144,7 @@ action_save_and_close_cb (GtkAction *action, gtkhtml_editor_save (GTKHTML_EDITOR (editor), filename, html, &error); if (error != NULL) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (editor), "mail:no-save-signature", error->message, NULL); @@ -159,7 +159,7 @@ action_save_and_close_cb (GtkAction *action, /* Make sure the signature name is not blank. */ if (*signature_name == '\0') { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (editor), "mail:blank-signature", NULL); gtk_widget_grab_focus (entry); @@ -172,7 +172,7 @@ action_save_and_close_cb (GtkAction *action, same_name = (ESignature *) e_signature_list_find ( signature_list, E_SIGNATURE_FIND_NAME, signature_name); if (same_name != NULL && !e_signature_is_equal (signature, same_name)) { - e_error_run_dialog_for_args ( + e_alert_run_dialog_for_args ( GTK_WINDOW (editor), "mail:signature-already-exists", signature_name, NULL); |