From c1c9ac64f7f4871642d645ac1da1a2f36853ccb2 Mon Sep 17 00:00:00 2001 From: zecke Date: Fri, 12 Apr 2002 13:05:42 +0000 Subject: 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() --- (limited to 'core/apps/textedit') 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 @@ -37,7 +37,9 @@ #include #include //#include + #include +#include #include #include @@ -499,10 +501,12 @@ void TextEdit::fileNew() 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(); @@ -521,7 +525,7 @@ void TextEdit::fileOpen() // if( fileName != "Unnamed" || fileName != "Empty Text" ) { // currentFileName = fileName; // qDebug("please open "+currentFileName); -// openFile(fileName ); +// openFile(str ); // } // } // viewSelection = browseForFiles->SelectionCombo->currentItem(); -- cgit v0.9.0.2