author | alwin <alwin> | 2005-03-24 13:28:49 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-24 13:28:49 (UTC) |
commit | 29da9a4477210843435cbea3ede0d520775fe1a5 (patch) (unidiff) | |
tree | 487b26273bcdb8e29cd3f591955e8469d01c0da7 | |
parent | 4fbd94e2fd6432bb15e24e40be59426b309cbb9d (diff) | |
download | opie-29da9a4477210843435cbea3ede0d520775fe1a5.zip opie-29da9a4477210843435cbea3ede0d520775fe1a5.tar.gz opie-29da9a4477210843435cbea3ede0d520775fe1a5.tar.bz2 |
the filesystem-menu will executed when click on the filsystem-button
not when hold the pen on it.
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 10 | ||||
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector_p.h | 2 |
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 | |||
360 | connect(m_btnClose, SIGNAL(clicked() ), | 360 | connect(m_btnClose, SIGNAL(clicked() ), |
361 | selector(), SIGNAL(closeMe() ) ); | 361 | selector(), SIGNAL(closeMe() ) ); |
362 | 362 | ||
363 | btn = new QToolButton( box ); | 363 | btn = new QToolButton( box ); |
364 | btn->setIconSet( Resource::loadIconSet("cardmon/pcmcia") ); | 364 | btn->setIconSet( Resource::loadIconSet("cardmon/pcmcia") ); |
365 | 365 | ||
366 | m_fsButton = btn; | ||
366 | /* let's fill device parts */ | 367 | /* let's fill device parts */ |
367 | QPopupMenu* pop = new QPopupMenu(this); | 368 | QPopupMenu* pop = new QPopupMenu(this); |
368 | connect(pop, SIGNAL( activated(int) ), | 369 | connect(pop, SIGNAL( activated(int) ), |
369 | this, SLOT(slotFSActivated(int) ) ); | 370 | this, SLOT(slotFSActivated(int) ) ); |
370 | 371 | ||
371 | StorageInfo storage; | 372 | StorageInfo storage; |
@@ -377,14 +378,13 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st | |||
377 | const QString path = (*it)->path(); | 378 | const QString path = (*it)->path(); |
378 | m_dev.insert( disk, path ); | 379 | m_dev.insert( disk, path ); |
379 | pop->insertItem( disk ); | 380 | pop->insertItem( disk ); |
380 | } | 381 | } |
381 | m_fsPop = pop; | 382 | m_fsPop = pop; |
382 | 383 | ||
383 | 384 | connect(btn,SIGNAL(pressed()),this,SLOT(slotFSpressed())); | |
384 | btn->setPopup( pop ); | ||
385 | 385 | ||
386 | lay->addWidget( box ); | 386 | lay->addWidget( box ); |
387 | 387 | ||
388 | m_view = new QListView( this ); | 388 | m_view = new QListView( this ); |
389 | 389 | ||
390 | m_view->installEventFilter(this); | 390 | m_view->installEventFilter(this); |
@@ -402,12 +402,18 @@ OFileViewFileListView::OFileViewFileListView( QWidget* parent, const QString& st | |||
402 | m_view->setAllColumnsShowFocus( TRUE ); | 402 | m_view->setAllColumnsShowFocus( TRUE ); |
403 | 403 | ||
404 | lay->addWidget( m_view, 1000 ); | 404 | lay->addWidget( m_view, 1000 ); |
405 | connectSlots(); | 405 | connectSlots(); |
406 | } | 406 | } |
407 | 407 | ||
408 | void OFileViewFileListView::slotFSpressed() | ||
409 | { | ||
410 | m_fsPop->exec(QPoint( QCursor::pos().x(), QCursor::pos().y())); | ||
411 | m_fsButton->setDown(false); | ||
412 | } | ||
413 | |||
408 | OFileViewFileListView::~OFileViewFileListView() | 414 | OFileViewFileListView::~OFileViewFileListView() |
409 | { | 415 | { |
410 | } | 416 | } |
411 | 417 | ||
412 | void OFileViewFileListView::slotNew() | 418 | void OFileViewFileListView::slotNew() |
413 | { | 419 | { |
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: | |||
161 | void cdHome(); | 161 | void cdHome(); |
162 | void cdDoc(); | 162 | void cdDoc(); |
163 | void changeDir( const QString& ); | 163 | void changeDir( const QString& ); |
164 | void slotCurrentChanged( QListViewItem* ); | 164 | void slotCurrentChanged( QListViewItem* ); |
165 | void slotClicked(int, QListViewItem*, const QPoint&, int ); | 165 | void slotClicked(int, QListViewItem*, const QPoint&, int ); |
166 | void slotFSActivated(int); | 166 | void slotFSActivated(int); |
167 | void slotFSpressed(); | ||
167 | 168 | ||
168 | protected: | 169 | protected: |
169 | OFileSelector* selector(); | 170 | OFileSelector* selector(); |
170 | 171 | ||
171 | private: | 172 | private: |
172 | QMap<QString, QString> m_dev; | 173 | QMap<QString, QString> m_dev; |
@@ -174,12 +175,13 @@ private: | |||
174 | OFileSelector* m_sel; | 175 | OFileSelector* m_sel; |
175 | QPopupMenu* m_fsPop; | 176 | QPopupMenu* m_fsPop; |
176 | bool compliesMime( const QString& ); | 177 | bool compliesMime( const QString& ); |
177 | QStringList m_mimes; // used in compy mime | 178 | QStringList m_mimes; // used in compy mime |
178 | QString m_currentDir; | 179 | QString m_currentDir; |
179 | QToolButton *m_btnNew, *m_btnClose; | 180 | QToolButton *m_btnNew, *m_btnClose; |
181 | QToolButton *m_fsButton; | ||
180 | void connectSlots(); | 182 | void connectSlots(); |
181 | void addFile( QFileInfo* info, bool symlink = FALSE ); | 183 | void addFile( QFileInfo* info, bool symlink = FALSE ); |
182 | void addDir ( QFileInfo* info, bool symlink = FALSE ); | 184 | void addDir ( QFileInfo* info, bool symlink = FALSE ); |
183 | void addSymlink( QFileInfo* info, bool = FALSE ); | 185 | void addSymlink( QFileInfo* info, bool = FALSE ); |
184 | 186 | ||
185 | 187 | ||