[evolution/webkit-composer: 69/185] Port plugins do EEditor and drop Gtkhtml dependency



commit e47869d4cbd6150f36db7ef155ab671928e6516e
Author: Dan Vrátil <dvratil redhat com>
Date:   Tue Aug 28 18:15:35 2012 +0200

    Port plugins do EEditor and drop Gtkhtml dependency

 plugins/attachment-reminder/Makefile.am           |   6 +-
 plugins/attachment-reminder/attachment-reminder.c |   4 +-
 plugins/bbdb/Makefile.am                          |   6 +-
 plugins/email-custom-header/Makefile.am           |   6 +-
 plugins/email-custom-header/email-custom-header.c |  10 +-
 plugins/external-editor/Makefile.am               |   6 +-
 plugins/external-editor/external-editor.c         | 149 +++++++++++++---------
 plugins/face/Makefile.am                          |   6 +-
 plugins/face/face.c                               |  12 +-
 plugins/mail-notification/Makefile.am             |   6 +-
 plugins/mailing-list-actions/Makefile.am          |   6 +-
 plugins/templates/Makefile.am                     |   6 +-
 plugins/templates/templates.c                     |   6 +-
 13 files changed, 125 insertions(+), 104 deletions(-)
---
diff --git a/plugins/attachment-reminder/Makefile.am b/plugins/attachment-reminder/Makefile.am
index 74bb88b..46cf5c5 100644
--- a/plugins/attachment-reminder/Makefile.am
+++ b/plugins/attachment-reminder/Makefile.am
@@ -15,8 +15,7 @@ liborg_gnome_evolution_attachment_reminder_la_CPPFLAGS = \
        -I$(top_srcdir)                                 \
        -DEVOLUTION_PLUGINDIR="\"$(plugindir)\""        \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
-       $(GNOME_PLATFORM_CFLAGS)                        \
-       $(GTKHTML_CFLAGS)
+       $(GNOME_PLATFORM_CFLAGS)
 
 liborg_gnome_evolution_attachment_reminder_la_SOURCES = attachment-reminder.c 
 
@@ -30,8 +29,7 @@ liborg_gnome_evolution_attachment_reminder_la_LIBADD =        \
        $(top_builddir)/e-util/libeutil.la              \
        $(top_builddir)/mail/libevolution-mail.la       \
        $(EVOLUTION_DATA_SERVER_LIBS)                   \
-       $(GNOME_PLATFORM_LIBS)                          \
-       $(GTKHTML_LIBS)
+       $(GNOME_PLATFORM_LIBS)
 
 EXTRA_DIST = org-gnome-evolution-attachment-reminder.eplug.xml \
        org-gnome-attachment-reminder.error.xml
diff --git a/plugins/attachment-reminder/attachment-reminder.c 
b/plugins/attachment-reminder/attachment-reminder.c
index 52a0323..fb1bf70 100644
--- a/plugins/attachment-reminder/attachment-reminder.c
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -129,8 +129,10 @@ ask_for_missing_attachment (EPlugin *ep,
 
        gtk_widget_destroy (dialog);
 
-       if (response == GTK_RESPONSE_OK)
+       if (response == GTK_RESPONSE_OK) {
+               EEditor *editor = e_editor_window_get_editor (E_EDITOR_WINDOW (window));
                gtk_action_activate (E_COMPOSER_ACTION_ATTACH (window));
+       }
 
        return response == GTK_RESPONSE_YES;
 }
diff --git a/plugins/bbdb/Makefile.am b/plugins/bbdb/Makefile.am
index b5f6fc8..d94620c 100644
--- a/plugins/bbdb/Makefile.am
+++ b/plugins/bbdb/Makefile.am
@@ -16,8 +16,7 @@ liborg_gnome_evolution_bbdb_la_CPPFLAGS =             \
        -I$(top_builddir)/composer                      \
        -I$(top_srcdir)                                 \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
-       $(GNOME_PLATFORM_CFLAGS)                        \
-       $(GTKHTML_CFLAGS)
+       $(GNOME_PLATFORM_CFLAGS)
 
 liborg_gnome_evolution_bbdb_la_SOURCES = bbdb.c bbdb.h gaimbuddies.c
 
