[hackers] [PATCH] Unify handling of URI-copying context menu items

From: Dmitrij D. Czarkoff <czarkoff_AT_gmail.com>
Date: Sat, 6 Jun 2015 13:36:29 +0200

Apparently since commit f7e358280cb3bda1f8c46ca021fe94b59a984f5d handling of
"Copy Link Location" context menu item was broken in surf. This change removes
code for handling this context menu actions, making both "Copy Link Location"
and "Copy Image Address" use the same code.
---
 surf.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/surf.c b/surf.c
index 87c10ef..4848237 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -1082,10 +1082,7 @@ menuactivate(GtkMenuItem *item, Client *c) {
 		return;
 
 	name = gtk_action_get_name(a);
-	if(!g_strcmp0(name, "context-menu-action-3")) {
-		prisel = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
-		gtk_clipboard_set_text(prisel, c->linkhover, -1);
-	} else if(!g_strcmp0(name, "context-menu-action-7")) {
+	if(!g_strcmp0(name, "context-menu-action-3") || !g_strcmp0(name, "context-menu-action-7")) {
 		prisel = gtk_clipboard_get(GDK_SELECTION_PRIMARY);
 		clpbrd = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
 		uri = gtk_clipboard_wait_for_text(clpbrd);
-- 
Dmitrij D. Czarkoff
Received on Sat Jun 06 2015 - 13:36:29 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 18 2015 - 17:36:18 CEST