-
-
Notifications
You must be signed in to change notification settings - Fork 118
Enable DBus Activation #1694
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
base: master
Are you sure you want to change the base?
Enable DBus Activation #1694
Changes from 2 commits
47b0572
5258178
fe9945c
9a4729a
3424188
4c19841
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [D-BUS Service] | ||
| Name=io.elementary.code | ||
| Exec=@BINDIR@/io.elementary.code --gapplication-service |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,17 +1,21 @@ | ||||||||||||
| [Desktop Entry] | ||||||||||||
| Type=Application | ||||||||||||
|
|
||||||||||||
| Name=@NAME@ | ||||||||||||
| Comment=Edit code files | ||||||||||||
| GenericName=Code Editor | ||||||||||||
| Exec=@EXEC_NAME@ %U | ||||||||||||
| Icon=io.elementary.code | ||||||||||||
| Terminal=false | ||||||||||||
| Categories=Development;GTK;IDE;WebDevelopment; | ||||||||||||
| Keywords=text;IDE;scratch;code; | ||||||||||||
| MimeType=text/plain;inode/directory; | ||||||||||||
| StartupNotify=true | ||||||||||||
| Actions=NewWindow;NewFile; | ||||||||||||
|
|
||||||||||||
| Icon=io.elementary.code | ||||||||||||
| Exec=@EXEC_NAME@ %U | ||||||||||||
| DBusActivatable=true | ||||||||||||
| SingleMainWindow=true | ||||||||||||
| StartupNotify=true | ||||||||||||
| Terminal=false | ||||||||||||
|
|
||||||||||||
| [Desktop Action NewFile] | ||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something else kind of big we forgot! If we're using DBus Activation we also have to make sure that the actions in our desktop file match application actions in Code. Reference here: https://docs.elementary.io/develop/apis/launchers#d-bus-activation So for this one we need to change this to:
Suggested change
And then make sure there's an action named
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the clarification! After reading the documentation, I have a few questions in order to properly implement the changes:
code/src/FolderManager/FileView.vala Line 33 in d683394
Line 42 in d683394
Thanks in advance for your help! :)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes so the names of both actions in the desktop file need to change so that they match the name of It looks like the current behavior for the NewTab entry is that it activates For NewWindow, it does What's in Application right now are these option entries but with DBus Activation we need |
||||||||||||
| Name=New File | ||||||||||||
| Exec=@EXEC_NAME@ --new-tab | ||||||||||||
|
|
||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -30,6 +30,7 @@ install_data( | |||||
| ) | ||||||
|
|
||||||
| config_data = configuration_data() | ||||||
| config_data.set('BINDIR', get_option('bindir')) | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this needs to also include prefix. Otherwise we get
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Already solved, thanks! :) |
||||||
| config_data.set('EXEC_NAME', meson.project_name()) | ||||||
|
|
||||||
| if (branch != '') | ||||||
|
|
@@ -38,6 +39,14 @@ else | |||||
| config_data.set('NAME', 'Code') | ||||||
| endif | ||||||
|
|
||||||
| configure_file( | ||||||
| input: 'code.service.in', | ||||||
| output: meson.project_name() + '.service', | ||||||
| configuration: config_data, | ||||||
| install_dir: get_option('datadir') / 'dbus-1' / 'services', | ||||||
| install: true | ||||||
| ) | ||||||
|
|
||||||
| # Set the executable name and translate the desktop files | ||||||
| desktop_in_file = configure_file( | ||||||
| input: 'io.elementary.code.desktop.in.in', | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.