summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp14
1 files changed, 3 insertions, 11 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
@@ -267,9 +267,8 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
connect( a, SIGNAL( activated() ), this, SLOT( newFileOpen() ) );
a->addTo( bar );
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() ) );
// a->addTo( bar );
file->insertSeparator();
@@ -403,17 +402,9 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
editor->setFont( defaultFont);
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();
}
TextEdit::~TextEdit()
@@ -625,9 +616,9 @@ void TextEdit::newFile( const DocLnk &f )
editorStack->raiseWidget( editor );
setWState (WState_Reserved1 );
editor->setFocus();
doc = new DocLnk(nf);
-// updateCaption();
+ updateCaption(currentFileName);
}
void TextEdit::openFile( const QString &f )
{
@@ -771,8 +762,9 @@ void TextEdit::updateCaption( const QString &name )
if ( s.isEmpty() ) {
s = tr( "Unnamed" );
currentFileName=s;
}
+
setCaption( s + " - " + tr("Text Editor") );
}
}