Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to set from and to addresses from other programs #28

Open
hsjpekka opened this issue Feb 29, 2020 · 3 comments
Open

Add possibility to set from and to addresses from other programs #28

hsjpekka opened this issue Feb 29, 2020 · 3 comments

Comments

@hsjpekka
Copy link

I'm working with a calendar patch that lauches web browser to show the calendar event location.
It would be nice to be able to launch jollaopas and copy the location to the destination field.
Perhaps something like Qt.openUrlExternally("reittiopas://from=address1&to=address2") could be used, like in https://unix.stackexchange.com/questions/497146/create-a-custom-url-protocol-handler.
Or does jollaOpas already have something like this?
ConfigurationValue-component perhaps?

@hsjpekka
Copy link
Author

I wrote some code to enable this. If you are interested, I can send a patch-file, or add a branch. But for latter I need write access.
I added a function to read an url given as a command line argument that extracts to- and from-parameters. And added DBusInterface to listen to destinationPointChanged-signal. And there is Show calendar event location -patch, that uses these methods.
Currently Sailfish does not seem to have a d-bus service for sharing addresses, only coordinates.

@hsarkanen
Copy link
Owner

Ok, great, I can test, review and merge it! I would prefer more common Github workflow that you fork this repository under your account and then create pull request to this repository from your fork. You can use this as an example. That way we don’t need to share write access to any repository or send patch files.

@hsjpekka
Copy link
Author

hsjpekka commented Aug 6, 2020

Added a pull request for command line arguments.

The problem with command line arguments is that it works only if JollaOpas is not running already.

D-bus would work with running JollaOpas, but I don't know what service to use. In the JollaOpas, it would require only few lines in addition to the ones in the pull request.

I made a patch to calendar event view page, that added sailfish DBusAdaptor-component and my.location.service-dbus. But that works only if the calendar event view is opened before JollaOpas is started. Otherwise JollaOpas can't find the dbus-service and misses the signals. Thus, some system bus or session bus that is started when a user logs in should be used.

If I have understood correctly org.freedesktop.Geoclue contains coordinates, velocities etc. but not address-field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants