Diffstat (limited to 'noncore/net/opieftp/opieftp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index b703217..64146cb 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -40,4 +40,6 @@ using namespace Opie::Core; #include <qmessagebox.h> #include <qmenubar.h> +#include <qpe/qpemenubar.h> + #include <qlineedit.h> #include <qlistbox.h> @@ -74,10 +76,11 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) QGridLayout *layout = new QGridLayout( view ); - layout->setSpacing( 2); - layout->setMargin( 2); + layout->setSpacing( 1); + layout->setMargin( 1); connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); - QMenuBar *menuBar = new QMenuBar(this); -// QToolBar *menuBar = new QToolBar(this); + QPEMenuBar *menuBar = new QPEMenuBar(view); +// QMenuBar *menuBar = new QMenuBar(this); +// QPEToolBar *menuBar = new QPEToolBar(this); // menuBar->setHorizontalStretchable( TRUE ); @@ -136,5 +139,5 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) cdUpButton ->setFixedSize( QSize( 20, 20 ) ); connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); - layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); + layout->addMultiCellWidget( cdUpButton, 0, 0, 4, 4 ); cdUpButton->hide(); @@ -149,5 +152,5 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) homeButton->setFixedSize( QSize( 20, 20 ) ); connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); - layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); + layout->addMultiCellWidget( homeButton, 0, 0, 3, 3); homeButton->hide(); @@ -253,4 +256,7 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" ); ServerComboBox->setEditable(TRUE); + ServerComboBox->setAutoCompletion(true); +// ServerComboBox->blockSignals(true); + tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); @@ -1327,8 +1333,10 @@ void OpieFtp::fillCombos() void OpieFtp::serverComboSelected(int index) { + QString servername; currentServerConfig = index+1; odebug << "server combo selected " << index+1 << "" << oendl; QString username, remoteServerStr, remotePathStr, password, port, temp; -// remoteServerStr = ServerComboBox->text(index); + servername = remoteServerStr = ServerComboBox->text(index); + qDebug("server text " + remoteServerStr); Config cfg("opieftp"); @@ -1336,4 +1344,7 @@ void OpieFtp::serverComboSelected(int index) // int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); + // for (int i = 1; i <= numberOfEntries; i++) { +// int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); + temp.setNum(index+1); remoteServerStr = cfg.readEntry( temp,""); @@ -1341,5 +1352,5 @@ void OpieFtp::serverComboSelected(int index) odebug << "Group" +temp << oendl; cfg.setGroup(temp); -// odebug << temp << oendl; + int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); port = remoteServerStr.right( divider - 1); @@ -1347,5 +1358,4 @@ void OpieFtp::serverComboSelected(int index) int portInt = port.toInt(&ok,10); if( portInt == 0) portInt = 21; - ServerComboBox->lineEdit()->setText(remoteServerStr.left( remoteServerStr.find(":",0,TRUE))); @@ -1365,9 +1375,12 @@ void OpieFtp::serverComboSelected(int index) temp.sprintf("%d",currentServerConfig); cfg.writeEntry("currentServer", temp); + cfg.writeEntry(temp,servername); + fuckeduphack = TRUE; serverListView->setCurrentItem( index); fuckeduphack=FALSE; - odebug << "server list set selected " << index << "" << oendl; + qDebug( "server list set selected %d "+temp, index); + ServerComboBox->lineEdit()->setText(servername); update(); } |