diff libpurple/protocols/mxit/mxit.c @ 31902:93cb9f408df4

Whitespace changes for coding-style consistency.
author andrew.victor@mxit.com
date Sun, 21 Aug 2011 15:28:07 +0000
parents 437a45076bf3
children 3322201b446f
line wrap: on
line diff
--- a/libpurple/protocols/mxit/mxit.c	Sun Aug 21 14:50:21 2011 +0000
+++ b/libpurple/protocols/mxit/mxit.c	Sun Aug 21 15:28:07 2011 +0000
@@ -129,7 +129,7 @@
 /*------------------------------------------------------------------------
  * Register MXit to receive URI click notifications from the UI
  */
-void mxit_register_uri_handler(void)
+void mxit_register_uri_handler( void )
 {
 	not_link_ref_count++;
 	if ( not_link_ref_count == 1 ) {
@@ -198,7 +198,7 @@
 	if ( !buddy )
 		return;
 
-	contact = purple_buddy_get_protocol_data(buddy);
+	contact = purple_buddy_get_protocol_data( buddy );
 	if ( !contact )
 		return;
 
@@ -214,7 +214,7 @@
 		case MXIT_TYPE_INFO :
 				tmp = g_strdup_printf("<font color=\"#999999\">%s</font>\n", _( "Loading menu..." ));
 				serv_got_im( session->con, who, tmp, PURPLE_MESSAGE_NOTIFY, time( NULL ) );
-				g_free(tmp);
+				g_free( tmp );
 				mxit_send_message( session, who, " ", FALSE, FALSE );
 		default :
 				break;
@@ -268,7 +268,7 @@
  */
 static const char* mxit_list_emblem( PurpleBuddy* buddy )
 {
-	struct contact*	contact = purple_buddy_get_protocol_data(buddy);
+	struct contact*	contact = purple_buddy_get_protocol_data( buddy );
 
 	if ( !contact )
 		return NULL;
@@ -310,7 +310,7 @@
 char* mxit_status_text( PurpleBuddy* buddy )
 {
 	char* text = NULL;
-	struct contact*	contact = purple_buddy_get_protocol_data(buddy);
+	struct contact*	contact = purple_buddy_get_protocol_data( buddy );
 
 	if ( !contact )
 		return NULL;
@@ -333,7 +333,7 @@
  */
 static void mxit_tooltip( PurpleBuddy* buddy, PurpleNotifyUserInfo* info, gboolean full )
 {
-	struct contact*	contact = purple_buddy_get_protocol_data(buddy);
+	struct contact*	contact = purple_buddy_get_protocol_data( buddy );
 
 	if ( !contact )
 		return;
@@ -424,7 +424,7 @@
 	char*					statusmsg2;
 
 	/* Handle mood changes */
-	if (purple_status_type_get_primitive(purple_status_get_type(status)) == PURPLE_STATUS_MOOD) {
+	if ( purple_status_type_get_primitive(purple_status_get_type( status ) ) == PURPLE_STATUS_MOOD ) {
 		const char* moodid = purple_status_get_attr_string( status, PURPLE_MOOD_NAME );
 		int mood;
 
@@ -487,7 +487,7 @@
 
 	purple_debug_info( MXIT_PLUGIN_ID, "mxit_free_buddy\n" );
 
-	contact = purple_buddy_get_protocol_data(buddy);
+	contact = purple_buddy_get_protocol_data( buddy );
 	if ( contact ) {
 		if ( contact->statusMsg )
 			g_free( contact->statusMsg );
@@ -498,7 +498,7 @@
 		g_free( contact );
 	}
 
-	purple_buddy_set_protocol_data(buddy, NULL);
+	purple_buddy_set_protocol_data( buddy, NULL );
 }
 
 
@@ -607,12 +607,11 @@
  */
 static void mxit_reinvite( PurpleBlistNode *node, gpointer ignored )
 {
-	PurpleBuddy*		buddy;
-	struct contact*		contact;
+	PurpleBuddy*		buddy		= (PurpleBuddy *) node;
 	PurpleConnection*	gc;
 	struct MXitSession*	session;
+	struct contact*		contact;
 
-	buddy = (PurpleBuddy *)node;
 	gc = purple_account_get_connection( purple_buddy_get_account( buddy ) );
 	session = gc->proto_data;
 
@@ -648,7 +647,7 @@
 	if ( ( contact->subtype == MXIT_SUBTYPE_DELETED ) || ( contact->subtype == MXIT_SUBTYPE_REJECTED ) || ( contact->subtype == MXIT_SUBTYPE_NONE ) ) {
 		/* contact is in Deleted, Rejected or None state */
 		act = purple_menu_action_new( _( "Re-Invite" ), PURPLE_CALLBACK( mxit_reinvite ), NULL, NULL );
-		m = g_list_append(m, act);
+		m = g_list_append( m, act );
 	}
 
 	return m;
@@ -660,9 +659,9 @@
  *
  *  @return		Chat defaults list
  */
-static GHashTable *mxit_chat_info_defaults(PurpleConnection *gc, const char *chat_name)
+static GHashTable *mxit_chat_info_defaults( PurpleConnection *gc, const char *chat_name )
 {
-    return g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free);
+    return g_hash_table_new_full( g_str_hash, g_str_equal, NULL, g_free );
 }