[evolution/wip/webkit2] Allow e-util/e-util.h to include only non-WebKit sources



commit 74d77643d8a7658392f2ab18b89b2490b535274c
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 8 13:03:08 2016 +0100

    Allow e-util/e-util.h to include only non-WebKit sources
    
    That way the e-util.h can be used also on the web-extension side,
    where the DOM headers and the WebKit UI headers cannot be included
    together.
    
    Also made some cleanup in the web-extension file's #include-s.

 e-util/Makefile.am                                 |    1 +
 e-util/e-html-editor-defines.h                     |    4 +++
 e-util/e-html-editor-selection.h                   |    1 -
 e-util/e-util-enums.h                              |    5 +--
 e-util/e-util.h                                    |   11 ++++++++
 web-extensions/Makefile.am                         |    2 -
 web-extensions/composer/Makefile.am                |    1 -
 .../composer/e-composer-private-dom-functions.c    |   19 ++++++++------
 .../composer/e-html-editor-actions-dom-functions.c |   16 +++++++----
 .../e-html-editor-cell-dialog-dom-functions.c      |    8 ++++-
 .../composer/e-html-editor-history-event.h         |    2 -
 .../e-html-editor-hrule-dialog-dom-functions.c     |   16 +++++++----
 .../e-html-editor-image-dialog-dom-functions.c     |    8 ++++-
 .../e-html-editor-link-dialog-dom-functions.c      |   17 +++++++-----
 .../e-html-editor-page-dialog-dom-functions.c      |    8 ++++-
 .../e-html-editor-selection-dom-functions.c        |   16 +++++++----
 ...-html-editor-spell-check-dialog-dom-functions.c |   10 +++++--
 .../e-html-editor-table-dialog-dom-functions.c     |   14 +++++++----
 .../composer/e-html-editor-undo-redo-manager.c     |   18 +++++++------
 .../composer/e-html-editor-undo-redo-manager.h     |    2 -
 .../composer/e-html-editor-view-dom-functions.c    |   15 ++++++-----
 .../composer/e-html-editor-view-dom-functions.h    |    6 +++-
 .../composer/e-html-editor-web-extension-main.c    |    4 ++-
 .../composer/e-html-editor-web-extension.c         |   26 ++++++++++----------
 .../composer/e-html-editor-web-extension.h         |   12 ++++----
 .../composer/e-msg-composer-dom-functions.c        |    6 ++++-
 web-extensions/e-dom-utils.c                       |   13 ++++-----
 web-extensions/e-dom-utils.h                       |    4 ++-
 web-extensions/e-web-extension-main.c              |    4 ++-
 web-extensions/e-web-extension.c                   |   17 ++++++-------
 30 files changed, 172 insertions(+), 114 deletions(-)
---
diff --git a/e-util/Makefile.am b/e-util/Makefile.am
index 9281a06..cd49da4 100644
--- a/e-util/Makefile.am
+++ b/e-util/Makefile.am
@@ -201,6 +201,7 @@ evolution_util_include_HEADERS =  \
        e-focus-tracker.h \
        e-html-editor-actions.h \
        e-html-editor-cell-dialog.h \
+       e-html-editor-defines.h \
        e-html-editor-dialog.h \
        e-html-editor-find-dialog.h \
        e-html-editor-hrule-dialog.h \
diff --git a/e-util/e-html-editor-defines.h b/e-util/e-html-editor-defines.h
index e1537d2..d58460c 100644
--- a/e-util/e-html-editor-defines.h
+++ b/e-util/e-html-editor-defines.h
@@ -16,6 +16,10 @@
  *
  */
 
+#if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
+#error "Only <e-util/e-util.h> should be included directly."
+#endif
+
 #ifndef E_HTML_EDITOR_DEFINES_H
 #define E_HTML_EDITOR_DEFINES_H
 
diff --git a/e-util/e-html-editor-selection.h b/e-util/e-html-editor-selection.h
index 9470d52..6737a90 100644
--- a/e-util/e-html-editor-selection.h
+++ b/e-util/e-html-editor-selection.h
@@ -27,7 +27,6 @@
 
 #include <gtk/gtk.h>
 #include <e-util/e-util-enums.h>
