summaryrefslogtreecommitdiffstats
path: root/kcontrol/tdm/tdm-shut.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/tdm/tdm-shut.cpp')
-rw-r--r--kcontrol/tdm/tdm-shut.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/kcontrol/tdm/tdm-shut.cpp b/kcontrol/tdm/tdm-shut.cpp
index 14e681d18..6d6ed8cd7 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>
@@ -52,13 +54,13 @@ TDMSessionsWidget::TDMSessionsWidget(TQWidget *parent, const char *name)
sdlcombo->insertItem(i18n("Everybody"), SdAll);
sdlcombo->insertItem(i18n("Only Root"), SdRoot);
sdlcombo->insertItem(i18n("Nobody"), SdNone);
- connect(sdlcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(sdlcombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
sdrcombo = new TQComboBox( FALSE, group0 );
sdrlabel = new TQLabel (sdrcombo, i18n ("&Remote:"), group0);
sdrcombo->insertItem(i18n("Everybody"), SdAll);
sdrcombo->insertItem(i18n("Only Root"), SdRoot);
sdrcombo->insertItem(i18n("Nobody"), SdNone);
- connect(sdrcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(sdrcombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
TQWhatsThis::add( group0, i18n("Here you can select who is allowed to shutdown"
" the computer using TDM. You can specify different values for local (console) and remote displays. "
"Possible values are:<ul>"
@@ -71,16 +73,16 @@ TDMSessionsWidget::TDMSessionsWidget(TQWidget *parent, const char *name)
shutdown_lined = new KURLRequester(group1);
TQLabel *shutdown_label = new TQLabel(shutdown_lined, i18n("H&alt:"), group1);
- connect(shutdown_lined, TQT_SIGNAL(textChanged(const TQString&)),
- TQT_SLOT(changed()));
+ connect(shutdown_lined, TQ_SIGNAL(textChanged(const TQString&)),
+ TQ_SLOT(changed()));
wtstr = i18n("Command to initiate the system halt. Typical value: /sbin/halt");
TQWhatsThis::add( shutdown_label, wtstr );
TQWhatsThis::add( shutdown_lined, wtstr );
restart_lined = new KURLRequester(group1);
TQLabel *restart_label = new TQLabel(restart_lined, i18n("Reb&oot:"), group1);
- connect(restart_lined, TQT_SIGNAL(textChanged(const TQString&)),
- TQT_SLOT(changed()));
+ connect(restart_lined, TQ_SIGNAL(textChanged(const TQString&)),
+ TQ_SLOT(changed()));
wtstr = i18n("Command to initiate the system reboot. Typical value: /sbin/reboot");
TQWhatsThis::add( restart_label, wtstr );
TQWhatsThis::add( restart_lined, wtstr );
@@ -91,17 +93,17 @@ 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 );
- connect(bm_combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(bm_combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
wtstr = i18n("Enable boot options in the \"Shutdown...\" dialog.");
TQWhatsThis::add( bm_label, wtstr );
TQWhatsThis::add( bm_combo, wtstr );
tsbox = new TQCheckBox( i18n("Restart X-Server with session exit"), this );
- connect( tsbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()) );
+ connect( tsbox, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()) );
wtstr = i18n("Whether the login manager should restart the local X-Server after a session exit instead of resetting. Use this option when the X-Server leaks memory, crashes the system on reset attempts, or otherwise exhibits display issues or artifacts.");
TQWhatsThis::add( tsbox, wtstr );
@@ -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);