Re: Please avoid unnecessary markup in messages



On Tue, Oct 29, 2002 at 12:12:10AM -0500, Havoc Pennington wrote:
<snip>
> I think we need to add:
> 
>  gtk_label_set_font_weight ();
>  gtk_label_set_font_style ();
> 
> etc. Maybe worth a GTK bug.

There is already API for this I belive:

  void           gtk_label_set_attributes (GtkLabel      *label,
                                           PangoAttrList *attrs);
  PangoAttrList *gtk_label_get_attributes (GtkLabel      *label);


>From a very long email I sent:
http://mail.gnome.org/archives/gtk-devel-list/2002-May/msg00174.html
>
> I think it is very important for consistency and probably accessibilty
> to have semantic subclasses of GtkLabel. Having a few simple subclasses
> will encourage consistency and will also benefit those not seeing the
> text changes. A screen-reader program could use a different tone of voice
> when reading the larger or bold text in an alert than when reading the normal
> sized text too convey the relative importance. Strings which just label
> some control could be distinguished from more informative strings or those
> that are just part of a control. E.g.:
> 
>   Foo: [___________] [ Bar ]
>        Quux baz zud
> 
> Here "Foo:" just labels the entry, "Bar" is part of the button (hence, an
> issuable command),  and "Quux baz zud" is a caption providing some
> helpful information about the entry.
> 
> 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
> 
> I know at least the Java HIG has something like this. Making sure
> the right classes are available would surely require coordinating
> most of the GNOME subprojects.

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.


Cheers,
Greg Merchan



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