Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Matthias Clasen
On Sun, Feb 8, 2009 at 7:07 AM, Murray Cumming  wrote:

>
> So can they actully be flipped at runtime now? The documentation seems
> to suggest that they can't if they still use the old common base
> classes.

The intention is to eventually make GtkScale and friends
instantiatable.  When that happens you can use these classes to get
runtime flippable containers.

This has been put on hold until we can reach an agreement on default
values of properties for those newly-instantiatable classes.
Therefore, GTK+ 2.16 will keep all those classes abstract. If you want
runtime flippable containers now, you can always just trivially
subclass e.g. GtkScale.

Matthias
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Tristan Van Berkom
[...]
>> > > > > If the base classes can now already do everything then shouldn't the 
>> > > > > V/H
>> > > > > classes be deprecated already?

Gtk[VH]Foo deprecation++ from me, yes it should be deprecated if it doesnt
serve a purpose - hardcoding the orientation IMO does not serve a
purpose at all.

Somebody made a really rediculous comment about users switching to QT
because of a simple deprecation, MAYBE they have grounds now with
a stripped 3.0 in sight, my opinion ? deprecate everything useless you can
before that deadline, because we may be stuck with the same crap for
another 3+ years.

Im sorry if I sound harsh, I dont even personally maintain GTK+ and I have
personally HAD IT with outside pressure on the GTK+ team to be so backward
forward and 4th dimentionally compatible - the deprecations have been
comming for a while - if users switch to QT it will at least give us a couple
years peace so that we can at least develop some features and do some
real refactoring.

Have a little solidarity, we write GTK+, it says it even in every source
file, it is provided AS IS, take it or leave it - people use GTK+ because
it rocks - it wont rock for long if we cant refactor, do the math.

I am on a half hour lunch break... have to run

Laters folks,
 -Tristan
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Mathias Hasselmann
Am Sonntag, den 08.02.2009, 21:57 +0100 schrieb Murray Cumming:
> On Sun, 2009-02-08 at 21:36 +0100, Mathias Hasselmann wrote:
> > Am Sonntag, den 08.02.2009, 21:04 +0100 schrieb Murray Cumming:
> > > On Sun, 2009-02-08 at 18:47 +0100, Mathias Hasselmann wrote:
> > > > Am Sonntag, den 08.02.2009, 18:36 +0100 schrieb Murray Cumming:
> > > > > On Sun, 2009-02-08 at 14:51 +0100, Sven Herzberg wrote:
> > > > > > AFAIR, you can flip it of you create a GtkBox/GtkScale, but not if 
> > > > > > you
> > > > > > create a Gtk[HV]{Box,Scale}... Mitch?
> > > > > 
> > > > > Ah. Were those base classes (GtkBox, etc) instantiable before?
> > > > > 
> > > > > If the base classes can now already do everything then shouldn't the 
> > > > > V/H
> > > > > classes be deprecated already?
> > > 
> > > A deprecation doesn't force people to change anything. It's not (yet) a
> > > removal of the API, though I guess that is planned for the future. It is
> > > a useful hint and it explains the apparent duplication.
> > 
> > Still you have to react on deprecations better soon than later, if you
> > want to avoid drowning some day.
> 
> Yes, but surely that decision has been made already by the addition of
> GtkOrientable?
> 
> > Oh, from reading this thread I thought this would be the case, but
> > apparently it is not. Seems you really can change the orientation of
> > some Gtk[HV]Box now. Shocking.
> 
> Actually Christian Dywan says they can't flip. But I still think they
> are meant (by the developers who made the change) to be deprecated so
> that isn't very relevant anyway.

It is relevant, as I'd seriously question a decision to deprecate
classes as widely used as Gtk[HV]Box.

The community's effort to follow that little deprecation is close to
infiniteness. Keeping Gtk[HV]Box around costs exactly 54 lines of code
and four public symbols.

Ciao,
Mathias
-- 
Mathias Hasselmann 
Personal Blog: http://taschenorakel.de/mathias/
Openismus GmbH: http://www.openismus.com/

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Murray Cumming
On Sun, 2009-02-08 at 21:36 +0100, Mathias Hasselmann wrote:
> Am Sonntag, den 08.02.2009, 21:04 +0100 schrieb Murray Cumming:
> > On Sun, 2009-02-08 at 18:47 +0100, Mathias Hasselmann wrote:
> > > Am Sonntag, den 08.02.2009, 18:36 +0100 schrieb Murray Cumming:
> > > > On Sun, 2009-02-08 at 14:51 +0100, Sven Herzberg wrote:
> > > > > AFAIR, you can flip it of you create a GtkBox/GtkScale, but not if you
> > > > > create a Gtk[HV]{Box,Scale}... Mitch?
> > > > 
> > > > Ah. Were those base classes (GtkBox, etc) instantiable before?
> > > > 
> > > > If the base classes can now already do everything then shouldn't the V/H
> > > > classes be deprecated already?
> > 
> > A deprecation doesn't force people to change anything. It's not (yet) a
> > removal of the API, though I guess that is planned for the future. It is
> > a useful hint and it explains the apparent duplication.
> 
> Still you have to react on deprecations better soon than later, if you
> want to avoid drowning some day.

