g_return_val_if_fail (MC_IS_ACCOUNT (account), FALSE);
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
status = mission_control_get_connection_status (mc, account, NULL);
g_object_unref (mc);
EMPATHY_TYPE_ACCOUNT_MANAGER, EmpathyAccountManagerPriv);
manager->priv = priv;
priv->monitor = mc_account_monitor_new ();
- priv->mc = empathy_mission_control_new ();
+ priv->mc = empathy_mission_control_dup_singleton ();
priv->connected = priv->connecting = 0;
priv->dispose_run = FALSE;
"account-connection-changed",
G_CALLBACK (contact_manager_connection_changed_cb), manager);
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
/* Get ContactList for existing connections */
accounts = mission_control_get_online_connections (mc, NULL);
EMPATHY_TYPE_DISPATCHER, EmpathyDispatcherPriv);
dispatcher->priv = priv;
- priv->mc = empathy_mission_control_new ();
+ priv->mc = empathy_mission_control_dup_singleton ();
priv->account_manager = empathy_account_manager_dup_singleton ();
g_signal_connect (priv->account_manager,
idle->priv = priv;
priv->is_idle = FALSE;
- priv->mc = empathy_mission_control_new ();
+ priv->mc = empathy_mission_control_dup_singleton ();
priv->state = mission_control_get_presence_actual (priv->mc, &error);
if (error) {
DEBUG ("Error getting actual presence: %s", error->message);
return;
}
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
priv->connection = mission_control_get_tpconnection (mc, priv->account, NULL);
if (!priv->connection) {
return;
const gchar *protocol_name;
/* Get the connection. status==0 means CONNECTED */
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
status = mission_control_get_connection_status (mc, priv->account, NULL);
g_return_if_fail (status == 0);
priv->connection = mission_control_get_tpconnection (mc, priv->account, NULL);
tp_file = EMPATHY_TP_FILE (file_obj);
tp_file->priv->factory = empathy_contact_factory_dup_singleton ();
- tp_file->priv->mc = empathy_mission_control_new ();
+ tp_file->priv->mc = empathy_mission_control_dup_singleton ();
g_signal_connect (tp_file->priv->channel, "invalidated",
G_CALLBACK (tp_file_invalidated_cb), tp_file);
EmpathyTpRoomlistPriv *priv = GET_PRIV (list);
MissionControl *mc;
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
priv->account = mission_control_get_account_for_tpconnection (mc,
priv->connection,
NULL);
g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
connection = mission_control_get_tpconnection (mc, account, NULL);
list = g_object_new (EMPATHY_TYPE_TP_ROOMLIST,
g_return_val_if_fail (hostname != NULL, NULL);
g_return_val_if_fail (service != NULL, NULL);
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
account = empathy_contact_get_account (contact);
connection = mission_control_get_tpconnection (mc, account, NULL);
g_object_unref (mc);
}
MissionControl *
-empathy_mission_control_new (void)
+empathy_mission_control_dup_singleton (void)
{
static MissionControl *mc = NULL;
guint empathy_account_hash (gconstpointer key);
gboolean empathy_account_equal (gconstpointer a,
gconstpointer b);
-MissionControl *empathy_mission_control_new (void);
+MissionControl *empathy_mission_control_dup_singleton (void);
const gchar * empathy_presence_get_default_message (McPresence presence);
const gchar * empathy_presence_to_str (McPresence presence);
McPresence empathy_presence_from_str (const gchar *str);
empathy_contact_get_id (priv->contact),
empathy_contact_get_handle (priv->contact));
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
mission_control_request_channel (mc,
empathy_contact_get_account (priv->contact),
TP_IFACE_CHANNEL_TYPE_TEXT,
/* Set up signalling */
dialog->account_manager = empathy_account_manager_dup_singleton ();
- dialog->mc = empathy_mission_control_new ();
+ dialog->mc = empathy_mission_control_dup_singleton ();
g_signal_connect (dialog->account_manager, "account-created",
G_CALLBACK (accounts_dialog_account_added_cb),
main_window_connection_items_setup (window, glade);
g_object_unref (glade);
- window->mc = empathy_mission_control_new ();
+ window->mc = empathy_mission_control_dup_singleton ();
window->account_manager = empathy_account_manager_dup_singleton ();
g_signal_connect (window->account_manager,
McAccount *account;
const gchar *room;
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
account = empathy_chatroom_get_account (chatroom);
room = empathy_chatroom_get_room (chatroom);
}
/* Setting up MC */
- mc = empathy_mission_control_new ();
+ mc = empathy_mission_control_dup_singleton ();
g_signal_connect (mc, "ServiceEnded",
G_CALLBACK (service_ended_cb),
NULL);