summaryrefslogtreecommitdiff
path: root/libopie2/opieui
Side-by-side diff
Diffstat (limited to 'libopie2/opieui') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opieui/fileselector/ofileselector.cpp10
-rw-r--r--libopie2/opieui/fileselector/ofileselector_p.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp
index 74aca96..dbba4b9 100644
--- a/libopie2/opieui/fileselector/ofileselector.cpp
+++ b/libopie2/opieui/fileselector/ofileselector.cpp
@@ -360,12 +360,13 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st
connect(m_btnClose, SIGNAL(clicked() ),
selector(), SIGNAL(closeMe() ) );
btn = new QToolButton( box );
btn->setIconSet( Resource::loadIconSet("cardmon/pcmcia") );
+ m_fsButton = btn;
/* let's fill device parts */
QPopupMenu* pop = new QPopupMenu(this);
connect(pop, SIGNAL( activated(int) ),
this, SLOT(slotFSActivated(int) ) );
StorageInfo storage;
@@ -377,14 +378,13 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st
const QString path = (*it)->path();
m_dev.insert( disk, path );
pop->insertItem( disk );
}
m_fsPop = pop;
-
- btn->setPopup( pop );
+ connect(btn,SIGNAL(pressed()),this,SLOT(slotFSpressed()));
lay->addWidget( box );
m_view = new QListView( this );
m_view->installEventFilter(this);
@@ -402,12 +402,18 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st
m_view->setAllColumnsShowFocus( TRUE );
lay->addWidget( m_view, 1000 );
connectSlots();
}
+void OFileViewFileListView::slotFSpressed()
+{
+ m_fsPop->exec(QPoint( QCursor::pos().x(), QCursor::pos().y()));
+ m_fsButton->setDown(false);
+}
+
OFileViewFileListView::~OFileViewFileListView()
{
}
void OFileViewFileListView::slotNew()
{
diff --git a/libopie2/opieui/fileselector/ofileselector_p.h b/libopie2/opieui/fileselector/ofileselector_p.h
index 15db916..94216a0 100644
--- a/libopie2/opieui/fileselector/ofileselector_p.h
+++ b/libopie2/opieui/fileselector/ofileselector_p.h
@@ -161,12 +161,13 @@ private slots:
void cdHome();
void cdDoc();
void changeDir( const QString& );
void slotCurrentChanged( QListViewItem* );
void slotClicked(int, QListViewItem*, const QPoint&, int );
void slotFSActivated(int);
+ void slotFSpressed();
protected:
OFileSelector* selector();
private:
QMap<QString, QString> m_dev;
@@ -174,12 +175,13 @@ private:
OFileSelector* m_sel;
QPopupMenu* m_fsPop;
bool compliesMime( const QString& );
QStringList m_mimes; // used in compy mime
QString m_currentDir;
QToolButton *m_btnNew, *m_btnClose;
+ QToolButton *m_fsButton;
void connectSlots();
void addFile( QFileInfo* info, bool symlink = FALSE );
void addDir ( QFileInfo* info, bool symlink = FALSE );
void addSymlink( QFileInfo* info, bool = FALSE );