diff options
author | Josh Rickmar <jrick@devio.us> | 2012-08-23 15:03:08 -0400 |
---|---|---|
committer | Josh Rickmar <jrick@devio.us> | 2012-08-23 15:03:08 -0400 |
commit | 7acee02bd681a917f0ead907d9509ea5051b6f25 (patch) | |
tree | 804d0c3cb4fcff9835f675f3d371a6d824242660 | |
parent | b5ba9baf6a5806e7fea0d116df627d4e0b0e77c1 (diff) | |
download | xombrero-7acee02bd681a917f0ead907d9509ea5051b6f25.tar.gz |
Make the arrow menu work again
-rw-r--r-- | xombrero.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xombrero.c b/xombrero.c index 85daf52..a06ce8a 100644 --- a/xombrero.c +++ b/xombrero.c @@ -7971,16 +7971,16 @@ menuitem_response(struct tab *t) } int -destroy_menu(GtkWidget *w, GdkEventFocus *e, void *notused) +destroy_menu(GtkMenuShell *m, void *notused) { - gtk_widget_destroy(w); + gtk_widget_destroy(GTK_WIDGET(m)); return (XT_CB_PASSTHROUGH); } gboolean arrow_cb(GtkWidget *w, GdkEventButton *event, gpointer user_data) { - GtkWidget *menu, *menu_items; + GtkWidget *menu = NULL, *menu_items; GdkEventButton *bevent; struct tab **stabs = NULL; int i, num_tabs; @@ -8002,7 +8002,7 @@ arrow_cb(GtkWidget *w, GdkEventButton *event, gpointer user_data) gtk_menu_shell_append(GTK_MENU_SHELL(menu), menu_items); gtk_widget_show(menu_items); - g_signal_connect_swapped((menu_items), + g_signal_connect_swapped(menu_items, "activate", G_CALLBACK(menuitem_response), (gpointer)stabs[i]); } @@ -8012,7 +8012,7 @@ arrow_cb(GtkWidget *w, GdkEventButton *event, gpointer user_data) bevent->button, bevent->time); g_object_connect(G_OBJECT(menu), - "signal::hide", G_CALLBACK(destroy_menu), NULL, + "signal::selection-done", G_CALLBACK(destroy_menu), NULL, (char *)NULL); return (TRUE /* eat event */); |