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


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=c220f54

The following commit has been merged in the master branch:
commit c220f541171909c41a2fbe25a75e12c3e7a45458
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Tue Jun 18 19:17:50 2013 +0200

    Make it possible to send email from contact applet even when contact is offline
    
    Slightly changes behavior of the applet: the avatar is always clickable, but the
    individual actions are enabled only when online (except for the "send mail" action,
    which is enabled all the time)
    
    REVIEW: 111095
    BUG: 294104
    FIXED-IN: 0.7.0
---
 contact/src/declarative/contents/ui/Avatar.qml       | 17 -----------------
 contact/src/declarative/contents/ui/Contact.qml      |  2 ++
 contact/src/declarative/contents/ui/DropDownMenu.qml | 12 ++++++++++++
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/contact/src/declarative/contents/ui/Avatar.qml b/contact/src/declarative/contents/ui/Avatar.qml
index f716e7e..6133563 100644
--- a/contact/src/declarative/contents/ui/Avatar.qml
+++ b/contact/src/declarative/contents/ui/Avatar.qml
@@ -72,33 +72,18 @@ Item {
         switch (presenceStatus) {
             case "available":
                 avatarFrame.source = "../frames/online.png";
-                if (!avatar.enabled) {
-                    avatar.enabled = true;
-                }
                 break;
             case "dnd":
                 avatarFrame.source = "../frames/busy.png";
-                if (!avatar.enabled) {
-                    avatar.enabled = true;
-                }
                 break;
             case "away":
                 avatarFrame.source = "../frames/away.png";
-                if (!avatar.enabled) {
-                    avatar.enabled = true;
-                }
                 break;
             case "offline":
                 avatarFrame.source = "../frames/offline.png";
-                if (avatar.enabled) {
-                    avatar.enabled = false;
-                }
                 break;
             default:
                 avatarFrame.source = "../frames/offline.png";
-                if (avatar.enabled) {
-                    avatar.enabled = false;
-                }
                 break;
         }
     }
@@ -113,10 +98,8 @@ Item {
     {
         // check if user account is online
         if (!TelepathyContact.accountOnline && avatar.enabled) {
-            avatar.enabled = false;
             setAvatarPresenceStatus("offline");
         } else if (TelepathyContact.accountOnline && !avatar.enabled) {
-            avatar.enabled = true;
             // set back to normal
             avatarPresenceStatus = TelepathyContact.presenceStatus;
             setAvatarPresenceStatus(avatarPresenceStatus);
diff --git a/contact/src/declarative/contents/ui/Contact.qml b/contact/src/declarative/contents/ui/Contact.qml
index 9b4e8df..ab434c8 100644
--- a/contact/src/declarative/contents/ui/Contact.qml
+++ b/contact/src/declarative/contents/ui/Contact.qml
@@ -46,6 +46,8 @@ Item {
         id: dropDownMenu;
         width: wrapper.width;
 
+        presenceStatus: wrapper.status;
+
         anchors {
             top: avatar.bottom;
             left: avatar.left;
diff --git a/contact/src/declarative/contents/ui/DropDownMenu.qml b/contact/src/declarative/contents/ui/DropDownMenu.qml
index fc59949..7177c70 100644
--- a/contact/src/declarative/contents/ui/DropDownMenu.qml
+++ b/contact/src/declarative/contents/ui/DropDownMenu.qml
@@ -24,6 +24,8 @@ Item {
     id: container;
     state: "hidden";
 
+    property string presenceStatus;
+
     Row {
         spacing: 2;
         anchors.centerIn: parent;
@@ -34,6 +36,8 @@ Item {
             width: 22;
             height: 22
 
+            enabled: presenceStatus != "offline";
+
             onClicked: {
                 TelepathyContact.startAudioCall();
                 toggleMenu();
@@ -46,6 +50,8 @@ Item {
             width: 22;
             height: 22
 
+            // mail button should be enabled even when the contact is offline
+
             onClicked: {
                 TelepathyContact.sendMail();
                 toggleMenu();
@@ -58,6 +64,8 @@ Item {
             width: 22;
             height: 22;
 
+            enabled: presenceStatus != "offline";
+
             onClicked: {
                 TelepathyContact.startTextChat();
                 toggleMenu();
@@ -70,6 +78,8 @@ Item {
             width: 22;
             height: 22;
 
+            enabled: presenceStatus != "offline";
+
             onClicked: {
                 TelepathyContact.startVideoCall();
                 toggleMenu();
@@ -82,6 +92,8 @@ Item {
             width: 22;
             height: 22;
 
+            enabled: presenceStatus != "offline";
+
             onClicked: {
                 TelepathyContact.startFileTransfer();
                 toggleMenu();

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list