summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp9
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 )
if ( s.isEmpty() ) {
s = tr( "Unnamed" );
currentFileName=s;
}
setCaption( s + " - " + tr("Text Editor") );
}
}
void TextEdit::setDocument(const QString& fileref)
{
bFromDocView = TRUE;
+ qDebug("setDocument "+fileref);
+ bFromDocView = TRUE;
+ if(fileref.find(".desktop",0,TRUE) == -1) {
openFile(fileref);
-// bFromDocView = TRUE;
-// openFile(DocLnk(fileref));
-// showEditTools();
+ } else {
+ openFile(DocLnk(fileref));
+ }
}
void TextEdit::closeEvent( QCloseEvent *e )
{
if ( editorStack->visibleWidget() == fileSelector && !bFromDocView ) {
e->ignore();
repaint();
// fileRevert();
} else {
bFromDocView = FALSE;
e->accept();