Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > a6bc312ce50b5c8d0c51736e58ac32bc > files > 296

kdebase-3.4.2-55mdk.src.rpm

--- kdebase-3.3.0/kdesu/kdesu/kdesu.cpp--	2004-09-05 06:11:10.759101897 -0400
+++ kdebase-3.3.0/kdesu/kdesu/kdesu.cpp	2004-09-05 06:15:29.017135759 -0400
@@ -62,6 +62,7 @@ static KCmdLineOptions options[] = {
     { "p <prio>", I18N_NOOP("Set priority value: 0 <= prio <= 100, 0 is lowest"), "50" },
     { "r", I18N_NOOP("Use realtime scheduling"), 0 },
     { "nonewdcop", I18N_NOOP("Let command use existing dcopserver"), 0 },
+    { "ignorebutton", I18N_NOOP("Do not display 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},
     KCmdLineLastOption
@@ -267,7 +268,8 @@ static int startApp()
     bool keep = !args->isSet("n") && have_daemon;
     bool terminal = args->isSet("t");
     bool new_dcop = args->isSet("newdcop");
-
+    bool ignoreButton = !args->isSet("ignorebutton");
+    
     QCStringList env;
     QCString options;
     env << ( "KDE_STARTUP_ENV=" + kapp->startupId());
@@ -347,7 +349,7 @@ static int startApp()
         KStartupInfoData data;
         data.setSilent( KStartupInfoData::Yes );
         KStartupInfo::sendChange( id, data );
-        KDEsuDialog dlg(user, auth_user, keep && !terminal, icon);
+        KDEsuDialog dlg(user, auth_user, keep && !terminal,icon, ignoreButton);
 	if (prompt)
 	    dlg.addLine(i18n("Command:"), command);
         if ((priority != 50) || (scheduler != SuProcess::SchedNormal))
--- kdebase-3.3.0/kdesu/kdesu/sudlg.cpp--	2004-09-05 06:12:30.467112147 -0400
+++ kdebase-3.3.0/kdesu/kdesu/sudlg.cpp	2004-09-05 06:15:06.239132698 -0400
@@ -12,8 +12,8 @@
 #include "sudlg.h"
 
 
-KDEsuDialog::KDEsuDialog(QCString user, QCString auth_user, bool enableKeep, const QString& icon)
-    : KPasswordDialog(Password, enableKeep, User1, icon)
+KDEsuDialog::KDEsuDialog(QCString user, QCString auth_user, bool enableKeep,const QString& icon, bool no_useIgnoreButton)
+    : KPasswordDialog(Password, enableKeep, (no_useIgnoreButton ? User1:0), icon)
 {
     m_User = auth_user;
     setCaption(i18n("Run as %1").arg(user));
@@ -29,7 +29,8 @@ KDEsuDialog::KDEsuDialog(QCString user, 
 		"Ignore to continue with your current privileges.").arg(m_User);
     setPrompt(prompt);
 
-    setButtonText(User1, i18n("&Ignore"));
+    if( no_useIgnoreButton )
+	setButtonText(User1, i18n("&Ignore"));
 }
 
 
--- kdebase-3.3.0/kdesu/kdesu/sudlg.h--	2004-09-05 06:13:37.840120952 -0400
+++ kdebase-3.3.0/kdesu/kdesu/sudlg.h	2004-09-05 06:14:29.619127806 -0400
@@ -15,7 +15,7 @@ class KDEsuDialog
     Q_OBJECT
 
 public:
-    KDEsuDialog(QCString user, QCString auth_user, bool enableKeep, const QString& icon );
+    KDEsuDialog(QCString user, QCString auth_user, bool enableKeep, const QString& icon , bool no_useIgnoreButton=false);
     ~KDEsuDialog();
 
     enum ResultCodes { AsUser = 10 };