summaryrefslogtreecommitdiffstats
path: root/kate/app/katemainwindow.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2013-12-04 22:58:13 +0100
committerSlávek Banko <[email protected]>2013-12-04 22:58:13 +0100
commitb88d1a9c266a40f669b8efbe709449e14872c78f (patch)
tree562cfa6e2115ae1a43ad55e033b9a05044f1560d /kate/app/katemainwindow.cpp
parent91ff56bbdfba808ec4d0ebe00325454120f9cd0f (diff)
downloadtdebase-b88d1a9c266a40f669b8efbe709449e14872c78f.tar.gz
tdebase-b88d1a9c266a40f669b8efbe709449e14872c78f.zip
Fix adding newly created documents to MRU list in kate
This resolves Bug 1680
Diffstat (limited to 'kate/app/katemainwindow.cpp')
-rw-r--r--kate/app/katemainwindow.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp
index ada436a07..14a5341c5 100644
--- a/kate/app/katemainwindow.cpp
+++ b/kate/app/katemainwindow.cpp
@@ -791,12 +791,19 @@ bool KateMainWindow::showModOnDiskPrompt()
void KateMainWindow::slotDocumentCreated (Kate::Document *doc)
{
connect(doc,TQT_SIGNAL(modStateChanged(Kate::Document *)),this,TQT_SLOT(updateCaption(Kate::Document *)));
- connect(doc,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(updateCaption(Kate::Document *)));
+ connect(doc,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(slotNameChanged(Kate::Document *)));
connect(doc,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(slotUpdateOpenWith()));
updateCaption (doc);
}
+void KateMainWindow::slotNameChanged(Kate::Document *doc)
+{
+ updateCaption(doc);
+ if (!doc->url().isEmpty())
+ fileOpenRecent->addURL(doc->url());
+}
+
void KateMainWindow::updateCaption (Kate::Document *doc)
{
if (!m_viewManager->activeView())