author | harlekin <harlekin> | 2002-10-31 13:09:13 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-31 13:09:13 (UTC) |
commit | ae467a89591b45a8a190174a0cae0b330de8d89e (patch) (unidiff) | |
tree | 2a4799378bdf4ce450955492b66b418214b9fbf4 /libopie/ofileselector | |
parent | f6ca21ad98c7af99c0ae4c04afe3c2126317d6de (diff) | |
download | opie-ae467a89591b45a8a190174a0cae0b330de8d89e.zip opie-ae467a89591b45a8a190174a0cae0b330de8d89e.tar.gz opie-ae467a89591b45a8a190174a0cae0b330de8d89e.tar.bz2 |
excludeFromRefresh() added
-rw-r--r-- | libopie/ofileselector/odefaultfactories.cpp | 8 | ||||
-rw-r--r-- | libopie/ofileselector/odefaultfactories.h | 3 | ||||
-rw-r--r-- | libopie/ofileselector/ofiledialog.cpp | 2 | ||||
-rw-r--r-- | libopie/ofileselector/ofiledialog.h | 3 | ||||
-rw-r--r-- | libopie/ofileselector/ofileselector.cpp | 8 |
5 files changed, 19 insertions, 5 deletions
diff --git a/libopie/ofileselector/odefaultfactories.cpp b/libopie/ofileselector/odefaultfactories.cpp index c41fbca..c8efffb 100644 --- a/libopie/ofileselector/odefaultfactories.cpp +++ b/libopie/ofileselector/odefaultfactories.cpp | |||
@@ -1,15 +1,23 @@ | |||
1 | #include "ofilelistview.h" | 1 | #include "ofilelistview.h" |
2 | #include "ofileiconview.h" | ||
2 | #include "olocallister.h" | 3 | #include "olocallister.h" |
3 | 4 | ||
5 | |||
4 | #include "odefaultfactories.h" | 6 | #include "odefaultfactories.h" |
5 | 7 | ||
6 | extern "C" { | 8 | extern "C" { |
7 | 9 | ||
10 | |||
11 | OFileView* newFileIconView( OFileSelector* sel, QWidget* parent ) { | ||
12 | return new OFileIconView( parent, sel ); | ||
13 | } | ||
14 | |||
8 | OFileView* newFileListView( OFileSelector* sel, QWidget* par ) { | 15 | OFileView* newFileListView( OFileSelector* sel, QWidget* par ) { |
9 | return new OFileListView(par, sel ); | 16 | return new OFileListView(par, sel ); |
10 | } | 17 | } |
18 | |||
11 | OLister* newLocalLister( OFileSelector* sel) { | 19 | OLister* newLocalLister( OFileSelector* sel) { |
12 | return new OLocalLister( sel ); | 20 | return new OLocalLister( sel ); |
13 | } | 21 | } |
14 | 22 | ||
15 | }; | 23 | }; |
diff --git a/libopie/ofileselector/odefaultfactories.h b/libopie/ofileselector/odefaultfactories.h index eb698d3..b4c35af 100644 --- a/libopie/ofileselector/odefaultfactories.h +++ b/libopie/ofileselector/odefaultfactories.h | |||
@@ -2,13 +2,16 @@ | |||
2 | #define OPIE_DEFAULT_FACTORIES_H | 2 | #define OPIE_DEFAULT_FACTORIES_H |
3 | 3 | ||
4 | #include "ofilefactory.h" | 4 | #include "ofilefactory.h" |
5 | 5 | ||
6 | extern "C" { | 6 | extern "C" { |
7 | 7 | ||
8 | OFileView* newFileIconView( OFileSelector*, QWidget* parent ); | ||
8 | OFileView* newFileListView( OFileSelector*, QWidget* parent ); | 9 | OFileView* newFileListView( OFileSelector*, QWidget* parent ); |
10 | |||
9 | OLister* newLocalLister(OFileSelector* ); | 11 | OLister* newLocalLister(OFileSelector* ); |
10 | 12 | ||
13 | |||
11 | }; | 14 | }; |
12 | 15 | ||
13 | 16 | ||
14 | #endif | 17 | #endif |
diff --git a/libopie/ofileselector/ofiledialog.cpp b/libopie/ofileselector/ofiledialog.cpp index 430def2..d137c66 100644 --- a/libopie/ofileselector/ofiledialog.cpp +++ b/libopie/ofileselector/ofiledialog.cpp | |||
@@ -81,13 +81,13 @@ QString OFileDialog::getOpenFileName(int selector, | |||
81 | { | 81 | { |
82 | QString ret; | 82 | QString ret; |
83 | OFileDialog dlg( caption.isEmpty() ? tr("Open") : caption, | 83 | OFileDialog dlg( caption.isEmpty() ? tr("Open") : caption, |
84 | wid, OFileSelector::Open, selector, startDir, file, mimes); | 84 | wid, OFileSelector::Open, selector, startDir, file, mimes); |
85 | dlg.showMaximized(); | 85 | dlg.showMaximized(); |
86 | if( dlg.exec() ) | 86 | if( dlg.exec() ) |
87 | ret = dlg.fileName(); | 87 | ret = dlg.fileName(); |
88 | 88 | ||
89 | return ret; | 89 | return ret; |
90 | } | 90 | } |
91 | QString OFileDialog::getSaveFileName(int selector, | 91 | QString OFileDialog::getSaveFileName(int selector, |
92 | const QString &startDir, | 92 | const QString &startDir, |
93 | const QString &file, | 93 | const QString &file, |
diff --git a/libopie/ofileselector/ofiledialog.h b/libopie/ofileselector/ofiledialog.h index e14253c..e368e96 100644 --- a/libopie/ofileselector/ofiledialog.h +++ b/libopie/ofileselector/ofiledialog.h | |||
@@ -29,13 +29,14 @@ | |||
29 | 29 | ||
30 | #ifndef OpieFileDialog_h | 30 | #ifndef OpieFileDialog_h |
31 | #define OpieFileDialog_h | 31 | #define OpieFileDialog_h |
32 | 32 | ||
33 | #include <qdialog.h> | 33 | #include <qdialog.h> |
34 | 34 | ||
35 | #include <opie/ofileselector.h> | 35 | //#include <opie/ofileselector.h> |
36 | #include "ofileselector.h" | ||
36 | 37 | ||
37 | class OFileDialog : public QDialog { | 38 | class OFileDialog : public QDialog { |
38 | Q_OBJECT | 39 | Q_OBJECT |
39 | public: | 40 | public: |
40 | OFileDialog(const QString &caption, | 41 | OFileDialog(const QString &caption, |
41 | QWidget *, int mode, int selector, | 42 | QWidget *, int mode, int selector, |
diff --git a/libopie/ofileselector/ofileselector.cpp b/libopie/ofileselector/ofileselector.cpp index 9ce07dd..c6e923f 100644 --- a/libopie/ofileselector/ofileselector.cpp +++ b/libopie/ofileselector/ofileselector.cpp | |||
@@ -482,12 +482,14 @@ void OFileSelector::init() | |||
482 | 482 | ||
483 | if( m_shYesNo ) // the Yes No button row | 483 | if( m_shYesNo ) // the Yes No button row |
484 | initializeYes( ); | 484 | initializeYes( ); |
485 | 485 | ||
486 | if (m_selector != Normal ) | 486 | if (m_selector != Normal ) |
487 | reparse(); | 487 | reparse(); |
488 | |||
489 | showMaximized(); | ||
488 | } | 490 | } |
489 | void OFileSelector::updateMimes() | 491 | void OFileSelector::updateMimes() |
490 | { | 492 | { |
491 | if( m_autoMime ){ | 493 | if( m_autoMime ){ |
492 | m_mimetypes.clear(); | 494 | m_mimetypes.clear(); |
493 | m_mimetypes.insert( tr("All"), QString::null ); | 495 | m_mimetypes.insert( tr("All"), QString::null ); |
@@ -648,13 +650,13 @@ void OFileSelector::initToolbar() { | |||
648 | m_pseudoLayout = new QVBoxLayout( m_pseudo ); | 650 | m_pseudoLayout = new QVBoxLayout( m_pseudo ); |
649 | 651 | ||
650 | m_boxToolbar = new QHBox( m_pseudo ); | 652 | m_boxToolbar = new QHBox( m_pseudo ); |
651 | m_boxToolbar->setSpacing( 0 ); | 653 | m_boxToolbar->setSpacing( 0 ); |
652 | 654 | ||
653 | // tool bar members now | 655 | // tool bar members now |
654 | m_location = new QComboBox( m_boxToolbar ); | 656 | m_location = new QComboBox( m_boxToolbar ); |
655 | m_location->setEditable( TRUE ); | 657 | m_location->setEditable( TRUE ); |
656 | m_location->setDuplicatesEnabled( FALSE ); | 658 | m_location->setDuplicatesEnabled( FALSE ); |
657 | connect( m_location, SIGNAL(activated(const QString& ) ), | 659 | connect( m_location, SIGNAL(activated(const QString& ) ), |
658 | this, SLOT(slotLocationActivated(const QString& )) ); | 660 | this, SLOT(slotLocationActivated(const QString& )) ); |
659 | connect( m_location->lineEdit(), SIGNAL(returnPressed() ) , | 661 | connect( m_location->lineEdit(), SIGNAL(returnPressed() ) , |
660 | this, SLOT(locationComboChanged() ) ); | 662 | this, SLOT(locationComboChanged() ) ); |
@@ -971,15 +973,15 @@ void OFileSelector::setView( const QString& lis ) { | |||
971 | * the factory | 973 | * the factory |
972 | */ | 974 | */ |
973 | void OFileSelector::initFactory() { | 975 | void OFileSelector::initFactory() { |
974 | m_fileFactory = new OFileFactory(); | 976 | m_fileFactory = new OFileFactory(); |
975 | m_fileFactory->addLister(tr("Files"), newLocalLister ); | 977 | m_fileFactory->addLister(tr("Files"), newLocalLister ); |
976 | m_fileFactory->addView(tr("List View"), newFileListView ); | 978 | m_fileFactory->addView(tr("List View"), newFileListView ); |
977 | /* the factory is just a dummy */ | 979 | m_fileFactory->addView(tr("Documents"), newFileIconView ); |
978 | m_fileFactory->addView(tr("Documents"), newFileListView ); | ||
979 | } | 980 | } |
981 | |||
980 | void OFileSelector::fillList() { | 982 | void OFileSelector::fillList() { |
981 | qWarning("fill list"); | 983 | qWarning("fill list"); |
982 | if (!m_viewCheck ) | 984 | if (!m_viewCheck ) |
983 | return; | 985 | return; |
984 | 986 | ||
985 | m_viewCheck->clear(); | 987 | m_viewCheck->clear(); |