-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
GlobalShortcuts: Add a request to configure shortcuts #1661
base: main
Are you sure you want to change the base?
Conversation
145c11a
to
d32ae8f
Compare
8a6f3b1
to
3fa1731
Compare
Seems like a useful addition. Just a few details to iron out, but I'd also like to have an implementation before we merge this. |
As mentioned on Matrix this allows an application to steer their users to the place where they can configure global shortcutcs of the application. Signed-off-by: David Redondo <[email protected]>
3fa1731
to
0b255f4
Compare
implementation of what? I did a backend impl, see the description |
I missed that this already has a backend impl. |
g_variant_builder_end (&options_builder), | ||
NULL, | ||
shortcuts_configure_cb, | ||
invocation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to keep the invocation alive, so g_object_ref
here, and assign to an autoptr (or otherwise unref at the end) in shortcuts_configure_cb
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the issues resolved this all LGTM.
{ | ||
g_dbus_error_strip_remote_error (error); | ||
g_warning ("Failed to configure shortcuts: %s", error->message); | ||
g_dbus_method_invocation_return_gerror(invocation, error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
g_dbus_method_invocation_return_gerror(invocation, error); | |
g_dbus_method_invocation_return_gerror (invocation, error); |
return; | ||
} | ||
|
||
xdp_dbus_global_shortcuts_complete_configure_shortcuts(XDP_DBUS_GLOBAL_SHORTCUTS(global_shortcuts), invocation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xdp_dbus_global_shortcuts_complete_configure_shortcuts(XDP_DBUS_GLOBAL_SHORTCUTS(global_shortcuts), invocation); | |
xdp_dbus_global_shortcuts_complete_configure_shortcuts (XDP_DBUS_GLOBAL_SHORTCUTS (global_shortcuts), invocation); |
As mentioned on Matrix this allows an application to steer their users to the place where they can configure global shortcutcs of the application.
kde portal impl: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/a8b7532e33d98bdaf034a92c624bc63adaceec5c
client side impl in ashpd: Sodivad/ashpd@21be0f5