Open *.otwd files in existing OT window
Bug #1536553 reported by
Glotzbach
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenTeacher |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Current behaviour: when there's an OT window open, and I double-click an *.otwd file from my filesystem, a new window is opened.
Expected behaviour: given that OT works with tabs, I'd expect new files get opened in the same window but in a new tab. Especially in the cases where the already open OT window doesn't have a lesson loaded (displaying the 'Create lesson' and 'Load lesson' sections)
Version/System: OT 3.2 on Ubuntu 14.04
I know OT isn't being maintained at the moment, but I'd still like to report issues in case someone takes over the development of this wonderful programme in future :)
To post a comment you must log in.
For the hypothetical person that'll fix this in the future, this is actually surprisingly complex. Some hints:
- The first instance to start should setup some way of IPC server (maybe a socket or similar)
- An instance should check if another instance is active, and if so, should send it's arguments to the other process so it can handle the request, then immeadiately quit.
- This is made more difficult by the modular build up of OpenTeacher. I guess it should be possible to hack it in somewhere in the 'execute' module startup process, though. Although I'm not sure how that module can elegantly tell 'open this file now, please'.
& thanks for reporting!