-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 @@ -41,2 +41,4 @@ using namespace Opie::Core; #include <qmenubar.h> +#include <qpe/qpemenubar.h> + #include <qlineedit.h> @@ -75,8 +77,9 @@ 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 ); @@ -137,3 +140,3 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); - layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); + layout->addMultiCellWidget( cdUpButton, 0, 0, 4, 4 ); cdUpButton->hide(); @@ -150,3 +153,3 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); - layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); + layout->addMultiCellWidget( homeButton, 0, 0, 3, 3); homeButton->hide(); @@ -254,2 +257,5 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) ServerComboBox->setEditable(TRUE); + ServerComboBox->setAutoCompletion(true); +// ServerComboBox->blockSignals(true); + tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); @@ -1328,2 +1334,3 @@ void OpieFtp::serverComboSelected(int index) { + QString servername; currentServerConfig = index+1; @@ -1331,3 +1338,4 @@ void OpieFtp::serverComboSelected(int index) QString username, remoteServerStr, remotePathStr, password, port, temp; -// remoteServerStr = ServerComboBox->text(index); + servername = remoteServerStr = ServerComboBox->text(index); + qDebug("server text " + remoteServerStr); @@ -1337,2 +1345,5 @@ void OpieFtp::serverComboSelected(int index) + // for (int i = 1; i <= numberOfEntries; i++) { +// int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); + temp.setNum(index+1); @@ -1342,3 +1353,3 @@ void OpieFtp::serverComboSelected(int index) cfg.setGroup(temp); -// odebug << temp << oendl; + int divider = remoteServerStr.length() - remoteServerStr.find(":",0,TRUE); @@ -1348,3 +1359,2 @@ void OpieFtp::serverComboSelected(int index) if( portInt == 0) portInt = 21; - ServerComboBox->lineEdit()->setText(remoteServerStr.left( remoteServerStr.find(":",0,TRUE))); @@ -1366,2 +1376,4 @@ void OpieFtp::serverComboSelected(int index) cfg.writeEntry("currentServer", temp); + cfg.writeEntry(temp,servername); + @@ -1370,3 +1382,4 @@ void OpieFtp::serverComboSelected(int index) fuckeduphack=FALSE; - odebug << "server list set selected " << index << "" << oendl; + qDebug( "server list set selected %d "+temp, index); + ServerComboBox->lineEdit()->setText(servername); update(); |