Diffstat (limited to 'noncore/apps/advancedfm/advancedfm.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index a47edd8..afb44f5 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp | |||
@@ -26,29 +26,25 @@ | |||
26 | #include <qlineedit.h> | 26 | #include <qlineedit.h> |
27 | 27 | ||
28 | 28 | ||
29 | #include <sys/stat.h> | 29 | #include <sys/stat.h> |
30 | #include <time.h> | 30 | #include <time.h> |
31 | #include <dirent.h> | 31 | #include <dirent.h> |
32 | #include <fcntl.h> | 32 | #include <fcntl.h> |
33 | #include <sys/vfs.h> | 33 | #include <sys/vfs.h> |
34 | #include <mntent.h> | 34 | #include <mntent.h> |
35 | 35 | ||
36 | using namespace Opie::Ui; | 36 | using namespace Opie::Ui; |
37 | 37 | ||
38 | #ifdef NOQUICKLAUNCH | ||
39 | AdvancedFm::AdvancedFm( ) | ||
40 | #else | ||
41 | AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) | 38 | AdvancedFm::AdvancedFm(QWidget *,const char*, WFlags ) |
42 | #endif | ||
43 | : QMainWindow( ) { | 39 | : QMainWindow( ) { |
44 | init(); | 40 | init(); |
45 | renameBox = 0; | 41 | renameBox = 0; |
46 | 42 | ||
47 | unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | 43 | unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); |
48 | 44 | ||
49 | initConnections(); | 45 | initConnections(); |
50 | whichTab=1; | 46 | whichTab=1; |
51 | rePopulate(); | 47 | rePopulate(); |
52 | currentPathCombo->setFocus(); | 48 | currentPathCombo->setFocus(); |
53 | channel = new QCopChannel( "QPE/Application/advancedfm", this ); | 49 | channel = new QCopChannel( "QPE/Application/advancedfm", this ); |
54 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), | 50 | connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), |
@@ -250,27 +246,24 @@ void AdvancedFm::ListClicked(QListViewItem *selectedItem) { | |||
250 | } | 246 | } |
251 | 247 | ||
252 | void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , int ) { | 248 | void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , int ) { |
253 | dealWithSchmooSchmaa( item->listView()); | 249 | dealWithSchmooSchmaa( item->listView()); |
254 | switch (mouse) { | 250 | switch (mouse) { |
255 | case 1: | 251 | case 1: |
256 | { | 252 | { |
257 | if(renameBox != 0 ) { | 253 | if(renameBox != 0 ) { |
258 | cancelRename(); | 254 | cancelRename(); |
259 | } | 255 | } |
260 | } | 256 | } |
261 | break; | 257 | break; |
262 | case 2: | ||
263 | menuTimer.start( 500, TRUE ); | ||
264 | break; | ||
265 | }; | 258 | }; |
266 | } | 259 | } |
267 | 260 | ||
268 | 261 | ||
269 | void AdvancedFm::switchToLocalTab() { | 262 | void AdvancedFm::switchToLocalTab() { |
270 | //owarn << "switch to local view" << oendl; | 263 | //owarn << "switch to local view" << oendl; |
271 | TabWidget->setCurrentWidget(0); | 264 | TabWidget->setCurrentWidget(0); |
272 | Local_View->setFocus(); | 265 | Local_View->setFocus(); |
273 | } | 266 | } |
274 | 267 | ||
275 | void AdvancedFm::switchToRemoteTab() { | 268 | void AdvancedFm::switchToRemoteTab() { |
276 | //owarn << "switch to local view" << oendl; | 269 | //owarn << "switch to local view" << oendl; |
@@ -597,30 +590,24 @@ void AdvancedFm::showFileMenu() { | |||
597 | m->setItemChecked(m->idAt(0),FALSE); | 590 | m->setItemChecked(m->idAt(0),FALSE); |
598 | 591 | ||
599 | if(Ir::supported()) | 592 | if(Ir::supported()) |
600 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); | 593 | m->insertItem( tr( "Beam File" ), this, SLOT( doBeam() )); |
601 | m->setFocus(); | 594 | m->setFocus(); |
602 | 595 | ||
603 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); | 596 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); |
604 | 597 | ||
605 | if(m) delete m; | 598 | if(m) delete m; |
606 | } | 599 | } |
607 | 600 | ||
608 | 601 | ||
609 | void AdvancedFm::cancelMenuTimer() { | ||
610 | |||
611 | if( menuTimer.isActive() ) | ||
612 | menuTimer.stop(); | ||
613 | } | ||
614 | |||
615 | QString AdvancedFm::checkDiskSpace(const QString &path) { | 602 | QString AdvancedFm::checkDiskSpace(const QString &path) { |
616 | struct statfs fss; | 603 | struct statfs fss; |
617 | if ( !statfs( path.latin1(), &fss ) ) { | 604 | if ( !statfs( path.latin1(), &fss ) ) { |
618 | int blkSize = fss.f_bsize; | 605 | int blkSize = fss.f_bsize; |
619 | // int totalBlks = fs.f_blocks; | 606 | // int totalBlks = fs.f_blocks; |
620 | int availBlks = fss.f_bavail; | 607 | int availBlks = fss.f_bavail; |
621 | 608 | ||
622 | long mult = blkSize / 1024; | 609 | long mult = blkSize / 1024; |
623 | long div = 1024 / blkSize; | 610 | long div = 1024 / blkSize; |
624 | if ( !mult ) mult = 1; | 611 | if ( !mult ) mult = 1; |
625 | if ( !div ) div = 1; | 612 | if ( !div ) div = 1; |
626 | 613 | ||