-#include <webkit2/webkit2.h>
 
 /* Standard GObject macros */
 #define E_TYPE_HTML_EDITOR_SELECTION \
diff --git a/e-util/e-util-enums.h b/e-util/e-util-enums.h
index a1afa40..d24aebd 100644
--- a/e-util/e-util-enums.h
+++ b/e-util/e-util-enums.h
@@ -15,10 +15,9 @@
  *
  */
 
-/* FIXME WK2 - the below cannot be enabled due to web-extensions/e-dom-utils.h using this header */
-/*#if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
+#if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION)
 #error "Only <e-util/e-util.h> should be included directly."
-#endif*/
+#endif
 
 #ifndef E_UTIL_ENUMS_H
 #define E_UTIL_ENUMS_H
diff --git a/e-util/e-util.h b/e-util/e-util.h
index 82656df..72230dc 100644
--- a/e-util/e-util.h
+++ b/e-util/e-util.h
@@ -111,6 +111,8 @@
 #include <e-util/e-filter-part.h>
 #include <e-util/e-filter-rule.h>
 #include <e-util/e-focus-tracker.h>
+#include <e-util/e-html-editor-defines.h>
+#ifndef E_UTIL_INCLUDE_WITHOUT_WEBKIT
 #include <e-util/e-html-editor-actions.h>
 #include <e-util/e-html-editor-cell-dialog.h>
 #include <e-util/e-html-editor-dialog.h>
@@ -127,6 +129,7 @@
 #include <e-util/e-html-editor-text-dialog.h>
 #include <e-util/e-html-editor-view.h>
 #include <e-util/e-html-editor.h>
+#endif
 #include <e-util/e-html-utils.h>
 #include <e-util/e-icon-factory.h>
 #include <e-util/e-image-chooser.h>
@@ -136,9 +139,11 @@
 #include <e-util/e-interval-chooser.h>
 #include <e-util/e-mail-identity-combo-box.h>
 #include <e-util/e-mail-signature-combo-box.h>
+#ifndef E_UTIL_INCLUDE_WITHOUT_WEBKIT
 #include <e-util/e-mail-signature-editor.h>
 #include <e-util/e-mail-signature-manager.h>
 #include <e-util/e-mail-signature-preview.h>
+#endif
 #include <e-util/e-mail-signature-script-dialog.h>
 #include <e-util/e-mail-signature-tree-view.h>
 #include <e-util/e-map.h>
@@ -164,7 +169,9 @@
 #include <e-util/e-popup-menu.h>
 #include <e-util/e-port-entry.h>
 #include <e-util/e-preferences-window.h>
+#ifndef E_UTIL_INCLUDE_WITHOUT_WEBKIT
 #include <e-util/e-preview-pane.h>
+#endif
 #include <e-util/e-print.h>
 #include <e-util/e-printable.h>
 #include <e-util/e-proxy-combo-box.h>
@@ -176,7 +183,9 @@
 #include <e-util/e-reflow.h>
 #include <e-util/e-rule-context.h>
 #include <e-util/e-rule-editor.h>
+#ifndef E_UTIL_INCLUDE_WITHOUT_WEBKIT
 #include <e-util/e-search-bar.h>
+#endif
 #include <e-util/e-selectable.h>
 #include <e-util/e-selection-model-array.h>
 #include <e-util/e-selection-model-simple.h>
@@ -249,8 +258,10 @@
 #include <e-util/e-url-entry.h>
 #include <e-util/e-util-enums.h>
 #include <e-util/e-util-enumtypes.h>
+#ifndef E_UTIL_INCLUDE_WITHOUT_WEBKIT
 #include <e-util/e-web-view-preview.h>
 #include <e-util/e-web-view.h>
+#endif
 #include <e-util/e-widget-undo.h>
 #include <e-util/e-xml-utils.h>
 #include <e-util/ea-cell-table.h>
