summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -270,3 +270,2 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
-//
a = new QAction( tr( "Save" ), QPixmap(( const char** ) filesave_xpm ) , QString::null, 0, this, 0 );
@@ -406,12 +405,4 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
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();
}
@@ -628,3 +619,3 @@ void TextEdit::newFile( const DocLnk &f )
doc = new DocLnk(nf);
-// updateCaption();
+ updateCaption(currentFileName);
}
@@ -770,3 +761,3 @@ void TextEdit::updateCaption( const QString &name )
s = doc->name();
- if ( s.isEmpty() ) {
+ if ( s.isEmpty() ) {
s = tr( "Unnamed" );
@@ -774,2 +765,3 @@ void TextEdit::updateCaption( const QString &name )
}
+
setCaption( s + " - " + tr("Text Editor") );
@@ -781,3 +773,3 @@ void TextEdit::setDocument(const QString& fileref)
bFromDocView = TRUE;
- openFile(DocLnk(fileref));
+ openFile(DocLnk(fileref));
// showEditTools();