[empathy/mc5: 96/483] Remove last references to mission-control 4



commit 3546af6b2b14fa640c1a86e6a975eef6fcb37a00
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Wed Jul 15 15:24:48 2009 +0100

    Remove last references to mission-control 4

 configure.ac                            |    9 +---
 libempathy/empathy-call-handler.c       |    1 +
 libempathy/empathy-chatroom-manager.c   |    2 +
 libempathy/empathy-dispatcher.c         |    4 +-
 libempathy/empathy-ft-handler.c         |    1 +
 libempathy/empathy-idle.c               |    4 --
 libempathy/empathy-log-manager.c        |    1 +
 libempathy/empathy-tp-chat.c            |    1 +
 libempathy/empathy-tp-contact-factory.c |    2 +
 libempathy/empathy-tp-contact-list.c    |    1 +
 libempathy/empathy-tp-file.c            |    1 +
 libempathy/empathy-tp-roomlist.c        |    1 +
 libempathy/empathy-utils.c              |   15 ------
 libempathy/empathy-utils.h              |    3 -
 src/empathy-accounts-dialog.c           |    3 -
 src/empathy-debug-dialog.c              |    4 --
 src/empathy-event-manager.c             |    1 +
 src/empathy-main-window.c               |    3 -
 src/empathy-tube-dispatch.c             |    1 +
 src/empathy.c                           |   76 +------------------------------
 20 files changed, 18 insertions(+), 116 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0dab5e4..ce7decf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,6 @@ GTK_REQUIRED=2.16.0
 GCONF_REQUIRED=1.2.0
 LIBPANELAPPLET_REQUIRED=2.10.0
 TELEPATHY_GLIB_REQUIRED=0.7.31
-MISSION_CONTROL_REQUIRED=4.61
 ENCHANT_REQUIRED=1.2.0
 ISO_CODES_REQUIRED=0.35
 LIBNOTIFY_REQUIRED=0.4.4
@@ -95,7 +94,6 @@ PKG_CHECK_MODULES(LIBEMPATHY,
    gio-unix-2.0 >= $GLIB_REQUIRED
    libxml-2.0
    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
-   libmissioncontrol >= $MISSION_CONTROL_REQUIRED
    telepathy-farsight
    farsight2-0.10
    gstreamer-0.10
@@ -111,7 +109,6 @@ PKG_CHECK_MODULES(LIBEMPATHYGTK,
    gtk+-2.0 >= $GTK_REQUIRED
    libcanberra-gtk >= $LIBCANBERRA_GTK_REQUIRED
    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
-   libmissioncontrol >= $MISSION_CONTROL_REQUIRED
    farsight2-0.10
    gstreamer-0.10
    gstreamer-interfaces-0.10
@@ -127,7 +124,6 @@ PKG_CHECK_MODULES(EMPATHY,
    libebook-1.2
    dbus-glib-1
    telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
-   libmissioncontrol >= $MISSION_CONTROL_REQUIRED
    telepathy-farsight
    gstreamer-0.10
 ])
@@ -319,7 +315,7 @@ if test "x$enable_megaphone" != "xno"; then
       glib-2.0 >= $GLIB_REQUIRED
       gtk+-2.0 >= $GTK_REQUIRED
       gconf-2.0 >= $GCONF_REQUIRED
-      libmissioncontrol >= $MISSION_CONTROL_REQUIRED
+      telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
    ], have_megaphone="yes", have_megaphone="no")
 else
    have_megaphone=no
@@ -346,7 +342,7 @@ if test "x$enable_nothere" != "xno"; then
       glib-2.0 >= $GLIB_REQUIRED
       gtk+-2.0 >= $GTK_REQUIRED
       gconf-2.0 >= $GCONF_REQUIRED
-      libmissioncontrol >= $MISSION_CONTROL_REQUIRED
+      telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
    ], have_nothere="yes", have_nothere="no")
 else
    have_nothere=no
@@ -397,7 +393,6 @@ if test "x$enable_python" != "xno"; then
       gobject-2.0
       gconf-2.0 >= $GCONF_REQUIRED
       libxml-2.0
