Commit 3b1d93ed authored by Xavier Claessens's avatar Xavier Claessens

empathy_mission_control_new -> dup_singleton.

svn path=/trunk/; revision=2233
parent 577ef4e2
......@@ -649,7 +649,7 @@ empathy_account_chooser_filter_is_connected (McAccount *account,
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);
......
......@@ -375,7 +375,7 @@ empathy_account_manager_init (EmpathyAccountManager *manager)
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;
......
......@@ -249,7 +249,7 @@ empathy_contact_manager_init (EmpathyContactManager *manager)
"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);
......
......@@ -926,7 +926,7 @@ empathy_dispatcher_init (EmpathyDispatcher *dispatcher)
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,
......
......@@ -424,7 +424,7 @@ empathy_idle_init (EmpathyIdle *idle)
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);
......
......@@ -972,7 +972,7 @@ tp_contact_factory_status_updated (EmpathyTpContactFactory *tp_factory)
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;
......
......@@ -711,7 +711,7 @@ tp_contact_list_constructed (GObject *list)
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);
......
......@@ -506,7 +506,7 @@ tp_file_constructor (GType type,
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);
......
......@@ -279,7 +279,7 @@ tp_roomlist_constructed (GObject *list)
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);
......@@ -401,7 +401,7 @@ empathy_tp_roomlist_new (McAccount *account)
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,
......
......@@ -291,7 +291,7 @@ empathy_tp_tube_new_stream_tube (EmpathyContact *contact,
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);
......
......@@ -229,7 +229,7 @@ empathy_account_equal (gconstpointer a,
}
MissionControl *
empathy_mission_control_new (void)
empathy_mission_control_dup_singleton (void)
{
static MissionControl *mc = NULL;
......
......@@ -68,7 +68,7 @@ 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_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);
......
......@@ -443,7 +443,7 @@ megaphone_applet_button_press_event_cb (GtkWidget *widget,
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,
......
......@@ -1100,7 +1100,7 @@ empathy_accounts_dialog_show (GtkWindow *parent,
/* 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),
......
......@@ -551,7 +551,7 @@ empathy_main_window_show (void)
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,
......@@ -848,7 +848,7 @@ main_window_favorite_chatroom_join (EmpathyChatroom *chatroom)
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);
......
......@@ -459,7 +459,7 @@ main (int argc, char *argv[])
}
/* 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment