author | zecke <zecke> | 2002-09-29 16:57:33 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-29 16:57:33 (UTC) |
commit | 0d4b54af104dadbff57804e5e6f8ac309aa36fc4 (patch) (unidiff) | |
tree | c157fa2a49c3b545d4e7c4a2fbdaabe043dde20a /libopie | |
parent | 33ebc68a530393697724428f0e0db3a4807f3a9e (diff) | |
download | opie-0d4b54af104dadbff57804e5e6f8ac309aa36fc4.zip opie-0d4b54af104dadbff57804e5e6f8ac309aa36fc4.tar.gz opie-0d4b54af104dadbff57804e5e6f8ac309aa36fc4.tar.bz2 |
Hide the TypeCombo/CategorySelect we provide our own stuff
-rw-r--r-- | libopie/ofileselector/ofileselector.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie/ofileselector/ofileselector.cpp b/libopie/ofileselector/ofileselector.cpp index c52aa62..458d432 100644 --- a/libopie/ofileselector/ofileselector.cpp +++ b/libopie/ofileselector/ofileselector.cpp | |||
@@ -919,104 +919,106 @@ void OFileSelector::reparse() | |||
919 | m_mimetypes.clear(); | 919 | m_mimetypes.clear(); |
920 | // ok we can change mimetype so we need to be able to give a selection | 920 | // ok we can change mimetype so we need to be able to give a selection |
921 | if( m_shChooser ) { | 921 | if( m_shChooser ) { |
922 | currentMimeType = m_mimeCheck->currentText(); | 922 | currentMimeType = m_mimeCheck->currentText(); |
923 | m_mimeCheck->clear(); | 923 | m_mimeCheck->clear(); |
924 | 924 | ||
925 | // let's find possible mimetypes | 925 | // let's find possible mimetypes |
926 | m_mimetypes = currentLister()->mimeTypes( m_currentDir ); | 926 | m_mimetypes = currentLister()->mimeTypes( m_currentDir ); |
927 | 927 | ||
928 | // add them to the chooser | 928 | // add them to the chooser |
929 | updateMimeCheck(); | 929 | updateMimeCheck(); |
930 | m_mimeCheck->setCurrentItem( indexByString( m_mimeCheck, currentMimeType ) ); | 930 | m_mimeCheck->setCurrentItem( indexByString( m_mimeCheck, currentMimeType ) ); |
931 | currentMimeType = m_mimeCheck->currentText(); | 931 | currentMimeType = m_mimeCheck->currentText(); |
932 | } | 932 | } |
933 | }else { // no autoMime | 933 | }else { // no autoMime |
934 | // let the mimetype be set from out side the m_mimeCheck FEATURE | 934 | // let the mimetype be set from out side the m_mimeCheck FEATURE |
935 | 935 | ||
936 | if( m_shChooser ) | 936 | if( m_shChooser ) |
937 | currentMimeType = m_mimeCheck->currentText(); | 937 | currentMimeType = m_mimeCheck->currentText(); |
938 | 938 | ||
939 | } | 939 | } |
940 | // now we got our mimetypes we can add the files | 940 | // now we got our mimetypes we can add the files |
941 | 941 | ||
942 | currentLister()->reparse( m_currentDir ); | 942 | currentLister()->reparse( m_currentDir ); |
943 | /* we're done with adding let's sort */ | 943 | /* we're done with adding let's sort */ |
944 | currentView()->sort(); | 944 | currentView()->sort(); |
945 | 945 | ||
946 | 946 | ||
947 | if( m_shTool ){ | 947 | if( m_shTool ){ |
948 | m_location->insertItem( m_currentDir ); | 948 | m_location->insertItem( m_currentDir ); |
949 | 949 | ||
950 | } | 950 | } |
951 | // reenable painting and updates | 951 | // reenable painting and updates |
952 | } | 952 | } |
953 | 953 | ||
954 | 954 | ||
955 | OFileView* OFileSelector::currentView() { | 955 | OFileView* OFileSelector::currentView() { |
956 | return m_fileView; | 956 | return m_fileView; |
957 | } | 957 | } |
958 | OFileView* OFileSelector::currentView() const{ | 958 | OFileView* OFileSelector::currentView() const{ |
959 | return m_fileView; | 959 | return m_fileView; |
960 | } | 960 | } |
961 | int OFileSelector::filter() { | 961 | int OFileSelector::filter() { |
962 | int filter; | 962 | int filter; |
963 | if ( m_selector == ExtendedAll ) | 963 | if ( m_selector == ExtendedAll ) |
964 | filter = QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All; | 964 | filter = QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All; |
965 | else | 965 | else |
966 | filter = QDir::Files | QDir::Dirs | QDir::All ; | 966 | filter = QDir::Files | QDir::Dirs | QDir::All ; |
967 | 967 | ||
968 | return filter; | 968 | return filter; |
969 | } | 969 | } |
970 | int OFileSelector::sorting() { | 970 | int OFileSelector::sorting() { |
971 | int sort; | 971 | int sort; |
972 | 972 | ||
973 | if (m_case ) | 973 | if (m_case ) |
974 | sort = ( QDir::IgnoreCase | QDir::Name | QDir::DirsFirst | QDir::Reversed ); | 974 | sort = ( QDir::IgnoreCase | QDir::Name | QDir::DirsFirst | QDir::Reversed ); |
975 | else | 975 | else |
976 | sort = ( QDir::Name | QDir::DirsFirst | QDir::Reversed ); | 976 | sort = ( QDir::Name | QDir::DirsFirst | QDir::Reversed ); |
977 | 977 | ||
978 | return sort; | 978 | return sort; |
979 | } | 979 | } |
980 | void OFileSelector::internFileSelected( const QString& s) { | 980 | void OFileSelector::internFileSelected( const QString& s) { |
981 | emit fileSelected( s ); | 981 | emit fileSelected( s ); |
982 | } | 982 | } |
983 | void OFileSelector::internFileSelected( const DocLnk& d ) { | 983 | void OFileSelector::internFileSelected( const DocLnk& d ) { |
984 | emit fileSelected( d ); | 984 | emit fileSelected( d ); |
985 | } | 985 | } |
986 | void OFileSelector::internContextMenu() { | 986 | void OFileSelector::internContextMenu() { |
987 | emit contextMenu(); | 987 | emit contextMenu(); |
988 | } | 988 | } |
989 | void OFileSelector::internChangedDir( const QString& s) { | 989 | void OFileSelector::internChangedDir( const QString& s) { |
990 | emit dirSelected( s ); | 990 | emit dirSelected( s ); |
991 | cd(s ); | 991 | cd(s ); |
992 | } | 992 | } |
993 | void OFileSelector::internChangedDir( const QDir& s) { | 993 | void OFileSelector::internChangedDir( const QDir& s) { |
994 | emit dirSelected( s ); | 994 | emit dirSelected( s ); |
995 | } | 995 | } |
996 | QPixmap OFileSelector::pixmap( const QString& s ) { | 996 | QPixmap OFileSelector::pixmap( const QString& s ) { |
997 | 997 | ||
998 | return (*m_pixmaps)[s]; | 998 | return (*m_pixmaps)[s]; |
999 | } | 999 | } |
1000 | OLister* OFileSelector::currentLister()const { | 1000 | OLister* OFileSelector::currentLister()const { |
1001 | return m_lister; | 1001 | return m_lister; |
1002 | } | 1002 | } |
1003 | void OFileSelector::initializeOldSelector() { | 1003 | void OFileSelector::initializeOldSelector() { |
1004 | qWarning("initializeOldSelector"); | 1004 | qWarning("initializeOldSelector"); |
1005 | 1005 | ||
1006 | delete m_select; | 1006 | delete m_select; |
1007 | 1007 | ||
1008 | // we need to initialize but keep the selected mimetype | 1008 | // we need to initialize but keep the selected mimetype |
1009 | /* we default not to show close and new buttons */ | 1009 | /* we default not to show close and new buttons */ |
1010 | QString mime = currentMimeType(); | 1010 | QString mime = currentMimeType(); |
1011 | qWarning("MimeType " + mime ); | 1011 | qWarning("MimeType " + mime ); |
1012 | m_select = new FileSelector( mime , | 1012 | m_select = new FileSelector( mime , |
1013 | m_mainView, "fileselector", | 1013 | m_mainView, "fileselector", |
1014 | FALSE, FALSE); | 1014 | FALSE, FALSE); |
1015 | m_select->setCategorySelectVisible( FALSE ); | ||
1016 | m_select->setTypeComboVisible( FALSE ); | ||
1015 | 1017 | ||
1016 | connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ), | 1018 | connect(m_select, SIGNAL(fileSelected( const DocLnk & ) ), |
1017 | this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) ); | 1019 | this, SLOT( slotFileBridgeSelected(const DocLnk & ) ) ); |
1018 | connect(m_select, SIGNAL(closeMe() ), | 1020 | connect(m_select, SIGNAL(closeMe() ), |
1019 | this, SIGNAL(closeMe() ) ); | 1021 | this, SIGNAL(closeMe() ) ); |
1020 | //connect to close me and other signals as well | 1022 | //connect to close me and other signals as well |
1021 | m_mainView->setWidget( m_select ); | 1023 | m_mainView->setWidget( m_select ); |
1022 | } | 1024 | } |