Re: Glade & new GTK+ 2.5.x features



On Fri, 2004-12-03 at 15:34 +0800, James Henstridge wrote:
> Damon Chaplin wrote:
> 
> >On Thu, 2004-12-02 at 15:45, Bill Haneman wrote:
> >  
> >
> >>On Wed, 2004-12-01 at 20:36, Damon Chaplin wrote:
> >>...
> >>    
> >>
> >>>OK, scratch that idea. I've thought of a better way:
> >>>
> >>>  <widget class="GtkLabel" id="label1">
> >>>    <property name="label" font="bold,italic,x-large">label1</property>
> >>>  </widget>
> >>>
> >>>I think that is fairly clean.
> >>>      
> >>>
> >>Yeah, nice.  I assume the comma-delimited list could in theory include
> >>any markup tags, i.e. not restricted to a particular set of known
> >>values...
> >>
> >>Howabout 'style' instead of 'font'? Since possible global markup could
> >>affect something not entirely "font"-specific.
> >>    
> >>
> >
> >The main concern of the translators is the really common markup, like
> >the font weights, styles, and sizes. In which case we could use the
> >known values like above.
> >
> >If we want to support all possible tags it would start getting ugly
> >again:
> >
> >  <widget class="GtkLabel" id="label1">
> >     <property name="label" markup="foreground=&quot;blue&quot weight=&quot;bold&quot; size=&quot;x-large&quot;">label1</property>
> >  </widget>
> >
> >I'd be OK with that as well. Though it doesn't look like people are going to agree anyway.
> >  
> >
> One thing to keep in mind when deciding on a syntax is how it should be 
> processed.  With your suggested syntax, is the idea that property value 
> should be transformed into a markup string if a markup attribute is found?
> 
> Should the character data in the <property> element be escaped before 
> conversion?
> 
> What sort of interface would Glade provide to edit these attributes?  
> What would Glade do if it opened a file which contained an unknown 
> "markup" value?
> 
> If it is intended that the markup info be processed separately at 
> property application time, can it be handled in a generic fashion so it 
> isn't just a GtkLabel specific syntax?
> 

I would envision glade to have a number of simple checkboxes:

[] bold [] italic [] underlined

to allow specification of global font styles. 
These can then be translated into xml similar to what Damon proposed.
libglade will parse it an construct PangoAttributes to set the
GtkLabel::attributes property.

Matthias




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