[yelp] [libyelp/yelp-view] Copy text on right-click



commit 807967386164ffe6094f30affb16eeaf518f5c85
Author: Shaun McCance <shaunm gnome org>
Date:   Thu May 20 09:37:41 2010 -0500

    [libyelp/yelp-view] Copy text on right-click

 libyelp/yelp-view.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index 0389c39..28be617 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -859,6 +859,16 @@ view_populate_popup (YelpView *view,
         }
     }
 
+    if (context & WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION) {
+        item = gtk_separator_menu_item_new ();
+        gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+
+        item = gtk_menu_item_new_with_mnemonic (_("_Copy Text"));
+        g_signal_connect_swapped (item, "activate",
+                                  G_CALLBACK (webkit_web_view_copy_clipboard), view);
+        gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
+    }
+
     g_object_unref (result);
     gdk_event_free (event);
     gtk_widget_show_all (GTK_WIDGET (menu));



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