-      libmissioncontrol >= $MISSION_CONTROL_REQUIRED
       gtk+-2.0 >= $GTK_REQUIRED
       gstreamer-0.10
       gstreamer-interfaces-0.10
diff --git a/libempathy/empathy-call-handler.c b/libempathy/empathy-call-handler.c
index f73c41e..39f950f 100644
--- a/libempathy/empathy-call-handler.c
+++ b/libempathy/empathy-call-handler.c
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 
 #include <telepathy-glib/util.h>
+#include <telepathy-glib/interfaces.h>
 
 #include <telepathy-farsight/channel.h>
 #include <telepathy-farsight/stream.h>
diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c
index 1ce7a6e..a512f5b 100644
--- a/libempathy/empathy-chatroom-manager.c
+++ b/libempathy/empathy-chatroom-manager.c
@@ -30,6 +30,8 @@
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
+#include <telepathy-glib/interfaces.h>
+
 #include "empathy-tp-chat.h"
 #include "empathy-chatroom-manager.h"
 #include "empathy-account-manager.h"
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index 55fa668..bce9f76 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -37,6 +37,7 @@
 #include <telepathy-glib/defs.h>
 #include <telepathy-glib/svc-client.h>
 #include <telepathy-glib/svc-generic.h>
+#include <telepathy-glib/interfaces.h>
 
 #include <extensions/extensions.h>
 
@@ -55,7 +56,6 @@
 typedef struct
 {
   EmpathyAccountManager *account_manager;
-  MissionControl *mc;
   /* connection to connection data mapping */
   GHashTable *connections;
   GHashTable *outstanding_classes_requests;
@@ -917,7 +917,6 @@ dispatcher_finalize (GObject *object)
     }
 
   g_object_unref (priv->account_manager);
-  g_object_unref (priv->mc);
 
   g_hash_table_destroy (priv->connections);
   g_hash_table_destroy (priv->outstanding_classes_requests);
@@ -1072,7 +1071,6 @@ empathy_dispatcher_init (EmpathyDispatcher *dispatcher)
     EMPATHY_TYPE_DISPATCHER, EmpathyDispatcherPriv);
 
   dispatcher->priv = priv;
