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



commit 6b7dd5ecedae9f5fc17e259f6a7ec14845149842
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 8643dd2..13dbdd1 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -470,8 +470,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);
@@ -1071,8 +1069,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]