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

Christian Dywan noreply at xfce.org
Sat Jun 5 18:08:01 CEST 2010


Updating branch refs/heads/master
         to 021bb94b348f3c2eb5573e1d320c84d174fbd4f5 (commit)
       from 2430729a9ba6f2538c406918065fd598766de942 (commit)

commit 021bb94b348f3c2eb5573e1d320c84d174fbd4f5
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Jun 5 17:47:30 2010 +0200

    Add 'Copy' to content context menu

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

diff --git a/postler/postler-content.vala b/postler/postler-content.vala
index df8d780..2887554 100644
--- a/postler/postler-content.vala
+++ b/postler/postler-content.vala
@@ -90,7 +90,19 @@ public class Postler.Content : WebKit.WebView {
 
     void populate_menu (Gtk.Menu menu) {
         menu.hide_all ();
-        var menuitem = new Gtk.MenuItem.with_mnemonic (_("View _Source"));
+        Gtk.MenuItem menuitem = new Gtk.ImageMenuItem.from_stock (Gtk.STOCK_COPY, null);
+        menuitem.activate.connect ((menuitem) => {
+            copy_clipboard (); });
+        menuitem.show ();
+        menuitem.sensitive = can_copy_clipboard ();
+        menu.append (menuitem);
+        if (view_source)
+            return;
+
+        menuitem = new Gtk.SeparatorMenuItem ();
+        menuitem.show ();
+        menu.append (menuitem);
+        menuitem = new Gtk.MenuItem.with_mnemonic (_("View _Source"));
         menuitem.activate.connect ((menuitem) => {
             Postler.App.spawn_module ("source", last_location); });
         menuitem.show ();



More information about the Xfce4-commits mailing list