summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-02-18 16:49:50 (UTC)
committer llornkcor <llornkcor>2002-02-18 16:49:50 (UTC)
commit6e03d71c0e471659e7899e6641b20c62088cf34c (patch) (side-by-side diff)
treed1f01af7b910ed78d50ace71870e07bf6efce4d2
parenta6266fb220a61c4904e24ebf31eeefab34362e59 (diff)
downloadopie-6e03d71c0e471659e7899e6641b20c62088cf34c.zip
opie-6e03d71c0e471659e7899e6641b20c62088cf34c.tar.gz
opie-6e03d71c0e471659e7899e6641b20c62088cf34c.tar.bz2
removed argv stuff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 834971a..8004771 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -269,5 +269,4 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
a->addTo( file );
-//
a = new QAction( tr( "Save" ), QPixmap(( const char** ) filesave_xpm ) , QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( save() ) );
@@ -405,14 +404,6 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
wa->setOn(wrap);
updateCaption();
- if( qApp->argc() > 1 ) {
- for (int i=1;i< qApp->argc();i++) {
- QString tmp;
- currentFileName = tmp.sprintf("%s",qApp->argv()[i]);
- qDebug(currentFileName);
- setDocument( currentFileName );
- }
- }
- else
- fileNew();
+
+ fileNew();
}
@@ -627,5 +618,5 @@ void TextEdit::newFile( const DocLnk &f )
editor->setFocus();
doc = new DocLnk(nf);
-// updateCaption();
+ updateCaption(currentFileName);
}
@@ -769,8 +760,9 @@ void TextEdit::updateCaption( const QString &name )
if ( s.isNull() )
s = doc->name();
- if ( s.isEmpty() ) {
+ if ( s.isEmpty() ) {
s = tr( "Unnamed" );
currentFileName=s;
}
+
setCaption( s + " - " + tr("Text Editor") );
}
@@ -780,5 +772,5 @@ void TextEdit::setDocument(const QString& fileref)
{
bFromDocView = TRUE;
- openFile(DocLnk(fileref));
+ openFile(DocLnk(fileref));
// showEditTools();
}