[evolution/wip/webkit-composer] Bug 726527 - [webkit-composer] Paste from context menu doesn't paste text
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer] Bug 726527 - [webkit-composer] Paste from context menu doesn't paste text
- Date: Mon, 17 Mar 2014 14:36:09 +0000 (UTC)
commit bd1837e7ca3afd96a034215bec74c4260a39ddd6
Author: Tomas Popela <tpopela redhat com>
Date: Mon Mar 17 15:35:17 2014 +0100
Bug 726527 - [webkit-composer] Paste from context menu doesn't paste text
Move check for EEditorWidget focus to right place.
composer/e-composer-private.c | 9 ++++++---
e-util/e-editor-actions.c | 9 +++------
2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index a1e6aa8..9c06457 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -594,10 +594,13 @@ e_composer_paste_text (EMsgComposer *composer,
editor = e_msg_composer_get_editor (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);
+ /* Paste to EEditorWidget when it has focus */
+ if (gtk_widget_has_focus (GTK_WIDGET (editor_widget))) {
+ e_editor_selection_insert_text (editor_selection, text);
- e_editor_widget_check_magic_links (editor_widget, FALSE);
- e_editor_widget_force_spell_check (editor_widget);
+ e_editor_widget_check_magic_links (editor_widget, FALSE);
+ e_editor_widget_force_spell_check (editor_widget);
+ }
g_free (text);
diff --git a/e-util/e-editor-actions.c b/e-util/e-editor-actions.c
index 0cc7595..917881e 100644
--- a/e-util/e-editor-actions.c
+++ b/e-util/e-editor-actions.c
@@ -682,13 +682,10 @@ action_paste_cb (GtkAction *action,
{
EEditorWidget *widget = e_editor_get_editor_widget (editor);
- /* Paste only into WebView when it has focus */
- if (gtk_widget_has_focus (GTK_WIDGET (widget))) {
- webkit_web_view_paste_clipboard (
- WEBKIT_WEB_VIEW (widget));
+ webkit_web_view_paste_clipboard (
+ WEBKIT_WEB_VIEW (widget));
- e_editor_widget_force_spell_check (widget);
- }
+ e_editor_widget_force_spell_check (widget);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]