diff --git a/web-extensions/Makefile.am b/web-extensions/Makefile.am
index f6ad68f..6ff4f70 100644
--- a/web-extensions/Makefile.am
+++ b/web-extensions/Makefile.am
@@ -9,7 +9,6 @@ libedomutils_la_SOURCES =                               \
 libedomutils_la_CPPFLAGS =                             \
        $(AM_CPPFLAGS)                                  \
        -I$(top_srcdir)                                 \
-       -DLIBEUTIL_COMPILATION                          \
        -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"        \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
        $(GNOME_PLATFORM_CFLAGS)
@@ -30,7 +29,6 @@ libewebextension_la_SOURCES =                         \
 libewebextension_la_CPPFLAGS =                         \
        $(AM_CPPFLAGS)                                  \
        -I$(top_srcdir)                                 \
-       -DLIBEUTIL_COMPILATION                          \
        -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"        \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
        $(GNOME_PLATFORM_CFLAGS)                        \
diff --git a/web-extensions/composer/Makefile.am b/web-extensions/composer/Makefile.am
index 0cb2761..b41baa1 100644
--- a/web-extensions/composer/Makefile.am
+++ b/web-extensions/composer/Makefile.am
@@ -36,7 +36,6 @@ libehtmleditorwebextension_la_SOURCES =                       \
 libehtmleditorwebextension_la_CPPFLAGS =               \
        $(AM_CPPFLAGS)                                  \
        -I$(top_srcdir)                                 \
-       -DLIBEUTIL_COMPILATION                          \
        -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"        \
        $(EVOLUTION_DATA_SERVER_CFLAGS)                 \
        $(GNOME_PLATFORM_CFLAGS)                        \
diff --git a/web-extensions/composer/e-composer-private-dom-functions.c 
b/web-extensions/composer/e-composer-private-dom-functions.c
index c449cda..ef8316b 100644
--- a/web-extensions/composer/e-composer-private-dom-functions.c
+++ b/web-extensions/composer/e-composer-private-dom-functions.c
@@ -16,21 +16,24 @@
  *
  */
 
-#include "e-composer-private-dom-functions.h"
-
-#include "e-html-editor-web-extension.h"
-#include "e-html-editor-selection-dom-functions.h"
-#include "e-html-editor-view-dom-functions.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <string.h>
 
-#include <web-extensions/e-dom-utils.h>
-#include <e-util/e-misc-utils.h>
-
 #define WEBKIT_DOM_USE_UNSTABLE_API
 #include <webkitdom/WebKitDOMDOMSelection.h>
 #include <webkitdom/WebKitDOMDOMWindowUnstable.h>
 
