]> git.0d.be Git - empathy.git/commitdiff
Merge branch 'remove-cc-plugin'
authorDanielle Madeley <danielle.madeley@collabora.co.uk>
Tue, 6 Sep 2011 08:54:03 +0000 (18:54 +1000)
committerDanielle Madeley <danielle.madeley@collabora.co.uk>
Tue, 6 Sep 2011 08:54:03 +0000 (18:54 +1000)
configure.ac
src/Makefile.am
src/cc-empathy-accounts-panel.c [deleted file]
src/cc-empathy-accounts-panel.h [deleted file]
src/empathy-accounts-module.c [deleted file]

index fa43c0603601d020732937c4565c87200009187c..3a5dc72e30e7c8b91bd363765d20f05601425753 100644 (file)
@@ -57,7 +57,6 @@ LIBCHAMPLAIN_GTK_REQUIRED=0.7.1
 LIBCHAMPLAIN_REQUIRED=0.9
 NAUTILUS_SENDTO_REQUIRED=2.90.0
 NETWORK_MANAGER_REQUIRED=0.7.0
-GNOME_CONTROL_CENTER_REQUIRED=2.31.4
 
 # Use --enable-maintainer-mode to disable deprecated symbols,
 # disable single include and enable GSEAL. If this is not a released empathy,
@@ -608,45 +607,6 @@ fi
 
 AM_CONDITIONAL(HAVE_GOA, test "x$have_goa" = "xyes")
 
