summaryrefslogtreecommitdiff
path: root/noncore/net/opieftp/opieftp.cpp
authorllornkcor <llornkcor>2002-03-30 02:00:10 (UTC)
committer llornkcor <llornkcor>2002-03-30 02:00:10 (UTC)
commit4fc58d156db9197bc8299f040d4337ea85b9f0d2 (patch) (unidiff)
tree7baa553895a5ccdb35c8309b8a5c43a8f05a24ec /noncore/net/opieftp/opieftp.cpp
parente49717bf2fa15791c2437a3ac69058ac909f0c6b (diff)
downloadopie-4fc58d156db9197bc8299f040d4337ea85b9f0d2.zip
opie-4fc58d156db9197bc8299f040d4337ea85b9f0d2.tar.gz
opie-4fc58d156db9197bc8299f040d4337ea85b9f0d2.tar.bz2
fixed a workaround for an apparent bug in libqte when the listview is multi, and you try to select one item and popup the menu.., it needs extended mode selection to work
Diffstat (limited to 'noncore/net/opieftp/opieftp.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opieftp/opieftp.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp
index 3e13466..956409f 100644
--- a/noncore/net/opieftp/opieftp.cpp
+++ b/noncore/net/opieftp/opieftp.cpp
@@ -129,13 +129,13 @@ OpieFtp::OpieFtp( )
129 Local_View->addColumn( tr("Size"),-1); 129 Local_View->addColumn( tr("Size"),-1);
130 Local_View->setColumnAlignment(1,QListView::AlignRight); 130 Local_View->setColumnAlignment(1,QListView::AlignRight);
131 Local_View->addColumn( tr("Date"),-1); 131 Local_View->addColumn( tr("Date"),-1);
132 Local_View->setColumnAlignment(2,QListView::AlignRight); 132 Local_View->setColumnAlignment(2,QListView::AlignRight);
133 Local_View->setAllColumnsShowFocus(TRUE); 133 Local_View->setAllColumnsShowFocus(TRUE);
134 Local_View->setMultiSelection( TRUE ); 134 Local_View->setMultiSelection( TRUE );
135 135 Local_View->setSelectionMode(QlistView::Extended);
136 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); 136 QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
137 137
138 tabLayout->addWidget( Local_View, 0, 0 ); 138 tabLayout->addWidget( Local_View, 0, 0 );
139 139
140 connect( Local_View, SIGNAL( clicked( QListViewItem*)), 140 connect( Local_View, SIGNAL( clicked( QListViewItem*)),
141 this,SLOT( localListClicked(QListViewItem *)) ); 141 this,SLOT( localListClicked(QListViewItem *)) );
@@ -158,12 +158,13 @@ OpieFtp::OpieFtp( )
158 Remote_View->addColumn( tr("Date"),-1); 158 Remote_View->addColumn( tr("Date"),-1);
159 Remote_View->setColumnAlignment(2,QListView::AlignRight); 159 Remote_View->setColumnAlignment(2,QListView::AlignRight);
160 Remote_View->addColumn( tr("Dir"),-1); 160 Remote_View->addColumn( tr("Dir"),-1);
161 Remote_View->setColumnAlignment(4,QListView::AlignRight); 161 Remote_View->setColumnAlignment(4,QListView::AlignRight);
162 Remote_View->setAllColumnsShowFocus(TRUE); 162 Remote_View->setAllColumnsShowFocus(TRUE);
163 Remote_View->setMultiSelection( TRUE ); 163 Remote_View->setMultiSelection( TRUE );
164 Remote_View->setSelectionMode(QlistView::Extended);
164 165
165 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); 166 QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold);
166 167
167 connect( Remote_View, SIGNAL( clicked( QListViewItem*)), 168 connect( Remote_View, SIGNAL( clicked( QListViewItem*)),
168 this,SLOT( remoteListClicked(QListViewItem *)) ); 169 this,SLOT( remoteListClicked(QListViewItem *)) );
169 connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), 170 connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
@@ -282,12 +283,13 @@ void OpieFtp::cleanUp()
282 sfile+="/._temp"; 283 sfile+="/._temp";
283 else 284 else
284 sfile+="._temp"; 285 sfile+="._temp";
285 QFile file( sfile); 286 QFile file( sfile);
286 if(file.exists()) 287 if(file.exists())
287 file.remove(); 288 file.remove();
289 exit(0);
288} 290}
289 291
290void OpieFtp::tabChanged(QWidget *w) 292void OpieFtp::tabChanged(QWidget *w)
291{ 293{
292 if (TabWidget->currentPageIndex() == 0) { 294 if (TabWidget->currentPageIndex() == 0) {
293 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 295 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
@@ -391,13 +393,12 @@ void OpieFtp::disConnector()
391 FtpQuit(conn); 393 FtpQuit(conn);
392 setCaption("OpieFtp"); 394 setCaption("OpieFtp");
393 currentRemoteDir="/"; 395 currentRemoteDir="/";
394 Remote_View->clear(); 396 Remote_View->clear();
395 connectServerBtn->setText( tr("Connect")); 397 connectServerBtn->setText( tr("Connect"));
396 connectServerBtn->setOn(FALSE); 398 connectServerBtn->setOn(FALSE);
397
398} 399}
399 400
400void OpieFtp::localUpload() 401void OpieFtp::localUpload()
401{ 402{
402 int fsz; 403 int fsz;
403 QCopEnvelope ( "QPE/System", "busy()" ); 404 QCopEnvelope ( "QPE/System", "busy()" );
@@ -784,19 +785,15 @@ if (mouse == 2) {
784 showLocalMenu(item); 785 showLocalMenu(item);
785 } 786 }
786} 787}
787 788
788void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i) 789void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i)
789{ 790{
790 switch (mouse) { 791 if(mouse == 2) {
791 case 1:
792 break;
793 case 2:
794 showRemoteMenu(item); 792 showRemoteMenu(item);
795 break; 793 }
796 };
797} 794}
798 795
799void OpieFtp::showRemoteMenu(QListViewItem * item) 796void OpieFtp::showRemoteMenu(QListViewItem * item)
800{ 797{
801 QPopupMenu m;// = new QPopupMenu( Local_View ); 798 QPopupMenu m;// = new QPopupMenu( Local_View );
802 if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) != -1) 799 if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) != -1)