summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-03-30 02:00:10 (UTC)
committer llornkcor <llornkcor>2002-03-30 02:00:10 (UTC)
commit4fc58d156db9197bc8299f040d4337ea85b9f0d2 (patch) (side-by-side diff)
tree7baa553895a5ccdb35c8309b8a5c43a8f05a24ec
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 (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( )
Local_View->addColumn( tr("Size"),-1);
Local_View->setColumnAlignment(1,QListView::AlignRight);
Local_View->addColumn( tr("Date"),-1);
Local_View->setColumnAlignment(2,QListView::AlignRight);
Local_View->setAllColumnsShowFocus(TRUE);
Local_View->setMultiSelection( TRUE );
-
+ Local_View->setSelectionMode(QlistView::Extended);
QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold);
tabLayout->addWidget( Local_View, 0, 0 );
connect( Local_View, SIGNAL( clicked( QListViewItem*)),
this,SLOT( localListClicked(QListViewItem *)) );
@@ -158,12 +158,13 @@ OpieFtp::OpieFtp( )
Remote_View->addColumn( tr("Date"),-1);
Remote_View->setColumnAlignment(2,QListView::AlignRight);
Remote_View->addColumn( tr("Dir"),-1);
Remote_View->setColumnAlignment(4,QListView::AlignRight);
Remote_View->setAllColumnsShowFocus(TRUE);
Remote_View->setMultiSelection( TRUE );
+ Remote_View->setSelectionMode(QlistView::Extended);
QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold);
connect( Remote_View, SIGNAL( clicked( QListViewItem*)),
this,SLOT( remoteListClicked(QListViewItem *)) );
connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
@@ -282,12 +283,13 @@ void OpieFtp::cleanUp()
sfile+="/._temp";
else
sfile+="._temp";
QFile file( sfile);
if(file.exists())
file.remove();
+ exit(0);
}
void OpieFtp::tabChanged(QWidget *w)
{
if (TabWidget->currentPageIndex() == 0) {
currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
@@ -391,13 +393,12 @@ void OpieFtp::disConnector()
FtpQuit(conn);
setCaption("OpieFtp");
currentRemoteDir="/";
Remote_View->clear();
connectServerBtn->setText( tr("Connect"));
connectServerBtn->setOn(FALSE);
-
}
void OpieFtp::localUpload()
{
int fsz;
QCopEnvelope ( "QPE/System", "busy()" );
@@ -784,19 +785,15 @@ if (mouse == 2) {
showLocalMenu(item);
}
}
void OpieFtp::RemoteListPressed( int mouse, QListViewItem *item, const QPoint &point, int i)
{
- switch (mouse) {
- case 1:
- break;
- case 2:
+ if(mouse == 2) {
showRemoteMenu(item);
- break;
- };
+ }
}
void OpieFtp::showRemoteMenu(QListViewItem * item)
{
QPopupMenu m;// = new QPopupMenu( Local_View );
if( /*item->text(0).right(1) == "/" ||*/ item->text(0).find("/",0,TRUE) != -1)