aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-10-12 00:47:17 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-10-12 00:47:17 +0800
commitdbcaac3afaabb7345f0c76a04a76f78b310f79af (patch)
treec71b47d4a313cb5d64b4c8cb83164b6947b8cf50
parenta7b886424fdbc61d28b63b4cda24616988e23d5a (diff)
downloadgsoc2013-evolution-dbcaac3afaabb7345f0c76a04a76f78b310f79af.tar
gsoc2013-evolution-dbcaac3afaabb7345f0c76a04a76f78b310f79af.tar.gz
gsoc2013-evolution-dbcaac3afaabb7345f0c76a04a76f78b310f79af.tar.bz2
gsoc2013-evolution-dbcaac3afaabb7345f0c76a04a76f78b310f79af.tar.lz
gsoc2013-evolution-dbcaac3afaabb7345f0c76a04a76f78b310f79af.tar.xz
gsoc2013-evolution-dbcaac3afaabb7345f0c76a04a76f78b310f79af.tar.zst
gsoc2013-evolution-dbcaac3afaabb7345f0c76a04a76f78b310f79af.zip
Make sure the service/storage are non-NULL.
2001-10-11 Jeffrey Stedfast <fejj@ximian.com> * component-factory.c (free_storage): Make sure the service/storage are non-NULL. * mail-callbacks.c (e_gnome_dialog_parent_destroyed): Call gtk_main_quit. (send_receive_mail): Don't use e_gnome stuff since this doesn't need to be run using gnome_dialog_run_and_close(). (composer_send_cb): Same. (edit_msg): Here too. (resend_msg): And here. (search_msg): Same. (filter_edit): Here too. (filter_edit): Don't use e_gnome_dialog_set_parent() because we don't do gnome_dialog_run_and_close on this dialog. (e_gnome_error_dialog_parented): Removed. (e_gnome_ok_dialog_parented): Removed. svn path=/trunk/; revision=13583
-rw-r--r--mail/ChangeLog20
-rw-r--r--mail/component-factory.c10
-rw-r--r--mail/mail-callbacks.c80
3 files changed, 61 insertions, 49 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 782da07741..8db32791ab 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,22 @@
+2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
+
+ * component-factory.c (free_storage): Make sure the
+ service/storage are non-NULL.
+
+ * mail-callbacks.c (e_gnome_dialog_parent_destroyed): Call
+ gtk_main_quit.
+ (send_receive_mail): Don't use e_gnome stuff since this doesn't
+ need to be run using gnome_dialog_run_and_close().
+ (composer_send_cb): Same.
+ (edit_msg): Here too.
+ (resend_msg): And here.
+ (search_msg): Same.
+ (filter_edit): Here too.
+ (filter_edit): Don't use e_gnome_dialog_set_parent() because we
+ don't do gnome_dialog_run_and_close on this dialog.
+ (e_gnome_error_dialog_parented): Removed.
+ (e_gnome_ok_dialog_parented): Removed.
+
2001-10-10 Dan Winship <danw@ximian.com>
* mail-config.c (new_source_created): Fix up the logic here.
@@ -43,6 +62,7 @@
Should fix #11981.
2001-10-09 Jeffrey Stedfast <fejj@ximian.com>
+>>>>>>> 1.1813
* folder-browser.c (done_message_selected): Make sure the
mail-display is non-NULL.
diff --git a/mail/component-factory.c b/mail/component-factory.c
index e193fec3c6..5d47f42d31 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -729,9 +729,13 @@ owner_set_cb (EvolutionShellComponent *shell_component,
static void
free_storage (gpointer service, gpointer storage, gpointer data)
{
- camel_service_disconnect (CAMEL_SERVICE (service), TRUE, NULL);
- camel_object_unref (CAMEL_OBJECT (service));
- bonobo_object_unref (BONOBO_OBJECT (storage));
+ if (service) {
+ camel_service_disconnect (CAMEL_SERVICE (service), TRUE, NULL);
+ camel_object_unref (CAMEL_OBJECT (service));
+ }
+
+ if (storage)
+ bonobo_object_unref (BONOBO_OBJECT (storage));
}
static void
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 4507156f3c..56b155e828 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -78,7 +78,7 @@
static void
e_gnome_dialog_parent_destroyed (GtkWidget *parent, GtkWidget *dialog)
{
- gtk_widget_destroy (dialog);
+ gnome_dialog_close (GNOME_DIALOG (dialog));
}
static void
@@ -103,30 +103,6 @@ e_gnome_warning_dialog_parented (const char *warning, GtkWindow *parent)
}
static GtkWidget *
-e_gnome_error_dialog_parented (const char *error, GtkWindow *parent)
-{
- GtkWidget *dialog;
-
- dialog = gnome_error_dialog_parented (error, parent);
- gtk_signal_connect (GTK_OBJECT (parent), "destroy",
- e_gnome_dialog_parent_destroyed, dialog);
-
- return dialog;
-}
-
-static GtkWidget *
-e_gnome_ok_dialog_parented (const char *message, GtkWindow *parent)
-{
- GtkWidget *dialog;
-
- dialog = gnome_ok_dialog_parented (message, parent);
- gtk_signal_connect (GTK_OBJECT (parent), "destroy",
- e_gnome_dialog_parent_destroyed, dialog);
-
- return dialog;
-}
-
-static GtkWidget *
e_gnome_ok_cancel_dialog_parented (const char *message, GnomeReplyCallback callback,
gpointer data, GtkWindow *parent)
{
@@ -249,7 +225,12 @@ send_receive_mail (GtkWidget *widget, gpointer user_data)
account = mail_config_get_default_account ();
if (!account || !account->transport) {
GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (user_data), GTK_TYPE_WINDOW);
- e_gnome_error_dialog_parented (_("You have not set a mail transport method"), GTK_WINDOW (win));
+ GtkWidget *dialog;
+
+ dialog = gnome_error_dialog_parented (_("You have not set a mail transport method"), GTK_WINDOW (win));
+ gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+ gtk_widget_show (dialog);
+
return;
}
@@ -614,10 +595,11 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
if (!mail_config_is_configured ()) {
GtkWidget *dialog;
- dialog = e_gnome_ok_dialog_parented (_("You must configure an account before you "
- "can send this email."),
- GTK_WINDOW (composer));
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+ dialog = gnome_ok_dialog_parented (_("You must configure an account before you "
+ "can send this email."),
+ GTK_WINDOW (composer));
+ gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+ gtk_widget_show (dialog);
return;
}
@@ -1641,12 +1623,13 @@ edit_msg (GtkWidget *widget, gpointer user_data)
FolderBrowser *fb = FOLDER_BROWSER (user_data);
if (!folder_browser_is_drafts (fb)) {
- GtkWidget *message;
+ GtkWidget *dialog;
- message = e_gnome_warning_dialog_parented (_("You may only edit messages saved\n"
- "in the Drafts folder."),
- FB_WINDOW (fb));
- gnome_dialog_run_and_close (GNOME_DIALOG (message));
+ dialog = gnome_warning_dialog_parented (_("You may only edit messages saved\n"
+ "in the Drafts folder."),
+ FB_WINDOW (fb));
+ gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+ gtk_widget_show (dialog);
return;
}
@@ -1676,12 +1659,13 @@ resend_msg (GtkWidget *widget, gpointer user_data)
GPtrArray *uids;
if (!folder_browser_is_sent (fb)) {
- GtkWidget *message;
+ GtkWidget *dialog;
- message = e_gnome_warning_dialog_parented (_("You may only resend messages\n"
- "in the Sent folder."),
- FB_WINDOW (fb));
- gnome_dialog_run_and_close (GNOME_DIALOG (message));
+ dialog = gnome_warning_dialog_parented (_("You may only resend messages\n"
+ "in the Sent folder."),
+ FB_WINDOW (fb));
+ gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+ gtk_widget_show (dialog);
return;
}
@@ -1712,7 +1696,11 @@ search_msg (GtkWidget *widget, gpointer user_data)
GtkWidget *w;
if (fb->mail_display->current_message == NULL) {
- gtk_widget_show_all (e_gnome_warning_dialog_parented (_("No Message Selected"), FB_WINDOW (fb)));
+ GtkWidget *dialog;
+
+ dialog = gnome_warning_dialog_parented (_("No Message Selected"), FB_WINDOW (fb));
+ gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+ gtk_widget_show (dialog);
return;
}
@@ -1754,7 +1742,6 @@ save_msg_ok (GtkWidget *widget, gpointer user_data)
e_gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (user_data));
- gtk_widget_set_parent (dialog, GTK_WIDGET (user_data));
text = gtk_label_new (_("A file by that name already exists.\nOverwrite it?"));
gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), text, TRUE, TRUE, 4);
gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE);
@@ -2063,19 +2050,20 @@ filter_edit (BonoboUIComponent *uih, void *user_data, const char *path)
if (((RuleContext *)fc)->error) {
GtkWidget *dialog;
- gchar *err;
+ char *err;
err = g_strdup_printf (_("Error loading filter information:\n%s"),
((RuleContext *)fc)->error);
- dialog = e_gnome_warning_dialog_parented (err, FB_WINDOW (fb));
+ dialog = gnome_warning_dialog_parented (err, FB_WINDOW (fb));
g_free (err);
- gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+ gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+ gtk_widget_show (dialog);
return;
}
filter_editor = (GtkWidget *)filter_editor_new (fc, filter_source_names);
- e_gnome_dialog_set_parent (GNOME_DIALOG (filter_editor), FB_WINDOW (fb));
+ gnome_dialog_set_parent (GNOME_DIALOG (filter_editor), FB_WINDOW (fb));
gtk_window_set_title (GTK_WINDOW (filter_editor), _("Filters"));
gtk_object_set_data_full (GTK_OBJECT (filter_editor), "context", fc, (GtkDestroyNotify)gtk_object_unref);