Yes, but surely that decision has been made already by the addition of
GtkOrientable?

> Oh, from reading this thread I thought this would be the case, but
> apparently it is not. Seems you really can change the orientation of
> some Gtk[HV]Box now. Shocking.

Actually Christian Dywan says they can't flip. But I still think they
are meant (by the developers who made the change) to be deprecated so
that isn't very relevant anyway.

-- 
Murray Cumming
murr...@murrayc.com
www.murrayc.com
www.openismus.com


___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Mathias Hasselmann
Am Sonntag, den 08.02.2009, 21:04 +0100 schrieb Murray Cumming:
> On Sun, 2009-02-08 at 18:47 +0100, Mathias Hasselmann wrote:
> > Am Sonntag, den 08.02.2009, 18:36 +0100 schrieb Murray Cumming:
> > > On Sun, 2009-02-08 at 14:51 +0100, Sven Herzberg wrote:
> > > > AFAIR, you can flip it of you create a GtkBox/GtkScale, but not if you
> > > > create a Gtk[HV]{Box,Scale}... Mitch?
> > > 
> > > Ah. Were those base classes (GtkBox, etc) instantiable before?
> > > 
> > > If the base classes can now already do everything then shouldn't the V/H
> > > classes be deprecated already?
> 
> A deprecation doesn't force people to change anything. It's not (yet) a
> removal of the API, though I guess that is planned for the future. It is
> a useful hint and it explains the apparent duplication.

Still you have to react on deprecations better soon than later, if you
want to avoid drowning some day.

> > Well, actually those V/H classes even serve a purpose: When using them
> > in a derived widget you can be sure, that nobody will be that evil to
> > suddenly change the orientation of your derived widget.
> 
> Apparently that's not true though.

Oh, from reading this thread I thought this would be the case, but
apparently it is not. Seems you really can change the orientation of
some Gtk[HV]Box now. Shocking.

Maybe GtkBox and friends should get an internal flag for locking that
property? Whilst changing the orientation of widgets can be useful under
certain circumstances, there are others where you don't want to permit
this. Well, but maybe I think too restrictive right now, as you can do
nonsense to derived widgets already. Thinking about evil actions like
calling gtk_container_remove() on some essential child.

Ciao,
Mathias
-- 
Mathias Hasselmann 
Personal Blog: http://taschenorakel.de/mathias/
Openismus GmbH: http://www.openismus.com/

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Murray Cumming
On Sun, 2009-02-08 at 18:47 +0100, Mathias Hasselmann wrote:
> Am Sonntag, den 08.02.2009, 18:36 +0100 schrieb Murray Cumming:
> > On Sun, 2009-02-08 at 14:51 +0100, Sven Herzberg wrote:
> > > AFAIR, you can flip it of you create a GtkBox/GtkScale, but not if you
> > > create a Gtk[HV]{Box,Scale}... Mitch?
> > 
> > Ah. Were those base classes (GtkBox, etc) instantiable before?
> > 
> > If the base classes can now already do everything then shouldn't the V/H
> > classes be deprecated already?

A deprecation doesn't force people to change anything. It's not (yet) a
removal of the API, though I guess that is planned for the future. It is
a useful hint and it explains the apparent duplication.

> Oh, I hear you volunteer to update the gazillions lines of code in the
> wild refering those classes? ;-)
> 
> I am pretty sure API users would rather switch to Qt, than to follow
> this deprecation.
> 
> Well, actually those V/H classes even serve a purpose: When using them
> in a derived widget you can be sure, that nobody will be that evil to
> suddenly change the orientation of your derived widget.

Apparently that's not true though.

-- 
Murray Cumming
murr...@murrayc.com
www.murrayc.com
www.openismus.com


___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Mathias Hasselmann
Am Sonntag, den 08.02.2009, 18:36 +0100 schrieb Murray Cumming:
> On Sun, 2009-02-08 at 14:51 +0100, Sven Herzberg wrote:
> > AFAIR, you can flip it of you create a GtkBox/GtkScale, but not if you
> > create a Gtk[HV]{Box,Scale}... Mitch?
> 
> Ah. Were those base classes (GtkBox, etc) instantiable before?
> 
> If the base classes can now already do everything then shouldn't the V/H
> classes be deprecated already?

Oh, I hear you volunteer to update the gazillions lines of code in the
wild refering those classes? ;-)

