[evolution] Make 'Copy Link Location' copy into both primary and selection clipboards



commit f835576d3584d90bbc029c5be38d45228bcbb1b4
Author: Milan Crha <mcrha redhat com>
Date:   Tue Apr 22 14:59:20 2014 +0200

    Make 'Copy Link Location' copy into both primary and selection clipboards
    
    It used to copy the link into both buffers, same as the 'Copy Email Address"
    does, but it seems, after a move to WebKit based message preview, this
    changed and the link had been copied only to the selection clipboard.
    Make the function consistent and copy the link into to both clipboards.

 e-util/e-web-view.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c
index 511f17e..5750ad9 100644
--- a/e-util/e-web-view.c
+++ b/e-util/e-web-view.c
@@ -253,10 +253,14 @@ action_uri_copy_cb (GtkAction *action,
        GtkClipboard *clipboard;
        const gchar *uri;
 
-       clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
        uri = e_web_view_get_selected_uri (web_view);
        g_return_if_fail (uri != NULL);
 
+       clipboard = gtk_clipboard_get (GDK_SELECTION_PRIMARY);
+       gtk_clipboard_set_text (clipboard, uri, -1);
+       gtk_clipboard_store (clipboard);
+
+       clipboard = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
        gtk_clipboard_set_text (clipboard, uri, -1);
        gtk_clipboard_store (clipboard);
 }


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