[evolution-patches] Fix crash on DnD of folders (bug 51463)



Comments from http://bugzilla.ximian.com/show_bug.cgi?id=51463

Trying to DnD a folder into another one (or to another position) crashes
evo. The crash is due to a g_assert_not_reached which is... well... reached.
The patch fixes that

Note this does not make DnD work, though. Now what you get is
em-folder-tree.c:drag_data_received_cb going through the codepath that
leads to this:

        if (camel_exception_is_set (&ex)) {
                /* FIXME: error dialog? */
                camel_exception_clear (&ex);
                return FALSE;
        }

and hence, not doing anything. That's a different bug...

Ciao,

-- m


-----------------------------------------------------------------------
Mariano Su�z-Alvarez
Departamento de Matematica - FCEyN - Universidad de Buenos Aires
Ciudad Universitaria, Pab. I. (1428) Ciudad de Buenos Aires, Argentina
http://mate.dm.uba.ar/~aldoc9

    De la observaci�e la irreductibilidad de las creencias �as
    he sacado la mayor lecci�e mi vida. Aprend� respetar las ideas
    ajenas, a detenerme ante el secreto de las conciencias, a entender
    antes de discutir, a discutir antes de condenar. Y como estoy en
    vena de confesiones, hago una m� quiz�superflua: detesto con
    toda mi alma a los fan�cos.

    Norberto Bobbio, Italia civil.

-----------------------------------------------------------------------
Index: em-folder-tree.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-tree.c,v
retrieving revision 1.19
diff -U5 -r1.19 em-folder-tree.c
--- em-folder-tree.c	25 Nov 2003 03:54:13 -0000	1.19
+++ em-folder-tree.c	29 Nov 2003 22:24:12 -0000
@@ -120,11 +120,11 @@
 	DND_DROP_TYPE_MESSAGE_RFC822,  /* drop a message/rfc822 stream */
 	DND_DROP_TYPE_TEXT_URI_LIST,   /* drop an mbox file */
 };
 
 static GtkTargetEntry drag_types[] = {
-	{ "x-uid-list",       0, DND_DRAG_TYPE_FOLDER         },
+	{ "x-folder",         0, DND_DRAG_TYPE_FOLDER         },
 	{ "text/uri-list",    0, DND_DRAG_TYPE_TEXT_URI_LIST  },
 };
 
 static const int num_drag_types = sizeof (drag_types) / sizeof (drag_types[0]);
 
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2901
diff -U5 -r1.2901 ChangeLog
--- ChangeLog	26 Nov 2003 15:26:42 -0000	1.2901
+++ ChangeLog	29 Nov 2003 22:24:14 -0000
@@ -1,5 +1,10 @@
+2003-11-26  Mariano Suárez-Alvarez  <msuarezalvarez arnet com ar>
+
+	* em-folder-tree.c: make the DND_DRAG_TYPE_FOLDER target match the
+	DND_DROP_TYPE_FOLDER target, therefore fixing bug #51463.
+
 2003-11-26  JP Rosevear  <jpr ximian com>
 
 	* Makefile.am: turn on deprecated Gtk stuff
 
 2003-11-24  Jeffrey Stedfast  <fejj ximian com>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]