[evolution/webkit-composer: 37/181] Use e_editor_selection_unlink() to remove link



commit 860ab68f013bf14e477528c7254e7b3375176c02
Author: Dan VrÃtil <dvratil redhat com>
Date:   Mon Aug 13 15:00:06 2012 +0200

    Use e_editor_selection_unlink() to remove link

 e-util/e-editor-actions.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-editor-actions.c b/e-util/e-editor-actions.c
index 298a1e5..cbd239c 100644
--- a/e-util/e-editor-actions.c
+++ b/e-util/e-editor-actions.c
@@ -484,11 +484,13 @@ static void
 action_context_remove_link_cb (GtkAction *action,
                                EEditor *editor)
 {
-	WebKitDOMDocument *document;
+	EEditorWidget *widget;
+	EEditorSelection *selection;
 
-	document = webkit_web_view_get_dom_document (
-			WEBKIT_WEB_VIEW (e_editor_get_editor_widget (editor)));
-	webkit_dom_document_exec_command (document, "unlink", FALSE, "");
+	widget = e_editor_get_editor_widget (editor);
+	selection = e_editor_widget_get_selection (widget);
+
+	e_editor_selection_unlink (selection);
 }
 
 static void


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