Diffstat (limited to 'core/apps/textedit/textedit.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/apps/textedit/textedit.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 14bc496..429c195 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -487,3 +487,5 @@ void TextEdit::fileNew() | |||
487 | { | 487 | { |
488 | if( !bFromDocView ) { | ||
488 | save(); | 489 | save(); |
490 | } | ||
489 | newFile(DocLnk()); | 491 | newFile(DocLnk()); |
@@ -514,3 +516,3 @@ void TextEdit::fileOpen() | |||
514 | fileSelector->reread(); | 516 | fileSelector->reread(); |
515 | updateCaption(); | 517 | updateCaption(currentFileName); |
516 | } | 518 | } |
@@ -521,3 +523,3 @@ void TextEdit::newFileOpen() | |||
521 | browseForFiles=new fileBrowser(this,"fileBrowser",TRUE,0, "*"); | 523 | browseForFiles=new fileBrowser(this,"fileBrowser",TRUE,0, "*"); |
522 | browseForFiles->exec(); | 524 | if( browseForFiles->exec()!= 0 ) { |
523 | QString selFile= browseForFiles->selectedFileName; | 525 | QString selFile= browseForFiles->selectedFileName; |
@@ -533,3 +535,3 @@ void TextEdit::newFileOpen() | |||
533 | currentFileName = fileName; | 535 | currentFileName = fileName; |
534 | qDebug("please open "+currentFileName); | 536 | // qDebug("please open "+currentFileName); |
535 | openFile(fileName ); | 537 | openFile(fileName ); |
@@ -537,2 +539,3 @@ void TextEdit::newFileOpen() | |||
537 | } | 539 | } |
540 | } | ||
538 | delete browseForFiles; | 541 | delete browseForFiles; |
@@ -621,3 +624,3 @@ void TextEdit::newFile( const DocLnk &f ) | |||
621 | doc = new DocLnk(nf); | 624 | doc = new DocLnk(nf); |
622 | updateCaption(); | 625 | // updateCaption(); |
623 | } | 626 | } |
@@ -643,2 +646,3 @@ void TextEdit::openFile( const DocLnk &f ) | |||
643 | // clear(); | 646 | // clear(); |
647 | bFromDocView = TRUE; | ||
644 | FileManager fm; | 648 | FileManager fm; |
@@ -658,3 +662,3 @@ void TextEdit::openFile( const DocLnk &f ) | |||
658 | editor->setEdited(FALSE); | 662 | editor->setEdited(FALSE); |
659 | updateCaption(); | 663 | updateCaption(currentFileName); |
660 | } | 664 | } |
@@ -671,3 +675,3 @@ void TextEdit::showEditTools() | |||
671 | searchBar->show(); | 675 | searchBar->show(); |
672 | updateCaption(); | 676 | // updateCaption(); |
673 | editorStack->raiseWidget( editor ); | 677 | editorStack->raiseWidget( editor ); |
@@ -688,2 +692,3 @@ bool TextEdit::save() | |||
688 | QString rt = editor->text(); | 692 | QString rt = editor->text(); |
693 | qDebug(currentFileName); | ||
689 | 694 | ||
@@ -713,3 +718,3 @@ bool TextEdit::save() | |||
713 | fileSaveDlg=new fileSaver(this,"SaveFile",TRUE,0, currentFileName); | 718 | fileSaveDlg=new fileSaver(this,"SaveFile",TRUE,0, currentFileName); |
714 | fileSaveDlg->exec(); | 719 | if( fileSaveDlg->exec() != 0 ) { |
715 | QString fileNm=fileSaveDlg->selectedFileName; | 720 | QString fileNm=fileSaveDlg->selectedFileName; |
@@ -717,3 +722,4 @@ bool TextEdit::save() | |||
717 | doc->setName(fileNm); | 722 | doc->setName(fileNm); |
718 | updateCaption(); | 723 | updateCaption(fileNm); |
724 | } | ||
719 | delete fileSaveDlg; | 725 | delete fileSaveDlg; |