summaryrefslogtreecommitdiffstats
path: root/tdesu
diff options
context:
space:
mode:
authorDarrell Anderson <humanreadable@yahoo.com>2013-11-20 21:49:48 +0100
committerSlávek Banko <slavek.banko@axis.cz>2013-11-21 01:10:56 +0100
commit266a2501dfc0b0c22b861bbb63db5be6ae0dd21a (patch)
tree80db18f808fe4d8a8c0e629bba6924064f7ed52f /tdesu
parent66eb95504294c475eda706c8e3f6701c4cdc640e (diff)
downloadtdebase-266a2501dfc0b0c22b861bbb63db5be6ae0dd21a.tar.gz
tdebase-266a2501dfc0b0c22b861bbb63db5be6ae0dd21a.zip
Restore Ignore button in tdesu, but set default to not showing
This relates to Bug 985
Diffstat (limited to 'tdesu')
-rw-r--r--tdesu/tdesu/sudlg.cpp29
-rw-r--r--tdesu/tdesu/tdesu.cpp2
2 files changed, 23 insertions, 8 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);
diff --git a/tdesu/tdesu/tdesu.cpp b/tdesu/tdesu/tdesu.cpp
index eb1cbdcf8..47673e2b8 100644
--- a/tdesu/tdesu/tdesu.cpp
+++ b/tdesu/tdesu/tdesu.cpp
@@ -64,7 +64,7 @@ static TDECmdLineOptions options[] = {
{ "r", I18N_NOOP("Use realtime scheduling"), 0 },
{ "nonewdcop", I18N_NOOP("Let command use existing dcopserver"), 0 },
{ "comment <comment>", I18N_NOOP("Ignored"), "" },
- { "noignorebutton", I18N_NOOP("Do not display ignore button"), 0 },
+ { "ignorebutton", I18N_NOOP("Display the ignore button"), 0 },
{ "i <icon name>", I18N_NOOP("Specify icon to use in the password dialog"), 0},
{ "d", I18N_NOOP("Do not show the command to be run in the dialog"), 0},
TDECmdLineLastOption