summaryrefslogtreecommitdiff
path: root/core/apps/textedit/textedit.cpp
Side-by-side diff
Diffstat (limited to 'core/apps/textedit/textedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 6f96574..1c95a97 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -566,26 +566,24 @@ void TextEdit::fileNew() {
newFile(DocLnk());
}
void TextEdit::fileOpen() {
Config cfg("TextEdit");
cfg. setGroup ( "View" );
- QString dir = cfg.readEntry("LastOpenDirectory", QPEApplication::documentDir());
QMap<QString, QStringList> map;
map.insert(tr("All"), QStringList() );
QStringList text;
text << "text/*";
map.insert(tr("Text"), text );
text << "*";
map.insert(tr("All"), text );
QString str = OFileDialog::getOpenFileName( 2,
- dir ,
+ QString::null ,
QString::null, map);
if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() )
{
- cfg.writeEntry("LastOpenDirectory", QFileInfo(str).dirPath(false));
openFile( str );
}
else
updateCaption();
}
@@ -973,13 +971,13 @@ void TextEdit::updateCaption( const QString &name ) {
if ( s.isEmpty() ) {
s = tr( "Unnamed" );
currentFileName=s;
}
// if(s.left(1) == "/")
// s = s.right(s.length()-1);
- setCaption( s + " - " + tr("Text Editor") );
+ setCaption( tr("%1 - Text Editor").arg( s ) );
}
}
void TextEdit::setDocument(const QString& fileref) {
if(fileref != "Unnamed") {
currentFileName=fileref;
@@ -1019,13 +1017,13 @@ void TextEdit::changeFont() {
}
void TextEdit::editDelete() {
switch ( QMessageBox::warning(this,tr("Text Editor"),
tr("Do you really want<BR>to <B>delete</B> "
"the current file\nfrom the disk?<BR>This is "
- "<B>irreversable!!</B>"),
+ "<B>irreversable!</B>"),
tr("Yes"),tr("No"),0,0,1) ) {
case 0:
if(doc) {
doc->removeFiles();
clear();
setCaption( tr("Text Editor") );