]> git.0d.be Git - empathy.git/blobdiff - src/empathy-main.c
[darcs-to-svn @ many changes]
[empathy.git] / src / empathy-main.c
index fb5684aa3d384532b836ce493f4367ca1cd7151c..afa1e119e9c553df083cb5b20301df86d4c17bb0 100644 (file)
@@ -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 ());