pidgin: 4f105e33: disapproval of revision '7ee5e1d431651ed...

evands at pidgin.im evands at pidgin.im
Mon Feb 21 18:11:01 EST 2011


----------------------------------------------------------------------
Revision: 4f105e3377f4f4857b76c46669e414e45bdde0d1
Parent:   7ee5e1d431651ed2b1a54bc942d63f35580af55c
Author:   evands at pidgin.im
Date:     02/21/11 17:56:01
Date:     02/21/11 17:56:10
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/4f105e3377f4f4857b76c46669e414e45bdde0d1

Changelog: 

disapproval of revision '7ee5e1d431651ed2b1a54bc942d63f35580af55c'

Changes against parent 7ee5e1d431651ed2b1a54bc942d63f35580af55c

  patched  libpurple/conversation.c
  patched  libpurple/conversation.h

-------------- next part --------------
============================================================
--- libpurple/conversation.c	a065e8a8285ea67cbc9b7e8595074e4922ad2226
+++ libpurple/conversation.c	292bafeeae0e74e5a4235a58322c44c563150d6d
@@ -2135,8 +2135,6 @@ purple_conv_chat_cb_new(const char *name
 	cb->name = g_strdup(name);
 	cb->flags = flags;
 	cb->alias = g_strdup(alias);
-	cb->attributes = g_hash_table_new_full(g_str_hash, g_str_equal,
-										   g_free, g_free);
 
 	PURPLE_DBUS_REGISTER_POINTER(cb, PurpleConvChatBuddy);
 	return cb;
@@ -2169,7 +2167,6 @@ purple_conv_chat_cb_destroy(PurpleConvCh
 	g_free(cb->alias);
 	g_free(cb->alias_key);
 	g_free(cb->name);
-	g_hash_table_destroy(cb->attributes);
 
 	PURPLE_DBUS_UNREGISTER_POINTER(cb);
 	g_free(cb);
@@ -2183,77 +2180,7 @@ purple_conv_chat_cb_get_name(PurpleConvC
 	return cb->name;
 }
 
-const char *
-purple_conv_chat_cb_get_attribute(PurpleConvChatBuddy *cb, const char *key)
-{
-	g_return_val_if_fail(cb != NULL, NULL);
-	g_return_val_if_fail(key != NULL, NULL);
-	
-	return g_hash_table_lookup(cb->attributes, key);
-}
-
-static void
-append_attribute_key(gpointer key, gpointer value, gpointer user_data)
-{
-	GList **list = user_data;
-	*list = g_list_prepend(*list, key);
-}
-
 GList *
-purple_conv_chat_cb_get_attribute_keys(PurpleConvChatBuddy *cb)
-{
-	GList *keys = NULL;
-	
-	g_return_val_if_fail(cb != NULL, NULL);
-	
-	g_hash_table_foreach(cb->attributes, (GHFunc)append_attribute_key, &keys);
-	
-	return keys;
-}
-
-void
-purple_conv_chat_cb_set_attribute(PurpleConvChat *chat, PurpleConvChatBuddy *cb, const char *key, const char *value)
-{
-	PurpleConversation *conv;
-	PurpleConversationUiOps *ops;
-	
-	g_return_if_fail(cb != NULL);
-	g_return_if_fail(key != NULL);
-	g_return_if_fail(value != NULL);
-	
-	g_hash_table_replace(cb->attributes, g_strdup(key), g_strdup(value));
-	
-	conv = purple_conv_chat_get_conversation(chat);
-	ops = purple_conversation_get_ui_ops(conv);
-	
-	if (ops != NULL && ops->chat_update_user != NULL)
-		ops->chat_update_user(conv, cb->name);
-}
-
-void
-purple_conv_chat_cb_set_attributes(PurpleConvChat *chat, PurpleConvChatBuddy *cb, GList *keys, GList *values)
-{
-	PurpleConversation *conv;
-	PurpleConversationUiOps *ops;
-	
-	g_return_if_fail(cb != NULL);
-	g_return_if_fail(keys != NULL);
-	g_return_if_fail(values != NULL);
-	
-	while (keys != NULL && values != NULL) {
-		g_hash_table_replace(cb->attributes, g_strdup(keys->data), g_strdup(values->data));
-		keys = g_list_next(keys);
-		values = g_list_next(values);
-	}
-	
-	conv = purple_conv_chat_get_conversation(chat);
-	ops = purple_conversation_get_ui_ops(conv);
-	
-	if (ops != NULL && ops->chat_update_user != NULL)
-		ops->chat_update_user(conv, cb->name);
-}
-
-GList *
 purple_conversation_get_extended_menu(PurpleConversation *conv)
 {
 	GList *menu = NULL;
============================================================
--- libpurple/conversation.h	f567b4f28ebe35e5cb816e8fb13d6008f2566dc7
+++ libpurple/conversation.h	381a495feb11bace150cc4afcf6b7b50a9c8624d
@@ -300,9 +300,6 @@ struct _PurpleConvChatBuddy
 	PurpleConvChatBuddyFlags flags;  /**< A bitwise OR of flags for this participant,
 	                                  *   such as whether they are a channel operator.
 	                                  */
-	GHashTable *attributes;          /**< A hash table of attributes about the user, such as
-                                    *   real name, user at host, etc.
-                                    */
 };
 
 /**
@@ -516,46 +513,6 @@ const char *purple_conversation_get_name
 const char *purple_conversation_get_name(const PurpleConversation *conv);
 
 /**
- * Get an attribute of a chat buddy
- *
- * @param cb	The chat buddy.
- * @param key	The key of the attribute.
- *
- * @return The value of the attribute key.
- */
-const char *purple_conv_chat_cb_get_attribute(PurpleConvChatBuddy *cb, const char *key);
-
-/**
- * Get the keys of all atributes of a chat buddy
- *
- * @param cb	The chat buddy.
- *
- * @return A list of the attributes of a chat buddy.
- */
-GList *purple_conv_chat_cb_get_attribute_keys(PurpleConvChatBuddy *cb);
-	
-/**
- * Set an attribute of a chat buddy
- *
- * @param chat	The chat.
- * @param cb	The chat buddy.
- * @param key	The key of the attribute.
- * @param value	The value of the attribute.
- */
-void purple_conv_chat_cb_set_attribute(PurpleConvChat *chat, PurpleConvChatBuddy *cb, const char *key, const char *value);
-
-/**
- * Set attributes of a chat buddy
- *
- * @param chat	The chat.
- * @param cb	The chat buddy.
- * @param keys	A GList of the keys.
- * @param values A GList of the values.
- */
-void
-purple_conv_chat_cb_set_attributes(PurpleConvChat *chat, PurpleConvChatBuddy *cb, GList *keys, GList *values);
-
-/**
  * Enables or disables logging for this conversation.
  *
  * @param conv The conversation.


More information about the Commits mailing list