|
Lines 15-21
Link Here
|
| 15 |
#include "sudlg.h" |
15 |
#include "sudlg.h" |
| 16 |
|
16 |
|
| 17 |
KDEsuDialog::KDEsuDialog(TQCString user, TQCString auth_user, bool enableKeep,const TQString& icon, bool withIgnoreButton, int timeout) |
17 |
KDEsuDialog::KDEsuDialog(TQCString user, TQCString auth_user, bool enableKeep,const TQString& icon, bool withIgnoreButton, int timeout) |
| 18 |
: KPasswordDialog(Password, enableKeep, 0, icon) |
18 |
: KPasswordDialog(Password, enableKeep, (withIgnoreButton ? User1:NoDefault), icon) |
| 19 |
{ |
19 |
{ |
| 20 |
TDEConfig* config = TDEGlobal::config(); |
20 |
TDEConfig* config = TDEGlobal::config(); |
| 21 |
config->setGroup("super-user-command"); |
21 |
config->setGroup("super-user-command"); |
|
Lines 32-43
KDEsuDialog::KDEsuDialog(TQCString user, TQCString auth_user, bool enableKeep,co
Link Here
|
| 32 |
if (superUserCommand == "sudo" && m_User == "root") { |
32 |
if (superUserCommand == "sudo" && m_User == "root") { |
| 33 |
prompt = i18n("Please enter your password." ); |
33 |
prompt = i18n("Please enter your password." ); |
| 34 |
} else { |
34 |
} else { |
| 35 |
if (m_User == "root") { |
35 |
if (withIgnoreButton) { |
| 36 |
prompt = i18n("The action you requested needs root privileges. " |
36 |
if (m_User == "root") { |
| 37 |
"Please enter root's password below."); |
37 |
prompt = i18n("The action you requested needs root privileges. " |
| 38 |
} else { |
38 |
"Please enter root's password below or click " |
| 39 |
prompt = i18n("The action you requested needs additional privileges. " |
39 |
"Ignore to continue with your current privileges."); |
| 40 |
"Please enter the password for \"%1\" below.").arg(static_cast<const char *>(m_User)); |
40 |
} else { |
|
|
41 |
prompt = i18n("The action you requested needs additional privileges. " |
| 42 |
"Please enter the password for \"%1\" below or click " |
| 43 |
"Ignore to continue with your current privileges.").arg(static_cast<const char *>(m_User)); |
| 44 |
} |
| 45 |
else { |
| 46 |
if (m_User == "root") { |
| 47 |
prompt = i18n("The action you requested needs root privileges. " |
| 48 |
"Please enter root's password below."); |
| 49 |
} else { |
| 50 |
prompt = i18n("The action you requested needs additional privileges. " |
| 51 |
"Please enter the password for \"%1\" below.").arg(static_cast<const char *>(m_User)); |
| 52 |
} |
| 41 |
} |
53 |
} |
| 42 |
} |
54 |
} |
| 43 |
setPrompt(prompt); |
55 |
setPrompt(prompt); |