GNOME Bugzilla – Bug 409380
add gtk_label_new_markup() and gtk_label_set_label_printf() proposal
Last modified: 2008-10-02 05:20:24 UTC
Hi, I keep these (or similar) two helpers for GtkLabel with every my project for more than two years, so I decided to propose them into the mainline. 1. gtk_label_new_with_markup() - constructor that sets "use-markup" to TRUE and thus saves following call to gtk_label_set_markup() or gtk_label_set_use_markup() further in code. 2. gtk_label_set_label_printf() - helper to set the content (text, markup or whatever) of the label in printf-like way. Useful in many cases. Olexiy
Created attachment 82844 [details] [review] proposed patch
I vote -1 on both. gtk_label_set_label_printf() is C-specific and not useful in other languages and there are already to many different label-text setters in GtkLabel, imho. gtk_label_new_with_markup() is more useful, but saves only one line gtk_label_set_use_markup (label, TRUE); which is not worth it.
Agree -- no on both, for the cogent reasons stated by Björn. For gtk_label_new_with_markup, adding a different constructor to vary one property is rarely if ever a good idea.
Agreed. No need for more label constructors