author | llornkcor <llornkcor> | 2002-03-13 02:57:16 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-13 02:57:16 (UTC) |
commit | 13d8ac43bf8d4c6e492e57d2ab3c7353935a9365 (patch) (side-by-side diff) | |
tree | 4efc47c39ebde1ad5bc6fe824b79d19ccb2cab7d | |
parent | ad4f318f600a00905d45a780cd100bcf1e08efaa (diff) | |
download | opie-13d8ac43bf8d4c6e492e57d2ab3c7353935a9365.zip opie-13d8ac43bf8d4c6e492e57d2ab3c7353935a9365.tar.gz opie-13d8ac43bf8d4c6e492e57d2ab3c7353935a9365.tar.bz2 |
I fixed somethin
-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 f031a0f..c46f089 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -722,48 +722,49 @@ bool TextEdit::save() qDebug(file); QString name= doc->name(); qDebug(name); QString rt = editor->text(); if( !rt.isEmpty() ) { if(name.isEmpty()) { saveAs(); } else { currentFileName= name ; qDebug("saveFile "+currentFileName); struct stat buf; mode_t mode; stat(file.latin1(), &buf); mode = buf.st_mode; doc->setName( name); FileManager fm; if ( !fm.saveFile( *doc, rt ) ) { return false; } editor->setEdited( FALSE); edited1=FALSE; edited=FALSE; + if(caption().left(1)=="*") setCaption(caption().right(caption().length()-1)); chmod( file.latin1(), mode); } return true; } return false; } /*! prompted save */ bool TextEdit::saveAs() { // qDebug("saveAsFile "+currentFileName); // case of nothing to save... /// there's always something to save // if ( !doc )//|| !bFromDocView) // { // qDebug("no doc"); // return true; // } if ( !editor->edited() ) { delete doc; @@ -811,51 +812,51 @@ bool TextEdit::saveAs() delete doc; DocLnk nf; nf.setType("text/plain"); nf.setFile( fileNm); doc = new DocLnk(nf); // editor->setText(rt); // qDebug("openFile doclnk "+currentFileName); doc->setName( currentFileName); updateCaption( currentFileName); FileManager fm; if ( !fm.saveFile( *doc, rt ) ) { return false; } if( fileSaveDlg->filePermCheck->isChecked() ) { filePermissions *filePerm; filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)fileNm); filePerm->exec(); if( filePerm) delete filePerm; } } } - editor->setEdited( FALSE); + editor->setEdited(TRUE); edited1=FALSE; - edited=FALSE; + edited=TRUE; if(caption().left(1)=="*") setCaption(caption().right(caption().length()-1)); if(fileSaveDlg) delete fileSaveDlg; return true; } void TextEdit::clear() { delete doc; doc = 0; editor->clear(); } void TextEdit::updateCaption( const QString &name ) { if ( !doc ) setCaption( tr("Text Editor") ); else { QString s = name; if ( s.isNull() ) s = doc->name(); if ( s.isEmpty() ) { |