[evolution/wip/webkit-composer] EEditorSpellCheckDialog: Get DOM Document from correct widget



commit 2d7d1e71c2edc6cc3e09eee8d5652d34c852e99a
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Feb 26 11:17:49 2014 +0100

    EEditorSpellCheckDialog: Get DOM Document from correct widget

 e-util/e-editor-spell-check-dialog.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-editor-spell-check-dialog.c b/e-util/e-editor-spell-check-dialog.c
index 75b0122..edeaa3d 100644
--- a/e-util/e-editor-spell-check-dialog.c
+++ b/e-util/e-editor-spell-check-dialog.c
@@ -412,6 +412,8 @@ editor_spell_check_dialog_set_dictionary (EEditorSpellCheckDialog *dialog)
 static void
 editor_spell_check_dialog_show (GtkWidget *widget)
 {
+       EEditor *editor;
+       EEditorWidget *editor_widget;
        EEditorSpellCheckDialog *dialog;
        WebKitDOMDocument *document;
        WebKitDOMDOMWindow *window;
@@ -421,7 +423,10 @@ editor_spell_check_dialog_show (GtkWidget *widget)
        g_free (dialog->priv->word);
        dialog->priv->word = NULL;
 
-       document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (widget));
+       editor = e_editor_dialog_get_editor (E_EDITOR_DIALOG (dialog));
+       editor_widget = e_editor_get_editor_widget (editor);
+
+       document = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (editor_widget));
        window = webkit_dom_document_get_default_view (document);
        dialog->priv->selection = webkit_dom_dom_window_get_selection (window);
 


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