gobjectification: bac4566c: Fixed whitespace and some simple naming

aluink at soc.pidgin.im aluink at soc.pidgin.im
Fri Jun 26 00:10:29 EDT 2009


-----------------------------------------------------------------
Revision: bac4566c732f754d2c19a32e917ecae24b5a1c9f
Ancestor: 811d6e22fc676b5d2f87ff0d8fff750662e4bc7b
Author: aluink at soc.pidgin.im
Date: 2009-06-26T01:49:57
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/bac4566c732f754d2c19a32e917ecae24b5a1c9f

Modified files:
        libpurple/blist-node.c libpurple/blist.c libpurple/blist.h
        libpurple/buddy.c libpurple/chat.c libpurple/contact.c
        libpurple/core.c libpurple/group.c libpurple/internal.h

ChangeLog: 

Fixed whitespace and some simple naming

-------------- next part --------------
============================================================
--- libpurple/blist-node.c	4762c4aa4334d0174ed66a2605ecfcae8afc94a0
+++ libpurple/blist-node.c	5731d00c2fe567068280c38cbb7f8895d0ac780d
@@ -60,21 +60,21 @@ parse_setting(PurpleBlistNode *node, xml
 void
 parse_setting(PurpleBlistNode *node, xmlnode *setting)
 {
-  const char *name = xmlnode_get_attrib(setting, "name");
-  const char *type = xmlnode_get_attrib(setting, "type");
-  char *value = xmlnode_get_data(setting);
+	const char *name = xmlnode_get_attrib(setting, "name");
+	const char *type = xmlnode_get_attrib(setting, "type");
+	char *value = xmlnode_get_data(setting);
 
-  if (!value)
-    return;
+	if (!value)
+		return;
 
-  if (!type || purple_strequal(type, "string"))
-    purple_blist_node_set_string(node, name, value);
-  else if (purple_strequal(type, "bool"))
-    purple_blist_node_set_bool(node, name, atoi(value));
-  else if (purple_strequal(type, "int"))
-    purple_blist_node_set_int(node, name, atoi(value));
+	if (!type || purple_strequal(type, "string"))
+		purple_blist_node_set_string(node, name, value);
+	else if (purple_strequal(type, "bool"))
+		purple_blist_node_set_bool(node, name, atoi(value));
+	else if (purple_strequal(type, "int"))
+		purple_blist_node_set_int(node, name, atoi(value));
 
-  g_free(value);
+	g_free(value);
 }
 
 /*****************************************************************************
@@ -148,12 +148,12 @@ purple_blist_update_node_icon(PurpleBlis
 void
 purple_blist_update_node_icon(PurpleBlistNode *node)
 {
-  PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
+	PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
 
-  g_return_if_fail(node != NULL);
+	g_return_if_fail(node != NULL);
 
-  if (ops && ops->update)
-    ops->update(purplebuddylist, node);
+	if (ops && ops->update)
+		ops->update(purplebuddylist, node);
 }
 
 
@@ -196,7 +196,7 @@ purple_blist_node_destroy(PurpleBlistNod
 void
 purple_blist_node_destroy(PurpleBlistNode *node)
 {
-  /* This function is only a hack for api breakage */
+	/* This function is only a hack for api breakage */
 	g_return_if_fail(PURPLE_IS_BLIST_NODE(node));
 	g_object_unref(G_OBJECT(node));
 }
