aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-30 00:13:04 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-31 00:28:46 +0800
commit43c0f0769a5117d7acdc07f22d4c73a2f06de0fe (patch)
tree903c93a30d9a0f77b70641ec3c7a39e175ef2097 /src
parent40f2188129d8fc2d8d718adea0bb3c417013465d (diff)
downloadgsoc2013-empathy-43c0f0769a5117d7acdc07f22d4c73a2f06de0fe.tar
gsoc2013-empathy-43c0f0769a5117d7acdc07f22d4c73a2f06de0fe.tar.gz
gsoc2013-empathy-43c0f0769a5117d7acdc07f22d4c73a2f06de0fe.tar.bz2
gsoc2013-empathy-43c0f0769a5117d7acdc07f22d4c73a2f06de0fe.tar.lz
gsoc2013-empathy-43c0f0769a5117d7acdc07f22d4c73a2f06de0fe.tar.xz
gsoc2013-empathy-43c0f0769a5117d7acdc07f22d4c73a2f06de0fe.tar.zst
gsoc2013-empathy-43c0f0769a5117d7acdc07f22d4c73a2f06de0fe.zip
Add the filters not in the Client file to a second Handler
A Dispatcher isn't guaranteed to ask the Handlers D-Bus interface for the filter after launching it. So have our main handler match what is defined in the client file and add an extra head which contains the complete list
Diffstat (limited to 'src')
-rw-r--r--src/empathy.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/empathy.c b/src/empathy.c
index f7017bd96..3d4b3853b 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -585,14 +585,28 @@ setup_dispatcher (void)
{ TP_IFACE_CHANNEL_TYPE_ROOM_LIST, TP_HANDLE_TYPE_NONE },
};
GStrv capabilities = { NULL };
+ GHashTable *asv;
int i;
+ /* Setup the basic Client.Handler that matches our client filter */
filters = g_ptr_array_new ();
+ asv = tp_asv_new (
+ TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING,
+ TP_IFACE_CHANNEL_TYPE_TEXT,
+ TP_IFACE_CHANNEL ".TargetHandleType", G_TYPE_INT,
+ TP_HANDLE_TYPE_CONTACT,
+ NULL);
+ g_ptr_array_add (filters, asv);
+
+ d = empathy_dispatcher_new (PACKAGE_NAME, filters, NULL);
+ g_ptr_array_foreach (filters, (GFunc) g_hash_table_destroy, NULL);
+ g_ptr_array_free (filters, TRUE);
+
+ /* Setup the an extended Client.Handler that matches everything we can do */
+ filters = g_ptr_array_new ();
for (i = 0 ; i < G_N_ELEMENTS (types); i++)
{
- GHashTable *asv;
-
asv = tp_asv_new (
TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, types[i].channeltype,
TP_IFACE_CHANNEL ".TargetHandleType", G_TYPE_INT, types[i].handletype,
@@ -601,7 +615,8 @@ setup_dispatcher (void)
g_ptr_array_add (filters, asv);
}
- d = empathy_dispatcher_new (PACKAGE_NAME, filters, capabilities);
+ empathy_dispatcher_add_handler (d, PACKAGE_NAME"MoreThenMeetsTheEye",
+ filters, capabilities);
g_ptr_array_foreach (filters, (GFunc) g_hash_table_destroy, NULL);
g_ptr_array_free (filters, TRUE);