[Xfce4-commits] <midori:master> Connect overflow toolbar bookmark items for nested folder menus
Christian Dywan
noreply at xfce.org
Tue Nov 17 19:22:05 CET 2009
Updating branch refs/heads/master
to d3e5d1af23e3cba1d591985028e5dbe199c360ac (commit)
from 26b4aad13973dcf81a386e5577a9d446aeaa7fb7 (commit)
commit d3e5d1af23e3cba1d591985028e5dbe199c360ac
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Nov 17 18:50:22 2009 +0100
Connect overflow toolbar bookmark items for nested folder menus
katze/katze-arrayaction.c | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/katze/katze-arrayaction.c b/katze/katze-arrayaction.c
index f0422dd..db17b68 100644
--- a/katze/katze-arrayaction.c
+++ b/katze/katze-arrayaction.c
@@ -508,11 +508,21 @@ katze_array_action_proxy_create_menu_proxy_cb (GtkWidget* proxy,
GTK_IMAGE_MENU_ITEM (menuitem), TRUE);
#endif
g_object_set_data (G_OBJECT (menuitem), "KatzeItem", item);
- g_signal_connect (menuitem, "button-press-event",
- G_CALLBACK (katze_array_action_menu_button_press_cb), array_action);
- /* we need the 'activate' signal as well for keyboard events */
- g_signal_connect (menuitem, "activate",
- G_CALLBACK (katze_array_action_menu_activate_cb), array_action);
+ if (KATZE_IS_ARRAY (item))
+ {
+ GtkWidget* submenu = gtk_menu_new ();
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), submenu);
+ g_signal_connect (menuitem, "select",
+ G_CALLBACK (katze_array_action_menu_item_select_cb), array_action);
+ }
+ else
+ {
+ g_signal_connect (menuitem, "button-press-event",
+ G_CALLBACK (katze_array_action_menu_button_press_cb), array_action);
+ /* we need the 'activate' signal as well for keyboard events */
+ g_signal_connect (menuitem, "activate",
+ G_CALLBACK (katze_array_action_menu_activate_cb), array_action);
+ }
gtk_tool_item_set_proxy_menu_item (GTK_TOOL_ITEM (proxy),
"katze-tool-item-menu", menuitem);
return TRUE;
More information about the Xfce4-commits
mailing list