I figured out my own issue. Well, sort of anyway. In order to fix it I removed the MainWindow class that overrode Gtk.Window. I moved the code that would have been there back to my BalisticaApplication class. Now it works.
https://github.com/steveno/balistica/commit/0a11c5e1610acce2a7294b2865ec115caac31261 Steven N. Oliver On Tue, Dec 3, 2013 at 5:31 PM, Andrew Benton <[email protected]>wrote: > As a quick fix, you could replace the gtk_main_quit function with another > function that has the same signature, but contains the exit method, which > will be sure to bump you out of the program. Just be sure to declare the > exit method in your file. > > extern void exit(int exit_code); > > void quit() > { > exit(0); > > } > > On 12/3/2013 5:24 PM, Steven Oliver wrote: > >> Evan, >> My apologies for apparently not clearly stating the issue. Here's try >> number 2: >> 1) Run the program. >> 2) Close the GUI that pops up >> 3) The GUI goes away as expected but the process is still running in my >> terminal >> >> As for you suggestion, I already have that line in my code. Line 54 of >> MainWindow.vala. >> >> Andrea, >> Good guess! I hadn't actually tried that one. That didn't fix it though :( >> I'm now left with the process still there but now with the following error >> message: >> >> (balistica:2473): Gtk-CRITICAL **: gtk_main_quit: assertion `main_loops != >> NULL' failed >> >> >> >> >> Steven N. Oliver >> >> >> On Tue, Dec 3, 2013 at 2:22 PM, Evan Nemerson <[email protected]> >> wrote: >> >> On Tue, 2013-12-03 at 13:31 -0500, Steven Oliver wrote: >>> >>>> For the past year or so off and on I've been working on a pet project. >>>> Between the time spent rewriting various parts of it over and over, and >>>> trying to learn Vala/GTK, it's taking me a lot longer than I hoped it >>>> >>> would. >>> >>>> Anyway, here is my project on Github: >>>> https://github.com/steveno/balistica >>>> >>>> While I'm sure there are plenty of improvements that can be made >>>> (patches >>>> welcome!) I have one problem that's been driving me crazy for a while >>>> now >>>> and I'm desperate for help now to solve it. I assume the problem has to >>>> >>> be >>> >>>> in src/BalisticaApplication.vala or src/MainWindow.vala. >>>> >>>> If anyone is willing to offer any suggestions I'd greatly appreciate it! >>>> >>> You didn't really describe the symptoms (in fact, you didn't even >>> mention what the problem was in the body of your e-mail), but it's >>> probably a safe guess that you're not calling Gtk.main_quit(). >>> >>> https://wiki.gnome.org/Projects/Vala/GTKSample has some examples. For >>> the simple cases, people generally just connect it to the main window's >>> destroy signal: >>> >>> window.destroy.connect (Gtk.main_quit); >>> >>> Once you invoke Gtk.main_quit(), your program will resume execution by >>> returning from the Gtk.main() call. >>> >>> >>> -Evan >>> >>> _______________________________________________ >> vala-list mailing list >> [email protected] >> https://mail.gnome.org/mailman/listinfo/vala-list >> > > _______________________________________________ vala-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/vala-list
