author | llornkcor <llornkcor> | 2002-06-29 00:34:32 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-29 00:34:32 (UTC) |
commit | 9cc6f3de75b884f338f708ff03900b197f281802 (patch) (side-by-side diff) | |
tree | fa325ddf6fd61fbfcaa3cb9ec9e772dbef87fe0d | |
parent | 971f94ceb114149efbf8d90b607d25dcbd358435 (diff) | |
download | opie-9cc6f3de75b884f338f708ff03900b197f281802.zip opie-9cc6f3de75b884f338f708ff03900b197f281802.tar.gz opie-9cc6f3de75b884f338f708ff03900b197f281802.tar.bz2 |
b bye and added all files to ofiledialog
-rw-r--r-- | core/apps/textedit/textedit.cpp | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index ccc43fa..ea27e1b 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -19,14 +19,15 @@ **********************************************************************/ // changes added by L. J. Potter Sun 02-17-2002 21:31:31 #include "textedit.h" -//#include "fileBrowser.h" #include "fileSaver.h" #include "filePermissions.h" - #include "fontDialog.h" +#include <opie/ofileselector.h> +#include <opie/ofiledialog.h> + #include <qpe/fontdatabase.h> #include <qpe/global.h> #include <qpe/fileselector.h> #include <qpe/applnk.h> @@ -35,12 +36,8 @@ #include <qpe/qpeapplication.h> #include <qpe/qpemenubar.h> #include <qpe/qpetoolbar.h> #include <qpe/qcopenvelope_qws.h> -//#include <qpe/finddialog.h> - -#include <opie/ofileselector.h> -#include <opie/ofiledialog.h> #include <qstringlist.h> #include <qaction.h> #include <qcolordialog.h> @@ -506,52 +503,19 @@ void TextEdit::fileOpen() { Config cfg("TextEdit"); cfg.setGroup("View"); bool b=FALSE; -// if(cfg.readEntry("useOldFileDialog") == "TRUE") -// b=TRUE; -// if(!b) { + QMap<QString, QStringList> map; map.insert(tr("All"), QStringList() ); QStringList text; text << "text/*"; map.insert(tr("Text"), text ); - QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this ); + text << "*"; + map.insert(tr("All"), text ); + QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map); if(!str.isEmpty() ) openFile( str ); -// } else { -// QString str; -// browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "*"); // -// browseForFiles->setFileView( viewSelection ); -// browseForFiles->showMaximized(); -// // if( result != -1 ) - -// if( browseForFiles->exec() != -1 ) { -// QString selFile = browseForFiles->selectedFileName; -// QStringList fileList = browseForFiles->fileList; -// qDebug(selFile); -// QStringList::ConstIterator f; -// QString fileTemp; -// for ( f = fileList.begin(); f != fileList.end(); f++ ) { -// fileTemp = *f; -// fileTemp.right( fileTemp.length()-5); -// QString fileName = fileTemp; -// if( fileName != "Unnamed" || fileName != "Empty Text" ) { -// currentFileName = fileName; -// qDebug("please open "+currentFileName); -// openFile(currentFileName ); -// } -// } -// viewSelection = browseForFiles->SelectionCombo->currentItem(); -// } -// delete browseForFiles; -// editor->setEdited( FALSE); -// edited1=FALSE; -// edited=FALSE; -// if(caption().left(1)=="*") -// setCaption(caption().right(caption().length()-1)); -// doSearchBar(); -// } } void TextEdit::doSearchBar() |