diff --git a/lib/adium-theme-view.h b/lib/adium-theme-view.h --- a/lib/adium-theme-view.h +++ b/lib/adium-theme-view.h @@ -90,6 +90,8 @@ void setVariant(const QString& variant); ChatWindowStyle* chatStyle() const; + void setChatName(const QString &name); + /** Set the theme to use. Display will only change once initialise() is called.*/ void setChatStyle(ChatWindowStyle *chatStyle); void setUseCustomFont(bool); diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp --- a/lib/adium-theme-view.cpp +++ b/lib/adium-theme-view.cpp @@ -302,6 +302,13 @@ return m_chatStyle; } +void AdiumThemeView::setChatName(const QString &name) +{ + const QString js = QStringLiteral("var chatNameElement = document.querySelector(\"x-conversationWith\");\n" + "chatNameElement.innerHTML = \"%1\";").arg(name); + page()->runJavaScript(js); +} + void AdiumThemeView::setChatStyle(ChatWindowStyle *chatStyle) { m_chatStyle = chatStyle;