From 6103a7223d0abf9a9798874213e0042c5e544cff Mon Sep 17 00:00:00 2001 From: Artem Garmash Date: Sat, 24 Apr 2010 20:18:03 +0300 Subject: [PATCH 1/1] Use el flag to properly detect MUCs and chatrooms --- configure.ac | 3 ++- debian/control | 2 +- src/el-home-applet.c | 13 ++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index e714ee1..8423154 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,8 @@ AM_PATH_GLIB_2_0([2.16.0]) CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls" PKG_CHECK_MODULES([LIBEVENT_LOGGER], - [rtcom-eventlogger >= 1.2]) + [rtcom-eventlogger >= 1.2 + rtcom-eventlogger-plugins]) hildonhomedesktopentrydir=`pkg-config libhildondesktop-1 --variable=hildonhomedesktopentrydir` AC_SUBST(hildonhomedesktopentrydir) diff --git a/debian/control b/debian/control index b4cc610..01c1695 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Section: user/desktop Maintainer: Artem Garmash Build-Depends: debhelper (>= 4.0.0), cdbs, autotools-dev, librtcom-eventlogger-dev (>= 1.2), libhildondesktop1-dev (>= 2.1.7), libtelepathy-glib-dev, librtcom-telepathy-glib-dev, - libosso-abook-dev + libosso-abook-dev, librtcom-eventlogger-plugins-dev Standards-Version: 3.6.2 Package: conversations-inbox-widget diff --git a/src/el-home-applet.c b/src/el-home-applet.c index ec3762d..26c4f14 100644 --- a/src/el-home-applet.c +++ b/src/el-home-applet.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -143,6 +144,7 @@ struct _ELHomeAppletPrivate gchar *remote_id; gchar *local_id; gchar *channel; + int flags; OssoABookContact *contact; gboolean time_fmt_24h; @@ -991,6 +993,7 @@ show_event (ELHomeApplet *self, RTComElIter *it) "remote-ebook-uid", &priv->contact_id, "free-text", &priv->message, "channel", &priv->channel, + "flags", &priv->flags, NULL)) { received = format_time (received_t, priv->time_fmt_24h); @@ -1403,7 +1406,8 @@ open_conversation (ELHomeApplet *self) if (!account) return; - if (!g_strcmp0 (account->protocol_name, "skype")) { + if ((priv->flags & RTCOM_EL_FLAG_CHAT_GROUP) && + (priv->flags & RTCOM_EL_FLAG_CHAT_OPAQUE)) { if (!priv->channel) return; @@ -1431,14 +1435,17 @@ open_conversation (ELHomeApplet *self) MC_ACCOUNT_CRD_INIT (&request); MC_ACCOUNT_CRD_SET (&request, channel_type, TP_IFACE_QUARK_CHANNEL_TYPE_TEXT); - if (priv->channel) { + if ((priv->flags & RTCOM_EL_FLAG_CHAT_ROOM) && + priv->channel) { MC_ACCOUNT_CRD_SET (&request, target_handle_type, TP_HANDLE_TYPE_ROOM); MC_ACCOUNT_CRD_SET (&request, target_id, priv->channel); } - else { + else if (priv->remote_id) { MC_ACCOUNT_CRD_SET (&request, target_handle_type, TP_HANDLE_TYPE_CONTACT); MC_ACCOUNT_CRD_SET (&request, target_id, priv->remote_id); } + else + return; mc_account_channelrequest (account, &request, -- 1.7.9.5