+#include <web-extensions/e-dom-utils.h>
+
+#include "e-html-editor-web-extension.h"
+#include "e-html-editor-selection-dom-functions.h"
+#include "e-html-editor-view-dom-functions.h"
+
+#include "e-composer-private-dom-functions.h"
+
 gchar *
 dom_remove_signatures (WebKitDOMDocument *document,
                        EHTMLEditorWebExtension *extension,
diff --git a/web-extensions/composer/e-html-editor-actions-dom-functions.c 
b/web-extensions/composer/e-html-editor-actions-dom-functions.c
index ea1a133..a12927e 100644
--- a/web-extensions/composer/e-html-editor-actions-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-actions-dom-functions.c
@@ -16,12 +16,9 @@
  *
  */
 
-#include "e-html-editor-actions-dom-functions.h"
-
-#include "e-html-editor-history-event.h"
-#include "e-html-editor-selection-dom-functions.h"
-
-#include <web-extensions/e-dom-utils.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #define WEBKIT_DOM_USE_UNSTABLE_API
 #include <webkitdom/WebKitDOMDocumentFragmentUnstable.h>
@@ -29,6 +26,13 @@
 #include <webkitdom/WebKitDOMDOMSelection.h>
 #include <webkitdom/WebKitDOMDOMWindowUnstable.h>
 
+#include <web-extensions/e-dom-utils.h>
+
+#include "e-html-editor-history-event.h"
+#include "e-html-editor-selection-dom-functions.h"
+
+#include "e-html-editor-actions-dom-functions.h"
+
 static WebKitDOMElement *
 get_table_cell_element (WebKitDOMDocument *document)
 {
diff --git a/web-extensions/composer/e-html-editor-cell-dialog-dom-functions.c 
b/web-extensions/composer/e-html-editor-cell-dialog-dom-functions.c
index 25c05a3..8fa7fef 100644
--- a/web-extensions/composer/e-html-editor-cell-dialog-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-cell-dialog-dom-functions.c
@@ -16,12 +16,16 @@
  *
  */
 
-#include "e-html-editor-cell-dialog-dom-functions.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <web-extensions/e-dom-utils.h>
 
 #include "e-html-editor-undo-redo-manager.h"
 #include "e-html-editor-selection-dom-functions.h"
 
-#include <web-extensions/e-dom-utils.h>
+#include "e-html-editor-cell-dialog-dom-functions.h"
 
 enum {
        SCOPE_CELL,
diff --git a/web-extensions/composer/e-html-editor-history-event.h 
b/web-extensions/composer/e-html-editor-history-event.h
index 71edc8b..393c95a 100644
--- a/web-extensions/composer/e-html-editor-history-event.h
+++ b/web-extensions/composer/e-html-editor-history-event.h
@@ -19,8 +19,6 @@
 #ifndef E_HTML_EDITOR_HISTORY_EVENT_H
 #define E_HTML_EDITOR_HISTORY_EVENT_H
 
-#include "config.h"
-
 G_BEGIN_DECLS
 
 enum EHTMLEditorHistoryEventType {
diff --git a/web-extensions/composer/e-html-editor-hrule-dialog-dom-functions.c 
b/web-extensions/composer/e-html-editor-hrule-dialog-dom-functions.c
index 1879df8..3563bd2 100644
--- a/web-extensions/composer/e-html-editor-hrule-dialog-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-hrule-dialog-dom-functions.c
@@ -16,17 +16,21 @@
  *
  */
 
-#include "e-html-editor-hrule-dialog-dom-functions.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define WEBKIT_DOM_USE_UNSTABLE_API
+#include <webkitdom/WebKitDOMDOMSelection.h>
+#include <webkitdom/WebKitDOMDOMWindowUnstable.h>
+
+#include <web-extensions/e-dom-utils.h>
 
 #include "e-html-editor-selection-dom-functions.h"
 #include "e-html-editor-web-extension.h"
 #include "e-html-editor-undo-redo-manager.h"
 
-#include <web-extensions/e-dom-utils.h>
-
-#define WEBKIT_DOM_USE_UNSTABLE_API
-#include <webkitdom/WebKitDOMDOMSelection.h>
-#include <webkitdom/WebKitDOMDOMWindowUnstable.h>
+#include "e-html-editor-hrule-dialog-dom-functions.h"
 
 static WebKitDOMElement *
 get_current_hrule_element (WebKitDOMDocument *document)
diff --git a/web-extensions/composer/e-html-editor-image-dialog-dom-functions.c 
b/web-extensions/composer/e-html-editor-image-dialog-dom-functions.c
index bef410e..06d43cf 100644
--- a/web-extensions/composer/e-html-editor-image-dialog-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-image-dialog-dom-functions.c
@@ -16,13 +16,17 @@
  *
  */
 
-#include "e-html-editor-image-dialog-dom-functions.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <web-extensions/e-dom-utils.h>
 
 #include "e-html-editor-selection-dom-functions.h"
 #include "e-html-editor-web-extension.h"
 #include "e-html-editor-undo-redo-manager.h"
 
-#include <web-extensions/e-dom-utils.h>
+#include "e-html-editor-image-dialog-dom-functions.h"
 
 static WebKitDOMElement *
 get_current_image_element (WebKitDOMDocument *document)
diff --git a/web-extensions/composer/e-html-editor-link-dialog-dom-functions.c 
b/web-extensions/composer/e-html-editor-link-dialog-dom-functions.c
index 29f4aed..53626d3 100644
--- a/web-extensions/composer/e-html-editor-link-dialog-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-link-dialog-dom-functions.c
@@ -16,18 +16,21 @@
  *
  */
 
-#include "e-html-editor-link-dialog-dom-functions.h"
-
-#include "e-html-editor-view-dom-functions.h"
-#include "e-html-editor-selection-dom-functions.h"
-
-#include <e-util/e-util-enums.h>
-#include <web-extensions/e-dom-utils.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #define WEBKIT_DOM_USE_UNSTABLE_API
 #include <webkitdom/WebKitDOMDOMSelection.h>
 #include <webkitdom/WebKitDOMDOMWindowUnstable.h>
 
+#include <web-extensions/e-dom-utils.h>
+
+#include "e-html-editor-view-dom-functions.h"
+#include "e-html-editor-selection-dom-functions.h"
+
+#include "e-html-editor-link-dialog-dom-functions.h"
+
 /* FIXME WK2 apply changes from commit 18c5e81 */
 void
 e_html_editor_link_dialog_ok (WebKitDOMDocument *document,
diff --git a/web-extensions/composer/e-html-editor-page-dialog-dom-functions.c 
b/web-extensions/composer/e-html-editor-page-dialog-dom-functions.c
index 69c6d1e..d726880 100644
--- a/web-extensions/composer/e-html-editor-page-dialog-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-page-dialog-dom-functions.c
@@ -16,12 +16,16 @@
  *
  */
 
-#include "e-html-editor-page-dialog-dom-functions.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <web-extensions/e-dom-utils.h>
 
 #include "e-html-editor-selection-dom-functions.h"
 #include "e-html-editor-web-extension.h"
 
-#include <web-extensions/e-dom-utils.h>
+#include "e-html-editor-page-dialog-dom-functions.h"
 
 void
 e_html_editor_page_dialog_save_history (WebKitDOMDocument *document,
diff --git a/web-extensions/composer/e-html-editor-selection-dom-functions.c 
b/web-extensions/composer/e-html-editor-selection-dom-functions.c
index bdf7612..5c8b331 100644
--- a/web-extensions/composer/e-html-editor-selection-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-selection-dom-functions.c
@@ -16,12 +16,9 @@
  *
  */
 
-#include "e-html-editor-selection-dom-functions.h"
-
-#include "e-html-editor-view-dom-functions.h"
-#include "e-html-editor-web-extension.h"
-
-#include <web-extensions/e-dom-utils.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <string.h>
 #include <stdlib.h>
@@ -34,6 +31,13 @@
 #include <webkitdom/WebKitDOMHTMLElementUnstable.h>
 #include <webkitdom/WebKitDOMDocumentUnstable.h>
 
+#include <web-extensions/e-dom-utils.h>
+
+#include "e-html-editor-view-dom-functions.h"
+#include "e-html-editor-web-extension.h"
+
+#include "e-html-editor-selection-dom-functions.h"
+
 static const GdkRGBA black = { 0, 0, 0, 1 };
 
 void
diff --git a/web-extensions/composer/e-html-editor-spell-check-dialog-dom-functions.c 
b/web-extensions/composer/e-html-editor-spell-check-dialog-dom-functions.c
index f536d20..5426d77 100644
--- a/web-extensions/composer/e-html-editor-spell-check-dialog-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-spell-check-dialog-dom-functions.c
@@ -16,14 +16,18 @@
  *
  */
 
-#include "e-html-editor-spell-check-dialog-dom-functions.h"
-
-#include <web-extensions/e-dom-utils.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #define WEBKIT_DOM_USE_UNSTABLE_API
 #include <webkitdom/WebKitDOMDOMSelection.h>
 #include <webkitdom/WebKitDOMDOMWindowUnstable.h>
 
+#include <web-extensions/e-dom-utils.h>
+
+#include "e-html-editor-spell-check-dialog-dom-functions.h"
+
 static gboolean
 select_next_word (WebKitDOMDOMSelection *dom_selection)
 {
diff --git a/web-extensions/composer/e-html-editor-table-dialog-dom-functions.c 
b/web-extensions/composer/e-html-editor-table-dialog-dom-functions.c
index 30df691..7da84b2 100644
--- a/web-extensions/composer/e-html-editor-table-dialog-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-table-dialog-dom-functions.c
@@ -16,16 +16,20 @@
  *
  */
 
-#include "e-html-editor-table-dialog-dom-functions.h"
-
-#include "e-html-editor-selection-dom-functions.h"
-
-#include <web-extensions/e-dom-utils.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #define WEBKIT_DOM_USE_UNSTABLE_API
 #include <webkitdom/WebKitDOMDOMSelection.h>
 #include <webkitdom/WebKitDOMDOMWindowUnstable.h>
 
+#include <web-extensions/e-dom-utils.h>
+
+#include "e-html-editor-selection-dom-functions.h"
+
+#include "e-html-editor-table-dialog-dom-functions.h"
+
 static WebKitDOMHTMLTableElement *
 get_current_table_element (WebKitDOMDocument *document)
 {
diff --git a/web-extensions/composer/e-html-editor-undo-redo-manager.c 
b/web-extensions/composer/e-html-editor-undo-redo-manager.c
index 501554d..89ed77a 100644
--- a/web-extensions/composer/e-html-editor-undo-redo-manager.c
+++ b/web-extensions/composer/e-html-editor-undo-redo-manager.c
@@ -16,14 +16,9 @@
  *
  */
 
-#include "config.h"
-
-#include "e-html-editor-undo-redo-manager.h"
-#include "e-html-editor-web-extension.h"
-#include "e-html-editor-selection-dom-functions.h"
-#include "e-html-editor-view-dom-functions.h"
-
-#include <web-extensions/e-dom-utils.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #define WEBKIT_DOM_USE_UNSTABLE_API
 #include <webkitdom/WebKitDOMDocumentFragmentUnstable.h>
@@ -33,6 +28,13 @@
 #include <webkitdom/WebKitDOMHTMLElementUnstable.h>
 #include <webkitdom/WebKitDOMDocumentUnstable.h>
 
+#include <web-extensions/e-dom-utils.h>
+
+#include "e-html-editor-undo-redo-manager.h"
+#include "e-html-editor-web-extension.h"
+#include "e-html-editor-selection-dom-functions.h"
+#include "e-html-editor-view-dom-functions.h"
+
 #define E_HTML_EDITOR_UNDO_REDO_MANAGER_GET_PRIVATE(obj) \
        (G_TYPE_INSTANCE_GET_PRIVATE \
        ((obj), E_TYPE_HTML_EDITOR_UNDO_REDO_MANAGER, EHTMLEditorUndoRedoManagerPrivate))
diff --git a/web-extensions/composer/e-html-editor-undo-redo-manager.h 
b/web-extensions/composer/e-html-editor-undo-redo-manager.h
index 08f7456..098efff 100644
--- a/web-extensions/composer/e-html-editor-undo-redo-manager.h
+++ b/web-extensions/composer/e-html-editor-undo-redo-manager.h
@@ -19,8 +19,6 @@
 #ifndef E_HTML_EDITOR_UNDO_REDO_MANAGER_H
 #define E_HTML_EDITOR_UNDO_REDO_MANAGER_H
 
-#include "config.h"
-
 #include <glib-object.h>
 #include <webkitdom/webkitdom.h>
 
diff --git a/web-extensions/composer/e-html-editor-view-dom-functions.c 
b/web-extensions/composer/e-html-editor-view-dom-functions.c
index 3442175..ffaa91b 100644
--- a/web-extensions/composer/e-html-editor-view-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-view-dom-functions.c
@@ -16,13 +16,9 @@
  *
  */
 
-#include "e-html-editor-view-dom-functions.h"
-
-#include "e-html-editor-selection-dom-functions.h"
-
-#include <e-util/e-misc-utils.h>
-#include <e-util/e-emoticon-chooser.h>
-#include <web-extensions/e-dom-utils.h>
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <string.h>
 
@@ -34,6 +30,11 @@
 #include <webkitdom/WebKitDOMDOMWindowUnstable.h>
 #include <webkitdom/WebKitDOMHTMLElementUnstable.h>
 
+#include <web-extensions/e-dom-utils.h>
+
+#include "e-html-editor-selection-dom-functions.h"
+#include "e-html-editor-view-dom-functions.h"
+
 #define HTML_KEY_CODE_BACKSPACE 8
 #define HTML_KEY_CODE_RETURN 13
 #define HTML_KEY_CODE_CONTROL 17
diff --git a/web-extensions/composer/e-html-editor-view-dom-functions.h 
b/web-extensions/composer/e-html-editor-view-dom-functions.h
index eb47b54..7428a66 100644
--- a/web-extensions/composer/e-html-editor-view-dom-functions.h
+++ b/web-extensions/composer/e-html-editor-view-dom-functions.h
@@ -21,10 +21,12 @@
 
 #include <webkitdom/webkitdom.h>
 
+#define E_UTIL_INCLUDE_WITHOUT_WEBKIT
+#include <e-util/e-util.h>
+#undef E_UTIL_INCLUDE_WITHOUT_WEBKIT
+
 #include "e-html-editor-web-extension.h"
 
-#include <e-util/e-util-enums.h>
-#include <e-util/e-emoticon.h>
 
 G_BEGIN_DECLS
 
diff --git a/web-extensions/composer/e-html-editor-web-extension-main.c 
b/web-extensions/composer/e-html-editor-web-extension-main.c
index aa4fcce..22b5c06 100644
--- a/web-extensions/composer/e-html-editor-web-extension-main.c
+++ b/web-extensions/composer/e-html-editor-web-extension-main.c
@@ -16,7 +16,9 @@
  *
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include "e-html-editor-web-extension.h"
 
diff --git a/web-extensions/composer/e-html-editor-web-extension.c 
b/web-extensions/composer/e-html-editor-web-extension.c
index 00d91f5..2045506 100644
--- a/web-extensions/composer/e-html-editor-web-extension.c
+++ b/web-extensions/composer/e-html-editor-web-extension.c
@@ -16,9 +16,19 @@
  *
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
-#include "e-html-editor-web-extension.h"
+#include <string.h>
+
+#include <glib/gstdio.h>
+#include <gio/gio.h>
+#include <gtk/gtk.h>
+#include <webkit2/webkit-web-extension.h>
+#include <camel/camel.h>
+
+#include <web-extensions/e-dom-utils.h>
 
 #include "e-composer-private-dom-functions.h"
 #include "e-html-editor-actions-dom-functions.h"
@@ -33,17 +43,7 @@
 #include "e-html-editor-view-dom-functions.h"
 #include "e-msg-composer-dom-functions.h"
 
-#include <e-util/e-misc-utils.h>
-#include <e-util/e-html-editor-defines.h>
-#include <web-extensions/e-dom-utils.h>
-
-#include <string.h>
-
-#include <glib/gstdio.h>
-#include <gio/gio.h>
-#include <gtk/gtk.h>
-#include <webkit2/webkit-web-extension.h>
-#include <camel/camel.h>
+#include "e-html-editor-web-extension.h"
 
 #define E_HTML_EDITOR_WEB_EXTENSION_GET_PRIVATE(obj) \
        (G_TYPE_INSTANCE_GET_PRIVATE \
diff --git a/web-extensions/composer/e-html-editor-web-extension.h 
b/web-extensions/composer/e-html-editor-web-extension.h
index 65eca0a..9e4a832 100644
--- a/web-extensions/composer/e-html-editor-web-extension.h
+++ b/web-extensions/composer/e-html-editor-web-extension.h
@@ -19,16 +19,16 @@
 #ifndef E_HTML_EDITOR_WEB_EXTENSION_H
 #define E_HTML_EDITOR_WEB_EXTENSION_H
 
-#include "config.h"
+#include <glib-object.h>
+#include <webkit2/webkit-web-extension.h>
 
-#include "e-html-editor-web-extension-names.h"
+#define E_UTIL_INCLUDE_WITHOUT_WEBKIT
+#include <e-util/e-util.h>
+#undef E_UTIL_INCLUDE_WITHOUT_WEBKIT
 
+#include "e-html-editor-web-extension-names.h"
 #include "e-html-editor-undo-redo-manager.h"
 
-#include <e-util/e-util-enums.h>
-#include <webkit2/webkit-web-extension.h>
-#include <glib-object.h>
-
 /* Standard GObject macros */
 #define E_TYPE_HTML_EDITOR_WEB_EXTENSION \
        (e_html_editor_web_extension_get_type ())
diff --git a/web-extensions/composer/e-msg-composer-dom-functions.c 
b/web-extensions/composer/e-msg-composer-dom-functions.c
index 2af4e11..7751c95 100644
--- a/web-extensions/composer/e-msg-composer-dom-functions.c
+++ b/web-extensions/composer/e-msg-composer-dom-functions.c
@@ -16,10 +16,14 @@
  *
  */
 
-#include "e-msg-composer-dom-functions.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include <string.h>
 
+#include "e-msg-composer-dom-functions.h"
+
 gchar *
 dom_get_active_signature_uid (WebKitDOMDocument *document)
 {
diff --git a/web-extensions/e-dom-utils.c b/web-extensions/e-dom-utils.c
index 4019b22..96af6cf 100644
--- a/web-extensions/e-dom-utils.c
+++ b/web-extensions/e-dom-utils.c
@@ -16,7 +16,11 @@
  *
  */
 
-#include "e-dom-utils.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
 
 #define WEBKIT_DOM_USE_UNSTABLE_API
 #include <webkitdom/WebKitDOMDOMSelection.h>
@@ -26,12 +30,7 @@
 #include "e-web-extension.h"
 #include "e-web-extension-names.h"
 
-#include <e-util/e-util-enums.h>
-#include <e-util/e-misc-utils.h>
-
-#include <config.h>
-
-#include <string.h>
+#include "e-dom-utils.h"
 
 static void
 replace_local_image_links (WebKitDOMElement *element)
diff --git a/web-extensions/e-dom-utils.h b/web-extensions/e-dom-utils.h
index 5c65fee..986d47e 100644
--- a/web-extensions/e-dom-utils.h
+++ b/web-extensions/e-dom-utils.h
@@ -19,7 +19,9 @@
 #ifndef E_DOM_UTILS_H
 #define E_DOM_UTILS_H
 
-#include <e-util/e-util-enums.h>
+#define E_UTIL_INCLUDE_WITHOUT_WEBKIT
+#include <e-util/e-util.h>
+#undef E_UTIL_INCLUDE_WITHOUT_WEBKIT
 
 #include <webkitdom/webkitdom.h>
 
diff --git a/web-extensions/e-web-extension-main.c b/web-extensions/e-web-extension-main.c
index ac9a270..fa68aae 100644
--- a/web-extensions/e-web-extension-main.c
+++ b/web-extensions/e-web-extension-main.c
@@ -16,7 +16,9 @@
  *
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
 #include "e-web-extension.h"
 #include "e-web-extension-names.h"
diff --git a/web-extensions/e-web-extension.c b/web-extensions/e-web-extension.c
index 2c7354d..d362072 100644
--- a/web-extensions/e-web-extension.c
+++ b/web-extensions/e-web-extension.c
@@ -16,23 +16,22 @@
  *
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 
-#include "e-web-extension.h"
-#include "e-dom-utils.h"
-#include "e-web-extension-names.h"
+#include <string.h>
 
 #include <gio/gio.h>
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
 
-#include <string.h>
-
-#include <e-util/e-util-enums.h>
-#include <e-util/e-misc-utils.h>
-
 #include <libedataserver/libedataserver.h>
 
+#include "e-web-extension.h"
+#include "e-dom-utils.h"
+#include "e-web-extension-names.h"
+
 #define E_WEB_EXTENSION_GET_PRIVATE(obj) \
        (G_TYPE_INSTANCE_GET_PRIVATE \
        ((obj), E_TYPE_WEB_EXTENSION, EWebExtensionPrivate))


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