-rw-r--r-- | core/apps/textedit/textedit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index dc0d61b..9ef423c 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -750,60 +750,60 @@ void TextEdit::openFile( const QString &f ) { QString filer; QFileInfo fi( f); // bFromDocView = true; if(f.find(".desktop",0,true) != -1 && !openDesktop ) { switch ( QMessageBox::warning(this,tr("Text Editor"), tr("Text Editor has detected<BR>you selected a <B>.desktop</B> file.<BR>Open <B>.desktop</B> file or <B>linked</B> file?"), tr(".desktop File"),tr("Linked Document"),0,1,1) ) { case 0: filer = f; break; case 1: DocLnk sf(f); filer = sf.file(); break; } } else if(fi.baseName().left(1) == "") { currentFileName=f; openDotFile(currentFileName); } else { DocLnk sf(f); filer = sf.file(); if(filer.right(1) == "/") filer = f; - } DocLnk nf; nf.setType("text/plain"); nf.setFile(filer); currentFileName=filer; nf.setName(fi.baseName()); openFile(nf); qDebug("openFile string "+currentFileName); + } showEditTools(); // Show filename in caption QString name = filer; int sep = name.findRev( '/' ); if ( sep > 0 ) name = name.mid( sep+1 ); updateCaption( name ); } void TextEdit::openFile( const DocLnk &f ) { // clear(); // bFromDocView = true; FileManager fm; QString txt; currentFileName=f.file(); qDebug("openFile doclnk " + currentFileName); if ( !fm.loadFile( f, txt ) ) { // ####### could be a new file qDebug( "Cannot open file" ); } // fileNew(); if ( doc ) delete doc; doc = new DocLnk(f); |