[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:17 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=99ed061
The following commit has been merged in the master branch:
commit 99ed061e580de115dbd8c7287aa06a768357f90f
Author: Lasath Fernando <kde at lasath.org>
Date: Tue Feb 14 11:26:19 2012 +1100
Replace TextDelegate with the new Delegates
---
.../contents/ui/ChatWidget.qml | 24 +++++++++++++++++++++-
.../contents/ui/TextDelegate.qml | 12 -----------
2 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/ChatWidget.qml b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/ChatWidget.qml
index 592cd44..ef9a3f6 100644
--- a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/ChatWidget.qml
+++ b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/ChatWidget.qml
@@ -104,7 +104,29 @@ Item {
boundsBehavior: Flickable.StopAtBounds
clip: true
- delegate: TextDelegate {}
+ delegate: Loader {
+ Component.onCompleted: {
+ console.log(model.type);
+ switch(model.type) {
+ case MessagesModel.MessageTypeIncoming:
+// console.log("Type: MessagesModel::MessageTypeIncoming");
+ source = "IncomingDelegate.qml";
+ break;
+ case MessagesModel.MessageTypeOutgoing:
+// console.log("Type: MessagesModel::MessageTypeOutgoing");
+ source = "OutgoingDelegate.qml"
+ break;
+ case MessagesModel.MessageTypeAction:
+// console.log("Type: MessagesModel::MessageTypeAction");
+ source = "ActionDelegate.qml";
+ break;
+ default:
+// console.log("ERROR: UNKNOWN MESSAGE TYPE! Defaulting to fallback handler");
+ source = "TextDelegate.qml";
+ }
+ }
+ }
+
model: conv.messages
}
diff --git a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/TextDelegate.qml b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/TextDelegate.qml
index 2e1115d..a97eeec 100644
--- a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/TextDelegate.qml
+++ b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/TextDelegate.qml
@@ -6,18 +6,6 @@ import org.kde.telepathy.chat 0.1
Item {
property color textColor: "black"
- Component.onCompleted: {
- if(model.type == MessagesModel.MessageTypeIncoming) {
- console.log("Type: MessagesModel::MessageTypeIncoming");
- textColor = theme.textColor;
- } else if(model.type == MessagesModel.MessageTypeOutgoing) {
- console.log("Type: MessagesModel::MessageTypeOutgoing");
- textColor = theme.highlightColor;
- } else {
- console.log("Unkown Type: " + model.type);
- }
- }
-
PlasmaComponents.Label {
id: header
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list