From 41d125f02fb485f963818efea9f32f3f29148710 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Sun, 01 Sep 2002 13:16:27 +0000 Subject: added a few remaining tr, fixed a few bugs --- (limited to 'core/apps/textedit') diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index d61da2a..8eaafce 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -441,10 +441,12 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) } TextEdit::~TextEdit() { + if( edited1 & !useAdvancedFeatures ) + saveAs(); } void TextEdit::cleanUp() { -// save(); +qDebug("cleanUp");// save(); Config cfg("TextEdit"); cfg.setGroup("View"); QFont f = editor->font(); @@ -457,7 +459,7 @@ void TextEdit::cleanUp() { void TextEdit::accept() { - if(edited1) + if( edited1) saveAs(); exit(0); } @@ -635,7 +637,7 @@ void TextEdit::openFile( const QString &f ) { // bFromDocView = TRUE; if(f.find(".desktop",0,TRUE) != -1 && useAdvancedFeatures) { 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("Text Editor has detected
you selected a .desktop file.
Open .desktop file or linked file?"), tr(".desktop File"),tr("Linked Document"),0,1,1) ) { case 0: filer = f; @@ -646,8 +648,10 @@ void TextEdit::openFile( const QString &f ) { break; } } else { - filer = f; - fileIs = TRUE; + DocLnk sf(f); + filer = sf.file(); +// filer = f; +// fileIs = TRUE; } DocLnk nf; @@ -737,7 +741,7 @@ bool TextEdit::save() { QCString crt = rt.utf8(); f.writeBlock(crt,crt.length()); } else { - QMessageBox::message("Text Edit","Write Failed"); + QMessageBox::message(tr("Text Edit"),tr("Write Failed")); return false; } @@ -914,7 +918,7 @@ void TextEdit::changeFont() { } void TextEdit::editDelete() { - switch ( QMessageBox::warning(this,tr("Text Editor"),tr("Do you really want\nto delete the current file\nfrom the disk?\nThis is irreversable!!"),tr("Yes"),tr("No"),0,0,1) ) { + switch ( QMessageBox::warning(this,tr("Text Editor"),tr("Do you really want
to delete the current file\nfrom the disk?
This is irreversable!!"),tr("Yes"),tr("No"),0,0,1) ) { case 0: if(doc) { doc->removeFiles(); @@ -957,10 +961,10 @@ void TextEdit::receive(const QCString&msg, const QByteArray&) { } void TextEdit::doAbout() { - QMessageBox::about(0,"Text Edit","Text Edit is copyright\n" - "2000 Trolltech AS, and\n" - "2002 by L.J.Potter \nljp@llornkcor.com\n" - "and is licensed under the GPL"); + QMessageBox::about(0,tr("Text Edit"),tr("Text Edit is copyright
" + "2000 Trolltech AS, and
" + "2002 by L. J. Potter
llornkcor@handhelds.org

" + "and is licensed under the GPL")); } void TextEdit::doAdvanced(bool b) { -- cgit v0.9.0.2