[evolution/webkit-composer: 180/231] Bug #689802 - Text paste to both widget and message body



commit 00f22b5df505b9ae0db8d3abe2230eb44282d152
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Mar 29 11:15:41 2013 +0100

    Bug #689802 - Text paste to both widget and message body

 e-util/e-editor-actions.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/e-util/e-editor-actions.c b/e-util/e-editor-actions.c
index 9ab79b9..3ff1023 100644
--- a/e-util/e-editor-actions.c
+++ b/e-util/e-editor-actions.c
@@ -683,8 +683,11 @@ static void
 action_paste_cb (GtkAction *action,
                  EEditor *editor)
 {
-       webkit_web_view_paste_clipboard (
-               WEBKIT_WEB_VIEW (e_editor_get_editor_widget (editor)));
+       /* Paste only into WebView when it has focus */
+       if (gtk_widget_has_focus (GTK_WIDGET (e_editor_get_editor_widget (editor)))) {
+               webkit_web_view_paste_clipboard (
+                       WEBKIT_WEB_VIEW (e_editor_get_editor_widget (editor)));
+       }
 }
 
 static void


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