summaryrefslogtreecommitdiff
path: root/quacker/quacker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quacker/quacker.cpp')
-rw-r--r--quacker/quacker.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/quacker/quacker.cpp b/quacker/quacker.cpp
index ffe6531..01e778a 100644
--- a/quacker/quacker.cpp
+++ b/quacker/quacker.cpp
@@ -788,7 +788,14 @@ void TopLevel::setCaption(const QString &text)
if (!text.isNull())
m_ourCaption = text;
- setWindowTitle(QString("%1[*] - Quackle").arg(m_ourCaption));
+ if (m_filename.isEmpty())
+ setWindowTitle(QString("%1 - Quackle").arg(m_ourCaption));
+ else
+ {
+ QString filename = QDir::fromNativeSeparators(m_filename);
+ filename = filename.mid(filename.lastIndexOf('/') + 1);
+ setWindowTitle(QString("%1[*] - %2 - Quackle").arg(filename, m_ourCaption));
+ }
}
void TopLevel::setModified(bool modified)