-rw-r--r-- | noncore/net/opieftp/main.cpp | 15 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 58 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.h | 3 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.pro | 6 |
4 files changed, 35 insertions, 47 deletions
diff --git a/noncore/net/opieftp/main.cpp b/noncore/net/opieftp/main.cpp index 4f5a7d4..0217e41 100644 --- a/noncore/net/opieftp/main.cpp +++ b/noncore/net/opieftp/main.cpp | |||
@@ -12,16 +12,5 @@ | |||
12 | ***************************************************************************/ | 12 | ***************************************************************************/ |
13 | #include <qpe/qpeapplication.h> | 13 | #include <opie/oapplicationfactory.h> |
14 | |||
15 | |||
16 | |||
17 | #include "opieftp.h" | 14 | #include "opieftp.h" |
18 | 15 | ||
19 | int main(int argc, char *argv[]) | 16 | OPIE_EXPORT_APP( OApplicationFactory<OpieFtp> ) |
20 | { | ||
21 | QPEApplication a(argc, argv); | ||
22 | |||
23 | OpieFtp opieftp; | ||
24 | a.showMainWidget( &opieftp); | ||
25 | return a.exec(); | ||
26 | } | ||
27 | |||
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 269449e..ee7d32f 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -59,4 +59,4 @@ static int log_progress(netbuf *, int xfered, void *) | |||
59 | 59 | ||
60 | OpieFtp::OpieFtp( ) | 60 | OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) |
61 | : QMainWindow( ) | 61 | : QMainWindow( parent, name, fl ) |
62 | { | 62 | { |
@@ -83,3 +83,3 @@ OpieFtp::OpieFtp( ) | |||
83 | tabMenu = new QPopupMenu( this ); | 83 | tabMenu = new QPopupMenu( this ); |
84 | 84 | ||
85 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); | 85 | layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); |
@@ -271,4 +271,4 @@ OpieFtp::OpieFtp( ) | |||
271 | this,SLOT( serverListClicked( const QString &) ) ); | 271 | this,SLOT( serverListClicked( const QString &) ) ); |
272 | 272 | ||
273 | connectServerBtn = new QPushButton( "Connect", tab_3 , "ConnectButton" ); | 273 | connectServerBtn = new QPushButton( tr("Connect"), tab_3 , "ConnectButton" ); |
274 | tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1); | 274 | tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1); |
@@ -277,3 +277,3 @@ OpieFtp::OpieFtp( ) | |||
277 | 277 | ||
278 | newServerButton= new QPushButton( "Add", tab_3 , "NewServerButton" ); | 278 | newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" ); |
279 | tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2); | 279 | tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2); |
@@ -282,3 +282,3 @@ OpieFtp::OpieFtp( ) | |||
282 | QPushButton *deleteServerBtn; | 282 | QPushButton *deleteServerBtn; |
283 | deleteServerBtn = new QPushButton( "Delete", tab_3 , "OpenButton" ); | 283 | deleteServerBtn = new QPushButton( tr("Delete"), tab_3 , "OpenButton" ); |
284 | tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3); | 284 | tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3); |
@@ -321,3 +321,3 @@ OpieFtp::OpieFtp( ) | |||
321 | // ServerComboBox->setCurrentItem(currentServerConfig); | 321 | // ServerComboBox->setCurrentItem(currentServerConfig); |
322 | 322 | ||
323 | TabWidget->setCurrentPage(2); | 323 | TabWidget->setCurrentPage(2); |
@@ -359,3 +359,3 @@ void OpieFtp::tabChanged(QWidget *) | |||
359 | homeButton->show(); | 359 | homeButton->show(); |
360 | 360 | ||
361 | } | 361 | } |
@@ -451,3 +451,3 @@ void OpieFtp::connector() | |||
451 | // if(ftp_pass != cfg.readEntry(cfg.readEntry("Username"))) | 451 | // if(ftp_pass != cfg.readEntry(cfg.readEntry("Username"))) |
452 | // currentServerConfig=-1; | 452 | // currentServerConfig=-1; |
453 | 453 | ||
@@ -595,3 +595,3 @@ void OpieFtp::remoteDownload() | |||
595 | } | 595 | } |
596 | Remote_View->setFocus(); | 596 | Remote_View->setFocus(); |
597 | TabWidget->setCurrentPage(0); | 597 | TabWidget->setCurrentPage(0); |
@@ -671,3 +671,3 @@ void OpieFtp::populateLocalView() | |||
671 | QPixmap pm; | 671 | QPixmap pm; |
672 | 672 | ||
673 | if(isDir || fileL.find("/",0,TRUE) != -1) { | 673 | if(isDir || fileL.find("/",0,TRUE) != -1) { |
@@ -731,3 +731,3 @@ bool OpieFtp::populateRemoteView( ) | |||
731 | fileL = s.right(s.length() - month - len); | 731 | fileL = s.right(s.length() - month - len); |
732 | if(s.left(1) == "d") | 732 | if(s.left(1) == "d") |
733 | fileL = fileL+"/"; | 733 | fileL = fileL+"/"; |
@@ -817,4 +817,4 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem) | |||
817 | // QCopEnvelope ( "QPE/System", "notBusy()" ); | 817 | // QCopEnvelope ( "QPE/System", "notBusy()" ); |
818 | Remote_View->ensureItemVisible(Remote_View->firstChild()); | 818 | Remote_View->ensureItemVisible(Remote_View->firstChild()); |
819 | 819 | ||
820 | } | 820 | } |
@@ -825,3 +825,3 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) | |||
825 | if(selectedItem!= NULL) { | 825 | if(selectedItem!= NULL) { |
826 | 826 | ||
827 | QString strItem=selectedItem->text(0); | 827 | QString strItem=selectedItem->text(0); |
@@ -838,3 +838,3 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) | |||
838 | if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { | 838 | if(strItem.find(". .",0,TRUE) && strItem.find("/",0,TRUE)!=-1 ) { |
839 | 839 | ||
840 | if(QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem)).exists() ) { | 840 | if(QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem)).exists() ) { |
@@ -860,3 +860,3 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem) | |||
860 | } | 860 | } |
861 | Local_View->ensureItemVisible(Local_View->firstChild()); | 861 | Local_View->ensureItemVisible(Local_View->firstChild()); |
862 | } | 862 | } |
@@ -974,3 +974,3 @@ void OpieFtp::localDelete() | |||
974 | it.current()->setSelected(FALSE); | 974 | it.current()->setSelected(FALSE); |
975 | 975 | ||
976 | // QString f = Local_View->currentItem()->text(0); | 976 | // QString f = Local_View->currentItem()->text(0); |
@@ -999,3 +999,3 @@ void OpieFtp::localDelete() | |||
999 | break; | 999 | break; |
1000 | case 1: | 1000 | case 1: |
1001 | // exit | 1001 | // exit |
@@ -1007,3 +1007,3 @@ void OpieFtp::localDelete() | |||
1007 | populateLocalView(); | 1007 | populateLocalView(); |
1008 | 1008 | ||
1009 | } | 1009 | } |
@@ -1203,6 +1203,6 @@ void OpieFtp::readConfig() | |||
1203 | currentServerConfig = cfg.readNumEntry("currentServer", -1); | 1203 | currentServerConfig = cfg.readNumEntry("currentServer", -1); |
1204 | 1204 | ||
1205 | // qDebug("Reading %d", currentServerConfig); | 1205 | // qDebug("Reading %d", currentServerConfig); |
1206 | serverComboSelected( currentServerConfig-1); | 1206 | serverComboSelected( currentServerConfig-1); |
1207 | 1207 | ||
1208 | } | 1208 | } |
@@ -1256,3 +1256,3 @@ void OpieFtp::writeConfig() | |||
1256 | cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries + 1 )); | 1256 | cfg.writeEntry("numberOfEntries", QString::number(numberOfEntries + 1 )); |
1257 | 1257 | ||
1258 | } | 1258 | } |
@@ -1328,5 +1328,5 @@ void OpieFtp::serverComboSelected(int index) | |||
1328 | if( portInt == 0) portInt = 21; | 1328 | if( portInt == 0) portInt = 21; |
1329 | 1329 | ||
1330 | ServerComboBox->lineEdit()->setText(remoteServerStr.left( remoteServerStr.find(":",0,TRUE))); | 1330 | ServerComboBox->lineEdit()->setText(remoteServerStr.left( remoteServerStr.find(":",0,TRUE))); |
1331 | 1331 | ||
1332 | PortSpinBox->setValue( portInt); | 1332 | PortSpinBox->setValue( portInt); |
@@ -1342,3 +1342,3 @@ void OpieFtp::serverComboSelected(int index) | |||
1342 | // PasswordEdit | 1342 | // PasswordEdit |
1343 | 1343 | ||
1344 | cfg.setGroup("Server"); | 1344 | cfg.setGroup("Server"); |
@@ -1360,3 +1360,3 @@ void OpieFtp::deleteServer() | |||
1360 | servername=serverListView->currentText(); | 1360 | servername=serverListView->currentText(); |
1361 | 1361 | ||
1362 | Config cfg("opieftp"); | 1362 | Config cfg("opieftp"); |
@@ -1495,3 +1495,3 @@ void OpieFtp::NewServer() { | |||
1495 | writeConfig(); | 1495 | writeConfig(); |
1496 | serverListView->insertItem( newServerName ); | 1496 | serverListView->insertItem( newServerName ); |
1497 | serverListView->setCurrentItem( serverListView->count()); | 1497 | serverListView->setCurrentItem( serverListView->count()); |
diff --git a/noncore/net/opieftp/opieftp.h b/noncore/net/opieftp/opieftp.h index 9d5d211..7bd615a 100644 --- a/noncore/net/opieftp/opieftp.h +++ b/noncore/net/opieftp/opieftp.h | |||
@@ -49,5 +49,6 @@ class OpieFtp : public QMainWindow | |||
49 | public: | 49 | public: |
50 | OpieFtp( ); | 50 | OpieFtp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
51 | ~OpieFtp(); | 51 | ~OpieFtp(); |
52 | 52 | ||
53 | static QString appName() { return QString::fromLatin1("opieftp"); } | ||
53 | QTabWidget *TabWidget; | 54 | QTabWidget *TabWidget; |
diff --git a/noncore/net/opieftp/opieftp.pro b/noncore/net/opieftp/opieftp.pro index ac16819..185c341 100644 --- a/noncore/net/opieftp/opieftp.pro +++ b/noncore/net/opieftp/opieftp.pro | |||
@@ -1,7 +1,5 @@ | |||
1 | TEMPLATE = app | 1 | CONFIG += qt warn_on release quick-app |
2 | CONFIG += qt warn_on release | 2 | HEADERS = opieftp.h inputDialog.h |
3 | HEADERS = opieftp.h inputDialog.h | ||
4 | SOURCES = opieftp.cpp inputDialog.cpp main.cpp | 3 | SOURCES = opieftp.cpp inputDialog.cpp main.cpp |
5 | TARGET = opieftp | 4 | TARGET = opieftp |
6 | DESTDIR = $(OPIEDIR)/bin | ||
7 | INCLUDEPATH += $(OPIEDIR)/include | 5 | INCLUDEPATH += $(OPIEDIR)/include |