Dnia 09-07-2005, sob o godzinie 15:34 +0200, The Saltydog napisaĆ: > > This error means you don't have any mainloop running that could be > > stopped. Seems like you're running gtk_main_quit() too many times, you > > should rather exit the process (via exit() or return from main()). > > It is due to the fact that I am running a time-demanding deep routine > in main before executing gtk-main. Then, from the routine I am > executing > > while (gtk_events_pending()) { gtk_main_iteration(); } > > so that the GUI comes up. But at that point, if I click on exit > (gtk-main-quit()) before the subroutine has ended, I got the main-loop > eror.
Then, if you are running it before main loop is setup, you can't call gtk_main_quit(). I'd suggest you first run your subroutine, only after it has finished setup callbacks which can invoke gtk_main_quit(), and then run proper mainloop. And yes, setting things up so that quit can happen cleanly even while in subroutine can be pretty painful, you may need to play around with deferred function invocation and such to get rid of warnings. Cheers, Maciej -- Being really good at C++ is like being really good at using rocks to sharpen sticks. (Thant Tessman) -------- Maciej Katafiasz <[EMAIL PROTECTED]> http://mathrick.org _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list