/soc/2013/ankitkv/gobjectification: 6a939719ea98: Replaced purpl...

Ankit Vani a at nevitus.org
Wed Jun 26 19:27:54 EDT 2013


Changeset: 6a939719ea984b44a51a77e0b19bdfe39cfdc099
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-06-27 04:18 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/6a939719ea98

Description:

Replaced purple_conversations_get() with purple_conversations_get_all(), similar to other purple entities

diffstat:

 finch/plugins/gnttinyurl.c         |   2 +-
 libpurple/conversations.c          |   2 +-
 libpurple/conversations.h          |   3 +--
 libpurple/plugins/tcl/tcl_cmds.c   |   4 ++--
 pidgin/gtkconv.c                   |  16 ++++++++--------
 pidgin/gtkthemes.c                 |   2 +-
 pidgin/plugins/gestures/gestures.c |   4 ++--
 pidgin/plugins/notify.c            |   8 ++++----
 pidgin/plugins/sendbutton.c        |   4 ++--
 pidgin/plugins/spellchk.c          |   4 ++--
 pidgin/plugins/webkit.c            |   4 ++--
 11 files changed, 26 insertions(+), 27 deletions(-)

diffs (275 lines):

diff --git a/finch/plugins/gnttinyurl.c b/finch/plugins/gnttinyurl.c
--- a/finch/plugins/gnttinyurl.c
+++ b/finch/plugins/gnttinyurl.c
@@ -210,7 +210,7 @@ static void url_fetched(PurpleHttpConnec
 {
 	CbInfo *data = (CbInfo *)_data;
 	PurpleConversation *conv = data->conv;
-	GList *convs = purple_conversations_get();
+	GList *convs = purple_conversations_get_all();
 	const gchar *url;
 
 	if (purple_http_response_is_successfull(response))
diff --git a/libpurple/conversations.c b/libpurple/conversations.c
--- a/libpurple/conversations.c
+++ b/libpurple/conversations.c
@@ -143,7 +143,7 @@ purple_conversations_update_cache(Purple
 }
 
 GList *
-purple_conversations_get(void)
+purple_conversations_get_all(void)
 {
 	return conversations;
 }
diff --git a/libpurple/conversations.h b/libpurple/conversations.h
--- a/libpurple/conversations.h
+++ b/libpurple/conversations.h
@@ -27,7 +27,6 @@
 #ifndef _PURPLE_CONVERSATIONS_H_
 #define _PURPLE_CONVERSATIONS_H_
 
-#include "conversation.h"
 #include "conversationtypes.h"
 #include "server.h"
 
@@ -71,7 +70,7 @@ void purple_conversations_update_cache(P
  *
  * @constreturn A GList of all conversations.
  */
-GList *purple_conversations_get(void);
+GList *purple_conversations_get_all(void);
 
 /**
  * Returns a list of all IMs.
diff --git a/libpurple/plugins/tcl/tcl_cmds.c b/libpurple/plugins/tcl/tcl_cmds.c
--- a/libpurple/plugins/tcl/tcl_cmds.c
+++ b/libpurple/plugins/tcl/tcl_cmds.c
@@ -70,7 +70,7 @@ static PurpleConversation *tcl_validate_
 	if (convo == NULL)
 		return NULL;
 
-	for (cur = purple_conversations_get(); cur != NULL; cur = g_list_next(cur)) {
+	for (cur = purple_conversations_get_all(); cur != NULL; cur = g_list_next(cur)) {
 		if (convo == cur->data)
 			return convo;
 	}
@@ -812,7 +812,7 @@ int tcl_cmd_conversation(ClientData unus
 		break;
 	case CMD_CONV_LIST:
 		list = Tcl_NewListObj(0, NULL);
-		for (cur = purple_conversations_get(); cur != NULL; cur = g_list_next(cur)) {
+		for (cur = purple_conversations_get_all(); cur != NULL; cur = g_list_next(cur)) {
 			elem = purple_tcl_ref_new(PurpleTclRefConversation, cur->data);
 			Tcl_ListObjAppendElement(interp, list, elem);
 		}
diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -3064,7 +3064,7 @@ pidgin_conversations_find_unseen_list(Pu
 	} else if (type == PURPLE_CONV_TYPE_CHAT) {
 		l = purple_conversations_get_chats();
 	} else {
-		l = purple_conversations_get();
+		l = purple_conversations_get_all();
 	}
 
 	for (; l != NULL && (max_count == 0 || c < max_count); l = l->next) {
@@ -4849,7 +4849,7 @@ minimum_entry_lines_pref_cb(const char *
                             gconstpointer value,
                             gpointer data)
 {
-	GList *l = purple_conversations_get();
+	GList *l = purple_conversations_get_all();
 	PurpleConversation *conv;
 	while (l != NULL)
 	{
@@ -7938,7 +7938,7 @@ close_on_tabs_pref_cb(const char *name, 
 	PurpleConversation *conv;
 	PidginConversation *gtkconv;
 
-	for (l = purple_conversations_get(); l != NULL; l = l->next) {
+	for (l = purple_conversations_get_all(); l != NULL; l = l->next) {
 		conv = (PurpleConversation *)l->data;
 
 		if (!PIDGIN_IS_PIDGIN_CONVERSATION(conv))
@@ -7961,7 +7961,7 @@ spellcheck_pref_cb(const char *name, Pur
 	PurpleConversation *conv;
 	PidginConversation *gtkconv;
 
-	for (cl = purple_conversations_get(); cl != NULL; cl = cl->next) {
+	for (cl = purple_conversations_get_all(); cl != NULL; cl = cl->next) {
 
 		conv = (PurpleConversation *)cl->data;
 
@@ -8003,7 +8003,7 @@ show_formatting_toolbar_pref_cb(const ch
 	PidginConversation *gtkconv;
 	PidginWindow *win;
 
-	for (l = purple_conversations_get(); l != NULL; l = l->next)
+	for (l = purple_conversations_get_all(); l != NULL; l = l->next)
 	{
 		conv = (PurpleConversation *)l->data;
 
@@ -8060,7 +8060,7 @@ show_buddy_icons_pref_cb(const char *nam
 {
 	GList *l;
 
-	for (l = purple_conversations_get(); l != NULL; l = l->next) {
+	for (l = purple_conversations_get_all(); l != NULL; l = l->next) {
 		PurpleConversation *conv = l->data;
 		if (!PIDGIN_CONVERSATION(conv))
 			continue;
@@ -8088,7 +8088,7 @@ show_protocol_icons_pref_cb(const char *
 						gconstpointer value, gpointer data)
 {
 	GList *l;
-	for (l = purple_conversations_get(); l != NULL; l = l->next) {
+	for (l = purple_conversations_get_all(); l != NULL; l = l->next) {
 		PurpleConversation *conv = l->data;
 		if (PIDGIN_CONVERSATION(conv))
 			update_tab_icon(conv);
@@ -8210,7 +8210,7 @@ account_signed_off_cb(PurpleConnection *
 {
 	GList *iter;
 
-	for (iter = purple_conversations_get(); iter; iter = iter->next)
+	for (iter = purple_conversations_get_all(); iter; iter = iter->next)
 	{
 		PurpleConversation *conv = iter->data;
 
diff --git a/pidgin/gtkthemes.c b/pidgin/gtkthemes.c
--- a/pidgin/gtkthemes.c
+++ b/pidgin/gtkthemes.c
@@ -341,7 +341,7 @@ void pidgin_themes_load_smiley_theme(con
 			pidgin_themes_destroy_smiley_theme_smileys(current_smiley_theme);
 		current_smiley_theme = theme;
 
-		for (cnv = purple_conversations_get(); cnv != NULL; cnv = cnv->next) {
+		for (cnv = purple_conversations_get_all(); cnv != NULL; cnv = cnv->next) {
 			PurpleConversation *conv = cnv->data;
 
 			if (PIDGIN_IS_PIDGIN_CONVERSATION(conv)) {
diff --git a/pidgin/plugins/gestures/gestures.c b/pidgin/plugins/gestures/gestures.c
--- a/pidgin/plugins/gestures/gestures.c
+++ b/pidgin/plugins/gestures/gestures.c
@@ -174,7 +174,7 @@ plugin_load(PurplePlugin *plugin)
 	PurpleConversation *conv;
 	GList *l;
 
-	for (l = purple_conversations_get(); l != NULL; l = l->next) {
+	for (l = purple_conversations_get_all(); l != NULL; l = l->next) {
 		conv = (PurpleConversation *)l->data;
 
 		if (!PIDGIN_IS_PIDGIN_CONVERSATION(conv))
@@ -197,7 +197,7 @@ plugin_unload(PurplePlugin *plugin)
 	PidginConversation *gtkconv;
 	GList *l;
 
-	for (l = purple_conversations_get(); l != NULL; l = l->next) {
+	for (l = purple_conversations_get_all(); l != NULL; l = l->next) {
 		conv = (PurpleConversation *)l->data;
 
 		if (!PIDGIN_IS_PIDGIN_CONVERSATION(conv))
diff --git a/pidgin/plugins/notify.c b/pidgin/plugins/notify.c
--- a/pidgin/plugins/notify.c
+++ b/pidgin/plugins/notify.c
@@ -636,7 +636,7 @@ apply_method()
 {
 	GList *convs;
 
-	for (convs = purple_conversations_get(); convs != NULL;
+	for (convs = purple_conversations_get_all(); convs != NULL;
 	     convs = convs->next) {
 		PurpleConversation *conv = (PurpleConversation *)convs->data;
 
@@ -652,7 +652,7 @@ apply_method()
 static void
 apply_notify()
 {
-	GList *convs = purple_conversations_get();
+	GList *convs = purple_conversations_get_all();
 
 	while (convs) {
 		PurpleConversation *conv = (PurpleConversation *)convs->data;
@@ -836,7 +836,7 @@ get_config_frame(PurplePlugin *plugin)
 static gboolean
 plugin_load(PurplePlugin *plugin)
 {
-	GList *convs = purple_conversations_get();
+	GList *convs = purple_conversations_get_all();
 	void *conv_handle = purple_conversations_get_handle();
 	void *gtk_conv_handle = pidgin_conversations_get_handle();
 
@@ -876,7 +876,7 @@ plugin_load(PurplePlugin *plugin)
 static gboolean
 plugin_unload(PurplePlugin *plugin)
 {
-	GList *convs = purple_conversations_get();
+	GList *convs = purple_conversations_get_all();
 
 	while (convs) {
 		PurpleConversation *conv = (PurpleConversation *)convs->data;
diff --git a/pidgin/plugins/sendbutton.c b/pidgin/plugins/sendbutton.c
--- a/pidgin/plugins/sendbutton.c
+++ b/pidgin/plugins/sendbutton.c
@@ -117,7 +117,7 @@ conversation_displayed_cb(PidginConversa
 static gboolean
 plugin_load(PurplePlugin *plugin)
 {
-	GList *convs = purple_conversations_get();
+	GList *convs = purple_conversations_get_all();
 	void *gtk_conv_handle = pidgin_conversations_get_handle();
 
 	purple_signal_connect(gtk_conv_handle, "conversation-displayed", plugin,
@@ -145,7 +145,7 @@ plugin_load(PurplePlugin *plugin)
 static gboolean
 plugin_unload(PurplePlugin *plugin)
 {
-	GList *convs = purple_conversations_get();
+	GList *convs = purple_conversations_get_all();
 
 	while (convs) {
 		PurpleConversation *conv = (PurpleConversation *)convs->data;
diff --git a/pidgin/plugins/spellchk.c b/pidgin/plugins/spellchk.c
--- a/pidgin/plugins/spellchk.c
+++ b/pidgin/plugins/spellchk.c
@@ -2119,7 +2119,7 @@ plugin_load(PurplePlugin *plugin)
 	load_conf();
 
 	/* Attach to existing conversations */
-	for (convs = purple_conversations_get(); convs != NULL; convs = convs->next)
+	for (convs = purple_conversations_get_all(); convs != NULL; convs = convs->next)
 	{
 		spellchk_new_attach((PurpleConversation *)convs->data);
 	}
@@ -2136,7 +2136,7 @@ plugin_unload(PurplePlugin *plugin)
 	GList *convs;
 
 	/* Detach from existing conversations */
-	for (convs = purple_conversations_get(); convs != NULL; convs = convs->next)
+	for (convs = purple_conversations_get_all(); convs != NULL; convs = convs->next)
 	{
 		PidginConversation *gtkconv = PIDGIN_CONVERSATION((PurpleConversation *)convs->data);
 		spellchk *spell = g_object_get_data(G_OBJECT(gtkconv->entry), SPELLCHK_OBJECT_KEY);
diff --git a/pidgin/plugins/webkit.c b/pidgin/plugins/webkit.c
--- a/pidgin/plugins/webkit.c
+++ b/pidgin/plugins/webkit.c
@@ -113,7 +113,7 @@ conversation_displayed_cb(PidginConversa
 static gboolean
 plugin_load(PurplePlugin *plugin)
 {
-	GList *convs = purple_conversations_get();
+	GList *convs = purple_conversations_get_all();
 	void *gtk_conv_handle = pidgin_conversations_get_handle();
 
 	purple_signal_connect(gtk_conv_handle, "conversation-displayed", plugin,
@@ -136,7 +136,7 @@ plugin_load(PurplePlugin *plugin)
 static gboolean
 plugin_unload(PurplePlugin *plugin)
 {
-	GList *convs = purple_conversations_get();
+	GList *convs = purple_conversations_get_all();
 
 	while (convs) {
 		PurpleConversation *conv = (PurpleConversation *)convs->data;



More information about the Commits mailing list