Re: Glade & new GTK+ 2.5.x features



On Fri, 2004-12-03 at 07:34, James Henstridge wrote:

> >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?

It would simply be turned into a markup "span" string and added at the
start and end of the property value, e.g.

  <span foreground="blue" weight="bold" size="x-large">label1</span>

I want to keep it as simple as possible, so no other special handling
would be done.


> What sort of interface would Glade provide to edit these attributes?

I was thinking of just doing the conversion on input/output. So no UI
changes. Glade 3 or whatever could provide a more complex UI if they
want. Though GtkLabel is pretty complex as it is.


> What would Glade do if it opened a file which contained an unknown 
> "markup" value?

Output a warning and ignore it, I would think.


> 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?

That's why I wanted to make it an attribute in the XML, so it could
apply to any property. (Though I haven't seen any others that use markup
yet.)

Damon





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