author | llornkcor <llornkcor> | 2002-10-03 13:04:26 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-10-03 13:04:26 (UTC) |
commit | 8a7f57c5c172958d67d8397eed1860c914df485d (patch) (side-by-side diff) | |
tree | f665602210cf23240c626dabb15b2b4e13ad5e60 /core | |
parent | ee864e9e055fd23778a8e5dd3c35e3a29cded368 (diff) | |
download | opie-8a7f57c5c172958d67d8397eed1860c914df485d.zip opie-8a7f57c5c172958d67d8397eed1860c914df485d.tar.gz opie-8a7f57c5c172958d67d8397eed1860c914df485d.tar.bz2 |
fix not opening
-rw-r--r-- | core/apps/textedit/textedit.cpp | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 7b50a6c..6844023 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -389,3 +389,3 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) - cfg. setGroup ( "Font" ); + cfg. setGroup ( "Font" ); @@ -410,4 +410,4 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) - bool wrap = cfg. readBoolEntry ( "Wrap", true ); - wa-> setOn ( wrap ); + bool wrap = cfg. readBoolEntry ( "Wrap", true ); + wa-> setOn ( wrap ); setWordWrap ( wrap ); @@ -430,4 +430,4 @@ TextEdit::~TextEdit() { void TextEdit::cleanUp() { - qDebug("cleanUp");// save(); - + qDebug("cleanUp");// save(); + Config cfg ( "TextEdit" ); @@ -443,3 +443,3 @@ void TextEdit::cleanUp() { cfg. writeEntry ( "FileView", viewSelection ); - cfg. writeEntry ( "AdvancedFeatures", useAdvancedFeatures ); + cfg. writeEntry ( "AdvancedFeatures", useAdvancedFeatures ); } @@ -626,3 +626,4 @@ void TextEdit::openFile( const QString &f ) { 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("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) ) { @@ -637,6 +638,6 @@ void TextEdit::openFile( const QString &f ) { } else { - DocLnk sf(f); - filer = sf.file(); -// filer = f; -// fileIs = TRUE; + DocLnk sf(f); + filer = sf.file(); + if(filer.right(1) == "/") + filer = f; } @@ -884,12 +885,12 @@ void TextEdit::closeEvent( QCloseEvent *e ) { void TextEdit::changeFont() { - QDialog *d = new QDialog ( this, "FontDialog", true ); - d-> setCaption ( tr( "Choose font" )); - QBoxLayout *lay = new QVBoxLayout ( d ); - OFontSelector *ofs = new OFontSelector ( true, d ); - lay-> addWidget ( ofs ); - ofs-> setSelectedFont ( editor-> font ( )); - - d-> showMaximized ( ); + QDialog *d = new QDialog ( this, "FontDialog", true ); + d-> setCaption ( tr( "Choose font" )); + QBoxLayout *lay = new QVBoxLayout ( d ); + OFontSelector *ofs = new OFontSelector ( true, d ); + lay-> addWidget ( ofs ); + ofs-> setSelectedFont ( editor-> font ( )); + + d-> showMaximized ( ); if ( d-> exec ( ) == QDialog::Accepted ) - editor-> setFont ( ofs-> selectedFont ( )); + editor-> setFont ( ofs-> selectedFont ( )); delete d; |