aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/empathy-main.c')
-rw-r--r--src/empathy-main.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/empathy-main.c b/src/empathy-main.c
index fb5684aa3..afa1e119e 100644
--- a/src/empathy-main.c
+++ b/src/empathy-main.c
@@ -39,6 +39,8 @@
#include <libempathy-gtk/gossip-status-presets.h>
#include <libempathy-gtk/gossip-accounts-dialog.h>
+#include "empathy-filter.h"
+
#define DEBUG_DOMAIN "Empathy"
static void error_cb (MissionControl *mc,
@@ -118,6 +120,18 @@ icon_activate_cb (GtkStatusIcon *status_icon,
}
}
+static void
+new_channel_cb (EmpathyFilter *filter,
+ TpConn *tp_conn,
+ TpChan *tp_chan,
+ guint context_handle,
+ gpointer user_data)
+{
+ gossip_debug (DEBUG_DOMAIN, "Filtering context handle: %d",
+ context_handle);
+ empathy_filter_process (filter, context_handle, TRUE);
+}
+
int
main (int argc, char *argv[])
{
@@ -126,9 +140,16 @@ main (int argc, char *argv[])
GtkWidget *window;
MissionControl *mc;
McAccountMonitor *monitor;
+ EmpathyFilter *filter;
gtk_init (&argc, &argv);
+ /* Setting up channel filter */
+ filter = empathy_filter_new ();
+ g_signal_connect (filter, "new-channel",
+ G_CALLBACK (new_channel_cb),
+ NULL);
+
/* Setting up MC */
monitor = mc_account_monitor_new ();
mc = mission_control_new (tp_get_bus ());