diff options
author | Denis Kozadaev <denis@dilos.org> | 2023-06-06 21:15:57 +0300 |
---|---|---|
committer | Denis Kozadaev <denis@dilos.org> | 2023-06-20 11:17:21 +0300 |
commit | 3c23abfd84440d769bc20707e04cb356ddb48c1a (patch) | |
tree | 183d393557f700ae20f7121ec4b5a9da4c9e8e13 /kcontrol | |
parent | dc8852cc1d6b347fe4681ef24f31732c6d96bb8b (diff) | |
download | tdebase-3c23abfd84440d769bc20707e04cb356ddb48c1a.tar.gz tdebase-3c23abfd84440d769bc20707e04cb356ddb48c1a.zip |
Find power related system tools instead of hardcode them
Signed-off-by: Denis Kozadaev <denis@dilos.org>
Diffstat (limited to 'kcontrol')
-rw-r--r-- | kcontrol/tdm/tdm-shut.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/kcontrol/tdm/tdm-shut.cpp b/kcontrol/tdm/tdm-shut.cpp index 14e681d18..da120ae4c 100644 --- a/kcontrol/tdm/tdm-shut.cpp +++ b/kcontrol/tdm/tdm-shut.cpp @@ -17,6 +17,8 @@ Boston, MA 02110-1301, USA. */ +#include "config.h" + #include <unistd.h> #include <sys/types.h> @@ -91,7 +93,7 @@ TDMSessionsWidget::TDMSessionsWidget(TQWidget *parent, const char *name) bm_combo = new KBackedComboBox( group4 ); bm_combo->insertItem("None", i18n("boot manager", "None")); bm_combo->insertItem("Grub", i18n("Grub")); -#if defined(__linux__) && ( defined(__i386__) || defined(__amd64__) ) +#if defined(Q_OS_LINUX) && ( defined(__i386__) || defined(__amd64__) ) bm_combo->insertItem("Lilo", i18n("Lilo")); #endif TQLabel *bm_label = new TQLabel( bm_combo, i18n("Boot manager:"), group4 ); @@ -208,12 +210,8 @@ void TDMSessionsWidget::load() readSD(sdrcombo, "Root"); config->setGroup("Shutdown"); - restart_lined->setURL(config->readEntry("RebootCmd", "/sbin/reboot")); -#if defined(__OpenBSD__) - shutdown_lined->setURL(config->readEntry("HaltCmd", "/sbin/halt -p")); -#else - shutdown_lined->setURL(config->readEntry("HaltCmd", "/sbin/poweroff")); -#endif + restart_lined->setURL(config->readEntry("RebootCmd", REBOOT_BINARY)); + shutdown_lined->setURL(config->readEntry("HaltCmd", POWEROFF_BINARY)); bm_combo->setCurrentId(config->readEntry("BootManager", "None")); } @@ -222,8 +220,8 @@ void TDMSessionsWidget::load() void TDMSessionsWidget::defaults() { - restart_lined->setURL("/sbin/reboot"); - shutdown_lined->setURL("/sbin/poweroff"); + restart_lined->setURL(REBOOT_BINARY); + shutdown_lined->setURL(POWEROFF_BINARY); sdlcombo->setCurrentItem(SdAll); sdrcombo->setCurrentItem(SdRoot); |