Commit eab99f78 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 163978 - Kontact name disappears from composer titlebar when

subjects last word is Kontact
FIXED-IN: 4.8.1
BUG: 163978
(cherry picked from commit acb3eca9)
parent 633880a6
......@@ -34,6 +34,7 @@
#include "kmkernel.h"
#include <kglobal.h>
#include <klocale.h>
#include <QCloseEvent>
......@@ -76,6 +77,21 @@ namespace KMail {
}
}
void SecondaryWindow::setCaption( const QString &userCaption )
{
QString caption = KGlobal::caption();
QString captionString = userCaption.isEmpty() ? caption : userCaption;
if ( !userCaption.isEmpty() ) {
// Add the application name if:
// User asked for it, it's not a duplication and the app name (caption()) is not empty
if ( !caption.isEmpty() ) {
captionString += i18nc("Document/application separator in titlebar", " – ") + caption;
}
}
setWindowTitle(captionString);
}
} // namespace KMail
#include "secondarywindow.moc"
......@@ -48,6 +48,13 @@ namespace KMail {
public:
SecondaryWindow( const char * name = 0 );
~SecondaryWindow();
public Q_SLOTS:
/**
* Reimplement because we have this bug #Bug 163978
* @brief setCaption
* @param caption
*/
virtual void setCaption( const QString &caption);
protected:
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment