[evolution-patches] mail, 309647, reply to selection messing up normal replies



this has really been getting to me lately, this patch seems to fix it,
so far anyway.


Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3671
diff -u -p -r1.3671 ChangeLog
--- mail/ChangeLog	2 Aug 2005 13:47:19 -0000	1.3671
+++ mail/ChangeLog	3 Aug 2005 09:32:21 -0000
@@ -1,3 +1,8 @@
+2005-08-03  Not Zed  <NotZed Ximian com>
+
+	* em-folder-view.c (emfv_message_reply): try to fix #309647, only
+	act if the selection is actually active.
+
 2005-08-01  Shakti Sen <shprasad novell com>
 
 	* em-composer-prefs.c: Included 'gtkentry.h' to resolve the
Index: mail/em-folder-view.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-view.c,v
retrieving revision 1.127
diff -u -p -r1.127 em-folder-view.c
--- mail/em-folder-view.c	21 Jul 2005 04:15:21 -0000	1.127
+++ mail/em-folder-view.c	3 Aug 2005 09:32:22 -0000
@@ -1388,7 +1388,7 @@ emfv_message_post_reply (BonoboUICompone
 static void
 emfv_message_reply(EMFolderView *emfv, int mode)
 {
-	char *selection_string;
+	char *html;
 	guint len;
 	
 	if (emfv->list->cursor_uid == NULL)
@@ -1397,8 +1397,9 @@ emfv_message_reply(EMFolderView *emfv, i
 	if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
 		return;
 
-	selection_string = gtk_html_get_selection_html (((EMFormatHTML *)emfv->preview)->html, &len);
-	if (selection_string && len) {
+	if (gtk_html_command(((EMFormatHTML *)emfv->preview)->html, "is-selection-active")
+	    && (html = gtk_html_get_selection_html (((EMFormatHTML *)emfv->preview)->html, &len))
+	    && len) {
 		CamelMimeMessage *msg, *src;
 		struct _camel_header_raw *header;
 		
@@ -1414,7 +1415,7 @@ emfv_message_reply(EMFolderView *emfv, i
 		}
 		camel_mime_part_set_encoding((CamelMimePart *)msg, CAMEL_TRANSFER_ENCODING_8BIT);
 		camel_mime_part_set_content((CamelMimePart *)msg,
-					    selection_string, len, "text/html");
+					    html, len, "text/html");
 		em_utils_reply_to_message (emfv->folder, emfv->list->cursor_uid, msg, mode, NULL);
 		camel_object_unref(msg);
 	} else {


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