Steve wrote: >Precisely the problem! gtk_main() will _never_ return if you just >exit the program with (gtk_)exit()! I suppose one cd explicitly >call the destructor, but that seems a little ugly.
No, that's probably something you really shouldn't do. And your sentence has a mistake in it: the gtk_exit() calls we are talking about here are the ones in SciTEGTK::CheckForRunningInstance(), which are before the start of gtk_main(). I guess you're right about the destructors not being called if we call exit(), though. (I can't test here). The stack looks like: main() -> SciTEGTK::Run() -> -> SciTEGTK::CheckForRunningInstance() So we could replace every occurence of gtk_exit(0) in CheckForRunningInstance() with something like `return TRUE;` We would then check in Run() if the call to CheckForRunning... returned TRUE, and if it did, return from Run() as well. main() would then end correctly, and every destructor would be called. As for the other problem we still have, the dialogs: it's probably possible, or it probably should be, to exit SciTE when a non- modal dialog is shown (like Search). I'll look into this tonight anyway (it's 1pm here in Switzerland, in case you're wondering, I don't know where you guys live). Nicolas _______________________________________________ Scite-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scite-interest
