Introduction
Introduction Statistics Contact Development Disclaimer Help
fixing double calling functions from contextmenu. - surf - surf browser, a WebK…
git clone git://git.suckless.org/surf
Log
Files
Refs
README
LICENSE
---
commit bdfa30bf335f0e728e222d9fd9d137605c535abe
parent 5ac31995a323eaac87b1b509a7fce26d488ca3ea
Author: Enno Boland (tox) <[email protected]>
Date: Sat, 17 Oct 2009 08:57:23 +0200
fixing double calling functions from contextmenu.
Diffstat:
M surf.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/surf.c b/surf.c
@@ -187,8 +187,6 @@ context(WebKitWebView *v, GtkMenu *m, Client *c) {
if(parent)
gtk_container_remove(parent, c->items[i]);
gtk_menu_shell_append(GTK_MENU_SHELL(m), c->items[i]);
- g_signal_connect(G_OBJECT(c->items[i]), "activate",
- G_CALLBACK(itemclick), c);
gtk_widget_show(c->items[i]);
}
}
@@ -459,8 +457,11 @@ newclient(void) {
die("Cannot malloc!\n");
/* contextmenu */
- for(i = 0; i < LENGTH(items); i++)
+ for(i = 0; i < LENGTH(items); i++) {
c->items[i] = gtk_menu_item_new_with_label(items[i].label);
+ g_signal_connect(G_OBJECT(c->items[i]), "activate",
+ G_CALLBACK(itemclick), c);
+ }
/* VBox */
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.