aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/em-folder-view.c22
2 files changed, 15 insertions, 12 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 5ece10af5f..de893a4422 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-13 Jeffrey Stedfast <fejj@novell.com>
+
+ * em-folder-view.c (emfv_message_reply): Chck that the selection
+ is active. Hopefully this will fix bug #61427.
+
2004-07-13 Dan Winship <danw@novell.com>
* em-utils.c (em_utils_selection_set_urilist,
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 71e24a3d40..8eb83642f1 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -82,6 +82,7 @@
#include <gtkhtml/htmlobject.h>
#include <gtkhtml/htmlengine.h>
#include <gtkhtml/htmlengine-save.h>
+#include <gtkhtml/htmlengine-edit-cut-and-paste.h>
#include "mail-mt.h"
#include "mail-ops.h"
@@ -1230,25 +1231,22 @@ emfv_message_post_reply (BonoboUIComponent *uic, void *data, const char *path)
static void
emfv_message_reply(EMFolderView *emfv, int mode)
{
- /* GtkClipboard *clip; */
-
+ HTMLObject *selection;
+ guint len;
+
if (emfv->list->cursor_uid == NULL)
return;
if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
return;
-
- /* Look away! Look away! */
-
- /* HACK: Nasty internal gtkhtml poking going on here */
-
- if (((EMFormatHTML *)emfv->preview)->html->engine->selection
- && ((EMFormatHTML *)emfv->preview)->html->engine->primary) {
- /* && GTK_WIDGET_HAS_FOCUS(emfv->preview->formathtml.html)*/
+
+ html_engine_copy_object (((EMFormatHTML *)emfv->preview)->html->engine, &selection, &len);
+ if (selection != NULL) {
HTMLEngineSaveState *state;
-
+
state = html_engine_save_buffer_new(((EMFormatHTML *)emfv->preview)->html->engine, TRUE);
- html_object_save(((EMFormatHTML *)emfv->preview)->html->engine->primary, state);
+ html_object_save (selection, state);
+ html_object_destroy (selection);
if (state->user_data && ((GString *)state->user_data)->len) {
CamelMimeMessage *msg, *src;
struct _camel_header_raw *header;