Re: gtk-mailund-980804-0.patch.gz
- From: James A <nevyn and org>
- To: gtk-devel-list redhat com
- Cc: Tim Janik <timj gtk org>, Thomas Mailund Jensen <mailund daimi aau dk>, Gtk+ Devils <gtkdev gtk org>
- Subject: Re: gtk-mailund-980804-0.patch.gz
- Date: 08 Aug 1998 02:13:10 +0100
Owen Taylor <otaylor@redhat.com> writes:
[snip]
> The way Thomas's set_property works now, the key/value thing doesn't
> really work the way that we are thinking of it, because it completely
> replaces the existing properties with the new ones. So perhaps
> it should be changed to gtk_text_change_properties() with the
> semantics that it overlays the specified properties on to
> of the existing properties for the span, creating new properties
> as necessary.
>
> (That is, if I apply the 'red' foreground to some portion of
> a string in 'courier', with
>
> gtk_text_change_properties (text, NULL, red, NULL, NULL, NULL, 10);
>
> then I get red courier text.
>
> But this raises and additional problem is that there are two distinct
> meanings for 'font' 'fore' and 'back' being equal to NULL -
>
> 1) Same as current values for the text.
> 2) Same as default.
You could also say that NULL indicates it will always take the
current values, with the default just being the special case of not
having changed them.
> This becomes an especially important distinction when you
> allow changing the style of a text widget on the fly.
> (This doesn't work now, but it will work for 1.2).
>
> So, either we have to add a flags field, or split this into:
>
> gtk_text_change_font ()
> gtk_text_change_fore ()
> gtk_text_change_back ()
> gtk_text_change_data ()
>
> (which could all be frontends to an internal function with
> a flags field)
Or do the above and have gtk_text_default_font () etc. which seems
nicer IMO. I'm guessing that most of the time you are going to want to
keep what is there.
> - gtk_text_set_set_property should not freeze() / thaw() unconditionally,
> since that will thaw a previously frozen text widget.
Would it not be easier to add recursive freezing/thawing in ?
> - This all conflicts somewhat some changes I have around here to
> allow properties to store the fact they have the default values.
> (But don't worry about that - they may not make it for
> another week or two, and I can deal with merging at that
> point)
Hmm if you have the above default functions, then you can just
compare them -- although it won't be as fast but then again it will
take less memory.
--
/* James Antill **WWW** http://www.and.org/ */ main(){
int h[3][3]={{44680,57949,51424},{60552,41941,18576},{44782,57757,
12000}};int i=-1,j;while(i++<2){j^=j;while(j<3){int k=16;while(
--k>=0)putchar(h[i][j]&(1<<k)?'x':' ');++j;}putchar('\n');}exit(0);}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]