[pygtk] loading a glade window with user-preferred size and
location
Steve McClure
smcclure at racemi.com
Fri Feb 10 20:47:23 WST 2006
On Fri, 2006-02-10 at 14:49 +1100, John Pye wrote:
> Hi all
>
> The following doesn't seem to work for me unless I switch the
> 'set_default_size' to 'resize'. Is this because of something I'm doing
> with Glade?
>
>
> self.window = glade.get_widget("browserwin")
>
> _display = self.window.get_screen().get_display().get_name()
>
> # my own routine for the previously saved window position....
> _geom=self.prefs.getGeometrySizePosition(_display,"browserwin")
>
> if _geom:
> self.window.set_default_size(_geom[0],_geom[1])
> #self.window.resize(_geom[0],_geom[1])
> self.window.move(_geom[2],_geom[3])
>
>
> The problem with this approach is that the window first shows up at the
> Glade-specified size, then is resized later to the user-preferenced
> default size. So somehow I'm failing to 'set_default_size' before the
> window is first drawn.
>
> Does this mean I can't use Glade to create a user-preference-sized
> window? Is there a better way of doing all this?
Don't set the size in glade?
Set the size and position after the window is realized but before is it
mapped?
>
> Cheers
> JP
>
--
Steve McClure Racemi
email: smcclure at racemi.com 380 Interstate North Pkwy, SE
voice: 404-892-5850 Suite 250
fax: 404-892-7215 Atlanta, GA 30339
http://www.racemi.com
More information about the pygtk
mailing list