Re: Deprecated Gtk::Stock replacement?!




Den 2015-02-03 09:06, Murray Cumming skrev:
On Mon, 2015-02-02 at 19:07 +0100, Markus Kolb wrote:
Hi,

what should be used instead of the Gtk::Stock labels on buttons?

The documentation is not really helpful:
"Stock items have been recommended for use in buttons. From gtkmm-3.10 
they are deprecated. They should not be used in newly-written code. 
However, the documentation of namespace Gtk::Stock shows recommended 
labels and named icons to show in buttons."
Yes, that text, from here,
https://developer.gnome.org/gtkmm-tutorial/unstable/gtkmm-tutorial.html
is a bit odd.
I admit, I'm to blame for that odd text. Since stock items are deprecated, an alternative might be to remove all mentioning of them from the gtkmm tutorial.

The gtkmm tutorial (book) is out of date in many places now due to the
many deprecations and API additions in GTK+ (and therefore gtkmm) over
the years.

Unfortunately recent GTK+ deprecations often lack proper explanation. We
try to discover the reasoning, but often we just have to make gtkmm's
documentation repeat the vague statements that are in the GTK+
documentation

e.g.
extern GTKMM_API const Gtk::BuiltinStockID CANCEL; /*!< @image html 
gtk-cancel.png
                                                     * @deprecated Do not 
use an icon. Use label "_Cancel". */

The Gtk::Stock:: stuff had translation "built-in". So do we have to 
translate the default system buttons on ourself again.
Yes, I find that really annoying too.

I believe that the logic is that the translation would be very context
dependent anyway. But I don't find that very convincing.

 Or what should be 
used?
You can continue to use them, or just assume that they don't exist, I'm
afraid.

The gtk+/NEWS file refers to https://mail.gnome.org/archives/gtk-devel-list/2013-July/msg00000.html, which contains many links to discussions of the deprecation of stock items.

Kjell



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