summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 834bd8c..18402d4 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -502,7 +502,4 @@ void TextEdit::fileNew()
void TextEdit::fileOpen()
{
- // OFileSelector *fileSelector;
- // fileSelector = new OFileSelector( this, 1,1,"/","", "text/*");
- //fileSelector->showMaximized();
QString str = OFileDialog::getOpenFileName(1,"/","", QStringList() , this );
if(!str.isEmpty() )
@@ -646,8 +643,8 @@ void TextEdit::openFile( const QString &f )
QString filer;
// bFromDocView = TRUE;
- if(f.find(".desktop",0,TRUE)) {
+ if(f.find(".desktop",0,TRUE) != -1) {
switch ( QMessageBox::warning(this,tr("Text Editor"),
- tr("Text Editor has detected\n you selected a .desktop file.\nOpen .desktop file or linked file?"),
- tr(".desktop File"),tr("Link"),0,0,1) ) {
+ tr("Text Editor has detected\n you selected a .desktop file.\nOpen .desktop file or linked file?"),
+ tr(".desktop File"),tr("Linked Document"),0,1,1) ) {
case 0:
filer = f;
@@ -658,5 +655,7 @@ void TextEdit::openFile( const QString &f )
break;
}
- }
+ } else
+ filer = f;
+
DocLnk nf;
nf.setType("text/plain");
@@ -683,5 +682,5 @@ void TextEdit::openFile( const DocLnk &f )
FileManager fm;
QString txt;
- currentFileName=f.name();
+ currentFileName=f.file();
qDebug("openFile doclnk " + currentFileName);
if ( !fm.loadFile( f, txt ) ) {