author | llornkcor <llornkcor> | 2002-04-19 23:44:14 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-19 23:44:14 (UTC) |
commit | 609a534bc1f5efda3242be2d1dc5dbc4a13715cb (patch) (unidiff) | |
tree | 26ba7eb664cac1f7606f8b6d0db5930a8d5fa209 | |
parent | f62cb71116d1aa16603fe6e87169e8b98125ce1f (diff) | |
download | opie-609a534bc1f5efda3242be2d1dc5dbc4a13715cb.zip opie-609a534bc1f5efda3242be2d1dc5dbc4a13715cb.tar.gz opie-609a534bc1f5efda3242be2d1dc5dbc4a13715cb.tar.bz2 |
changed date and size columns, and added about
-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 | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <qpe/qcopenvelope_qws.h> | 22 | #include <qpe/qcopenvelope_qws.h> |
23 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
24 | #include <qpe/mimetype.h> | 24 | #include <qpe/mimetype.h> |
25 | #include <qpe/qpemessagebox.h> | ||
25 | 26 | ||
26 | #include <qstringlist.h> | 27 | #include <qstringlist.h> |
27 | #include <qtextstream.h> | 28 | #include <qtextstream.h> |
@@ -84,7 +85,7 @@ OpieFtp::OpieFtp( ) | |||
84 | localMenu = new QPopupMenu( this ); | 85 | localMenu = new QPopupMenu( this ); |
85 | remoteMenu = new QPopupMenu( this ); | 86 | remoteMenu = new QPopupMenu( this ); |
86 | tabMenu = new QPopupMenu( this ); | 87 | tabMenu = new QPopupMenu( this ); |
87 | 88 | ||
88 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); | 89 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); |
89 | 90 | ||
90 | menuBar->insertItem( tr( "Connection" ), connectionMenu); | 91 | menuBar->insertItem( tr( "Connection" ), connectionMenu); |
@@ -114,9 +115,12 @@ OpieFtp::OpieFtp( ) | |||
114 | tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); | 115 | tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); |
115 | tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); | 116 | tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); |
116 | tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); | 117 | tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); |
118 | tabMenu->insertSeparator(); | ||
119 | tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); | ||
117 | tabMenu->setCheckable(TRUE); | 120 | tabMenu->setCheckable(TRUE); |
118 | 121 | ||
119 | 122 | ||
123 | |||
120 | cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); | 124 | cdUpButton = new QPushButton(Resource::loadIconSet("up"),"",this,"cdUpButton"); |
121 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); | 125 | cdUpButton ->setFixedSize( QSize( 20, 20 ) ); |
122 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); | 126 | connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); |
@@ -150,9 +154,9 @@ OpieFtp::OpieFtp( ) | |||
150 | Local_View = new QListView( tab, "Local_View" ); | 154 | Local_View = new QListView( tab, "Local_View" ); |
151 | // Local_View->setResizePolicy( QListView::AutoOneFit ); | 155 | // Local_View->setResizePolicy( QListView::AutoOneFit ); |
152 | Local_View->addColumn( tr("File"),150); | 156 | Local_View->addColumn( tr("File"),150); |
153 | Local_View->addColumn( tr("Size"),-1); | ||
154 | Local_View->setColumnAlignment(1,QListView::AlignRight); | ||
155 | Local_View->addColumn( tr("Date"),-1); | 157 | Local_View->addColumn( tr("Date"),-1); |
158 | Local_View->setColumnAlignment(1,QListView::AlignRight); | ||
159 | Local_View->addColumn( tr("Size"),-1); | ||
156 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 160 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
157 | Local_View->setAllColumnsShowFocus(TRUE); | 161 | Local_View->setAllColumnsShowFocus(TRUE); |
158 | 162 | ||
@@ -180,9 +184,9 @@ OpieFtp::OpieFtp( ) | |||
180 | 184 | ||
181 | Remote_View = new QListView( tab_2, "Remote_View" ); | 185 | Remote_View = new QListView( tab_2, "Remote_View" ); |
182 | Remote_View->addColumn( tr("File"),150); | 186 | Remote_View->addColumn( tr("File"),150); |
183 | Remote_View->addColumn( tr("Size"),-1); | ||
184 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | ||
185 | Remote_View->addColumn( tr("Date"),-1); | 187 | Remote_View->addColumn( tr("Date"),-1); |
188 | Remote_View->setColumnAlignment(1,QListView::AlignRight); | ||
189 | Remote_View->addColumn( tr("Size"),-1); | ||
186 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 190 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
187 | Remote_View->addColumn( tr("Dir"),-1); | 191 | Remote_View->addColumn( tr("Dir"),-1); |
188 | Remote_View->setColumnAlignment(4,QListView::AlignRight); | 192 | Remote_View->setColumnAlignment(4,QListView::AlignRight); |
@@ -611,7 +615,7 @@ void OpieFtp::populateLocalView() | |||
611 | } | 615 | } |
612 | } | 616 | } |
613 | if(fileL !="./" && fi->exists()) { | 617 | if(fileL !="./" && fi->exists()) { |
614 | item= new QListViewItem( Local_View,fileL,fileS , fileDate); | 618 | item= new QListViewItem( Local_View,fileL, fileDate, fileS ); |
615 | QPixmap pm; | 619 | QPixmap pm; |
616 | 620 | ||
617 | if(isDir || fileL.find("/",0,TRUE) != -1) { | 621 | if(isDir || fileL.find("/",0,TRUE) != -1) { |
@@ -677,13 +681,13 @@ bool OpieFtp::populateRemoteView( ) | |||
677 | fileDate = fileDate.stripWhiteSpace(); | 681 | fileDate = fileDate.stripWhiteSpace(); |
678 | if(fileL.find("total",0,TRUE) == -1) { | 682 | if(fileL.find("total",0,TRUE) == -1) { |
679 | if(s.left(1) == "d" || fileL.find("/",0,TRUE) != -1) { | 683 | if(s.left(1) == "d" || fileL.find("/",0,TRUE) != -1) { |
680 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileS, fileDate,"d"); | 684 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"d"); |
681 | item->setPixmap( 0, Resource::loadPixmap( "folder" )); | 685 | item->setPixmap( 0, Resource::loadPixmap( "folder" )); |
682 | // if(itemDir) | 686 | // if(itemDir) |
683 | item->moveItem(itemDir); | 687 | item->moveItem(itemDir); |
684 | itemDir=item; | 688 | itemDir=item; |
685 | } else { | 689 | } else { |
686 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileS, fileDate,"f"); | 690 | QListViewItem * item = new QListViewItem( Remote_View, fileL, fileDate, fileS,"f"); |
687 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); | 691 | item->setPixmap( 0, Resource::loadPixmap( "fileopen" )); |
688 | // if(itemFile) | 692 | // if(itemFile) |
689 | item->moveItem(itemDir); | 693 | item->moveItem(itemDir); |
@@ -1313,3 +1317,11 @@ void OpieFtp::homeButtonPushed() { | |||
1313 | populateLocalView(); | 1317 | populateLocalView(); |
1314 | update(); | 1318 | update(); |
1315 | } | 1319 | } |
1320 | |||
1321 | void OpieFtp::doAbout() { | ||
1322 | QMessageBox::message("OpieFtp","Opie ftp client is copyright 2002 by\n" | ||
1323 | "L.J.Potter<llornkcor@handhelds.org>\n" | ||
1324 | "and uses ftplib copyright 1996-2000\n" | ||
1325 | "by Thomas Pfau, pfau@cnj.digex.net\n\n" | ||
1326 | "and is licensed by the GPL"); | ||
1327 | } | ||
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 | |||
@@ -55,7 +55,7 @@ public: | |||
55 | QLineEdit *PasswordEdit, *remotePath; | 55 | QLineEdit *PasswordEdit, *remotePath; |
56 | QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;; | 56 | QLabel *TextLabel2, *TextLabel1, *TextLabel3, *TextLabel4;; |
57 | QSpinBox* PortSpinBox; | 57 | QSpinBox* PortSpinBox; |
58 | QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu; | 58 | QPopupMenu *connectionMenu, *localMenu, *remoteMenu, *tabMenu, *aboutMenu; |
59 | QDir currentDir; | 59 | QDir currentDir; |
60 | QString currentRemoteDir; | 60 | QString currentRemoteDir; |
61 | QString filterStr; | 61 | QString filterStr; |
@@ -67,7 +67,7 @@ protected slots: | |||
67 | void upDir(); | 67 | void upDir(); |
68 | void homeButtonPushed(); | 68 | void homeButtonPushed(); |
69 | void docButtonPushed(); | 69 | void docButtonPushed(); |
70 | 70 | void doAbout(); | |
71 | void serverComboEdited(const QString & ); | 71 | void serverComboEdited(const QString & ); |
72 | void showLocalMenu( QListViewItem *); | 72 | void showLocalMenu( QListViewItem *); |
73 | void showRemoteMenu( QListViewItem *); | 73 | void showRemoteMenu( QListViewItem *); |
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,7 +1,7 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | HEADERS = opieftp.h inputDialog.h ftplib.h | 3 | HEADERS = opieftp.h inputDialog.h ftplib.h filePermissions.h |
4 | SOURCES = opieftp.cpp inputDialog.cpp ftplib.c main.cpp | 4 | SOURCES = opieftp.cpp inputDialog.cpp ftplib.c filePermissions.cpp main.cpp |
5 | TARGET = opieftp | 5 | TARGET = opieftp |
6 | REQUIRES=medium-config | 6 | REQUIRES=medium-config |
7 | DESTDIR = $(OPIEDIR)/bin | 7 | DESTDIR = $(OPIEDIR)/bin |