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 | 60 |
1 files changed, 12 insertions, 48 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 @@ -21,10 +21,11 @@ #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> @@ -37,8 +38,4 @@ #include <qpe/qpetoolbar.h> #include <qpe/qcopenvelope_qws.h> -//#include <qpe/finddialog.h> - -#include <opie/ofileselector.h> -#include <opie/ofiledialog.h> #include <qstringlist.h> @@ -508,48 +505,15 @@ void TextEdit::fileOpen() 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 ); + + QMap<QString, QStringList> map; + map.insert(tr("All"), QStringList() ); + QStringList text; + text << "text/*"; + map.insert(tr("Text"), text ); + 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(); -// } } |