Re: Re: portrait to landscape mode (RandR: Rotate and Resize)

From: Edward Muller <edwardam_at_home.com>
Date: Thu, 14 Jun 2001 08:23:13 -0500

On Wednesday 13 June 2001 10:18, Russell Nelson wrote:
> Jim Gettys writes:
> > Glade clearly needs to be able to distinguish between screen
> > configurations. You might need to go from one resolution to the other on
> > the fly, and use a different UI to make it work properly (e.g. iPAQ
> > screen to the much higher resolution on the VGA out card, for example.
>
> Glade has no intrinsic support for screen resolutions. No matter,
> though, because this works nicely:
>
> fn = 'pygps-%dx%d.glade' % (screen_width(), screen_height())
> try:
> os.stat(fn)
> except:
> fn = 'pygps.glade'
> self.widgets = libglade.GladeXML (fn, "pygps")

Again, It's not Glade that needs the support, but Gtk.

self.widgets in your example above is just a dictionary of the Gtk widgets
that glade created.

Off the top of my head, the best (IMHO) thing gtk could do is make a signal
out of the X Event (Jim, what was it called again) that gets sent when the
screen is rotated. This was you can attach a handler to it and deal
appropriatly(sp). In a glade program, for instance, you may actually want to
destroy all of your widgets and load a new glade file, something that is
better optimized for the new display dimensions.....

Again, glade creates Gtk widgets and connects handlers to signals, past that
(AFAIK) it don't do notin much.

-- 
Edward Muller - edwardam_at_home.com - edwardam_at_handhelds.org
The way revolutions are completed is only by the death of the previous 
adherents to the paradigm
Received on Thu Jun 14 2001 - 05:20:32 EDT

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:12:27 EDT