]> git.0d.be Git - empathy.git/commitdiff
empathy_mission_control_new -> dup_singleton.
authorXavier Claessens <xclaesse@src.gnome.org>
Thu, 15 Jan 2009 20:40:17 +0000 (20:40 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Thu, 15 Jan 2009 20:40:17 +0000 (20:40 +0000)
svn path=/trunk/; revision=2233

16 files changed:
libempathy-gtk/empathy-account-chooser.c
libempathy/empathy-account-manager.c
libempathy/empathy-contact-manager.c
libempathy/empathy-dispatcher.c
libempathy/empathy-idle.c
libempathy/empathy-tp-contact-factory.c
libempathy/empathy-tp-contact-list.c
libempathy/empathy-tp-file.c
libempathy/empathy-tp-roomlist.c
libempathy/empathy-tp-tube.c
libempathy/empathy-utils.c
libempathy/empathy-utils.h
megaphone/src/megaphone-applet.c
src/empathy-accounts-dialog.c
src/empathy-main-window.c
src/empathy.c

index 5d93efcc2dca4d739afd6868734af35ff4af19e2..9bda7c6db221e34f34ef85267fbbe2456f468b66 100644 (file)
@@ -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);
 
index b3ccd6de3185d1f2abcfe79e885d9668dc8b169f..26017c97f5dfc91b3eb3fa33a4a51516da42b94e 100644 (file)
@@ -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;
 
index 533da2aaf2a3c0601019f38189d78259f6ed62af..335131a2f70803f67b28405c2a48401c86358b0e 100644 (file)
@@ -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);
index c7725f486b1658dc30297c084fd8c396329a1d1b..b0084ab62e5a232ca9d332fc55364c58eab6bf28 100644 (file)
@@ -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,
index faa43c3fe899adf98f46d6d03670247c118b5cc5..4a96e2d1699d4e0ebbae6639df11cb15971aaa21 100644 (file)
@@ -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);
index 4b16254eeb9874e9b9d44c05716f6e600c82f51a..c407ea49e402248e9a74680afbe4b8e8dddc9b2d 100644 (file)
@@ -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;
index 31e7bff0fa3f7878c334014236856829e27dda00..ef11587ad262a4e8e251c9ec7c7155cec7abb55d 100644 (file)
@@ -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);
index ccbc856a1e726be7300a20edb77c53e6f705ce94..96d8c8887953c4ec217e3de8e75a8e04657a0a1a 100644 (file)
@@ -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);
index e73f6cb7a93b58604ea4df6ec8ccb2fe0c07ca2b..a1583c083dea172cade196c7a3b0993eedac1c06 100644 (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,
index 0772ac27195b96ab6b35b2f2b98c1d0111977863..f8ce0536f1f0a60e8a6464154a113c7ef25b9d40 100644 (file)
@@ -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);
index 4fc12085a7f8923f87cf685d7ff2d562c74be236..99d89e0ebcce35363ec0820905509f6d4ca9e757 100644 (file)
@@ -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;
 
index b51a19614f6edc3d7da063cd928df39072d9b3bc..62cd1a81b04e0788f3a524f746a59e987d5560bf 100644 (file)
@@ -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);
index 413e34276abfcc252230d4a2de39c2a8906de94e..23376c21d5345194dfee6869a0a4b528551919d7 100644 (file)
@@ -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,
index a9af4482763577f0a3dd84047ba19d1edfc900af..984b55db785d475a3ef7ee7a8076e00f72e36804 100644 (file)
@@ -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),
index 002820c39eb995cd037f068828c4837a70439dbe..cafa5f0ae14963debaa219bc9e9f4601af74f7d3 100644 (file)
@@ -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);
 
index 15e233d24b8799a5be34bbf1fa5985a208e0b52b..fae4611a766aadc2706882da9722c3aeb39849ae 100644 (file)
@@ -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);