summaryrefslogtreecommitdiff
authorgroucho <groucho>2003-04-14 12:44:57 (UTC)
committer groucho <groucho>2003-04-14 12:44:57 (UTC)
commit67b910552a63323139d35c2b281d29b670749377 (patch) (side-by-side diff)
treecf8c8679cdd08162a411fd3ae370bed2f88852ae
parent17711870c07e4bae697518956b6db2766e62a973 (diff)
downloadopie-67b910552a63323139d35c2b281d29b670749377.zip
opie-67b910552a63323139d35c2b281d29b670749377.tar.gz
opie-67b910552a63323139d35c2b281d29b670749377.tar.bz2
Linebreak prevented translation - fixed
Diffstat (more/less context) (show 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
@@ -653,100 +653,97 @@ void TextEdit::findClose() {
}
void TextEdit::search() {
editor->find( searchEdit->text(), false, false );
}
void TextEdit::newFile( const DocLnk &f ) {
DocLnk nf = f;
nf.setType("text/plain");
clear();
setWState (WState_Reserved1 );
editor->setFocus();
doc = new DocLnk(nf);
currentFileName = "Unnamed";
qDebug("newFile "+currentFileName);
updateCaption( currentFileName);
// editor->setEdited( false);
}
void TextEdit::openDotFile( const QString &f ) {
if(!currentFileName.isEmpty()) {
currentFileName=f;
qDebug("openFile dotfile " + currentFileName);
QString txt;
QFile file(f);
file.open(IO_ReadWrite);
QTextStream t(&file);
while ( !t.atEnd()) {
txt+=t.readLine()+"\n";
}
editor->setText(txt);
editor->setEdited( false);
edited1=false;
edited=false;
}
updateCaption( currentFileName);
}
void TextEdit::openFile( const QString &f ) {
qDebug("filename is "+ f);
QString filer;
QFileInfo fi( f);
// bFromDocView = true;
if(f.find(".desktop",0,true) != -1 && !openDesktop )
{
- 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) )
+ 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) )
{
case 0: //desktop
filer = f;
break;
case 1: //linked
DocLnk sf(f);
filer = sf.file();
break;
};
}
else if(fi.baseName().left(1) == "")
{
qDebug("opening dotfile");
currentFileName=f;
openDotFile(currentFileName);
return;
}
else
{
DocLnk sf(f);
filer = sf.file();
if(filer.right(1) == "/")
filer = f;
}
DocLnk nf;
nf.setType("text/plain");
nf.setFile(filer);
currentFileName=filer;
nf.setName(fi.baseName());
openFile(nf);
qDebug("openFile string "+currentFileName);
showEditTools();
// Show filename in caption
QString name = filer;
int sep = name.findRev( '/' );
if ( sep > 0 )
name = name.mid( sep+1 );
updateCaption( name );
}
void TextEdit::openFile( const DocLnk &f ) {
// clear();
// bFromDocView = true;
FileManager fm;