[GNC-dev] Buttons in GnuCash for now and in the future
jralls at ceridwen.us
Fri May 24 00:29:37 EDT 2019
> On May 23, 2019, at 7:21 PM, Frank H. Ellenberger <frank.h.ellenberger at gmail.com> wrote:
> Bob, I think we should put the discussion from
> https://bugs.gnucash.org/show_bug.cgi?id=797232 -
> dialog-ab.glade was written for gtk 2.16
> on the list.
> Glade did not tell me, stock items, which I used in some recent
> commits, are deprecated since version 3.10. [gtk_button_new_from_stock
> () in 1]
> They included:
> 1. a label with mnemonic,
> 2. for which the translation was already done in the gtk domain,
> 3.unique icons were associated.
> The questions now:
> 1. Does anybody know the background of this decision? I thought it was
> very useful to have standard icons associated with standard actions,
> also for handicapped people like me, while I do test runs with foreign
> 2. What is there some general replacement strategy or does it get
> simply dropped?
> 3. Do we want to
> a) drop the icons from the buttons as you did recently or
> b) should we use gtk_button_new_from_icon_name ()  with names
> according  so they get choosen from 
> c) in the long term look to replace GTK?
The stock items were deprecated to improve theming, particularly with CSS theming. The discussion about it begins at
How to create the button depends on what you want to show. IIUC the Gnome design team thinks that buttons should either have icons or labels but not both. If you want both you must create it with gtk_button_new_from_icon_name(), set the label with gtk_button_set_label(), and set the "always-show-image" property to TRUE.
I don't know how to ensure that labels are translated in gtk.mo instead of gnucash.mo other than to search gtk.pot for msgids. For gtk3 the stock-item strings will continue to be translated, and some of them will probably live on in future versions.
We decided some time ago that we don't want to keep Gtk for the long term, but there's other work with a higher priority so nothing has been done about it.
More information about the gnucash-devel