@@ -30,8 +29,7 @@ liborg_gnome_evolution_bbdb_la_LIBADD =               \
        $(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.la \
        $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.la \
        $(EVOLUTION_DATA_SERVER_LIBS)           \
-       $(GNOME_PLATFORM_LIBS)                  \
-       $(GTKHTML_LIBS)
+       $(GNOME_PLATFORM_LIBS)
 
 EXTRA_DIST = org-gnome-evolution-bbdb.eplug.xml
 
diff --git a/plugins/email-custom-header/Makefile.am b/plugins/email-custom-header/Makefile.am
index 4a457f2..f4f5f57 100644
--- a/plugins/email-custom-header/Makefile.am
+++ b/plugins/email-custom-header/Makefile.am
@@ -11,8 +11,7 @@ liborg_gnome_email_custom_header_la_CPPFLAGS = \
        -I$(top_builddir)/mail                          \
        -I$(top_builddir)/composer                      \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
-       $(GNOME_PLATFORM_CFLAGS)                        \
-       $(GTKHTML_CFLAGS)
+       $(GNOME_PLATFORM_CFLAGS)
 
 liborg_gnome_email_custom_header_la_SOURCES =          \
        email-custom-header.c                           \
@@ -23,8 +22,7 @@ liborg_gnome_email_custom_header_la_LIBADD =                  \
        $(top_builddir)/composer/libcomposer.la                 \
        $(top_builddir)/mail/libevolution-mail.la               \
        $(EVOLUTION_DATA_SERVER_LIBS)                           \
-       $(GNOME_PLATFORM_LIBS)                                  \
-       $(GTKHTML_LIBS)
+       $(GNOME_PLATFORM_LIBS)
 
 liborg_gnome_email_custom_header_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
diff --git a/plugins/email-custom-header/email-custom-header.c 
b/plugins/email-custom-header/email-custom-header.c
index 78364fa..8c63002 100644
--- a/plugins/email-custom-header/email-custom-header.c
+++ b/plugins/email-custom-header/email-custom-header.c
@@ -500,8 +500,10 @@ action_email_custom_header_cb (GtkAction *action,
        GdkWindow *window;
        CustomHeaderOptionsDialog *dialog = NULL;
        EmailCustomHeaderWindow *new_email_custom_header_window = NULL;
+       EEditor *editor;
 
-       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);
        menuitem = gtk_ui_manager_get_widget (ui_manager, "/main-menu/insert-menu/insert-menu-top/Custom 
Header");
 
        new_email_custom_header_window = g_object_get_data ((GObject *) composer, "compowindow");
@@ -543,13 +545,13 @@ gboolean
 e_plugin_ui_init (GtkUIManager *ui_manager,
                   EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
 
-       editor = GTKHTML_EDITOR (composer);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
 
        /* Add actions to the "composer" action group. */
        gtk_action_group_add_actions (
-               gtkhtml_editor_get_action_group (editor, "composer"),
+               e_editor_get_action_group (editor, "composer"),
                entries, G_N_ELEMENTS (entries), composer);
 
        return TRUE;
diff --git a/plugins/external-editor/Makefile.am b/plugins/external-editor/Makefile.am
index 689f993..5a8d495 100644
--- a/plugins/external-editor/Makefile.am
+++ b/plugins/external-editor/Makefile.am
@@ -27,8 +27,7 @@ liborg_gnome_external_editor_la_CPPFLAGS =            \
        -I$(top_srcdir)                                 \
        -I$(top_srcdir)/composer                        \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
-       $(GNOME_PLATFORM_CFLAGS)                        \
-       $(GTKHTML_CFLAGS)
+       $(GNOME_PLATFORM_CFLAGS)
 
 liborg_gnome_external_editor_la_SOURCES =              \
        external-editor.c
@@ -43,8 +42,7 @@ liborg_gnome_external_editor_la_LIBADD =                      \
        $(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.la    \
        $(top_builddir)/mail/libevolution-mail.la               \
        $(EVOLUTION_DATA_SERVER_LIBS)                           \
-       $(GNOME_PLATFORM_LIBS)                                  \
-       $(GTKHTML_LIBS)
+       $(GNOME_PLATFORM_LIBS)
 
 EXTRA_DIST =                                   \
        org-gnome-external-editor.eplug.xml     \
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index d31b0d8..ef096a3 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -52,6 +52,7 @@ static void   ee_editor_command_changed
                                                (GtkWidget *textbox);
 static void    ee_editor_immediate_launch_changed
                                                (GtkWidget *checkbox);
+static void    async_external_editor           (EMsgComposer *composer);
 static gboolean        editor_running                  (void);
 static gboolean        key_press_cb                    (GtkWidget *widget,
                                                 GdkEventKey *event,
@@ -148,29 +149,30 @@ static void
 enable_disable_composer (EMsgComposer *composer,
                          gboolean enable)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
        GtkAction *action;
        GtkActionGroup *action_group;
 
        g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
-       editor = GTKHTML_EDITOR (composer);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
 
-       if (enable)
-               gtkhtml_editor_run_command (editor, "editable-on");
-       else
-               gtkhtml_editor_run_command (editor, "editable-off");
+       if (enable) {
+               webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor), TRUE);
+       } else {
+               webkit_web_view_set_editable (WEBKIT_WEB_VIEW (editor), FALSE);
+       }
 
-       action = GTKHTML_EDITOR_ACTION_EDIT_MENU (composer);
+       action = E_EDITOR_ACTION_EDIT_MENU (editor);
        gtk_action_set_sensitive (action, enable);
 
-       action = GTKHTML_EDITOR_ACTION_FORMAT_MENU (composer);
+       action = E_EDITOR_ACTION_FORMAT_MENU (editor);
        gtk_action_set_sensitive (action, enable);
 
-       action = GTKHTML_EDITOR_ACTION_INSERT_MENU (composer);
+       action = E_EDITOR_ACTION_INSERT_MENU (editor);
        gtk_action_set_sensitive (action, enable);
 
-       action_group = gtkhtml_editor_get_action_group (editor, "composer");
+       action_group = e_editor_get_action_group (editor, "composer");
        gtk_action_group_set_sensitive (action_group, enable);
 }
 
@@ -247,30 +249,72 @@ numlines (const gchar *text,
        return lineno;
 }
 
-static gboolean external_editor_running = FALSE;
-static GMutex external_editor_running_lock;
+static gint
+get_caret_position (EEditorWidget *widget)
+{
+       WebKitDOMDocument *document;
+       WebKitDOMDOMWindow *window;
+       WebKitDOMDOMSelection *selection;
+       WebKitDOMRange *range;
+       gint range_count;
+       WebKitDOMNodeList *nodes;
+       gulong ii, length;
+
+       document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (widget));
+       window = webkit_dom_document_get_default_view (document);
+       selection = webkit_dom_dom_window_get_selection (window);
+       if (webkit_dom_dom_selection_get_range_count (selection) < 1) {
+               return 0;
+       }
 
-static gpointer
-external_editor_thread (gpointer user_data)
+       range = webkit_dom_dom_selection_get_range_at (selection, 0, NULL);
+       range_count = 0;
+       nodes = webkit_dom_node_get_child_nodes (
+                       webkit_dom_node_get_parent_node (
+                               webkit_dom_dom_selection_get_anchor_node (
+                                       selection)));
+       length = webkit_dom_node_list_get_length (nodes);
+       for (ii = 0; ii < length; ii++) {
+               WebKitDOMNode *node;
+
+               node = webkit_dom_node_list_item (nodes, ii);
+               if (webkit_dom_node_is_same_node (
+                       node, webkit_dom_dom_selection_get_anchor_node (selection))) {
+
+                       break;
+               } else if (webkit_dom_node_get_node_type (node) == 3) {
+                       gchar *text = webkit_dom_node_get_text_content (node);
+                       range_count += strlen (text);
+                       g_free (text);
+               }
+       }
+
+       return webkit_dom_range_get_start_offset (range, NULL) + range_count;
+}
+
+void
+async_external_editor (EMsgComposer *composer)
 {
-       EMsgComposer *composer = user_data;
        gchar *filename = NULL;
        gint status = 0;
        GSettings *settings;
        gchar *editor_cmd_line = NULL, *editor_cmd = NULL, *content;
        gint fd, position = -1, offset = -1;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
+
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
 
        /* prefix temp files with evo so .*vimrc can be setup to recognize them */
        fd = g_file_open_tmp ("evoXXXXXX", &filename, NULL);
        if (fd > 0) {
-               gsize length = 0;
-
                close (fd);
                d (printf ("\n\aTemporary-file Name is : [%s] \n\a", filename));
 
                /* Push the text (if there is one) from the composer to the file */
-               content = gtkhtml_editor_get_text_plain (GTKHTML_EDITOR (composer), &length);
-               g_file_set_contents (filename, content, length, NULL);
+               content = e_editor_widget_get_text_plain (editor_widget);
+               g_file_set_contents (filename, content, strlen (content), NULL);
        } else {
                struct run_error_dialog_data *data;
 
@@ -282,14 +326,13 @@ external_editor_thread (gpointer user_data)
 
                /* run_error_dialog also calls enable_composer */
                g_idle_add ((GSourceFunc) run_error_dialog, data);
-
-               goto finished;
+               return;
        }
 
        settings = g_settings_new ("org.gnome.evolution.plugin.external-editor");
        editor_cmd = g_settings_get_string (settings, "command");
        if (!editor_cmd) {
-               if (!(editor_cmd = g_strdup (g_getenv ("EDITOR"))))
+               if (!(editor_cmd = g_strdup (g_getenv ("EDITOR"))) )
                        /* Make gedit the default external editor,
                         * if the default schemas are not installed
                         * and no $EDITOR is set. */
@@ -297,11 +340,8 @@ external_editor_thread (gpointer user_data)
        }
        g_object_unref (settings);
 
-       if (g_strrstr (editor_cmd, "vim") != NULL
-           && gtk_html_get_cursor_pos (
-                       gtkhtml_editor_get_html (
-                       GTKHTML_EDITOR (composer)), &position, &offset)
-                               && position >= 0 && offset >= 0) {
+       if (g_strrstr (editor_cmd, "vim") != NULL &&
+           ((position = get_caret_position (editor_widget)) > 0)) {
                gchar *tmp = editor_cmd;
                gint lineno;
                gboolean set_nofork;
@@ -342,7 +382,7 @@ external_editor_thread (gpointer user_data)
                g_free (filename);
                g_free (editor_cmd_line);
                g_free (editor_cmd);
-               goto finished;
+               return;
        }
        g_free (editor_cmd_line);
        g_free (editor_cmd);
@@ -354,7 +394,7 @@ external_editor_thread (gpointer user_data)
 #endif
                d (printf ("\n\nsome problem here with external editor\n\n"));
                g_idle_add ((GSourceFunc) enable_composer, composer);
-               goto finished;
+               return;
        } else {
                gchar *buf;
 
@@ -365,9 +405,8 @@ external_editor_thread (gpointer user_data)
                        htmltext = camel_text_to_html (
                                buf, CAMEL_MIME_FILTER_TOHTML_PRE, 0);
 
-                       array = g_array_sized_new (
-                               TRUE, TRUE,
-                               sizeof (gpointer), 2 * sizeof (gpointer));
+                       array = g_array_sized_new (TRUE, TRUE,
+                                                  sizeof (gpointer), 2 * sizeof (gpointer));
                        array = g_array_append_val (array, composer);
                        array = g_array_append_val (array, htmltext);
 
@@ -378,13 +417,6 @@ external_editor_thread (gpointer user_data)
                        g_free (filename);
                }
        }
-
- finished:
-       g_mutex_lock (&external_editor_running_lock);
-       external_editor_running = FALSE;
-       g_mutex_unlock (&external_editor_running_lock);
-
-       return NULL;
 }
 
 static void launch_editor (GtkAction *action, EMsgComposer *composer)