I am pretty sure API users would rather switch to Qt, than to follow
this deprecation.

Well, actually those V/H classes even serve a purpose: When using them
in a derived widget you can be sure, that nobody will be that evil to
suddenly change the orientation of your derived widget.

Ciao,
Mathias
-- 
Mathias Hasselmann 
Personal Blog: http://taschenorakel.de/mathias/
Openismus GmbH: http://www.openismus.com/

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Colomban Wendling
Christian Dywan a écrit :
> This is how the current state is to my awareness:
>
> It is meant to work so that subclasses such a GtkHFoo and GtkVFoo
> behave the same as they used to, and can't flip. However if you use the
> originally abstract base class 'orientation' works as expected, at
> construction as well as runtime.
Hi,

Since all of those widgets implements GtkOrientable, it seems obvious
for me that they can be flipped as any GtkOrientable can, and only
have a default orientation to behave as they used to; and the
documentation says, as I understand, only that the new design is more
flexible that the old now unused one, nothing more.
To be sure, I've tested to flip a GtkHBox with 2.15.4 from SVN, and
yes, it works perfectly.

Regards,
Colomban


___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Murray Cumming
On Sun, 2009-02-08 at 14:51 +0100, Sven Herzberg wrote:
> AFAIR, you can flip it of you create a GtkBox/GtkScale, but not if you
> create a Gtk[HV]{Box,Scale}... Mitch?

Ah. Were those base classes (GtkBox, etc) instantiable before?

If the base classes can now already do everything then shouldn't the V/H
classes be deprecated already?
 
-- 
Murray Cumming
murr...@murrayc.com
www.murrayc.com
www.openismus.com


___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Christian Dywan
Am Sun, 08 Feb 2009 13:07:34 +0100
schrieb Murray Cumming :

> The new GtkOrientable's documentation
> http://library.gnome.org/devel/gtk/unstable/gtk-Orientable.html#gtk-Orientable.description
> says:
> "Historically, such widgets have been realized as subclasses of a
> common base class (e.g GtkBox/GtkHBox/GtkVBox and
> GtkScale/GtkHScale/GtkVScale). GtkOrientable is more flexible in that
> it allows the orientation to be changed at runtime, allowing the
> widgets to 'flip'.
> 
> All those old widgets do now implement GtkOrientation:
> http://library.gnome.org/devel/gtk/unstable/gtk-Orientable.html#gtk-Orientable.implementations
> 
> So can they actully be flipped at runtime now? The documentation seems
> to suggest that they can't if they still use the old common base
> classes.

This is how the current state is to my awareness:

It is meant to work so that subclasses such a GtkHFoo and GtkVFoo
behave the same as they used to, and can't flip. However if you use the
originally abstract base class 'orientation' works as expected, at
construction as well as runtime.

Note that GtkBox is still abstract in trunk although it technically
supports 'orientation' because possible changes in default values of
properties has to be discussed. So you can not use it.

ciao,
Christian
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Hagen Schink
Hi!

On Sun, 08 Feb 2009 14:51:10 +0100
Sven Herzberg  wrote:

> AFAIR, you can flip it of you create a GtkBox/GtkScale, but not if you
> create a Gtk[HV]{Box,Scale}... Mitch?

Gtk[HV]Box sets only the property in init. So it should be possible to change 
the orientation.

In the set_property function of GtkBox a resize is queued when you set the 
orientation which means that you can flip the orientation at runtime. I guess 
it is also possible in Gtk[HV]Box because it inherits the property.

In my animation demo my GtkAnimBox inherits from GtkBox and flipping is done 
only by setting the orientation property.

I hope this helps, have a nice Sunday!

Hagen
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


Re: GtkOrientable: Can widgets now be flipped?

2009-02-08 Thread Sven Herzberg
Am Sonntag, den 08.02.2009, 13:07 +0100 schrieb Murray Cumming:
> The new GtkOrientable's documentation
> http://library.gnome.org/devel/gtk/unstable/gtk-Orientable.html#gtk-Orientable.description
> says:
> "Historically, such widgets have been realized as subclasses of a common
> base class (e.g GtkBox/GtkHBox/GtkVBox and
> GtkScale/GtkHScale/GtkVScale). GtkOrientable is more flexible in that it
> allows the orientation to be changed at runtime, allowing the widgets to
> 'flip'.
> 
> All those old widgets do now implement GtkOrientation:
> http://library.gnome.org/devel/gtk/unstable/gtk-Orientable.html#gtk-Orientable.implementations
> 
> So can they actully be flipped at runtime now? The documentation seems
> to suggest that they can't if they still use the old common base
> classes.

AFAIR, you can flip it of you create a GtkBox/GtkScale, but not if you
create a Gtk[HV]{Box,Scale}... Mitch?

Regards,
  Sven

___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list