[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:19:05 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=73f946b
The following commit has been merged in the master branch:
commit 73f946b89e0dfed47f1d4f28246c51d0ce73f4c1
Author: Florian Reinhard <florian.reinhard at googlemail.com>
Date: Wed Mar 16 01:35:29 2011 +0100
Show a default icon in the text-ui when there is no avatar.
REVIEW:100866
BUG:268547
---
lib/adium-theme-view.cpp | 6 ++++--
lib/adium-theme-view.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index 1eefafb..94e8525 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -41,10 +41,12 @@
#include <KConfigGroup>
#include <KMessageBox>
#include <KToolInvocation>
-
+#include <KIconLoader>
AdiumThemeView::AdiumThemeView(QWidget *parent)
: QWebView(parent),
+ // check iconPath docs for minus sign in -KIconLoader::SizeLarge
+ m_defaultAvatar(KIconLoader::global()->iconPath("im-user",-KIconLoader::SizeLarge)),
m_displayHeader(true)
{
//determine the chat window style to use (from the Kopete config file).
@@ -284,7 +286,7 @@ QString AdiumThemeView::replaceHeaderKeywords(QString htmlTemplate, const AdiumT
QString AdiumThemeView::replaceContentKeywords(QString& htmlTemplate, const AdiumThemeContentInfo& info)
{
//userIconPath
- htmlTemplate.replace("%userIconPath%", info.userIconPath());
+ htmlTemplate.replace("%userIconPath%", !info.userIconPath().isEmpty() ? info.userIconPath() : m_defaultAvatar);
//senderScreenName
htmlTemplate.replace("%senderScreenName%", info.senderScreenName());
//sender
diff --git a/lib/adium-theme-view.h b/lib/adium-theme-view.h
index b984099..920e062 100644
--- a/lib/adium-theme-view.h
+++ b/lib/adium-theme-view.h
@@ -73,6 +73,7 @@ private:
QString formatTime(const QString&, const QDateTime&);
+ QString m_defaultAvatar;
QString m_lastSender;
bool m_displayHeader;
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list