author | zecke <zecke> | 2002-06-26 18:01:14 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-06-26 18:01:14 (UTC) |
commit | 125dc1fe52d7a3c8be1b955c79d729cc935c8b6d (patch) (side-by-side diff) | |
tree | 018bb1bc68f03a3cc220ff0e2e22fbc62b0e9718 | |
parent | 1ddf9aa5ffc8dbb4ba290fa6a439b2d7681a0038 (diff) | |
download | opie-125dc1fe52d7a3c8be1b955c79d729cc935c8b6d.zip opie-125dc1fe52d7a3c8be1b955c79d729cc935c8b6d.tar.gz opie-125dc1fe52d7a3c8be1b955c79d729cc935c8b6d.tar.bz2 |
make use of improved mimetype handling
-rw-r--r-- | core/apps/textedit/textedit.cpp | 7 |
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 @@ -481,65 +481,70 @@ void TextEdit::setBold(bool y) } void TextEdit::setItalic(bool y) { QFont f = editor->font(); f.setItalic(y); editor->setFont(f); } void TextEdit::setWordWrap(bool y) { bool state = editor->edited(); editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap ); editor->setEdited( state ); } 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++ ) { // 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)=="*") |