diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2013-05-17 12:45:40 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2013-05-17 12:45:40 -0500 |
commit | 359294c33620c8328d61f67635046d7cc060530c (patch) | |
tree | f2ac08fdad8860f7bc1ac76203e31013a799fda7 /kdessh/sshdlg.cpp | |
parent | 7be7990fc5770d2cbcd937772e8239167b5900c6 (diff) | |
download | tdeutils-359294c33620c8328d61f67635046d7cc060530c.tar.gz tdeutils-359294c33620c8328d61f67635046d7cc060530c.zip |
Rename kdessh -> tdessh and kdelirc -> tdelirc.
Diffstat (limited to 'kdessh/sshdlg.cpp')
-rw-r--r-- | kdessh/sshdlg.cpp | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/kdessh/sshdlg.cpp b/kdessh/sshdlg.cpp deleted file mode 100644 index c7ca281..0000000 --- a/kdessh/sshdlg.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* vi: ts=8 sts=4 sw=4 - * - * $Id$ - * - * This file is part of the KDE project, module tdesu. - * Copyright (C) 2000 Geert Jansen <jansen@kde.org> - */ - -#include <tdelocale.h> -#include <tdemessagebox.h> - -#include <tdesu/ssh.h> -#include "sshdlg.h" - - -KDEsshDialog::KDEsshDialog(TQCString host, TQCString user, TQCString stub, - TQString prompt, bool enableKeep) - : KPasswordDialog(Password, enableKeep, 0) -{ - m_Host = host; - m_User = user; - m_Stub = stub; - - setCaption(TQString::fromLatin1("%1@%2").arg(TQString(m_User)).arg(TQString(m_Host))); - - // Make the prompt a little more polite :-) - if (prompt.lower().left(6) == TQString::fromLatin1("enter ")) - prompt.remove(0, 6); - int pos = prompt.find(':'); - if (pos != -1) - prompt.remove(pos, 10); - prompt += '.'; - prompt.prepend(i18n("The action you requested needs authentication. " - "Please enter ")); - setPrompt(prompt); -} - - -KDEsshDialog::~KDEsshDialog() -{ -} - - -bool KDEsshDialog::checkPassword(const char *password) -{ - SshProcess proc(m_Host, m_User); - proc.setStub(m_Stub); - - int ret = proc.checkInstall(password); - switch (ret) - { - case -1: - KMessageBox::error(this, i18n("Conversation with ssh failed.\n")); - done(Rejected); - return false; - - case 0: - return true; - - case SshProcess::SshNotFound: - KMessageBox::sorry(this, - i18n("The programs 'ssh' or 'tdesu_stub' cannot be found.\n" - "Make sure your PATH is set correctly.")); - done(Rejected); - return false; - - case SshProcess::SshIncorrectPassword: - KMessageBox::sorry(this, i18n("Incorrect password. Please try again.")); - return false; - - default: - KMessageBox::error(this, i18n("Internal error: Illegal return from " - "SshProcess::checkInstall()")); - done(Rejected); - } - return true; -} - - -#include "sshdlg.moc" |