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


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

The following commit has been merged in the master branch:
commit 23dbf343868d3530a443a9c63c1a0bf9bb93fa49
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date:   Wed Mar 21 00:07:56 2012 +0100

    Rename templates and handle in the same way of Adium
---
 lib/adium-theme-view.cpp  | 18 ++++-----
 lib/chat-window-style.cpp | 96 ++++++++++++++++++++++++-----------------------
 lib/chat-window-style.h   | 47 +++++++++++++----------
 3 files changed, 87 insertions(+), 74 deletions(-)

diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index 0f6c1c4..4178606 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -313,30 +313,30 @@ void AdiumThemeView::addContentMessage(const AdiumThemeContentInfo &contentMessa
     switch (message.type()) {
     case AdiumThemeMessageInfo::RemoteToLocal:
         if (consecutiveMessage) {
-            styleHtml = m_chatStyle->getNextIncomingHtml();
+            styleHtml = m_chatStyle->getIncomingNextContentHtml();
         } else {
-            styleHtml = m_chatStyle->getIncomingHtml();
+            styleHtml = m_chatStyle->getIncomingContentHtml();
         }
         break;
     case AdiumThemeMessageInfo::LocalToRemote:
         if (consecutiveMessage) {
-            styleHtml = m_chatStyle->getNextOutgoingHtml();
+            styleHtml = m_chatStyle->getOutgoingNextContentHtml();
         } else {
-            styleHtml = m_chatStyle->getOutgoingHtml();
+            styleHtml = m_chatStyle->getOutgoingContentHtml();
         }
         break;
     case AdiumThemeMessageInfo::HistoryRemoteToLocal:
         if (consecutiveMessage) {
-            styleHtml = m_chatStyle->getHistoryNextIncomingHtml();
+            styleHtml = m_chatStyle->getIncomingNextHistoryHtml();
         } else {
-            styleHtml = m_chatStyle->getHistoryIncomingHtml();
+            styleHtml = m_chatStyle->getIncomingHistoryHtml();
         }
         break;
     case AdiumThemeMessageInfo::HistoryLocalToRemote:
         if (consecutiveMessage) {
-            styleHtml = m_chatStyle->getHistoryNextOutgoingHtml();
+            styleHtml = m_chatStyle->getOutgoingNextHistoryHtml();
         } else {
-            styleHtml = m_chatStyle->getHistoryOutgoingHtml();
+            styleHtml = m_chatStyle->getOutgoingHistoryHtml();
         }
         break;
     default:
@@ -373,7 +373,7 @@ void AdiumThemeView::addStatusMessage(const AdiumThemeStatusInfo& statusMessage)
         styleHtml = m_chatStyle->getStatusHtml();
         break;
     case AdiumThemeMessageInfo::HistoryStatus:
-        styleHtml = m_chatStyle->getHistoryStatusHtml();
+        styleHtml = m_chatStyle->getStatusHistoryHtml();
         break;
     default:
         kWarning() << "Unexpected message type to addStatusMessage";
diff --git a/lib/chat-window-style.cpp b/lib/chat-window-style.cpp
index 8940fa2..f827169 100644
--- a/lib/chat-window-style.cpp
+++ b/lib/chat-window-style.cpp
@@ -96,10 +96,10 @@ bool ChatWindowStyle::isValid() const
     kDebug();
     bool statusHtml = !content(Status).isEmpty();
     bool fileTransferIncomingHtml = !content(FileTransferIncoming).isEmpty();
-    bool nextIncomingHtml = !content(IncomingNext).isEmpty();
-    bool incomingHtml = !content(Incoming).isEmpty();
-    bool nextOutgoingHtml = !content(OutgoingNext).isEmpty();
-    bool outgoingHtml = !content(Outgoing).isEmpty();
+    bool nextIncomingHtml = !content(IncomingNextContent).isEmpty();
+    bool incomingHtml = !content(IncomingContent).isEmpty();
+    bool nextOutgoingHtml = !content(OutgoingNextContent).isEmpty();
+    bool outgoingHtml = !content(OutgoingContent).isEmpty();
 
     return (statusHtml && fileTransferIncomingHtml && nextIncomingHtml
             && incomingHtml && nextOutgoingHtml  && outgoingHtml);
@@ -170,24 +170,24 @@ QString ChatWindowStyle::getTopicHtml() const
     return content(Topic);
 }
 
-QString ChatWindowStyle::getIncomingHtml() const
+QString ChatWindowStyle::getIncomingContentHtml() const
 {
-    return content(Incoming);
+    return content(IncomingContent);
 }
 
-QString ChatWindowStyle::getNextIncomingHtml() const
+QString ChatWindowStyle::getIncomingNextContentHtml() const
 {
-    return content(IncomingNext);
+    return content(IncomingNextContent);
 }
 
-QString ChatWindowStyle::getOutgoingHtml() const
+QString ChatWindowStyle::getOutgoingContentHtml() const
 {
-    return content(Outgoing);
+    return content(OutgoingContent);
 }
 
-QString ChatWindowStyle::getNextOutgoingHtml() const
+QString ChatWindowStyle::getOutgoingNextContentHtml() const
 {
-    return content(OutgoingNext);
+    return content(OutgoingNextContent);
 }
 
 QString ChatWindowStyle::getStatusHtml() const
@@ -195,29 +195,29 @@ QString ChatWindowStyle::getStatusHtml() const
     return content(Status);
 }
 
