From: Sjoerd Simons Date: Wed, 15 Jul 2009 14:24:48 +0000 (+0100) Subject: Remove last references to mission-control 4 X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=3546af6b2b14fa640c1a86e6a975eef6fcb37a00 Remove last references to mission-control 4 --- diff --git a/configure.ac b/configure.ac index 0dab5e4f..ce7decf6 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 f73c41e2..39f950f8 100644 --- a/libempathy/empathy-call-handler.c +++ b/libempathy/empathy-call-handler.c @@ -23,6 +23,7 @@ #include #include +#include #include #include diff --git a/libempathy/empathy-chatroom-manager.c b/libempathy/empathy-chatroom-manager.c index 1ce7a6e5..a512f5b2 100644 --- a/libempathy/empathy-chatroom-manager.c +++ b/libempathy/empathy-chatroom-manager.c @@ -30,6 +30,8 @@ #include #include +#include + #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 55fa668c..bce9f761 100644 --- a/libempathy/empathy-dispatcher.c +++ b/libempathy/empathy-dispatcher.c @@ -37,6 +37,7 @@ #include #include #include +#include #include @@ -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 d24467b2..b05da94a 100644 --- a/libempathy/empathy-ft-handler.c +++ b/libempathy/empathy-ft-handler.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "empathy-ft-handler.h" #include "empathy-tp-contact-factory.h" diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c index 9250359f..f60fc0f8 100644 --- a/libempathy/empathy-idle.c +++ b/libempathy/empathy-idle.c @@ -31,7 +31,6 @@ #include #include -#include #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 c1e20f48..309b3b60 100644 --- a/libempathy/empathy-log-manager.c +++ b/libempathy/empathy-log-manager.c @@ -29,6 +29,7 @@ #include #include +#include #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 ac61392e..09187103 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -26,6 +26,7 @@ #include #include #include +#include #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 27160a44..29148fee 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -26,6 +26,8 @@ #include #include #include +#include + #if HAVE_GEOCLUE #include #endif diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index cdb0431c..6564deb2 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -29,6 +29,7 @@ #include #include #include +#include #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 e60b2999..c43fa0be 100644 --- a/libempathy/empathy-tp-file.c +++ b/libempathy/empathy-tp-file.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "empathy-tp-file.h" #include "empathy-marshal.h" diff --git a/libempathy/empathy-tp-roomlist.c b/libempathy/empathy-tp-roomlist.c index b3d955ee..e369373f 100644 --- a/libempathy/empathy-tp-roomlist.c +++ b/libempathy/empathy-tp-roomlist.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "empathy-account.h" diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index 69779d99..525f2fe0 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 735946b9..3de6047f 100644 --- a/libempathy/empathy-utils.h +++ b/libempathy/empathy-utils.h @@ -32,8 +32,6 @@ #include #include -#include - #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 bfb92af3..080a6cae 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 cd0d925f..9b420fd0 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 1a7ec09c..1be3ff7c 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index 0d04153a..05eb0774 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 67db5a3a..66efa217 100644 --- a/src/empathy-tube-dispatch.c +++ b/src/empathy-tube-dispatch.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/src/empathy.c b/src/empathy.c index 6439eecf..5e3d983a 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -145,68 +146,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, @@ -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);