summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index e15bbef..d78b7d1 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -1,47 +1,51 @@
/***************************************************************************
opieftp.cpp
-------------------
** Created: Sat Mar 9 23:33:09 2002
copyright : (C) 2002 by ljp
email : ljp@llornkcor.com
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
//#define DEVELOPERS_VERSION
#include "opieftp.h"
+
+extern "C" {
#include "ftplib.h"
+}
+
#include "inputDialog.h"
#include <qpe/qpemenubar.h>
#include <qpe/qpetoolbar.h>
#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/config.h>
#include <qpe/mimetype.h>
#include <qpe/qpemessagebox.h>
#include <qstringlist.h>
#include <qtextstream.h>
#include <qpushbutton.h>
#include <qtoolbutton.h>
#include <qdatetime.h>
#include <qdir.h>
#include <qfile.h>
#include <qstring.h>
#include <qcombobox.h>
#include <qpopupmenu.h>
#include <qlistview.h>
#include <qmainwindow.h>
#include <qlabel.h>
#include <qprogressbar.h>
#include <qspinbox.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qlayout.h>
#include <qimage.h>
#include <qpixmap.h>
#include <qmessagebox.h>
@@ -1203,64 +1207,66 @@ void OpieFtp::fillCombos()
// UsernameComboBox->insertItem(username);
// password = cfg.readEntryCrypt(username,"");
// PasswordEdit->setText(password);
}
}
void OpieFtp::serverComboSelected(int index)
{
currentServerConfig = index;
QString username, remoteServerStr, remotePathStr, password, port, temp;
// remoteServerStr = ServerComboBox->text(index);
Config cfg("opieftp");
cfg.setGroup("Server");
int numberOfEntries = cfg.readNumEntry("numberOfEntries",0);
temp.setNum(index+1);
remoteServerStr = cfg.readEntry( temp,"");
cfg.setGroup(temp);
// qDebug(temp);
int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE);
port = remoteServerStr.right( divider - 1);
bool ok;
int portInt = port.toInt(&ok,10);
if( portInt == 0) portInt = 21;
PortSpinBox->setValue( portInt);
remotePath->setText(cfg.readEntry("RemotePath", "/"));
username = cfg.readEntry("Username", "anonymous");
UsernameComboBox->lineEdit()->setText(username);
+
+// qDebug("Password is "+cfg.readEntryCrypt(username, "me@opieftp.org"));
PasswordEdit->setText(cfg.readEntryCrypt(username, "me@opieftp.org"));
cfg.setGroup("Server");
temp.sprintf("%d",currentServerConfig);
cfg.writeEntry("currentServer", temp);
update();
}
// UsernameComboBox->lineEdit()->setText("root");
// PasswordEdit->setText( tr( "" ) );
// ServerComboBox->lineEdit()->setText( tr( "192.168.129.201" ) );
// remotePath->setText( currentRemoteDir = "/home/llornkcor/");
// PortSpinBox->setValue( 4242);
void OpieFtp::deleteServer()
{
QString username, remoteServerStr, remotePathStr, password, port, temp;
remoteServerStr = ServerComboBox->currentText( );
username = UsernameComboBox->currentText();
Config cfg("opieftp");
cfg.setGroup("Server");
int numberOfEntries = cfg.readNumEntry("numberOfEntries",0);
for (int i = 0; i <= numberOfEntries; i++) {
temp.setNum(i+1);
cfg.setGroup("Server");
if( cfg.readEntry( temp,"").find( remoteServerStr,0,TRUE) != -1
&& cfg.readEntry(temp).find(username,0,TRUE) != -1
&& !remoteServerStr.isEmpty()) {
qDebug(temp);
}
}
}