diff options
author | Jonathon Jongsma <jonathon@quotidian.org> | 2009-12-08 00:19:37 +0800 |
---|---|---|
committer | Jonathon Jongsma <jonathon@quotidian.org> | 2009-12-08 02:25:23 +0800 |
commit | 31204c9cc21ec32c8006124cf18763161daa99d2 (patch) | |
tree | 7e2173da211f3e844172ea0dbdfb0e87638d8e85 /composer | |
parent | f20528381a13299e8d160195d4b731e10b7ed437 (diff) | |
download | gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.gz gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.bz2 gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.lz gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.xz gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.zst gsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.zip |
Port all error code to use GObject-ified EAlert / EAlertDialog
The changes are mainly including the e-alert-header.h header instead of just
e-alert.h. This allows us to include e-alert.h in non-UI situations when
necessary.
Diffstat (limited to 'composer')
-rw-r--r-- | composer/e-composer-actions.c | 2 | ||||
-rw-r--r-- | composer/e-composer-autosave.c | 2 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 17 |
3 files changed, 11 insertions, 10 deletions
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c index 31c069a088..7332c93aad 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-alert.h> +#include <e-util/e-alert-dialog.h> static void action_attach_cb (GtkAction *action, diff --git a/composer/e-composer-autosave.c b/composer/e-composer-autosave.c index 638ca9b019..a28986625d 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-alert.h> +#include <e-util/e-alert-dialog.h> #include <e-util/e-util.h> #include <camel/camel-stream-fs.h> #include <camel/camel-stream-mem.h> diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 22f2312fe9..2f2bb99baa 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -46,7 +46,7 @@ #include <gconf/gconf-client.h> #include "e-util/e-dialog-utils.h" -#include "e-util/e-alert.h" +#include "e-util/e-alert-dialog.h" #include "e-util/e-plugin-ui.h" #include "e-util/e-util-private.h" #include "e-util/e-account-utils.h" @@ -168,7 +168,8 @@ emcu_part_to_html (CamelMimePart *part, gssize *len, EMFormat *source) static gboolean emcu_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, const gchar *arg0, ...) { - GtkWidget *mbox, *check = NULL; + GtkDialog *mbox; + GtkWidget *check = NULL; va_list ap; gint button; GConfClient *gconf = gconf_client_get_default (); @@ -181,24 +182,24 @@ emcu_prompt_user (GtkWindow *parent, const gchar *promptkey, const gchar *tag, c } va_start(ap, arg0); - alert = e_alert_newv(tag, arg0, ap); + alert = e_alert_new_valist(tag, arg0, ap); va_end(ap); - mbox = e_alert_new_dialog (parent, alert); - e_alert_free (alert); + mbox = (GtkDialog*) e_alert_dialog_new (parent, alert); + g_object_unref (alert); if (promptkey) { check = gtk_check_button_new_with_mnemonic (_("_Do not show this message again.")); gtk_container_set_border_width((GtkContainer *)check, 12); - gtk_box_pack_start ((GtkBox *)((GtkDialog *) mbox)->vbox, check, TRUE, TRUE, 0); + gtk_box_pack_start ((GtkBox *)mbox->vbox, check, TRUE, TRUE, 0); gtk_widget_show (check); } - button = gtk_dialog_run ((GtkDialog *) mbox); + button = gtk_dialog_run (mbox); if (promptkey) gconf_client_set_bool(gconf, promptkey, !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check)), NULL); - gtk_widget_destroy(mbox); + gtk_widget_destroy((GtkWidget*) mbox); g_object_unref (gconf); return button == GTK_RESPONSE_YES; |