Re: gtk_menu_item_set_accel_path()



On Donnerstag, 8. Februar 2018 16:32:05 CET Christian Schoenebeck wrote:
And in fact that C code works perfectly even with Gtk 3, but gtkmm3 is doing
something differently than in above's C code: in the Gtk::MenuItem
constructor they explicitly create an acceleration label for the menu item
and I am not sure whether they should not do that, or whether gtk should
rather be able to handle that:

      https://github.com/GNOME/gtkmm/blob/gtkmm-3-22/gtk/src/menuitem.ccg
      (line 46 and line 51-61 being the relevant ones)

As far as I can read from the gtk sources, gtk automatically creates the
menu item's acceleration label (even if no accelerators are used at all).
But right now I cannot judge which side is wrong here (gtkmm3 or gtk3).

Ok, the attached quick hack (on gtkmm3) fixed that issue for me. With that 
patch the acceleration keys are now correctly displayed again with gtkmm3.
But obviously I have no idea whether the acceleration label was created 
explicitly there for some reason by gtkmm, whether it is still used by any 
Gtkmm subclass or something, or whether it was simply some left over of 
something.

I guess I just move this discussion onto the gtkmm list now.

CU
Christian

Attachment: gtkmm3-accel-path.patch
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]