[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:21:20 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=1e5ab87

The following commit has been merged in the master branch:
commit 1e5ab87c36236b1dbdb149c8a84adcec84af3c46
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Tue Feb 28 13:06:14 2012 +0100

    Handle %serviceIconImg%
---
 lib/adium-theme-header-info.cpp | 11 +++++++++++
 lib/adium-theme-header-info.h   |  4 ++++
 lib/adium-theme-view.cpp        |  2 ++
 lib/chat-widget.cpp             |  1 +
 4 files changed, 18 insertions(+)

diff --git a/lib/adium-theme-header-info.cpp b/lib/adium-theme-header-info.cpp
index 9f56810..d6728f5 100644
--- a/lib/adium-theme-header-info.cpp
+++ b/lib/adium-theme-header-info.cpp
@@ -31,6 +31,7 @@ public:
     QUrl incomingIconPath;
     QUrl outgoingIconPath;
     QDateTime timeOpened;
+    QString serviceIconImg;
 };
 
 AdiumThemeHeaderInfo::AdiumThemeHeaderInfo()
@@ -123,3 +124,13 @@ void AdiumThemeHeaderInfo::setTimeOpened(const QDateTime& timeOpened)
 {
     d->timeOpened = timeOpened;
 };
+
+QString AdiumThemeHeaderInfo::serviceIconImg() const
+{
+    return d->serviceIconImg;
+}
+
+void AdiumThemeHeaderInfo::setServiceIconImage(const QString& serviceIconImg)
+{
+    d->serviceIconImg = serviceIconImg;
+}
diff --git a/lib/adium-theme-header-info.h b/lib/adium-theme-header-info.h
index 5b5c769..1f7afee 100644
--- a/lib/adium-theme-header-info.h
+++ b/lib/adium-theme-header-info.h
@@ -73,6 +73,10 @@ public:
     QDateTime timeOpened() const;
     void setTimeOpened(const QDateTime &timeOpened);
 
+    /** The protocol image of the service */
+    QString serviceIconImg() const;
+    void setServiceIconImage(const QString &serviceIconImg);
+
 private:
     AdiumThemeHeaderInfoPrivate *const d;
 
diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index 0d9aaf2..36dabf8 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -382,6 +382,8 @@ QString AdiumThemeView::replaceHeaderKeywords(QString htmlTemplate, const AdiumT
         QString timeKeyword = formatTime(timeRegExp.cap(1), info.timeOpened());
         htmlTemplate.replace(pos , timeRegExp.cap(0).length() , timeKeyword);
     }
+    htmlTemplate.replace(QLatin1String("%serviceIconImg%"),
+                         QString::fromLatin1("<img src=\"%1\" class=\"serviceIcon\" />").arg(info.serviceIconImg()));
     return htmlTemplate;
 }
 
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index c6233bb..c0615bd 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -152,6 +152,7 @@ ChatWidget::ChatWidget(const Tp::TextChannelPtr & channel, const Tp::AccountPtr
     //set up anything related to 'self'
     info.setOutgoingIconPath(d->channel->groupSelfContact()->avatarData().fileName);
     info.setTimeOpened(QDateTime::currentDateTime());
+    info.setServiceIconImage(KIconLoader::global()->iconPath(d->account->iconName(), KIconLoader::Panel));
     connect(d->ui.chatArea, SIGNAL(loadFinished(bool)), SLOT(chatViewReady()), Qt::QueuedConnection);
     d->ui.chatArea->initialise(info);
 

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list