summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 21bf4b3..6f96574 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -677,52 +677,49 @@ void TextEdit::openDotFile( const QString &f ) {
677 QString txt; 677 QString txt;
678 QFile file(f); 678 QFile file(f);
679 file.open(IO_ReadWrite); 679 file.open(IO_ReadWrite);
680 QTextStream t(&file); 680 QTextStream t(&file);
681 while ( !t.atEnd()) { 681 while ( !t.atEnd()) {
682 txt+=t.readLine()+"\n"; 682 txt+=t.readLine()+"\n";
683 } 683 }
684 editor->setText(txt); 684 editor->setText(txt);
685 editor->setEdited( false); 685 editor->setEdited( false);
686 edited1=false; 686 edited1=false;
687 edited=false; 687 edited=false;
688 688
689 689
690 } 690 }
691 updateCaption( currentFileName); 691 updateCaption( currentFileName);
692} 692}
693 693
694void TextEdit::openFile( const QString &f ) { 694void TextEdit::openFile( const QString &f ) {
695 qDebug("filename is "+ f); 695 qDebug("filename is "+ f);
696 QString filer; 696 QString filer;
697 QFileInfo fi( f); 697 QFileInfo fi( f);
698// bFromDocView = true; 698// bFromDocView = true;
699 if(f.find(".desktop",0,true) != -1 && !openDesktop ) 699 if(f.find(".desktop",0,true) != -1 && !openDesktop )
700 { 700 {
701 switch ( QMessageBox::warning(this,tr("Text Editor"), 701 switch ( QMessageBox::warning(this,tr("Text Editor"),tr("Text Editor has detected<BR>you selected a <B>.desktop</B>file.<BR>Open<B>.desktop</B> file or <B>linked</B> file?"),tr(".desktop File"),tr("Linked Document"),0,1,1) )
702 tr("Text Editor has detected<BR>you selected a <B>.desktop</B>
703file.<BR>Open <B>.desktop</B> file or <B>linked</B> file?"),
704 tr(".desktop File"),tr("Linked Document"),0,1,1) )
705 { 702 {
706 case 0: //desktop 703 case 0: //desktop
707 filer = f; 704 filer = f;
708 break; 705 break;
709 case 1: //linked 706 case 1: //linked
710 DocLnk sf(f); 707 DocLnk sf(f);
711 filer = sf.file(); 708 filer = sf.file();
712 break; 709 break;
713 }; 710 };
714 } 711 }
715 else if(fi.baseName().left(1) == "") 712 else if(fi.baseName().left(1) == "")
716 { 713 {
717 qDebug("opening dotfile"); 714 qDebug("opening dotfile");
718 currentFileName=f; 715 currentFileName=f;
719 openDotFile(currentFileName); 716 openDotFile(currentFileName);
720 return; 717 return;
721 } 718 }
722 else 719 else
723 { 720 {
724 DocLnk sf(f); 721 DocLnk sf(f);
725 filer = sf.file(); 722 filer = sf.file();
726 if(filer.right(1) == "/") 723 if(filer.right(1) == "/")
727 filer = f; 724 filer = f;
728 } 725 }