Re: gtk_message_dialog_new_with_markup() revisited



On Thu, 2003-09-11 at 17:59, Matthias Clasen wrote:

> >  - Add gtk_label_set_printf()         [ gtk_label_format()?]
> >  - Add gtk_label_set_markup_printf() 
> 
> Is there any particular need for these ? We don't generally have
> printf-like setters for string properties, except in convenience API
> like GtkMessageDialog. 

The reason for adding them, if we should add them, would simply be
as convenience for a common operation.

Are they common? I don't have much data one way or the other.
You can certainly find examples of g_strdup_printf() followed by
gtk_label_new() or gtk_labeL_set_text() if you look through any
big body of GTK+ code, but not huge number of examples.

The question of "how to to set a label to an integer" also comes
up reasonably commonly on gtk-list; it's possible that people
would figure out gtk_label_format ("%d", num); easier than
finding g_strdup_printf().

One thing you could do with it is:

 gtk_label_format_markup ("<b>%s</b>", _("Doodads"));

though that doesn't solve the problem of doing that in the glade
file.

No strong feelings here. I'll start working on the other parts
GLib and GtkMessageDialog stuff.

Regards,
					Owen





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