aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon@quotidian.org>2009-12-08 00:19:37 +0800
committerJonathon Jongsma <jonathon@quotidian.org>2009-12-08 02:25:23 +0800
commit31204c9cc21ec32c8006124cf18763161daa99d2 (patch)
tree7e2173da211f3e844172ea0dbdfb0e87638d8e85 /composer/e-msg-composer.c
parentf20528381a13299e8d160195d4b731e10b7ed437 (diff)
downloadgsoc2013-evolution-31204c9cc21ec32c8006124cf18763161daa99d2.tar.gz
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/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c17
1 files changed, 9 insertions, 8 deletions
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;