[SCM] ktp-contact-applet packaging branch, master, updated. debian/15.12.1-1-966-gde83ac5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:18:44 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=ad880fa
The following commit has been merged in the master branch:
commit ad880faaa54d05c4ccaf64e90d7b793682871084
Author: Aleix Pol <aleixpol at kde.org>
Date: Wed Apr 10 17:44:03 2013 +0200
Improve integration with hiding panels
This patch changes 2 things:
- Changes the code from a js function to setting a qml property. This is
better because we don't have to connect to all the changing signals to
re-evaluate (there were some weird problems in this regard).
- Also it makes it so when you have a dialog opened, the status is set to
AcceptingInputStatus, this way the panel doesn't hide while you're writing.
This is useful because this way you can see if somebody talks to you while
you're chatting already.
REVIEW: 109947
---
chat/org.kde.ktp-chat/contents/ui/main.qml | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/chat/org.kde.ktp-chat/contents/ui/main.qml b/chat/org.kde.ktp-chat/contents/ui/main.qml
index 9fb78c9..d48ea38 100644
--- a/chat/org.kde.ktp-chat/contents/ui/main.qml
+++ b/chat/org.kde.ktp-chat/contents/ui/main.qml
@@ -47,20 +47,13 @@ Grid {
TelepathyTextObserver { id: handler }
HideWindowComponent { id: windowHide }
-
- function reconsiderStatus() {
- if(handler.conversations.totalUnreadCount>0) {
- plasmoid.status = NeedsAttentionStatus;
- } else if(conversationsView.count>0) {
- plasmoid.status = ActiveStatus;
- } else {
- plasmoid.status = PassiveStatus;
- }
- }
-
- Connections {
- target: handler.conversations
- onTotalUnreadCountChanged: reconsiderStatus()
+ Binding {
+ target: plasmoid
+ property: "status"
+ value: (base.currentIndex >= 0 ? AcceptingInputStatus
+ : handler.conversations.totalUnreadCount>0 ? NeedsAttentionStatus
+ : handler.conversations.count>0 ? ActiveStatus
+ : PassiveStatus)
}
Component.onCompleted: {
@@ -69,7 +62,6 @@ Grid {
base.currentIndex = handler.conversations.nextActiveConversation(base.currentIndex+1 % handler.conversations)
});
}
- onItemsCountChanged: reconsiderStatus()
Repeater {
id: pinnedView
@@ -113,7 +105,6 @@ Grid {
: base.flow === Flow.LeftToRight ? Qt.AlignBottom : Qt.AlignRight
Repeater {
- id: conversationsView
delegate: ConversationDelegate {
width: base.itemWidth
height: base.itemHeight
--
ktp-contact-applet packaging
More information about the pkg-kde-commits
mailing list