Diffstat (limited to 'libopie/ofileselector/ofileselector.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie/ofileselector/ofileselector.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libopie/ofileselector/ofileselector.cpp b/libopie/ofileselector/ofileselector.cpp index 458d432..91a510f 100644 --- a/libopie/ofileselector/ofileselector.cpp +++ b/libopie/ofileselector/ofileselector.cpp | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "ofileselector.h" | 34 | #include "ofileselector.h" |
35 | #include "olocallister.h" | 35 | #include "olocallister.h" |
36 | #include "olister.h" | 36 | #include "olister.h" |
37 | #include "odefaultfactories.h" | ||
37 | 38 | ||
38 | QMap<QString,QPixmap> *OFileSelector::m_pixmaps = 0; | 39 | QMap<QString,QPixmap> *OFileSelector::m_pixmaps = 0; |
39 | 40 | ||
@@ -297,9 +298,7 @@ QString OFileSelector::selectedPath()const | |||
297 | QString path; | 298 | QString path; |
298 | if( m_selector == Normal ){ | 299 | if( m_selector == Normal ){ |
299 | path = QPEApplication::documentDir(); | 300 | path = QPEApplication::documentDir(); |
300 | } /*else if( m_selector == Extended || m_selector == ExtendedAll ){ | 301 | } /* normal case to do */ |
301 | ; | ||
302 | }*/ | ||
303 | return path; | 302 | return path; |
304 | } | 303 | } |
305 | QStringList OFileSelector::selectedPaths() const | 304 | QStringList OFileSelector::selectedPaths() const |
@@ -372,15 +371,8 @@ void OFileSelector::slotViewCheck(const QString &sel) | |||
372 | initializeOldSelector(); | 371 | initializeOldSelector(); |
373 | m_selector = Normal; | 372 | m_selector = Normal; |
374 | 373 | ||
375 | }else if( sel == tr("Files") ){ | 374 | }else { |
376 | m_selector = Extended; | 375 | ; |
377 | |||
378 | // FIXME call the factory | ||
379 | //reparse(); | ||
380 | }else if( sel == tr("All Files") ){ | ||
381 | m_selector = ExtendedAll; | ||
382 | /* see above | ||
383 | reparse(); */ | ||
384 | } | 376 | } |
385 | } | 377 | } |
386 | 378 | ||
@@ -474,6 +466,7 @@ void OFileSelector::locationComboChanged() | |||
474 | } | 466 | } |
475 | void OFileSelector::init() | 467 | void OFileSelector::init() |
476 | { | 468 | { |
469 | initFactory(); | ||
477 | m_lay = new QVBoxLayout( this ); | 470 | m_lay = new QVBoxLayout( this ); |
478 | m_lay->setSpacing(0 ); | 471 | m_lay->setSpacing(0 ); |
479 | 472 | ||
@@ -653,10 +646,6 @@ void OFileSelector::initializeChooser() | |||
653 | m_boxView->setSpacing( 8 ); | 646 | m_boxView->setSpacing( 8 ); |
654 | m_lay->addWidget(m_boxView, 0 ); | 647 | m_lay->addWidget(m_boxView, 0 ); |
655 | 648 | ||
656 | m_viewCheck->insertItem( tr("Documents") ); | ||
657 | m_viewCheck->insertItem( tr("Files") ); | ||
658 | m_viewCheck->insertItem( tr("All Files") ); | ||
659 | /* update to custom views */ | ||
660 | 649 | ||
661 | updateMimeCheck(); | 650 | updateMimeCheck(); |
662 | 651 | ||
@@ -951,6 +940,17 @@ void OFileSelector::reparse() | |||
951 | // reenable painting and updates | 940 | // reenable painting and updates |
952 | } | 941 | } |
953 | 942 | ||
943 | /* | ||
944 | * the factory | ||
945 | */ | ||
946 | void OFileSelector::initFactory() { | ||
947 | m_fileFactory = new OFileFactory(); | ||
948 | m_fileFactory->addLister(tr("Files"), newLocalLister ); | ||
949 | m_fileFactory->addView(tr("List View"), newFileListView ); | ||
950 | /* the factory is just a dummy */ | ||
951 | m_fileFactory->addView(tr("Documents"), newFileListView ); | ||
952 | } | ||
953 | |||
954 | 954 | ||
955 | OFileView* OFileSelector::currentView() { | 955 | OFileView* OFileSelector::currentView() { |
956 | return m_fileView; | 956 | return m_fileView; |