@@ -398,13 +430,8 @@ static void launch_editor (GtkAction *action, EMsgComposer *composer)
 
        disable_composer (composer);
 
-       g_mutex_lock (&external_editor_running_lock);
-       external_editor_running = TRUE;
-       g_mutex_unlock (&external_editor_running_lock);
-
-       editor_thread = g_thread_new (
-               NULL, external_editor_thread, composer);
-       g_thread_unref (editor_thread);
+       editor_thread = g_thread_create (
+               (GThreadFunc) async_external_editor, composer, FALSE, NULL);
 }
 
 static GtkActionEntry entries[] = {
@@ -448,14 +475,21 @@ key_press_cb (GtkWidget *widget,
        return TRUE;
 }
 
+static void
+editor_running_thread_func (GThread *thread,
+                            gpointer running)
+{
+       if (thread == editor_thread)
+               *(gboolean*)running = TRUE;
+}
+
+/* Racy? */
 static gboolean
 editor_running (void)
 {
-       gboolean running;
+       gboolean running = FALSE;
 
-       g_mutex_lock (&external_editor_running_lock);
-       running = external_editor_running;
-       g_mutex_unlock (&external_editor_running_lock);
+       g_thread_foreach ((GFunc) editor_running_thread_func, &running);
 
        return running;
 }
@@ -478,24 +512,23 @@ gboolean
 e_plugin_ui_init (GtkUIManager *manager,
                   EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
-       EWebViewGtkHTML *web_view;
+       EEditor *editor;
+       EEditorWidget *editor_widget;
 
-       editor = GTKHTML_EDITOR (composer);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
+       editor_widget = e_editor_get_editor_widget (editor);
 
        /* Add actions to the "composer" action group. */
        gtk_action_group_add_actions (
-               gtkhtml_editor_get_action_group (editor, "composer"),
+               e_editor_get_action_group (editor, "composer"),
                entries, G_N_ELEMENTS (entries), composer);
 
-       web_view = e_msg_composer_get_web_view (composer);
-
        g_signal_connect (
-               web_view, "key_press_event",
+               editor_widget, "key_press_event",
                G_CALLBACK (key_press_cb), composer);
 
        g_signal_connect (
-               web_view, "delete-event",
+               editor_widget, "delete-event",
                G_CALLBACK (delete_cb), composer);
 
        return TRUE;
diff --git a/plugins/face/Makefile.am b/plugins/face/Makefile.am
index 6308799..931140d 100644
--- a/plugins/face/Makefile.am
+++ b/plugins/face/Makefile.am
@@ -11,8 +11,7 @@ liborg_gnome_face_la_CPPFLAGS =                               \
        -I$(top_builddir)/mail                          \
        -I$(top_builddir)/composer                      \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
-       $(GNOME_PLATFORM_CFLAGS)                        \
-       $(GTKHTML_CFLAGS)
+       $(GNOME_PLATFORM_CFLAGS)
 
 liborg_gnome_face_la_SOURCES = face.c
 
@@ -21,8 +20,7 @@ liborg_gnome_face_la_LIBADD =                                         \
        $(top_builddir)/composer/libcomposer.la                 \
        $(top_builddir)/mail/libevolution-mail.la               \
        $(EVOLUTION_DATA_SERVER_LIBS)                           \
-       $(GNOME_PLATFORM_LIBS)                                  \
-       $(GTKHTML_LIBS)
+       $(GNOME_PLATFORM_LIBS)
 
 liborg_gnome_face_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
 
diff --git a/plugins/face/face.c b/plugins/face/face.c
index 06a6bc6..dd352f7 100644
--- a/plugins/face/face.c
+++ b/plugins/face/face.c
@@ -424,7 +424,7 @@ gboolean
 e_plugin_ui_init (GtkUIManager *ui_manager,
                   EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
 
        static GtkToggleActionEntry entries[] = {
                { "face-plugin",
@@ -445,11 +445,11 @@ e_plugin_ui_init (GtkUIManager *ui_manager,
                g_free (face);
        }
 
-       editor = GTKHTML_EDITOR (composer);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
 
        /* Add actions to the "composer" action group. */
        gtk_action_group_add_toggle_actions (
-               gtkhtml_editor_get_action_group (editor, "composer"),
+               e_editor_get_action_group (editor, "composer"),
                entries, G_N_ELEMENTS (entries), composer);
 
        return TRUE;
@@ -465,11 +465,11 @@ void
 face_handle_send (EPlugin *ep,
                   EMEventTargetComposer *target)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
        GtkAction *action;
 
-       editor = GTKHTML_EDITOR (target->composer);
-       action = gtkhtml_editor_get_action (editor, "face-plugin");
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (target->composer));
+       action = e_editor_get_action (editor, "face-plugin");
 
        g_return_if_fail (action != NULL);
 
diff --git a/plugins/mail-notification/Makefile.am b/plugins/mail-notification/Makefile.am
index 02425f9..6eeeb5b 100644
--- a/plugins/mail-notification/Makefile.am
+++ b/plugins/mail-notification/Makefile.am
@@ -17,8 +17,7 @@ liborg_gnome_mail_notification_la_CPPFLAGS =  \
        $(EVOLUTION_DATA_SERVER_CFLAGS)         \
        $(GNOME_PLATFORM_CFLAGS)                \
        $(LIBNOTIFY_CFLAGS)                     \
-       $(CANBERRA_CFLAGS)                      \
-       $(GTKHTML_CFLAGS)
+       $(CANBERRA_CFLAGS)
 
 liborg_gnome_mail_notification_la_SOURCES = mail-notification.c
 
@@ -32,8 +31,7 @@ liborg_gnome_mail_notification_la_LIBADD =                    \
        $(EVOLUTION_DATA_SERVER_LIBS)                           \
        $(GNOME_PLATFORM_LIBS)                                  \
        $(LIBNOTIFY_LIBS)                                       \
-       $(CANBERRA_LIBS)                                        \
-       $(GTKHTML_LIBS)
+       $(CANBERRA_LIBS)
 
 BUILT_SOURCES = $(plugin_DATA)
 
diff --git a/plugins/mailing-list-actions/Makefile.am b/plugins/mailing-list-actions/Makefile.am
index 769b328..af6da92 100644
--- a/plugins/mailing-list-actions/Makefile.am
+++ b/plugins/mailing-list-actions/Makefile.am
@@ -8,8 +8,7 @@ liborg_gnome_mailing_list_actions_la_CPPFLAGS =         \
        -I$(top_srcdir)                                 \
        -I$(top_builddir)/composer                      \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
-       $(GNOME_PLATFORM_CFLAGS)                        \
-       $(GTKHTML_CFLAGS)
+       $(GNOME_PLATFORM_CFLAGS)
 
 liborg_gnome_mailing_list_actions_la_SOURCES = mailing-list-actions.c
 
@@ -22,8 +21,7 @@ liborg_gnome_mailing_list_actions_la_LIBADD =         \
        $(top_builddir)/shell/libeshell.la              \
        $(top_builddir)/libemail-engine/libemail-engine.la \
        $(EVOLUTION_DATA_SERVER_LIBS)                   \
-       $(GNOME_PLATFORM_LIBS)                          \
-       $(GTKHTML_LIBS)
+       $(GNOME_PLATFORM_LIBS)
 
 error_DATA = org-gnome-mailing-list-actions.error
 errordir = $(privdatadir)/errors
diff --git a/plugins/templates/Makefile.am b/plugins/templates/Makefile.am
index b28632f..85b83c0 100644
--- a/plugins/templates/Makefile.am
+++ b/plugins/templates/Makefile.am
@@ -10,8 +10,7 @@ liborg_gnome_templates_la_CPPFLAGS =                  \
        -I$(top_builddir)                               \
        -I$(top_builddir)/composer                      \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
-       $(GNOME_PLATFORM_CFLAGS)                        \
-       $(GTKHTML_CFLAGS)
+       $(GNOME_PLATFORM_CFLAGS)
 
 liborg_gnome_templates_la_SOURCES = templates.c
 
@@ -24,8 +23,7 @@ liborg_gnome_templates_la_LIBADD =    \
        $(top_builddir)/mail/libevolution-mail.la       \
        $(top_builddir)/libemail-engine/libemail-engine.la \
        $(EVOLUTION_DATA_SERVER_LIBS)                   \
-       $(GNOME_PLATFORM_LIBS)                          \
-       $(GTKHTML_LIBS)
+       $(GNOME_PLATFORM_LIBS)
 
 EXTRA_DIST =   org-gnome-templates.eplug.xml
 
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 0d3fcdc..704e924 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -1330,13 +1330,13 @@ gboolean
 init_composer_actions (GtkUIManager *ui_manager,
                        EMsgComposer *composer)
 {
-       GtkhtmlEditor *editor;
+       EEditor *editor;
 
-       editor = GTKHTML_EDITOR (composer);
+       editor = e_editor_window_get_editor (E_EDITOR_WINDOW (composer));
 
        /* Add actions to the "composer" action group. */
        gtk_action_group_add_actions (
-               gtkhtml_editor_get_action_group (editor, "composer"),
+               e_editor_get_action_group (editor, "composer"),
                composer_entries, G_N_ELEMENTS (composer_entries), composer);
 
        return TRUE;


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