summaryrefslogtreecommitdiffstats
path: root/tdesu/tdesu/sudlg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdesu/tdesu/sudlg.cpp')
-rw-r--r--tdesu/tdesu/sudlg.cpp29
1 files changed, 22 insertions, 7 deletions
diff --git a/tdesu/tdesu/sudlg.cpp b/tdesu/tdesu/sudlg.cpp
index e24bf325e..4ecf0cc1a 100644
--- a/tdesu/tdesu/sudlg.cpp
+++ b/tdesu/tdesu/sudlg.cpp
@@ -15,7 +15,7 @@
#include "sudlg.h"
KDEsuDialog::KDEsuDialog(TQCString user, TQCString auth_user, bool enableKeep,const TQString& icon, bool withIgnoreButton, int timeout)
- : KPasswordDialog(Password, enableKeep, 0, icon)
+ : KPasswordDialog(Password, enableKeep, (withIgnoreButton ? User1:NoDefault), icon)
{
TDEConfig* config = TDEGlobal::config();
config->setGroup("super-user-command");
@@ -32,12 +32,27 @@ KDEsuDialog::KDEsuDialog(TQCString user, TQCString auth_user, bool enableKeep,co
if (superUserCommand == "sudo" && m_User == "root") {
prompt = i18n("Please enter your password." );
} else {
- if (m_User == "root") {
- prompt = i18n("The action you requested needs root privileges. "
- "Please enter root's password below.");
- } else {
- prompt = i18n("The action you requested needs additional privileges. "
- "Please enter the password for \"%1\" below.").arg(static_cast<const char *>(m_User));
+ if (withIgnoreButton) {
+ if (m_User == "root") {
+ prompt = i18n("The action you requested needs root privileges. "
+ "Please enter root's password below or click "
+ "Ignore to continue with your current privileges.");
+ }
+ else {
+ prompt = i18n("The action you requested needs additional privileges. "
+ "Please enter the password for \"%1\" below or click "
+ "Ignore to continue with your current privileges.").arg(static_cast<const char *>(m_User));
+ }
+ }
+ else {
+ if (m_User == "root") {
+ prompt = i18n("The action you requested needs root privileges. "
+ "Please enter root's password below.");
+ }
+ else {
+ prompt = i18n("The action you requested needs additional privileges. "
+ "Please enter the password for \"%1\" below.").arg(static_cast<const char *>(m_User));
+ }
}
}
setPrompt(prompt);