-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 @@ -20,12 +20,13 @@ // 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> @@ -36,10 +37,6 @@ #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> @@ -507,50 +504,17 @@ 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(); -// } } |