cancel gtk_main_quit and return to the main window


sorry for the may be trivial question, but I'm sure someone could tell me
the right way to go, finding the answer.

I'm not new to perl or c/c++ and I have tried earlier gtk and gtk++, but now
for first time I've written an almost complete application in gtk + perl. I
did some design in glade and load the widgets with GladeXML.
It was very appreciated exercise but I came to a point where I don't know
what to do.

when I close the app I check if data has been modified, if so a a window
shows up and asks [save|cancel|quit].

if [save]   then the program writes data and exits
if [cancel] then the main window is shown
if [quit]   then the app quits

So running _Quit from the menu works as expected but the problem is when I
click the window close button and click cancel afterwords. The widgets are
destroyed so empty gray box appears.

The question is how can I "cancel" the gtk_main_quit when data is not saved
and I want to return to main window?

how can I prevent the destruction of the widgets?

thanks in advance and regards

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