apocalyptech / eschalon_utils

Eschalon Books I, II, and III Character and Map Editors
http://apocalyptech.com/eschalon/
GNU General Public License v2.0
8 stars 3 forks source link

Launcher does not stay open. #42

Closed raverdave2k closed 6 years ago

raverdave2k commented 10 years ago

I've only just realised there was a launcher included with the editors and as of now I'll be using it as my starting point.

The only negative (an this is purely personal preference rather than an issue) is that it closes once you open one of the editors rather than staying open.

I've managed to stop this happening by removing the following two lines from under the Character Button and Map Button sections of eschalon_utils.py (Lines 67 & 69 and 78 & 80)

#button.connect_object("clicked", gtk.Widget.hide, self.window)
#button.connect_object("clicked", gtk.Widget.destroy, self.window)

Obviously other people might have a different opinion and prefer it close so I don't really know if it's something that should be changed, unless perhaps you can add a tick box to the window to toggle this behaviour on and off?

apocalyptech commented 10 years ago

Yeah, a checkbox sounds like a good idea - I'll get that in place before this gets officially released.

And you didn't really miss anything by not having noticed the launcher... That's new since the last official release, and until yesterday wasn't even built into an EXE for the Windows version. :)

elliotkendall commented 10 years ago

Literally the only goal of the launcher was to reduce the size of the OS X distribution. Since multiple .app files won't share the (large) number of libraries necessary to run, distributing one file versus six makes a huge difference. You may also notice that it's a hack job and not using the same glade config as all the other GUI elements.

apocalyptech commented 10 years ago

Yeah, I'd noticed you added it in for OSX... I think it'd be pretty nice to have for other platforms too, though. Specifically it solves the issue I've always been slightly annoyed with on the Windows installer, 'cause there's the checkbox at the end to "Launch Book 1 Character Editor?" which would be a strange default nowadays. I've prettied it up a bit since your initial revision, too.

In re: glade, specifically, I've actually got a tolerate/hate relationship with glade, and I've long wanted to totally get rid of it in the project, in favor of building with Python directly. That'll probably never actually happen - it's too convenient, what with the larger GUI elements already laid out nicely in there - but as I've had to make major revisions to various dialogs, I've been slowly pulling things out of there. So having the launcher not use Glade either is fine by me. :)

apocalyptech commented 10 years ago

Actually, FYI, the leave-open-after-launch functionality might end up on hold... The only real way I can see to do that cleanly (and not having various apps sharing the same memory space, which would probably be a nightmare to get isolated properly) would be to actually fork the process before launching the selected editor, but then we'd have to deal with the fact that the forked process is still in the middle of the parent's gtk mainloop, which I suspect would be its own bundle of trouble. I'll look around a little bit and see if I'm wrong about that, but if that's the case then I'm unlikely to prioritize it.

Of course, we could instead basically subclass the launcher to work differently for Windows and actually launch the selected editor. Right now it just runs the stuff in-process (to save executable space on OSX, as mentioned above), but on Windows you'd be building that stuff anyway.

Still, even that probably wouldn't make it into 1.0. Anyway, we'll leave this open and see where it goes.

elliotkendall commented 10 years ago

I'm personally not sold on the idea of keeping the launcher open after starting an editor, anyway, and the complications involved definitely don't seem worth the effort.

raverdave2k commented 10 years ago

In light of the extra effort mentioned I'm happy if you want to close this one, if I find it bothering me in future I can always re-employee the manual fix I mentioned.

apocalyptech commented 10 years ago

Nah, I'll be looking into it for maybe a 1.0.1 release or the like. I do like the idea, just didn't want to rush into it is all.

grimreaper commented 6 years ago

I've changed the way the launcher works and will not likely implement stay-open behavior. Instead something closer to a menu bar "select book" is more likely to be used.