[evolution/wip/webkit-composer: 246/372] Bug #689802 - Text paste to both widget and message body



commit c4c021058a0dc82c7f9d14e0f8be41d97179a164
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]