[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:22:06 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=e63fe44
The following commit has been merged in the master branch:
commit e63fe44723bf60759b2e0c6ec951e4e10f011eb5
Author: Aleix Pol <aleixpol at kde.org>
Date: Mon Jul 16 04:11:27 2012 +0200
QuickChat Plasmoid: remove loop dependencies in visible state
Solves some corner cases where the current chat changing wouldn't
behave appropriately.
REVIEW: 105543
---
.../contents/ui/ConversationDelegate.qml | 2 +-
.../org.kde.ktp-chatplasmoid/contents/ui/main.qml | 42 +++++++++++++++-------
2 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/ConversationDelegate.qml b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/ConversationDelegate.qml
index f3729a0..6767580 100644
--- a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/ConversationDelegate.qml
+++ b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/ConversationDelegate.qml
@@ -29,7 +29,6 @@ PlasmaComponents.ToolButton {
property alias image: icon.icon
property alias overlayText: text.text
- checkable: true
ExtraComponents.QIconItem {
id: icon
@@ -45,6 +44,7 @@ PlasmaComponents.ToolButton {
image: model.conversation.target.presenceIconName
}
+
Rectangle {
anchors {
right: parent.right
diff --git a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/main.qml b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/main.qml
index 5f73e4b..3a59f0a 100644
--- a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/main.qml
+++ b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/main.qml
@@ -22,6 +22,7 @@ import Qt 4.7
import org.kde.telepathy.chat 0.1
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.components 0.1 as PlasmaComponents
+import org.kde.qtextracomponents 0.1 as ExtraComponents
ListView {
id: base
@@ -31,26 +32,45 @@ ListView {
orientation: width>height ? ListView.Horizontal : ListView.Vertical
model: handler.conversations
+ currentIndex: -1
TelepathyTextObserver {
id: handler
}
+ highlight: Item {
+ ExtraComponents.QIconItem {
+ anchors {
+ top: parent.top
+ right: parent.right
+ margins: 5
+ }
+ width: parent.width/3
+ height: parent.height/3
+ icon: "face-surprise"
+ visible: base.chatActive
+ }
+ }
+
delegate : ConversationDelegate {
- //FIXME: rename the two variables named 'conv' as it's confusing
- property alias active: conv.checked
- id: conv
+ id: convButton
height: Math.min(base.width, base.height)
image: model.conversation.target.avatar
overlayText: model.conversation.messages.unreadCount
+ onClicked: {
+ if(base.currentIndex == index)
+ base.currentIndex = -1
+ else
+ base.currentIndex = index
+ }
//FIXME: put in a loader to not slow down the model
PlasmaCore.Dialog {
id: dialog
//Set as a Tool window to bypass the taskbar
windowFlags: Qt.WindowStaysOnTopHint | Qt.Tool
- visible: conv.checked
+ visible: base.currentIndex==index
mainItem: ChatWidget {
width: 250
@@ -58,31 +78,27 @@ ListView {
conv: model.conversation
onCloseRequested: {
- conv.checked = false;
+ base.currentIndex = -1
}
}
-
+
onVisibleChanged: {
if(visible) {
- //hides the previously visible chat
- base.currentItem.active = false
-
- var point = dialog.popupPosition(conv, Qt.AlignBottom);
+ var point = dialog.popupPosition(convButton, Qt.AlignBottom);
console.log("Showing dialog at (" + point.x + "," + point.y + ")");
dialog.x = point.x;
dialog.y = point.y;
dialog.activateWindow()
- base.currentIndex = index
}
- conv.checked = visible
+
}
}
Connections {
target: model.conversation.messages
onPopoutRequested: {
- conv.checked = true;
+ base.currentIndex = -1
}
}
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list