elementary / docs

Documentation for 3rd-party app development
https://docs.elementary.io
78 stars 31 forks source link

Actions and launchers #182

Closed Antolius closed 2 years ago

Antolius commented 2 years ago

Resolve #180 Resolve #179

I did several things here:

  1. Explain how to enable DBus activation for an app (Launchers page)
  2. Explain how to declare launching actions (Launchers page)
  3. Add reference to launching actions (Actions page)
  4. Update examples to register action fro the startup method (both Actions and Launchers pages)

As discussed in the comments on the #180 issue, I think this is a minimum change which makes sense. We can't really leave any of these steps out and end up with a working app.

An alternative approach I considered was moving parts of this documentation, adding some more stuff and creating a new Application lifecycle page. This new page could include discussion of DBus activation and differences between startup, activate and open signals. Perhaps we could also include a section on opening files, defining new file types and registering the app as default handler for those. But all that seemed to be too much scope for the 2 issues that I was trying to solve. So I gave up on the Application lifecycle page approach and limited the changes to existing Launchers and Actions pages. If that approach sounds interesting I can try scoping it a bit and open a dedicate issue for the Application lifecycle page.

Antolius commented 2 years ago

I also opened a mini pull-request to the examples repo in the vala-lang org.

Antolius commented 2 years ago

Thanks again for tackling this! I have a few inline comments and then we'll want to update this to match the example code PR too

I updated the PR according to comments and rebased it with the master branch. I resolved the conversations in cases where I think I addressed the issue (I hope that's OK 😅️).

Antolius commented 2 years ago

I'll close this PR in favor of #184 and #185. :tada: