diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-12 14:06:37 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-12 14:06:37 -0600 |
commit | bbae7554f1dcb98d94bd73ec9bce07f0e99e21d0 (patch) | |
tree | 608abf6c3e5d78f3deb9357d9a91b4b61b85cc59 | |
parent | 261c0e1f6b9a69442520936ef7f91e1eac9f9514 (diff) | |
download | tdebase-bbae7554f1dcb98d94bd73ec9bce07f0e99e21d0.tar.gz tdebase-bbae7554f1dcb98d94bd73ec9bce07f0e99e21d0.zip |
Add keyboard shortcut to start screensaver directly
-rw-r--r-- | kcontrol/keys/trinity.kksrc | 1 | ||||
-rw-r--r-- | kdesktop/kdesktopbindings.cpp | 6 | ||||
-rw-r--r-- | kdesktop/krootwm.cc | 5 | ||||
-rw-r--r-- | kdesktop/krootwm.h | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/kcontrol/keys/trinity.kksrc b/kcontrol/keys/trinity.kksrc index 4971e5194..57681b60f 100644 --- a/kcontrol/keys/trinity.kksrc +++ b/kcontrol/keys/trinity.kksrc @@ -85,6 +85,7 @@ Reboot without Confirmation=none Show Klipper Popup-Menu=Alt+Ctrl+V Show Taskmanager=Ctrl+Escape Show Window List=Alt+F5 +Start Screen Saver=Alt+Ctrl+S Switch One Desktop Down=none Switch One Desktop to the Left=none Switch One Desktop to the Right=none diff --git a/kdesktop/kdesktopbindings.cpp b/kdesktop/kdesktopbindings.cpp index ad166aab4..86dea3466 100644 --- a/kdesktop/kdesktopbindings.cpp +++ b/kdesktop/kdesktopbindings.cpp @@ -31,6 +31,12 @@ DEF2( I18N_NOOP("Lock Session"), ALT+CTRL+Qt::Key_L, WIN+Qt::Key_ScrollLock, KRootWm::self(), TQT_SLOT(slotLock()) ); #ifndef NOSLOTS } + if (kapp->authorize("start_screensaver")) + { +#endif + DEF2( I18N_NOOP("Start Screen Saver"), ALT+CTRL+Qt::Key_S, WIN+Qt::Key_S, KRootWm::self(), TQT_SLOT(slotSave()) ); +#ifndef NOSLOTS + } if (kapp->authorize("logout")) { #endif diff --git a/kdesktop/krootwm.cc b/kdesktop/krootwm.cc index 872c5560b..90b4ebd66 100644 --- a/kdesktop/krootwm.cc +++ b/kdesktop/krootwm.cc @@ -824,6 +824,11 @@ void KRootWm::slotLock() { } +void KRootWm::slotSave() { + kapp->dcopClient()->send(kdesktop_name, "KScreensaverIface", "save()", TQString("")); +} + + void KRootWm::slotLogout() { m_pDesktop->logout(KApplication::ShutdownConfirmDefault, KApplication::ShutdownTypeDefault); } diff --git a/kdesktop/krootwm.h b/kdesktop/krootwm.h index 007da9bf3..5bccc36c0 100644 --- a/kdesktop/krootwm.h +++ b/kdesktop/krootwm.h @@ -115,6 +115,7 @@ public slots: void slotWindowList(); void slotLock(); void slotLogout(); + void slotSave(); void slotSwitchUser(); void slotPopulateSessions(); void slotSessionActivated( int ); |