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

From: Edward Muller <edwardam_at_home.com>
Date: Thu, 14 Jun 2001 11:28:40 -0500

On Thursday 14 June 2001 09:17, Russell Nelson wrote:
> Edward Muller writes:
> > On Wednesday 13 June 2001 10:18, Russell Nelson wrote:
> > > Glade has no intrinsic support for screen resolutions. No matter,
> > > though, because this works nicely:
> >
> > Again, It's not Glade that needs the support, but Gtk.
>
> Look at the pygps glade files. The widgets are laid out differently
> for the existing three screen resolutions. For portrait, I have a
> notebook with the tabs on the top. For landscape, I have a notebook
> with the tabs on the left. And for humongo (768x1024) I don't bother
> with the notebook, but instead have everything laid out in a table.
>

Yes, but those are different glade files. Aren't they? (Sorry I didn't look).

My guess is that the ConfigureNotify X event (or whatever it is called) needs
to be built into gtk. Then if Gtk emits a signal when the X Event is
triggered you could put together a handler that would destroy all of the
existing widgets and then tell libglade to load a new file and create a new
set of widgets. The handler can then do anything application specific to get
things moving along again (special variables, etc.) and you are off.

I don't think putting support for RandR directly into glade is the right
thing. Glade's purpose is to create a gui based on an XML file, nothing more.
Once the gui is created the rest is in the scope of the gui toolkit.

> > 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.....
>
> Yep.
>
> > Again, glade creates Gtk widgets and connects handlers to signals, past
> > that (AFAIK) it don't do notin much.
>
> Yep. I don't know from all this "ConfigureNotify on the root window"
> thing. My X knowledge is very limited. If somebody can tell me how
> to do it in pygtk, I'll be a very happy camper.

It isn't possible yet AFAIK, until gtk can deal with the RandR stuff. Then we
need a new release of pygtk (if there is anything added/changed in the gtk
interfaces).

We'll probably see this for the Gtk 2.0 release, not before unless people
like jg and keithp take a personal interest. (Hint, Hint) :-)

-- 
Edward Muller - edwardam_at_home.com - edwardam_at_handhelds.org
If ignorance is bliss, 'tis folly to be wise.
Received on Thu Jun 14 2001 - 08:26:00 EDT

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