-  priv->mc = empathy_mission_control_dup_singleton ();
   priv->account_manager = empathy_account_manager_dup_singleton ();
 
   g_signal_connect (priv->account_manager, "new-connection",
diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c
index d24467b..b05da94 100644
--- a/libempathy/empathy-ft-handler.c
+++ b/libempathy/empathy-ft-handler.c
@@ -25,6 +25,7 @@
 #include <glib/gi18n.h>
 #include <telepathy-glib/util.h>
 #include <telepathy-glib/dbus.h>
+#include <telepathy-glib/interfaces.h>
 
 #include "empathy-ft-handler.h"
 #include "empathy-tp-contact-factory.h"
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index 9250359..f60fc0f 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -31,7 +31,6 @@
 
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/util.h>
-#include <libmissioncontrol/mc-enum-types.h>
 
 #include "empathy-account-manager.h"
 #include "empathy-idle.h"
@@ -45,7 +44,6 @@
 
 #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyIdle)
 typedef struct {
-	MissionControl *mc;
 	DBusGProxy     *gs_proxy;
 #ifdef HAVE_NM
 	NMClient       *nm_client;
@@ -294,7 +292,6 @@ idle_finalize (GObject *object)
 	priv = GET_PRIV (object);
 
 	g_free (priv->status);
-	g_object_unref (priv->mc);
 
 	if (priv->gs_proxy) {
 		g_object_unref (priv->gs_proxy);
@@ -461,7 +458,6 @@ empathy_idle_init (EmpathyIdle *idle)
 
 	idle->priv = priv;
 	priv->is_idle = FALSE;
-	priv->mc = empathy_mission_control_dup_singleton ();
 
 	priv->manager = empathy_account_manager_dup_singleton ();
 	priv->state = empathy_account_manager_get_global_presence (priv->manager,
diff --git a/libempathy/empathy-log-manager.c b/libempathy/empathy-log-manager.c
index c1e20f4..309b3b6 100644
--- a/libempathy/empathy-log-manager.c
+++ b/libempathy/empathy-log-manager.c
@@ -29,6 +29,7 @@
 #include <glib/gstdio.h>
 
 #include <telepathy-glib/util.h>
+#include <telepathy-glib/interfaces.h>
 
 #include "empathy-log-manager.h"
 #include "empathy-log-store-empathy.h"
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index ac61392..0918710 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -26,6 +26,7 @@
 #include <telepathy-glib/channel.h>
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/util.h>
+#include <telepathy-glib/interfaces.h>
 
 #include "empathy-tp-chat.h"
 #include "empathy-tp-contact-factory.h"
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c
index 27160a4..29148fe 100644
--- a/libempathy/empathy-tp-contact-factory.c
+++ b/libempathy/empathy-tp-contact-factory.c
@@ -26,6 +26,8 @@
 #include <telepathy-glib/util.h>
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/dbus.h>
+#include <telepathy-glib/interfaces.h>
+
 #if HAVE_GEOCLUE
 #include <geoclue/geoclue-geocode.h>
 #endif
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c
index cdb0431..6564deb 100644
--- a/libempathy/empathy-tp-contact-list.c
+++ b/libempathy/empathy-tp-contact-list.c
@@ -29,6 +29,7 @@
 #include <telepathy-glib/connection.h>
 #include <telepathy-glib/util.h>
 #include <telepathy-glib/dbus.h>
+#include <telepathy-glib/interfaces.h>
 
 #include "empathy-tp-contact-list.h"
 #include "empathy-tp-contact-factory.h"
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index e60b299..c43fa0b 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -40,6 +40,7 @@
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/proxy-subclass.h>
 #include <telepathy-glib/util.h>
+#include <telepathy-glib/interfaces.h>
 
 #include "empathy-tp-file.h"
 #include "empathy-marshal.h"
diff --git a/libempathy/empathy-tp-roomlist.c b/libempathy/empathy-tp-roomlist.c
index b3d955e..e369373 100644
--- a/libempathy/empathy-tp-roomlist.c
+++ b/libempathy/empathy-tp-roomlist.c
@@ -26,6 +26,7 @@
 #include <telepathy-glib/channel.h>
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/util.h>
+#include <telepathy-glib/interfaces.h>
 
 #include "empathy-account.h"
 
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 69779d9..525f2fe 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -242,21 +242,6 @@ empathy_account_equal (gconstpointer a,
   return a == b;
 }
 
-MissionControl *
-empathy_mission_control_dup_singleton (void)
-{
-	static MissionControl *mc = NULL;
-
-	if (!mc) {
-		mc = mission_control_new (tp_get_bus ());
-		g_object_add_weak_pointer (G_OBJECT (mc), (gpointer) &mc);
-	} else {
-		g_object_ref (mc);
-	}
-
-	return mc;
-}
-
 const gchar *
 empathy_presence_get_default_message (TpConnectionPresenceType presence)
 {
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 735946b..3de6047 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -32,8 +32,6 @@
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
-#include <libmissioncontrol/mission-control.h>
-
 #include "empathy-contact.h"
 
 #define EMPATHY_GET_PRIV(obj,type) ((type##Priv *) ((type *) obj)->priv)
@@ -67,7 +65,6 @@ xmlNodePtr   empathy_xml_node_find_child_prop_value (xmlNodePtr       node,
 guint        empathy_account_hash                   (gconstpointer    key);
 gboolean     empathy_account_equal                  (gconstpointer    a,
 						    gconstpointer    b);
-MissionControl *empathy_mission_control_dup_singleton (void);
 const gchar * empathy_presence_get_default_message  (TpConnectionPresenceType presence);
 const gchar * empathy_presence_to_str               (TpConnectionPresenceType presence);
 TpConnectionPresenceType empathy_presence_from_str  (const gchar     *str);
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index bfb92af..080a6ca 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -85,7 +85,6 @@ typedef struct {
 	guint             connecting_id;
 
 	EmpathyAccountManager *account_manager;
-	MissionControl    *mc;
 } EmpathyAccountsDialog;
 
 enum {
@@ -1030,7 +1029,6 @@ accounts_dialog_destroy_cb (GtkWidget            *widget,
 	}
 
 	g_object_unref (dialog->account_manager);
-	g_object_unref (dialog->mc);
 
 	g_free (dialog);
 }
@@ -1104,7 +1102,6 @@ empathy_accounts_dialog_show (GtkWindow *parent,
 
 	/* Set up signalling */
 	dialog->account_manager = empathy_account_manager_dup_singleton ();
-	dialog->mc = empathy_mission_control_dup_singleton ();
 
 	g_signal_connect (dialog->account_manager, "account-created",
 			  G_CALLBACK (accounts_dialog_account_added_cb),
diff --git a/src/empathy-debug-dialog.c b/src/empathy-debug-dialog.c
index cd0d925..9b420fd 100644
--- a/src/empathy-debug-dialog.c
+++ b/src/empathy-debug-dialog.c
@@ -284,7 +284,6 @@ debug_dialog_cm_chooser_changed_cb (GtkComboBox *cm_chooser,
     EmpathyDebugDialog *debug_dialog)
 {
   EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
-  MissionControl *mc;
   TpDBusDaemon *dbus;
   GError *error = NULL;
   gchar *bus_name;
@@ -302,13 +301,11 @@ debug_dialog_cm_chooser_changed_cb (GtkComboBox *cm_chooser,
       return;
     }
 
-  mc = empathy_mission_control_dup_singleton ();
   dbus = tp_dbus_daemon_dup (&error);
 
   if (error != NULL)
     {
       DEBUG ("Failed at duping the dbus daemon: %s", error->message);
-      g_object_unref (mc);
     }
 
   gtk_tree_model_get (GTK_TREE_MODEL (priv->cms), &iter,
@@ -344,7 +341,6 @@ debug_dialog_cm_chooser_changed_cb (GtkComboBox *cm_chooser,
       debug_dialog_get_messages_cb, debug_dialog, NULL, NULL);
 
   g_object_unref (dbus);
-  g_object_unref (mc);
 }
 
 typedef struct
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index 1a7ec09..1be3ff7 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -25,6 +25,7 @@
 #include <glib/gi18n.h>
 
 #include <telepathy-glib/util.h>
+#include <telepathy-glib/interfaces.h>
 
 #include <libempathy/empathy-account-manager.h>
 #include <libempathy/empathy-dispatcher.h>
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index 0d04153..05eb077 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -79,7 +79,6 @@
 typedef struct {
 	EmpathyContactListView  *list_view;
 	EmpathyContactListStore *list_store;
-	MissionControl          *mc;
 	EmpathyAccountManager   *account_manager;
 	EmpathyChatroomManager  *chatroom_manager;
 	EmpathyEventManager     *event_manager;
@@ -646,7 +645,6 @@ main_window_destroy_cb (GtkWidget         *widget,
 
 	g_list_free (window->actions_connected);
 
-	g_object_unref (window->mc);
 	g_object_unref (window->account_manager);
 	g_object_unref (window->list_store);
 	g_hash_table_destroy (window->errors);
@@ -1175,7 +1173,6 @@ empathy_main_window_show (void)
 	gtk_action_set_visible (show_map_widget, FALSE);
 #endif
 
-	window->mc = empathy_mission_control_dup_singleton ();
 	window->account_manager = empathy_account_manager_dup_singleton ();
 
 	g_signal_connect (window->account_manager,
diff --git a/src/empathy-tube-dispatch.c b/src/empathy-tube-dispatch.c
index 67db5a3..66efa21 100644
--- a/src/empathy-tube-dispatch.c
+++ b/src/empathy-tube-dispatch.c
@@ -25,6 +25,7 @@
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/util.h>
 #include <telepathy-glib/proxy-subclass.h>
+#include <telepathy-glib/interfaces.h>
 
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
diff --git a/src/empathy.c b/src/empathy.c
index 6439eec..5e3d983 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -41,6 +41,7 @@
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/util.h>
 #include <telepathy-glib/connection-manager.h>
+#include <telepathy-glib/interfaces.h>
 
 #include <libempathy/empathy-idle.h>
 #include <libempathy/empathy-utils.h>
@@ -146,68 +147,6 @@ dispatch_cb (EmpathyDispatcher *dispatcher,
 }
 
 static void
-service_ended_cb (MissionControl *mc,
-		  gpointer        user_data)
-{
-	DEBUG ("Mission Control stopped");
-}
-
-static void
-operation_error_cb (MissionControl *mc,
-		    guint           operation_id,
-		    guint           error_code,
-		    gpointer        user_data)
-{
-	const gchar *message;
-
-	switch (error_code) {
-	case MC_DISCONNECTED_ERROR:
-		message = "Disconnected";
-		break;
-	case MC_INVALID_HANDLE_ERROR:
-		message = "Invalid handle";
-		break;
-	case MC_NO_MATCHING_CONNECTION_ERROR:
-		message = "No matching connection";
-		break;
-	case MC_INVALID_ACCOUNT_ERROR:
-		message = "Invalid account";
-		break;
-	case MC_PRESENCE_FAILURE_ERROR:
-		message = "Presence failure";
-		break;
-	case MC_NO_ACCOUNTS_ERROR:
-		message = "No accounts";
-		break;
-	case MC_NETWORK_ERROR:
-		message = "Network error";
-		break;
-	case MC_CONTACT_DOES_NOT_SUPPORT_VOICE_ERROR:
-		message = "Contact does not support voice";
-		break;
-	case MC_LOWMEM_ERROR:
-		message = "Lowmem";
-		break;
-	case MC_CHANNEL_REQUEST_GENERIC_ERROR:
-		message = "Channel request generic error";
-		break;
-	case MC_CHANNEL_BANNED_ERROR:
-		message = "Channel banned";
-		break;
-	case MC_CHANNEL_FULL_ERROR:
-		message = "Channel full";
-		break;
-	case MC_CHANNEL_INVITE_ONLY_ERROR:
-		message = "Channel invite only";
-		break;
-	default:
-		message = "Unknown error code";
-	}
-
-	DEBUG ("Error during operation %d: %s", operation_id, message);
-}
-
-static void
 use_nm_notify_cb (EmpathyConf *conf,
 		  const gchar *key,
 		  gpointer     user_data)
@@ -529,7 +468,6 @@ main (int argc, char *argv[])
 	EmpathyCallFactory *call_factory;
 	EmpathyFTFactory  *ft_factory;
 	GtkWidget         *window;
-	MissionControl    *mc;
 	EmpathyIdle       *idle;
 	gboolean           autoconnect = TRUE;
 	gboolean           no_connect = FALSE;
@@ -636,15 +574,6 @@ main (int argc, char *argv[])
 		g_clear_error (&error);
 	}
 
-	/* Setting up MC */
-	mc = empathy_mission_control_dup_singleton ();
-	g_signal_connect (mc, "ServiceEnded",
-			  G_CALLBACK (service_ended_cb),
-			  NULL);
-	g_signal_connect (mc, "Error",
-			  G_CALLBACK (operation_error_cb),
-			  NULL);
-
 	if (accounts_dialog) {
 		GtkWidget *dialog;
 
@@ -671,7 +600,7 @@ main (int argc, char *argv[])
 	if (autoconnect && ! no_connect &&
 		tp_connection_presence_type_cmp_availability (empathy_idle_get_state
 			(idle), TP_CONNECTION_PRESENCE_TYPE_OFFLINE) <= 0) {
-		empathy_idle_set_state (idle, MC_PRESENCE_AVAILABLE);
+		empathy_idle_set_state (idle, TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);
 	}
 
 	/* account management */
@@ -722,7 +651,6 @@ main (int argc, char *argv[])
 
 	empathy_idle_set_state (idle, TP_CONNECTION_PRESENCE_TYPE_OFFLINE);
 
-	g_object_unref (mc);
 	g_object_unref (idle);
 	g_object_unref (icon);
 	g_object_unref (account_manager);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]