summaryrefslogtreecommitdiff
Unidiff
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
@@ -501,9 +501,6 @@ void TextEdit::fileNew()
501 501
502void TextEdit::fileOpen() 502void TextEdit::fileOpen()
503{ 503{
504 // OFileSelector *fileSelector;
505 // fileSelector = new OFileSelector( this, 1,1,"/","", "text/*");
506 //fileSelector->showMaximized();
507 QString str = OFileDialog::getOpenFileName(1,"/","", QStringList() , this ); 504 QString str = OFileDialog::getOpenFileName(1,"/","", QStringList() , this );
508 if(!str.isEmpty() ) 505 if(!str.isEmpty() )
509 openFile( str ); 506 openFile( str );
@@ -645,10 +642,10 @@ void TextEdit::openFile( const QString &f )
645 qDebug("filename is "+ f); 642 qDebug("filename is "+ f);
646 QString filer; 643 QString filer;
647// bFromDocView = TRUE; 644// bFromDocView = TRUE;
648 if(f.find(".desktop",0,TRUE)) { 645 if(f.find(".desktop",0,TRUE) != -1) {
649 switch ( QMessageBox::warning(this,tr("Text Editor"), 646 switch ( QMessageBox::warning(this,tr("Text Editor"),
650 tr("Text Editor has detected\n you selected a .desktop file.\nOpen .desktop file or linked file?"), 647 tr("Text Editor has detected\n you selected a .desktop file.\nOpen .desktop file or linked file?"),
651 tr(".desktop File"),tr("Link"),0,0,1) ) { 648 tr(".desktop File"),tr("Linked Document"),0,1,1) ) {
652 case 0: 649 case 0:
653 filer = f; 650 filer = f;
654 break; 651 break;
@@ -657,7 +654,9 @@ void TextEdit::openFile( const QString &f )
657 filer = sf.file(); 654 filer = sf.file();
658 break; 655 break;
659 } 656 }
660 } 657 } else
658 filer = f;
659
661 DocLnk nf; 660 DocLnk nf;
662 nf.setType("text/plain"); 661 nf.setType("text/plain");
663 nf.setFile(filer); 662 nf.setFile(filer);
@@ -682,7 +681,7 @@ void TextEdit::openFile( const DocLnk &f )
682// bFromDocView = TRUE; 681// bFromDocView = TRUE;
683 FileManager fm; 682 FileManager fm;
684 QString txt; 683 QString txt;
685 currentFileName=f.name(); 684 currentFileName=f.file();
686 qDebug("openFile doclnk " + currentFileName); 685 qDebug("openFile doclnk " + currentFileName);
687 if ( !fm.loadFile( f, txt ) ) { 686 if ( !fm.loadFile( f, txt ) ) {
688 // ####### could be a new file 687 // ####### could be a new file