aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-mt.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-mt.c')
-rw-r--r--mail/mail-mt.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index cf552dbdb5..631f46b34c 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -9,16 +9,12 @@
#include <glib.h>
-#include <gtk/gtkentry.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkwidget.h>
-#include <gtk/gtkcheckbutton.h>
+#include <gtk/gtkdialog.h>
+#include <gtk/gtkstock.h>
#include <libgnome/gnome-defs.h>
#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-dialog-util.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-stock.h>
#include <gal/widgets/e-gui-utils.h>
#include <gal/widgets/e-unicode.h>
@@ -140,7 +136,7 @@ void *mail_msg_new(mail_msg_op_t *ops, EMsgPort *reply_port, size_t size)
static void destroy_objects(CamelObject *o, void *event_data, void *data)
{
if (event_data)
- gtk_object_unref(event_data);
+ g_object_unref(event_data);
}
#ifdef MALLOC_CHECK
@@ -221,9 +217,12 @@ void mail_msg_free(void *msg)
/* hash table of ops->dialogue of active errors */
static GHashTable *active_errors = NULL;
-static void error_gone(GtkObject *o, void *data)
+static void error_response(GtkObject *o, int button, void *data)
{
g_hash_table_remove(active_errors, data);
+
+ gtk_widget_destroy((GtkWidget *)o);
+ g_object_unref(o);
}
void mail_msg_check_error(void *msg)
@@ -231,7 +230,7 @@ void mail_msg_check_error(void *msg)
struct _mail_msg *m = msg;
char *what = NULL;
char *text;
- GnomeDialog *gd;
+ GtkDialog *gd;
#ifdef MALLOC_CHECK
checkmem(m);
@@ -268,11 +267,9 @@ void mail_msg_check_error(void *msg)
return;
}
- gd = (GnomeDialog *)gnome_error_dialog(text);
+ gd = (GtkDialog *)gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", text);
g_hash_table_insert(active_errors, m->ops, gd);
- g_free(text);
- gtk_signal_connect((GtkObject *)gd, "destroy", error_gone, m->ops);
- gnome_dialog_set_close(gd, TRUE);
+ g_signal_connect(gd, "response", G_CALLBACK(error_response), m->ops);
gtk_widget_show((GtkWidget *)gd);
}
@@ -919,7 +916,7 @@ static void do_op_status(struct _mail_msg *mm)
if (data->activity_state == 3) {
MAIL_MT_UNLOCK (mail_msg_lock);
if (activity)
- gtk_object_unref (GTK_OBJECT (activity));
+ g_object_unref(activity);
if (msg->cancel)
camel_operation_unref (msg->cancel);
camel_exception_clear (&msg->ex);
@@ -934,11 +931,11 @@ static void do_op_status(struct _mail_msg *mm)
}
} else if (data->activity) {
activity = data->activity;
- gtk_object_ref (GTK_OBJECT (activity));
+ g_object_ref((activity));
MAIL_MT_UNLOCK (mail_msg_lock);
evolution_activity_client_update (activity, out, (double)(pc/100.0));
- gtk_object_unref (GTK_OBJECT (activity));
+ g_object_unref(activity);
} else {
MAIL_MT_UNLOCK (mail_msg_lock);
}
@@ -1009,6 +1006,6 @@ set_stop(int sensitive)
bonobo_ui_component_set_prop(uic, "/commands/MailStop", "sensitive", sensitive?"1":"0", NULL);
}
- gtk_object_unref(GTK_OBJECT(it));
+ g_object_unref(it);
last = sensitive;
}