]> git.0d.be Git - empathy.git/commitdiff
libempathy-gtk/gossip-ui-utils.c libempathy-gtk/gossip-accounts-dialog.c
authorXavier Claessens <xclaesse@gmail.com>
Sun, 3 Jun 2007 18:45:53 +0000 (18:45 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sun, 3 Jun 2007 18:45:53 +0000 (18:45 +0000)
2007-06-03 Xavier Claessens  <xclaesse@gmail.com>

* libempathy-gtk/gossip-ui-utils.c
* libempathy-gtk/gossip-accounts-dialog.c
* libempathy-gtk/Makefile.am
* src/empathy-accounts-main.c
* src/empathy-chat-main.c
* src/Makefile.am
* src/empathy-main.c
* libempathy/gossip-utils.c
* libempathy/Makefile.am
* src/empathy-filter.h
* src/empathy-filter-plugin.c
* src/empathy-filter.xml
* src/empathy-filter.c
* libempathy/gossip-paths.c
* libempathy/gossip-paths.h: Remove unused code.

svn path=/trunk/; revision=120

16 files changed:
ChangeLog
libempathy-gtk/Makefile.am
libempathy-gtk/gossip-accounts-dialog.c
libempathy-gtk/gossip-ui-utils.c
libempathy/Makefile.am
libempathy/gossip-paths.c [deleted file]
libempathy/gossip-paths.h [deleted file]
libempathy/gossip-utils.c
src/Makefile.am
src/empathy-accounts-main.c
src/empathy-chat-main.c
src/empathy-filter-plugin.c [deleted file]
src/empathy-filter.c [deleted file]
src/empathy-filter.h [deleted file]
src/empathy-filter.xml [deleted file]
src/empathy-main.c

index 9d87859252c22903ed1521d4838743a43c85708f..0f26f991c5c46117c6929601f012a2619ff6dd86 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2007-06-03 Xavier Claessens  <xclaesse@gmail.com>
+
+       * libempathy-gtk/gossip-ui-utils.c
+       * libempathy-gtk/gossip-accounts-dialog.c
+       * libempathy-gtk/Makefile.am
+       * src/empathy-accounts-main.c
+       * src/empathy-chat-main.c
+       * src/Makefile.am
+       * src/empathy-main.c
+       * libempathy/gossip-utils.c
+       * libempathy/Makefile.am
+       * src/empathy-filter.h
+       * src/empathy-filter-plugin.c
+       * src/empathy-filter.xml
+       * src/empathy-filter.c
+       * libempathy/gossip-paths.c
+       * libempathy/gossip-paths.h: Remove unused code.
+
 2007-06-03 Xavier Claessens  <xclaesse@gmail.com>
 
        * po/POTFILES.in:
index 183f7d8e24c7882d31e292401ee83b5bdd3e76f6..e6d12a78f0aab0233837aa298c5d25b32df88797 100644 (file)
@@ -1,6 +1,7 @@
 AM_CPPFLAGS =                                           \
        -I.                                             \
        -I$(top_srcdir)                                 \
+       -DDATADIR=\""$(datadir)"\"                      \
        $(EMPATHY_CFLAGS)                               \
        $(WARN_CFLAGS)
 
index 2a3a92764567a7ecdc1bcba496b900cbfe58365b..3abb9be33b50ada38012b27538f788ec2c49227a 100644 (file)
@@ -39,7 +39,6 @@
 #include <libtelepathy/tp-constants.h>
 
 #include <libempathy/gossip-debug.h>
-#include <libempathy/gossip-paths.h>
 #include <libempathy/gossip-utils.h>
 #include <libempathy-gtk/gossip-ui-utils.h>
 
index e211bf169aed2d19610c4e9bd164da76cc37e757..f9628f01413c01e72cc2af2b4a18a6b147892ccb 100644 (file)
@@ -37,7 +37,6 @@
 
 #include <libmissioncontrol/mc-profile.h>
 
-#include <libempathy/gossip-paths.h>
 #include <libempathy/gossip-debug.h>
 
 #include "gossip-ui-utils.h"
@@ -63,7 +62,7 @@ get_glade_file (const gchar *filename,
        const char *name;
        GtkWidget **widget_ptr;
 
-       path = gossip_paths_get_glade_path (filename);
+       path = g_build_filename (DATADIR, "empathy", filename, NULL);
        gui = glade_xml_new (path, root, domain);
        g_free (path);
 
index 72f740e5d16e247c130f076b6f258cbbc1e8bf77..37bb98e09bfee561f07d13948a8ff57110e2e2fb 100644 (file)
@@ -2,7 +2,6 @@ AM_CPPFLAGS =                                           \
        -I.                                             \
        -I$(top_srcdir)                                 \
        -DDATADIR=\""$(datadir)"\"                      \
-       -DLOCALEDIR=\""$(datadir)/locale"\"             \
        $(LIBEMPATHY_CFLAGS)                            \
        $(WARN_CFLAGS)
 
@@ -20,7 +19,6 @@ libempathy_la_SOURCES =                                                       \
        gossip-time.c                   gossip-time.h                           \
        gossip-presence.c               gossip-presence.h                       \
        gossip-telepathy-group.c        gossip-telepathy-group.h                \
-       gossip-paths.c                  gossip-paths.h                          \
        gossip-debug.c                  gossip-debug.h                          \
        gossip-utils.c                  gossip-utils.h                          \
        gossip-message.c                gossip-message.h                        \
diff --git a/libempathy/gossip-paths.c b/libempathy/gossip-paths.c
deleted file mode 100644 (file)
index aa97bdc..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2006-2007 Imendio AB
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Richard Hult <richard@imendio.com>
- */
-
-#include "config.h"
-
-#include "gossip-paths.h"
-
-#define EMPATHY "empathy"
-
-gchar *
-gossip_paths_get_glade_path (const gchar *filename)
-{
-       return g_build_filename (DATADIR, EMPATHY, filename, NULL);
-}
-
-gchar *
-gossip_paths_get_image_path (const gchar *filename)
-{
-       return g_build_filename (DATADIR, EMPATHY, filename, NULL);
-}
-
-gchar *
-gossip_paths_get_dtd_path (const gchar *filename)
-{
-       return g_build_filename (DATADIR, EMPATHY, filename, NULL);
-}
-
-gchar *
-gossip_paths_get_locale_path ()
-{
-       return g_strdup (LOCALEDIR);
-}
diff --git a/libempathy/gossip-paths.h b/libempathy/gossip-paths.h
deleted file mode 100644 (file)
index e00a33e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2006 Imendio AB
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GOSSIP_PATHS_H__
-#define __GOSSIP_PATHS_H__
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-gchar *gossip_paths_get_glade_path  (const gchar *filename);
-gchar *gossip_paths_get_image_path  (const gchar *filename);
-gchar *gossip_paths_get_dtd_path    (const gchar *filename);
-gchar *gossip_paths_get_sound_path  (const gchar *filename);
-gchar *gossip_paths_get_locale_path (void);
-
-G_END_DECLS
-
-#endif /* __GOSSIP_PATHS_H__ */
index 579981616d6112c84dadc38e81ebb3be01da5b4b..27bcb85d1e684a39f48abbba8dc9ce6bbe9d3ae1 100644 (file)
@@ -37,7 +37,6 @@
 
 #include "gossip-debug.h"
 #include "gossip-utils.h"
-#include "gossip-paths.h"
 #include "empathy-contact-manager.h"
 
 #define DEBUG_DOMAIN "Utils"
@@ -208,7 +207,7 @@ gossip_xml_validate (xmlDoc      *doc,
        xmlDtd       *dtd;
        gboolean      ret;
 
-       path = gossip_paths_get_dtd_path (dtd_filename);
+       path = g_build_filename (DATADIR, "empathy", dtd_filename, NULL);
 
        /* The list of valid chars is taken from libxml. */
        escaped = xmlURIEscapeStr (path, ":@&=+$,/?;");
index 05bc6f55a8f8c29ee6a0531e799ef32abc5deaf9..0f0c2d0c081cefbdb32548e0e9ef504b2277eaf2 100644 (file)
@@ -4,7 +4,8 @@ cppflags =                      \
        -DSYSCONFDIR=\""$(sysconfdir)"\"                \
        -DDATADIR=\""$(datadir)"\"                      \
        -DLIBDIR=\""$(libdir)"\"                        \
-       $(EMPATHY_CFLAGS)       \
+       -DLOCALEDIR=\""$(datadir)/locale"\"             \
+       $(EMPATHY_CFLAGS)                               \
        $(WARN_CFLAGS)
 
 libs =                                                         \
@@ -16,9 +17,7 @@ bin_PROGRAMS =                        \
        empathy-chat            \
        empathy-accounts
 
-empathy_SOURCES =                                              \
-       empathy-main.c                                          \
-       empathy-filter.c        empathy-filter.h
+empathy_SOURCES = empathy-main.c
 empathy_CPPFLAGS = $(cppflags)
 empathy_LDADD = $(libs)
 
@@ -30,12 +29,6 @@ empathy_chat_SOURCES = empathy-chat-main.c
 empathy_chat_CPPFLAGS = $(cppflags)
 empathy_chat_LDADD = $(libs)
 
-# MC plugin
-#pluginlib_LTLIBRARIES = libempathy-filter-plugin.la
-#libempathy_filter_plugin_la_SOURCES = empathy-filter-plugin.c
-#libempathy_filter_plugin_la_CPPFLAGS = $(MISSION_CONTROL_PLUGINS_CFLAGS)
-#libempathy_filter_plugin_la_LIBADD = $(MISSION_CONTROL_PLUGINS_LIBS)
-
 # Dbus service file
 servicedir = $(datadir)/dbus-1/services
 service_in_files = org.gnome.Empathy.Chat.service.in
@@ -48,20 +41,11 @@ $(service_DATA): $(service_in_files) Makefile
 chandlerdir = $(datadir)/telepathy/managers
 chandler_DATA = empathy-chat.chandler
 
-# Empathy filter DBus API
-empathy-filter-glue.h: empathy-filter.xml
-       $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=empathy_filter --mode=glib-server --output=$@ $<
-empathy-filter-gen.h: empathy-filter.xml
-       $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) --prefix=empathy_filter --mode=glib-client --output=$@ $<
-
 BUILT_SOURCES =                                                        \
-       org.gnome.Empathy.Chat.service                          \
-       empathy-filter-glue.h                                   \
-       empathy-filter-gen.h
+       org.gnome.Empathy.Chat.service
 
 EXTRA_DIST =                                                   \
        org.gnome.Empathy.Chat.service.in                       \
-       empathy-filter.xml                                      \
        $(autostart_DATA)                                       \
        $(chandler_DATA)
 
index 1f53e131e2c10620f4556c5e6a2ec89b48a71a75..bc569d315c9269c8e1d54ad8592657714764ef69 100644 (file)
@@ -44,6 +44,8 @@ main (int argc, char *argv[])
 
        gtk_init (&argc, &argv);
 
+       gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+                                          DATADIR G_DIR_SEPARATOR_S "empathy");
        dialog = gossip_accounts_dialog_show (NULL);
 
        g_signal_connect (dialog, "destroy",
index fb09649344913e511cde55a2be9c73f86b2e431d..3af734ba8e6c1cb3d9ef319b64390635e7a9a49f 100644 (file)
@@ -40,7 +40,6 @@
 #include <libempathy/gossip-utils.h>
 #include <libempathy/empathy-chandler.h>
 #include <libempathy/empathy-tp-chat.h>
-#include <libempathy/gossip-paths.h>
 #include <libempathy-gtk/gossip-private-chat.h>
 #include <libempathy-gtk/gossip-group-chat.h>
 
@@ -163,13 +162,10 @@ main (int argc, char *argv[])
 {
        EmpathyChandler *chandler;
        GnomeProgram    *program;
-       gchar           *localedir;
 
-       localedir = gossip_paths_get_locale_path ();
-       bindtextdomain (GETTEXT_PACKAGE, localedir);
+       bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
        textdomain (GETTEXT_PACKAGE);
-       g_free (localedir);
 
        program = gnome_program_init ("empathy-chat",
                                      PACKAGE_VERSION,
@@ -180,6 +176,8 @@ main (int argc, char *argv[])
                                      NULL);
 
        gtk_window_set_default_icon_name ("empathy");
+       gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+                                          DATADIR G_DIR_SEPARATOR_S "empathy");
 
        if (g_getenv ("EMPATHY_DEBUG")) {
                debug_mode = TRUE;
diff --git a/src/empathy-filter-plugin.c b/src/empathy-filter-plugin.c
deleted file mode 100644 (file)
index ee90d97..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2007 Collabora Ltd.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- * 
- * Authors: Xavier Claessens <xclaesse@gmail.com>
- */
-
-#include <glib.h>
-
-#include <dbus/dbus-glib.h>
-
-#include <libtelepathy/tp-helpers.h>
-#include <libtelepathy/tp-conn.h>
-
-#include <mission-control/mcd-dispatcher.h>
-#include <mission-control/mcd-dispatcher-context.h>
-#include <mission-control/mcd-channel.h>
-
-#include <libempathy/empathy-marshal-main.c>
-
-#include "empathy-filter-gen.h"
-
-static void filter_plugin_text_channel      (McdDispatcherContext *ctx);
-static void filter_plugin_handle_channel_cb (DBusGProxy           *proxy,
-                                            GError               *error,
-                                            McdDispatcherContext *ctx);
-static void filter_plugin_process_cb        (DBusGProxy           *filter,
-                                            guint                 context_handle,
-                                            gboolean              result,
-                                            McdDispatcher        *dispatcher);
-
-static McdFilter text_in_filters[] = {
-       {filter_plugin_text_channel, MCD_FILTER_PRIORITY_USER},
-       {NULL, 0}
-};
-
-static DBusGProxy *filter = NULL;
-static GHashTable *contexts = NULL;
-static guint n_contexts = 0;
-
-void
-mcd_filters_init (McdDispatcher *dispatcher)
-{
-       static gboolean initialized = FALSE;
-
-       if (initialized) {
-               return;
-       }
-
-       filter = dbus_g_proxy_new_for_name (tp_get_bus (),
-                                           "org.gnome.Empathy.Filter",
-                                           "/org/gnome/Empathy/Filter",
-                                           "org.gnome.Empathy.Filter");
-
-       dbus_g_object_register_marshaller (
-               empathy_marshal_VOID__UINT_BOOLEAN,
-               G_TYPE_NONE,
-               G_TYPE_UINT,
-               G_TYPE_BOOLEAN,
-               G_TYPE_INVALID);
-
-       dbus_g_proxy_add_signal (filter, "Process",
-                                G_TYPE_UINT,
-                                G_TYPE_BOOLEAN,
-                                G_TYPE_INVALID);
-       dbus_g_proxy_connect_signal (filter, "Process",
-                                    G_CALLBACK (filter_plugin_process_cb),
-                                    dispatcher,
-                                    NULL);
-       contexts = g_hash_table_new_full (g_direct_hash,
-                                         g_direct_equal,
-                                         NULL,
-                                         (GDestroyNotify) g_object_unref);
-
-       mcd_dispatcher_register_filters (dispatcher,
-                                        text_in_filters,
-                                        TELEPATHY_CHAN_IFACE_TEXT_QUARK,
-                                        MCD_FILTER_IN);
-
-       initialized = TRUE;
-}
-
-static void
-filter_plugin_text_channel (McdDispatcherContext *ctx)
-{
-       const TpConn *tp_conn;
-       McdChannel   *channel;
-
-       tp_conn = mcd_dispatcher_context_get_connection_object (ctx);
-       channel = mcd_dispatcher_context_get_channel (ctx);
-
-       n_contexts++;
-       g_hash_table_insert (contexts,
-                            GUINT_TO_POINTER (n_contexts),
-                            ctx);
-
-       empathy_filter_handle_channel_async (filter,
-                                            dbus_g_proxy_get_bus_name (DBUS_G_PROXY (tp_conn)),
-                                            dbus_g_proxy_get_path (DBUS_G_PROXY (tp_conn)),
-                                            mcd_channel_get_channel_type (channel),
-                                            mcd_channel_get_object_path (channel),
-                                            mcd_channel_get_handle_type (channel),
-                                            mcd_channel_get_handle (channel),
-                                            n_contexts,
-                                            (empathy_filter_handle_channel_reply) filter_plugin_handle_channel_cb,
-                                            ctx);
-}
-
-static void
-filter_plugin_handle_channel_cb (DBusGProxy           *proxy,
-                                GError               *error,
-                                McdDispatcherContext *ctx)
-{
-}
-
-static void
-filter_plugin_process_cb (DBusGProxy    *filter,
-                         guint          context_handle,
-                         gboolean       result,
-                         McdDispatcher *dispatcher)
-{
-       McdDispatcherContext *ctx;
-
-       g_print ("****processing\n");
-       ctx = g_hash_table_lookup (contexts, GUINT_TO_POINTER (context_handle));
-       mcd_dispatcher_context_process (ctx, result);
-}
-
diff --git a/src/empathy-filter.c b/src/empathy-filter.c
deleted file mode 100644 (file)
index 3696cc1..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2007 Collabora Ltd.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- * 
- * Authors: Xavier Claessens <xclaesse@gmail.com>
- */
-
-#include <config.h>
-
-#include <dbus/dbus-glib.h>
-
-#include <libtelepathy/tp-helpers.h>
-#include <libtelepathy/tp-conn.h>
-#include <libtelepathy/tp-chan.h>
-
-#include <libempathy/gossip-debug.h>
-#include <libempathy/empathy-marshal.h>
-
-#include "empathy-filter.h"
-
-#define DEBUG_DOMAIN "EmpathyFilter"
-
-static gboolean empathy_filter_handle_channel (EmpathyFilter  *filter,
-                                              const gchar    *bus_name,
-                                              const gchar    *connection,
-                                              const gchar    *channel_type,
-                                              const gchar    *channel,
-                                              guint           handle_type,
-                                              guint           handle,
-                                              guint           context_handle,
-                                              GError        **error);
-
-#include "empathy-filter-glue.h"
-
-enum {
-       NEW_CHANNEL,
-       PROCESS,
-       LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL];
-
-G_DEFINE_TYPE (EmpathyFilter, empathy_filter, G_TYPE_OBJECT)
-
-static void
-empathy_filter_class_init (EmpathyFilterClass *klass)
-{
-       signals[NEW_CHANNEL] =
-               g_signal_new ("new-channel",
-                             G_OBJECT_CLASS_TYPE (klass),
-                             G_SIGNAL_RUN_LAST,
-                             0,
-                             NULL, NULL,
-                             empathy_marshal_VOID__OBJECT_OBJECT_UINT,
-                             G_TYPE_NONE,
-                             3, TELEPATHY_CONN_TYPE, TELEPATHY_CHAN_TYPE, G_TYPE_UINT);
-
-       signals[PROCESS] =
-               g_signal_new ("process",
-                             G_OBJECT_CLASS_TYPE (klass),
-                             G_SIGNAL_RUN_LAST,
-                             0,
-                             NULL, NULL,
-                             empathy_marshal_VOID__UINT_BOOLEAN,
-                             G_TYPE_NONE,
-                             2, G_TYPE_UINT, G_TYPE_BOOLEAN);
-}
-
-static void
-empathy_filter_init (EmpathyFilter *filter)
-{
-}
-
-EmpathyFilter *
-empathy_filter_new (void)
-{
-       static gboolean  initialized = FALSE;
-       EmpathyFilter   *filter;
-       DBusGProxy      *proxy;
-       guint            result;
-       GError          *error = NULL;
-
-       if (!initialized) {
-               dbus_g_object_type_install_info (EMPATHY_TYPE_FILTER,
-                                                &dbus_glib_empathy_filter_object_info);
-               initialized = TRUE;
-       }
-
-       proxy = dbus_g_proxy_new_for_name (tp_get_bus (),
-                                          DBUS_SERVICE_DBUS,
-                                          DBUS_PATH_DBUS,
-                                          DBUS_INTERFACE_DBUS);
-
-       if (!dbus_g_proxy_call (proxy, "RequestName", &error,
-                               G_TYPE_STRING, "org.gnome.Empathy.Filter",
-                               G_TYPE_UINT, DBUS_NAME_FLAG_DO_NOT_QUEUE,
-                               G_TYPE_INVALID,
-                               G_TYPE_UINT, &result,
-                               G_TYPE_INVALID)) {
-               gossip_debug (DEBUG_DOMAIN,
-                             "Failed to request name: %s",
-                             error ? error->message : "No error given");
-               g_clear_error (&error);
-
-               return NULL;
-       }
-       g_object_unref (proxy);
-
-       filter = g_object_new (EMPATHY_TYPE_FILTER, NULL);
-       dbus_g_connection_register_g_object (tp_get_bus (),
-                                            "/org/gnome/Empathy/Filter",
-                                            G_OBJECT (filter));
-
-       return filter;
-}
-
-void
-empathy_filter_process (EmpathyFilter *filter,
-                       guint          context_handle,
-                       gboolean       result)
-{
-       g_print ("hello\n");
-       g_signal_emit (filter, signals[PROCESS], 0, context_handle, result);
-}
-
-static gboolean
-empathy_filter_handle_channel (EmpathyFilter  *filter,
-                                const gchar  *bus_name,
-                                const gchar  *connection,
-                                const gchar  *channel_type,
-                                const gchar  *channel,
-                                guint         handle_type,
-                                guint         handle,
-                                guint         context_handle,
-                                GError      **error)
-{
-       TpChan *tp_chan;
-       TpConn *tp_conn;
-
-       tp_conn = tp_conn_new (tp_get_bus (),
-                              bus_name,
-                              connection);
-
-       tp_chan = tp_chan_new (tp_get_bus(),
-                              bus_name,
-                              channel,
-                              channel_type,
-                              handle_type,
-                              handle);
-g_print ("new channel\n");
-       g_signal_emit (filter, signals[NEW_CHANNEL], 0, tp_conn, tp_chan, context_handle);
-
-       g_object_unref (tp_chan);
-       g_object_unref (tp_conn);
-
-       return TRUE;
-}
-
diff --git a/src/empathy-filter.h b/src/empathy-filter.h
deleted file mode 100644 (file)
index 071310b..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2007 Collabora Ltd.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Xavier Claessens <xclaesse@gmail.com>
- */
-
-#ifndef __EMPATHY_FILTER_H__
-#define __EMPATHY_FILTER_H__
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-#define EMPATHY_TYPE_FILTER         (empathy_filter_get_type ())
-#define EMPATHY_FILTER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_FILTER, EmpathyFilter))
-#define EMPATHY_FILTER_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), EMPATHY_TYPE_FILTER, EmpathyFilterClass))
-#define EMPATHY_IS_FILTER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), EMPATHY_TYPE_FILTER))
-#define EMPATHY_IS_FILTER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_FILTER))
-#define EMPATHY_FILTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_FILTER, EmpathyFilterClass))
-
-typedef struct _EmpathyFilter      EmpathyFilter;
-typedef struct _EmpathyFilterClass EmpathyFilterClass;
-
-struct _EmpathyFilter {
-       GObject parent;
-};
-
-struct _EmpathyFilterClass {
-       GObjectClass parent_class;
-};
-
-GType          empathy_filter_get_type (void) G_GNUC_CONST;
-EmpathyFilter *empathy_filter_new      (void);
-void           empathy_filter_process  (EmpathyFilter *filter,
-                                       guint          context_handle,
-                                       gboolean       result);
-
-G_END_DECLS
-
-#endif /* __EMPATHY_FILTER_H__ */
diff --git a/src/empathy-filter.xml b/src/empathy-filter.xml
deleted file mode 100644 (file)
index e6b8dae..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<node name="/Filter">
-  <interface name="org.gnome.Empathy.Filter">
-    <annotation name="org.freedesktop.DBus.GLib.ClientCSymbol" value="empathy_filter"/>
-    <method name="HandleChannel">
-      <arg direction="in" type="s" name="bus_name" />
-      <arg direction="in" type="o" name="connection" />
-      <arg direction="in" type="s" name="channel_type" />
-      <arg direction="in" type="o" name="channel" />
-      <arg direction="in" type="u" name="handle_type" />
-      <arg direction="in" type="u" name="handle" />
-      <arg direction="in" type="u" name="context_handle" />
-    </method>
-    <signal name="Process">
-      <arg type="u" name="context_handle" />
-      <arg type="u" name="result" />
-    </signal>
-  </interface>
-</node>
index a49611123a0feaaac01c3cc84af1935a9cf2abff..f64b2d6e92e0959f32c505116b017d7477d02762 100644 (file)
 #include <libempathy/gossip-debug.h>
 #include <libempathy/gossip-utils.h>
 #include <libempathy/gossip-presence.h>
-#include <libempathy/gossip-paths.h>
 #include <libempathy-gtk/empathy-main-window.h>
 #include <libempathy-gtk/empathy-status-icon.h>
 
-#include "empathy-filter.h"
-
 #define DEBUG_DOMAIN "EmpathyMain"
 
 static void error_cb              (MissionControl *mc,
@@ -115,18 +112,6 @@ start_mission_control (MissionControl *mc)
                                      NULL);
 }
 
-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[])
 {
@@ -134,8 +119,6 @@ main (int argc, char *argv[])
        GtkWidget         *window;
        MissionControl    *mc;
        McAccountMonitor  *monitor;
-       EmpathyFilter     *filter;
-       gchar             *localedir;
        GnomeProgram      *program;
        gboolean           no_connect = FALSE;
        GOptionContext    *context;
@@ -146,11 +129,9 @@ main (int argc, char *argv[])
                  NULL },
        };
 
-       localedir = gossip_paths_get_locale_path ();
-       bindtextdomain (GETTEXT_PACKAGE, localedir);
+       bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
        textdomain (GETTEXT_PACKAGE);
-       g_free (localedir);
 
        context = g_option_context_new (_("- Empathy Instant Messenger"));
        g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
@@ -167,12 +148,8 @@ main (int argc, char *argv[])
                                      NULL);
 
        gtk_window_set_default_icon_name ("empathy");
-
-       /* Setting up channel filter */
-       filter = empathy_filter_new ();
-       g_signal_connect (filter, "new-channel",
-                         G_CALLBACK (new_channel_cb),
-                         NULL);
+       gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+                                          DATADIR G_DIR_SEPARATOR_S "empathy");
 
        /* Setting up MC */
        monitor = mc_account_monitor_new ();