From ae195f5e93d0f92e0c7714b5b27be8d1740803aa Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 8 May 2007 20:08:17 +0000 Subject: [darcs-to-svn @ many changes] svn path=/trunk/; revision=35 --- src/empathy-main.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/empathy-main.c') 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 #include +#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 ()); -- cgit v1.2.3