Diffstat (limited to 'libopie2/opieui/fileselector/ofileselector.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/fileselector/ofileselector.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index a9ec8c4..1f6ca05 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp | |||
@@ -27,24 +27,25 @@ | |||
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* hacky but we need to get FileSelector::filter */ | 30 | /* hacky but we need to get FileSelector::filter */ |
31 | #define private public | 31 | #define private public |
32 | #include <qpe/fileselector.h> | 32 | #include <qpe/fileselector.h> |
33 | #undef private | 33 | #undef private |
34 | 34 | ||
35 | #include "ofileselector_p.h" | 35 | #include "ofileselector_p.h" |
36 | 36 | ||
37 | /* OPIE */ | 37 | /* OPIE */ |
38 | #include <opie2/ofileselector.h> | 38 | #include <opie2/ofileselector.h> |
39 | #include <opie2/odebug.h> | ||
39 | 40 | ||
40 | #include <qpe/qpeapplication.h> | 41 | #include <qpe/qpeapplication.h> |
41 | #include <qpe/mimetype.h> | 42 | #include <qpe/mimetype.h> |
42 | #include <qpe/resource.h> | 43 | #include <qpe/resource.h> |
43 | #include <qpe/storage.h> | 44 | #include <qpe/storage.h> |
44 | 45 | ||
45 | /* QT */ | 46 | /* QT */ |
46 | #include <qcombobox.h> | 47 | #include <qcombobox.h> |
47 | #include <qdir.h> | 48 | #include <qdir.h> |
48 | #include <qhbox.h> | 49 | #include <qhbox.h> |
49 | #include <qheader.h> | 50 | #include <qheader.h> |
50 | #include <qlabel.h> | 51 | #include <qlabel.h> |
@@ -537,25 +538,25 @@ void OFileViewFileListView::slotCurrentChanged( QListViewItem* item) | |||
537 | if (!item) | 538 | if (!item) |
538 | return; | 539 | return; |
539 | #if 0 | 540 | #if 0 |
540 | 541 | ||
541 | OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); | 542 | OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); |
542 | 543 | ||
543 | if (!sel->isDir() ) | 544 | if (!sel->isDir() ) |
544 | { | 545 | { |
545 | selector()->m_lneEdit->setText( sel->text(1) ); | 546 | selector()->m_lneEdit->setText( sel->text(1) ); |
546 | // if in fileselector mode we will emit selected | 547 | // if in fileselector mode we will emit selected |
547 | if ( selector()->mode() == OFileSelector::FileSelector ) | 548 | if ( selector()->mode() == OFileSelector::FileSelector ) |
548 | { | 549 | { |
549 | qWarning("slot Current Changed"); | 550 | owarn << "slot Current Changed" << oendl; |
550 | QStringList str = QStringList::split("->", sel->text(1) ); | 551 | QStringList str = QStringList::split("->", sel->text(1) ); |
551 | QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); | 552 | QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); |
552 | emit selector()->fileSelected( path ); | 553 | emit selector()->fileSelected( path ); |
553 | DocLnk lnk( path ); | 554 | DocLnk lnk( path ); |
554 | emit selector()->fileSelected( lnk ); | 555 | emit selector()->fileSelected( lnk ); |
555 | } | 556 | } |
556 | } | 557 | } |
557 | #endif | 558 | #endif |
558 | } | 559 | } |
559 | 560 | ||
560 | void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const QPoint&, int ) | 561 | void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const QPoint&, int ) |
561 | { | 562 | { |
@@ -565,25 +566,25 @@ void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const | |||
565 | OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); | 566 | OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); |
566 | if (!sel->isLocked() ) | 567 | if (!sel->isLocked() ) |
567 | { | 568 | { |
568 | QStringList str = QStringList::split("->", sel->text(1) ); | 569 | QStringList str = QStringList::split("->", sel->text(1) ); |
569 | if (sel->isDir() ) | 570 | if (sel->isDir() ) |
570 | { | 571 | { |
571 | m_currentDir = sel->directory() + "/" + str[0].stripWhiteSpace(); | 572 | m_currentDir = sel->directory() + "/" + str[0].stripWhiteSpace(); |
572 | emit selector()->dirSelected( m_currentDir ); | 573 | emit selector()->dirSelected( m_currentDir ); |
573 | reread( m_all ); | 574 | reread( m_all ); |
574 | } | 575 | } |
575 | else | 576 | else |
576 | { // file | 577 | { // file |
577 | qWarning("slot Clicked"); | 578 | owarn << "slot Clicked" << oendl; |
578 | selector()->m_lneEdit->setText( str[0].stripWhiteSpace() ); | 579 | selector()->m_lneEdit->setText( str[0].stripWhiteSpace() ); |
579 | QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); | 580 | QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); |
580 | emit selector()->fileSelected( path ); | 581 | emit selector()->fileSelected( path ); |
581 | DocLnk lnk( path ); | 582 | DocLnk lnk( path ); |
582 | emit selector()->fileSelected( lnk ); | 583 | emit selector()->fileSelected( lnk ); |
583 | } | 584 | } |
584 | } // not locked | 585 | } // not locked |
585 | } | 586 | } |
586 | 587 | ||
587 | void OFileViewFileListView::addFile( QFileInfo* info, bool symlink ) | 588 | void OFileViewFileListView::addFile( QFileInfo* info, bool symlink ) |
588 | { | 589 | { |
589 | MimeType type( info->absFilePath() ); | 590 | MimeType type( info->absFilePath() ); |