-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 28 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.h | 4 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.pro | 4 |
3 files changed, 24 insertions, 12 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 7f5d71c..e15bbef 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -21,8 +21,9 @@ #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> @@ -83,9 +84,9 @@ OpieFtp::OpieFtp( ) connectionMenu = new QPopupMenu( this ); localMenu = new QPopupMenu( this ); remoteMenu = new QPopupMenu( this ); tabMenu = new QPopupMenu( this ); - + layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); menuBar->insertItem( tr( "Connection" ), connectionMenu); menuBar->insertItem( tr( "Local" ), localMenu); @@ -113,11 +114,14 @@ OpieFtp::OpieFtp( ) tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); + tabMenu->insertSeparator(); + tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); tabMenu->setCheckable(TRUE); + cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); cdUpButton ->setFixedSize( QSize( 20, 20 ) ); connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); cdUpButton ->setFlat(TRUE); @@ -149,11 +153,11 @@ OpieFtp::OpieFtp( ) Local_View = new QListView( tab, "Local_View" ); // Local_View->setResizePolicy( QListView::AutoOneFit ); Local_View->addColumn( tr("File"),150); - Local_View->addColumn( tr("Size"),-1); - Local_View->setColumnAlignment(1,QListView::AlignRight); Local_View->addColumn( tr("Date"),-1); + Local_View->setColumnAlignment(1,QListView::AlignRight); + Local_View->addColumn( tr("Size"),-1); Local_View->setColumnAlignment(2,QListView::AlignRight); Local_View->setAllColumnsShowFocus(TRUE); Local_View->setMultiSelection( TRUE); @@ -179,11 +183,11 @@ OpieFtp::OpieFtp( ) tabLayout_2->setMargin( 2); Remote_View = new QListView( tab_2, "Remote_View" ); Remote_View->addColumn( tr("File"),150); - Remote_View->addColumn( tr("Size"),-1); - Remote_View->setColumnAlignment(1,QListView::AlignRight); Remote_View->addColumn( tr("Date"),-1); + Remote_View->setColumnAlignment(1,QListView::AlignRight); + Remote_View->addColumn( tr("Size"),-1); Remote_View->setColumnAlignment(2,QListView::AlignRight); Remote_View->addColumn( tr("Dir"),-1); Remote_View->setColumnAlignment(4,QListView::AlignRight); Remote_View->setAllColumnsShowFocus(TRUE); @@ -610,9 +614,9 @@ void OpieFtp::populateLocalView() // qDebug( fileL); } } if(fileL !="./" && fi->exists()) { - item= new QListViewItem( Local_View,fileL,fileS , fileDate); + item= new QListViewItem( Local_View,fileL, fileDate, fileS ); QPixmap pm; if(isDir || fileL.find("/",0,TRUE) != -1) { if( !QDir( fi->filePath() ).isReadable()) @@ -676,15 +680,15 @@ bool OpieFtp::populateRemoteView( ) fileDate = s.mid( 42, 55-42); fileDate = fileDate.stripWhiteSpace(); if(fileL.find("total",0,TRUE) == -1) { if(s.left(1) == "d" || fileL.find("/",0,TRUE) != -1) { - QListViewItem * item = new QListViewItem( Remote_View, fileL, fileS, fileDate,"d"); + QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"d"); item->setPixmap( 0, Resource::loadPixmap( "folder" )); // if(itemDir) item->moveItem(itemDir); itemDir=item; } else { - QListViewItem * item = new QListViewItem( Remote_View, fileL, fileS, fileDate,"f"); + QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"f"); item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); // if(itemFile) item->moveItem(itemDir); item->moveItem(itemFile); @@ -1312,4 +1316,12 @@ void OpieFtp::homeButtonPushed() { currentDir.cd( current, TRUE); populateLocalView(); update(); } + +void OpieFtp::doAbout() { + QMessageBox::message("OpieFtp","Opie ftp client is copyright 2002 by\n" + "L.J.Potter<llornkcor@handhelds.org>\n" + "and uses ftplib copyright 1996-2000\n" + "by Thomas Pfau, pfau@cnj.digex.net\n\n" + "and is licensed by the GPL"); +} diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h index 6852b1c..218a958 100644 --- a/noncore/net/opieftp/opieftp.h +++ b/noncore/net/opieftp/opieftp.h @@ -54,9 +54,9 @@ public: QComboBox *UsernameComboBox, *ServerComboBox, *currentPathCombo; QLineEdit *PasswordEdit, *remotePath; QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;; QSpinBox* PortSpinBox; - QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu; + QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu; QDir currentDir; QString currentRemoteDir; QString filterStr; QListViewItem * item; @@ -66,9 +66,9 @@ public: protected slots: void upDir(); void homeButtonPushed(); void docButtonPushed(); - + void doAbout(); void serverComboEdited(const QString & ); void showLocalMenu( QListViewItem *); void showRemoteMenu( QListViewItem *); void doLocalCd(); diff --git a/noncore/net/opieftp/opieftp.pro b/noncore/net/opieftp/opieftp.pro index f25d15f..7aead00 100644 --- a/noncore/net/opieftp/opieftp.pro +++ b/noncore/net/opieftp/opieftp.pro @@ -1,8 +1,8 @@ TEMPLATE = app CONFIG += qt warn_on release -HEADERS = opieftp.h inputDialog.h ftplib.h -SOURCES = opieftp.cpp inputDialog.cpp ftplib.c main.cpp +HEADERS = opieftp.h inputDialog.h ftplib.h filePermissions.h +SOURCES = opieftp.cpp inputDialog.cpp ftplib.c filePermissions.cpp main.cpp TARGET = opieftp REQUIRES=medium-config DESTDIR = $(OPIEDIR)/bin INCLUDEPATH += $(OPIEDIR)/include |