Re: catching main window/app exit



http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Widget.html#6b266f24d662c145fa301ca0bd011716
http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Widget.html#a97a4453ec12f7fce163353c2bcaf580

http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#GtkWidget-delete-event

"The ::delete-event signal is emitted if a user requests that a toplevel window is closed. The default handler for this signal destroys the window. [...]"

HTH (?)

Milosz

On 7/17/07, Grizzly(Francis Smit) <grizzly smit id au > wrote:
Jonathon Jongsma wrote:
> On 7/16/07, Grizzly(Francis Smit) < grizzly smit id au> wrote:
>
>> hi list
>> could some one please tell me what signal to
>> connect to, to catch a window before it closes
>> I want to do some cleaning up before my app
>> closes, but if they click the cross on the main
>> window the app just exits, I've tried overriding
>> the destructor of my window class but that
>> doesn't work.
>>

<snip>
>
> handle the delete event on the window
>
>

I've just tried that but the compiler says:

/home/grizzlysmit/Projects/gtk-editor/src/main-win.cpp:129: error:
'class MainWin' has no member named 'signal_delete'

I derive MainWin from Gtk::Window  as follows:

class MainWin: public Gtk::Window
{
   .
   :
}



--
  In my life God comes first.... but Linux is pretty high after that :-D
Grizzly(Francis Smit)
http://www.geekcode.com/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/P/PA d- s+:+> a+>? C++++ UL++++@ P+ L+++ E--- W+++ N+(++) K w--- M-- V-- PS(+) PE(-) Y+(++) PGP++ t+(++) 5 X- R- tv b+++(++++) DI(--) D G e++(+++) h-- r- y-
------END GEEK CODE BLOCK------


_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]