hi, Gabriel Schulhof wrote: > Hi! > > On Sun, 2007-08-19 at 23:48 +0300, Stefan Kost wrote: >> I read about the differences. I really want "accelerators". > I was able to hack it: > > Create a plain old regular menubar-type menu with accelerators. Then ref > the submenu you want to make into a popup menu and detach it from its > parent menu item[0]. > > [0]http://library.gnome.org/devel/gtk/unstable/GtkMenuItem.html#id3734460 > > HTH, > > Gabriel >
like this? // generate the context menu GtkWidget *mb=gtk_menu_bar_new(); GtkWidget *mi=gtk_menu_item_new(); gtk_container_add(GTK_CONTAINER(mb),mi); self->priv->context_menu=GTK_MENU(gtk_menu_new()); gtk_menu_set_accel_group(GTK_MENU(self->priv->context_menu), self->priv->accel_group); gtk_menu_set_accel_path(GTK_MENU(self->priv->context_menu),"<Buzztard-Main>/PatternView/PatternContext"); gtk_menu_item_set_submenu(GTK_MENU_ITEM(mi),GTK_WIDGET(self->priv->context_menu)); g_object_ref(self->priv->context_menu); gtk_menu_detach(self->priv->context_menu); make no difference for me :/ I also tried gtk_menu_attach_to_widget(self->priv->context_menu, GTK_WIDGET (main_window),NULL); Stefan _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list