saving window size?

2009-01-20 Thread Dr. Michael J. Chudobiak
Hi all, Suppose I have an app, and I would like to save the window size when when quitting. This is easy to do if the user selects File-Quit, but what if they click window-close? By the time you get the destroy signal, the true width/height values are gone. (You seem to get the default

Re: saving window size?

2009-01-20 Thread Alexander Semenov
Look at GtkWidget::delete_event signal. On Tue, 2009-01-20 at 09:26 -0500, Dr. Michael J. Chudobiak wrote: Hi all, Suppose I have an app, and I would like to save the window size when when quitting. This is easy to do if the user selects File-Quit, but what if they click window-close?

Re: saving window size?

2009-01-20 Thread Tadej Borovšak
Hello. I think you need to save your window's size from within the delete-event callback. Docs: http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget-delete-event 2009/1/20 Dr. Michael J. Chudobiak m...@avtechpulse.com: Hi all, Suppose I have an app, and I would like to save the

Re: saving window size?

2009-01-20 Thread Dr. Michael J. Chudobiak
Tadej Borovšak wrote: I think you need to save your window's size from within the delete-event callback. Docs: http://library.gnome.org/devel/gtk/stable/GtkWidget.html#GtkWidget-delete-event Thanks! That did the trick. - Mike ___ gtk-app-devel-list

Re: saving window size?

2009-01-20 Thread Emmanuele Bassi
On Tue, 2009-01-20 at 09:26 -0500, Dr. Michael J. Chudobiak wrote: Hi all, Suppose I have an app, and I would like to save the window size when when quitting. This is easy to do if the user selects File-Quit, but what if they click window-close? By the time you get the destroy signal,

Re: saving window size?

2009-01-20 Thread Dr. Michael J. Chudobiak
don't *ever* use GConf to store the window size. it's *not* a user preference, and the GConf can very well be not writable. use a file inside a directory like the user cache directory as established by the XDG base dir specification. Hmm. Could you expand on this (or point me to the docs that

Re: saving window size?

2009-01-20 Thread Emmanuele Bassi
On Tue, 2009-01-20 at 10:29 -0500, Dr. Michael J. Chudobiak wrote: don't *ever* use GConf to store the window size. it's *not* a user preference, and the GConf can very well be not writable. use a file inside a directory like the user cache directory as established by the XDG base dir