author | llornkcor <llornkcor> | 2002-12-16 04:19:48 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-12-16 04:19:48 (UTC) |
commit | 71f0618e5fdfe7c7f5c251fef3885ee3833d1046 (patch) (side-by-side diff) | |
tree | ccda3bdd02fd1313a64a26b635b8787ae9b381d2 | |
parent | cc6c77e7014a3056debd6963946265671d41517d (diff) | |
download | opie-71f0618e5fdfe7c7f5c251fef3885ee3833d1046.zip opie-71f0618e5fdfe7c7f5c251fef3885ee3833d1046.tar.gz opie-71f0618e5fdfe7c7f5c251fef3885ee3833d1046.tar.bz2 |
open dotfiles from setDocument differently
-rw-r--r-- | core/apps/textedit/textedit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 8b3c4c6..af427ac 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -960,34 +960,35 @@ void TextEdit::updateCaption( const QString &name ) { if ( s.isEmpty() ) { s = tr( "Unnamed" ); currentFileName=s; } // if(s.left(1) == "/") // s = s.right(s.length()-1); setCaption( s + " - " + tr("Text Editor") ); } } void TextEdit::setDocument(const QString& fileref) { if(fileref != "Unnamed") { currentFileName=fileref; qDebug("setDocument"); QFileInfo fi(currentFileName); qDebug("basename:"+fi.baseName()+": current filenmame "+currentFileName); - if(fi.baseName().left(1) == "") { - // openDotFile(currentFileName); + if( (fi.baseName().left(1)).isEmpty() ) { + openDotFile(currentFileName); + } else { qDebug("setDoc open"); bFromDocView = true; openFile(fileref); editor->setEdited(true); edited1=false; edited=true; // fromSetDocument=false; // doSearchBar(); } } updateCaption( currentFileName); } void TextEdit::changeFont() { QDialog *d = new QDialog ( this, "FontDialog", true ); |