pidgin/plugins/musicmessaging/musicmessaging.c

branch
soc.2013.gobjectification
changeset 34660
68c776e3436e
parent 34622
753f46dd000f
child 34874
e03d555394c5
--- a/pidgin/plugins/musicmessaging/musicmessaging.c	Thu Jun 27 23:00:47 2013 +0530
+++ b/pidgin/plugins/musicmessaging/musicmessaging.c	Fri Jun 28 01:42:32 2013 +0530
@@ -111,7 +111,7 @@
 			GString *to_send = g_string_new("");
 			g_string_append_printf(to_send, "##MM## request %s %s##MM##", command, parameters);
 
-			purple_im_conversation_send(PURPLE_CONV_IM(mmconv->conv), to_send->str);
+			purple_conversation_send(mmconv->conv, to_send->str);
 
 			purple_debug_misc("musicmessaging", "Sent request: %s\n", to_send->str);
 		}
@@ -131,7 +131,7 @@
 			GString *to_send = g_string_new("");
 			g_string_append_printf(to_send, "##MM## confirm %s %s##MM##", command, parameters);
 
-			purple_im_conversation_send(PURPLE_CONV_IM(mmconv->conv), to_send->str);
+			purple_conversation_send(mmconv->conv, to_send->str);
 		} else
 		{
 			/* Do nothing. If they aren't the originator, then they can't confirm. */
@@ -154,7 +154,7 @@
 			GString *to_send = g_string_new("");
 			g_string_append_printf(to_send, "##MM## failed %s %s %s##MM##", id, command, parameters);
 
-			purple_im_conversation_send(PURPLE_CONV_IM(mmconv->conv), to_send->str);
+			purple_conversation_send(mmconv->conv, to_send->str);
 		} else
 		{
 			/* Do nothing. If they aren't the originator, then they can't confirm. */
@@ -261,6 +261,7 @@
 static gboolean
 plugin_load(PurplePlugin *plugin) {
 	void *conv_list_handle;
+	GList *l;
 
 	PURPLE_DBUS_RETURN_FALSE_IF_DISABLED(plugin);
 
@@ -273,7 +274,8 @@
 	plugin_pointer = plugin;
 
 	/* Add the button to all the current conversations */
-	purple_conversation_foreach (init_conversation);
+	for (l = purple_conversations_get_all(); l != NULL; l = l->next)
+		init_conversation((PurpleConversation *)l->data);
 
 	/* Listen for any new conversations */
 	conv_list_handle = purple_conversations_get_handle();

mercurial