summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2002-09-30 01:32:04 (UTC)
committer llornkcor <llornkcor>2002-09-30 01:32:04 (UTC)
commit251458a2dd6d75c59440dc006060db2544de5d0e (patch) (unidiff)
treee367bffa02a6e20caafa7f9917f1222fcaae0ab6 /noncore
parentf6e9cebd79044b1ca54648ecdadd13db8c4673dc (diff)
downloadopie-251458a2dd6d75c59440dc006060db2544de5d0e.zip
opie-251458a2dd6d75c59440dc006060db2544de5d0e.tar.gz
opie-251458a2dd6d75c59440dc006060db2544de5d0e.tar.bz2
fixed scroll, and cleanedup non used variables
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp38
1 files changed, 22 insertions, 16 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 9beac94..4e14946 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -60,10 +60,10 @@ extern "C" {
60QProgressBar *ProgressBar; 60QProgressBar *ProgressBar;
61static netbuf *conn=NULL; 61static netbuf *conn=NULL;
62 62
63static int log_progress(netbuf *ctl, int xfered, void *arg) 63static int log_progress(netbuf *, int xfered, void *)
64{ 64{
65 int fsz = *(int *)arg; 65// int fsz = *(int *)arg;
66 int pct = (xfered * 100) / fsz; 66// int pct = (xfered * 100) / fsz;
67// printf("%3d%%\r", pct); 67// printf("%3d%%\r", pct);
68// fflush(stdout); 68// fflush(stdout);
69 ProgressBar->setProgress(xfered); 69 ProgressBar->setProgress(xfered);
@@ -225,7 +225,8 @@ OpieFtp::OpieFtp( )
225 UsernameComboBox->setEditable(TRUE); 225 UsernameComboBox->setEditable(TRUE);
226 tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); 226 tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 );
227 227
228 connect( UsernameComboBox,SIGNAL(textChanged(const QString &)),this,SLOT( UsernameComboBoxEdited(const QString & ) )); 228 connect( UsernameComboBox,SIGNAL(textChanged(const QString &)),this,
229 SLOT( UsernameComboBoxEdited(const QString & ) ));
229 230
230 TextLabel2 = new QLabel( tab_3, "TextLabel2" ); 231 TextLabel2 = new QLabel( tab_3, "TextLabel2" );
231 TextLabel2->setText( tr( "Password" ) ); 232 TextLabel2->setText( tr( "Password" ) );
@@ -235,7 +236,8 @@ OpieFtp::OpieFtp( )
235 PasswordEdit->setEchoMode(QLineEdit::Password); 236 PasswordEdit->setEchoMode(QLineEdit::Password);
236 tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 ); 237 tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 );
237 238
238 connect( PasswordEdit,SIGNAL(textChanged(const QString &)),this,SLOT( PasswordEditEdited(const QString & ) )); 239 connect( PasswordEdit,SIGNAL(textChanged(const QString &)),this,
240 SLOT( PasswordEditEdited(const QString & ) ));
239 241
240//PasswordEdit->setFixedWidth(85); 242//PasswordEdit->setFixedWidth(85);
241 TextLabel3 = new QLabel( tab_3, "TextLabel3" ); 243 TextLabel3 = new QLabel( tab_3, "TextLabel3" );
@@ -247,7 +249,8 @@ OpieFtp::OpieFtp( )
247 tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); 249 tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 );
248 250
249 connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int ) )); 251 connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int ) ));
250 connect(ServerComboBox,SIGNAL(textChanged(const QString &)),this,SLOT(serverComboEdited(const QString & ) )); 252 connect(ServerComboBox,SIGNAL(textChanged(const QString &)),this,
253 SLOT(serverComboEdited(const QString & ) ));
251 254
252 QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" ); 255 QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" );
253 TextLabel5->setText( tr( "Remote path" ) ); 256 TextLabel5->setText( tr( "Remote path" ) );
@@ -347,7 +350,7 @@ void OpieFtp::cleanUp()
347 exit(0); 350 exit(0);
348} 351}
349 352
350void OpieFtp::tabChanged(QWidget *w) 353void OpieFtp::tabChanged(QWidget *)
351{ 354{
352 if (TabWidget->currentPageIndex() == 0) { 355 if (TabWidget->currentPageIndex() == 0) {
353 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 356 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
@@ -389,7 +392,7 @@ void OpieFtp::newConnection()
389 TabWidget->setCurrentPage(2); 392 TabWidget->setCurrentPage(2);
390} 393}
391 394
392void OpieFtp::serverComboEdited(const QString & edit) 395void OpieFtp::serverComboEdited(const QString & )
393{ 396{
394// if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) { 397// if( ServerComboBox->text(currentServerConfig) != edit /*edit.isEmpty() */) {
395// qDebug("ServerComboEdited"); 398// qDebug("ServerComboEdited");
@@ -397,11 +400,11 @@ void OpieFtp::serverComboEdited(const QString & edit)
397// } 400// }
398} 401}
399 402
400void OpieFtp::UsernameComboBoxEdited(const QString & use) { 403void OpieFtp::UsernameComboBoxEdited(const QString &) {
401// currentServerConfig = -1; 404// currentServerConfig = -1;
402} 405}
403 406
404void OpieFtp::PasswordEditEdited(const QString & pass) { 407void OpieFtp::PasswordEditEdited(const QString & ) {
405// currentServerConfig = -1; 408// currentServerConfig = -1;
406} 409}
407 410
@@ -442,7 +445,7 @@ void OpieFtp::connector()
442 445
443 Config cfg("opieftp"); 446 Config cfg("opieftp");
444 cfg.setGroup("Server"); 447 cfg.setGroup("Server");
445 int current=cfg.readNumEntry("currentServer", 1); 448// int current=cfg.readNumEntry("currentServer", 1);
446 449
447// if(ftp_host!= cfg.readEntry(QString::number( current))) 450// if(ftp_host!= cfg.readEntry(QString::number( current)))
448// currentServerConfig=-1; 451// currentServerConfig=-1;
@@ -653,12 +656,12 @@ void OpieFtp::populateLocalView()
653 QString symLink=fi->readLink(); 656 QString symLink=fi->readLink();
654// qDebug("Symlink detected "+symLink); 657// qDebug("Symlink detected "+symLink);
655 QFileInfo sym( symLink); 658 QFileInfo sym( symLink);
656 fileS.sprintf( "%10li", sym.size() ); 659 fileS.sprintf( "%10i", sym.size() );
657 fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() ); 660 fileL.sprintf( "%s -> %s", fi->fileName().data(),sym.absFilePath().data() );
658 fileDate = sym.lastModified().toString(); 661 fileDate = sym.lastModified().toString();
659 } else { 662 } else {
660// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL); 663// qDebug("Not a dir: "+currentDir.canonicalPath()+fileL);
661 fileS.sprintf( "%10li", fi->size() ); 664 fileS.sprintf( "%10i", fi->size() );
662 fileL.sprintf( "%s",fi->fileName().data() ); 665 fileL.sprintf( "%s",fi->fileName().data() );
663 fileDate= fi->lastModified().toString(); 666 fileDate= fi->lastModified().toString();
664 if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) { 667 if( QDir(QDir::cleanDirPath(currentDir.canonicalPath()+"/"+fileL)).exists() ) {
@@ -814,6 +817,8 @@ void OpieFtp::remoteListClicked(QListViewItem *selectedItem)
814 currentPathCombo->lineEdit()->setText( currentRemoteDir); 817 currentPathCombo->lineEdit()->setText( currentRemoteDir);
815 fillRemoteCombo( (const QString &)currentRemoteDir); 818 fillRemoteCombo( (const QString &)currentRemoteDir);
816// QCopEnvelope ( "QPE/System", "notBusy()" ); 819// QCopEnvelope ( "QPE/System", "notBusy()" );
820 Remote_View->ensureItemVisible(Remote_View->firstChild());
821
817 } 822 }
818} 823}
819 824
@@ -855,6 +860,7 @@ void OpieFtp::localListClicked(QListViewItem *selectedItem)
855 } //end not symlink 860 } //end not symlink
856 chdir(strItem.latin1()); 861 chdir(strItem.latin1());
857 } 862 }
863 Local_View->ensureItemVisible(Local_View->firstChild());
858 } 864 }
859} 865}
860 866
@@ -886,7 +892,7 @@ void OpieFtp::showHidden()
886 populateLocalView(); 892 populateLocalView();
887} 893}
888 894
889void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) 895void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &, int)
890{ 896{
891// if(item) 897// if(item)
892 if (mouse == 2) { 898 if (mouse == 2) {
@@ -894,7 +900,7 @@ void OpieFtp::ListPressed( int mouse, QListViewItem *item, const QPoint &point,
894 } 900 }
895} 901}
896 902
897void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) 903void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &, int )
898{ 904{
899 if(mouse == 2) { 905 if(mouse == 2) {
900 showRemoteMenu(item); 906 showRemoteMenu(item);
@@ -1305,7 +1311,7 @@ void OpieFtp::serverComboSelected(int index)
1305 1311
1306 Config cfg("opieftp"); 1312 Config cfg("opieftp");
1307 cfg.setGroup("Server"); 1313 cfg.setGroup("Server");
1308 int numberOfEntries = cfg.readNumEntry("numberOfEntries",0); 1314// int numberOfEntries = cfg.readNumEntry("numberOfEntries",0);
1309 1315
1310 temp.setNum(index+1); 1316 temp.setNum(index+1);
1311 remoteServerStr = cfg.readEntry( temp,""); 1317 remoteServerStr = cfg.readEntry( temp,"");