After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 559572 - [mediakeys] should use the Shutdown dbus-interface provided by gnome-session when handing sleep action
[mediakeys] should use the Shutdown dbus-interface provided by gnome-session ...
Status: RESOLVED DUPLICATE of bug 170175
Product: gnome-settings-daemon
Classification: Core
Component: plugins
unspecified
Other All
: Normal major
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2008-11-06 10:12 UTC by Wang Xin
Modified: 2008-11-07 17:16 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
patch to fix the problem (2.33 KB, patch)
2008-11-06 10:18 UTC, Wang Xin
needs-work Details | Review

Description Wang Xin 2008-11-06 10:12:39 UTC
Currently, keybinding plugin use "apm" and "xset dpms force off" to handle sleep action. It's not portable. And gnome-session provides a Shutdown interface which will show a dialog with "Shutdown", "Suspend", "Restart" button. The plugin should use this interface to handle sleep action.
Comment 1 Wang Xin 2008-11-06 10:14:52 UTC
Sorry, a mistake. The plugin is media-keys plugin not keybinging plugin.
Comment 2 Wang Xin 2008-11-06 10:18:18 UTC
Created attachment 122082 [details] [review]
patch to fix the problem

Call Shutdown interface provided by gnome-session in do_sleep_action.
Comment 3 Jens Granseuer 2008-11-06 17:57:29 UTC
Thanks for the patch.

However, calling Shutdown on sleep/suspend is wrong. The user doesn't want to shut down/log out, but suspend his system. I don't know if gnome-session provides a means to do that directly, but moving straight to "System will shut down in 60 seconds" is bad.

*** This bug has been marked as a duplicate of 170175 ***
Comment 4 Wang Xin 2008-11-07 03:24:45 UTC
Hi Jens,

Moving to "System will shutdown in 60 seconds" is bad. But there have to be a way for users to confirm they really want to suspend the system. What do you think if we can remove the "System will shutdown in 60 seconds" feature from gnome-session. Or even more, just showing "Suspend" button in the dialog.
Comment 5 Jens Granseuer 2008-11-07 17:16:01 UTC
I don't think it can be removed. We'd still need it for shutdown.