summaryrefslogtreecommitdiff
authorzecke <zecke>2002-04-12 13:05:42 (UTC)
committer zecke <zecke>2002-04-12 13:05:42 (UTC)
commitc1c9ac64f7f4871642d645ac1da1a2f36853ccb2 (patch) (side-by-side diff)
tree409bf1e97825de681692a8894671eccf745107eb
parent26efd0a7135834626b4e6f275e57e85a97abd34f (diff)
downloadopie-c1c9ac64f7f4871642d645ac1da1a2f36853ccb2.zip
opie-c1c9ac64f7f4871642d645ac1da1a2f36853ccb2.tar.gz
opie-c1c9ac64f7f4871642d645ac1da1a2f36853ccb2.tar.bz2
Port to OFileDialog for open
ljp would you please fix open a bit. I'm not in the mood to do it myself we need to port save to OFileDialog::getSaveFileName()
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index a66b967..cc3ccbc 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -34,13 +34,15 @@
#include <qpe/config.h>
#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>
#include <qfileinfo.h>
#include <qlineedit.h>
@@ -496,16 +498,18 @@ void TextEdit::fileNew()
// }
newFile(DocLnk());
}
void TextEdit::fileOpen()
{
- OFileSelector *fileSelector;
- fileSelector = new OFileSelector( this, 1,1,"/","", "text/*");
- fileSelector->showMaximized();
-
+ // OFileSelector *fileSelector;
+ // fileSelector = new OFileSelector( this, 1,1,"/","", "text/*");
+ //fileSelector->showMaximized();
+ QString str = OFileDialog::getOpenFileName(1,"/","", QStringList() , this );
+ if(!str.isEmpty() )
+ openFile( str );
// browseForFiles = new fileBrowser(this,tr("Open File"),TRUE,0, "text/*"); //
// browseForFiles->setFileView( viewSelection );
// browseForFiles->showMaximized();
// // if( result != -1 )
// if( browseForFiles->exec() != -1 ) {
@@ -518,13 +522,13 @@ void TextEdit::fileOpen()
// fileTemp = *f;
// fileTemp.right( fileTemp.length()-5);
// QString fileName = fileTemp;
// if( fileName != "Unnamed" || fileName != "Empty Text" ) {
// currentFileName = fileName;
// qDebug("please open "+currentFileName);
-// openFile(fileName );
+// openFile(str );
// }
// }
// viewSelection = browseForFiles->SelectionCombo->currentItem();
// }
// delete browseForFiles;
// editor->setEdited( FALSE);