-# -----------------------------------------------------------
-# new, single-window control center
-# -----------------------------------------------------------
-AC_ARG_ENABLE(control_center_embedding,
-              AS_HELP_STRING([--enable-control-center-embedding=@<:@no/yes/auto@:>@],
-                             [Enable support for single-window control center]),
-                             , enable_control_center_embedding=auto)
-
-if test "x$enable_control_center_embedding" != "xno"; then
-
-   PKG_CHECK_MODULES(CONTROL_CENTER_EMBEDDING, [libgnome-control-center >= GNOME_CONTROL_CENTER_REQUIRED],
-        have_control_center_embedding="yes", have_control_center_embedding="no")
-
-   if test "x$have_control_center_embedding" = "xyes"; then
-      AC_DEFINE(HAVE_CONTROL_CENTER_EMBEDDING, 1, [Define if you have the single-window control center])
-
-      AC_MSG_CHECKING([gnome-control-center extension dir])
-      CONTROL_CENTER_EXTENSIONDIR=`$PKG_CONFIG --variable=extensiondir libgnome-control-center`
-      if test "x$CONTROL_CENTER_EXTENSIONDIR" = "x"; then
-          AC_MSG_ERROR([Could not determine extensiondir])
-      else
-          AC_MSG_RESULT([$CONTROL_CENTER_EXTENSIONDIR])
-      fi
-      AC_SUBST(CONTROL_CENTER_EXTENSIONDIR)
-   fi
-else
-   have_control_center_embedding="no"
-fi
-
-if test "x$enable_control_center_embedding" = "xyes" -a "x$have_control_center_embedding" != "xyes"; then
-   AC_MSG_ERROR([Could not find single-window control center dependencies:
-
-$CONTROL_CENTER_EMBEDDING_PKG_ERRORS])
-fi
-
-AM_CONDITIONAL(HAVE_CONTROL_CENTER_EMBEDDING, test "x$have_control_center_embedding" = "xyes")
-AC_SUBST(CONTROL_CENTER_EMBEDDING_CFLAGS)
-AC_SUBST(CONTROL_CENTER_EMBEDDING_LIBS)
-
 # Optional dependency for avatar selection
 AC_ARG_WITH([cheese],
             AS_HELP_STRING([--with-cheese],
@@ -717,7 +677,6 @@ Configure summary:
        Location awareness (Geoclue):  ${have_geoclue}
        Geocode support (Geocode)...:  ${have_geocode}
        Meego widgets...............:  ${have_meego}
-       Control center embedding....:  ${have_control_center_embedding}
        Cheese webcam support ......:  ${have_cheese}
        Camera monitoring...........:  ${have_gudev}
 
index cc4eebe30c86bbc51bce6ef16edab5e3efa97548..40be88c1274314ed1dce56c1e66705ab51eb736b 100644 (file)
@@ -48,31 +48,6 @@ libempathy_accounts_common_la_LIBADD =                                       \
         $(LIBCHAMPLAIN_LIBS)                                           \
        $(NULL)
 
-if HAVE_CONTROL_CENTER_EMBEDDING
-ccmodulesdir = $(CONTROL_CENTER_EXTENSIONDIR)
-ccmodules_LTLIBRARIES = libempathy-accounts-panel.la
-
-libempathy_accounts_panel_la_SOURCES =                         \
-       empathy-accounts-module.c                               \
-       cc-empathy-accounts-panel.c                             \
-       cc-empathy-accounts-panel.h                             \
-       $(NULL)
-
-libempathy_accounts_panel_la_CPPFLAGS =                                \
-       $(CPPFLAGS_COMMON)                                      \
-       $(CONTROL_CENTER_EMBEDDING_CFLAGS)                      \
-       -DLOCALEDIR=\""$(datadir)/locale"\"                     \
-       $(NULL)
-
-libempathy_accounts_panel_la_LDFLAGS = -export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)'
-
-libempathy_accounts_panel_la_LIBADD =                          \
-       $(EMPATHY_LIBS)                                         \
-       $(CONTROL_CENTER_EMBEDDING_LIBS)                        \
-       libempathy-accounts-common.la                           \
-       $(NULL)
-endif
-
 bin_PROGRAMS =                 \
        empathy                 \
        empathy-accounts        \
@@ -268,12 +243,6 @@ EXTRA_DIST +=                                      \
        empathy-map-view.ui
 endif
 
-if !HAVE_CONTROL_CENTER_EMBEDDING
-EXTRA_DIST += $(libempathy_accounts_panel_la_SOURCES)
-else
-check_c_sources += $(libempathy_accounts_panel_la_SOURCES)
-endif
-
 dist_man_MANS =                        \
        empathy.1 \
        empathy-accounts.1
diff --git a/src/cc-empathy-accounts-panel.c b/src/cc-empathy-accounts-panel.c
deleted file mode 100644 (file)
index 6416c29..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2010 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Authors: Travis Reitter <travis.reitter@collabora.co.uk>
- */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <gtk/gtk.h>
-#include <gio/gio.h>
-#include <glib/gi18n-lib.h>
-
-#include <telepathy-glib/telepathy-glib.h>
-
-#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-connection-managers.h>
-#include <libempathy-gtk/empathy-ui-utils.h>
-#define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
-#include <libempathy/empathy-debug.h>
-
-#include "empathy-accounts-common.h"
-#include "empathy-account-assistant.h"
-#include "empathy-accounts-dialog.h"
-
-#include "cc-empathy-accounts-panel.h"
-
-#define CC_EMPATHY_ACCOUNTS_PANEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_EMPATHY_ACCOUNTS_PANEL, CcEmpathyAccountsPanelPrivate))
-
-struct CcEmpathyAccountsPanelPrivate
-{
-  /* the original window holding the dialog content; it needs to be retained and
-   * destroyed in our finalize(), since it invalidates its children (even if
-   * they've already been reparented by the time it is destroyed) */
-  GtkWidget *accounts_window;
-
-  GtkWidget *assistant;
-  GtkWidget *container;
-};
-
-G_DEFINE_DYNAMIC_TYPE (CcEmpathyAccountsPanel, cc_empathy_accounts_panel, CC_TYPE_PANEL)
-
-static void
-panel_pack_with_accounts_dialog (CcEmpathyAccountsPanel *panel)
-{
-  GtkWidget *content;
-  GtkWidget *action_area;
-
-  if (panel->priv->accounts_window != NULL)
-    {
-      gtk_widget_destroy (panel->priv->accounts_window);
-      gtk_container_remove (GTK_CONTAINER (panel),
-          gtk_bin_get_child (GTK_BIN (panel)));
-    }
-
-    panel->priv->accounts_window = empathy_accounts_dialog_show (NULL, NULL);
-    gtk_widget_hide (panel->priv->accounts_window);
-
-    content = gtk_dialog_get_content_area (
-        GTK_DIALOG (panel->priv->accounts_window));
-    action_area = gtk_dialog_get_action_area (
-        GTK_DIALOG (panel->priv->accounts_window));
-    gtk_widget_set_no_show_all (action_area, TRUE);
-    gtk_widget_hide (action_area);
-
-    gtk_widget_reparent (content, GTK_WIDGET (panel->priv->container));
-}
-
-static void
-account_assistant_closed_cb (GtkWidget *widget,
-    gpointer user_data)
-{
-  CcEmpathyAccountsPanel *panel = CC_EMPATHY_ACCOUNTS_PANEL (user_data);
-
-  if (empathy_accounts_dialog_is_creating (
-      EMPATHY_ACCOUNTS_DIALOG (panel->priv->accounts_window)))
-    {
-      empathy_account_dialog_cancel (
-        EMPATHY_ACCOUNTS_DIALOG (panel->priv->accounts_window));
-    }
-
-  gtk_widget_set_sensitive (GTK_WIDGET (panel), TRUE);
-  panel->priv->assistant = NULL;
-}
-
-static void
-connection_managers_prepare (GObject *source,
-    GAsyncResult *result,
-    gpointer user_data)
-{
-  EmpathyConnectionManagers *cm_mgr = EMPATHY_CONNECTION_MANAGERS (source);
-  TpAccountManager *account_mgr;
-  CcEmpathyAccountsPanel *panel = CC_EMPATHY_ACCOUNTS_PANEL (user_data);
-
-  account_mgr = TP_ACCOUNT_MANAGER (g_object_get_data (G_OBJECT (cm_mgr),
-      "account-manager"));
-
-  if (!empathy_connection_managers_prepare_finish (cm_mgr, result, NULL))
-    goto out;
-
-  panel_pack_with_accounts_dialog (panel);
-
-  if (!empathy_accounts_has_non_salut_accounts (account_mgr))
-    {
-      GtkWindow *parent;
-
-      parent = empathy_get_toplevel_window (GTK_WIDGET (panel));
-      panel->priv->assistant = empathy_account_assistant_show (parent, cm_mgr);
-
-      gtk_widget_set_sensitive (GTK_WIDGET (panel), FALSE);
-
-      tp_g_signal_connect_object (panel->priv->assistant, "hide",
-        G_CALLBACK (account_assistant_closed_cb),
-        panel, 0);
-    }
-
-out:
-  /* remove ref from active_changed() */
-  g_object_unref (account_mgr);
-  g_object_unref (cm_mgr);
-}
-
-static void
-account_manager_ready_for_accounts_cb (GObject *source_object,
-    GAsyncResult *result,
-    gpointer user_data)
-{
-  TpAccountManager *account_mgr = TP_ACCOUNT_MANAGER (source_object);
-  CcEmpathyAccountsPanel *panel = CC_EMPATHY_ACCOUNTS_PANEL (user_data);
-  GError *error = NULL;
-
-  if (!tp_account_manager_prepare_finish (account_mgr, result, &error))
-    {
-      g_warning ("Failed to prepare account manager: %s", error->message);
-      g_error_free (error);
-      return;
-    }
-
-  if (empathy_accounts_has_non_salut_accounts (account_mgr))
-    {
-      panel_pack_with_accounts_dialog (panel);
-
-      /* remove ref from active_changed() */
-      g_object_unref (account_mgr);
-    }
-  else
-    {
-      EmpathyConnectionManagers *cm_mgr;
-
-      cm_mgr = empathy_connection_managers_dup_singleton ();
-
-      g_object_set_data_full (G_OBJECT (cm_mgr), "account-manager",
-          g_object_ref (account_mgr), (GDestroyNotify) g_object_unref);
-
-      empathy_connection_managers_prepare_async (cm_mgr,
-          connection_managers_prepare, panel);
-    }
-}
-
-static void
-cc_empathy_accounts_panel_finalize (GObject *object)
-{
-  CcEmpathyAccountsPanel *panel;
-
-  g_return_if_fail (object != NULL);
-  g_return_if_fail (CC_IS_EMPATHY_ACCOUNTS_PANEL (object));
-
-  panel = CC_EMPATHY_ACCOUNTS_PANEL (object);
-
-  g_return_if_fail (panel->priv != NULL);
-
-  gtk_widget_destroy (panel->priv->accounts_window);
-
-  if (panel->priv->assistant != NULL)
-    gtk_widget_destroy (panel->priv->assistant);
-
-  G_OBJECT_CLASS (cc_empathy_accounts_panel_parent_class)->finalize (object);
-}
-
-static void
-cc_empathy_accounts_panel_class_init (CcEmpathyAccountsPanelClass *klass)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-  object_class->finalize = cc_empathy_accounts_panel_finalize;
-
-  g_type_class_add_private (klass, sizeof (CcEmpathyAccountsPanelPrivate));
-}
-
-static void
-cc_empathy_accounts_panel_class_finalize (CcEmpathyAccountsPanelClass *klass)
-{
-}
-
-static void
-cc_empathy_accounts_panel_init (CcEmpathyAccountsPanel *panel)
-{
-  TpAccountManager *account_manager;
-
-  panel->priv = CC_EMPATHY_ACCOUNTS_PANEL_GET_PRIVATE (panel);
-
-  /* create a container widget immediately, and pack it into the panel,
-   * because the CC library expects a children to exist after
-   * the object is constructed.
-   */
-  panel->priv->container = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
-  gtk_widget_show (panel->priv->container);
-  gtk_container_add (GTK_CONTAINER (panel), panel->priv->container);
-
-  empathy_gtk_init ();
-
-  /* unref'd in final endpoint callbacks */
-  account_manager = tp_account_manager_dup ();
-
-  tp_account_manager_prepare_async (account_manager, NULL,
-      account_manager_ready_for_accounts_cb, panel);
-}
-
-void
-cc_empathy_accounts_panel_register (GIOModule *module)
-{
-  /* Setup gettext */
-  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
-  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-
-  cc_empathy_accounts_panel_register_type (G_TYPE_MODULE (module));
-  g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
-      CC_TYPE_EMPATHY_ACCOUNTS_PANEL, "empathy-accounts", 10);
-}
diff --git a/src/cc-empathy-accounts-panel.h b/src/cc-empathy-accounts-panel.h
deleted file mode 100644 (file)
index cd51b69..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2010 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Authors: Travis Reitter <travis.reitter@collabora.co.uk>
- */
-
-#ifndef __CC_EMPATHY_ACCOUNTS_PANEL_H
-#define __CC_EMPATHY_ACCOUNTS_PANEL_H
-
-#include <gtk/gtk.h>
-#include <libgnome-control-center/cc-panel.h>
-
-G_BEGIN_DECLS
-
-#define CC_TYPE_EMPATHY_ACCOUNTS_PANEL         (cc_empathy_accounts_panel_get_type ())
-#define CC_EMPATHY_ACCOUNTS_PANEL(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), CC_TYPE_EMPATHY_ACCOUNTS_PANEL, CcEmpathyAccountsPanel))
-#define CC_EMPATHY_ACCOUNTS_PANEL_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), CC_TYPE_EMPATHY_ACCOUNTS_PANEL, CcEmpathyAccountsPanelClass))
-#define CC_IS_EMPATHY_ACCOUNTS_PANEL(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), CC_TYPE_EMPATHY_ACCOUNTS_PANEL))
-#define CC_IS_EMPATHY_ACCOUNTS_PANEL_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), CC_TYPE_EMPATHY_ACCOUNTS_PANEL))
-#define CC_EMPATHY_ACCOUNTS_PANEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CC_TYPE_EMPATHY_ACCOUNTS_PANEL, CcEmpathyAccountsPanelClass))
-
-typedef struct CcEmpathyAccountsPanelPrivate CcEmpathyAccountsPanelPrivate;
-
-typedef struct
-{
-  CcPanel parent;
-  CcEmpathyAccountsPanelPrivate *priv;
-} CcEmpathyAccountsPanel;
-
-typedef struct
-{
-  CcPanelClass parent_class;
-} CcEmpathyAccountsPanelClass;
-
-GType cc_empathy_accounts_panel_get_type (void);
-void  cc_empathy_accounts_panel_register (GIOModule *module);
-
-G_END_DECLS
-
-#endif /* __CC_EMPATHY_ACCOUNTS_PANEL_H */
diff --git a/src/empathy-accounts-module.c b/src/empathy-accounts-module.c
deleted file mode 100644 (file)
index aedded6..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
- *
- * Copyright (C) 2010 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Authors: Travis Reitter <travis.reitter@collabora.co.uk>
- */
-
-#include <config.h>
-
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-#include <gmodule.h>
-#include <gio/gio.h>
-
-#include "cc-empathy-accounts-panel.h"
-
-void
-g_io_module_load (GIOModule *module)
-{
-  cc_empathy_accounts_panel_register (module);
-}
-
-void
-g_io_module_unload (GIOModule *module)
-{
-}