[Github-comments] [geany/geany] Fix setting menu item labels dynamically (#1396)

Colomban Wendling notifications at xxxxx
Fri Feb 17 14:12:35 UTC 2017


@elextr 

> Needs to set use_underline so the mnemonics work, thats the reason for the workaround in the first place.

No, as @vfaronov mentioned there's no need as the item is crated with `gtk_image_menu_item_new_with_mnemonic()`, changing the label will keep the mnemonic choice.  No it's not properly documented, but it always worked (AFAIK) and works.

So IMO the best fix would be to get rid of this obsolete compatibility function and call `gtk_menu_item_set_label()` directly.

> […] despite normal [gtk_label_set_text()](https://developer.gnome.org/gtk3/stable/GtkLabel.html#gtk-label-set-text) explicitly clearing the flag.

But [`gtk_label_set_label()`](https://developer.gnome.org/gtk3/stable/GtkLabel.html#gtk-label-set-label) explicitly does *not* reset that flag.

@vfaronov sorry if it was your original fix, I didn't see it before :S

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1396#issuecomment-280659849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170217/558cff3b/attachment.html>


More information about the Github-comments mailing list