[ekiga] Loudmouth plugin: got rid of a few FIXME comments



commit fbc35c073e89a8a47684ad899acd7d6bf133c73e
Author: Julien Puydt <jpuydt free fr>
Date:   Sat Jan 4 22:22:21 2014 +0100

    Loudmouth plugin: got rid of a few FIXME comments

 plugins/loudmouth/loudmouth-account.cpp    |    2 +-
 plugins/loudmouth/loudmouth-dialect.cpp    |    2 +-
 plugins/loudmouth/loudmouth-presentity.cpp |    9 ++++++---
 3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/plugins/loudmouth/loudmouth-account.cpp b/plugins/loudmouth/loudmouth-account.cpp
index 9c0e0b3..1466751 100644
--- a/plugins/loudmouth/loudmouth-account.cpp
+++ b/plugins/loudmouth/loudmouth-account.cpp
@@ -216,7 +216,7 @@ LM::Account::enable ()
     xmlFree (resource);
   }
 
-  /* FIXME: this is an ugly workaround */
+  /* ugly but necessary */
   if (g_strcmp0 ("gmail.com", (const char*)server) == 0)
     lm_connection_set_server (connection, "xmpp.l.google.com");
   else
diff --git a/plugins/loudmouth/loudmouth-dialect.cpp b/plugins/loudmouth/loudmouth-dialect.cpp
index 92fdd79..866fdfa 100644
--- a/plugins/loudmouth/loudmouth-dialect.cpp
+++ b/plugins/loudmouth/loudmouth-dialect.cpp
@@ -135,7 +135,7 @@ LM::Dialect::group_chat_action ()
 
   request->text ("name", _("Room name"), "", _("The name of the room you want to enter"));
 
-  request->text ("pseudo", _("Pseudonym"), "FIXME", _("The pseudonym you'll have in the room"));
+  request->text ("pseudo", _("Pseudonym"), g_get_user_name (), _("The pseudonym you'll have in the room"));
 
   questions (request);
 }
diff --git a/plugins/loudmouth/loudmouth-presentity.cpp b/plugins/loudmouth/loudmouth-presentity.cpp
index 449e05b..51ff164 100644
--- a/plugins/loudmouth/loudmouth-presentity.cpp
+++ b/plugins/loudmouth/loudmouth-presentity.cpp
@@ -38,6 +38,8 @@
 #include <stdlib.h>
 #include <glib/gi18n.h>
 
+#include <boost/algorithm/string/predicate.hpp>
+
 #include "form-request-simple.h"
 
 #include "loudmouth-helpers.h"
@@ -75,7 +77,9 @@ LM::Presentity::get_name () const
 bool
 LM::Presentity::has_uri (const std::string uri) const
 {
-  return get_jid () == uri; // FIXME: this isn't 100% exact : if our jid is "foo server/resource", then we 
also have "foo server" as uri!
+  std::string full_jid = get_jid ();
+  std::string base_jid = full_jid.substr (0, full_jid.find ('/'));
+  return boost::starts_with (uri, base_jid);
 }
 
 const std::string
@@ -258,7 +262,6 @@ LM::Presentity::push_presence (const std::string resource,
     info.presence = "available";
   }
 
-  // FIXME: this code works but is ugly -- there has to be a better way
   const gchar* oftype = lm_message_node_get_attribute (presence, "type");
   if (oftype != NULL) {
 
@@ -335,7 +338,7 @@ LM::Presentity::handle_edit_reply (LmConnection* /*connection*/,
 {
   if (lm_message_get_sub_type (message) == LM_MESSAGE_SUB_TYPE_ERROR) {
 
-    // FIXME: perhaps we should display an error notice here...
+    std::cout << "Don't know how to handle : " << lm_message_node_to_string (lm_message_get_node (message)) 
<< std::endl;
   }
 
   return LM_HANDLER_RESULT_REMOVE_MESSAGE;


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