-rw-r--r-- | core/apps/textedit/textedit.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index f138572..0f19da9 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp | |||
@@ -823,28 +823,31 @@ void TextEdit::updateCaption( const QString &name ) | |||
823 | if ( s.isEmpty() ) { | 823 | if ( s.isEmpty() ) { |
824 | s = tr( "Unnamed" ); | 824 | s = tr( "Unnamed" ); |
825 | currentFileName=s; | 825 | currentFileName=s; |
826 | } | 826 | } |
827 | 827 | ||
828 | setCaption( s + " - " + tr("Text Editor") ); | 828 | setCaption( s + " - " + tr("Text Editor") ); |
829 | } | 829 | } |
830 | } | 830 | } |
831 | 831 | ||
832 | void TextEdit::setDocument(const QString& fileref) | 832 | void TextEdit::setDocument(const QString& fileref) |
833 | { | 833 | { |
834 | bFromDocView = TRUE; | 834 | bFromDocView = TRUE; |
835 | qDebug("setDocument "+fileref); | ||
836 | bFromDocView = TRUE; | ||
837 | if(fileref.find(".desktop",0,TRUE) == -1) { | ||
835 | openFile(fileref); | 838 | openFile(fileref); |
836 | // bFromDocView = TRUE; | 839 | } else { |
837 | // openFile(DocLnk(fileref)); | 840 | openFile(DocLnk(fileref)); |
838 | // showEditTools(); | 841 | } |
839 | } | 842 | } |
840 | 843 | ||
841 | void TextEdit::closeEvent( QCloseEvent *e ) | 844 | void TextEdit::closeEvent( QCloseEvent *e ) |
842 | { | 845 | { |
843 | if ( editorStack->visibleWidget() == fileSelector && !bFromDocView ) { | 846 | if ( editorStack->visibleWidget() == fileSelector && !bFromDocView ) { |
844 | e->ignore(); | 847 | e->ignore(); |
845 | repaint(); | 848 | repaint(); |
846 | // fileRevert(); | 849 | // fileRevert(); |
847 | 850 | ||
848 | } else { | 851 | } else { |
849 | bFromDocView = FALSE; | 852 | bFromDocView = FALSE; |
850 | e->accept(); | 853 | e->accept(); |