Create your menu, connect signal and setup tap-and-hold:
menu=GTK_MENU(hildon_gtk_menu_new()); g_signal_connect(G_OBJECT (menu), "show", G_CALLBACK(menu_items_visibility_cb), NULL); gtk_widget_tap_and_hold_setup(widget, menu, NULL, 0);
Then in your handler, check what you need and hide/show menu items:
static void menu_items_visibility_cb(GtkWidget *menu, gpointer data) { if (foo) gtk_widget_show(menu_item_foo); else gtk_widget_hide(menu_item_foo); }
No comments:
Post a Comment