aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/em-folder-view.c34
-rw-r--r--mail/em-format-html-display.c1
3 files changed, 17 insertions, 27 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 1556d6cf17..7747b81244 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2005-05-05 Radek Doulik <rodo@site>
+
+ * em-folder-view.c (em_folder_view_get_popup_target): use
+ gtk_html_command to ask if selection is active tto avoid using
+ selection API directly
+ (emfv_popup_copy_text): use gtkhtml API instead of engine API
+ (emfv_message_reply): use new gtk_html_get_selection_html function
+ to avoid using low level gtkhtml APIs
+
2005-05-03 Radek Doulik <rodo@site>
* em-format-html-display.c: removed include of htmlinterval.h as
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 2faa47a7fe..8808be3880 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -85,11 +85,6 @@
#include "em-event.h"
#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/htmlobject.h>
-#include <gtkhtml/htmlengine.h>
-#include <gtkhtml/htmlengine-save.h>
-#include <gtkhtml/htmlengine-edit-cut-and-paste.h>
-#include <gtkhtml/htmlselection.h>
#include "mail-mt.h"
#include "mail-ops.h"
@@ -709,7 +704,7 @@ static void
emfv_popup_copy_text(EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
- html_engine_copy (((EMFormatHTML *)emfv->preview)->html->engine);
+ gtk_html_copy (((EMFormatHTML *)emfv->preview)->html);
}
static void
@@ -1333,7 +1328,7 @@ emfv_message_post_reply (BonoboUIComponent *uic, void *data, const char *path)
static void
emfv_message_reply(EMFolderView *emfv, int mode)
{
- HTMLObject *selection;
+ char *selection_string;
guint len;
if (emfv->list->cursor_uid == NULL)
@@ -1341,15 +1336,9 @@ emfv_message_reply(EMFolderView *emfv, int mode)
if (!em_utils_check_user_can_send_mail ((GtkWidget *) emfv))
return;
-
- 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 (selection, state);
- html_object_destroy (selection);
- if (state->user_data && ((GString *)state->user_data)->len) {
+
+ selection_string = gtk_html_get_selection_html (((EMFormatHTML *)emfv->preview)->html, &len);
+ if (selection_string && len) {
CamelMimeMessage *msg, *src;
struct _camel_header_raw *header;
@@ -1365,18 +1354,11 @@ emfv_message_reply(EMFolderView *emfv, int mode)
}
camel_mime_part_set_encoding((CamelMimePart *)msg, CAMEL_TRANSFER_ENCODING_8BIT);
camel_mime_part_set_content((CamelMimePart *)msg,
- ((GString *)state->user_data)->str,
- ((GString *)state->user_data)->len,
- "text/html");
+ selection_string, len, "text/html");
em_utils_reply_to_message (emfv->folder, emfv->list->cursor_uid, msg, mode, NULL);
camel_object_unref(msg);
- } else {
- em_utils_reply_to_message (emfv->folder, emfv->list->cursor_uid, NULL, mode, (EMFormat *)emfv->preview);
- }
-
- html_engine_save_buffer_free(state);
} else {
- em_utils_reply_to_message(emfv->folder, emfv->list->cursor_uid, NULL, mode, (EMFormat *)emfv->preview);
+ em_utils_reply_to_message (emfv->folder, emfv->list->cursor_uid, NULL, mode, (EMFormat *)emfv->preview);
}
}
@@ -2058,7 +2040,7 @@ em_folder_view_get_popup_target(EMFolderView *emfv, EMPopup *emp, int on_display
else
t->target.mask &= ~EM_FOLDER_VIEW_SELECT_LISTONLY;
- if (html_engine_is_selection_active(((EMFormatHTML *)emfv->preview)->html->engine))
+ if (gtk_html_command (((EMFormatHTML *)emfv->preview)->html, "is-selection-active"))
t->target.mask &= ~EM_FOLDER_VIEW_SELECT_SELECTION;
else
t->target.mask &= ~EM_FOLDER_VIEW_SELECT_NOSELECTION;
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 6fc42ac60a..14877890af 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -29,7 +29,6 @@
#include <gtkhtml/gtkhtml.h>
#include <gtkhtml/htmlengine.h>
#include <gtkhtml/htmlobject.h>
-#include <gtkhtml/htmliframe.h>
#include <gtkhtml/gtkhtml-embedded.h>
#include <gtkhtml/gtkhtml-search.h>