[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:20:18 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=2d68c42
The following commit has been merged in the master branch:
commit 2d68c4294663aa5752c0f4c85f9c3ab309520c36
Author: Dominik Schmidt <dev at dominik-schmidt.de>
Date: Fri Oct 14 15:26:19 2011 +0200
Fix first message after history from the same person being treated as
consecutive message.
Reviewed-by: David Edmundson
Not-tested-by: Dominik Schmidt, David Edmundson
---
lib/adium-theme-content-info.cpp | 8 ++++++++
lib/adium-theme-content-info.h | 1 +
lib/adium-theme-message-info.cpp | 7 +++++++
lib/adium-theme-message-info.h | 4 +++-
lib/adium-theme-view.cpp | 9 +++++----
lib/adium-theme-view.h | 4 ++--
6 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/lib/adium-theme-content-info.cpp b/lib/adium-theme-content-info.cpp
index 4c10a89..6fbb676 100644
--- a/lib/adium-theme-content-info.cpp
+++ b/lib/adium-theme-content-info.cpp
@@ -32,6 +32,14 @@ public:
QString textbackgroundcolor;
};
+AdiumThemeContentInfo::AdiumThemeContentInfo()
+ : AdiumThemeMessageInfo(),
+ d(new AdiumThemeContentInfoPrivate)
+{
+
+}
+
+
AdiumThemeContentInfo::AdiumThemeContentInfo(AdiumThemeMessageInfo::MessageType type)
: AdiumThemeMessageInfo(type),
d(new AdiumThemeContentInfoPrivate)
diff --git a/lib/adium-theme-content-info.h b/lib/adium-theme-content-info.h
index a5873c4..df4f70d 100644
--- a/lib/adium-theme-content-info.h
+++ b/lib/adium-theme-content-info.h
@@ -31,6 +31,7 @@ class AdiumThemeContentInfoPrivate;
class KDE_TELEPATHY_CHAT_EXPORT AdiumThemeContentInfo : public AdiumThemeMessageInfo
{
public:
+ AdiumThemeContentInfo();
explicit AdiumThemeContentInfo(AdiumThemeMessageInfo::MessageType);
explicit AdiumThemeContentInfo(const AdiumThemeContentInfo &other);
virtual ~AdiumThemeContentInfo();
diff --git a/lib/adium-theme-message-info.cpp b/lib/adium-theme-message-info.cpp
index 45ea13c..c5e0dfc 100644
--- a/lib/adium-theme-message-info.cpp
+++ b/lib/adium-theme-message-info.cpp
@@ -34,6 +34,13 @@ public:
AdiumThemeMessageInfo::MessageType type;
};
+AdiumThemeMessageInfo::AdiumThemeMessageInfo()
+ : d(new AdiumThemeMessageInfoPrivate())
+{
+ d->type = Invalid;
+}
+
+
AdiumThemeMessageInfo::AdiumThemeMessageInfo(MessageType type)
: d(new AdiumThemeMessageInfoPrivate())
{
diff --git a/lib/adium-theme-message-info.h b/lib/adium-theme-message-info.h
index 9ce5d67..08a8acd 100644
--- a/lib/adium-theme-message-info.h
+++ b/lib/adium-theme-message-info.h
@@ -34,9 +34,11 @@ public:
LocalToRemote,
Status,
HistoryRemoteToLocal,
- HistoryLocalToRemote
+ HistoryLocalToRemote,
+ Invalid
};
+ AdiumThemeMessageInfo();
explicit AdiumThemeMessageInfo(MessageType);
explicit AdiumThemeMessageInfo(const AdiumThemeMessageInfo &other);
virtual ~AdiumThemeMessageInfo();
diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index fb9a1ee..6fcda01 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -206,7 +206,6 @@ void AdiumThemeView::initialise(const AdiumThemeHeaderInfo &chatInfo)
templateHtml.replace(index, 2, footerHtml);
setHtml(templateHtml);
- m_lastSender = QLatin1String("");
//hidden HTML debugging mode. Should have no visible way to turn it on.
if (m_webInspector) {
@@ -294,10 +293,12 @@ void AdiumThemeView::addContentMessage(const AdiumThemeContentInfo &contentMessa
QString styleHtml;
bool consecutiveMessage = false;
- if (m_lastSender == contentMessage.senderScreenName()) {
+ if (m_lastContent.senderScreenName() == contentMessage.senderScreenName()
+ && m_lastContent.type() == contentMessage.type() )
+ {
consecutiveMessage = true;
} else {
- m_lastSender = contentMessage.senderScreenName();
+ m_lastContent.senderScreenName() = contentMessage.senderScreenName();
}
switch (contentMessage.type()) {
@@ -345,7 +346,7 @@ void AdiumThemeView::addContentMessage(const AdiumThemeContentInfo &contentMessa
void AdiumThemeView::addStatusMessage(const AdiumThemeStatusInfo& statusMessage)
{
QString styleHtml = m_chatStyle->getStatusHtml();
- m_lastSender = QLatin1String("");
+ m_lastContent = AdiumThemeContentInfo();
replaceStatusKeywords(styleHtml, statusMessage);
appendNewMessage(styleHtml);
}
diff --git a/lib/adium-theme-view.h b/lib/adium-theme-view.h
index 06210fb..0403c8c 100644
--- a/lib/adium-theme-view.h
+++ b/lib/adium-theme-view.h
@@ -23,6 +23,7 @@
#include <QtWebKit/QWebView>
#include "adium-theme-header-info.h"
+#include "adium-theme-content-info.h"
#include <KEmoticons>
@@ -30,7 +31,6 @@
class AdiumThemeContentInfo;
class AdiumThemeHeaderInfo;
-class AdiumThemeMessageInfo;
class AdiumThemeStatusInfo;
class ChatWindowStyle;
@@ -101,7 +101,7 @@ private:
QString formatTime(const QString&, const QDateTime&);
QString m_defaultAvatar;
- QString m_lastSender;
+ AdiumThemeContentInfo m_lastContent;
bool m_displayHeader;
KAction *m_openLinkAction;
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list