[evolution-patches] 70858, mail, crash setting folder to newly created one
- From: Not Zed <notzed ximian com>
- To: asdf <evolution-patches lists ximian com>
- Subject: [evolution-patches] 70858, mail, crash setting folder to newly created one
- Date: Wed, 19 Jan 2005 15:04:17 +0800
this fixes the crash but only partially fixes the cause.
for some reason, sometimes when we do a select_uri on the folder tree, it fucks up, and puts the tree in a messed up state - also with nothing selected and even unable to select anything properly. so i don't know what's going on there.
jeff can fix it, he knows that code better than me (or at least, he wrote it).
? mail/59717.diff
? mail/GNOME_Evolution_Mail.oaf
? mail/GNOME_Evolution_Mail.oafinfo
? mail/Mail-common.c
? mail/Mail-skels.c
? mail/Mail-stubs.c
? mail/Mail.h
? mail/Mailer-common.c
? mail/Mailer-skels.c
? mail/Mailer-stubs.c
? mail/Mailer.h
? mail/a
? mail/a.diff
? mail/a.out
? mail/a.txt
? mail/all.txt
? mail/b
? mail/blah.c
? mail/blah.ps
? mail/changes.diff
? mail/conf.keys
? mail/day.diff
? mail/diff
? mail/e-plugin.html
? mail/econf.h
? mail/em-security-info.c
? mail/em-store-view.c
? mail/evolution-mail
? mail/evolution-mail-2.0.schemas
? mail/evolution-mail-ops.log
? mail/evolution-mbox-upgrade
? mail/f.diff
? mail/fix.ed
? mail/foo
? mail/html.diff
? mail/inline-attach.diff
? mail/lockdown.txt
? mail/m.diff
? mail/mail-config.c.save
? mail/mail-config.evolution
? mail/mail-search.gladep
? mail/mail-security.gladep
? mail/mail-send-recv.c.save
? mail/mail.diff
? mail/map.sed
? mail/mc.diff
? mail/message-list.c.save
? mail/ml.diff
? mail/old
? mail/out
? mail/output.ps
? mail/plugins
? mail/search-types.xml
? mail/store_change.diff
? mail/subscribe-dialog-new.c
? mail/subscribe-dialog.c.new
? mail/subscribe-dialog.glade.backup
? mail/subscribe-dialog.glade.save
? mail/subscribe-dialog.gladep
? mail/test-mt
? mail/today-1.diff
? mail/today-2.diff
? mail/today-3.diff
? mail/today-4.diff
? mail/today-5.diff
? mail/today.diff
? mail/typescript
? mail/week.diff
? mail/importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.oaf
? mail/importers/GNOME_Evolution_Mail_Elm_Intelligent_Importer.oaf.in
? mail/importers/GNOME_Evolution_Mail_Mbox_Importer.oaf
? mail/importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.oaf
? mail/importers/GNOME_Evolution_Mail_Netscape_Intelligent_Importer.oaf.in
? mail/importers/GNOME_Evolution_Mail_Outlook_Importer.oaf
? mail/importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.oaf
? mail/importers/GNOME_Evolution_Mail_Pine_Intelligent_Importer.oaf.in
? mail/importers/am.diff
? mail/importers/b
? mail/importers/elm-importer.c.new
? mail/importers/elm.ps
? mail/importers/im.diff
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3444.2.33
diff -u -p -r1.3444.2.33 ChangeLog
--- mail/ChangeLog 19 Jan 2005 03:56:16 -0000 1.3444.2.33
+++ mail/ChangeLog 19 Jan 2005 07:04:06 -0000
@@ -1,3 +1,14 @@
+2005-01-19 Not Zed <NotZed Ximian com>
+
+ ** See bug #70858.
+
+ * em-folder-selector.c (folder_created_cb): removed.
+ (emfs_response): set the selected uri directly after creating it,
+ rather than doing it asynchronously.
+
+ * mail-account-gui.c (mail_account_gui_save): dont dereference
+ default folder pointers if they're NULL.
+
2005-01-18 Not Zed <NotZed Ximian com>
** See bug #70768.
Index: mail/em-folder-selector.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-selector.c,v
retrieving revision 1.30.12.2
diff -u -p -r1.30.12.2 em-folder-selector.c
--- mail/em-folder-selector.c 6 Oct 2004 04:21:45 -0000 1.30.12.2
+++ mail/em-folder-selector.c 19 Jan 2005 07:04:07 -0000
@@ -108,15 +108,7 @@ em_folder_selector_init (EMFolderSelecto
static void
em_folder_selector_destroy (GtkObject *obj)
{
- EMFolderSelector *emfs = (EMFolderSelector *) obj;
- EMFolderTreeModel *model;
-
- if (emfs->created_id != 0) {
- model = em_folder_tree_get_model (emfs->emft);
- g_signal_handler_disconnect (model, emfs->created_id);
- emfs->created_id = 0;
- }
-
+ /*EMFolderSelector *emfs = (EMFolderSelector *) obj;*/
GTK_OBJECT_CLASS (parent_class)->destroy (obj);
}
@@ -127,31 +119,11 @@ em_folder_selector_finalize (GObject *ob
g_free (emfs->selected_path);
g_free (emfs->selected_uri);
- g_free (emfs->created_uri);
G_OBJECT_CLASS (parent_class)->finalize (obj);
}
static void
-folder_created_cb (EMFolderTreeModel *model, const char *path, const char *uri, EMFolderSelector *emfs)
-{
- CamelException ex;
- CamelStore *store;
-
- camel_exception_init (&ex);
- if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex)))
- return;
-
- if (camel_store_folder_uri_equal (store, emfs->created_uri, uri)) {
- em_folder_tree_set_selected (emfs->emft, uri);
- g_signal_handler_disconnect (model, emfs->created_id);
- emfs->created_id = 0;
- }
-
- camel_object_unref (store);
-}
-
-static void
emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs)
{
EMFolderTreeModel *model;
@@ -172,14 +144,8 @@ emfs_response (GtkWidget *dialog, int re
if (gtk_dialog_run ((GtkDialog *) dialog) == GTK_RESPONSE_OK) {
uri = em_folder_selector_get_selected_uri ((EMFolderSelector *) dialog);
path = em_folder_selector_get_selected_path ((EMFolderSelector *) dialog);
-
- g_free (emfs->created_uri);
- emfs->created_uri = g_strdup (uri);
-
- if (emfs->created_id == 0)
- emfs->created_id = g_signal_connect (model, "folder-added", G_CALLBACK (folder_created_cb), emfs);
-
em_folder_tree_create_folder (emfs->emft, path, uri);
+ em_folder_tree_set_selected(emfs->emft, uri);
}
gtk_widget_destroy (dialog);
Index: mail/em-folder-selector.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-selector.h,v
retrieving revision 1.8
diff -u -p -r1.8 em-folder-selector.h
--- mail/em-folder-selector.h 18 May 2004 07:28:10 -0000 1.8
+++ mail/em-folder-selector.h 19 Jan 2005 07:04:07 -0000
@@ -49,9 +49,6 @@ struct _EMFolderSelector {
struct _GtkEntry *name_entry;
char *selected_path;
char *selected_uri;
-
- char *created_uri;
- guint created_id;
};
struct _EMFolderSelectorClass {
Index: mail/mail-account-gui.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/Attic/mail-account-gui.c,v
retrieving revision 1.171.14.10
diff -u -p -r1.171.14.10 mail-account-gui.c
--- mail/mail-account-gui.c 2 Dec 2004 04:11:04 -0000 1.171.14.10
+++ mail/mail-account-gui.c 19 Jan 2005 07:04:07 -0000
@@ -2436,8 +2436,9 @@ mail_account_gui_save (MailAccountGui *g
save_service (&gui->transport, NULL, new->transport);
/* Check to make sure that the Drafts folder uri is "valid" before assigning it */
- if (mail_config_get_account_by_source_url (gui->drafts_folder_uri) ||
- !strncmp (gui->drafts_folder_uri, "mbox:", 5)) {
+ if (gui->drafts_folder_uri != NULL
+ && (mail_config_get_account_by_source_url (gui->drafts_folder_uri) ||
+ !strncmp (gui->drafts_folder_uri, "mbox:", 5))) {
new->drafts_folder_uri = em_uri_from_camel (gui->drafts_folder_uri);
} else {
/* assign defaults - the uri is unknown to us (probably pointed to an old source url) */
@@ -2445,8 +2446,9 @@ mail_account_gui_save (MailAccountGui *g
}
/* Check to make sure that the Sent folder uri is "valid" before assigning it */
- if (mail_config_get_account_by_source_url (gui->sent_folder_uri) ||
- !strncmp (gui->sent_folder_uri, "mbox:", 5)) {
+ if (gui->sent_folder_uri != NULL
+ && (mail_config_get_account_by_source_url (gui->sent_folder_uri) ||
+ !strncmp (gui->sent_folder_uri, "mbox:", 5))) {
new->sent_folder_uri = em_uri_from_camel (gui->sent_folder_uri);
} else {
/* assign defaults - the uri is unknown to us (probably pointed to an old source url) */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]