[gnome-contacts] Fixing bug: Contacts displayed as online while he's not



commit 3eae3e0501539c1d3de7c062abaaa591f79ba1d9
Author: Erick PÃrez Castellanos <erick red gmail com>
Date:   Fri Mar 2 11:13:54 2012 -0500

    Fixing bug: Contacts displayed as online while he's not
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=671037

 src/contacts-contact-pane.vala |    9 ++++++---
 src/contacts-contact.vala      |    7 ++++---
 2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 7fdc29d..dac26b3 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -1703,7 +1703,8 @@ public class Contacts.ContactPane : ScrolledWindow {
 	  var type = im_persona.presence_type;
 	  if (type != PresenceType.UNSET &&
 	      type != PresenceType.ERROR &&
-	      type != PresenceType.OFFLINE) {
+	      type != PresenceType.OFFLINE &&
+	      type != PresenceType.UNKNOWN) {
 	    found_im = true;
 	    if (type > max_presence)
 	      max_presence = type;
@@ -1992,7 +1993,8 @@ public class Contacts.ContactPane : ScrolledWindow {
 	  var type = im_persona.presence_type;
 	  if (type != PresenceType.UNSET &&
 	      type != PresenceType.ERROR &&
-	      type != PresenceType.OFFLINE) {
+	      type != PresenceType.OFFLINE &&
+	      type != PresenceType.UNKNOWN) {
 	    CallValue? value = { null, protocol, id.value, Contact.format_im_name (im_persona, protocol, id.value) };
 	    call_targets.add (value);
 	  }
@@ -2068,7 +2070,8 @@ public class Contacts.ContactPane : ScrolledWindow {
 	    var type = im_persona.presence_type;
 	    if (type != PresenceType.UNSET &&
 		type != PresenceType.ERROR &&
-		type != PresenceType.OFFLINE) {
+		type != PresenceType.OFFLINE &&
+		type != PresenceType.UNKNOWN) {
 	      ImValue? value = { protocol, id.value, Contact.format_im_name (im_persona, protocol, id.value) };
 	      online_personas.add (value);
 	    }
diff --git a/src/contacts-contact.vala b/src/contacts-contact.vala
index 0a2ea80..14311f9 100644
--- a/src/contacts-contact.vala
+++ b/src/contacts-contact.vala
@@ -44,7 +44,8 @@ public class Contacts.ContactPresence : Grid {
 
     if (type == PresenceType.UNSET ||
 	type == PresenceType.ERROR ||
-	type == PresenceType.OFFLINE) {
+	type == PresenceType.OFFLINE ||
+	type == PresenceType.UNKNOWN) {
       image.clear ();
       image.hide ();
       label.hide ();
@@ -490,9 +491,9 @@ public class Contacts.Contact : GLib.Object  {
     case PresenceType.OFFLINE:
     case PresenceType.UNSET:
     case PresenceType.ERROR:
+    case PresenceType.UNKNOWN:
       break;
     case PresenceType.AVAILABLE:
-    case PresenceType.UNKNOWN:
       iconname = "user-available-symbolic";
       break;
     case PresenceType.AWAY:
@@ -523,9 +524,9 @@ public class Contacts.Contact : GLib.Object  {
     case PresenceType.OFFLINE:
     case PresenceType.UNSET:
     case PresenceType.ERROR:
+    case PresenceType.UNKNOWN:
       break;
     case PresenceType.AVAILABLE:
-    case PresenceType.UNKNOWN:
       iconname = "user-available";
       break;
     case PresenceType.AWAY:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]