Change double-click-osz-file behaviour
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
OpenLP | Status tracked in Trunk | |||||
2.0 |
Won't Fix
|
Low
|
Unassigned | |||
Trunk |
Fix Committed
|
Medium
|
Tim Bentley |
Bug Description
With no OpenLP running, double-clicking a file starts the app and loads the service in the osz file.
When double-clicking another file, OpenLP appears to start a 2nd instance and Errors saying "OpenLP is already running. Do you wish to continue?". When clicking No, the 2nd instance aborts. When Yes, the 2nd instance runs.
Can one configure OpenLP to behave like other apps, which don't run 2nd instances but instead pass a msg or signal to the 1st/original instance with the filename to be opened. Then it's down to the 1st instance to behave accordingly.
For example, if OpenLP has a service file open, and one drops a 2nd service file on the app, onto the Service Manager list panel, OpenLP replaces the active service with the newly-dropped file.
My suggestions:
1) That, when a user drops a different service file on the Service Manager list panel, instead of silently [current behaviour] replacing the current service with the dropped service, that OpenLP should prompt "Are you sure you want to replace 'old service filename' (4 items) with 'new service filename' (7 items)" ? Of course, if no service file is currently loaded, then just load the dropped file. If a service is already opened, and modified but not saved, or items added but never saved, then an additional option to "save changes" should be made (which the user could choose to ignore/not save etc).
2) When OpenLP is already running, and a user double-clicks a service file in their file manager of choice, that the 2nd instance of OpenLP that is started sends a signal to the 1st instance, passing the name of the file osz involved in the double-click operation, and that the msg signal/event triggers: 2.1) a focus/bring-
Thoughts?
--d.
Related branches
- Tomas Groth: Approve
-
Diff: 633 lines (+405/-77)8 files modifiedopenlp/.version (+1/-1)
openlp/core/app.py (+21/-25)
openlp/core/common/i18n.py (+1/-1)
openlp/core/server.py (+109/-0)
openlp/core/version.py (+6/-42)
tests/functional/openlp_core/api/http/test_init.py (+151/-0)
tests/functional/openlp_core/test_app.py (+2/-8)
tests/functional/openlp_core/test_server.py (+114/-0)
Confirmed on Windows xp.
It does not make sense to try and start another instance. Perhaps we should just load in the currently running instance.