-QString ChatWindowStyle::getHistoryIncomingHtml() const
+QString ChatWindowStyle::getIncomingHistoryHtml() const
 {
-    return content(HistoryIncoming);
+    return content(IncomingHistory);
 }
 
-QString ChatWindowStyle::getHistoryNextIncomingHtml() const
+QString ChatWindowStyle::getIncomingNextHistoryHtml() const
 {
-    return content(HistoryIncomingNext);
+    return content(IncomingNextHistory);
 }
 
-QString ChatWindowStyle::getHistoryOutgoingHtml() const
+QString ChatWindowStyle::getOutgoingHistoryHtml() const
 {
-    return content(HistoryOutgoing);
+    return content(OutgoingHistory);
 }
 
-QString ChatWindowStyle::getHistoryNextOutgoingHtml() const
+QString ChatWindowStyle::getOutgoingNextHistoryHtml() const
 {
-    return content(HistoryOutgoingNext);
+    return content(OutgoingNextHistory);
 }
 
-QString ChatWindowStyle::getHistoryStatusHtml() const
+QString ChatWindowStyle::getStatusHistoryHtml() const
 {
-    return content(HistoryStatus);
+    return content(StatusHistory);
 }
 
 QString ChatWindowStyle::getActionIncomingHtml() const
@@ -331,16 +331,16 @@ void ChatWindowStyle::readStyleFiles()
     templateFiles.insert(Footer, QLatin1String("Footer.html"));
     templateFiles.insert(Topic, QLatin1String("Topic.html"));
 
-    templateFiles.insert(Incoming, QLatin1String("Incoming/Content.html"));
-    templateFiles.insert(IncomingNext, QLatin1String("Incoming/NextContent.html"));
-    templateFiles.insert(Outgoing, QLatin1String("Outgoing/Content.html"));
-    templateFiles.insert(OutgoingNext, QLatin1String("Outgoing/NextContent.html"));
+    templateFiles.insert(IncomingContent, QLatin1String("Incoming/Content.html"));
+    templateFiles.insert(IncomingNextContent, QLatin1String("Incoming/NextContent.html"));
+    templateFiles.insert(OutgoingContent, QLatin1String("Outgoing/Content.html"));
+    templateFiles.insert(OutgoingNextContent, QLatin1String("Outgoing/NextContent.html"));
     templateFiles.insert(Status, QLatin1String("Status.html"));
 
-    templateFiles.insert(HistoryIncoming, QLatin1String("Incoming/Context.html"));
-    templateFiles.insert(HistoryIncomingNext, QLatin1String("Incoming/NextContext.html"));
-    templateFiles.insert(HistoryOutgoing, QLatin1String("Outgoing/Context.html"));
-    templateFiles.insert(HistoryOutgoingNext, QLatin1String("Outgoing/NextContext.html"));
+    templateFiles.insert(IncomingHistory, QLatin1String("Incoming/Context.html"));
+    templateFiles.insert(IncomingNextHistory, QLatin1String("Incoming/NextContext.html"));
+    templateFiles.insert(OutgoingHistory, QLatin1String("Outgoing/Context.html"));
+    templateFiles.insert(OutgoingNextHistory, QLatin1String("Outgoing/NextContext.html"));
 
     templateFiles.insert(ActionIncoming, QLatin1String("Incoming/Action.html"));
     templateFiles.insert(ActionOutgoing, QLatin1String("Outgoing/Action.html"));
@@ -379,26 +379,30 @@ void ChatWindowStyle::readStyleFiles()
     // basic fallbacks
     inheritContent(Topic, Header);
 
-    inheritContent(Incoming, Content);
-    inheritContent(Outgoing, Content);
+    //Fall back to Resources/Content.html if Incoming isn't present
+    inheritContent(IncomingContent, Content);
 
-    inheritContent(Outgoing, Incoming);
-    inheritContent(Incoming, Outgoing);
+    //Fall back to Content if NextContent doesn't need to use different HTML
+    inheritContent(IncomingNextContent, IncomingContent);
 
