[Xfce4-commits] <postler:master> Add a menu item 'Copy Filename' to content context menu

Christian Dywan noreply at xfce.org
Tue Jul 13 00:54:02 CEST 2010


Updating branch refs/heads/master
         to b5d8c292c2454d19d741d8035e381d05ba579485 (commit)
       from 19d52ce696eb114f6296a8cf835fd797a12968f9 (commit)

commit b5d8c292c2454d19d741d8035e381d05ba579485
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Jul 3 20:21:52 2010 +0200

    Add a menu item 'Copy Filename' to content context menu

 postler/postler-content.vala |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index bda69d8..920a764 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -152,6 +152,13 @@ public class Postler.Content : WebKit.WebView {
         menuitem.show ();
         menuitem.sensitive = can_copy_clipboard ();
         menu.append (menuitem);
+        menuitem = new Gtk.MenuItem.with_mnemonic (_("Copy _Filename"));
+        menuitem.activate.connect ((menuitem) => {
+            var clipboard = get_clipboard (Gdk.SELECTION_CLIPBOARD);
+            clipboard.set_text (last_location, -1);
+        });
+        menuitem.show ();
+        menu.append (menuitem);
         if (view_source)
             return;
 



More information about the Xfce4-commits mailing list