[evolution/webkit-composer: 71/231] Preliminary port of composer to EEditor.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer: 71/231] Preliminary port of composer to EEditor.
- Date: Fri, 13 Sep 2013 14:11:57 +0000 (UTC)
commit ba36d7641c90435d430f60bf901834b8302abdc0
Author: Dan Vrátil <dvratil redhat com>
Date: Tue Aug 28 18:18:22 2012 +0200
Preliminary port of composer to EEditor.
composer/e-composer-actions.c | 72 +-
composer/e-composer-actions.h | 84 +-
composer/e-composer-activity.c | 18 +-
composer/e-composer-private.c | 140 +-
composer/e-msg-composer.c | 335 ++--
composer/e-msg-composer.h | 13 +-
.../evolution-util/evolution-util-docs.sgml | 1 -
.../evolution-util/evolution-util-sections.txt | 68 -
doc/reference/evolution-util/evolution-util.types | 1 -
e-util/Makefile.am | 2 -
e-util/e-util.h | 1 -
e-util/e-web-view-gtkhtml.c | 2315 --------------------
e-util/e-web-view-gtkhtml.h | 210 --
modules/mail/e-mail-shell-backend.c | 4 +-
modules/mail/em-composer-prefs.c | 2 +-
15 files changed, 380 insertions(+), 2886 deletions(-)
---
diff --git a/composer/e-composer-actions.c b/composer/e-composer-actions.c
index f16fbdf..4abd047 100644
--- a/composer/e-composer-actions.c
+++ b/composer/e-composer-actions.c
@@ -80,20 +80,24 @@ static void
action_pgp_encrypt_cb (GtkToggleAction *action,
EMsgComposer *composer)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_set_changed (editor, TRUE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, TRUE);
}
static void
action_pgp_sign_cb (GtkToggleAction *action,
EMsgComposer *composer)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_set_changed (editor, TRUE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, TRUE);
}
static void
@@ -144,12 +148,14 @@ static void
action_save_cb (GtkAction *action,
EMsgComposer *composer)
{
- GtkhtmlEditor *editor = GTKHTML_EDITOR (composer);
+ EEditor *editor;
+ EEditorWidget *editor_widget;
const gchar *filename;
gint fd;
GError *error = NULL;
- filename = gtkhtml_editor_get_filename (editor);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ filename = e_editor_get_filename (editor);
if (filename == NULL) {
gtk_action_activate (ACTION (SAVE_AS));
return;
@@ -179,7 +185,7 @@ action_save_cb (GtkAction *action,
} else
close (fd);
- if (!gtkhtml_editor_save (editor, filename, TRUE, &error)) {
+ if (!e_editor_save (editor, filename, TRUE, &error)) {
e_alert_submit (
E_ALERT_SINK (composer),
E_ALERT_NO_SAVE_FILE,
@@ -188,13 +194,15 @@ action_save_cb (GtkAction *action,
return;
}
- gtkhtml_editor_run_command (GTKHTML_EDITOR (composer), "saved");
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, TRUE);
}
static void
action_save_as_cb (GtkAction *action,
EMsgComposer *composer)
{
+ EEditor *editor;
GtkWidget *dialog;
gchar *filename;
gint response;
@@ -218,8 +226,9 @@ action_save_as_cb (GtkAction *action,
if (response != GTK_RESPONSE_OK)
goto exit;
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
- gtkhtml_editor_set_filename (GTKHTML_EDITOR (composer), filename);
+ e_editor_set_filename (editor, filename);
g_free (filename);
gtk_action_activate (ACTION (SAVE));
@@ -246,20 +255,24 @@ static void
action_smime_encrypt_cb (GtkToggleAction *action,
EMsgComposer *composer)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_set_changed (editor, TRUE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, TRUE);
}
static void
action_smime_sign_cb (GtkToggleAction *action,
EMsgComposer *composer)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_set_changed (editor, TRUE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, TRUE);
}
static GtkActionEntry entries[] = {
@@ -442,15 +455,15 @@ e_composer_actions_init (EMsgComposer *composer)
{
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
- GtkhtmlEditor *editor;
- EWebViewGtkHTML *web_view;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
gboolean visible;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
- editor = GTKHTML_EDITOR (composer);
- web_view = e_msg_composer_get_web_view (composer);
- ui_manager = gtkhtml_editor_get_ui_manager (editor);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ ui_manager = e_editor_get_ui_manager (editor);
/* Composer Actions */
action_group = composer->priv->composer_actions;
@@ -494,23 +507,24 @@ e_composer_actions_init (EMsgComposer *composer)
ACTION (SAVE_DRAFT), "short-label", _("Save Draft"), NULL);
g_object_bind_property (
- composer, "html-mode",
+ editor_widget, "mode",
ACTION (PICTURE_GALLERY), "sensitive",
G_BINDING_SYNC_CREATE);
+ /* FIXME WEBKIT Make sure this works */
g_object_bind_property (
- web_view, "editable",
- GTKHTML_EDITOR_ACTION_EDIT_MENU (editor), "sensitive",
+ editor_widget, "editable",
+ e_editor_get_action (editor, "edit"), "sensitive",
G_BINDING_SYNC_CREATE);
g_object_bind_property (
- web_view, "editable",
- GTKHTML_EDITOR_ACTION_FORMAT_MENU (editor), "sensitive",
+ editor_widget, "editable",
+ e_editor_get_action (editor, "format"), "sensitive",
G_BINDING_SYNC_CREATE);
g_object_bind_property (
- web_view, "editable",
- GTKHTML_EDITOR_ACTION_INSERT_MENU (editor), "sensitive",
+ editor_widget, "editable",
+ e_editor_get_action (editor, "insert"), "sensitive",
G_BINDING_SYNC_CREATE);
#if defined (HAVE_NSS)
diff --git a/composer/e-composer-actions.h b/composer/e-composer-actions.h
index 4aed102..93f9908 100644
--- a/composer/e-composer-actions.h
+++ b/composer/e-composer-actions.h
@@ -18,48 +18,48 @@
#ifndef E_COMPOSER_ACTIONS_H
#define E_COMPOSER_ACTIONS_H
-#define E_COMPOSER_ACTION(composer, name) \
- (gtkhtml_editor_get_action (GTKHTML_EDITOR (composer), (name)))
+#define E_COMPOSER_ACTION(editor, name) \
+ (e_editor_get_action (E_EDITOR (editor), (name)))
-#define E_COMPOSER_ACTION_ATTACH(composer) \
- E_COMPOSER_ACTION ((composer), "attach")
-#define E_COMPOSER_ACTION_CLOSE(composer) \
- E_COMPOSER_ACTION ((composer), "close")
-#define E_COMPOSER_ACTION_PGP_ENCRYPT(composer) \
- E_COMPOSER_ACTION ((composer), "pgp-encrypt")
-#define E_COMPOSER_ACTION_PGP_SIGN(composer) \
- E_COMPOSER_ACTION ((composer), "pgp-sign")
-#define E_COMPOSER_ACTION_PICTURE_GALLERY(composer) \
- E_COMPOSER_ACTION ((composer), "picture-gallery")
-#define E_COMPOSER_ACTION_PRINT(composer) \
- E_COMPOSER_ACTION ((composer), "print")
-#define E_COMPOSER_ACTION_PRINT_PREVIEW(composer) \
- E_COMPOSER_ACTION ((composer), "print-preview")
-#define E_COMPOSER_ACTION_PRIORITIZE_MESSAGE(composer) \
- E_COMPOSER_ACTION ((composer), "prioritize-message")
-#define E_COMPOSER_ACTION_REQUEST_READ_RECEIPT(composer) \
- E_COMPOSER_ACTION ((composer), "request-read-receipt")
-#define E_COMPOSER_ACTION_SAVE(composer) \
- E_COMPOSER_ACTION ((composer), "save")
-#define E_COMPOSER_ACTION_SAVE_AS(composer) \
- E_COMPOSER_ACTION ((composer), "save-as")
-#define E_COMPOSER_ACTION_SAVE_DRAFT(composer) \
- E_COMPOSER_ACTION ((composer), "save-draft")
-#define E_COMPOSER_ACTION_SECURITY_MENU(composer) \
- E_COMPOSER_ACTION ((composer), "security-menu")
-#define E_COMPOSER_ACTION_SEND(composer) \
- E_COMPOSER_ACTION ((composer), "send")
-#define E_COMPOSER_ACTION_NEW_MESSAGE(composer) \
- E_COMPOSER_ACTION ((composer), "new-message")
-#define E_COMPOSER_ACTION_SMIME_ENCRYPT(composer) \
- E_COMPOSER_ACTION ((composer), "smime-encrypt")
-#define E_COMPOSER_ACTION_SMIME_SIGN(composer) \
- E_COMPOSER_ACTION ((composer), "smime-sign")
-#define E_COMPOSER_ACTION_VIEW_BCC(composer) \
- E_COMPOSER_ACTION ((composer), "view-bcc")
-#define E_COMPOSER_ACTION_VIEW_CC(composer) \
- E_COMPOSER_ACTION ((composer), "view-cc")
-#define E_COMPOSER_ACTION_VIEW_REPLY_TO(composer) \
- E_COMPOSER_ACTION ((composer), "view-reply-to")
+#define E_COMPOSER_ACTION_ATTACH(editor) \
+ E_COMPOSER_ACTION ((editor), "attach")
+#define E_COMPOSER_ACTION_CLOSE(editor) \
+ E_COMPOSER_ACTION ((editor), "close")
+#define E_COMPOSER_ACTION_PGP_ENCRYPT(editor) \
+ E_COMPOSER_ACTION ((editor), "pgp-encrypt")
+#define E_COMPOSER_ACTION_PGP_SIGN(editor) \
+ E_COMPOSER_ACTION ((editor), "pgp-sign")
+#define E_COMPOSER_ACTION_PICTURE_GALLERY(editor) \
+ E_COMPOSER_ACTION ((editor), "picture-gallery")
+#define E_COMPOSER_ACTION_PRINT(editor) \
+ E_COMPOSER_ACTION ((editor), "print")
+#define E_COMPOSER_ACTION_PRINT_PREVIEW(editor) \
+ E_COMPOSER_ACTION ((editor), "print-preview")
+#define E_COMPOSER_ACTION_PRIORITIZE_MESSAGE(editor) \
+ E_COMPOSER_ACTION ((editor), "prioritize-message")
+#define E_COMPOSER_ACTION_REQUEST_READ_RECEIPT(editor) \
+ E_COMPOSER_ACTION ((editor), "request-read-receipt")
+#define E_COMPOSER_ACTION_SAVE(editor) \
+ E_COMPOSER_ACTION ((editor), "save")
+#define E_COMPOSER_ACTION_SAVE_AS(editor) \
+ E_COMPOSER_ACTION ((editor), "save-as")
+#define E_COMPOSER_ACTION_SAVE_DRAFT(editor) \
+ E_COMPOSER_ACTION ((editor), "save-draft")
+#define E_COMPOSER_ACTION_SECURITY_MENU(editor) \
+ E_COMPOSER_ACTION ((editor), "security-menu")
+#define E_COMPOSER_ACTION_SEND(editor) \
+ E_COMPOSER_ACTION ((editor), "send")
+#define E_COMPOSER_ACTION_NEW_MESSAGE(editor) \
+ E_COMPOSER_ACTION ((editor), "new-message")
+#define E_COMPOSER_ACTION_SMIME_ENCRYPT(editor) \
+ E_COMPOSER_ACTION ((editor), "smime-encrypt")
+#define E_COMPOSER_ACTION_SMIME_SIGN(editor) \
+ E_COMPOSER_ACTION ((editor), "smime-sign")
+#define E_COMPOSER_ACTION_VIEW_BCC(editor) \
+ E_COMPOSER_ACTION ((editor), "view-bcc")
+#define E_COMPOSER_ACTION_VIEW_CC(editor) \
+ E_COMPOSER_ACTION ((editor), "view-cc")
+#define E_COMPOSER_ACTION_VIEW_REPLY_TO(editor) \
+ E_COMPOSER_ACTION ((editor), "view-reply-to")
#endif /* E_COMPOSER_ACTIONS_H */
diff --git a/composer/e-composer-activity.c b/composer/e-composer-activity.c
index a74e5cd..fb40a3a 100644
--- a/composer/e-composer-activity.c
+++ b/composer/e-composer-activity.c
@@ -46,14 +46,16 @@ composer_activity_lock_interface (EComposerActivity *activity)
{
GtkActionGroup *action_group;
EMsgComposer *composer;
- EWebViewGtkHTML *web_view;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
gboolean editable;
composer = e_composer_activity_get_composer (activity);
- web_view = e_msg_composer_get_web_view (composer);
- editable = e_web_view_gtkhtml_get_editable (web_view);
- e_web_view_gtkhtml_set_editable (web_view, FALSE);
+ editor = e_msg_composer_get_editor (composer);
+ editor_widget = e_editor_get_editor_widget (editor);
+ editable = webkit_web_view_get_editable (WEBKIT_WEB_VIEW (editor_widget));
+ webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), FALSE);
activity->priv->saved_editable = editable;
action_group = composer->priv->async_actions;
@@ -65,14 +67,16 @@ composer_activity_unlock_interface (EComposerActivity *activity)
{
GtkActionGroup *action_group;
EMsgComposer *composer;
- EWebViewGtkHTML *web_view;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
gboolean editable;
composer = e_composer_activity_get_composer (activity);
editable = activity->priv->saved_editable;
- web_view = e_msg_composer_get_web_view (composer);
- e_web_view_gtkhtml_set_editable (web_view, editable);
+ editor = e_msg_composer_get_editor (composer);
+ editor_widget = e_editor_get_editor_widget (editor);
+ webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), editable);
action_group = composer->priv->async_actions;
gtk_action_group_set_sensitive (action_group, TRUE);
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 4ca523e..438d1c7 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -31,12 +31,14 @@
static void
composer_setup_charset_menu (EMsgComposer *composer)
{
+ EEditor *editor;
GtkUIManager *ui_manager;
const gchar *path;
GList *list;
guint merge_id;
- ui_manager = gtkhtml_editor_get_ui_manager (GTKHTML_EDITOR (composer));
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ ui_manager = e_editor_get_ui_manager (editor);
path = "/main-menu/options-menu/charset-menu";
merge_id = gtk_ui_manager_new_merge_id (ui_manager);
@@ -58,6 +60,7 @@ composer_setup_charset_menu (EMsgComposer *composer)
gtk_ui_manager_ensure_update (ui_manager);
}
+/* FIXME WEBKIT We don't need to control this anymore....
static void
msg_composer_url_requested_cb (GtkHTML *html,
const gchar *uri,
@@ -78,8 +81,8 @@ msg_composer_url_requested_cb (GtkHTML *html,
mime_part = g_hash_table_lookup (hash_table, uri);
}
- /* If this is not an inline image request,
- * allow the signal emission to continue. */
+ // If this is not an inline image request,
+ // allow the signal emission to continue.
if (mime_part == NULL)
return;
@@ -95,26 +98,29 @@ msg_composer_url_requested_cb (GtkHTML *html,
g_object_unref (camel_stream);
- /* gtk_html_end() destroys the GtkHTMLStream, so we need to
- * stop the signal emission so nothing else tries to use it. */
+ // gtk_html_end() destroys the GtkHTMLStream, so we need to
+ // stop the signal emission so nothing else tries to use it.
g_signal_stop_emission_by_name (html, "url-requested");
}
+*/
static void
composer_update_gallery_visibility (EMsgComposer *composer)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
GtkToggleAction *toggle_action;
gboolean gallery_active;
- gboolean html_mode;
+ EEditorWidgetMode mode;
- editor = GTKHTML_EDITOR (composer);
- html_mode = gtkhtml_editor_get_html_mode (editor);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ mode = e_editor_widget_get_mode (editor_widget);
toggle_action = GTK_TOGGLE_ACTION (ACTION (PICTURE_GALLERY));
gallery_active = gtk_toggle_action_get_active (toggle_action);
- if (html_mode && gallery_active) {
+ if ((mode == E_EDITOR_WIDGET_MODE_HTML) && gallery_active) {
gtk_widget_show (composer->priv->gallery_scrolled_window);
gtk_widget_show (composer->priv->gallery_icon_view);
} else {
@@ -144,9 +150,9 @@ e_composer_private_constructed (EMsgComposer *composer)
EMsgComposerPrivate *priv = composer->priv;
EFocusTracker *focus_tracker;
EShell *shell;
- EWebViewGtkHTML *web_view;
EClientCache *client_cache;
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
GtkUIManager *ui_manager;
GtkAction *action;
GtkWidget *container;
@@ -159,14 +165,14 @@ e_composer_private_constructed (EMsgComposer *composer)
gint ii;
GError *error = NULL;
- editor = GTKHTML_EDITOR (composer);
- ui_manager = gtkhtml_editor_get_ui_manager (editor);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ ui_manager = e_editor_get_ui_manager (editor);
+ editor_widget = e_editor_get_editor_widget (editor);
settings = g_settings_new ("org.gnome.evolution.mail");
shell = e_msg_composer_get_shell (composer);
client_cache = e_shell_get_client_cache (shell);
- web_view = e_msg_composer_get_web_view (composer);
/* Each composer window gets its own window group. */
window = GTK_WINDOW (composer);
@@ -217,21 +223,22 @@ e_composer_private_constructed (EMsgComposer *composer)
focus_tracker = e_focus_tracker_new (GTK_WINDOW (composer));
- action = gtkhtml_editor_get_action (editor, "cut");
+ action = e_editor_get_action (editor, "cut");
e_focus_tracker_set_cut_clipboard_action (focus_tracker, action);
- action = gtkhtml_editor_get_action (editor, "copy");
+ action = e_editor_get_action (editor, "copy");
e_focus_tracker_set_copy_clipboard_action (focus_tracker, action);
- action = gtkhtml_editor_get_action (editor, "paste");
+ action = e_editor_get_action (editor, "paste");
e_focus_tracker_set_paste_clipboard_action (focus_tracker, action);
- action = gtkhtml_editor_get_action (editor, "select-all");
+ action = e_editor_get_action (editor, "select-all");
e_focus_tracker_set_select_all_action (focus_tracker, action);
priv->focus_tracker = focus_tracker;
- container = editor->vbox;
+ container = gtk_hbox_new (FALSE, 0);
+ e_editor_window_pack_above (E_EDITOR_WINDOW (composer), container);
/* Construct the activity bar. */
@@ -268,7 +275,7 @@ e_composer_private_constructed (EMsgComposer *composer)
gtk_widget_show (widget);
g_object_bind_property (
- web_view, "editable",
+ editor_widget, "editable",
widget, "editable",
G_BINDING_SYNC_CREATE);
@@ -292,13 +299,6 @@ e_composer_private_constructed (EMsgComposer *composer)
priv->gallery_scrolled_window = g_object_ref (widget);
gtk_widget_show (widget);
- /* Reparent the scrolled window containing the GtkHTML widget
- * into the content area of the top attachment pane. */
-
- widget = GTK_WIDGET (web_view);
- widget = gtk_widget_get_parent (widget);
- gtk_widget_reparent (widget, container);
-
/* Construct the picture gallery. */
container = priv->gallery_scrolled_window;
@@ -320,7 +320,9 @@ e_composer_private_constructed (EMsgComposer *composer)
G_CALLBACK (composer_update_gallery_visibility), composer);
/* XXX What is this for? */
+ /* FIXME WEBKIT Yes, what is this for?
g_object_set_data (G_OBJECT (composer), "vbox", editor->vbox);
+ */
/* Bind headers to their corresponding actions. */
@@ -372,10 +374,11 @@ e_composer_private_constructed (EMsgComposer *composer)
* we'll stop the signal emission to prevent EWebView from
* launching an async operation. Messy, but works until we
* switch to WebKit. --mbarnes */
-
+ /* FIXME WEBKIT So...we don't need this anymore, right?
g_signal_connect (
web_view, "url-requested",
G_CALLBACK (msg_composer_url_requested_cb), composer);
+ */
g_object_unref (settings);
}
@@ -612,7 +615,9 @@ gboolean
e_composer_paste_html (EMsgComposer *composer,
GtkClipboard *clipboard)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
+ EEditorSelection *editor_selection;
gchar *html;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
@@ -621,8 +626,10 @@ e_composer_paste_html (EMsgComposer *composer,
html = e_clipboard_wait_for_html (clipboard);
g_return_val_if_fail (html != NULL, FALSE);
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_insert_html (editor, html);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ editor_selection = e_editor_widget_get_selection (editor_widget);
+ e_editor_selection_insert_html (editor_selection, html);
g_free (html);
@@ -633,7 +640,8 @@ gboolean
e_composer_paste_image (EMsgComposer *composer,
GtkClipboard *clipboard)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
EAttachmentStore *store;
EAttachmentView *view;
GdkPixbuf *pixbuf = NULL;
@@ -645,7 +653,6 @@ e_composer_paste_image (EMsgComposer *composer,
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
g_return_val_if_fail (GTK_IS_CLIPBOARD (clipboard), FALSE);
- editor = GTKHTML_EDITOR (composer);
view = e_msg_composer_get_attachment_view (composer);
store = e_attachment_view_get_store (view);
@@ -675,9 +682,14 @@ e_composer_paste_image (EMsgComposer *composer,
/* In HTML mode, paste the image into the message body.
* In text mode, add the image to the attachment store. */
- if (gtkhtml_editor_get_html_mode (editor))
- gtkhtml_editor_insert_image (editor, uri);
- else {
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ if (e_editor_widget_get_mode (editor_widget) == E_EDITOR_WIDGET_MODE_HTML) {
+ EEditorSelection *selection;
+
+ selection = e_editor_widget_get_selection (editor_widget);
+ e_editor_selection_insert_image (selection, uri);
+ } else {
EAttachment *attachment;
attachment = e_attachment_new_for_uri (uri);
@@ -707,7 +719,9 @@ gboolean
e_composer_paste_text (EMsgComposer *composer,
GtkClipboard *clipboard)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
+ EEditorSelection *editor_selection;
gchar *text;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
@@ -716,8 +730,10 @@ e_composer_paste_text (EMsgComposer *composer,
text = gtk_clipboard_wait_for_text (clipboard);
g_return_val_if_fail (text != NULL, FALSE);
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_insert_text (editor, text);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ editor_selection = e_editor_widget_get_selection (editor_widget);
+ e_editor_selection_insert_text (editor_selection, text);
g_free (text);
@@ -865,6 +881,8 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
GAsyncResult *result,
EMsgComposer *composer)
{
+ /* FIXME WEBKIT Uuuhm, yeah...we don't support signatures yet */
+#if 0
GString *html_buffer = NULL;
GtkhtmlEditor *editor;
gchar *contents = NULL;
@@ -878,15 +896,15 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
e_mail_signature_combo_box_load_selected_finish (
combo_box, result, &contents, &length, &is_html, &error);
- /* FIXME Use an EAlert here. */
+ // FIXME Use an EAlert here.
if (error != NULL) {
g_warning ("%s: %s", G_STRFUNC, error->message);
g_error_free (error);
goto exit;
}
- /* "Edit as New Message" sets "priv->is_from_message".
- * Always put the signature at the bottom for that case. */
+ // "Edit as New Message" sets "priv->is_from_message".
+ //Always put the signature at the bottom for that case.
top_signature =
use_top_signature (composer) &&
!composer->priv->is_from_message;
@@ -910,7 +928,7 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
html_buffer = g_string_sized_new (1024);
- /* The combo box active ID is the signature's ESource UID. */
+ // The combo box active ID is the signature's ESource UID.
active_id = gtk_combo_box_get_active_id (GTK_COMBO_BOX (combo_box));
if (active_id != NULL && *active_id != '\0')
@@ -932,10 +950,9 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
if (!is_html)
g_string_append (html_buffer, "<PRE>\n");
- /* The signature dash convention ("-- \n") is specified
- * in the "Son of RFC 1036", section 4.3.2.
- * http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html
- */
+ // The signature dash convention ("-- \n") is specified
+ //in the "Son of RFC 1036", section 4.3.2.
+ //http://www.chemie.fu-berlin.de/outerspace/netnews/son-of-1036.html
if (add_signature_delimiter (composer)) {
const gchar *delim;
const gchar *delim_nl;
@@ -948,11 +965,11 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
delim_nl = "\n-- \n";
}
- /* Skip the delimiter if the signature already has one. */
+ // Skip the delimiter if the signature already has one.
if (g_ascii_strncasecmp (contents, delim, strlen (delim)) == 0)
- ; /* skip */
+ ; // skip
else if (e_util_strstrcase (contents, delim_nl) != NULL)
- ; /* skip */
+ ; // skip
else
g_string_append (html_buffer, delim);
}
@@ -971,12 +988,12 @@ composer_load_signature_cb (EMailSignatureComboBox *combo_box,
g_free (contents);
insert:
- /* Remove the old signature and insert the new one. */
+ // Remove the old signature and insert the new one.
editor = GTKHTML_EDITOR (composer);
- /* This prevents our command before/after callbacks from
- * screwing around with the signature as we insert it. */
+ // This prevents our command before/after callbacks from
+ screwing around with the signature as we insert it.
composer->priv->in_signature_insert = TRUE;
gtkhtml_editor_freeze (editor);
@@ -1008,7 +1025,7 @@ insert:
g_string_free (html_buffer, TRUE);
} else if (top_signature) {
- /* Insert paragraph after the signature ClueFlow stuff. */
+ // Insert paragraph after the signature ClueFlow stuff.
if (gtkhtml_editor_run_command (editor, "cursor-forward"))
gtkhtml_editor_run_command (editor, "insert-paragraph");
}
@@ -1021,30 +1038,33 @@ insert:
exit:
g_object_unref (composer);
+#endif
}
void
e_composer_update_signature (EMsgComposer *composer)
{
+ /* FIXME WEBKIT As said above...no signatures yet
EComposerHeaderTable *table;
EMailSignatureComboBox *combo_box;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
- /* Do nothing if we're redirecting a message. */
+ // Do nothing if we're redirecting a message.
if (composer->priv->redirect)
return;
table = e_msg_composer_get_header_table (composer);
combo_box = e_composer_header_table_get_signature_combo_box (table);
- /* XXX Signature files should be local and therefore load quickly,
- * so while we do load them asynchronously we don't allow for
- * user cancellation and we keep the composer alive until the
- * asynchronous loading is complete. */
+ //XXX Signature files should be local and therefore load quickly,
+ // so while we do load them asynchronously we don't allow for
+ // user cancellation and we keep the composer alive until the
+ // asynchronous loading is complete.
e_mail_signature_combo_box_load_selected (
combo_box, G_PRIORITY_DEFAULT, NULL,
(GAsyncReadyCallback) composer_load_signature_cb,
g_object_ref (composer));
+ */
}
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index cd04183..524ecd7 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -36,6 +36,7 @@
#include <unistd.h>
#include <ctype.h>
#include <fcntl.h>
+#include <enchant/enchant.h>
#include "e-composer-private.h"
@@ -43,6 +44,8 @@
#include <em-format/e-mail-parser.h>
#include <em-format/e-mail-formatter-quote.h>
+#include <e-util/e-spell-checker.h>
+
#include <shell/e-shell.h>
typedef struct _AsyncContext AsyncContext;
@@ -133,7 +136,7 @@ static void e_msg_composer_alert_sink_init (EAlertSinkInterface *interface);
G_DEFINE_TYPE_WITH_CODE (
EMsgComposer,
e_msg_composer,
- GTKHTML_TYPE_EDITOR,
+ E_TYPE_EDITOR_WINDOW,
G_IMPLEMENT_INTERFACE (
E_TYPE_ALERT_SINK, e_msg_composer_alert_sink_init)
G_IMPLEMENT_INTERFACE (E_TYPE_EXTENSIBLE, NULL))
@@ -1072,7 +1075,6 @@ composer_build_message (EMsgComposer *composer,
EMsgComposerPrivate *priv;
GSimpleAsyncResult *simple;
AsyncContext *context;
- GtkhtmlEditor *editor;
EAttachmentView *view;
EAttachmentStore *store;
EComposerHeaderTable *table;
@@ -1093,7 +1095,6 @@ composer_build_message (EMsgComposer *composer,
gint i;
priv = composer->priv;
- editor = GTKHTML_EDITOR (composer);
table = e_msg_composer_get_header_table (composer);
view = e_msg_composer_get_attachment_view (composer);
store = e_attachment_view_get_store (view);
@@ -1223,11 +1224,14 @@ composer_build_message (EMsgComposer *composer,
} else {
gchar *text;
- gsize length;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
data = g_byte_array_new ();
- text = gtkhtml_editor_get_text_plain (editor, &length);
- g_byte_array_append (data, (guint8 *) text, (guint) length);
+ text = e_editor_widget_get_text_plain (editor_widget);
+ g_byte_array_append (data, (guint8 *) text, strlen (text));
g_free (text);
type = camel_content_type_new ("text", "plain");
@@ -1290,20 +1294,29 @@ composer_build_message (EMsgComposer *composer,
gchar *text;
gsize length;
gboolean pre_encode;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
clear_current_images (composer);
+ /* FIXME WEBKIT Can this go away?
if (flags & COMPOSER_FLAG_SAVE_OBJECT_DATA)
gtkhtml_editor_run_command (editor, "save-data-on");
+ */
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
data = g_byte_array_new ();
- text = gtkhtml_editor_get_text_html (editor, &length);
+ text = e_editor_widget_get_text_html (editor_widget);
+ length = strlen (text);
g_byte_array_append (data, (guint8 *) text, (guint) length);
pre_encode = text_requires_quoted_printable (text, length);
g_free (text);
+ /* FIXME WEBKIT And this as well?
if (flags & COMPOSER_FLAG_SAVE_OBJECT_DATA)
gtkhtml_editor_run_command (editor, "save-data-off");
+ */
mem_stream = camel_stream_mem_new_with_byte_array (data);
stream = camel_stream_filter_new (mem_stream);
@@ -1481,6 +1494,7 @@ use_top_signature (EMsgComposer *composer)
return top_signature;
}
+/* FIXME WEBKIT Nope....*/
#define NO_SIGNATURE_TEXT \
"<!--+GtkHTML:<DATA class=\"ClueFlow\" " \
" key=\"signature\" " \
@@ -1495,6 +1509,8 @@ set_editor_text (EMsgComposer *composer,
gboolean set_signature)
{
gchar *body = NULL;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
g_return_if_fail (text != NULL);
@@ -1523,7 +1539,9 @@ set_editor_text (EMsgComposer *composer,
body = g_strdup_printf ("%s<BR>", text);
}
- gtkhtml_editor_set_text_html (GTKHTML_EDITOR (composer), body, -1);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_text_html (editor_widget, body);
if (set_signature)
e_composer_update_signature (composer);
@@ -1536,12 +1554,14 @@ set_editor_text (EMsgComposer *composer,
static void
attachment_store_changed_cb (EMsgComposer *composer)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
/* Mark the editor as changed so it prompts about unsaved
* changes on close. */
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_set_changed (editor, TRUE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, TRUE);
}
static void
@@ -1625,11 +1645,13 @@ msg_composer_paste_clipboard_targets_cb (GtkClipboard *clipboard,
gint n_targets,
EMsgComposer *composer)
{
- GtkhtmlEditor *editor;
- gboolean html_mode;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
+ EEditorWidgetMode mode;
- editor = GTKHTML_EDITOR (composer);
- html_mode = gtkhtml_editor_get_html_mode (editor);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ mode = e_editor_widget_get_mode (editor_widget);
/* Order is important here to ensure common use cases are
* handled correctly. See GNOME bug #603715 for details. */
@@ -1640,7 +1662,7 @@ msg_composer_paste_clipboard_targets_cb (GtkClipboard *clipboard,
}
/* Only paste HTML content in HTML mode. */
- if (html_mode) {
+ if (mode == E_EDITOR_WIDGET_MODE_HTML) {
if (e_targets_include_html (targets, n_targets)) {
e_composer_paste_html (composer, clipboard);
return;
@@ -1659,7 +1681,7 @@ msg_composer_paste_clipboard_targets_cb (GtkClipboard *clipboard,
}
static void
-msg_composer_paste_clipboard_cb (EWebViewGtkHTML *web_view,
+msg_composer_paste_clipboard_cb (EEditorWidget *web_view,
EMsgComposer *composer)
{
GtkClipboard *clipboard;
@@ -1673,6 +1695,7 @@ msg_composer_paste_clipboard_cb (EWebViewGtkHTML *web_view,
g_signal_stop_emission_by_name (web_view, "paste-clipboard");
}
+/* FIXME WEBKIT Is this still valid problem? */
static void
msg_composer_realize_gtkhtml_cb (GtkWidget *widget,
EMsgComposer *composer)
@@ -1689,8 +1712,10 @@ msg_composer_realize_gtkhtml_cb (GtkWidget *widget,
/* When redirecting a message, the message body is not
* editable and therefore cannot be a drag destination. */
+ /*
if (!e_web_view_gtkhtml_get_editable (E_WEB_VIEW_GTKHTML (widget)))
return;
+ */
view = e_msg_composer_get_attachment_view (composer);
@@ -1732,9 +1757,16 @@ msg_composer_drag_data_received_cb (GtkWidget *widget,
EMsgComposer *composer)
{
EAttachmentView *view;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
+ EEditorWidgetMode mode;
+
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ mode = e_editor_widget_get_mode (editor_widget);
/* HTML mode has a few special cases for drops... */
- if (gtkhtml_editor_get_html_mode (GTKHTML_EDITOR (composer))) {
+ if (mode == E_EDITOR_WIDGET_MODE_HTML) {
/* If we're receiving an image, we want the image to be
* inserted in the message body. Let GtkHtml handle it. */
@@ -1765,10 +1797,12 @@ msg_composer_drag_data_received_cb (GtkWidget *widget,
static void
msg_composer_notify_header_cb (EMsgComposer *composer)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_set_changed (editor, TRUE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed(editor_widget, TRUE);
}
static gboolean
@@ -1931,27 +1965,27 @@ static void
msg_composer_constructed (GObject *object)
{
EShell *shell;
- GtkhtmlEditor *editor;
EMsgComposer *composer;
EAttachmentView *view;
EAttachmentStore *store;
EComposerHeaderTable *table;
- EWebViewGtkHTML *web_view;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
GtkUIManager *ui_manager;
GtkToggleAction *action;
GSettings *settings;
const gchar *id;
gboolean active;
- editor = GTKHTML_EDITOR (object);
composer = E_MSG_COMPOSER (object);
shell = e_msg_composer_get_shell (composer);
e_composer_private_constructed (composer);
- web_view = e_msg_composer_get_web_view (composer);
- ui_manager = gtkhtml_editor_get_ui_manager (editor);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ ui_manager = e_editor_get_ui_manager (editor);
view = e_msg_composer_get_attachment_view (composer);
table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
@@ -1993,21 +2027,21 @@ msg_composer_constructed (GObject *object)
/* Clipboard Support */
g_signal_connect (
- web_view, "paste-clipboard",
+ editor_widget, "paste-clipboard",
G_CALLBACK (msg_composer_paste_clipboard_cb), composer);
/* Drag-and-Drop Support */
g_signal_connect (
- web_view, "realize",
+ editor_widget, "realize",
G_CALLBACK (msg_composer_realize_gtkhtml_cb), composer);
g_signal_connect (
- web_view, "drag-motion",
+ editor_widget, "drag-motion",
G_CALLBACK (msg_composer_drag_motion_cb), composer);
g_signal_connect (
- web_view, "drag-data-received",
+ editor_widget, "drag-data-received",
G_CALLBACK (msg_composer_drag_data_received_cb), composer);
g_signal_connect (
@@ -2056,7 +2090,7 @@ msg_composer_constructed (GObject *object)
G_CALLBACK (attachment_store_changed_cb), composer);
/* Initialization may have tripped the "changed" state. */
- gtkhtml_editor_set_changed (editor, FALSE);
+ e_editor_widget_set_changed (editor_widget, FALSE);
id = "org.gnome.evolution.composer";
e_plugin_ui_register_manager (ui_manager, id, composer);
@@ -2098,6 +2132,8 @@ msg_composer_map (GtkWidget *widget)
{
EComposerHeaderTable *table;
GtkWidget *input_widget;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
const gchar *text;
/* Chain up to parent's map() method. */
@@ -2126,7 +2162,9 @@ msg_composer_map (GtkWidget *widget)
}
/* Jump to the editor as a last resort. */
- gtkhtml_editor_run_command (GTKHTML_EDITOR (widget), "grab-focus");
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (widget));
+ editor_widget = e_editor_get_editor_widget (editor);
+ gtk_widget_grab_focus (GTK_WIDGET (editor_widget));
}
static gboolean
@@ -2135,12 +2173,12 @@ msg_composer_key_press_event (GtkWidget *widget,
{
EMsgComposer *composer = E_MSG_COMPOSER (widget);
GtkWidget *input_widget;
- GtkhtmlEditor *editor;
- EWebViewGtkHTML *web_view;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
- editor = GTKHTML_EDITOR (widget);
composer = E_MSG_COMPOSER (widget);
- web_view = e_msg_composer_get_web_view (composer);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
input_widget =
e_composer_header_table_get_header (
@@ -2160,12 +2198,12 @@ msg_composer_key_press_event (GtkWidget *widget,
}
if (event->keyval == GDK_KEY_Tab && gtk_widget_is_focus (input_widget)) {
- gtkhtml_editor_run_command (editor, "grab-focus");
+ gtk_widget_grab_focus (GTK_WIDGET (editor_widget));
return TRUE;
}
if (event->keyval == GDK_KEY_ISO_Left_Tab &&
- gtk_widget_is_focus (GTK_WIDGET (web_view))) {
+ gtk_widget_is_focus (GTK_WIDGET (editor_widget))) {
gtk_widget_grab_focus (input_widget);
return TRUE;
}
@@ -2176,33 +2214,36 @@ msg_composer_key_press_event (GtkWidget *widget,
}
static void
-msg_composer_cut_clipboard (GtkhtmlEditor *editor)
+msg_composer_cut_clipboard (EMsgComposer *composer)
{
/* Do nothing. EFocusTracker handles this. */
}
static void
-msg_composer_copy_clipboard (GtkhtmlEditor *editor)
+msg_composer_copy_clipboard (EMsgComposer *composer)
{
/* Do nothing. EFocusTracker handles this. */
}
static void
-msg_composer_paste_clipboard (GtkhtmlEditor *editor)
+msg_composer_paste_clipboard (EMsgComposer *composer)
{
/* Do nothing. EFocusTracker handles this. */
}
static void
-msg_composer_select_all (GtkhtmlEditor *editor)
+msg_composer_select_all (EMsgComposer *composer)
{
/* Do nothing. EFocusTracker handles this. */
}
+/* FIXME WEBKIT We can effectively hack around this by DOM manipulation
+ * when inserting signature, right?..or when is this usefull ?? */
static void
-msg_composer_command_before (GtkhtmlEditor *editor,
+msg_composer_command_before (EMsgComposer *composer,
const gchar *command)
{
+ /*
EMsgComposer *composer;
const gchar *data;
@@ -2226,12 +2267,14 @@ msg_composer_command_before (GtkhtmlEditor *editor,
gtkhtml_editor_run_command (editor, "text-default-color");
gtkhtml_editor_run_command (editor, "italic-off");
}
+ */
}
static void
-msg_composer_command_after (GtkhtmlEditor *editor,
+msg_composer_command_after (EMsgComposer *composer,
const gchar *command)
{
+ /*
EMsgComposer *composer;
const gchar *data;
@@ -2254,7 +2297,7 @@ msg_composer_command_after (GtkhtmlEditor *editor,
if (data == NULL || *data != '1')
return;
- /* Clear the signature. */
+ // Clear the signature.
if (gtkhtml_editor_is_paragraph_empty (editor))
gtkhtml_editor_set_paragraph_data (editor, "signature" ,"0");
@@ -2267,19 +2310,17 @@ msg_composer_command_after (GtkhtmlEditor *editor,
gtkhtml_editor_run_command (editor, "text-default-color");
gtkhtml_editor_run_command (editor, "italic-off");
+ */
}
static gchar *
-msg_composer_image_uri (GtkhtmlEditor *editor,
+msg_composer_image_uri (EMsgComposer *composer,
const gchar *uri)
{
- EMsgComposer *composer;
GHashTable *hash_table;
CamelMimePart *part;
const gchar *cid;
- composer = E_MSG_COMPOSER (editor);
-
hash_table = composer->priv->inline_images_by_url;
part = g_hash_table_lookup (hash_table, uri);
@@ -2305,9 +2346,11 @@ msg_composer_image_uri (GtkhtmlEditor *editor,
return g_strconcat ("cid:", cid, NULL);
}
+/* FIXME WEBKIT We don't need this, do we? */
static void
-msg_composer_object_deleted (GtkhtmlEditor *editor)
+msg_composer_object_deleted (EMsgComposer *composer)
{
+ /*
const gchar *data;
if (!gtkhtml_editor_is_paragraph_empty (editor))
@@ -2327,6 +2370,7 @@ msg_composer_object_deleted (GtkhtmlEditor *editor)
data = gtkhtml_editor_get_paragraph_data (editor, "signature");
if (data != NULL && *data == '1')
gtkhtml_editor_set_paragraph_data (editor, "signature", "0");
+ */
}
static gboolean
@@ -2380,37 +2424,25 @@ msg_composer_accumulator_false_abort (GSignalInvocationHint *ihint,
}
static void
-e_msg_composer_class_init (EMsgComposerClass *class)
+e_msg_composer_class_init (EMsgComposerClass *klass)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
- GtkhtmlEditorClass *editor_class;
- g_type_class_add_private (class, sizeof (EMsgComposerPrivate));
+ g_type_class_add_private (klass, sizeof (EMsgComposerPrivate));
- object_class = G_OBJECT_CLASS (class);
+ object_class = G_OBJECT_CLASS (klass);
object_class->set_property = msg_composer_set_property;
object_class->get_property = msg_composer_get_property;
object_class->dispose = msg_composer_dispose;
object_class->finalize = msg_composer_finalize;
object_class->constructed = msg_composer_constructed;
- widget_class = GTK_WIDGET_CLASS (class);
+ widget_class = GTK_WIDGET_CLASS (klass);
widget_class->map = msg_composer_map;
widget_class->key_press_event = msg_composer_key_press_event;
- editor_class = GTKHTML_EDITOR_CLASS (class);
- editor_class->cut_clipboard = msg_composer_cut_clipboard;
- editor_class->copy_clipboard = msg_composer_copy_clipboard;
- editor_class->paste_clipboard = msg_composer_paste_clipboard;
- editor_class->select_all = msg_composer_select_all;
- editor_class->command_before = msg_composer_command_before;
- editor_class->command_after = msg_composer_command_after;
- editor_class->image_uri = msg_composer_image_uri;
- editor_class->link_clicked = NULL; /* EWebView handles this */
- editor_class->object_deleted = msg_composer_object_deleted;
-
- class->presend = msg_composer_presend;
+ klass->presend = msg_composer_presend;
g_object_class_install_property (
object_class,
@@ -2435,7 +2467,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
signals[PRESEND] = g_signal_new (
"presend",
- G_OBJECT_CLASS_TYPE (class),
+ G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EMsgComposerClass, presend),
msg_composer_accumulator_false_abort,
@@ -2445,7 +2477,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
signals[SEND] = g_signal_new (
"send",
- G_OBJECT_CLASS_TYPE (class),
+ G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EMsgComposerClass, send),
NULL, NULL,
@@ -2456,7 +2488,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
signals[SAVE_TO_DRAFTS] = g_signal_new (
"save-to-drafts",
- G_OBJECT_CLASS_TYPE (class),
+ G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EMsgComposerClass, save_to_drafts),
NULL, NULL,
@@ -2467,7 +2499,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
signals[SAVE_TO_OUTBOX] = g_signal_new (
"save-to-outbox",
- G_OBJECT_CLASS_TYPE (class),
+ G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (EMsgComposerClass, save_to_outbox),
NULL, NULL,
@@ -2478,7 +2510,7 @@ e_msg_composer_class_init (EMsgComposerClass *class)
signals[PRINT] = g_signal_new (
"print",
- G_OBJECT_CLASS_TYPE (class),
+ G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
e_marshal_VOID__ENUM_OBJECT_OBJECT,
@@ -2515,7 +2547,7 @@ e_msg_composer_new (EShell *shell)
return g_object_new (
E_TYPE_MSG_COMPOSER,
- "html", e_web_view_gtkhtml_new (), "shell", shell, NULL);
+ "shell", shell, NULL);
}
EFocusTracker *
@@ -2974,6 +3006,7 @@ handle_multipart (EMsgComposer *composer,
static void
set_signature_gui (EMsgComposer *composer)
{
+ /*FIXME WEBKIT We don't support signatures yet....
GtkhtmlEditor *editor;
EComposerHeaderTable *table;
EMailSignatureComboBox *combo_box;
@@ -2992,10 +3025,11 @@ set_signature_gui (EMsgComposer *composer)
if (!g_str_has_prefix (data, "uid:"))
return;
- /* The combo box active ID is the signature's ESource UID. */
+ // The combo box active ID is the signature's ESource UID.
uid = e_composer_decode_clue_value (data + 4);
gtk_combo_box_set_active_id (GTK_COMBO_BOX (combo_box), uid);
g_free (uid);
+ */
}
static void
@@ -3075,6 +3109,8 @@ e_msg_composer_new_with_message (EShell *shell,
EMsgComposerPrivate *priv;
EComposerHeaderTable *table;
ESource *source = NULL;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
GtkToggleAction *action;
struct _camel_header_raw *xev;
gchar *identity_uid;
@@ -3097,6 +3133,8 @@ e_msg_composer_new_with_message (EShell *shell,
composer = e_msg_composer_new (shell);
priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
table = e_msg_composer_get_header_table (composer);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
if (postto) {
e_composer_header_table_set_post_to_list (table, postto);
@@ -3230,11 +3268,11 @@ e_msg_composer_new_with_message (EShell *shell,
flags = g_strsplit (format, ", ", 0);
for (i = 0; flags[i]; i++) {
if (g_ascii_strcasecmp (flags[i], "text/html") == 0) {
- gtkhtml_editor_set_html_mode (
- GTKHTML_EDITOR (composer), TRUE);
+ e_editor_widget_set_mode (
+ editor_widget, E_EDITOR_WIDGET_MODE_HTML);
} else if (g_ascii_strcasecmp (flags[i], "text/plain") == 0) {
- gtkhtml_editor_set_html_mode (
- GTKHTML_EDITOR (composer), FALSE);
+ e_editor_widget_set_mode (
+ editor_widget, E_EDITOR_WIDGET_MODE_PLAIN_TEXT);
} else if (g_ascii_strcasecmp (flags[i], "pgp-sign") == 0) {
action = GTK_TOGGLE_ACTION (ACTION (PGP_SIGN));
gtk_toggle_action_set_active (action, TRUE);
@@ -3373,7 +3411,8 @@ e_msg_composer_new_redirect (EShell *shell,
{
EMsgComposer *composer;
EComposerHeaderTable *table;
- EWebViewGtkHTML *web_view;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
const gchar *subject;
g_return_val_if_fail (E_IS_SHELL (shell), NULL);
@@ -3391,8 +3430,9 @@ e_msg_composer_new_redirect (EShell *shell,
e_composer_header_table_set_identity_uid (table, identity_uid);
e_composer_header_table_set_subject (table, subject);
- web_view = e_msg_composer_get_web_view (composer);
- e_web_view_gtkhtml_set_editable (web_view, FALSE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), FALSE);
return composer;
}
@@ -3444,27 +3484,19 @@ e_msg_composer_get_shell (EMsgComposer *composer)
}
/**
- * e_msg_composer_get_web_view:
+ * e_msg_composer_get_editor:
* @composer: an #EMsgComposer
*
- * Returns the #EWebView widget in @composer.
+ * Returns the #EEditor widget in @composer.
*
- * Returns: the #EWebView
+ * Returns: the #EEditor
**/
-EWebViewGtkHTML *
-e_msg_composer_get_web_view (EMsgComposer *composer)
+EEditor *
+e_msg_composer_get_editor (EMsgComposer *composer)
{
- GtkHTML *html;
- GtkhtmlEditor *editor;
-
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
- /* This is a convenience function to avoid
- * repeating this awkwardness everywhere */
- editor = GTKHTML_EDITOR (composer);
- html = gtkhtml_editor_get_html (editor);
-
- return E_WEB_VIEW_GTKHTML (html);
+ return e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
}
static void
@@ -3474,7 +3506,8 @@ msg_composer_send_cb (EMsgComposer *composer,
{
CamelMimeMessage *message;
EAlertSink *alert_sink;
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
GError *error = NULL;
alert_sink = e_activity_get_alert_sink (context->activity);
@@ -3506,8 +3539,9 @@ msg_composer_send_cb (EMsgComposer *composer,
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
/* The callback can set editor 'changed' if anything failed. */
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_set_changed (editor, FALSE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, TRUE);
g_signal_emit (
composer, signals[SEND], 0,
@@ -3569,7 +3603,8 @@ msg_composer_save_to_drafts_cb (EMsgComposer *composer,
{
CamelMimeMessage *message;
EAlertSink *alert_sink;
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
GError *error = NULL;
alert_sink = e_activity_get_alert_sink (context->activity);
@@ -3610,8 +3645,9 @@ msg_composer_save_to_drafts_cb (EMsgComposer *composer,
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
/* The callback can set editor 'changed' if anything failed. */
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_set_changed (editor, FALSE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, FALSE);
g_signal_emit (
composer, signals[SAVE_TO_DRAFTS],
@@ -3669,7 +3705,8 @@ msg_composer_save_to_outbox_cb (EMsgComposer *composer,
{
CamelMimeMessage *message;
EAlertSink *alert_sink;
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
GError *error = NULL;
alert_sink = e_activity_get_alert_sink (context->activity);
@@ -3704,9 +3741,9 @@ msg_composer_save_to_outbox_cb (EMsgComposer *composer,
async_context_free (context);
- /* XXX This should be elsewhere. */
- editor = GTKHTML_EDITOR (composer);
- gtkhtml_editor_set_changed (editor, FALSE);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ e_editor_widget_set_changed (editor_widget, FALSE);
}
/**
@@ -4196,13 +4233,16 @@ e_msg_composer_set_body (EMsgComposer *composer,
{
EMsgComposerPrivate *priv = composer->priv;
EComposerHeaderTable *table;
- EWebViewGtkHTML *web_view;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
ESource *source;
const gchar *identity_uid;
gchar *buff;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
table = e_msg_composer_get_header_table (composer);
identity_uid = e_composer_header_table_get_identity_uid (table);
@@ -4215,10 +4255,8 @@ e_msg_composer_set_body (EMsgComposer *composer,
set_editor_text (composer, buff, FALSE);
g_free (buff);
- gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (composer), FALSE);
-
- web_view = e_msg_composer_get_web_view (composer);
- e_web_view_gtkhtml_set_editable (web_view, FALSE);
+ e_editor_widget_set_mode (editor_widget, E_EDITOR_WIDGET_MODE_PLAIN_TEXT);
+ webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor_widget), FALSE);
g_free (priv->mime_body);
priv->mime_body = g_strdup (body);
@@ -4574,16 +4612,21 @@ e_msg_composer_get_message (EMsgComposer *composer,
GSimpleAsyncResult *simple;
GtkAction *action;
ComposerFlags flags = 0;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+
simple = g_simple_async_result_new (
G_OBJECT (composer), callback,
user_data, e_msg_composer_get_message);
g_simple_async_result_set_check_cancellable (simple, cancellable);
- if (gtkhtml_editor_get_html_mode (GTKHTML_EDITOR (composer)))
+ if (e_editor_widget_get_mode (editor_widget) == E_EDITOR_WIDGET_MODE_HTML)
flags |= COMPOSER_FLAG_HTML_CONTENT;
action = ACTION (PRIORITIZE_MESSAGE);
@@ -4700,6 +4743,8 @@ e_msg_composer_get_message_draft (EMsgComposer *composer,
GAsyncReadyCallback callback,
gpointer user_data)
{
+ EEditor *editor;
+ EEditorWidget *editor_widget;
GSimpleAsyncResult *simple;
ComposerFlags flags = 0;
@@ -4711,7 +4756,9 @@ e_msg_composer_get_message_draft (EMsgComposer *composer,
g_simple_async_result_set_check_cancellable (simple, cancellable);
- if (gtkhtml_editor_get_html_mode (GTKHTML_EDITOR (composer)))
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+ if (e_editor_widget_get_mode (editor_widget) == E_EDITOR_WIDGET_MODE_HTML)
flags |= COMPOSER_FLAG_HTML_CONTENT;
composer_build_message (
@@ -4815,17 +4862,19 @@ e_msg_composer_get_reply_to (EMsgComposer *composer)
GByteArray *
e_msg_composer_get_raw_message_text (EMsgComposer *composer)
{
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
GByteArray *array;
gchar *text;
- gsize length;
g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), NULL);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
+
array = g_byte_array_new ();
- editor = GTKHTML_EDITOR (composer);
- text = gtkhtml_editor_get_text_plain (editor, &length);
- g_byte_array_append (array, (guint8 *) text, (guint) length);
+ text = e_editor_widget_get_text_plain (editor_widget);
+ g_byte_array_append (array, (guint8 *) text, strlen (text));
g_free (text);
return array;
@@ -4858,22 +4907,24 @@ e_msg_composer_can_close (EMsgComposer *composer,
gboolean can_save_draft)
{
gboolean res = FALSE;
- GtkhtmlEditor *editor;
+ EEditor *editor;
+ EEditorWidget *editor_widget;
EComposerHeaderTable *table;
GdkWindow *window;
GtkWidget *widget;
const gchar *subject;
gint response;
- editor = GTKHTML_EDITOR (composer);
widget = GTK_WIDGET (composer);
+ editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+ editor_widget = e_editor_get_editor_widget (editor);
/* this means that there is an async operation running,
* in which case the composer cannot be closed */
if (!gtk_action_group_get_sensitive (composer->priv->async_actions))
return FALSE;
- if (!gtkhtml_editor_get_changed (editor))
+ if (!e_editor_widget_get_changed (editor_widget))
return TRUE;
window = gtk_widget_get_window (widget);
@@ -4912,6 +4963,8 @@ e_msg_composer_can_close (EMsgComposer *composer,
void
e_msg_composer_reply_indent (EMsgComposer *composer)
{
+ /* FIXME WEBKIT We already have indentation implementation. Why
+ * is this done?
GtkhtmlEditor *editor;
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
@@ -4933,6 +4986,7 @@ e_msg_composer_reply_indent (EMsgComposer *composer)
gtkhtml_editor_run_command (editor, "indent-zero");
gtkhtml_editor_run_command (editor, "text-default-color");
gtkhtml_editor_run_command (editor, "italic-off");
+ */
}
EComposerHeaderTable *
@@ -4952,10 +5006,10 @@ e_msg_composer_get_attachment_view (EMsgComposer *composer)
}
GList *
-e_load_spell_languages (void)
+e_load_spell_languages (ESpellChecker *spell_checker)
{
GSettings *settings;
- GList *spell_languages = NULL;
+ GList *spell_dicts = NULL;
gchar **strv;
gint ii;
@@ -4967,50 +5021,49 @@ e_load_spell_languages (void)
/* Convert the codes to spell language structs. */
for (ii = 0; strv[ii] != NULL; ii++) {
gchar *language_code = strv[ii];
- const GtkhtmlSpellLanguage *language;
+ ESpellDictionary *dict;
- language = gtkhtml_spell_language_lookup (language_code);
- if (language != NULL)
- spell_languages = g_list_prepend (
- spell_languages, (gpointer) language);
+ dict = e_spell_checker_lookup_dictionary (spell_checker, language_code);
+ if (dict != NULL)
+ spell_dicts = g_list_prepend (
+ spell_dicts, (gpointer) dict);
}
g_strfreev (strv);
- spell_languages = g_list_reverse (spell_languages);
+ spell_dicts = g_list_reverse (spell_dicts);
/* Pick a default spell language if it came back empty. */
- if (spell_languages == NULL) {
- const GtkhtmlSpellLanguage *language;
+ if (spell_dicts == NULL) {
+ ESpellDictionary *dict;
- language = gtkhtml_spell_language_lookup (NULL);
+ dict = e_spell_checker_lookup_dictionary (spell_checker, NULL);
- if (language) {
- spell_languages = g_list_prepend (
- spell_languages, (gpointer) language);
+ if (dict) {
+ spell_dicts = g_list_prepend (
+ spell_dicts, (gpointer) dict);
}
}
- return spell_languages;
+ return spell_dicts;
}
void
-e_save_spell_languages (GList *spell_languages)
+e_save_spell_languages (const GList *spell_dicts)
{
GSettings *settings;
GPtrArray *lang_array;
/* Build a list of spell check language codes. */
lang_array = g_ptr_array_new ();
- while (spell_languages != NULL) {
- const GtkhtmlSpellLanguage *language;
+ while (spell_dicts != NULL) {
+ ESpellDictionary *dict = spell_dicts->data;
const gchar *language_code;
- language = spell_languages->data;
- language_code = gtkhtml_spell_language_get_code (language);
+ language_code = e_spell_dictionary_get_code (dict);
g_ptr_array_add (lang_array, (gpointer) language_code);
- spell_languages = g_list_next (spell_languages);
+ spell_dicts = g_list_next (spell_dicts);
}
g_ptr_array_add (lang_array, NULL);
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index f702d3d..114230f 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -25,7 +25,6 @@
#define E_MSG_COMPOSER_H
#include <camel/camel.h>
-#include <gtkhtml-editor.h>
#include <libebook/libebook.h>
#include <shell/e-shell.h>
@@ -58,12 +57,12 @@ typedef struct _EMsgComposerClass EMsgComposerClass;
typedef struct _EMsgComposerPrivate EMsgComposerPrivate;
struct _EMsgComposer {
- GtkhtmlEditor parent;
+ EEditorWindow parent;
EMsgComposerPrivate *priv;
};
struct _EMsgComposerClass {
- GtkhtmlEditorClass parent_class;
+ EEditorWindowClass parent_class;
/* Signals */
gboolean (*presend) (EMsgComposer *composer);
@@ -98,8 +97,8 @@ EFocusTracker * e_msg_composer_get_focus_tracker
(EMsgComposer *composer);
CamelSession * e_msg_composer_ref_session (EMsgComposer *composer);
EShell * e_msg_composer_get_shell (EMsgComposer *composer);
-EWebViewGtkHTML *
- e_msg_composer_get_web_view (EMsgComposer *composer);
+EEditor *
+ e_msg_composer_get_editor (EMsgComposer *composer);
void e_msg_composer_send (EMsgComposer *composer);
void e_msg_composer_save_to_drafts (EMsgComposer *composer);
@@ -199,8 +198,8 @@ GByteArray * e_msg_composer_get_raw_message_text
gboolean e_msg_composer_is_exiting (EMsgComposer *composer);
-GList * e_load_spell_languages (void);
-void e_save_spell_languages (GList *spell_languages);
+GList * e_load_spell_languages (ESpellChecker *spell_checker);
+void e_save_spell_languages (const GList *spell_languages);
G_END_DECLS
diff --git a/doc/reference/evolution-util/evolution-util-docs.sgml
b/doc/reference/evolution-util/evolution-util-docs.sgml
index de12adb..a7c1a4e 100644
--- a/doc/reference/evolution-util/evolution-util-docs.sgml
+++ b/doc/reference/evolution-util/evolution-util-docs.sgml
@@ -94,7 +94,6 @@
<title>HTML Rendering</title>
<xi:include href="xml/e-web-view.xml"/>
<xi:include href="xml/e-web-view-preview.xml"/>
- <xi:include href="xml/e-web-view-gtkhtml.xml"/>
<xi:include href="xml/e-file-request.xml"/>
<xi:include href="xml/e-stock-request.xml"/>
</chapter>
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt
b/doc/reference/evolution-util/evolution-util-sections.txt
index c81262e..4a5e3fc 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -4431,74 +4431,6 @@ EWebViewPrivate
</SECTION>
<SECTION>
-<FILE>e-web-view-gtkhtml</FILE>
-<TITLE>EWebViewGtkHTML</TITLE>
-EWebViewGtkHTML
-e_web_view_gtkhtml_new
-e_web_view_gtkhtml_clear
-e_web_view_gtkhtml_load_string
-e_web_view_gtkhtml_get_animate
-e_web_view_gtkhtml_set_animate
-e_web_view_gtkhtml_get_caret_mode
-e_web_view_gtkhtml_set_caret_mode
-e_web_view_gtkhtml_get_copy_target_list
-e_web_view_gtkhtml_get_disable_printing
-e_web_view_gtkhtml_set_disable_printing
-e_web_view_gtkhtml_get_disable_save_to_disk
-e_web_view_gtkhtml_set_disable_save_to_disk
-e_web_view_gtkhtml_get_editable
-e_web_view_gtkhtml_set_editable
-e_web_view_gtkhtml_get_inline_spelling
-e_web_view_gtkhtml_set_inline_spelling
-e_web_view_gtkhtml_get_magic_links
-e_web_view_gtkhtml_set_magic_links
-e_web_view_gtkhtml_get_magic_smileys
-e_web_view_gtkhtml_set_magic_smileys
-e_web_view_gtkhtml_get_selected_uri
-e_web_view_gtkhtml_set_selected_uri
-e_web_view_gtkhtml_get_cursor_image
-e_web_view_gtkhtml_set_cursor_image
-e_web_view_gtkhtml_get_open_proxy
-e_web_view_gtkhtml_set_open_proxy
-e_web_view_gtkhtml_get_paste_target_list
-e_web_view_gtkhtml_get_print_proxy
-e_web_view_gtkhtml_set_print_proxy
-e_web_view_gtkhtml_get_save_as_proxy
-e_web_view_gtkhtml_set_save_as_proxy
-e_web_view_gtkhtml_get_action
-e_web_view_gtkhtml_get_action_group
-e_web_view_gtkhtml_extract_uri
-e_web_view_gtkhtml_copy_clipboard
-e_web_view_gtkhtml_cut_clipboard
-e_web_view_gtkhtml_is_selection_active
-e_web_view_gtkhtml_paste_clipboard
-e_web_view_gtkhtml_scroll_forward
-e_web_view_gtkhtml_scroll_backward
-e_web_view_gtkhtml_select_all
-e_web_view_gtkhtml_unselect_all
-e_web_view_gtkhtml_zoom_100
-e_web_view_gtkhtml_zoom_in
-e_web_view_gtkhtml_zoom_out
-e_web_view_gtkhtml_get_ui_manager
-e_web_view_gtkhtml_get_popup_menu
-e_web_view_gtkhtml_show_popup_menu
-e_web_view_gtkhtml_status_message
-e_web_view_gtkhtml_stop_loading
-e_web_view_gtkhtml_update_actions
-<SUBSECTION Standard>
-E_WEB_VIEW_GTKHTML
-E_IS_WEB_VIEW_GTKHTML
-E_TYPE_WEB_VIEW_GTKHTML
-E_WEB_VIEW_GTKHTML_CLASS
-E_IS_WEB_VIEW_GTKHTML_CLASS
-E_WEB_VIEW_GTKHTML_GET_CLASS
-EWebViewGtkHTMLClass
-e_web_view_gtkhtml_get_type
-<SUBSECTION Private>
-EWebViewGtkHTMLPrivate
-</SECTION>
-
-<SECTION>
<FILE>e-web-view-preview</FILE>
<TITLE>EWebViewPreview</TITLE>
EWebViewPreview
diff --git a/doc/reference/evolution-util/evolution-util.types
b/doc/reference/evolution-util/evolution-util.types
index 4c44b4f..4377a56 100644
--- a/doc/reference/evolution-util/evolution-util.types
+++ b/doc/reference/evolution-util/evolution-util.types
@@ -158,7 +158,6 @@ e_tree_table_adapter_get_type
e_tree_view_frame_get_type
e_url_entry_get_type
e_web_view_get_type
-e_web_view_gtkhtml_get_type
e_web_view_preview_get_type
gal_view_collection_get_type
gal_view_etable_get_type
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index a5b545e..aa29ac6 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -327,7 +327,6 @@ evolution_util_include_HEADERS = \
e-url-entry.h \
e-util-enums.h \
e-util-enumtypes.h \
- e-web-view-gtkhtml.h \
e-web-view-preview.h \
e-web-view.h \
e-xml-utils.h \
@@ -591,7 +590,6 @@ libevolution_util_la_SOURCES = \
e-url-entry.c \
e-util-enumtypes.c \
e-util-private.h \
- e-web-view-gtkhtml.c \
e-web-view-preview.c \
e-web-view.c \
e-xml-utils.c \
diff --git a/e-util/e-util.h b/e-util/e-util.h
index 30f05b8..368624a 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -240,7 +240,6 @@
#include <e-util/e-url-entry.h>
#include <e-util/e-util-enums.h>
#include <e-util/e-util-enumtypes.h>
-#include <e-util/e-web-view-gtkhtml.h>
#include <e-util/e-web-view-preview.h>
#include <e-util/e-web-view.h>
#include <e-util/e-xml-utils.h>
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 3d94bdc..09d44f0 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -370,6 +370,7 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
if (E_IS_EDITOR_WINDOW (window)) {
EEditor *editor;
EEditorWidget *editor_widget;
+ ESpellChecker *spell_checker;
GSettings *settings;
GList *spell_languages;
gboolean active = TRUE;
@@ -377,7 +378,8 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
editor = e_editor_window_get_editor (E_EDITOR_WINDOW (window));
editor_widget = e_editor_get_editor_widget (editor);
- spell_languages = e_load_spell_languages ();
+ spell_checker = e_editor_widget_get_spell_checker (editor_widget);
+ spell_languages = e_load_spell_languages (spell_checker);
e_editor_widget_set_spell_languages (editor_widget, spell_languages);
g_list_free (spell_languages);
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 74fe03b..440d307 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -190,7 +190,7 @@ spell_setup (EMComposerPrefs *prefs)
available_languages =
e_spell_checker_list_available_dicts (prefs->spell_checker);
- active_languages = e_load_spell_languages ();
+ active_languages = e_load_spell_languages (prefs->spell_checker);
/* Populate the GtkListStore. */
while (available_languages != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]