On 8 February 2018 at 12:01, <gtk-devel-list-requ...@gnome.org> wrote:
> Message: 2
> Date: Wed, 07 Feb 2018 13:45:47 +0100
> From: Christian Schoenebeck <schoeneb...@linuxsampler.org>
> To: email@example.com
> Subject: gtk_menu_item_set_accel_path()
> Message-ID: <1582692.dYf0dnMCMj@silver>
> Content-Type: text/plain; charset="us-ascii"
> I am currently debugging gtk_menu_item_set_accel_path(): when using that
> function then keyboard accelerator key(s) are not displayed in the menu
> at all. Has anybody looked into this bug before?
> What I found out so far is that the the menu item's
> are correctly updated with the expected textual representation of the
> accelerator key(s) (i.e. "Ctrl c", "F1", etc.), however the menu item's
> GtkAccelLabel would never be displayed on screen.
I think we'd need to see precisely how you're setting up this MenuItem to
do anything other than speculate wildly.
But note that the doc description indicates you're expected to set the
accel shown yourself, rather than that the MenuItem will automatically show
one if it's available:
I see no indication in gtkmenuitem.c that it ever manages the displayed
accelerator for the user.
If you're using some other means of creating MenuItems, we need to know
what that is, to say whether or not that method should be doing this for
> Also the menu item's size is not updated either. By default, when
> displaying a
> menu item without any action/accelerator, the size (more specific: its
> of the menu item is limited to the menu item's main text label. And when an
> action with keyboard accelerator is assigned to the menu item, the size of
> menu item is enlarged to display the acceleration label as well. The latter
> never happens when using gtk_menu_item_set_accel_path().
Isn't this a tautology? Why would the size be updated for an accelerator
that is not being shown...?
gtk-devel-list mailing list