summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index c1f74bb..ccc43fa 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -497,33 +497,38 @@ void TextEdit::setWordWrap(bool y)
void TextEdit::fileNew()
{
// if( !bFromDocView ) {
// saveAs();
// }
newFile(DocLnk());
}
void TextEdit::fileOpen()
{
Config cfg("TextEdit");
cfg.setGroup("View");
bool b=FALSE;
// if(cfg.readEntry("useOldFileDialog") == "TRUE")
// b=TRUE;
// if(!b) {
- QString str = OFileDialog::getOpenFileName( 2,"/");//,"", "*", this );
+ 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 );
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++ ) {