aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-12-14 02:52:35 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-12-14 02:52:35 +0800
commit25a94bfe0cc1b88fc2b50e52fad62ce8b3afd77a (patch)
treeed624b33c65495be7899ed211c3e6dbab717a846 /mail/mail-display.c
parentd08474c3a598ce2d12ed7d912f69f1993f5a5897 (diff)
downloadgsoc2013-evolution-25a94bfe0cc1b88fc2b50e52fad62ce8b3afd77a.tar
gsoc2013-evolution-25a94bfe0cc1b88fc2b50e52fad62ce8b3afd77a.tar.gz
gsoc2013-evolution-25a94bfe0cc1b88fc2b50e52fad62ce8b3afd77a.tar.bz2
gsoc2013-evolution-25a94bfe0cc1b88fc2b50e52fad62ce8b3afd77a.tar.lz
gsoc2013-evolution-25a94bfe0cc1b88fc2b50e52fad62ce8b3afd77a.tar.xz
gsoc2013-evolution-25a94bfe0cc1b88fc2b50e52fad62ce8b3afd77a.tar.zst
gsoc2013-evolution-25a94bfe0cc1b88fc2b50e52fad62ce8b3afd77a.zip
Get rid of unneeded CamelObject casts. (user_message_response): Don't
2002-12-13 Jeffrey Stedfast <fejj@ximian.com> * mail-session.c: Get rid of unneeded CamelObject casts. (user_message_response): Don't unref the dialog object after we've destroyed it. * mail-display.c (write_data_to_file): Don't unref the dialog object after we've destroyed it. * mail-callbacks.c: Same here. * component-factory.c: Here too. * message-tag-editor.c: Added MESSAGE_TAG_EDITOR_GET_CLASS macros. svn path=/trunk/; revision=19112
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c62
1 files changed, 32 insertions, 30 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 45aaa56811..d4a9f9a1f0 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -179,17 +179,16 @@ write_data_to_file (CamelMimePart *part, const char *name, gboolean unique)
fd = open (name, O_WRONLY | O_CREAT | O_EXCL, 0666);
if (fd == -1 && errno == EEXIST && !unique) {
- GtkWidget *dlg;
+ GtkWidget *dialog;
int button;
- dlg = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
- _("File `%s' already exists.\nOverwrite it?"),
- name);
+ dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
+ _("File `%s' already exists.\nOverwrite it?"),
+ name);
- g_object_set (dlg, "title", _("Overwrite file?"), "allow_grow", TRUE, NULL);
- button = gtk_dialog_run ((GtkDialog *) dlg);
- gtk_widget_destroy (dlg);
- g_object_unref (dlg);
+ g_object_set (dialog, "title", _("Overwrite file?"), "allow_grow", TRUE, NULL);
+ button = gtk_dialog_run ((GtkDialog *) dialog);
+ gtk_widget_destroy (dialog);
if (button != GTK_RESPONSE_YES)
return FALSE;
@@ -372,29 +371,31 @@ launch_cb (GtkWidget *widget, gpointer user_data)
tmpdir = e_mkdtemp ("evolution.XXXXXX");
if (!tmpdir) {
- GtkDialog *dialogue;
-
- dialogue = (GtkDialog *)gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_RESPONSE_CLOSE,
- _("Could not create temporary directory: %s"),
- g_strerror (errno));
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_RESPONSE_CLOSE,
+ _("Could not create temporary directory: %s"),
+ g_strerror (errno));
+
/* FIXME: this should be async */
- gtk_dialog_run(dialogue);
- gtk_widget_destroy((GtkWidget *)dialogue);
+ gtk_dialog_run ((GtkDialog *) dialog);
+ gtk_widget_destroy (dialog);
return;
}
filename = make_safe_filename (tmpdir, part);
if (!write_data_to_file (part, filename, TRUE)) {
- GtkDialog *dialogue;
-
- dialogue = (GtkDialog *)gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_RESPONSE_CLOSE,
- _("Could not create temporary file '%s': %s"),
- filename, g_strerror (errno));
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_RESPONSE_CLOSE,
+ _("Could not create temporary file '%s': %s"),
+ filename, g_strerror (errno));
+
/* FIXME: this should be async */
- gtk_dialog_run(dialogue);
- gtk_widget_destroy((GtkWidget *)dialogue);
- g_free(filename);
+ gtk_dialog_run ((GtkDialog *) dialog);
+ gtk_widget_destroy (dialog);
+ g_free (filename);
return;
}
@@ -879,14 +880,15 @@ drag_data_get_cb (GtkWidget *widget,
tmpdir = e_mkdtemp ("drag-n-drop-XXXXXX");
if (!tmpdir) {
- GtkDialog *dialogue;
-
- dialogue = (GtkDialog *)gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_RESPONSE_CLOSE,
- _("Could not create temporary directory: %s"),
- g_strerror (errno));
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_RESPONSE_CLOSE,
+ _("Could not create temporary directory: %s"),
+ g_strerror (errno));
+
/* FIXME: this should be async */
- gtk_dialog_run(dialogue);
- gtk_widget_destroy((GtkWidget *)dialogue);
+ gtk_dialog_run ((GtkDialog *) dialog);
+ gtk_widget_destroy (dialog);
}
filename = camel_mime_part_get_filename (part);