[ekiga/v4_0] Loudmouth: Better fix for some specific icons.



commit a3abdeaaf1d255514df6cf12f7cc1ff122b0f741
Author: Damien Sandras <dsandras beip be>
Date:   Sun Feb 10 18:19:46 2013 +0100

    Loudmouth: Better fix for some specific icons.
    
    We were ending up with no icon at all for statuses like xa ou dnd. Most
    probably other cases should be handled too.

 lib/engine/gui/gtk-frontend/roster-view-gtk.cpp |    4 ----
 plugins/loudmouth/loudmouth-presentity.cpp      |   11 ++++++++---
 2 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
index d5494e3..883fcd6 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -479,8 +479,6 @@ roster_view_gtk_icon_blink_cb (gpointer data)
   else if (ltm->tm_sec % 3 == 0 && info->cpt > 2) {
     if (info->new_presence != "unknown")
       icon = "user-" + info->new_presence;
-    if (icon == "user-xa")
-      icon = "user-away";
     gtk_tree_store_set (GTK_TREE_STORE (info->model), info->iter,
                         COLUMN_PRESENCE_ICON, icon.c_str (),
                         -1);
@@ -1080,8 +1078,6 @@ on_presentity_added (RosterViewGtk* self,
       else if (old_presence != presentity->get_presence ()) {
         if (presentity->get_presence () != "unknown")
           icon = "user-" + presentity->get_presence ();
-        if (icon == "user-xa")
-          icon = "user-away";
         gtk_tree_store_set (self->priv->store, &iter,
                             COLUMN_PRESENCE_ICON, icon.c_str (),
                             -1);
diff --git a/plugins/loudmouth/loudmouth-presentity.cpp b/plugins/loudmouth/loudmouth-presentity.cpp
index 4181a37..beab377 100644
--- a/plugins/loudmouth/loudmouth-presentity.cpp
+++ b/plugins/loudmouth/loudmouth-presentity.cpp
@@ -97,10 +97,15 @@ LM::Presentity::get_presence () const
       ++iter;
     }
     if (best.presence == "") {
-
       result = "available";
-    } else {
-
+    }
+    else if (best.presence == "xa") {
+      result = "away";
+    }
+    else if (best.presence == "dnd") {
+      result = "busy";
+    }
+    else {
       result = best.presence;
     }
   }


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