-    inheritContent(OutgoingNext, IncomingNext);
-    inheritContent(IncomingNext, Incoming);
-    inheritContent(OutgoingNext, Outgoing);
+    //Fall back to Content if History isn't present
+    inheritContent(IncomingNextHistory, IncomingNextContent);
+    inheritContent(IncomingHistory, IncomingContent);
 
-    inheritContent(HistoryOutgoing, HistoryIncoming);
-    inheritContent(HistoryIncoming, Incoming);
-    inheritContent(HistoryOutgoing, Outgoing);
+    //Fall back to Content if History isn't present
+    inheritContent(OutgoingNextHistory, OutgoingNextContent);
+    inheritContent(OutgoingHistory, OutgoingContent);
 
-    inheritContent(HistoryOutgoingNext, HistoryIncomingNext);
-    inheritContent(HistoryIncomingNext, IncomingNext);
-    inheritContent(HistoryOutgoingNext, OutgoingNext);
+    //Fall back to Content if History isn't present
+    inheritContent(OutgoingNextHistory, IncomingNextHistory);
+    inheritContent(OutgoingHistory, IncomingHistory);
+
+    //Fall back to Incoming if Outgoing doesn't need to be different
+    inheritContent(OutgoingContent, IncomingContent);
+    inheritContent(OutgoingNextContent, IncomingNextContent);
 
     inheritContent(Status, Content);
-    inheritContent(HistoryStatus, Status);
+    inheritContent(StatusHistory, Status);
 
     // Load template file fallback
     if (content(Template).isEmpty())
@@ -435,7 +439,7 @@ void ChatWindowStyle::readStyleFiles()
                                   " </div>
"
                                   "</div>"))
                           .arg(i18n("Download"), i18n("Cancel"));
-        QString incoming = content(Incoming);
+        QString incoming = content(IncomingContent);
         setContent(FileTransferIncoming, incoming.replace(QLatin1String("%message%"), message));
     }
 
@@ -456,7 +460,7 @@ void ChatWindowStyle::readStyleFiles()
                                   " </div>
"
                                   "</div>"))
                           .arg(i18n("Play"), i18n("Save as"));
-        setContent(VoiceClipIncoming, content(Incoming).replace(QLatin1String("%message%"), message));
+        setContent(VoiceClipIncoming, content(IncomingContent).replace(QLatin1String("%message%"), message));
     }
 }
 
diff --git a/lib/chat-window-style.h b/lib/chat-window-style.h
index 9905730..bbb504d 100644
--- a/lib/chat-window-style.h
+++ b/lib/chat-window-style.h
@@ -101,17 +101,17 @@ public:
     QString getFooterHtml() const;
     QString getTopicHtml() const;
 
-    QString getIncomingHtml() const;
-    QString getNextIncomingHtml() const;
-    QString getOutgoingHtml() const;
-    QString getNextOutgoingHtml() const;
+    QString getIncomingContentHtml() const;
+    QString getIncomingNextContentHtml() const;
+    QString getOutgoingContentHtml() const;
+    QString getOutgoingNextContentHtml() const;
     QString getStatusHtml() const;
 
-    QString getHistoryIncomingHtml() const;
-    QString getHistoryNextIncomingHtml() const;
-    QString getHistoryOutgoingHtml() const;
-    QString getHistoryNextOutgoingHtml() const;
-    QString getHistoryStatusHtml() const;
+    QString getIncomingHistoryHtml() const;
+    QString getIncomingNextHistoryHtml() const;
+    QString getOutgoingHistoryHtml() const;
+    QString getOutgoingNextHistoryHtml() const;
+    QString getStatusHistoryHtml() const;
 
     QString getActionIncomingHtml() const;
     QString getActionOutgoingHtml() const;
@@ -171,21 +171,30 @@ private:
         Template,
 
         Header,
-        Content,
         Footer,
         Topic,
 
-        Incoming,
-        IncomingNext,
-        Outgoing,
-        OutgoingNext,
+        Content,
+        NextContent,
+        History,
+        NextHistory,
         Status,
 
-        HistoryIncoming,
-        HistoryIncomingNext,
-        HistoryOutgoing,
-        HistoryOutgoingNext,
-        HistoryStatus,
+        IncomingContent,
+        IncomingNextContent,
+        IncomingContext,
+        IncomingNextContext,
+        IncomingHistory,
+        IncomingNextHistory,
+
+        OutgoingContent,
+        OutgoingNextContent,
+        OutgoingContext,
+        OutgoingNextContext,
+        OutgoingHistory,
+        OutgoingNextHistory,
+
+        StatusHistory,
 
         ActionIncoming,
         ActionOutgoing,

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list