author | llornkcor <llornkcor> | 2004-03-01 19:31:24 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-03-01 19:31:24 (UTC) |
commit | 8ac7ec5e055dacd8c92d5a28336257cfe3e716e5 (patch) (side-by-side diff) | |
tree | 1affaad923475829ca57ff8a4c322b615c44ea19 | |
parent | e6fcfb9a4c0c744ea7b0ec8b7e200b185a8a309a (diff) | |
download | opie-8ac7ec5e055dacd8c92d5a28336257cfe3e716e5.zip opie-8ac7ec5e055dacd8c92d5a28336257cfe3e716e5.tar.gz opie-8ac7ec5e055dacd8c92d5a28336257cfe3e716e5.tar.bz2 |
fix whatever it was
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 24da195..4064549 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp @@ -1,190 +1,190 @@ /*************************************************************************** opieftp.cpp ------------------- ** Created: Sat Mar 9 23:33:09 2002 copyright : (C) 2002 by ljp email : ljp@llornkcor.com * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ //#define DEVELOPERS_VERSION #include "opieftp.h" extern "C" { #include "../ftplib/ftplib.h" } #include "inputDialog.h" #include <qmenubar.h> #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/mimetype.h> #include <qtextstream.h> #include <qpushbutton.h> #include <qtoolbutton.h> #include <qcombobox.h> #include <qlistview.h> #include <qlabel.h> #include <qprogressbar.h> #include <qspinbox.h> #include <qtabwidget.h> #include <qlayout.h> #include <qmessagebox.h> #include <qlineedit.h> #include <qlistbox.h> #include <qvbox.h> #include <unistd.h> #include <stdlib.h> QProgressBar *ProgressBar; static netbuf *conn=NULL; static int log_progress(netbuf *, int xfered, void *) { // int fsz = *(int *)arg; // int pct = (xfered * 100) / fsz; // printf("%3d%%\r", pct); // fflush(stdout); ProgressBar->setProgress(xfered); qApp->processEvents(); return 1; } OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) : QMainWindow( parent, name, fl ) { qDebug("OpieFtp constructor"); setCaption( tr( "OpieFtp" ) ); fuckeduphack=FALSE; QVBox* wrapperBox = new QVBox( this ); setCentralWidget( wrapperBox ); QWidget *view = new QWidget( wrapperBox ); QGridLayout *layout = new QGridLayout( view ); layout->setSpacing( 2); layout->setMargin( 2); connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); QMenuBar *menuBar = new QMenuBar(this); // QToolBar *menuBar = new QToolBar(this); // menuBar->setHorizontalStretchable( TRUE ); QWMatrix matrix; QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); matrix.scale( .4, .4); unknownXpm = pix.xForm(matrix); connectionMenu = new QPopupMenu( this ); localMenu = new QPopupMenu( this ); remoteMenu = new QPopupMenu( this ); tabMenu = new QPopupMenu( this ); -#if 0 +//#if 0 layout->addMultiCellWidget( menuBar, 0, 0, 0, 2 ); -#endif +//#endif menuBar->insertItem( tr( "Connection" ), connectionMenu); // menuBar->insertItem( tr( "Local" ), localMenu); // menuBar->insertItem( tr( "Remote" ), remoteMenu); menuBar->insertItem( tr( "View" ), tabMenu); tabMenu->insertItem( tr( "Local" ), localMenu); tabMenu->insertItem( tr( "Remote" ), remoteMenu); connectionMenu->insertItem( tr( "New" ), this, SLOT( newConnection() )); connectionMenu->insertItem( tr( "Connect" ), this, SLOT( connector() )); connectionMenu->insertItem( tr( "Disconnect" ), this, SLOT( disConnector() )); localMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showHidden() )); localMenu->insertSeparator(); localMenu->insertItem( tr( "Upload" ), this, SLOT( localUpload() )); localMenu->insertItem( tr( "Make Directory" ), this, SLOT( localMakDir() )); localMenu->insertItem( tr( "Rename" ), this, SLOT( localRename() )); localMenu->insertSeparator(); localMenu->insertItem( tr( "Delete" ), this, SLOT( localDelete() )); localMenu->setCheckable(TRUE); remoteMenu->insertItem( tr( "Download" ), this, SLOT( remoteDownload() )); remoteMenu->insertItem( tr( "Make Directory" ), this, SLOT( remoteMakDir() )); remoteMenu->insertItem( tr( "Rename" ), this, SLOT( remoteRename() )); remoteMenu->insertSeparator(); remoteMenu->insertItem( tr( "Delete" ), this, SLOT( remoteDelete() )); tabMenu->insertSeparator(); tabMenu->insertItem( tr( "Switch to Local" ), this, SLOT( switchToLocalTab() )); tabMenu->insertItem( tr( "Switch to Remote" ), this, SLOT( switchToRemoteTab() )); tabMenu->insertItem( tr( "Switch to Config" ), this, SLOT( switchToConfigTab() )); tabMenu->insertSeparator(); // tabMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); tabMenu->setCheckable(TRUE); cdUpButton = new QToolButton( view,"cdUpButton"); cdUpButton->setPixmap(Resource::loadPixmap("up")); cdUpButton ->setFixedSize( QSize( 20, 20 ) ); connect( cdUpButton ,SIGNAL(released()),this,SLOT( upDir()) ); layout->addMultiCellWidget( cdUpButton, 0, 0, 3, 3 ); cdUpButton->hide(); // docButton = new QPushButton(Resource::loadIconSet("DocsIcon"),"",view,"docsButton"); // docButton->setFixedSize( QSize( 20, 20 ) ); // connect( docButton,SIGNAL(released()),this,SLOT( docButtonPushed()) ); // docButton->setFlat(TRUE); // layout->addMultiCellWidget( docButton, 0, 0, 6, 6 ); homeButton = new QToolButton(view,"homeButton"); homeButton->setPixmap( Resource::loadPixmap("home")); homeButton->setFixedSize( QSize( 20, 20 ) ); connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()) ); layout->addMultiCellWidget( homeButton, 0, 0, 4, 4); homeButton->hide(); TabWidget = new QTabWidget( view, "TabWidget" ); layout->addMultiCellWidget( TabWidget, 1, 1, 0, 4 ); // TabWidget->setTabShape(QTabWidget::Triangular); tab = new QWidget( TabWidget, "tab" ); tabLayout = new QGridLayout( tab ); tabLayout->setSpacing( 2); tabLayout->setMargin( 2); Local_View = new QListView( tab, "Local_View" ); // Local_View->setResizePolicy( QListView::AutoOneFit ); Local_View->addColumn( tr("File"),150); Local_View->addColumn( tr("Date"),-1); Local_View->setColumnAlignment(1,QListView::AlignRight); Local_View->addColumn( tr("Size"),-1); Local_View->setColumnAlignment(2,QListView::AlignRight); Local_View->setAllColumnsShowFocus(TRUE); Local_View->setMultiSelection( TRUE); Local_View->setSelectionMode(QListView::Extended); Local_View->setFocusPolicy(QWidget::ClickFocus); QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); tabLayout->addWidget( Local_View, 0, 0 ); connect( Local_View, SIGNAL( clicked( QListViewItem*)), this,SLOT( localListClicked(QListViewItem *)) ); // connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)), // this,SLOT( localListClicked(QListViewItem *)) ); connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); TabWidget->insertTab( tab, tr( "Local" ) ); tab_2 = new QWidget( TabWidget, "tab_2" ); tabLayout_2 = new QGridLayout( tab_2 ); tabLayout_2->setSpacing( 2); |