@@ -385,7 +385,7 @@ purple_blist_node_finalize(GObject *obje
 static void
 purple_blist_node_finalize(GObject *object)
 {
-  PurpleBlistNode *node = PURPLE_BLIST_NODE(object);
+	PurpleBlistNode *node = PURPLE_BLIST_NODE(object);
 	PurpleBlistUiOps *ui_ops;
 	PurpleBlistNode *child, *next_child;
 
@@ -393,7 +393,7 @@ purple_blist_node_finalize(GObject *obje
 	child = node->child;
 	while (child) {
 		next_child = child->next;
-		purple_blist_node_destroy(child);
+		g_object_unref(child);
 		child = next_child;
 	}
 
@@ -406,23 +406,24 @@ purple_blist_node_finalize(GObject *obje
 		ui_ops->remove(purplebuddylist, node);
 
 	if (PURPLE_BLIST_NODE_IS_BUDDY(node))
-		purple_buddy_destroy((PurpleBuddy*)node);
+		g_object_unref(node);
 	else if (PURPLE_BLIST_NODE_IS_CHAT(node))
-		purple_chat_destroy((PurpleChat*)node);
+		g_object_unref(node);
 	else if (PURPLE_BLIST_NODE_IS_CONTACT(node))
-		purple_contact_destroy((PurpleContact*)node);
+		g_object_unref(node);
 	else if (PURPLE_BLIST_NODE_IS_GROUP(node))
-		purple_group_destroy((PurpleGroup*)node);
-  parent_class->finalize(object);
+		g_object_unref(node);
+
+	parent_class->finalize(object);
 }
 
 static void
 purple_blist_node_class_init(PurpleBlistNodeClass *klass)
 {
-  GObjectClass *obj_class = G_OBJECT_CLASS(klass);
+	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
 
-  parent_class = g_type_class_peek_parent(klass);
-  obj_class->finalize = purple_blist_node_finalize;
+	parent_class = g_type_class_peek_parent(klass);
+	obj_class->finalize = purple_blist_node_finalize;
 }
 
 static void
============================================================
--- libpurple/blist.c	57b6cf2a35c60e7673fdc3f66bba4461e314a401
+++ libpurple/blist.c	8e9a4700b2a23837d46ae95397e772bfc5f14cc4
@@ -31,7 +31,6 @@
 #include "notify.h"
 #include "prefs.h"
 #include "privacy.h"
-#include "private.h"
 #include "prpl.h"
 #include "server.h"
 #include "signals.h"
@@ -54,24 +53,24 @@ struct _PurpleBuddyList {
  * The Buddy List
  */
 struct _PurpleBuddyList {
-  PurpleObject parent;
-	PurpleBlistNode *root;          /**< The first node in the buddy list */
+PurpleObject parent;
+	PurpleBlistNode *root;        /**< The first node in the buddy list */
 	GHashTable *buddies;          /**< Every buddy in this list */
-  
-  /**
-   * A hash table used for efficient lookups of buddies by name.
-   * PurpleAccount* => GHashTable*, with the inner hash table being
-   * struct _purple_hbuddy => PurpleBuddy*
-   */
-  GHashTable *buddies_cache;
+	
+	/**
+	 * A hash table used for efficient lookups of buddies by name.
+	 * PurpleAccount* => GHashTable*, with the inner hash table being
+	 * struct _purple_hbuddy => PurpleBuddy*
+	 */
+	GHashTable *buddies_cache;
 
-  guint          save_timer;
-  gboolean       blist_loaded;
+	guint save_timer;
+	gboolean blist_loaded;
 	void *ui_data;                /**< UI-specific data. */
 };
 
 struct _PurpleBuddyListClass {
-  PurpleObjectClass parent;
+	PurpleObjectClass parent;
 };
 
 static PurpleBlistUiOps *blist_ui_ops = NULL;
@@ -274,9 +273,9 @@ parse_group(xmlnode *groupnode)
 	if (!name)
 		name = _("Buddies");
 
-  group = purple_group_new(name);
-  purple_blist_add_group(group,
-     purple_blist_get_last_sibling(purplebuddylist->root));
+	group = purple_group_new(name);
+	purple_blist_add_group(group,
+	purple_blist_get_last_sibling(purplebuddylist->root));
 
 	for (cnode = groupnode->child; cnode; cnode = cnode->next) {
 		if (cnode->type != XMLNODE_TYPE_TAG)
@@ -401,9 +400,9 @@ void purple_blist_destroy()
 
 void purple_blist_destroy()
 {
-  /* This function is only a hack for api breakage */
-  g_return_if_fail(purplebuddylist != NULL);
-  g_object_unref(G_OBJECT(purplebuddylist));
+	/* This function is only a hack for api breakage */
+	g_return_if_fail(purplebuddylist != NULL);
+	g_object_unref(G_OBJECT(purplebuddylist));
 }
 
 void purple_blist_set_visible(gboolean show)
@@ -1521,7 +1520,7 @@ purple_blist_init(void)
 void
 purple_blist_init(void)
 {
-  purplebuddylist = g_object_new(PURPLE_BUDDY_LIST_TYPE, NULL);
+	purplebuddylist = g_object_new(PURPLE_BUDDY_LIST_TYPE, NULL);
 }
 
 void
@@ -1561,21 +1560,21 @@ purple_blist_finalize(GObject *object)
 static void
 purple_blist_finalize(GObject *object)
 {
-  PurpleBuddyList *purplebuddylist = PURPLE_BUDDY_LIST(object);
+	PurpleBuddyList *purplebuddylist = PURPLE_BUDDY_LIST(object);
 	PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
 
 	purple_debug(PURPLE_DEBUG_INFO, "blist", "Destroying\n");
 
 	if (ops && ops->destroy)
 		ops->destroy(purplebuddylist);
-  parent_class->finalize(object);
+	parent_class->finalize(object);
 }
 
 static void
 purple_blist_class_init(PurpleBuddyListClass *klass)
 {
 	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
-  void *handle = purple_blist_get_handle();
+	void *handle = purple_blist_get_handle();
 
 	parent_class = g_type_class_peek_parent(klass);
 	obj_class->finalize = purple_blist_finalize;
@@ -1672,15 +1671,15 @@ purple_blist_instance_init(GTypeInstance
 static void
 purple_blist_instance_init(GTypeInstance *instance, gpointer class)
 {
-  PurpleBlistUiOps *ui_ops;
+	PurpleBlistUiOps *ui_ops;
 	GList *account;
-  PurpleBuddyList *gbl = PURPLE_BUDDY_LIST(instance);
+	PurpleBuddyList *gbl = PURPLE_BUDDY_LIST(instance);
 	PURPLE_DBUS_REGISTER_POINTER(gbl, PurpleBuddyList);
 
 	ui_ops = purple_blist_get_ui_ops();
 
-  #warning: This has to be set here or we cant add the buddies cache
-  purplebuddylist = gbl;
+	#warning: This has to be set here or we cant add the buddies cache
+	purplebuddylist = gbl;
 
 	gbl->buddies = g_hash_table_new_full((GHashFunc)_purple_blist_hbuddy_hash,
 					 (GEqualFunc)_purple_blist_hbuddy_equal,
@@ -1697,8 +1696,8 @@ purple_blist_instance_init(GTypeInstance
 	if (ui_ops != NULL && ui_ops->new_list != NULL)
 		ui_ops->new_list(gbl);
 
-  gbl->save_timer = 0;
-  gbl->blist_loaded = FALSE;
+	gbl->save_timer = 0;
+	gbl->blist_loaded = FALSE;
 
 	purple_blist_load();
 }
============================================================
--- libpurple/blist.h	d31474274e3055856afc575bb16a73429a28e2b7
+++ libpurple/blist.h	9eddab9cf327786f6e4839d27e84da145e084b26
@@ -84,7 +84,7 @@ typedef struct _PurpleBuddyClass PurpleB
 /** @copydoc _PurpleBuddy */
 typedef struct _PurpleBuddy PurpleBuddy;
 typedef struct _PurpleBuddyClass PurpleBuddyClass;
-#define PURPLE_BUDDY_TYPE                  (purple_buddy_get_gtype ())
+#define PURPLE_BUDDY_TYPE                  (purple_buddy_get_type ())
 #define PURPLE_BUDDY(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), PURPLE_BUDDY_TYPE, PurpleBuddy))
 #define PURPLE_IS_BUDDY(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PURPLE_BUDDY_TYPE))
 #define PURPLE_BUDDY_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), PURPLE_BUDDY_TYPE, PurpleBuddyClass))
@@ -94,7 +94,7 @@ typedef struct _PurpleContactClass Purpl
 /** @copydoc _PurpleContact */
 typedef struct _PurpleContact PurpleContact;
 typedef struct _PurpleContactClass PurpleContactClass;
-#define PURPLE_CONTACT_TYPE                  (purple_contact_get_gtype ())
+#define PURPLE_CONTACT_TYPE                  (purple_contact_get_type ())
 #define PURPLE_CONTACT(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), PURPLE_CONTACT_TYPE, PurpleContact))
 #define PURPLE_IS_CONTACT(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PURPLE_CONTACT_TYPE))
 #define PURPLE_CONTACT_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), PURPLE_CONTACT_TYPE, PurpleContactClass))
@@ -104,7 +104,7 @@ typedef struct _PurpleGroupClass PurpleG
 /** @copydoc _PurpleGroup */
 typedef struct _PurpleGroup PurpleGroup;
 typedef struct _PurpleGroupClass PurpleGroupClass;
-#define PURPLE_GROUP_TYPE                  (purple_group_get_gtype ())
+#define PURPLE_GROUP_TYPE                  (purple_group_get_type ())
 #define PURPLE_GROUP(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), PURPLE_GROUP_TYPE, PurpleGroup))
 #define PURPLE_IS_GROUP(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PURPLE_GROUP_TYPE))
 #define PURPLE_GROUP_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), PURPLE_GROUP_TYPE, PurpleGroupClass))
@@ -114,7 +114,7 @@ typedef struct _PurpleChatClass PurpleCh
 /** @copydoc _PurpleChat */
 typedef struct _PurpleChat PurpleChat;
 typedef struct _PurpleChatClass PurpleChatClass;
-#define PURPLE_CHAT_TYPE                  (purple_chat_get_gtype ())
+#define PURPLE_CHAT_TYPE                  (purple_chat_get_type ())
 #define PURPLE_CHAT(obj)                  (G_TYPE_CHECK_INSTANCE_CAST ((obj), PURPLE_CHAT_TYPE, PurpleChat))
 #define PURPLE_IS_CHAT(obj)               (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PURPLE_CHAT_TYPE))
 #define PURPLE_CHAT_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST ((klass), PURPLE_CHAT_TYPE, PurpleChatClass))
@@ -138,7 +138,7 @@ struct _PurpleBlistNode {
  * This is a base class for PurpleBuddy, PurpleContact, PurpleGroup, and for
  * anything else that wants to put itself in the buddy list. */
 struct _PurpleBlistNode {
-  PurpleObject _parent;
+	PurpleObject _parent;
 	PurpleBlistNodeType type;             /**< The type of node this is       */
 	PurpleBlistNode *prev;                /**< The sibling before this buddy. */
 	PurpleBlistNode *next;                /**< The sibling after this buddy.  */
@@ -151,12 +151,12 @@ struct _PurpleBlistNode {
 	                                           slice-allocated
 	                                           <tt>GValue</tt>.  */
 
-	void          *ui_data;               /**< The UI can put data here.      */
+	void *ui_data;                        /**< The UI can put data here.      */
 	PurpleBlistNodeFlags flags;           /**< The buddy flags                */
 };
 
 struct _PurpleBlistNodeClass {
-  PurpleObjectClass parent;
+	PurpleObjectClass parent;
 };
 
 #endif
@@ -177,7 +177,7 @@ struct _PurpleBuddyClass {
 };
 
 struct _PurpleBuddyClass {
-  PurpleBlistNodeClass parent;
+	PurpleBlistNodeClass parent;
 };
 
 #endif
@@ -197,7 +197,7 @@ struct _PurpleContactClass {
 };
 
 struct _PurpleContactClass {
-  PurpleBlistNodeClass parent;
+	PurpleBlistNodeClass parent;
 };
 
 #endif
@@ -215,7 +215,7 @@ struct _PurpleGroupClass {
 };
 
 struct _PurpleGroupClass {
-  PurpleBlistNodeClass parent;
+	PurpleBlistNodeClass parent;
 };
 
 #endif
@@ -233,7 +233,7 @@ struct _PurpleChatClass {
 };
 
 struct _PurpleChatClass {
-  PurpleBlistNodeClass parent;
+	PurpleBlistNodeClass parent;
 };
 
 #endif
@@ -290,14 +290,14 @@ struct _list_account_buddies {
 
 /* The global static members */
 struct _list_account_buddies {
-  GSList *list;
-  PurpleAccount *account;
+	GSList *list;
+	PurpleAccount *account;
 };
 
 struct _purple_hbuddy {
-  char *name;
-  PurpleAccount *account;
-  PurpleBlistNode *group;
+	char *name;
+	PurpleAccount *account;
+	PurpleBlistNode *group;
 };
 
 extern PurpleBuddyList* purplebuddylist;
@@ -1280,22 +1280,22 @@ GType purple_blist_node_get_gtype(void);
 /**
  * Get the GType for PurpleBuddy
  */
-GType purple_buddy_get_gtype(void);
+GType purple_buddy_get_type(void);
 
 /**
  * Get the GType for PurpleGroup
  */
-GType purple_group_get_gtype(void);
+GType purple_group_get_type(void);
 
 /**
  * Get the GType for PurpleContact
  */
-GType purple_contact_get_gtype(void);
+GType purple_contact_get_type(void);
 
 /**
  * Get the GType for PurpleChat
  */
-GType purple_chat_get_gtype(void);
+GType purple_chat_get_type(void);
 
 /*@}*/
 
============================================================
--- libpurple/buddy.c	fb407ea19d330477168e7a1877e19c95393e4a01
+++ libpurple/buddy.c	decc6a34b2ea678c83f690b305ab8d91ce654ec6
@@ -235,7 +235,7 @@ PurpleBuddy *purple_buddy_new(PurpleAcco
 	g_return_val_if_fail(name != NULL, NULL);
 
 	buddy = g_object_new(PURPLE_BUDDY_TYPE, NULL);
-  g_object_ref(buddy);
+	g_object_ref(buddy);
 	buddy->account  = account;
 	buddy->name     = purple_utf8_strip_unprintables(name);
 	buddy->alias    = purple_utf8_strip_unprintables(alias);
@@ -257,7 +257,7 @@ purple_buddy_destroy(PurpleBuddy *buddy)
 purple_buddy_destroy(PurpleBuddy *buddy)
 {
 	g_return_if_fail(PURPLE_IS_BUDDY(buddy));
-  g_object_unref(G_OBJECT(buddy));
+	g_object_unref(G_OBJECT(buddy));
 }
 
 void
@@ -380,7 +380,7 @@ const char *purple_buddy_get_server_alia
 
 const char *purple_buddy_get_server_alias(PurpleBuddy *buddy)
 {
-        g_return_val_if_fail(buddy != NULL, NULL);
+	g_return_val_if_fail(buddy != NULL, NULL);
 
 	if ((buddy->server_alias) && (*buddy->server_alias))
 	    return buddy->server_alias;
@@ -449,7 +449,7 @@ purple_buddy_finalize(GObject *object)
 static void
 purple_buddy_finalize(GObject *object)
 {
-  PurpleBuddy *buddy = PURPLE_BUDDY(object);
+	PurpleBuddy *buddy = PURPLE_BUDDY(object);
 	PurplePlugin *prpl;
 	PurplePluginProtocolInfo *prpl_info;
 
@@ -474,23 +474,23 @@ purple_buddy_finalize(GObject *object)
 
 	PURPLE_DBUS_UNREGISTER_POINTER(buddy);
 
-  #warning: Uhh, need some explanation here. -Aluink
+	#warning: Uhh, need some explanation here. -Aluink
 	/* FIXME: Once PurpleBuddy is a GObject, timeout callbacks can
 	 * g_object_ref() it when connecting the callback and
 	 * g_object_unref() it in the handler.  That way, it won't
 	 * get freed while the timeout is pending and this line can
 	 * be removed. */
 	while (g_source_remove_by_user_data((gpointer *)buddy));
-  parent_class->finalize(object);
+	parent_class->finalize(object);
 }
 
 static void
 purple_buddy_class_init(PurpleBuddyClass *klass)
 {
-  GObjectClass *obj_class = G_OBJECT_CLASS(klass);
+	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
 
-  parent_class = g_type_class_peek_parent(klass);
-  obj_class->finalize = purple_buddy_finalize;
+	parent_class = g_type_class_peek_parent(klass);
+	obj_class->finalize = purple_buddy_finalize;
 }
 
 static void
@@ -500,7 +500,7 @@ GType
 }
 
 GType
-purple_buddy_get_gtype(void)
+purple_buddy_get_type(void)
 {
 	static GType type = 0;
 
============================================================
--- libpurple/chat.c	03ee904bb0786df9e46b166cff0f8d4389023c92
+++ libpurple/chat.c	f0468b806087763c1f1c53924d0b96cb7e573121
@@ -191,7 +191,7 @@ purple_chat_destroy(PurpleChat *chat)
 void
 purple_chat_destroy(PurpleChat *chat)
 {
-  /* This function is only a hack for api breakage */
+	/* This function is only a hack for api breakage */
 	g_return_if_fail(PURPLE_IS_CHAT(chat));
 	g_object_unref(G_OBJECT(chat));
 }
@@ -247,21 +247,21 @@ purple_chat_finalize(GObject *object)
 static void
 purple_chat_finalize(GObject *object)
 {
-  PurpleChat *chat = PURPLE_CHAT(object);
+	PurpleChat *chat = PURPLE_CHAT(object);
 	g_hash_table_destroy(chat->components);
 	g_hash_table_destroy(chat->node.settings);
 	g_free(chat->alias);
 	PURPLE_DBUS_UNREGISTER_POINTER(chat);
-  parent_class->finalize(object);
+	parent_class->finalize(object);
 }
 
 static void
 purple_chat_class_init(PurpleChatClass *klass)
 {
-  GObjectClass *obj_class = G_OBJECT_CLASS(klass);
+	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
 
-  parent_class = g_type_class_peek_parent(klass);
-  obj_class->finalize = purple_chat_finalize;
+	parent_class = g_type_class_peek_parent(klass);
+	obj_class->finalize = purple_chat_finalize;
 }
 
 static void
@@ -271,28 +271,28 @@ GType
 }
 
 GType
-purple_chat_get_gtype(void)
+purple_chat_get_type(void)
 {
-  static GType type = 0;
+	static GType type = 0;
 
-  if(type == 0) {
-    static const GTypeInfo info = {
-      sizeof(PurpleChatClass),
-      NULL,					/* base_init		*/
-      NULL,					/* base_finalize	*/
-      (GClassInitFunc)purple_chat_class_init,
-      NULL,
-      NULL,					/* class_data		*/
-      sizeof(PurpleChat),
-      0,						/* n_preallocs		*/
-      purple_chat_init,					/* instance_init	*/
-      NULL					/* value_table		*/
-    };
+	if(type == 0) {
+		static const GTypeInfo info = {
+			sizeof(PurpleChatClass),
+			NULL,					/* base_init		*/
+			NULL,					/* base_finalize	*/
+			(GClassInitFunc)purple_chat_class_init,
+			NULL,
+			NULL,					/* class_data		*/
+			sizeof(PurpleChat),
+			0,						/* n_preallocs		*/
+			purple_chat_init,					/* instance_init	*/
+			NULL					/* value_table		*/
+		};
 
-    type = g_type_register_static(PURPLE_BLIST_NODE_TYPE,
-                    "PurpleChat",
-                    &info, 0);
-  }
+		type = g_type_register_static(PURPLE_BLIST_NODE_TYPE,
+										"PurpleChat",
+										&info, 0);
+	}
 
-  return type;
+	return type;
 }
============================================================
--- libpurple/contact.c	4af19eec0312a1158acd589fbf45edf7339fb908
+++ libpurple/contact.c	eaf8d12245d20a0dcb77c77899b786a3f108c4df
@@ -223,7 +223,7 @@ purple_contact_destroy(PurpleContact *co
 void
 purple_contact_destroy(PurpleContact *contact)
 {
-  /* This function is only a hack for api breakage */
+	/* This function is only a hack for api breakage */
 	g_return_if_fail(PURPLE_IS_CONTACT(contact));
 	g_object_unref(G_OBJECT(contact));
 }
@@ -289,7 +289,7 @@ purple_contact_finalize(GObject *object)
 static void
 purple_contact_finalize(GObject *object)
 {
-  PurpleContact *contact = PURPLE_CONTACT(object);
+	PurpleContact *contact = PURPLE_CONTACT(object);
 	g_hash_table_destroy(contact->node.settings);
 	g_free(contact->alias);
 	PURPLE_DBUS_UNREGISTER_POINTER(contact);
@@ -312,7 +312,7 @@ GType
 }
 
 GType
-purple_contact_get_gtype(void)
+purple_contact_get_type(void)
 {
 	static GType type = 0;
 
============================================================
--- libpurple/core.c	ddb7889d2a1720941bb0e529b9c5e8cc08d61095
+++ libpurple/core.c	bb7f830d3085c4eb0141a0470c01acaf5e86e30d
@@ -41,7 +41,6 @@
 #include "pounce.h"
 #include "prefs.h"
 #include "privacy.h"
-#include "private.h"
 #include "proxy.h"
 #include "savedstatuses.h"
 #include "signals.h"
@@ -128,9 +127,9 @@ purple_core_init(const char *ui)
 		if (ops->debug_ui_init != NULL)
 			ops->debug_ui_init();
 	}
-  
-  if (ops != NULL && ops->ui_init != NULL)
-    ops->ui_init();
+	
+	if (ops != NULL && ops->ui_init != NULL)
+		ops->ui_init();
 
 #ifdef HAVE_DBUS
 	purple_dbus_init();
@@ -168,7 +167,7 @@ purple_core_init(const char *ui)
 	purple_log_init();
 	purple_network_init();
 	purple_privacy_init();
-  purple_blist_init();
+	purple_blist_init();
 	purple_pounces_init();
 	purple_proxy_init();
 	purple_dnsquery_init();
============================================================
--- libpurple/group.c	9de45f5f7fd9161877144547a6ef9b25a13f5382
+++ libpurple/group.c	c7f838348d92321d91c8fcbdbb4679eee966eb95
@@ -222,9 +222,9 @@ purple_group_destroy(PurpleGroup *group)
 void
 purple_group_destroy(PurpleGroup *group)
 {
-  /* This function is only a hack for api breakage */
-  g_return_if_fail(PURPLE_IS_GROUP(group));
-  g_object_unref(G_OBJECT(group));
+	/* This function is only a hack for api breakage */
+	g_return_if_fail(PURPLE_IS_GROUP(group));
+	g_object_unref(G_OBJECT(group));
 }
 
 const char *purple_group_get_name(PurpleGroup *group)
@@ -252,29 +252,29 @@ PurpleGroup *purple_group_new(const char
 
 PurpleGroup *purple_group_new(const char *name)
 {
-  PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
-  PurpleGroup *group;
+	PurpleBlistUiOps *ops = purple_blist_get_ui_ops();
+	PurpleGroup *group;
 
-  g_return_val_if_fail(name  != NULL, NULL);
-  g_return_val_if_fail(*name != '\0', NULL);
+	g_return_val_if_fail(name  != NULL, NULL);
+	g_return_val_if_fail(*name != '\0', NULL);
 
-  group = purple_find_group(name);
-  if (group != NULL)
-    return group;
+	group = purple_find_group(name);
+	if (group != NULL)
+		 return group;
 
-  group = g_object_new(PURPLE_GROUP_TYPE, NULL);
-  group->name = purple_utf8_strip_unprintables(name);
-  group->totalsize = 0;
-  group->currentsize = 0;
-  group->online = 0;
-  purple_blist_node_initialize_settings((PurpleBlistNode *)group);
-  ((PurpleBlistNode *)group)->type = PURPLE_BLIST_GROUP_NODE;
+	group = g_object_new(PURPLE_GROUP_TYPE, NULL);
+	group->name = purple_utf8_strip_unprintables(name);
+	group->totalsize = 0;
+	group->currentsize = 0;
+	group->online = 0;
+	purple_blist_node_initialize_settings((PurpleBlistNode *)group);
+	((PurpleBlistNode *)group)->type = PURPLE_BLIST_GROUP_NODE;
 
-  if (ops && ops->new_node)
-    ops->new_node((PurpleBlistNode *)group);
+	if (ops && ops->new_node)
+		ops->new_node((PurpleBlistNode *)group);
 
-  PURPLE_DBUS_REGISTER_POINTER(group, PurpleGroup);
-  return group;
+	PURPLE_DBUS_REGISTER_POINTER(group, PurpleGroup);
+	return group;
 }
 
 
@@ -287,7 +287,7 @@ purple_group_finalize(GObject *object)
 static void
 purple_group_finalize(GObject *object)
 {
-  PurpleGroup *group = PURPLE_GROUP(object);
+	PurpleGroup *group = PURPLE_GROUP(object);
 	g_hash_table_destroy(group->node.settings);
 	g_free(group->name);
 	PURPLE_DBUS_UNREGISTER_POINTER(group);
@@ -310,7 +310,7 @@ GType
 }
 
 GType
-purple_group_get_gtype(void)
+purple_group_get_type(void)
 {
 	static GType type = 0;
 
============================================================
--- libpurple/internal.h	dbc124585e288c7bdf107fd6594bc5518cda0ee7
+++ libpurple/internal.h	5a3283a7c4941becb65c5d7c079199af18c9d70e
@@ -288,6 +288,16 @@ _purple_buddy_icon_set_old_icons_dir(con
 _purple_buddy_icon_set_old_icons_dir(const char *dirname);
 
 /**
+ * Initializes the buddy list subsystem.
+ */
+void purple_blist_init(void);
+
+/**
+ * Uninitializes the buddy list subsystem.
+ */
+void purple_blist_uninit(void);
+
+/**
  * Creates a connection to the specified account and either connects
  * or attempts to register a new account.  If you are logging in,
  * the connection uses the current active status for this account.


More information about the Commits mailing list