You are not logged in.
Pages: 1
I was trying show a popup menu on rightclick of a icon entry in notification area using gtk2.
I can get the menu in the item, but it very small. You can see in the custom icon I have set in notificatin area.
There is thin line extending over the Network Manager applet.
I wanted it to show "Quit" there. Any help on this will be really helpful.
void tray_icon_on_menu(GtkStatusIcon *status_icon, guint button,
guint activate_time, gpointer user_data)
{
// printf("Popup menu\n");
GtkWidget* menu;
GtkWidget* menuitem;
menu = gtk_menu_new();
menuitem = gtk_menu_item_new_with_label("Quit");
gtk_menu_attach(GTK_MENU(menu),menuitem,0,1,0,1);
gtk_menu_popup(GTK_MENU(menu),NULL,NULL,NULL,user_data,button, gtk_get_current_event_time());
}
Keep Calm, And Enjoy Life
Offline
Try adding this before the call to popup():
gtk_widget_show_all(menu);
Thanks SahibBommelig. Really appreciate the help. Its working now
Keep Calm, And Enjoy Life
Offline
Pages: 1