diff pidgin/gtkaccount.c @ 18058:4ca97b26a8fb

Mark the return type const for the following functions. I noticed this while fixing some DBus stuff which I'll commit shortly. * purple_accounts_get_all * purple_connections_get_all * purple_connections_get_connecting * purple_conv_chat_get_ignored * purple_conv_chat_get_users * purple_get_chats * purple_get_conversations * purple_get_ims * purple_notify_user_info_get_entries References #1344
author Richard Laager <rlaager@wiktel.com>
date Thu, 07 Jun 2007 04:22:42 +0000
parents 58e28ccf08e6
children 926ccb104da0 c885a9ccd301
line wrap: on
line diff
--- a/pidgin/gtkaccount.c	Thu Jun 07 03:13:02 2007 +0000
+++ b/pidgin/gtkaccount.c	Thu Jun 07 04:22:42 2007 +0000
@@ -1585,7 +1585,7 @@
 
 	account = purple_connection_get_account(gc);
 	model = GTK_TREE_MODEL(accounts_window->model);
-	index = g_list_index(purple_accounts_get_all(), account);
+	index = g_list_index((GList *)purple_accounts_get_all(), account);
 
 	if (gtk_tree_model_iter_nth_child(model, &iter, NULL, index))
 	{
@@ -1788,13 +1788,13 @@
 				case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
 					move_account_after(dialog->model, &dialog->drag_iter,
 									   &iter);
-					dest_index = g_list_index(purple_accounts_get_all(),
+					dest_index = g_list_index((GList *)purple_accounts_get_all(),
 											  account) + 1;
 					break;
 
 				case GTK_TREE_VIEW_DROP_BEFORE:
 				case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
-					dest_index = g_list_index(purple_accounts_get_all(),
+					dest_index = g_list_index((GList *)purple_accounts_get_all(),
 											  account);
 
 					move_account_before(dialog->model, &dialog->drag_iter,
@@ -2093,7 +2093,7 @@
 static gboolean
 populate_accounts_list(AccountsWindow *dialog)
 {
-	GList *l;
+	const GList *l;
 	gboolean ret = FALSE;
 	GdkPixbuf *global_buddyicon = NULL;
 	const char *path;
@@ -2297,7 +2297,7 @@
 global_buddyicon_changed(const char *name, PurplePrefType type,
 			gconstpointer value, gpointer window)
 {
-	GList *list;
+	const GList *list;
 	for (list = purple_accounts_get_all(); list; list = list->next) {
 		account_modified_cb(list->data, window);
 	}
@@ -2428,7 +2428,7 @@
 {
 	PurpleConnection *gc = purple_account_get_connection(data->account);
 
-	if (g_list_find(purple_connections_get_all(), gc))
+	if (g_list_find((GList *)purple_connections_get_all(), gc))
 	{
 		purple_blist_request_add_buddy(data->account, data->username,
 									 NULL, data->alias);