author | llornkcor <llornkcor> | 2002-12-22 17:30:50 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-12-22 17:30:50 (UTC) |
commit | a907eb4d3c6ca142dcab7889d8932ccb452bf07c (patch) (unidiff) | |
tree | 985933c8c2dd1f49dee60c898b3b951f99f4eaf3 /noncore | |
parent | d7859bf6df42c36f87ecaa560754b3b3b3c2e78e (diff) | |
download | opie-a907eb4d3c6ca142dcab7889d8932ccb452bf07c.zip opie-a907eb4d3c6ca142dcab7889d8932ccb452bf07c.tar.gz opie-a907eb4d3c6ca142dcab7889d8932ccb452bf07c.tar.bz2 |
add fileName to tab instead of BLAH
-rw-r--r-- | noncore/apps/tinykate/tinykate.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/tinykate/tinykate.cpp b/noncore/apps/tinykate/tinykate.cpp index f177e47..a823530 100644 --- a/noncore/apps/tinykate/tinykate.cpp +++ b/noncore/apps/tinykate/tinykate.cpp | |||
@@ -149,25 +149,26 @@ TinyKate::TinyKate( QWidget *parent, const char *name, WFlags f) : | |||
149 | void TinyKate::slotOpen( ) | 149 | void TinyKate::slotOpen( ) |
150 | { | 150 | { |
151 | QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED_ALL); | 151 | QString filename=OFileDialog::getOpenFileName(OFileSelector::EXTENDED_ALL); |
152 | if (!filename.isEmpty()) { | 152 | if (!filename.isEmpty()) { |
153 | open(filename); | 153 | open(filename); |
154 | } | 154 | } |
155 | } | 155 | } |
156 | 156 | ||
157 | void TinyKate::open(const QString & filename) | 157 | void TinyKate::open(const QString & filename) |
158 | { | 158 | { |
159 | KateDocument *kd= new KateDocument(false, false, this,0,this); | 159 | KateDocument *kd= new KateDocument(false, false, this,0,this); |
160 | KTextEditor::View *kv; | 160 | KTextEditor::View *kv; |
161 | tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate","BLAH"); | 161 | QFileInfo fi(filename); |
162 | tabwidget->addTab(kv=kd->createView(tabwidget,"bLAH"),"tinykate/tinykate",fi.fileName()); | ||
162 | qDebug(filename); | 163 | qDebug(filename); |
163 | kd->open(filename); | 164 | kd->open(filename); |
164 | viewCount++; | 165 | viewCount++; |
165 | } | 166 | } |
166 | 167 | ||
167 | void TinyKate::slotCurrentChanged( QWidget * view) | 168 | void TinyKate::slotCurrentChanged( QWidget * view) |
168 | { | 169 | { |
169 | if (currentView) { | 170 | if (currentView) { |
170 | disconnect(editCopy,SIGNAL(activated()),currentView,SLOT(copy())); | 171 | disconnect(editCopy,SIGNAL(activated()),currentView,SLOT(copy())); |
171 | disconnect(editCut,SIGNAL(activated()),currentView,SLOT(cut())); | 172 | disconnect(editCut,SIGNAL(activated()),currentView,SLOT(cut())); |
172 | disconnect(editPaste,SIGNAL(activated()),currentView,SLOT(paste())); | 173 | disconnect(editPaste,SIGNAL(activated()),currentView,SLOT(paste())); |
173 | disconnect(editUndo,SIGNAL(activated()),currentView,SLOT(undo())); | 174 | disconnect(editUndo,SIGNAL(activated()),currentView,SLOT(undo())); |