Re: Glade & new GTK+ 2.5.x features
- From: Damon Chaplin <damon karuna uklinux net>
- To: Bill Haneman <Bill Haneman Sun COM>
- Cc: gtk-devel-list gnome org
- Subject: Re: Glade & new GTK+ 2.5.x features
- Date: Wed, 01 Dec 2004 20:36:36 +0000
On Wed, 2004-12-01 at 20:16, Bill Haneman wrote:
> Damon Chaplin wrote:
>
> >On Wed, 2004-12-01 at 17:11, Bill Haneman wrote:
> >
> >>>> <widget class="GtkLabel" id="label1">
> >>>> <property name="label" markup="<b>">label1</property>
> >>>> </widget>
> >>
> >>This looks really ugly to me - storing what is essentially an XML tag as
> >>content!
> >
> >Yes, it isn't ideal. But that's what we are currently doing for markup
> >anyway.
>
> Yes, but the suggested changes in your email are IMO even uglier because
> they put the escaped text in an attribute. For in-line markup (what you
> are doing now), escaping the chars makes sense, but for global markup
> IMO it does not.
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.
Though I also like Owen's idea of a GtkWidget "font" property. But I
think a PangoFontDescription only supports absolute sizes so we'd have a
problem with the sizes like "x-large".
> >> <>Why not
> >>
> >> <widget class="GtkLabel" id="label1">
> >> <property name="label">label1</property>
> >> <markup>
> >> <b>
> >> .. [etc.]
> >> </markup>
> >> </widget>
> >>
> >> i.e. any tag could be places in the <markup/> element.
> >
> Damon:
>
> I don't think it really warrants major changes to the XML structure like
>
> >> <>that.
> >
> I don't see it as that much bigger a change that some of the other
> proposals, and it has the advantages of both allowing arbitrary global
> markup tags (i.e. extensible) and avoiding the escaping of the markup tags.
It does look pretty tricky to implement though. I wouldn't really fancy
it.
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]