[Glade-users] Libglade save/restore root window size?
Tristan Van Berkom
tvb at gnome.org
Thu Oct 4 01:28:00 EDT 2007
On Wed, 2007-10-03 at 22:34 -0500, Kevin R. Bulgrien wrote:
> Does anyone have an idea of how to have a libglade application save the
> window size and then use the save settings the next time the application
> runs? The user should not be prevented from being able to manually
> resize the window smaller or larger, but the user saved sizes should be
> recalled the next time the application is started.
>
> I converted a GTK+ glade project to libglade. The application used to
> be able to save and set the root window size using get_window_coord(),
> gtk_window_move(), and gtk_window_set_default_size ().
>
> Since converting the project to use libglade, restoring the window size
> on application start no longer works, but rather the default size
> defined in the glade file is always used.
>
> Perhaps this has something to do with the fact that the window is
> rendered upon loading the XML file, and this is now done prior to using
> the gtk_window_set_default_size() function.
Hi,
your old code should work fine if left in place, just
use glade_xml_get_widget() at initialization time to store
pointers to the widgets involved, then restore the sizes
after loading the glade file.
Cheers,
-Tristan
More information about the Glade-users
mailing list