Re: Please avoid unnecessary markup in messages

Gregory Merchan <merchan baton phys lsu edu> writes: 
> There is already API for this I belive:
>   void           gtk_label_set_attributes (GtkLabel      *label,
>                                            PangoAttrList *attrs);
>   PangoAttrList *gtk_label_get_attributes (GtkLabel      *label);

That API is harder to use than markup, though, so people don't.
> > So, some classes, use, and markup might be:
> > 
> >   Class: GtkFieldLabel
> >     Use: used with entries and lists
> >  Markup: some thematic color
> > 
> >   Class: GtkCommandLabel
> >     Use: used on buttons and menu
> >  Markup: bold
> >
> >   Class: GtkCaption
> >     Use: extra info like "Note: Password are case-sensitive"
> >  Markup: smaller
> > 
> An API like this should cover all translatable strings which completely
> and consistently use markup. It could also allow theming of text similar
> to Win98 where font, font size, and font face can be themed for a few
> semantic types.

The way GTK typically works, we'd probably use a property on GtkLabel
instead of a whole subclass, though that might require extra hacks to
allow theming so a subclass does have some advantages.


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