summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 8b3c4c6..af427ac 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -960,34 +960,35 @@ void TextEdit::updateCaption( const QString &name ) {
960 if ( s.isEmpty() ) { 960 if ( s.isEmpty() ) {
961 s = tr( "Unnamed" ); 961 s = tr( "Unnamed" );
962 currentFileName=s; 962 currentFileName=s;
963 } 963 }
964// if(s.left(1) == "/") 964// if(s.left(1) == "/")
965// s = s.right(s.length()-1); 965// s = s.right(s.length()-1);
966 setCaption( s + " - " + tr("Text Editor") ); 966 setCaption( s + " - " + tr("Text Editor") );
967 } 967 }
968} 968}
969 969
970void TextEdit::setDocument(const QString& fileref) { 970void TextEdit::setDocument(const QString& fileref) {
971 if(fileref != "Unnamed") { 971 if(fileref != "Unnamed") {
972 currentFileName=fileref; 972 currentFileName=fileref;
973 qDebug("setDocument"); 973 qDebug("setDocument");
974 QFileInfo fi(currentFileName); 974 QFileInfo fi(currentFileName);
975 qDebug("basename:"+fi.baseName()+": current filenmame "+currentFileName); 975 qDebug("basename:"+fi.baseName()+": current filenmame "+currentFileName);
976 if(fi.baseName().left(1) == "") { 976 if( (fi.baseName().left(1)).isEmpty() ) {
977 // openDotFile(currentFileName); 977 openDotFile(currentFileName);
978
978 } else { 979 } else {
979 qDebug("setDoc open"); 980 qDebug("setDoc open");
980 bFromDocView = true; 981 bFromDocView = true;
981 openFile(fileref); 982 openFile(fileref);
982 editor->setEdited(true); 983 editor->setEdited(true);
983 edited1=false; 984 edited1=false;
984 edited=true; 985 edited=true;
985 // fromSetDocument=false; 986 // fromSetDocument=false;
986 // doSearchBar(); 987 // doSearchBar();
987 } 988 }
988 } 989 }
989 updateCaption( currentFileName); 990 updateCaption( currentFileName);
990} 991}
991 992
992void TextEdit::changeFont() { 993void TextEdit::changeFont() {
993 QDialog *d = new QDialog ( this, "FontDialog", true ); 994 QDialog *d = new QDialog ( this, "FontDialog", true );