diff --git a/astylerc b/astylerc
index 14177d0fa0ef4086ca0e03957f3f17361d80b493..0170fbdc9431c1f5875bf75231dd88f8c692b06c 100644
--- a/astylerc
+++ b/astylerc
@@ -5,7 +5,7 @@
 #           Savoir-faire Linux Inc
 #          http://www.sflphone.org 
 
-style=kr                # Kernighan & Ritchie style formatting/indenting uses linux bracket
+style=k&r                # Kernighan & Ritchie style formatting/indenting uses linux bracket
 indent=spaces=4         # Use spaces instead of tabs for indentation
 indent-classes          # Indent 'class' and 'struct' blocks so that the blocks 'public:', 'protected:' and 'private:' are indented
 indent-switches         # Indent 'switch' blocks so that the 'case X:' statements are indented in the switch block
diff --git a/sflphone-client-gnome/src/accountlist.c b/sflphone-client-gnome/src/accountlist.c
index 7e6d0c86dd75155b6ac960fe254eef704d2a5d02..52109a17b133cf5aca14fba2e14ccf2bd2f7e562 100644
--- a/sflphone-client-gnome/src/accountlist.c
+++ b/sflphone-client-gnome/src/accountlist.c
@@ -36,357 +36,366 @@
 GQueue * accountQueue;
 
 /* GCompareFunc to compare a accountID (gchar* and a account_t) */
-gint is_accountID_struct ( gconstpointer a, gconstpointer b) {
-
-	account_t * c = (account_t*)a;
-	if(strcmp(c->accountID, (gchar*) b) == 0)
-	{
-		return 0;
-	}
-	else
-	{
-		return 1;
-	}
+gint is_accountID_struct (gconstpointer a, gconstpointer b)
+{
+
+    account_t * c = (account_t*) a;
+
+    if (strcmp (c->accountID, (gchar*) b) == 0) {
+        return 0;
+    } else {
+        return 1;
+    }
 }
 
 /* GCompareFunc to get current call (gchar* and a account_t) */
-gint get_state_struct ( gconstpointer a, gconstpointer b) {
-
-	account_t * c = (account_t*)a;
-	if( c->state == *((account_state_t*)b))
-	{
-		return 0;
-	}
-	else
-	{
-		return 1;
-	}
+gint get_state_struct (gconstpointer a, gconstpointer b)
+{
+
+    account_t * c = (account_t*) a;
+
+    if (c->state == * ( (account_state_t*) b)) {
+        return 0;
+    } else {
+        return 1;
+    }
 }
 
-void account_list_init () {
+void account_list_init ()
+{
 
-	accountQueue = g_queue_new ();
+    accountQueue = g_queue_new ();
 }
 
-	void
+void
 account_list_clean ()
 {
-	g_queue_free (accountQueue);
+    g_queue_free (accountQueue);
 }
 
-	void
+void
 account_list_add (account_t * c)
 {
-	g_queue_push_tail (accountQueue, (gpointer *) c);
+    g_queue_push_tail (accountQueue, (gpointer *) c);
 }
 
-	void
+void
 account_list_add_at_nth (account_t * c, guint pos)
 {
-	g_queue_push_nth (accountQueue, (gpointer *) c, pos);
+    g_queue_push_nth (accountQueue, (gpointer *) c, pos);
 }
 
 
-	void
+void
 account_list_remove (const gchar * accountID)
 {
-	GList * c = g_queue_find_custom (accountQueue, accountID, is_accountID_struct);
-	if (c)
-	{
-		g_queue_remove(accountQueue, c->data);
-	}
+    GList * c = g_queue_find_custom (accountQueue, accountID, is_accountID_struct);
+
+    if (c) {
+        g_queue_remove (accountQueue, c->data);
+    }
 }
 
 
-	account_t *
-account_list_get_by_state (account_state_t state )
+account_t *
+account_list_get_by_state (account_state_t state)
 {
-	GList * c = g_queue_find_custom (accountQueue, &state, get_state_struct);
-	if (c)
-	{
-		return (account_t *)c->data;
-	}
-	else
-	{
-		return NULL;
-	}
+    GList * c = g_queue_find_custom (accountQueue, &state, get_state_struct);
+
+    if (c) {
+        return (account_t *) c->data;
+    } else {
+        return NULL;
+    }
 
 }
 
-	account_t *
-account_list_get_by_id(gchar * accountID)
+account_t *
+account_list_get_by_id (gchar * accountID)
 {
-	GList * c = g_queue_find_custom (accountQueue, accountID, is_accountID_struct);
-	if(c)
-	{
-		return (account_t *)c->data;
-	}
-	else
-	{
-		return NULL;
-	}
+    GList * c = g_queue_find_custom (accountQueue, accountID, is_accountID_struct);
+
+    if (c) {
+        return (account_t *) c->data;
+    } else {
+        return NULL;
+    }
 }
 
-guint account_list_get_size (void) {
-	
-	return g_queue_get_length (accountQueue);
+guint account_list_get_size (void)
+{
+
+    return g_queue_get_length (accountQueue);
 }
 
-account_t * account_list_get_nth (guint n) {
+account_t * account_list_get_nth (guint n)
+{
 
-	return g_queue_peek_nth (accountQueue, n);
+    return g_queue_peek_nth (accountQueue, n);
 }
 
-	account_t*
-account_list_get_current( )
+account_t*
+account_list_get_current()
 {
-	account_t *current;
+    account_t *current;
 
-	// No account registered
-	if (account_list_get_registered_accounts () == 0)
-		return NULL;
+    // No account registered
+    if (account_list_get_registered_accounts () == 0)
+        return NULL;
 
-	// if we are here, it means that we have at least one registered account in the list
-	// So we get the first one
-	current = account_list_get_by_state (ACCOUNT_STATE_REGISTERED);
-	if (!current)
-		return NULL;
+    // if we are here, it means that we have at least one registered account in the list
+    // So we get the first one
+    current = account_list_get_by_state (ACCOUNT_STATE_REGISTERED);
 
-	return current;
+    if (!current)
+        return NULL;
+
+    return current;
 }
 
 void account_list_set_current (account_t *current)
 {
-	gpointer acc;
-	guint pos;
-
-	// 2 steps:
-	// 1 - retrieve the index of the current account in the Queue
-	// 2 - then set it as first
-	pos = account_list_get_position (current);
-	if (pos > 0)
-	{
-		acc = g_queue_pop_nth(accountQueue, pos);
-		g_queue_push_nth(accountQueue, acc, 0);
-	}
+    gpointer acc;
+    guint pos;
+
+    // 2 steps:
+    // 1 - retrieve the index of the current account in the Queue
+    // 2 - then set it as first
+    pos = account_list_get_position (current);
+
+    if (pos > 0) {
+        acc = g_queue_pop_nth (accountQueue, pos);
+        g_queue_push_nth (accountQueue, acc, 0);
+    }
 }
 
 
 const gchar * account_state_name (account_state_t s)
 {
-	gchar * state;
-	switch(s)
-	{
-		case ACCOUNT_STATE_REGISTERED:
-			state = _("Registered");
-			break;
-		case ACCOUNT_STATE_UNREGISTERED:
-			state = _("Not Registered");
-			break;
-		case ACCOUNT_STATE_TRYING:
-			state = _("Trying...");
-			break;
-		case ACCOUNT_STATE_ERROR:
-			state = _("Error");
-			break;
-		case ACCOUNT_STATE_ERROR_AUTH:
-			state = _("Authentication Failed");
-			break;
-		case ACCOUNT_STATE_ERROR_NETWORK:
-			state = _("Network unreachable");
-			break;
-		case ACCOUNT_STATE_ERROR_HOST:
-			state = _("Host unreachable");
-			break;
-		case ACCOUNT_STATE_ERROR_CONF_STUN:
-			state = _("Stun configuration error");
-			break;
-		case ACCOUNT_STATE_ERROR_EXIST_STUN:
-			state = _("Stun server invalid");
-			break;
-		case IP2IP_PROFILE_STATUS:
-			state = _("Ready");
-			break;
-		default:
-			state = _("Invalid");
-			break;
-	}
-	return state;
+    gchar * state;
+
+    switch (s) {
+        case ACCOUNT_STATE_REGISTERED:
+            state = _ ("Registered");
+            break;
+        case ACCOUNT_STATE_UNREGISTERED:
+            state = _ ("Not Registered");
+            break;
+        case ACCOUNT_STATE_TRYING:
+            state = _ ("Trying...");
+            break;
+        case ACCOUNT_STATE_ERROR:
+            state = _ ("Error");
+            break;
+        case ACCOUNT_STATE_ERROR_AUTH:
+            state = _ ("Authentication Failed");
+            break;
+        case ACCOUNT_STATE_ERROR_NETWORK:
+            state = _ ("Network unreachable");
+            break;
+        case ACCOUNT_STATE_ERROR_HOST:
+            state = _ ("Host unreachable");
+            break;
+        case ACCOUNT_STATE_ERROR_CONF_STUN:
+            state = _ ("Stun configuration error");
+            break;
+        case ACCOUNT_STATE_ERROR_EXIST_STUN:
+            state = _ ("Stun server invalid");
+            break;
+        case IP2IP_PROFILE_STATUS:
+            state = _ ("Ready");
+            break;
+        default:
+            state = _ ("Invalid");
+            break;
+    }
+
+    return state;
 }
 
-	void
-account_list_clear ( )
+void
+account_list_clear ()
 {
-	g_queue_free (accountQueue);
-	accountQueue = g_queue_new ();
+    g_queue_free (accountQueue);
+    accountQueue = g_queue_new ();
 }
 
-	void
-account_list_move_up(guint index)
+void
+account_list_move_up (guint index)
 {
-	DEBUG ("index  = %i\n", index);
+    DEBUG ("index  = %i\n", index);
 
-	if(index != 0)
-	{
-		gpointer acc = g_queue_pop_nth(accountQueue, index);
-		g_queue_push_nth(accountQueue, acc, index-1);
-	}
+    if (index != 0) {
+        gpointer acc = g_queue_pop_nth (accountQueue, index);
+        g_queue_push_nth (accountQueue, acc, index-1);
+    }
 }
 
-	void
-account_list_move_down(guint index)
+void
+account_list_move_down (guint index)
 {
-	if(index != accountQueue->length)
-	{
-		gpointer acc = g_queue_pop_nth(accountQueue, index);
-		g_queue_push_nth(accountQueue, acc, index+1);
-	}
+    if (index != accountQueue->length) {
+        gpointer acc = g_queue_pop_nth (accountQueue, index);
+        g_queue_push_nth (accountQueue, acc, index+1);
+    }
 }
 
-	guint
-account_list_get_registered_accounts( void )
+guint
+account_list_get_registered_accounts (void)
 {
-	guint res = 0;
-	unsigned int i;
-	for(i=0;i<account_list_get_size();i++)
-	{
-		if( account_list_get_nth( i ) -> state == ( ACCOUNT_STATE_REGISTERED ))
-			res ++;
-	}
-	DEBUG(" %d registered accounts" , res );
-	return res;
+    guint res = 0;
+    unsigned int i;
+
+    for (i=0; i<account_list_get_size(); i++) {
+        if (account_list_get_nth (i) -> state == (ACCOUNT_STATE_REGISTERED))
+            res ++;
+    }
+
+    DEBUG (" %d registered accounts" , res);
+    return res;
 }
 
-gchar* account_list_get_current_id( void ){
+gchar* account_list_get_current_id (void)
+{
+
+    account_t *current;
 
-	account_t *current;
+    current = account_list_get_current ();
 
-	current = account_list_get_current ();
-	if (current)
-		return current->accountID;
-	else
-		return "";
+    if (current)
+        return current->accountID;
+    else
+        return "";
 }
 
-int account_list_get_sip_account_number( void ){
+int account_list_get_sip_account_number (void)
+{
+
+    int n;
+    guint size, i;
+    account_t *current;
+
+    size = account_list_get_size();
+    n = 0;
 
-	int n;
-	guint size, i;
-	account_t *current;
+    for (i=0; i<size ; i++) {
+        current = account_list_get_nth (i);
 
-	size = account_list_get_size();
-	n = 0;
-	for( i=0; i<size ;i++ ){
-		current = account_list_get_nth( i );
-		if( strcmp(g_hash_table_lookup(current->properties, ACCOUNT_TYPE), "SIP" ) == 0 )
-			n++;
-	}
+        if (strcmp (g_hash_table_lookup (current->properties, ACCOUNT_TYPE), "SIP") == 0)
+            n++;
+    }
 
-	return n;
+    return n;
 }
 
-int account_list_get_iax_account_number( void ){
+int account_list_get_iax_account_number (void)
+{
+
+    int n;
+    guint size, i;
+    account_t *current;
+
+    size = account_list_get_size();
+    n = 0;
 
-	int n;
-	guint size, i;
-	account_t *current;
+    for (i=0; i<size ; i++) {
+        current = account_list_get_nth (i);
 
-	size = account_list_get_size();
-	n = 0;
-	for( i=0; i<size ;i++ ){
-		current = account_list_get_nth( i );
-		if( strcmp(g_hash_table_lookup(current->properties, ACCOUNT_TYPE), "IAX" ) == 0 )
-			n++;
-	}
+        if (strcmp (g_hash_table_lookup (current->properties, ACCOUNT_TYPE), "IAX") == 0)
+            n++;
+    }
 
-	return n;
+    return n;
 }
 
-gchar * account_list_get_ordered_list (void) {
+gchar * account_list_get_ordered_list (void)
+{
+
+    gchar *order="";
+    guint i;
+
+    for (i=0; i < account_list_get_size(); i++) {
+        account_t * account = NULL;
+        account = account_list_get_nth (i);
 
-	gchar *order="";
-	guint i;
+        if (account != NULL) {
+            order = g_strconcat (order, account->accountID, "/", NULL);
+        }
+    }
 
-	for( i=0; i < account_list_get_size(); i++ )
-	{
-		account_t * account = NULL;
-		account = account_list_get_nth(i);    
-		if (account != NULL) {
-			order = g_strconcat (order, account->accountID, "/", NULL);
-		}
-	}
-	return order;
+    return order;
 }
 
 
-guint account_list_get_position (account_t *account) 
+guint account_list_get_position (account_t *account)
 {
-	guint size, i;
-	account_t *tmp;
-
-	size = account_list_get_size ();
-	for (i=0; i<size; i++)
-	{
-		tmp = account_list_get_nth (i);
-		if (g_strcasecmp (tmp->accountID, account->accountID) == 0)
-		{
-			return i;
-		}
-	}
-	// Not found
-	return -1;
+    guint size, i;
+    account_t *tmp;
+
+    size = account_list_get_size ();
+
+    for (i=0; i<size; i++) {
+        tmp = account_list_get_nth (i);
+
+        if (g_strcasecmp (tmp->accountID, account->accountID) == 0) {
+            return i;
+        }
+    }
+
+    // Not found
+    return -1;
 }
 
 gboolean current_account_has_mailbox (void)
 {
 
-	account_t *current;
+    account_t *current;
+
+    // Check if the current account has a voicemail number configured
 
-	// Check if the current account has a voicemail number configured
+    current = account_list_get_current ();
 
-	current = account_list_get_current ();
-	if (current)
-	{
-		if (g_strcasecmp (g_hash_table_lookup (current->properties, ACCOUNT_MAILBOX), "") != 0)
-			return TRUE;
-	}
+    if (current) {
+        if (g_strcasecmp (g_hash_table_lookup (current->properties, ACCOUNT_MAILBOX), "") != 0)
+            return TRUE;
+    }
 
-	return FALSE;
+    return FALSE;
 }
 
 void current_account_set_message_number (guint nb)
 {
-	account_t *current;
+    account_t *current;
 
-	current = account_list_get_current ();
-	if (current)
-	{
-		current->_messages_number = nb;
-	}
+    current = account_list_get_current ();
+
+    if (current) {
+        current->_messages_number = nb;
+    }
 }
 
 guint current_account_get_message_number (void)
 {
-	account_t *current;
-
-	current = account_list_get_current ();
-	if (current)
-	{
-		return current->_messages_number;
-	}
-	else
-		return 0;
+    account_t *current;
+
+    current = account_list_get_current ();
+
+    if (current) {
+        return current->_messages_number;
+    } else
+        return 0;
 }
 
 gboolean current_account_has_new_message (void)
 {
-	account_t *current;
-
-	current = account_list_get_current ();
-	if (current)
-	{
-		return (current->_messages_number > 0);
-	}
-	return FALSE;
+    account_t *current;
+
+    current = account_list_get_current ();
+
+    if (current) {
+        return (current->_messages_number > 0);
+    }
+
+    return FALSE;
 }
 
diff --git a/sflphone-client-gnome/src/accountlist.h b/sflphone-client-gnome/src/accountlist.h
index 1ba201ffa8a4aca27da2210801465211bf24c71a..d1f40bc4186ee9896ab6a5ae4c35fb3227896a40 100644
--- a/sflphone-client-gnome/src/accountlist.h
+++ b/sflphone-client-gnome/src/accountlist.h
@@ -2,17 +2,17 @@
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Beaudoin <pierre-luc@savoirfairelinux.com>
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -28,7 +28,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
- 
+
 #ifndef __ACCOUNTLIST_H__
 #define __ACCOUNTLIST_H__
 
@@ -37,170 +37,169 @@
   * @brief A list to hold accounts.
   */
 
-/** @enum account_state_t 
+/** @enum account_state_t
   * This enum have all the states an account can take.
   */
-typedef enum
-{
-  /** Invalid state */
-   ACCOUNT_STATE_INVALID = 0,
-   /** The account is registered  */
-   ACCOUNT_STATE_REGISTERED,   
-   /** The account is not registered */
-   ACCOUNT_STATE_UNREGISTERED,   
-   /** The account is trying to register */
-   ACCOUNT_STATE_TRYING, 
-   /** Error state. The account is not registered */
-   ACCOUNT_STATE_ERROR,
-   /** An authentification error occured. Wrong password or wrong username. The account is not registered */
-   ACCOUNT_STATE_ERROR_AUTH,
-   /** The network is unreachable. The account is not registered */
-   ACCOUNT_STATE_ERROR_NETWORK,
-   /** Host is unreachable. The account is not registered */
-   ACCOUNT_STATE_ERROR_HOST,
-   /** Stun server configuration error. The account is not registered */
-   ACCOUNT_STATE_ERROR_CONF_STUN,
-   /** Stun server is not existing. The account is not registered */
-   ACCOUNT_STATE_ERROR_EXIST_STUN,
-   /** IP profile status **/
-   IP2IP_PROFILE_STATUS
+typedef enum {
+    /** Invalid state */
+    ACCOUNT_STATE_INVALID = 0,
+    /** The account is registered  */
+    ACCOUNT_STATE_REGISTERED,
+    /** The account is not registered */
+    ACCOUNT_STATE_UNREGISTERED,
+    /** The account is trying to register */
+    ACCOUNT_STATE_TRYING,
+    /** Error state. The account is not registered */
+    ACCOUNT_STATE_ERROR,
+    /** An authentification error occured. Wrong password or wrong username. The account is not registered */
+    ACCOUNT_STATE_ERROR_AUTH,
+    /** The network is unreachable. The account is not registered */
+    ACCOUNT_STATE_ERROR_NETWORK,
+    /** Host is unreachable. The account is not registered */
+    ACCOUNT_STATE_ERROR_HOST,
+    /** Stun server configuration error. The account is not registered */
+    ACCOUNT_STATE_ERROR_CONF_STUN,
+    /** Stun server is not existing. The account is not registered */
+    ACCOUNT_STATE_ERROR_EXIST_STUN,
+    /** IP profile status **/
+    IP2IP_PROFILE_STATUS
 } account_state_t;
 
 /** @struct account_t
   * @brief Account information.
-  * This struct holds information about an account.  All values are stored in the 
-  * properties GHashTable except the accountID and state.  This match how the 
+  * This struct holds information about an account.  All values are stored in the
+  * properties GHashTable except the accountID and state.  This match how the
   * server internally works and the dbus API to save and retrieve the accounts details.
-  * 
-  * To retrieve the Alias for example, use g_hash_table_lookup(a->properties, ACCOUNT_ALIAS).  
+  *
+  * To retrieve the Alias for example, use g_hash_table_lookup(a->properties, ACCOUNT_ALIAS).
   */
 
 typedef struct  {
- 	gchar * accountID;
-  	account_state_t state;
-  	gchar * protocol_state_description;
-  	guint protocol_state_code;  
-  	GHashTable * properties;
-  	GPtrArray * credential_information;
-
-	/* The codec list */
-	GQueue *codecs;
-  	guint _messages_number;
+    gchar * accountID;
+    account_state_t state;
+    gchar * protocol_state_description;
+    guint protocol_state_code;
+    GHashTable * properties;
+    GPtrArray * credential_information;
+
+    /* The codec list */
+    GQueue *codecs;
+    guint _messages_number;
 } account_t;
 
 
-/** 
- * This function initialize the account list. 
+/**
+ * This function initialize the account list.
  */
 void account_list_init ();
 
-/** 
- * This function empty and free the account list. 
+/**
+ * This function empty and free the account list.
  */
 void account_list_clean ();
 
-/** 
- * This function append an account to list. 
- * @param a The account you want to add 
+/**
+ * This function append an account to list.
+ * @param a The account you want to add
  */
 void account_list_add (account_t * a);
 
-/** 
- * This function append an account to list at a given position. 
+/**
+ * This function append an account to list at a given position.
  * @param a The account you want to add
  * @param pos THe position in the list to insert the account
  */
 void account_list_add_at_nth (account_t * a, guint pos);
 
-/** 
- * This function remove an account from list. 
+/**
+ * This function remove an account from list.
  * @param accountID The accountID of the account you want to remove
  */
 void account_list_remove (const gchar * accountID);
 
-/** 
- * Return the first account that corresponds to the state 
+/**
+ * Return the first account that corresponds to the state
  * @param state The state
- * @return account_t* An account or NULL 
+ * @return account_t* An account or NULL
  */
-account_t * account_list_get_by_state ( account_state_t state);
+account_t * account_list_get_by_state (account_state_t state);
 
 /**
  * @return guint The number of registered accounts in the list
  */
-guint account_list_get_registered_accounts( );
+guint account_list_get_registered_accounts();
 
-/** 
+/**
  * Return the number of accounts in the list
- * @return guint The number of accounts in the list 
+ * @return guint The number of accounts in the list
  */
-guint account_list_get_size ( );
+guint account_list_get_size ();
 
-/** 
+/**
  * Return the account at the nth position in the list
  * @param n The position of the account you want
- * @return An account or NULL 
+ * @return An account or NULL
  */
-account_t * account_list_get_nth ( guint n );
+account_t * account_list_get_nth (guint n);
 
-/** 
+/**
  * Return the current account struct
  *  @return The current account struct
  */
-account_t * account_list_get_current( );
+account_t * account_list_get_current();
 
-/** 
+/**
  * This function sets an account as the current one
  * @param current the account you want to set as current
  */
 void account_list_set_current (account_t *current);
 
-/** 
+/**
  * This function maps account_state_t enums to a description.
  * @param s The state
- * @return The full text description of the state 
+ * @return The full text description of the state
  */
-const gchar * account_state_name(account_state_t s);
+const gchar * account_state_name (account_state_t s);
 
-/** 
+/**
  * This function clear the list
  */
-void account_list_clear ( );
+void account_list_clear ();
 
-/** 
+/**
  * Return the account associated with an ID
  * @param accountID The ID of the account
- * @return An account or NULL 
+ * @return An account or NULL
  */
-account_t * account_list_get_by_id(gchar * accountID); 
+account_t * account_list_get_by_id (gchar * accountID);
 
-/** 
+/**
  * Move the account from an unit up in the account_list
  * @param index The current index in the list
  */
-void account_list_move_up( guint index );
+void account_list_move_up (guint index);
 
-/** 
+/**
  * Move the account from an unit down in the account_list
  * @param index The current index in the list
  */
-void account_list_move_down( guint index );
+void account_list_move_down (guint index);
 
 /**
  * Return the ID of the current default account
  * @return gchar* The id
  */
-gchar* account_list_get_current_id( void );
+gchar* account_list_get_current_id (void);
 
 /**
  * Returns the number of SIP accounts that have been configured
  */
-int account_list_get_sip_account_number( void );
+int account_list_get_sip_account_number (void);
 
 /**
  * Returns the number of IAX accounts that have been configured
  */
-int account_list_get_iax_account_number( void );
+int account_list_get_iax_account_number (void);
 
 gchar * account_list_get_ordered_list (void);
 
@@ -214,4 +213,4 @@ void current_account_set_message_number (guint nb);
 
 gboolean current_account_has_new_message (void);
 
-#endif 
+#endif
diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c
index e736011ef8216b214dbd05094bf9a6e12e125415..45275b2ce611b98efd679d0c7df374d03c367a01 100644
--- a/sflphone-client-gnome/src/actions.c
+++ b/sflphone-client-gnome/src/actions.c
@@ -55,12 +55,12 @@
 
 GHashTable * ip2ip_profile=NULL;
 
-    void
+void
 sflphone_notify_voice_mail (const gchar* accountID , guint count)
 {
     gchar *id;
     gchar *current_id;
-	account_t *current;
+    account_t *current;
 
     // We want to notify only the current account; ie the first in the list
     id = g_strdup (accountID);
@@ -69,15 +69,15 @@ sflphone_notify_voice_mail (const gchar* accountID , guint count)
     if (g_strcasecmp (id, current_id) != 0 || account_list_get_size() == 0)
         return;
 
-	// Set the number of voice messages for the current account
-	current_account_set_message_number (count);
-	current = account_list_get_current ();
+    // Set the number of voice messages for the current account
+    current_account_set_message_number (count);
+    current = account_list_get_current ();
 
-	// Update the voicemail tool button
-	update_voicemail_status ();
+    // Update the voicemail tool button
+    update_voicemail_status ();
 
-	if (current)
-		notify_voice_mails (count, current);
+    if (current)
+        notify_voice_mails (count, current);
 }
 
 /*
@@ -86,23 +86,25 @@ sflphone_notify_voice_mail (const gchar* accountID , guint count)
  * registered account of the account list
  * Else, check if it an IP call. if not, popup an error message
  */
- 
-static gboolean _is_direct_call(callable_obj_t * c) {
 
-    if(g_strcasecmp(c->_accountID, EMPTY_ENTRY) == 0) {
-        if(!g_str_has_prefix (c->_peer_number, "sip:")) {
-            gchar * new_number = g_strconcat("sip:", c->_peer_number, NULL);
-            g_free(c->_peer_number);
+static gboolean _is_direct_call (callable_obj_t * c)
+{
+
+    if (g_strcasecmp (c->_accountID, EMPTY_ENTRY) == 0) {
+        if (!g_str_has_prefix (c->_peer_number, "sip:")) {
+            gchar * new_number = g_strconcat ("sip:", c->_peer_number, NULL);
+            g_free (c->_peer_number);
             c->_peer_number = new_number;
         }
+
         return 1;
     }
 
-    if(g_str_has_prefix (c->_peer_number, "sip:")) {
+    if (g_str_has_prefix (c->_peer_number, "sip:")) {
         return 1;
     }
 
-    if(g_str_has_prefix (c->_peer_number, "sips:")) {
+    if (g_str_has_prefix (c->_peer_number, "sips:")) {
         return 1;
     }
 
@@ -110,273 +112,257 @@ static gboolean _is_direct_call(callable_obj_t * c) {
 }
 
 
-    void
+void
 status_bar_display_account ()
 {
     gchar* msg;
     account_t* acc;
 
-    statusbar_pop_message(__MSG_ACCOUNT_DEFAULT);
+    statusbar_pop_message (__MSG_ACCOUNT_DEFAULT);
 
     acc = account_list_get_current ();
-    if(acc){
-	status_tray_icon_online(TRUE);
-        msg = g_markup_printf_escaped("%s %s (%s)" ,
-                _("Using account"),
-                (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS),
-                (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE));
-    }
-    else
-    {
-	status_tray_icon_online(FALSE);
-        msg = g_markup_printf_escaped(_("No registered accounts"));
+
+    if (acc) {
+        status_tray_icon_online (TRUE);
+        msg = g_markup_printf_escaped ("%s %s (%s)" ,
+                                       _ ("Using account"),
+                                       (gchar*) g_hash_table_lookup (acc->properties , ACCOUNT_ALIAS),
+                                       (gchar*) g_hash_table_lookup (acc->properties , ACCOUNT_TYPE));
+    } else {
+        status_tray_icon_online (FALSE);
+        msg = g_markup_printf_escaped (_ ("No registered accounts"));
     }
-    statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT);
-    g_free(msg);
+
+    statusbar_push_message (msg , __MSG_ACCOUNT_DEFAULT);
+    g_free (msg);
 }
 
 
-    gboolean
+gboolean
 sflphone_quit ()
 {
     gboolean quit = FALSE;
-    guint count = calllist_get_size(current_calls);
-    if(count > 0){
+    guint count = calllist_get_size (current_calls);
+
+    if (count > 0) {
         quit = main_window_ask_quit();
-    }
-    else{
+    } else {
         quit = TRUE;
     }
 
-    if (quit)
-    {
-        // Save the history 
+    if (quit) {
+        // Save the history
         sflphone_save_history ();
 
-        dbus_unregister(getpid());
+        dbus_unregister (getpid());
         dbus_clean ();
         //call_list_clean(); TODO
         //account_list_clean()
         gtk_main_quit ();
     }
+
     return quit;
 }
 
-    void
-sflphone_hold (callable_obj_t * c )
+void
+sflphone_hold (callable_obj_t * c)
 {
     c->_state = CALL_STATE_HOLD;
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-    void
-sflphone_ringing(callable_obj_t * c )
+void
+sflphone_ringing (callable_obj_t * c)
 {
     c->_state = CALL_STATE_RINGING;
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-    void
-sflphone_hung_up( callable_obj_t * c)
+void
+sflphone_hung_up (callable_obj_t * c)
 {
-    calllist_remove( current_calls, c->_callID);
-    calltree_remove_call(current_calls, c, NULL);
+    calllist_remove (current_calls, c->_callID);
+    calltree_remove_call (current_calls, c, NULL);
     c->_state = CALL_STATE_DIALING;
-    call_remove_all_errors(c);
+    call_remove_all_errors (c);
     update_actions();
 
-	/* Update the IM interface */
-	im_widget_update_state (c->_im_widget, FALSE);	
+    /* Update the IM interface */
+    im_widget_update_state (c->_im_widget, FALSE);
 
 #if GTK_CHECK_VERSION(2,10,0)
-    status_tray_icon_blink( FALSE );
+    status_tray_icon_blink (FALSE);
 #endif
 }
 
-static hashtable_free(gpointer key, gpointer value, gpointer user_data)
+static hashtable_free (gpointer key, gpointer value, gpointer user_data)
 {
-    g_free(key);
-    g_free(value);
+    g_free (key);
+    g_free (value);
 }
 
 /** Internal to actions: Fill account list */
-void sflphone_fill_account_list (void) {
+void sflphone_fill_account_list (void)
+{
 
     gchar** array;
     gchar** accountID;
     unsigned int i;
-	int count;
-	GQueue *codeclist;
+    int count;
+    GQueue *codeclist;
 
-	DEBUG("SFLphone: Fill account list");
+    DEBUG ("SFLphone: Fill account list");
 
-	count = current_account_get_message_number ();
+    count = current_account_get_message_number ();
 
     account_list_clear ();
 
-    array = (gchar **)dbus_account_list();
-    if(array)
-    {
-        for (accountID = array; *accountID; accountID++)
-        {
-            account_t * a = g_new0(account_t,1);
-            a->accountID = g_strdup(*accountID);
+    array = (gchar **) dbus_account_list();
+
+    if (array) {
+        for (accountID = array; *accountID; accountID++) {
+            account_t * a = g_new0 (account_t,1);
+            a->accountID = g_strdup (*accountID);
             a->credential_information = NULL;
-			// TODO Clean codec list QUEUE
-            account_list_add(a);
+            // TODO Clean codec list QUEUE
+            account_list_add (a);
         }
+
         g_strfreev (array);
     }
 
-    for( i = 0; i < account_list_get_size(); i++)
-    {
+    for (i = 0; i < account_list_get_size(); i++) {
         account_t  * a = account_list_get_nth (i);
-        GHashTable * details = (GHashTable *) dbus_account_details(a->accountID);
-        if( details == NULL )
+        GHashTable * details = (GHashTable *) dbus_account_details (a->accountID);
+
+        if (details == NULL)
             break;
+
         a->properties = details;
-                        
-        /* As this function might be called numberous time, we should free the 
+
+        /* As this function might be called numberous time, we should free the
          * previously allocated space to avoid memory leaks.
          */
 
         /* Fill the actual array of credentials */
-        int number_of_credential = dbus_get_number_of_credential(a->accountID);
-        if(number_of_credential) {
+        int number_of_credential = dbus_get_number_of_credential (a->accountID);
+
+        if (number_of_credential) {
             a->credential_information = g_ptr_array_new();
         } else {
             a->credential_information = NULL;
         }
-        
+
         int credential_index;
-        for(credential_index = 0; credential_index < number_of_credential; credential_index++) {
+
+        for (credential_index = 0; credential_index < number_of_credential; credential_index++) {
             GHashTable * credential_information = dbus_get_credential (a->accountID, credential_index);
-            g_ptr_array_add(a->credential_information, credential_information);
+            g_ptr_array_add (a->credential_information, credential_information);
         }
 
-        gchar * status = g_hash_table_lookup(details, REGISTRATION_STATUS);
-        if(strcmp(status, "REGISTERED") == 0)
-        {
+        gchar * status = g_hash_table_lookup (details, REGISTRATION_STATUS);
+
+        if (strcmp (status, "REGISTERED") == 0) {
             a->state = ACCOUNT_STATE_REGISTERED;
-        }
-        else if(strcmp(status, "UNREGISTERED") == 0)
-        {
+        } else if (strcmp (status, "UNREGISTERED") == 0) {
             a->state = ACCOUNT_STATE_UNREGISTERED;
-        }
-        else if(strcmp(status, "TRYING") == 0)
-        {
+        } else if (strcmp (status, "TRYING") == 0) {
             a->state = ACCOUNT_STATE_TRYING;
-        }
-        else if(strcmp(status, "ERROR") == 0)
-        {
+        } else if (strcmp (status, "ERROR") == 0) {
             a->state = ACCOUNT_STATE_ERROR;
-        }
-        else if(strcmp( status , "ERROR_AUTH") == 0 )
-        {
+        } else if (strcmp (status , "ERROR_AUTH") == 0) {
             a->state = ACCOUNT_STATE_ERROR_AUTH;
-        }
-        else if(strcmp( status , "ERROR_NETWORK") == 0 )
-        {
+        } else if (strcmp (status , "ERROR_NETWORK") == 0) {
             a->state = ACCOUNT_STATE_ERROR_NETWORK;
-        }
-        else if(strcmp( status , "ERROR_HOST") == 0 )
-        {
+        } else if (strcmp (status , "ERROR_HOST") == 0) {
             a->state = ACCOUNT_STATE_ERROR_HOST;
-        }
-        else if(strcmp( status , "ERROR_CONF_STUN") == 0 )
-        {
+        } else if (strcmp (status , "ERROR_CONF_STUN") == 0) {
             a->state = ACCOUNT_STATE_ERROR_CONF_STUN;
-        }
-        else if(strcmp( status , "ERROR_EXIST_STUN") == 0 )
-        {
+        } else if (strcmp (status , "ERROR_EXIST_STUN") == 0) {
             a->state = ACCOUNT_STATE_ERROR_EXIST_STUN;
-        }
-		else if (strcmp (status, "READY") == 0) {
-			a->state = IP2IP_PROFILE_STATUS;
-		}
-        else
-        {
+        } else if (strcmp (status, "READY") == 0) {
+            a->state = IP2IP_PROFILE_STATUS;
+        } else {
             a->state = ACCOUNT_STATE_INVALID;
         }
 
         gchar * code = NULL;
-        code = g_hash_table_lookup(details, REGISTRATION_STATE_CODE);
+        code = g_hash_table_lookup (details, REGISTRATION_STATE_CODE);
+
         if (code != NULL) {
-            a->protocol_state_code = atoi(code);
+            a->protocol_state_code = atoi (code);
         }
-        g_free(a->protocol_state_description);
-        a->protocol_state_description = g_hash_table_lookup(details, REGISTRATION_STATE_DESCRIPTION);
+
+        g_free (a->protocol_state_description);
+        a->protocol_state_description = g_hash_table_lookup (details, REGISTRATION_STATE_DESCRIPTION);
     }
 
-	// Set the current account message number
-	current_account_set_message_number (count);
+    // Set the current account message number
+    current_account_set_message_number (count);
 
-	sflphone_fill_codec_list ();
+    sflphone_fill_codec_list ();
 }
 
-gboolean sflphone_init() {
+gboolean sflphone_init()
+{
 
-    if(!dbus_connect ()){
+    if (!dbus_connect ()) {
 
-        main_window_error_message(_("Unable to connect to the SFLphone server.\nMake sure the daemon is running."));
+        main_window_error_message (_ ("Unable to connect to the SFLphone server.\nMake sure the daemon is running."));
         return FALSE;
-    }
-    else
-    {
-        dbus_register(getpid(), "Gtk+ Client");
+    } else {
+        dbus_register (getpid(), "Gtk+ Client");
 
-		// Init icons factory
-		init_icon_factory ();
+        // Init icons factory
+        init_icon_factory ();
 
-        current_calls = calltab_init(FALSE, CURRENT_CALLS);
-        contacts = calltab_init(TRUE, CONTACTS);
-        history = calltab_init(TRUE, HISTORY);
+        current_calls = calltab_init (FALSE, CURRENT_CALLS);
+        contacts = calltab_init (TRUE, CONTACTS);
+        history = calltab_init (TRUE, HISTORY);
 
         account_list_init ();
         codec_capabilities_load ();
-		conferencelist_init ();
+        conferencelist_init ();
 
         // Fetch the configured accounts
         sflphone_fill_account_list ();
 
-        // Fetch the ip2ip profile 
+        // Fetch the ip2ip profile
         sflphone_fill_ip2ip_profile();
-        
-		// Fetch the conference list
-		// sflphone_fill_conference_list();
+
+        // Fetch the conference list
+        // sflphone_fill_conference_list();
 
         return TRUE;
     }
 }
 
-void sflphone_fill_ip2ip_profile(void)
+void sflphone_fill_ip2ip_profile (void)
 {
     ip2ip_profile = (GHashTable *) dbus_get_ip2_ip_details();
 }
 
 void sflphone_get_ip2ip_properties (GHashTable **properties)
 {
-	*properties	= ip2ip_profile;
+    *properties	= ip2ip_profile;
 }
 
-    void
+void
 sflphone_hang_up()
 {
-    callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-    conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree);
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+    conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
 
-    if(selectedCall)
-    {
-        switch(selectedCall->_state)
-        {
+    if (selectedCall) {
+        switch (selectedCall->_state) {
             case CALL_STATE_DIALING:
                 dbus_hang_up (selectedCall);
                 break;
             case CALL_STATE_RINGING:
                 dbus_hang_up (selectedCall);
-                call_remove_all_errors(selectedCall);
+                call_remove_all_errors (selectedCall);
                 selectedCall->_state = CALL_STATE_DIALING;
                 //selectedCall->_stop = 0;
                 break;
@@ -385,37 +371,37 @@ sflphone_hang_up()
             case CALL_STATE_BUSY:
             case CALL_STATE_RECORD:
                 dbus_hang_up (selectedCall);
-                call_remove_all_errors(selectedCall);
+                call_remove_all_errors (selectedCall);
                 selectedCall->_state = CALL_STATE_DIALING;
                 set_timestamp (&selectedCall->_time_stop);
-				im_widget_update_state (selectedCall->_im_widget, FALSE);
+                im_widget_update_state (selectedCall->_im_widget, FALSE);
                 break;
             case CALL_STATE_FAILURE:
                 dbus_hang_up (selectedCall);
-                call_remove_all_errors(selectedCall);
+                call_remove_all_errors (selectedCall);
                 selectedCall->_state = CALL_STATE_DIALING;
                 break;
             case CALL_STATE_INCOMING:
                 dbus_refuse (selectedCall);
-                call_remove_all_errors(selectedCall);
+                call_remove_all_errors (selectedCall);
                 selectedCall->_state = CALL_STATE_DIALING;
-                DEBUG("from sflphone_hang_up : "); stop_notification();
+                DEBUG ("from sflphone_hang_up : ");
+                stop_notification();
                 break;
             case CALL_STATE_TRANSFERT:
                 dbus_hang_up (selectedCall);
-                call_remove_all_errors(selectedCall);
+                call_remove_all_errors (selectedCall);
                 set_timestamp (&selectedCall->_time_stop);
                 break;
             default:
-                WARN("Should not happen in sflphone_hang_up()!");
+                WARN ("Should not happen in sflphone_hang_up()!");
                 break;
         }
-    }
-    else if(selectedConf) {
-        dbus_hang_up_conference(selectedConf);
+    } else if (selectedConf) {
+        dbus_hang_up_conference (selectedConf);
     }
 
-    calltree_update_call(history, selectedCall, NULL);
+    calltree_update_call (history, selectedCall, NULL);
 }
 
 
@@ -424,30 +410,29 @@ sflphone_conference_hang_up()
 {
     conference_obj_t * selectedConf = calltab_get_selected_conf();
 
-    if(selectedConf)
-	dbus_hang_up_conference(selectedConf);
+    if (selectedConf)
+        dbus_hang_up_conference (selectedConf);
 }
 
 
-    void
+void
 sflphone_pick_up()
 {
-    DEBUG("sflphone_pick_up\n");
+    DEBUG ("sflphone_pick_up\n");
     callable_obj_t * selectedCall = NULL;
-    selectedCall = calltab_get_selected_call(active_calltree);
-    
-    if(selectedCall)
-    {
-        switch(selectedCall->_state)
-        {
+    selectedCall = calltab_get_selected_call (active_calltree);
+
+    if (selectedCall) {
+        switch (selectedCall->_state) {
             case CALL_STATE_DIALING:
                 sflphone_place_call (selectedCall);
                 break;
             case CALL_STATE_INCOMING:
                 selectedCall->_history_state = INCOMING;
-                calltree_update_call( history, selectedCall, NULL);
+                calltree_update_call (history, selectedCall, NULL);
                 dbus_accept (selectedCall);
-                DEBUG("from sflphone_pick_up : "); stop_notification();
+                DEBUG ("from sflphone_pick_up : ");
+                stop_notification();
                 break;
             case CALL_STATE_HOLD:
                 sflphone_new_call();
@@ -464,27 +449,25 @@ sflphone_pick_up()
                 sflphone_new_call();
                 break;
             default:
-                WARN("Should not happen in sflphone_pick_up()!");
+                WARN ("Should not happen in sflphone_pick_up()!");
                 break;
         }
-    }
-    else {
+    } else {
         sflphone_new_call();
     }
 
 }
 
-    void
+void
 sflphone_on_hold ()
 {
-    callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-    conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree);
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+    conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
 
-    DEBUG("sflphone_on_hold");
-    if(selectedCall)
-    {
-        switch(selectedCall->_state)
-        {
+    DEBUG ("sflphone_on_hold");
+
+    if (selectedCall) {
+        switch (selectedCall->_state) {
             case CALL_STATE_CURRENT:
                 dbus_hold (selectedCall);
                 break;
@@ -493,39 +476,36 @@ sflphone_on_hold ()
                 break;
 
             default:
-                WARN("Should not happen in sflphone_on_hold!");
+                WARN ("Should not happen in sflphone_on_hold!");
                 break;
         }
-    }
-    else if (selectedConf) {
-        dbus_hold_conference(selectedConf);
+    } else if (selectedConf) {
+        dbus_hold_conference (selectedConf);
     }
 }
 
-    void
+void
 sflphone_off_hold ()
 {
-    DEBUG("sflphone_off_hold");
-    callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-    conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree);
+    DEBUG ("sflphone_off_hold");
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+    conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
 
-    if(selectedCall)
-    {
-        switch(selectedCall->_state)
-        {
+    if (selectedCall) {
+        switch (selectedCall->_state) {
             case CALL_STATE_HOLD:
                 dbus_unhold (selectedCall);
                 break;
             default:
-                WARN("Should not happen in sflphone_off_hold ()!");
+                WARN ("Should not happen in sflphone_off_hold ()!");
                 break;
         }
-    }
-    else if (selectedConf) {
+    } else if (selectedConf) {
+
 
-        
-        dbus_unhold_conference(selectedConf);
+        dbus_unhold_conference (selectedConf);
     }
+
     /*
     if(dbus_get_is_recording(selectedCall))
     {
@@ -539,143 +519,143 @@ sflphone_off_hold ()
 }
 
 
-    void
-sflphone_fail( callable_obj_t * c )
+void
+sflphone_fail (callable_obj_t * c)
 {
     c->_state = CALL_STATE_FAILURE;
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-    void
-sflphone_busy( callable_obj_t * c )
+void
+sflphone_busy (callable_obj_t * c)
 {
     c->_state = CALL_STATE_BUSY;
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-    void
-sflphone_current( callable_obj_t * c )
+void
+sflphone_current (callable_obj_t * c)
 {
 
-    if( c->_state != CALL_STATE_HOLD )
+    if (c->_state != CALL_STATE_HOLD)
         set_timestamp (&c->_time_start);
+
     c->_state = CALL_STATE_CURRENT;
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-    void
-sflphone_record( callable_obj_t * c )
+void
+sflphone_record (callable_obj_t * c)
 {
-    if( c->_state != CALL_STATE_HOLD )
+    if (c->_state != CALL_STATE_HOLD)
         set_timestamp (&c->_time_start);
+
     c->_state = CALL_STATE_RECORD;
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-    void
+void
 sflphone_set_transfert()
 {
-    callable_obj_t * c = calltab_get_selected_call(current_calls);
-    if(c)
-    {
+    callable_obj_t * c = calltab_get_selected_call (current_calls);
+
+    if (c) {
         c->_state = CALL_STATE_TRANSFERT;
-        c->_trsft_to = g_strdup("");
-        calltree_update_call(current_calls, c, NULL);
+        c->_trsft_to = g_strdup ("");
+        calltree_update_call (current_calls, c, NULL);
     }
+
     update_actions();
 }
 
-    void
+void
 sflphone_unset_transfert()
 {
-    callable_obj_t * c = calltab_get_selected_call(current_calls);
-    if(c)
-    {
+    callable_obj_t * c = calltab_get_selected_call (current_calls);
+
+    if (c) {
         c->_state = CALL_STATE_CURRENT;
-        c->_trsft_to = g_strdup("");
-        calltree_update_call(current_calls, c, NULL);
+        c->_trsft_to = g_strdup ("");
+        calltree_update_call (current_calls, c, NULL);
     }
+
     update_actions();
 }
 
-    void
-sflphone_display_transfer_status(const gchar* message)
+void
+sflphone_display_transfer_status (const gchar* message)
 {
-    statusbar_push_message( message , __MSG_ACCOUNT_DEFAULT);
+    statusbar_push_message (message , __MSG_ACCOUNT_DEFAULT);
 }
 
-    void
+void
 sflphone_incoming_call (callable_obj_t * c)
 {
-	gchar *msg = "";
+    gchar *msg = "";
 
     c->_history_state = MISSED;
-    calllist_add ( current_calls, c );
-    calllist_add( history, c );
-    calltree_add_call( current_calls, c, NULL);
+    calllist_add (current_calls, c);
+    calllist_add (history, c);
+    calltree_add_call (current_calls, c, NULL);
     update_actions();
     calltree_display (current_calls);
-	
-	// Change the status bar if we are dealing with a direct SIP call
-    if(_is_direct_call(c)) {
-		msg = g_markup_printf_escaped (_("Direct SIP call"));
-        statusbar_pop_message(__MSG_ACCOUNT_DEFAULT);
-        statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT);
-        g_free(msg);
-	}
+
+    // Change the status bar if we are dealing with a direct SIP call
+    if (_is_direct_call (c)) {
+        msg = g_markup_printf_escaped (_ ("Direct SIP call"));
+        statusbar_pop_message (__MSG_ACCOUNT_DEFAULT);
+        statusbar_push_message (msg , __MSG_ACCOUNT_DEFAULT);
+        g_free (msg);
+    }
 }
 
-    void
-process_dialing(callable_obj_t * c, guint keyval, gchar * key)
+void
+process_dialing (callable_obj_t * c, guint keyval, gchar * key)
 {
     // We stop the tone
-    if(strlen(c->_peer_number) == 0 && c->_state != CALL_STATE_TRANSFERT){
-        dbus_start_tone( FALSE , 0 );
+    if (strlen (c->_peer_number) == 0 && c->_state != CALL_STATE_TRANSFERT) {
+        dbus_start_tone (FALSE , 0);
         //dbus_play_dtmf( key );
     }
 
-    DEBUG("process_dialing : keyval : %i",keyval);
-    DEBUG("process_dialing : key : %s",key);
+    DEBUG ("process_dialing : keyval : %i",keyval);
+    DEBUG ("process_dialing : key : %s",key);
 
-    switch (keyval)
-    {
+    switch (keyval) {
         case 65293: /* ENTER */
         case 65421: /* ENTER numpad */
-            sflphone_place_call(c);
+            sflphone_place_call (c);
             break;
         case 65307: /* ESCAPE */
-            sflphone_hang_up(c);
+            sflphone_hang_up (c);
             break;
         case 65288: /* BACKSPACE */
-            {  /* Brackets mandatory because of local vars */
-                gchar * before = c->_peer_number;
-                if(strlen(c->_peer_number) >= 1){
-
-					if (c->_state == CALL_STATE_TRANSFERT)
-					{
-                                                // Process backspace if and only if string not NULL
-                                                if(strlen(c->_trsft_to) > 0)
-                                                     c->_trsft_to = g_strndup (c->_trsft_to, strlen(c->_trsft_to) - 1);
-					}
-					else
-					{
-						c->_peer_number = g_strndup(c->_peer_number, strlen(c->_peer_number) -1);
-						g_free(before);
-						DEBUG("TO: backspace %s", c->_peer_number);
-                    }
-					calltree_update_call(current_calls, c, NULL);
-                }
-                else if(strlen(c->_peer_number) == 0)
-                {
-                    if(c->_state != CALL_STATE_TRANSFERT)
-                        dbus_hang_up(c);
+        {  /* Brackets mandatory because of local vars */
+            gchar * before = c->_peer_number;
+
+            if (strlen (c->_peer_number) >= 1) {
+
+                if (c->_state == CALL_STATE_TRANSFERT) {
+                    // Process backspace if and only if string not NULL
+                    if (strlen (c->_trsft_to) > 0)
+                        c->_trsft_to = g_strndup (c->_trsft_to, strlen (c->_trsft_to) - 1);
+                } else {
+                    c->_peer_number = g_strndup (c->_peer_number, strlen (c->_peer_number) -1);
+                    g_free (before);
+                    DEBUG ("TO: backspace %s", c->_peer_number);
                 }
+
+                calltree_update_call (current_calls, c, NULL);
+            } else if (strlen (c->_peer_number) == 0) {
+                if (c->_state != CALL_STATE_TRANSFERT)
+                    dbus_hang_up (c);
             }
-            break;
+        }
+        break;
         case 65289: /* TAB */
         case 65513: /* ALT */
         case 65507: /* CTRL */
@@ -683,33 +663,31 @@ process_dialing(callable_obj_t * c, guint keyval, gchar * key)
         case 65509: /* CAPS */
             break;
         default:
+
             // if (keyval < 255 || (keyval >65453 && keyval < 65466))
-            if (keyval < 127 || (keyval > 65400 && keyval < 65466))
-            {
+            if (keyval < 127 || (keyval > 65400 && keyval < 65466)) {
 
-                if (c->_state == CALL_STATE_TRANSFERT)
-                {
-                    c->_trsft_to = g_strconcat(c->_trsft_to, key, NULL);
-                }
-                else
-                {
-                    dbus_play_dtmf( key );
-                    c->_peer_number = g_strconcat(c->_peer_number, key, NULL);
+                if (c->_state == CALL_STATE_TRANSFERT) {
+                    c->_trsft_to = g_strconcat (c->_trsft_to, key, NULL);
+                } else {
+                    dbus_play_dtmf (key);
+                    c->_peer_number = g_strconcat (c->_peer_number, key, NULL);
                 }
 
-                if(c->_state == CALL_STATE_DIALING)
-                {
+                if (c->_state == CALL_STATE_DIALING) {
                     //g_free(c->_peer_name);
                     //c->_peer_name = g_strconcat("\"\" <", c->_peer_number, ">", NULL);
                 }
-                calltree_update_call(current_calls, c, NULL);
+
+                calltree_update_call (current_calls, c, NULL);
             }
+
             break;
     }
 }
 
 
-    callable_obj_t *
+callable_obj_t *
 sflphone_new_call()
 {
 
@@ -717,18 +695,18 @@ sflphone_new_call()
     callable_obj_t * current_selected_call;
     gchar *peer_name, *peer_number;
 
-    DEBUG("sflphone_new_call");
+    DEBUG ("sflphone_new_call");
 
-    current_selected_call = calltab_get_selected_call(current_calls);
+    current_selected_call = calltab_get_selected_call (current_calls);
 
-    if ((current_selected_call != NULL) && (current_selected_call->_confID == NULL))
-	sflphone_on_hold();
+    if ( (current_selected_call != NULL) && (current_selected_call->_confID == NULL))
+        sflphone_on_hold();
 
     // Play a tone when creating a new call
-    if( calllist_get_size(current_calls) == 0 )
-        dbus_start_tone( TRUE , (current_account_has_new_message ()  > 0)? TONE_WITH_MESSAGE : TONE_WITHOUT_MESSAGE) ;
+    if (calllist_get_size (current_calls) == 0)
+        dbus_start_tone (TRUE , (current_account_has_new_message ()  > 0) ? TONE_WITH_MESSAGE : TONE_WITHOUT_MESSAGE) ;
 
-    peer_number = g_strdup("");
+    peer_number = g_strdup ("");
     peer_name = g_strdup ("");
     create_new_call (CALL, CALL_STATE_DIALING, "", "", peer_name, peer_number, &c);
 
@@ -742,50 +720,47 @@ sflphone_new_call()
 }
 
 
-    void
-sflphone_keypad( guint keyval, gchar * key)
+void
+sflphone_keypad (guint keyval, gchar * key)
 {
-    callable_obj_t * c = calltab_get_selected_call(current_calls);
+    callable_obj_t * c = calltab_get_selected_call (current_calls);
+
+    if ( (active_calltree != current_calls) || (active_calltree == current_calls && !c)) {
+        DEBUG ("Not in a call, not dialing, create a new call");
 
-    if((active_calltree != current_calls) || (active_calltree == current_calls && !c))
-    {
-        DEBUG("Not in a call, not dialing, create a new call");
         //dbus_play_dtmf(key);
-        switch (keyval)
-        {
+        switch (keyval) {
             case 65293: /* ENTER */
             case 65421: /* ENTER numpad */
             case 65307: /* ESCAPE */
                 break;
             default:
                 calltree_display (current_calls);
-                process_dialing(sflphone_new_call(), keyval, key);
+                process_dialing (sflphone_new_call(), keyval, key);
                 break;
         }
-    }
-    else if(c)
-    {
-        DEBUG("Call is non-zero");
-        switch(c->_state)
-        {
+    } else if (c) {
+        DEBUG ("Call is non-zero");
+
+        switch (c->_state) {
             case CALL_STATE_DIALING: // Currently dialing => edit number
-                DEBUG("Writing a number");
-                process_dialing(c, keyval, key);
+                DEBUG ("Writing a number");
+                process_dialing (c, keyval, key);
                 break;
             case CALL_STATE_RECORD:
             case CALL_STATE_CURRENT:
-                switch (keyval)
-                {
+
+                switch (keyval) {
                     case 65307: /* ESCAPE */
-                        dbus_hang_up(c);
+                        dbus_hang_up (c);
                         set_timestamp (&c->_time_stop);
-                        calltree_update_call(history, c, NULL);
+                        calltree_update_call (history, c, NULL);
                         break;
                     default:
                         // To play the dtmf when calling mail box for instance
-                        dbus_play_dtmf(key);
-                        if (keyval < 255 || (keyval >65453 && keyval < 65466))
-                        {
+                        dbus_play_dtmf (key);
+
+                        if (keyval < 255 || (keyval >65453 && keyval < 65466)) {
                             //gchar * temp = g_strconcat(call_get_number(c), key, NULL);
                             //gchar * before = c->from;
                             //c->from = g_strconcat("\"",call_get_name(c) ,"\" <", temp, ">", NULL);
@@ -793,341 +768,351 @@ sflphone_keypad( guint keyval, gchar * key)
                             //g_free(temp);
                             //update_callable_obj_tree(current_calls,c);
                         }
+
                         break;
                 }
+
                 break;
             case CALL_STATE_INCOMING:
-                switch (keyval)
-                {
+
+                switch (keyval) {
                     case 65293: /* ENTER */
                     case 65421: /* ENTER numpad */
                         c->_history_state = INCOMING;
-                        calltree_update_call(history, c, NULL);
-                        dbus_accept(c);
-                        DEBUG("from sflphone_keypad ( enter ) : "); stop_notification();
+                        calltree_update_call (history, c, NULL);
+                        dbus_accept (c);
+                        DEBUG ("from sflphone_keypad ( enter ) : ");
+                        stop_notification();
                         break;
                     case 65307: /* ESCAPE */
-                        dbus_refuse(c);
-                        DEBUG("from sflphone_keypad ( escape ) : "); stop_notification();
+                        dbus_refuse (c);
+                        DEBUG ("from sflphone_keypad ( escape ) : ");
+                        stop_notification();
                         break;
                 }
+
                 break;
             case CALL_STATE_TRANSFERT:
-                switch (keyval)
-                {
+
+                switch (keyval) {
                     case 65293: /* ENTER */
                     case 65421: /* ENTER numpad */
-                        dbus_transfert(c);
+                        dbus_transfert (c);
                         set_timestamp (&c->_time_stop);
                         break;
                     case 65307: /* ESCAPE */
-                        sflphone_unset_transfert(c);
+                        sflphone_unset_transfert (c);
                         break;
                     default: // When a call is on transfert, typing new numbers will add it to c->_peer_number
-                        process_dialing(c, keyval, key);
+                        process_dialing (c, keyval, key);
                         break;
                 }
+
                 break;
             case CALL_STATE_HOLD:
-                switch (keyval)
-                {
+
+                switch (keyval) {
                     case 65293: /* ENTER */
                     case 65421: /* ENTER numpad */
-                        dbus_unhold(c);
+                        dbus_unhold (c);
                         break;
                     case 65307: /* ESCAPE */
-                        dbus_hang_up(c);
+                        dbus_hang_up (c);
                         break;
                     default: // When a call is on hold, typing new numbers will create a new call
-                        process_dialing(sflphone_new_call(), keyval, key);
+                        process_dialing (sflphone_new_call(), keyval, key);
                         break;
                 }
+
                 break;
             case CALL_STATE_RINGING:
             case CALL_STATE_BUSY:
             case CALL_STATE_FAILURE:
+
                 //c->_stop = 0;
-                switch (keyval)
-                {
+                switch (keyval) {
                     case 65307: /* ESCAPE */
-                        dbus_hang_up(c);
+                        dbus_hang_up (c);
                         //c->_stop = 0;
-                        calltree_update_call(history, c, NULL);
+                        calltree_update_call (history, c, NULL);
                         break;
                 }
+
                 break;
             default:
                 break;
         }
 
-    }
-    else {
+    } else {
         sflphone_new_call();
     }
 }
 
-static int _place_direct_call(const callable_obj_t * c) {
+static int _place_direct_call (const callable_obj_t * c)
+{
     if (c->_state == CALL_STATE_DIALING) {
         dbus_place_call (c);
     } else {
         return -1;
     }
+
     return 0;
 }
 
-static int _place_registered_call(callable_obj_t * c) {
+static int _place_registered_call (callable_obj_t * c)
+{
 
     account_t * current = NULL;
-  
-    if(c == NULL) {
-        DEBUG("callable_obj_t is NULL in _place_registered_call");
+
+    if (c == NULL) {
+        DEBUG ("callable_obj_t is NULL in _place_registered_call");
         return -1;
     }
-    
+
     if (c->_state != CALL_STATE_DIALING) {
         return -1;
     }
-  
-    if(g_strcasecmp(c->_peer_number, "") == 0) {
+
+    if (g_strcasecmp (c->_peer_number, "") == 0) {
         return -1;
     }
-    
-    if( account_list_get_size() == 0 ) {
+
+    if (account_list_get_size() == 0) {
         notify_no_accounts();
-        sflphone_fail(c);
+        sflphone_fail (c);
         return -1;
-    } 
-    
-    if( account_list_get_by_state( ACCOUNT_STATE_REGISTERED ) == NULL ) {
+    }
+
+    if (account_list_get_by_state (ACCOUNT_STATE_REGISTERED) == NULL) {
         notify_no_registered_accounts();
-        sflphone_fail(c);
+        sflphone_fail (c);
         return -1;
     }
-    
-    if(g_strcasecmp(c->_accountID, "") != 0) {
-        current = account_list_get_by_id(c->_accountID);
+
+    if (g_strcasecmp (c->_accountID, "") != 0) {
+        current = account_list_get_by_id (c->_accountID);
     } else {
         current = account_list_get_current();
     }
 
-    if(current == NULL) { 
-        DEBUG("Unexpected condition: account_t is NULL in %s at %d for accountID %s", __FILE__, __LINE__, c->_accountID);
+    if (current == NULL) {
+        DEBUG ("Unexpected condition: account_t is NULL in %s at %d for accountID %s", __FILE__, __LINE__, c->_accountID);
         return -1;
-    }   
-                        
-    if(g_strcasecmp(g_hash_table_lookup( current->properties, "Status"),"REGISTERED")==0) {
+    }
+
+    if (g_strcasecmp (g_hash_table_lookup (current->properties, "Status"),"REGISTERED") ==0) {
         /* The call is made with the current account */
         c->_accountID = current->accountID;
-        dbus_place_call(c);
+        dbus_place_call (c);
     } else {
-       /* Place the call with the first registered account
-        * and switch the current account.
-        * If we are here, we can be sure that there is at least one. 
-        */
-        current = account_list_get_by_state( ACCOUNT_STATE_REGISTERED );
+        /* Place the call with the first registered account
+         * and switch the current account.
+         * If we are here, we can be sure that there is at least one.
+         */
+        current = account_list_get_by_state (ACCOUNT_STATE_REGISTERED);
         c->_accountID = current->accountID;
-        dbus_place_call(c);
-        notify_current_account( current );
-    }        
+        dbus_place_call (c);
+        notify_current_account (current);
+    }
 
     c->_history_state = OUTGOING;
-    calllist_add(history, c);                
+    calllist_add (history, c);
     return 0;
 }
 
-    void
-sflphone_place_call ( callable_obj_t * c )
+void
+sflphone_place_call (callable_obj_t * c)
 {
-	gchar *msg = "";
+    gchar *msg = "";
+
+    DEBUG ("Placing call with %s @ %s and accountid %s", c->_peer_name, c->_peer_number, c->_accountID);
 
-    DEBUG("Placing call with %s @ %s and accountid %s", c->_peer_name, c->_peer_number, c->_accountID);
-    
-    if(c == NULL) {
-        DEBUG("Unexpected condition: callable_obj_t is null in %s at %d", __FILE__, __LINE__);
+    if (c == NULL) {
+        DEBUG ("Unexpected condition: callable_obj_t is null in %s at %d", __FILE__, __LINE__);
         return;
     }
 
-    if(_is_direct_call(c)) {
-		msg = g_markup_printf_escaped (_("Direct SIP call"));
-        statusbar_pop_message(__MSG_ACCOUNT_DEFAULT);
-        statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT);
-        g_free(msg);
-        if(_place_direct_call(c) < 0) {
-            DEBUG("An error occured while placing direct call in %s at %d", __FILE__, __LINE__);
+    if (_is_direct_call (c)) {
+        msg = g_markup_printf_escaped (_ ("Direct SIP call"));
+        statusbar_pop_message (__MSG_ACCOUNT_DEFAULT);
+        statusbar_push_message (msg , __MSG_ACCOUNT_DEFAULT);
+        g_free (msg);
+
+        if (_place_direct_call (c) < 0) {
+            DEBUG ("An error occured while placing direct call in %s at %d", __FILE__, __LINE__);
             return;
         }
     } else {
-        if(_place_registered_call(c) < 0) {
-            DEBUG("An error occured while placing registered call in %s at %d", __FILE__, __LINE__);
+        if (_place_registered_call (c) < 0) {
+            DEBUG ("An error occured while placing registered call in %s at %d", __FILE__, __LINE__);
             return;
         }
     }
 }
 
 
-    void
-sflphone_detach_participant(const gchar* callID)
+void
+sflphone_detach_participant (const gchar* callID)
 {
-    DEBUG("Action: Detach participant from conference");
+    DEBUG ("Action: Detach participant from conference");
 
-    if(callID == NULL) {
-        callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-	DEBUG("Action: Detach participant %s", selectedCall->_callID);
+    if (callID == NULL) {
+        callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+        DEBUG ("Action: Detach participant %s", selectedCall->_callID);
 
-	if(selectedCall->_confID) {
-	    g_free(selectedCall->_confID);
-	    selectedCall->_confID = NULL;
-	}
+        if (selectedCall->_confID) {
+            g_free (selectedCall->_confID);
+            selectedCall->_confID = NULL;
+        }
 
-	calltree_remove_call(current_calls, selectedCall, NULL);
-	calltree_add_call(current_calls, selectedCall, NULL);
-        dbus_detach_participant(selectedCall->_callID);
-    }
-    else {
-	callable_obj_t * selectedCall = calllist_get(current_calls, callID);
-	DEBUG("Action: Darticipant %s", callID);
-
-	if(selectedCall->_confID) {
-	    g_free(selectedCall->_confID); 
-	    selectedCall->_confID = NULL;
-	}
-
-	calltree_remove_call(current_calls, selectedCall, NULL);
-	calltree_add_call(current_calls, selectedCall, NULL);
-	dbus_detach_participant(callID);	
+        calltree_remove_call (current_calls, selectedCall, NULL);
+        calltree_add_call (current_calls, selectedCall, NULL);
+        dbus_detach_participant (selectedCall->_callID);
+    } else {
+        callable_obj_t * selectedCall = calllist_get (current_calls, callID);
+        DEBUG ("Action: Darticipant %s", callID);
+
+        if (selectedCall->_confID) {
+            g_free (selectedCall->_confID);
+            selectedCall->_confID = NULL;
+        }
+
+        calltree_remove_call (current_calls, selectedCall, NULL);
+        calltree_add_call (current_calls, selectedCall, NULL);
+        dbus_detach_participant (callID);
     }
-     
+
 }
 
-    void
-sflphone_join_participant(const gchar* sel_callID, const gchar* drag_callID)
+void
+sflphone_join_participant (const gchar* sel_callID, const gchar* drag_callID)
 {
-    DEBUG("sflphone join participants %s and %s", sel_callID, drag_callID);
+    DEBUG ("sflphone join participants %s and %s", sel_callID, drag_callID);
 
-    
-    dbus_join_participant(sel_callID, drag_callID);
+
+    dbus_join_participant (sel_callID, drag_callID);
 }
 
 
-    void
-sflphone_add_participant(const gchar* callID, const gchar* confID)
+void
+sflphone_add_participant (const gchar* callID, const gchar* confID)
 {
-    DEBUG("sflphone add participant %s to conference %s", callID, confID);
+    DEBUG ("sflphone add participant %s to conference %s", callID, confID);
 
-    dbus_add_participant(callID, confID);
+    dbus_add_participant (callID, confID);
 }
 
-    void
+void
 sflphone_add_conference()
 {
-    DEBUG("sflphone add a conference to tree view");
+    DEBUG ("sflphone add a conference to tree view");
     // dbus_join_participant(selected_call, dragged_call);
 }
 
-    void
-sflphone_join_conference(const gchar* sel_confID, const gchar* drag_confID)
+void
+sflphone_join_conference (const gchar* sel_confID, const gchar* drag_confID)
 {
-    DEBUG("sflphone join two conference");
-    dbus_join_conference(sel_confID, drag_confID);
+    DEBUG ("sflphone join two conference");
+    dbus_join_conference (sel_confID, drag_confID);
 }
 
 void
-sflphone_add_main_participant(const conference_obj_t * c)
+sflphone_add_main_participant (const conference_obj_t * c)
 {
-    DEBUG("sflphone add main participant");
-    dbus_add_main_participant(c->_confID);
+    DEBUG ("sflphone add main participant");
+    dbus_add_main_participant (c->_confID);
 }
 
 void
-sflphone_conference_on_hold(const conference_obj_t * c)
+sflphone_conference_on_hold (const conference_obj_t * c)
 {
-    DEBUG("sflphone_conference_on_hold");
-    dbus_hold_conference(c);
+    DEBUG ("sflphone_conference_on_hold");
+    dbus_hold_conference (c);
 }
 
 void
-sflphone_conference_off_hold(const conference_obj_t * c)
+sflphone_conference_off_hold (const conference_obj_t * c)
 {
-    DEBUG("sflphone_conference_off_hold");
-    dbus_unhold_conference(c);
+    DEBUG ("sflphone_conference_off_hold");
+    dbus_unhold_conference (c);
 }
 
 
-    void
+void
 sflphone_rec_call()
 {
-    callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-    conference_obj_t * selectedConf = calltab_get_selected_conf(current_calls);
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+    conference_obj_t * selectedConf = calltab_get_selected_conf (current_calls);
 
-    if(selectedCall)
-    {
-	dbus_set_record(selectedCall->_callID);
-	switch(selectedCall->_state)
-	{
+    if (selectedCall) {
+        dbus_set_record (selectedCall->_callID);
+
+        switch (selectedCall->_state) {
             case CALL_STATE_CURRENT:
-		selectedCall->_state = CALL_STATE_RECORD;
-		break;
+                selectedCall->_state = CALL_STATE_RECORD;
+                break;
             case CALL_STATE_RECORD:
-		selectedCall->_state = CALL_STATE_CURRENT;
-		break;
+                selectedCall->_state = CALL_STATE_CURRENT;
+                break;
             default:
-		WARN("Should not happen in sflphone_off_hold ()!");
-		break;
-	}
-    }
-    else if(selectedConf)
-    {
-	dbus_set_record(selectedConf->_confID);
-	switch(selectedConf->_state)
-	{
+                WARN ("Should not happen in sflphone_off_hold ()!");
+                break;
+        }
+    } else if (selectedConf) {
+        dbus_set_record (selectedConf->_confID);
+
+        switch (selectedConf->_state) {
             case CONFERENCE_STATE_ACTIVE_ATACHED:
-		selectedCall->_state = CONFERENCE_STATE_RECORD;
-		break;
+                selectedCall->_state = CONFERENCE_STATE_RECORD;
+                break;
             case CONFERENCE_STATE_RECORD:
-		selectedCall->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
-		break;
+                selectedCall->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
+                break;
             default:
-		WARN("Should not happen in sflphone_off_hold ()!");
-		break;
-	}
+                WARN ("Should not happen in sflphone_off_hold ()!");
+                break;
+        }
     }
-    calltree_update_call(current_calls, selectedCall, NULL);
+
+    calltree_update_call (current_calls, selectedCall, NULL);
     update_actions();
 
     // gchar* codname = sflphone_get_current_codec_name();
     // DEBUG("sflphone_get_current_codec_name: %s",codname);
 }
 
-void sflphone_fill_codec_list () {
+void sflphone_fill_codec_list ()
+{
+
+    guint account_list_size;
+    guint i;
+    account_t *current = NULL;
+    gchar** codecs = NULL;
 
-	guint account_list_size;
-	guint i;
-	account_t *current = NULL;
-	gchar** codecs = NULL;
+    DEBUG ("SFLphone: Fill codec list");
 
-	DEBUG("SFLphone: Fill codec list");
+    account_list_size = account_list_get_size ();
 
-	account_list_size = account_list_get_size ();
+    for (i=0; i<account_list_size; i++) {
+        current = account_list_get_nth (i);
 
-	for (i=0; i<account_list_size; i++)
-	{
-		current = account_list_get_nth (i);
-		if (current) {
-			sflphone_fill_codec_list_per_account (&current);
-		}
-	}
+        if (current) {
+            sflphone_fill_codec_list_per_account (&current);
+        }
+    }
 
-	/*
-	if (codec_list_get_size() == 0) {
+    /*
+    if (codec_list_get_size() == 0) {
 
-		// Error message
-		ERROR ("No audio codecs found");
+    	// Error message
+    	ERROR ("No audio codecs found");
         dbus_unregister(getpid());
         exit(0);
     }*/
 }
 
-void sflphone_fill_codec_list_per_account (account_t **account) {
+void sflphone_fill_codec_list_per_account (account_t **account)
+{
 
     gchar **order;
     gchar** details;
@@ -1136,77 +1121,74 @@ void sflphone_fill_codec_list_per_account (account_t **account) {
     GQueue *codeclist;
     gboolean active = FALSE;
 
-    order = (gchar**) dbus_get_active_codec_list ((*account)->accountID);
+    order = (gchar**) dbus_get_active_codec_list ( (*account)->accountID);
 
     codeclist = (*account)->codecs;
 
     // First clean the list
     codec_list_clear (&codeclist);
 
-    if(!(*order))
-      ERROR("SFLphone: No codec list provided");
+    if (! (*order))
+        ERROR ("SFLphone: No codec list provided");
+
+    for (pl=order; *pl; pl++) {
+        codec_t * cpy = NULL;
+
+        // Each account will have a copy of the system-wide capabilities
+        codec_create_new_from_caps (codec_list_get_by_payload ( (gconstpointer) (size_t) atoi (*pl), NULL), &cpy);
+
+        if (cpy) {
+            cpy->is_active = TRUE;
+            codec_list_add (cpy, &codeclist);
+        } else
+            ERROR ("SFLphone: Couldn't find codec");
+    }
+
+    // Test here if we just added some active codec.
+    active = (codeclist->length == 0) ? TRUE : FALSE;
+
+    guint caps_size = codec_list_get_size (), i=0;
+
+    for (i=0; i<caps_size; i++) {
+
+        codec_t * current_cap = capabilities_get_nth (i);
+
+        // Check if this codec has already been enabled for this account
+        if (codec_list_get_by_payload ( (gconstpointer) (size_t) (current_cap->_payload), codeclist) == NULL) {
+            // codec_t *cpy;
+            // codec_create_new_from_caps (current_cap, &cpy);
+            current_cap->is_active = active;
+            codec_list_add (current_cap, &codeclist);
+        } else {
+        }
 
-    for (pl=order; *pl; pl++)
-    {
-      codec_t * cpy = NULL;
-		
-      // Each account will have a copy of the system-wide capabilities
-      codec_create_new_from_caps (codec_list_get_by_payload ((gconstpointer) (size_t)atoi (*pl), NULL), &cpy);
-      if (cpy) {
-	  cpy->is_active = TRUE;
-	  codec_list_add (cpy, &codeclist);
-      }
-      else
-	ERROR ("SFLphone: Couldn't find codec");
     }
 
-	// Test here if we just added some active codec.
-	active = (codeclist->length == 0) ? TRUE : FALSE;
-
-	guint caps_size = codec_list_get_size (), i=0;
-
-	for (i=0; i<caps_size; i++) {
-			
-		codec_t * current_cap = capabilities_get_nth (i);
-		// Check if this codec has already been enabled for this account
-		if (codec_list_get_by_payload ( (gconstpointer) (size_t)(current_cap->_payload), codeclist) == NULL) {
-			// codec_t *cpy;
-			// codec_create_new_from_caps (current_cap, &cpy);
-			current_cap->is_active = active;
-			codec_list_add (current_cap, &codeclist);
-		}
-		else {
-		}
-
-	}
-	
-	(*account)->codecs = codeclist; 
-	
-	// call dbus function with array of strings
-	codec_list_update_to_daemon (*account);
-	
+    (*account)->codecs = codeclist;
+
+    // call dbus function with array of strings
+    codec_list_update_to_daemon (*account);
+
 }
 
 void sflphone_fill_call_list (void)
 {
 
-    gchar** calls = (gchar**)dbus_get_call_list();
+    gchar** calls = (gchar**) dbus_get_call_list();
     gchar** pl;
     GHashTable *call_details;
     callable_obj_t *c;
     gchar *callID;
 
-    DEBUG("sflphone_fill_call_list");
+    DEBUG ("sflphone_fill_call_list");
 
-    if(calls)
-    {
-        for(pl=calls; *calls; calls++)
-        {
-            c = g_new0(callable_obj_t, 1);
-            callID = (gchar*)(*calls);
-            call_details = dbus_get_call_details(callID);
+    if (calls) {
+        for (pl=calls; *calls; calls++) {
+            c = g_new0 (callable_obj_t, 1);
+            callID = (gchar*) (*calls);
+            call_details = dbus_get_call_details (callID);
             create_new_call_from_details (callID, call_details, &c);
-            c->_callID = g_strdup(callID);
+            c->_callID = g_strdup (callID);
             c->_zrtp_confirmed = FALSE;
             // Add it to the list
             DEBUG ("Add call retrieved from server side: %s\n", c->_callID);
@@ -1218,7 +1200,7 @@ void sflphone_fill_call_list (void)
 }
 
 
-void sflphone_fill_conference_list(void)
+void sflphone_fill_conference_list (void)
 {
     // TODO Fetch the active conferences at client startup
 
@@ -1228,28 +1210,26 @@ void sflphone_fill_conference_list(void)
     gchar* conf_id;
     conference_obj_t* conf;
 
-    DEBUG("sflphone_fill_conference_list");
+    DEBUG ("sflphone_fill_conference_list");
 
     conferences = dbus_get_conference_list();
 
-    if(conferences)
-    {
-	for (pl = conferences; *conferences; conferences++)
-	{
-	    conf = g_new0(conference_obj_t, 1);
-	    conf_id = (gchar*)(*conferences);
-
-	    DEBUG("   fetching conference: %s", conf_id);
-
-	    conference_details = (GHashTable*) dbus_get_conference_details(conf_id);
-	    
-	    create_new_conference_from_details (conf_id, conference_details, &conf);
-	    
-	    conf->_confID = g_strdup(conf_id);	    
-
-	    conferencelist_add(conf);
-	    calltree_add_conference (current_calls, conf);
-	}
+    if (conferences) {
+        for (pl = conferences; *conferences; conferences++) {
+            conf = g_new0 (conference_obj_t, 1);
+            conf_id = (gchar*) (*conferences);
+
+            DEBUG ("   fetching conference: %s", conf_id);
+
+            conference_details = (GHashTable*) dbus_get_conference_details (conf_id);
+
+            create_new_conference_from_details (conf_id, conference_details, &conf);
+
+            conf->_confID = g_strdup (conf_id);
+
+            conferencelist_add (conf);
+            calltree_add_conference (current_calls, conf);
+        }
     }
 }
 
@@ -1267,49 +1247,50 @@ void sflphone_fill_history (void)
     DEBUG ("Loading history ...");
 
     entries = dbus_get_history ();
+
     if (entries) {
 
-	while(g_hash_table_size (entries)) {
+        while (g_hash_table_size (entries)) {
 
-	    is_first = TRUE;
+            is_first = TRUE;
 
-	    // find lowest timestamp in map
-	    g_hash_table_iter_init (&iter, entries);
-	    while (g_hash_table_iter_next (&iter, &key, &value))  {
+            // find lowest timestamp in map
+            g_hash_table_iter_init (&iter, entries);
 
-	        timestamp = atoi((gchar*)key);
+            while (g_hash_table_iter_next (&iter, &key, &value))  {
 
-	        if(is_first) {
+                timestamp = atoi ( (gchar*) key);
 
-		    // first iteration of the loop, init search
-		    min_timestamp = timestamp;
-		    key_to_min = key;
+                if (is_first) {
 
-		    is_first = FALSE;
-		}
-		else {
+                    // first iteration of the loop, init search
+                    min_timestamp = timestamp;
+                    key_to_min = key;
 
-		    // if lower, replace
-		    if(timestamp < min_timestamp) {
+                    is_first = FALSE;
+                } else {
 
-		        min_timestamp = timestamp;
-			key_to_min = key;
-		    }
-		}
-	    }
+                    // if lower, replace
+                    if (timestamp < min_timestamp) {
 
-	    if(g_hash_table_lookup_extended(entries, key_to_min, &key, &value)) {
+                        min_timestamp = timestamp;
+                        key_to_min = key;
+                    }
+                }
+            }
+
+            if (g_hash_table_lookup_extended (entries, key_to_min, &key, &value)) {
 
-	        // do something with key and value 
-	        create_history_entry_from_serialized_form ((gchar*)key, (gchar*)value, &history_entry);    
-		DEBUG("HISTORY ENTRY: %i\n", history_entry->_time_start);
-		// Add it and update the GUI
-		calllist_add (history, history_entry);
-		
-		// remove entry from map
-		g_hash_table_remove(entries, key_to_min);
-	    }
-	}
+                // do something with key and value
+                create_history_entry_from_serialized_form ( (gchar*) key, (gchar*) value, &history_entry);
+                DEBUG ("HISTORY ENTRY: %i\n", history_entry->_time_start);
+                // Add it and update the GUI
+                calllist_add (history, history_entry);
+
+                // remove entry from map
+                g_hash_table_remove (entries, key_to_min);
+            }
+        }
     }
 }
 
@@ -1324,131 +1305,136 @@ void sflphone_save_history (void)
 
     DEBUG ("Saving history ...");
 
-    result = g_hash_table_new(NULL, g_str_equal);
+    result = g_hash_table_new (NULL, g_str_equal);
     items = history->callQueue;
     size = calllist_get_size (history);
 
-    for (i=0; i<size; i++)
-    {
+    for (i=0; i<size; i++) {
         current = g_queue_peek_nth (items, i);
-        if (current)
-        {
+
+        if (current) {
             value = serialize_history_entry (current);
             key = convert_timestamp_to_gchar (current->_time_start);
-            g_hash_table_replace(result, (gpointer) key,
-                    (gpointer) value);
+            g_hash_table_replace (result, (gpointer) key,
+                                  (gpointer) value);
         }
     }
 
     dbus_set_history (result);
 
     // Decrement the reference count
-    g_hash_table_unref(result);
+    g_hash_table_unref (result);
 }
 
-   void
-sflphone_srtp_sdes_on(callable_obj_t * c)
+void
+sflphone_srtp_sdes_on (callable_obj_t * c)
 {
 
     c->_srtp_state = SRTP_STATE_SDES_SUCCESS;
 
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-   void
-sflphone_srtp_sdes_off(callable_obj_t * c)
+void
+sflphone_srtp_sdes_off (callable_obj_t * c)
 {
     c->_srtp_state = SRTP_STATE_UNLOCKED;
 
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
 
-   void
-sflphone_srtp_zrtp_on( callable_obj_t * c)
+void
+sflphone_srtp_zrtp_on (callable_obj_t * c)
 {
     c->_srtp_state = SRTP_STATE_ZRTP_SAS_UNCONFIRMED;
 
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-    void
-sflphone_srtp_zrtp_off( callable_obj_t * c )
+void
+sflphone_srtp_zrtp_off (callable_obj_t * c)
 {
     c->_srtp_state = SRTP_STATE_UNLOCKED;
-    calltree_update_call(current_calls, c, NULL);
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-    void
-sflphone_srtp_zrtp_show_sas( callable_obj_t * c, const gchar* sas, const gboolean verified)
+void
+sflphone_srtp_zrtp_show_sas (callable_obj_t * c, const gchar* sas, const gboolean verified)
 {
-    if(c == NULL) {
-        DEBUG("Panic callable obj is NULL in %s at %d", __FILE__, __LINE__);
+    if (c == NULL) {
+        DEBUG ("Panic callable obj is NULL in %s at %d", __FILE__, __LINE__);
     }
-    c->_sas = g_strdup(sas);
-    if(verified == TRUE) {
+
+    c->_sas = g_strdup (sas);
+
+    if (verified == TRUE) {
         c->_srtp_state = SRTP_STATE_ZRTP_SAS_CONFIRMED;
     } else {
         c->_srtp_state = SRTP_STATE_ZRTP_SAS_UNCONFIRMED;
     }
-    calltree_update_call(current_calls, c, NULL);
+
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
-    void 
-sflphone_srtp_zrtp_not_supported( callable_obj_t * c )
+void
+sflphone_srtp_zrtp_not_supported (callable_obj_t * c)
 {
-    DEBUG("ZRTP not supported");
-    main_window_zrtp_not_supported(c);
+    DEBUG ("ZRTP not supported");
+    main_window_zrtp_not_supported (c);
 }
 
 /* Method on sflphoned */
-    void 
-sflphone_set_confirm_go_clear( callable_obj_t * c )
+void
+sflphone_set_confirm_go_clear (callable_obj_t * c)
 {
-   dbus_set_confirm_go_clear(c);
+    dbus_set_confirm_go_clear (c);
 }
 
- void 
-sflphone_request_go_clear(void)
+void
+sflphone_request_go_clear (void)
 {
-    callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-    if(selectedCall) {
-        dbus_request_go_clear(selectedCall);
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+
+    if (selectedCall) {
+        dbus_request_go_clear (selectedCall);
     }
 }
 
 /* Signal sent by sflphoned */
-    void 
-sflphone_confirm_go_clear( callable_obj_t * c )
+void
+sflphone_confirm_go_clear (callable_obj_t * c)
 {
-    main_window_confirm_go_clear(c);
+    main_window_confirm_go_clear (c);
 }
 
 
-    void 
-sflphone_call_state_changed( callable_obj_t * c, const gchar * description, const guint code)
+void
+sflphone_call_state_changed (callable_obj_t * c, const gchar * description, const guint code)
 {
-        DEBUG("sflphone_call_state_changed");
-    if(c == NULL) {
-        DEBUG("Panic callable obj is NULL in %s at %d", __FILE__, __LINE__);
+    DEBUG ("sflphone_call_state_changed");
+
+    if (c == NULL) {
+        DEBUG ("Panic callable obj is NULL in %s at %d", __FILE__, __LINE__);
     } else {
-        //g_free(c->_state_code_description); 
+        //g_free(c->_state_code_description);
         //DEBUG("sflphone_call_state_changed");
-        c->_state_code_description = g_strdup(description);
-        c->_state_code = code;   
+        c->_state_code_description = g_strdup (description);
+        c->_state_code = code;
     }
-    
-    calltree_update_call(current_calls, c, NULL);
+
+    calltree_update_call (current_calls, c, NULL);
     update_actions();
 }
 
 
-void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr, int size) {
+void sflphone_get_interface_addr_from_name (char *iface_name, char **iface_addr, int size)
+{
 
     struct ifreq ifr;
     int fd;
@@ -1459,26 +1445,26 @@ void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr,
     struct sockaddr_in *saddr_in;
     struct in_addr *addr_in;
 
-    if((fd = socket (AF_INET, SOCK_DGRAM,0)) < 0)
-        DEBUG("getInterfaceAddrFromName error could not open socket\n");
+    if ( (fd = socket (AF_INET, SOCK_DGRAM,0)) < 0)
+        DEBUG ("getInterfaceAddrFromName error could not open socket\n");
 
     memset (&ifr, 0, sizeof (struct ifreq));
 
     strcpy (ifr.ifr_name, iface_name);
     ifr.ifr_addr.sa_family = AF_INET;
 
-    if((err = ioctl(fd, SIOCGIFADDR, &ifr)) < 0)
-        DEBUG("getInterfaceAddrFromName use default interface (0.0.0.0)\n");
+    if ( (err = ioctl (fd, SIOCGIFADDR, &ifr)) < 0)
+        DEBUG ("getInterfaceAddrFromName use default interface (0.0.0.0)\n");
+
 
-    
-    saddr_in = (struct sockaddr_in *)&ifr.ifr_addr;
-    addr_in = &(saddr_in->sin_addr);
+    saddr_in = (struct sockaddr_in *) &ifr.ifr_addr;
+    addr_in = & (saddr_in->sin_addr);
 
-    tmp_addr = (char *)addr_in;
+    tmp_addr = (char *) addr_in;
 
-    snprintf(*iface_addr, size, "%d.%d.%d.%d", 
-	     UC(tmp_addr[0]), UC(tmp_addr[1]), UC(tmp_addr[2]), UC(tmp_addr[3]));
+    snprintf (*iface_addr, size, "%d.%d.%d.%d",
+              UC (tmp_addr[0]), UC (tmp_addr[1]), UC (tmp_addr[2]), UC (tmp_addr[3]));
 
-    close(fd);
+    close (fd);
 
 }
diff --git a/sflphone-client-gnome/src/actions.h b/sflphone-client-gnome/src/actions.h
index 8be845e176769555f61d50653b4dc2d0f07b445e..57823abd4d52d514622cfd2bbf9a128aaf8f3a1a 100644
--- a/sflphone-client-gnome/src/actions.h
+++ b/sflphone-client-gnome/src/actions.h
@@ -54,13 +54,13 @@
  * Initialize lists and configurations
  * @return TRUE if succeeded, FALSE otherwise
  */
-gboolean sflphone_init ( ) ;
+gboolean sflphone_init () ;
 
 /**
  * Steps when closing the application.  Will ask for confirmation if a call is in progress.
  * @return TRUE if the user wants to quit, FALSE otherwise.
  */
-gboolean sflphone_quit ( ) ;
+gboolean sflphone_quit () ;
 
 /**
  * Hang up / refuse the current call
@@ -88,7 +88,7 @@ callable_obj_t * sflphone_new_call();
  * @param accountID The account the voice mails are for
  * @param count The number of voice mails
  */
-void sflphone_notify_voice_mail ( const gchar* accountID , guint count );
+void sflphone_notify_voice_mail (const gchar* accountID , guint count);
 
 /**
  * Prepare SFLphone to transfer a call and wait for the user to dial the number to transfer to
@@ -110,43 +110,43 @@ void sflphone_pick_up ();
  * Put the call on hold state
  * @param c The current call
  */
-void sflphone_hold ( callable_obj_t * c);
+void sflphone_hold (callable_obj_t * c);
 
 /**
  * Put the call in Ringing state
  * @param c* The current call
  */
-void sflphone_ringing(callable_obj_t * c );
+void sflphone_ringing (callable_obj_t * c);
 
 /**
  * Put the call in Busy state
  * @param c* The current call
  */
-void sflphone_busy( callable_obj_t * c );
+void sflphone_busy (callable_obj_t * c);
 
 /**
  * Put the call in Failure state
  * @param c* The current call
  */
-void sflphone_fail( callable_obj_t * c );
+void sflphone_fail (callable_obj_t * c);
 
 /**
  * Put the call in Current state
  * @param c The current call
  */
-void sflphone_current ( callable_obj_t * c);
+void sflphone_current (callable_obj_t * c);
 
 /**
  * The callee has hung up
  * @param c The current call
  */
-void sflphone_hung_up( callable_obj_t * c);
+void sflphone_hung_up (callable_obj_t * c);
 
 /**
  * Incoming call
  * @param c The incoming call
  */
-void sflphone_incoming_call ( callable_obj_t * c);
+void sflphone_incoming_call (callable_obj_t * c);
 
 /**
  * Dial the number
@@ -154,26 +154,26 @@ void sflphone_incoming_call ( callable_obj_t * c);
  * @param keyval The unique int representing the key
  * @param key The char value of the key
  */
-void sflphone_keypad ( guint keyval, gchar * key);
+void sflphone_keypad (guint keyval, gchar * key);
 
 /**
  * Place a call with a filled callable_obj_t.to
  * @param c A call in CALL_STATE_DIALING state
  */
-void sflphone_place_call ( callable_obj_t * c );
+void sflphone_place_call (callable_obj_t * c);
 
 /**
  * Fetch the ip2ip profile through dbus and fill
- * the internal hash table. 
+ * the internal hash table.
  */
-void sflphone_fill_ip2ip_profile(void);
+void sflphone_fill_ip2ip_profile (void);
 
 /**
  * @return The internal hash table representing
- * the settings for the ip2ip profile. 
+ * the settings for the ip2ip profile.
  */
 void sflphone_get_ip2ip_properties (GHashTable **properties);
- 
+
 /**
  * Initialize the accounts data structure
  */
@@ -210,95 +210,95 @@ void sflphone_save_history (void);
 /**
  * Action called when two single call are dragged on together to create a new conference
  */
-void sflphone_join_participant(const gchar* sel_callID, const gchar* drag_callID);
+void sflphone_join_participant (const gchar* sel_callID, const gchar* drag_callID);
 
 /**
  * Action called when a new participant is dragged in
  */
-void sflphone_add_participant(const gchar* callID, const gchar* confID);
+void sflphone_add_participant (const gchar* callID, const gchar* confID);
 
 /**
  * Action called when a conference participant is draged out
  */
-void sflphone_detach_participant(const gchar* callID);
+void sflphone_detach_participant (const gchar* callID);
 
 /**
  * Action called when two conference are merged together
  */
-void sflphone_join_conference(const gchar* sel_confID, const gchar* drag_confID);
+void sflphone_join_conference (const gchar* sel_confID, const gchar* drag_confID);
 
 
-/** 
- * Nofity that the communication is 
+/**
+ * Nofity that the communication is
  * now secured using SRTP/SDES.
  * @param c* The current call
  */
-void sflphone_srtp_sdes_on(callable_obj_t * c);
+void sflphone_srtp_sdes_on (callable_obj_t * c);
 
-/** 
+/**
  * Notify that the SRTP/SDES session
  * is not secured
  */
 
-/** 
- * Nofity that the communication is 
+/**
+ * Nofity that the communication is
  * now secured using ZRTP.
  * @param c* The current call
  */
-void sflphone_srtp_zrtp_on( callable_obj_t * c);
+void sflphone_srtp_zrtp_on (callable_obj_t * c);
 
-/** 
+/**
  * Called when the ZRTP session goes
  * unsecured.
  * @param c* The current call
  */
-void sflphone_srtp_zrtp_off( callable_obj_t * c );
+void sflphone_srtp_zrtp_off (callable_obj_t * c);
 
-/** 
+/**
  * Called when the sas has been computed
  * and is ready to be displayed.
  * @param c* The current call
  * @param sas* The Short Authentication String
  * @param verified* Weather the SAS was confirmed or not.
  */
-void sflphone_srtp_zrtp_show_sas( callable_obj_t * c, const gchar* sas, const gboolean verified);
+void sflphone_srtp_zrtp_show_sas (callable_obj_t * c, const gchar* sas, const gboolean verified);
 
-/** 
+/**
  * Called when the remote peer does not support ZRTP
  * @param c* The current call
  */
-void sflphone_srtp_zrtp_not_supported( callable_obj_t * c );
+void sflphone_srtp_zrtp_not_supported (callable_obj_t * c);
 
-/** 
+/**
  * Called when user wants to confirm go clear request.
  * @param c* The call to confirm the go clear request.
  */
-void sflphone_set_confirm_go_clear( callable_obj_t * c );
+void sflphone_set_confirm_go_clear (callable_obj_t * c);
 
-/** 
+/**
  * Called when user wants to confirm go clear request.
  * @param c* The call to confirm the go clear request.
  */
-void sflphone_confirm_go_clear( callable_obj_t * c );
+void sflphone_confirm_go_clear (callable_obj_t * c);
 
 /**
  * Called when user wants to clear.
  * @param c* The call on which to go clear
  */
-void sflphone_request_go_clear(void);
+void sflphone_request_go_clear (void);
 
-/** 
- * Called when the UI needs to be refreshed to 
+/**
+ * Called when the UI needs to be refreshed to
  * better inform the user about the current
- * state of the call. 
+ * state of the call.
  * @param c A pointer to the call that needs to be updated
  * @param description A textual description of the code
  * @param code The status code as in SIP or IAX
  */
-void sflphone_call_state_changed(callable_obj_t * c, const gchar * description, const guint code);
+void sflphone_call_state_changed (callable_obj_t * c, const gchar * description, const guint code);
 
 /**
  * Resolve an interface address given its name
  */
-void sflphone_get_interface_addr_from_name(char *iface_name, char **iface_addr, int size);
+void sflphone_get_interface_addr_from_name (char *iface_name, char **iface_addr, int size);
 #endif
diff --git a/sflphone-client-gnome/src/callable_obj.c b/sflphone-client-gnome/src/callable_obj.c
index 5295bcc56cad52c34642eb2cab38d457aaa37565..9a904e64adacdac262f689e916b1edf08283be8d 100644
--- a/sflphone-client-gnome/src/callable_obj.c
+++ b/sflphone-client-gnome/src/callable_obj.c
@@ -37,28 +37,24 @@
 #define UNIX_WEEK			86400 * 6
 #define UNIX_TWO_DAYS		86400 * 2
 
-gint is_callID_callstruct ( gconstpointer a, gconstpointer b)
+gint is_callID_callstruct (gconstpointer a, gconstpointer b)
 {
-    callable_obj_t * c = (callable_obj_t*)a;
-    if(g_strcasecmp(c->_callID, (const gchar*) b) == 0)
-    {
+    callable_obj_t * c = (callable_obj_t*) a;
+
+    if (g_strcasecmp (c->_callID, (const gchar*) b) == 0) {
         return 0;
-    }
-    else
-    {
+    } else {
         return 1;
     }
 }
 
-gint get_state_callstruct ( gconstpointer a, gconstpointer b)
+gint get_state_callstruct (gconstpointer a, gconstpointer b)
 {
-    callable_obj_t * c = (callable_obj_t*)a;
-    if( c->_state == *((call_state_t*)b))
-    {
+    callable_obj_t * c = (callable_obj_t*) a;
+
+    if (c->_state == * ( (call_state_t*) b)) {
         return 0;
-    }
-    else
-    {
+    } else {
         return 1;
     }
 }
@@ -67,7 +63,7 @@ gchar* call_get_peer_name (const gchar *format)
 {
     const gchar *end, *name;
 
-    DEBUG("    callable_obj: %s", format);
+    DEBUG ("    callable_obj: %s", format);
 
     end = g_strrstr (format, "<");
 
@@ -75,55 +71,56 @@ gchar* call_get_peer_name (const gchar *format)
         return g_strndup (format, 0);
     } else {
         name = format;
-        return g_strndup(name, end - name);
+        return g_strndup (name, end - name);
     }
 }
 
 gchar* call_get_peer_number (const gchar *format)
 {
-    DEBUG("    callable_obj: %s", format);
+    DEBUG ("    callable_obj: %s", format);
 
-    gchar * number = g_strrstr(format, "<") + 1;
-    gchar * end = g_strrstr(format, ">");
+    gchar * number = g_strrstr (format, "<") + 1;
+    gchar * end = g_strrstr (format, ">");
 
-    if(end && number)
-	number = g_strndup(number, end - number  );
+    if (end && number)
+        number = g_strndup (number, end - number);
     else
-	number = g_strdup(format);
-    
+        number = g_strdup (format);
+
     return number;
 }
 
 gchar* call_get_audio_codec (callable_obj_t *obj)
 {
-	gchar *audio_codec = "";
-	codec_t *codec;
-	gchar *format ="";
-	int samplerate;
-	
-	if (obj)
-	{
-		audio_codec = dbus_get_current_codec_name (obj);	
-		codec = codec_list_get_by_name (audio_codec, NULL);
-		if (codec){
-			samplerate = codec->sample_rate;
-			format = g_markup_printf_escaped ("%s/%i", audio_codec, samplerate);
-		}
-	}
-	return format;
+    gchar *audio_codec = "";
+    codec_t *codec;
+    gchar *format ="";
+    int samplerate;
+
+    if (obj) {
+        audio_codec = dbus_get_current_codec_name (obj);
+        codec = codec_list_get_by_name (audio_codec, NULL);
+
+        if (codec) {
+            samplerate = codec->sample_rate;
+            format = g_markup_printf_escaped ("%s/%i", audio_codec, samplerate);
+        }
+    }
+
+    return format;
 }
 
-void call_add_error(callable_obj_t * call, gpointer dialog)
+void call_add_error (callable_obj_t * call, gpointer dialog)
 {
     g_ptr_array_add (call->_error_dialogs, dialog);
 }
 
-void call_remove_error(callable_obj_t * call, gpointer dialog)
+void call_remove_error (callable_obj_t * call, gpointer dialog)
 {
     g_ptr_array_remove (call->_error_dialogs, dialog);
 }
 
-void call_remove_all_errors(callable_obj_t * call)
+void call_remove_all_errors (callable_obj_t * call)
 {
     g_ptr_array_foreach (call->_error_dialogs, (GFunc) gtk_widget_destroy, NULL);
 }
@@ -150,13 +147,14 @@ void create_new_call (callable_type_t type, call_state_t state, gchar* callID ,
     obj->_peer_info = g_strdup (get_peer_info (peer_name, peer_number));
 
     obj->_trsft_to = "";
-    set_timestamp (&(obj->_time_start));
-    set_timestamp (&(obj->_time_stop));
+    set_timestamp (& (obj->_time_start));
+    set_timestamp (& (obj->_time_stop));
 
     if (g_strcasecmp (callID, "") == 0)
         call_id = generate_call_id ();
     else
         call_id = callID;
+
     // Set the IDs
     obj->_callID = g_strdup (call_id);
     obj->_confID = NULL;
@@ -179,11 +177,11 @@ void create_new_call_from_details (const gchar *call_id, GHashTable *details, ca
     if (g_strcasecmp (state_str, "CURRENT") == 0)
         state = CALL_STATE_CURRENT;
 
-	else if (g_strcasecmp (state_str, "RINGING") == 0)
-		state = CALL_STATE_RINGING;
+    else if (g_strcasecmp (state_str, "RINGING") == 0)
+        state = CALL_STATE_RINGING;
 
-	else if (g_strcasecmp (state_str, "INCOMING") == 0)
-		state = CALL_STATE_INCOMING;
+    else if (g_strcasecmp (state_str, "INCOMING") == 0)
+        state = CALL_STATE_INCOMING;
 
     else if (g_strcasecmp (state_str, "HOLD") == 0)
         state = CALL_STATE_HOLD;
@@ -194,7 +192,7 @@ void create_new_call_from_details (const gchar *call_id, GHashTable *details, ca
     else
         state = CALL_STATE_FAILURE;
 
-    create_new_call (CALL, state, (gchar*)call_id, accountID, peer_name, call_get_peer_number(peer_number), &new_call);
+    create_new_call (CALL, state, (gchar*) call_id, accountID, peer_name, call_get_peer_number (peer_number), &new_call);
     *call = new_call;
 }
 
@@ -210,16 +208,15 @@ void create_history_entry_from_serialized_form (gchar *timestamp, gchar *details
 
     // details is in serialized form, i e: calltype%to%from%callid
 
-    if ((ptr = g_strsplit(details, delim,5)) != NULL) {
+    if ( (ptr = g_strsplit (details, delim,5)) != NULL) {
 
-	while (ptr != NULL && token < 5) {
-	    
-            switch (token)
-            {
+        while (ptr != NULL && token < 5) {
+
+            switch (token) {
                 case 0:
                     history_state = get_history_state_from_id (*ptr);
                     break;
-	        case 1: 
+                case 1:
                     peer_number = *ptr;
                     break;
                 case 2:
@@ -236,11 +233,12 @@ void create_history_entry_from_serialized_form (gchar *timestamp, gchar *details
             }
 
             token++;
-	    ptr++;
+            ptr++;
 
-	}
+        }
 
     }
+
     if (g_strcasecmp (peer_name, "empty") == 0)
         peer_name="";
 
@@ -262,7 +260,8 @@ void free_callable_obj_t (callable_obj_t *c)
     g_free (c);
 }
 
-void attach_thumbnail (callable_obj_t *call, GdkPixbuf *pixbuf) {
+void attach_thumbnail (callable_obj_t *call, GdkPixbuf *pixbuf)
+{
     call->_contact_thumbnail = pixbuf;
 }
 
@@ -270,8 +269,8 @@ gchar* generate_call_id (void)
 {
     gchar *call_id;
 
-    call_id = g_new0(gchar, 30);
-    g_sprintf(call_id, "%d", rand());
+    call_id = g_new0 (gchar, 30);
+    g_sprintf (call_id, "%d", rand());
     return call_id;
 }
 
@@ -279,11 +278,12 @@ gchar* get_peer_info (gchar* number, gchar* name)
 {
     gchar *info;
 
-    info = g_strconcat("\"", name, "\" <", number, ">", NULL);
+    info = g_strconcat ("\"", name, "\" <", number, ">", NULL);
     return info;
 }
 
-history_state_t get_history_state_from_id (gchar *indice){
+history_state_t get_history_state_from_id (gchar *indice)
+{
 
     history_state_t state;
 
@@ -308,34 +308,32 @@ gchar* get_call_duration (callable_obj_t *obj)
 
     start = obj->_time_start;
     end = obj->_time_stop;
-    
+
     if (start == end)
-        return g_markup_printf_escaped("<small>Duration:</small> 0:00");
+        return g_markup_printf_escaped ("<small>Duration:</small> 0:00");
 
-    duration = (int) difftime(end, start);
+    duration = (int) difftime (end, start);
 
-    if( duration / 60 == 0 )
-    {
-        if( duration < 10 )
-            res = g_markup_printf_escaped("00:0%i", duration);
+    if (duration / 60 == 0) {
+        if (duration < 10)
+            res = g_markup_printf_escaped ("00:0%i", duration);
         else
-            res = g_markup_printf_escaped("00:%i", duration);
-    }
-    else
-    {
-        if( duration%60 < 10 )
-            res = g_markup_printf_escaped("%i:0%i" , duration/60 , duration%60);
+            res = g_markup_printf_escaped ("00:%i", duration);
+    } else {
+        if (duration%60 < 10)
+            res = g_markup_printf_escaped ("%i:0%i" , duration/60 , duration%60);
         else
-            res = g_markup_printf_escaped("%i:%i" , duration/60 , duration%60);
+            res = g_markup_printf_escaped ("%i:%i" , duration/60 , duration%60);
     }
-    return g_markup_printf_escaped("<small>Duration:</small> %s", res);
+
+    return g_markup_printf_escaped ("<small>Duration:</small> %s", res);
 
 }
 
 gchar* serialize_history_entry (callable_obj_t *entry)
 {
     // "0|514-276-5468|Savoir-faire Linux|144562458" for instance
-    
+
     gchar* result;
     gchar* separator = "|";
     gchar* history_state, *timestamp;
@@ -345,21 +343,20 @@ gchar* serialize_history_entry (callable_obj_t *entry)
     // and the timestamps
     timestamp = convert_timestamp_to_gchar (entry->_time_stop);
 
-    result = g_strconcat (history_state, separator, 
-                          entry->_peer_number, separator, 
-                          g_strcasecmp (entry->_peer_name,"") ==0 ? "empty": entry->_peer_name, separator, 
-                          timestamp, separator, 
-                          g_strcasecmp (entry->_accountID,"") ==0 ? "empty": entry->_accountID, 
+    result = g_strconcat (history_state, separator,
+                          entry->_peer_number, separator,
+                          g_strcasecmp (entry->_peer_name,"") ==0 ? "empty": entry->_peer_name, separator,
+                          timestamp, separator,
+                          g_strcasecmp (entry->_accountID,"") ==0 ? "empty": entry->_accountID,
                           NULL);
-    
+
     return result;
 }
 
 gchar* get_history_id_from_state (history_state_t state)
 {
     // Refer to history_state_t enum in callable_obj.h
-    switch (state)
-    {
+    switch (state) {
         case MISSED:
             return "0";
         case INCOMING:
@@ -371,37 +368,38 @@ gchar* get_history_id_from_state (history_state_t state)
     }
 }
 
-gchar* get_formatted_start_timestamp (callable_obj_t *obj) { 
-	
+gchar* get_formatted_start_timestamp (callable_obj_t *obj)
+{
+
     struct tm* ptr;
     time_t lt, now;
     unsigned char str[100];
 
-    if (obj)
-    {
-		// Fetch the current timestamp
-		(void) time (&now);
+    if (obj) {
+        // Fetch the current timestamp
+        (void) time (&now);
         lt = obj->_time_start;
 
         ptr = localtime (&lt);
 
-		if (now - lt < UNIX_WEEK) {
-			if (now-lt < UNIX_DAY) {
-				strftime((char *)str, 100, N_("today at %R"), (const struct tm *)ptr);
-			} else {
-				if (now - lt < UNIX_TWO_DAYS) {
-					strftime((char *)str, 100, N_("yesterday at %R"), (const struct tm *)ptr);
-				} else {
-					strftime((char *)str, 100, N_("%A at %R"), (const struct tm *)ptr);
-				}
-			}
-		} else {
-			strftime((char *)str, 100, N_("%x at %R"), (const struct tm *)ptr);
-		}
+        if (now - lt < UNIX_WEEK) {
+            if (now-lt < UNIX_DAY) {
+                strftime ( (char *) str, 100, N_ ("today at %R"), (const struct tm *) ptr);
+            } else {
+                if (now - lt < UNIX_TWO_DAYS) {
+                    strftime ( (char *) str, 100, N_ ("yesterday at %R"), (const struct tm *) ptr);
+                } else {
+                    strftime ( (char *) str, 100, N_ ("%A at %R"), (const struct tm *) ptr);
+                }
+            }
+        } else {
+            strftime ( (char *) str, 100, N_ ("%x at %R"), (const struct tm *) ptr);
+        }
 
         // result function of the current locale
-        return g_markup_printf_escaped("\n%s\n" , str);
+        return g_markup_printf_escaped ("\n%s\n" , str);
     }
+
     return "";
 }
 
@@ -410,13 +408,13 @@ void set_timestamp (time_t *timestamp)
     time_t tmp;
 
     // Set to the current value
-    (void) time(&tmp);
+    (void) time (&tmp);
     *timestamp=tmp;
 }
 
 gchar* convert_timestamp_to_gchar (time_t timestamp)
 {
-    return g_markup_printf_escaped ("%i", (int)timestamp);
+    return g_markup_printf_escaped ("%i", (int) timestamp);
 }
 
 time_t convert_gchar_to_timestamp (gchar *timestamp)
@@ -424,15 +422,16 @@ time_t convert_gchar_to_timestamp (gchar *timestamp)
     return (time_t) atoi (timestamp);
 }
 
-	gchar* 
-get_peer_information (callable_obj_t *c) {
-	
-	gchar *res;
+gchar*
+get_peer_information (callable_obj_t *c)
+{
 
-	if (g_strcasecmp (c->_peer_name,"") == 0) 
-		return g_strdup (c->_peer_number);
-	else
-		return g_strdup (c->_peer_name);  
+    gchar *res;
+
+    if (g_strcasecmp (c->_peer_name,"") == 0)
+        return g_strdup (c->_peer_number);
+    else
+        return g_strdup (c->_peer_name);
 }
 
 
diff --git a/sflphone-client-gnome/src/callable_obj.h b/sflphone-client-gnome/src/callable_obj.h
index acab0ed3ea55e59ac858a16bb433c75e931f4ba7..01114feeadc199a7130ee170b72c322e886c97e6 100644
--- a/sflphone-client-gnome/src/callable_obj.h
+++ b/sflphone-client-gnome/src/callable_obj.h
@@ -40,33 +40,30 @@
  * @enum history_state
  * This enum have all the state a call can take in the history
  */
-typedef enum
-{
-  MISSED,
-  INCOMING,
-  OUTGOING
+typedef enum {
+    MISSED,
+    INCOMING,
+    OUTGOING
 } history_state_t;
 
 /**
  * @enum contact_type
  * This enum have all types of contacts: HOME phone, cell phone, etc...
  */
-typedef enum
-{
-  CONTACT_PHONE_HOME,
-  CONTACT_PHONE_BUSINESS,
-  CONTACT_PHONE_MOBILE
+typedef enum {
+    CONTACT_PHONE_HOME,
+    CONTACT_PHONE_BUSINESS,
+    CONTACT_PHONE_MOBILE
 } contact_type_t;
 
 /**
  * @enum callable_obj_type
  * This enum have all types of items
  */
-typedef enum
-{
-  CALL,
-  HISTORY_ENTRY,
-  CONTACT
+typedef enum {
+    CALL,
+    HISTORY_ENTRY,
+    CONTACT
 } callable_type_t;
 
 
@@ -74,16 +71,16 @@ typedef enum
   * This enum have all the states a call can take.
   */
 typedef enum {
-   CALL_STATE_INVALID = 0,
-   CALL_STATE_INCOMING,
-   CALL_STATE_RINGING,
-   CALL_STATE_CURRENT,
-   CALL_STATE_DIALING,
-   CALL_STATE_HOLD,
-   CALL_STATE_FAILURE,
-   CALL_STATE_BUSY,
-   CALL_STATE_TRANSFERT,
-   CALL_STATE_RECORD,
+    CALL_STATE_INVALID = 0,
+    CALL_STATE_INCOMING,
+    CALL_STATE_RINGING,
+    CALL_STATE_CURRENT,
+    CALL_STATE_DIALING,
+    CALL_STATE_HOLD,
+    CALL_STATE_FAILURE,
+    CALL_STATE_BUSY,
+    CALL_STATE_TRANSFERT,
+    CALL_STATE_RECORD,
 } call_state_t;
 
 typedef enum {
@@ -104,19 +101,19 @@ typedef struct  {
     callable_type_t _type;          // CALL - HISTORY ENTRY - CONTACT
     call_state_t _state;            // The state of the call
     int _state_code;                // The numeric state code as defined in SIP or IAX
-    gchar* _state_code_description; // A textual description of _state_code   
+    gchar* _state_code_description; // A textual description of _state_code
     gchar* _callID;                 // The call ID
     gchar* _confID;                 // The conference ID (NULL if don't participate to a conference)
     gchar* _accountID;              // The account the call is made with
     time_t _time_start;             // The timestamp the call was initiating
     time_t _time_stop;              // The timestamp the call was over
     history_state_t _history_state; // The history state if necessary
-    srtp_state_t _srtp_state;       // The state of security on the call 
+    srtp_state_t _srtp_state;       // The state of security on the call
     gchar* _srtp_cipher;            // Cipher used for the srtp session
     gchar* _sas;                    // The Short Authentication String that should be displayed
-    gboolean _zrtp_confirmed;       // Override real state. Used for hold/unhold 
-                                    // since rtp session is killed each time and 
-                                    // libzrtpcpp does not remember state (yet?)
+    gboolean _zrtp_confirmed;       // Override real state. Used for hold/unhold
+    // since rtp session is killed each time and
+    // libzrtpcpp does not remember state (yet?)
     /**
      * The information about the person we are talking
      */
@@ -137,8 +134,8 @@ typedef struct  {
      * The thumbnail, if callable_obj_type=CONTACT
      */
     GdkPixbuf *_contact_thumbnail;
-    
-    /** 
+
+    /**
      * Maintains a list of error dialogs
      * associated with that call so that
      * they could be destroyed at the right
@@ -160,26 +157,26 @@ void create_new_call_from_details (const gchar *, GHashTable *, callable_obj_t *
 
 void create_history_entry_from_serialized_form (gchar *, gchar *, callable_obj_t **);
 
-void call_add_error(callable_obj_t * call, gpointer dialog);
+void call_add_error (callable_obj_t * call, gpointer dialog);
 
-void call_remove_error(callable_obj_t * call, gpointer dialog);
+void call_remove_error (callable_obj_t * call, gpointer dialog);
 
-void call_remove_all_errors(callable_obj_t * call);
+void call_remove_all_errors (callable_obj_t * call);
 
-/* 
- * GCompareFunc to compare a callID (gchar* and a callable_obj_t) 
+/*
+ * GCompareFunc to compare a callID (gchar* and a callable_obj_t)
  */
-gint is_callID_callstruct ( gconstpointer, gconstpointer);
+gint is_callID_callstruct (gconstpointer, gconstpointer);
 
-/* 
- * GCompareFunc to get current call (gchar* and a callable_obj_t) 
+/*
+ * GCompareFunc to get current call (gchar* and a callable_obj_t)
  */
-gint get_state_callstruct ( gconstpointer, gconstpointer);
+gint get_state_callstruct (gconstpointer, gconstpointer);
 
-/** 
+/**
   * This function parse the callable_obj_t.from field to return the name
   * @param c The call
-  * @return The full name of the caller or an empty string 
+  * @return The full name of the caller or an empty string
   */
 gchar* call_get_peer_name (const gchar*);
 
diff --git a/sflphone-client-gnome/src/codeclist.c b/sflphone-client-gnome/src/codeclist.c
index 21037b01fb90572cc16ddf4c72234b11df2e7f7d..edf36173976d55ff74b6b5cf208d4ad38eada7b1 100644
--- a/sflphone-client-gnome/src/codeclist.c
+++ b/sflphone-client-gnome/src/codeclist.c
@@ -37,148 +37,159 @@
 
 GQueue * codecsCapabilities = NULL;
 
-	gint
+gint
 is_name_codecstruct (gconstpointer a, gconstpointer b)
 {
-	codec_t * c = (codec_t *)a;
-	if(strcmp(c->name, (const gchar *)b)==0)
-		return 0;
-	else
-		return 1;
+    codec_t * c = (codec_t *) a;
+
+    if (strcmp (c->name, (const gchar *) b) ==0)
+        return 0;
+    else
+        return 1;
 }
 
-	gint
+gint
 is_payload_codecstruct (gconstpointer a, gconstpointer b)
 {
-	codec_t * c = (codec_t *)a;
-	if(c->_payload == GPOINTER_TO_INT(b))
-		return 0;
-	else
-		return 1;
+    codec_t * c = (codec_t *) a;
+
+    if (c->_payload == GPOINTER_TO_INT (b))
+        return 0;
+    else
+        return 1;
 }
 
-void codec_list_init (GQueue **queue) {
+void codec_list_init (GQueue **queue)
+{
 
-	// Create the queue object that will contain the audio codecs
-	*queue = g_queue_new();
+    // Create the queue object that will contain the audio codecs
+    *queue = g_queue_new();
 }
 
-void codec_capabilities_load (void) {
+void codec_capabilities_load (void)
+{
 
-	gchar **codecs = NULL, **pl = NULL, **specs = NULL;
-	guint payload;
+    gchar **codecs = NULL, **pl = NULL, **specs = NULL;
+    guint payload;
 
-	// Create the queue object that will contain the global list of audio codecs
-	if (codecsCapabilities != NULL)	
-		g_queue_free (codecsCapabilities);
+    // Create the queue object that will contain the global list of audio codecs
+    if (codecsCapabilities != NULL)
+        g_queue_free (codecsCapabilities);
 
-	codecsCapabilities = g_queue_new();
+    codecsCapabilities = g_queue_new();
 
-	// This is a global list inherited by all accounts
+    // This is a global list inherited by all accounts
     codecs = (gchar**) dbus_codec_list ();
-    
-	// Add the codecs in the list
-	for (pl=codecs; *codecs; codecs++) {
-
-		codec_t *c;
-		payload = atoi (*codecs);
-		specs = (gchar **) dbus_codec_details (payload);
-		codec_create_new_with_specs (payload, specs, TRUE, &c);
-		g_queue_push_tail (codecsCapabilities, (gpointer*) c);
+
+    // Add the codecs in the list
+    for (pl=codecs; *codecs; codecs++) {
+
+        codec_t *c;
+        payload = atoi (*codecs);
+        specs = (gchar **) dbus_codec_details (payload);
+        codec_create_new_with_specs (payload, specs, TRUE, &c);
+        g_queue_push_tail (codecsCapabilities, (gpointer*) c);
     }
 
-	// If we didn't load any codecs, problem ...
-	if (g_queue_get_length (codecsCapabilities) == 0) {
+    // If we didn't load any codecs, problem ...
+    if (g_queue_get_length (codecsCapabilities) == 0) {
 
-		// Error message
-		ERROR ("No audio codecs found");
-        dbus_unregister(getpid());
-        exit(0);
+        // Error message
+        ERROR ("No audio codecs found");
+        dbus_unregister (getpid());
+        exit (0);
     }
 }
 
-void account_create_codec_list (account_t **acc) {
+void account_create_codec_list (account_t **acc)
+{
+
+    gchar **order = NULL;
+    GQueue *_codecs;
 
-	gchar **order = NULL;
-	GQueue *_codecs;
+    _codecs = (*acc)->codecs;
 
-	_codecs = (*acc)->codecs;
-	if (_codecs != NULL)
-		g_queue_free (_codecs);
+    if (_codecs != NULL)
+        g_queue_free (_codecs);
 
-	_codecs = g_queue_new ();
-	// _codecs = g_queue_copy (codecsCapabilities);
+    _codecs = g_queue_new ();
+    // _codecs = g_queue_copy (codecsCapabilities);
 
-	(*acc)->codecs = _codecs;
-	// order = (gchar**) dbus_get_active_codec_list (acc->accountID);
+    (*acc)->codecs = _codecs;
+    // order = (gchar**) dbus_get_active_codec_list (acc->accountID);
 }
 
-void account_set_codec_list (account_t **acc) {
+void account_set_codec_list (account_t **acc)
+{
 
-	// Reset the codec list
-	// account_create_codec_list (a);
+    // Reset the codec list
+    // account_create_codec_list (a);
 
 }
 
-void codec_create_new (gint payload, gboolean active, codec_t **c) {
+void codec_create_new (gint payload, gboolean active, codec_t **c)
+{
 
-	codec_t *codec;
-	gchar **specs;
+    codec_t *codec;
+    gchar **specs;
 
-	codec = g_new0 (codec_t, 1);
-	codec->_payload = payload;
+    codec = g_new0 (codec_t, 1);
+    codec->_payload = payload;
     specs = (gchar **) dbus_codec_details (payload);
-	codec->name = specs[0];
-	codec->sample_rate = atoi (specs[1]);
-	codec->_bitrate = atoi (specs[2]);
-	codec->_bandwidth = atoi (specs[3]);
-	codec->is_active = active;
+    codec->name = specs[0];
+    codec->sample_rate = atoi (specs[1]);
+    codec->_bitrate = atoi (specs[2]);
+    codec->_bandwidth = atoi (specs[3]);
+    codec->is_active = active;
 
-	*c = codec;
+    *c = codec;
 }
 
-void codec_create_new_with_specs (gint payload, gchar **specs, gboolean active, codec_t **c) {
+void codec_create_new_with_specs (gint payload, gchar **specs, gboolean active, codec_t **c)
+{
 
-	codec_t *codec;
+    codec_t *codec;
 
-	codec = g_new0 (codec_t, 1);
-	codec->_payload = payload;
-	codec->name = specs[0];
-	codec->sample_rate = atoi (specs[1]);
-	codec->_bitrate = atoi (specs[2]);
-	codec->_bandwidth = atoi (specs[3]);
-	codec->is_active = active;
+    codec = g_new0 (codec_t, 1);
+    codec->_payload = payload;
+    codec->name = specs[0];
+    codec->sample_rate = atoi (specs[1]);
+    codec->_bitrate = atoi (specs[2]);
+    codec->_bandwidth = atoi (specs[3]);
+    codec->is_active = active;
 
-	*c = codec;
+    *c = codec;
 }
 
-void codec_create_new_from_caps (codec_t *original, codec_t **copy) {
+void codec_create_new_from_caps (codec_t *original, codec_t **copy)
+{
 
-	codec_t *codec;
+    codec_t *codec;
 
-	if(!original) {
-	  *copy = NULL;
-	  return;
-	}
+    if (!original) {
+        *copy = NULL;
+        return;
+    }
 
-	codec = g_new0 (codec_t, 1);
-	codec->_payload = original->_payload;
-	codec->name = original->name;
-	codec->sample_rate = original->sample_rate;
-	codec->_bitrate = original->_bitrate;
-	codec->_bandwidth = original->_bandwidth;
-	codec->is_active = original->is_active;
+    codec = g_new0 (codec_t, 1);
+    codec->_payload = original->_payload;
+    codec->name = original->name;
+    codec->sample_rate = original->sample_rate;
+    codec->_bitrate = original->_bitrate;
+    codec->_bandwidth = original->_bandwidth;
+    codec->is_active = original->is_active;
 
-	*copy = codec;
+    *copy = codec;
 }
 
 
-void codec_list_clear (GQueue **queue) {
+void codec_list_clear (GQueue **queue)
+{
 
-	if (*queue != NULL)
-		g_queue_free (*queue);
+    if (*queue != NULL)
+        g_queue_free (*queue);
 
-	*queue = g_queue_new();
+    *queue = g_queue_new();
 }
 
 /*void codec_list_clear (void) {
@@ -187,162 +198,174 @@ void codec_list_clear (GQueue **queue) {
 	codecsCapabilities = g_queue_new();
 }*/
 
-void codec_list_add(codec_t * c, GQueue **queue) {
+void codec_list_add (codec_t * c, GQueue **queue)
+{
 
-	// Add a codec to a specific list
-	g_queue_push_tail (*queue, (gpointer *) c);
+    // Add a codec to a specific list
+    g_queue_push_tail (*queue, (gpointer *) c);
 }
 
-void codec_set_active (codec_t **c) {
+void codec_set_active (codec_t **c)
+{
 
-	if(c)
-	{
-		DEBUG("%s set active", (*c)->name);
-		(*c)->is_active = TRUE;
-	}
+    if (c) {
+        DEBUG ("%s set active", (*c)->name);
+        (*c)->is_active = TRUE;
+    }
 }
 
-void codec_set_inactive (codec_t **c) {
+void codec_set_inactive (codec_t **c)
+{
 
-	if(c){
-		DEBUG("%s set active", (*c)->name);
-		(*c)->is_active = FALSE;
-	}
+    if (c) {
+        DEBUG ("%s set active", (*c)->name);
+        (*c)->is_active = FALSE;
+    }
 }
 
-guint codec_list_get_size () {
+guint codec_list_get_size ()
+{
 
-	// The system wide codec list and the one per account have exactly the same size
-	// The only difference may be the order and the enabled codecs
-	return g_queue_get_length (codecsCapabilities);
+    // The system wide codec list and the one per account have exactly the same size
+    // The only difference may be the order and the enabled codecs
+    return g_queue_get_length (codecsCapabilities);
 }
 
-codec_t* codec_list_get_by_name (gconstpointer name, GQueue *q) {
+codec_t* codec_list_get_by_name (gconstpointer name, GQueue *q)
+{
+
+    // If NULL is passed as argument, we look into the global capabilities
+    if (q == NULL)
+        q = codecsCapabilities;
 
-	// If NULL is passed as argument, we look into the global capabilities
-	if (q == NULL)
-		q = codecsCapabilities;
+    GList * c = g_queue_find_custom (q, name, is_name_codecstruct);
 
-	GList * c = g_queue_find_custom (q, name, is_name_codecstruct);
-	if(c)
-		return (codec_t *)c->data;
-	else
-		return NULL;
+    if (c)
+        return (codec_t *) c->data;
+    else
+        return NULL;
 }
 
-codec_t* codec_list_get_by_payload (gconstpointer payload, GQueue *q) {
+codec_t* codec_list_get_by_payload (gconstpointer payload, GQueue *q)
+{
+
+    // If NULL is passed as argument, we look into the global capabilities
+    if (q == NULL)
+        q = codecsCapabilities;
 
-	// If NULL is passed as argument, we look into the global capabilities
-	if (q == NULL)
-		q = codecsCapabilities;
+    GList * c = g_queue_find_custom (q, payload, is_payload_codecstruct);
 
-	GList * c = g_queue_find_custom (q, payload, is_payload_codecstruct);
-	if(c)
-		return (codec_t *)c->data;
-	else
-		return NULL;
+    if (c)
+        return (codec_t *) c->data;
+    else
+        return NULL;
 }
 
-codec_t* codec_list_get_nth (guint index, GQueue *q) {
-	return g_queue_peek_nth (q, index);
+codec_t* codec_list_get_nth (guint index, GQueue *q)
+{
+    return g_queue_peek_nth (q, index);
 }
 
-codec_t* capabilities_get_nth (guint index) {
+codec_t* capabilities_get_nth (guint index)
+{
 
-	return g_queue_peek_nth (codecsCapabilities, index);
+    return g_queue_peek_nth (codecsCapabilities, index);
 }
 
-void codec_set_prefered_order (guint index, GQueue *q) {
+void codec_set_prefered_order (guint index, GQueue *q)
+{
 
-	codec_t * prefered = codec_list_get_nth (index, q);
-	g_queue_pop_nth (q, index);
-	g_queue_push_head (q, prefered);
+    codec_t * prefered = codec_list_get_nth (index, q);
+    g_queue_pop_nth (q, index);
+    g_queue_push_head (q, prefered);
 }
 
-void codec_list_move_codec_up (guint index, GQueue **q) {
+void codec_list_move_codec_up (guint index, GQueue **q)
+{
 
-	DEBUG("Codec list Size: %i \n", codec_list_get_size ());
+    DEBUG ("Codec list Size: %i \n", codec_list_get_size ());
 
-	GQueue *tmp = *q;
+    GQueue *tmp = *q;
 
-	if (index != 0)
-	{
-		gpointer codec = g_queue_pop_nth (tmp, index);
-		g_queue_push_nth (tmp, codec, index-1);
-	}
+    if (index != 0) {
+        gpointer codec = g_queue_pop_nth (tmp, index);
+        g_queue_push_nth (tmp, codec, index-1);
+    }
 
-	*q = tmp;
+    *q = tmp;
 
 }
 
-void codec_list_move_codec_down (guint index, GQueue **q) {
+void codec_list_move_codec_down (guint index, GQueue **q)
+{
 
-	DEBUG("Codec list Size: %i \n",codec_list_get_size());
+    DEBUG ("Codec list Size: %i \n",codec_list_get_size());
 
-	GQueue *tmp = *q;
+    GQueue *tmp = *q;
 
-	if (index != tmp->length)
-	{
-		gpointer codec = g_queue_pop_nth (tmp, index);
-		g_queue_push_nth (tmp, codec, index+1);
-	}
-	
-	*q = tmp;
+    if (index != tmp->length) {
+        gpointer codec = g_queue_pop_nth (tmp, index);
+        g_queue_push_nth (tmp, codec, index+1);
+    }
+
+    *q = tmp;
 
 }
 
-void codec_list_update_to_daemon (account_t *acc) {
-
-	// String listing codecs payloads
-	const gchar** codecList;
-
-	// Length of the codec list
-	int length = acc->codecs->length;
-
-	// Initiate double array char list for one string
-	codecList = (void*)malloc(sizeof(void*));
-
-	// Get all codecs in queue
-	int c = 0;
-	unsigned int i = 0;
-
-	for(i = 0; i < length; i++)
-	{
-		codec_t* currentCodec = codec_list_get_nth (i, acc->codecs);
-		// Assert not null
-		if(currentCodec)
-		{
-			// Save only if active
-			if(currentCodec->is_active)
-			{
-				// Reallocate memory each time more than one active codec is found
-				if(c!=0)
-					codecList = (void*)realloc(codecList, (c+1)*sizeof(void*));
-				// Allocate memory for the payload
-				*(codecList+c) = (gchar*)malloc(sizeof(gchar*));
-				char payload[10];
-				// Put payload string in char array
-				sprintf(payload, "%d", currentCodec->_payload);
-				strcpy((char*)*(codecList+c), payload);
-				c++;
-			}
-		}
-	}
-
-	// Allocate NULL array at the end for Dbus
-	codecList = (void*)realloc(codecList, (c+1)*sizeof(void*));
-	*(codecList+c) = NULL;
-
-	// call dbus function with array of strings
-	dbus_set_active_codec_list (codecList, acc->accountID);
-
-	// Delete memory
-	for(i = 0; i < c; i++) {
-		free((gchar*)*(codecList+i));
-	}
-	free(codecList);
+void codec_list_update_to_daemon (account_t *acc)
+{
+
+    // String listing codecs payloads
+    const gchar** codecList;
+
+    // Length of the codec list
+    int length = acc->codecs->length;
+
+    // Initiate double array char list for one string
+    codecList = (void*) malloc (sizeof (void*));
+
+    // Get all codecs in queue
+    int c = 0;
+    unsigned int i = 0;
+
+    for (i = 0; i < length; i++) {
+        codec_t* currentCodec = codec_list_get_nth (i, acc->codecs);
+
+        // Assert not null
+        if (currentCodec) {
+            // Save only if active
+            if (currentCodec->is_active) {
+                // Reallocate memory each time more than one active codec is found
+                if (c!=0)
+                    codecList = (void*) realloc (codecList, (c+1) *sizeof (void*));
+
+                // Allocate memory for the payload
+                * (codecList+c) = (gchar*) malloc (sizeof (gchar*));
+                char payload[10];
+                // Put payload string in char array
+                sprintf (payload, "%d", currentCodec->_payload);
+                strcpy ( (char*) * (codecList+c), payload);
+                c++;
+            }
+        }
+    }
+
+    // Allocate NULL array at the end for Dbus
+    codecList = (void*) realloc (codecList, (c+1) *sizeof (void*));
+    * (codecList+c) = NULL;
+
+    // call dbus function with array of strings
+    dbus_set_active_codec_list (codecList, acc->accountID);
+
+    // Delete memory
+    for (i = 0; i < c; i++) {
+        free ( (gchar*) * (codecList+i));
+    }
+
+    free (codecList);
 }
 
-GQueue* get_system_codec_list (void) {
-	return  codecsCapabilities;
+GQueue* get_system_codec_list (void)
+{
+    return  codecsCapabilities;
 }
diff --git a/sflphone-client-gnome/src/codeclist.h b/sflphone-client-gnome/src/codeclist.h
index 0737f3853d10c77bb22bdca2efdb5cac89113bf6..253067a8df71f8fb3ad5cda7e697b8019ff15ec0 100644
--- a/sflphone-client-gnome/src/codeclist.h
+++ b/sflphone-client-gnome/src/codeclist.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.net>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -38,19 +38,19 @@
   */
 
 typedef struct {
-  /** Payload of the codec */
-  gint _payload;
-  /** Tells if the codec has been activated */
-  gboolean is_active;
-  /** String description */
-  gchar * name;
-  /** Sample rate */
-  int sample_rate;
-  /** Bitrate */
-  gdouble _bitrate;
-  /** Bandwidth */
-  gdouble _bandwidth;
-}codec_t;
+    /** Payload of the codec */
+    gint _payload;
+    /** Tells if the codec has been activated */
+    gboolean is_active;
+    /** String description */
+    gchar * name;
+    /** Sample rate */
+    int sample_rate;
+    /** Bitrate */
+    gdouble _bitrate;
+    /** Bandwidth */
+    gdouble _bandwidth;
+} codec_t;
 
 /** @struct codec_t
   * @brief Codec information.
@@ -58,29 +58,29 @@ typedef struct {
   * This match how the server internally works and the dbus API to save and retrieve the codecs details.
   */
 
-/** 
- * This function initialize a specific codec list. 
+/**
+ * This function initialize a specific codec list.
  */
 void codec_list_init (GQueue **q);
 
-/** 
- * This function initialize the system wide codec list. 
+/**
+ * This function initialize the system wide codec list.
  */
 void codec_capabilities_load (void);
 
-/** 
- * This function empty and free a specific codec list. 
+/**
+ * This function empty and free a specific codec list.
  */
 void codec_list_clear (GQueue **q);
 
-/** 
- * This function empty and free the system wide codec list. 
+/**
+ * This function empty and free the system wide codec list.
  */
 void system_codec_list_clear (void);
 
-/** 
- * This function append an codec to list. 
- * @param c The codec you want to add 
+/**
+ * This function append an codec to list.
+ * @param c The codec you want to add
  */
 void codec_list_add (codec_t * c, GQueue **q);
 
@@ -94,25 +94,25 @@ void codec_set_active (codec_t **c);
  * Set a codec inactive. An active codec won't be used for codec negociation
  * @param name The string description of the codec
  */
-void codec_set_inactive(codec_t **c);
+void codec_set_inactive (codec_t **c);
 
-/** 
+/**
  * Return the number of codecs in the list
- * @return guint The number of codecs in the list 
+ * @return guint The number of codecs in the list
  */
 guint codec_list_get_size();
 
-/** 
- * Return the codec structure that corresponds to the string description 
+/**
+ * Return the codec structure that corresponds to the string description
  * @param name The string description of the codec
- * @return codec_t* A codec or NULL 
+ * @return codec_t* A codec or NULL
  */
-codec_t * codec_list_get_by_name(gconstpointer name, GQueue *q);
+codec_t * codec_list_get_by_name (gconstpointer name, GQueue *q);
 
-/** 
+/**
  * Return the codec at the nth position in the list
  * @param index The position of the codec you want
- * @return codec_t* A codec or NULL 
+ * @return codec_t* A codec or NULL
  */
 codec_t* codec_list_get_nth (guint index, GQueue *q);
 codec_t* capabilities_get_nth (guint index);
@@ -120,16 +120,16 @@ codec_t* capabilities_get_nth (guint index);
 /**
  * Set the prefered codec first in the codec list
  * @param index The position in the list of the prefered codec
- */ 
+ */
 void codec_set_prefered_order (guint index, GQueue *q);
 
-/** 
+/**
  * Move the codec from an unit up in the codec_list
  * @param index The current index in the list
  */
 void codec_list_move_codec_up (guint index, GQueue **q);
 
-/** 
+/**
  * Move the codec from an unit down in the codec_list
  * @param index The current index in the list
  */
@@ -145,7 +145,7 @@ codec_t* codec_list_get_by_payload (gconstpointer payload, GQueue *q);
 GQueue* get_system_codec_list (void);
 
 /**
- * Instanciate a new codecs with the given payload. 
+ * Instanciate a new codecs with the given payload.
  * Fetches codec specification through D-Bus
  *
  * @param payload		The unique RTP payload
diff --git a/sflphone-client-gnome/src/conference_obj.c b/sflphone-client-gnome/src/conference_obj.c
index 3b534e079ab6d5c9e53e8615b254ebdb444b1fa5..90f0ffd679adc1158fe5bacbc7d8f2d5d3d0d20b 100644
--- a/sflphone-client-gnome/src/conference_obj.c
+++ b/sflphone-client-gnome/src/conference_obj.c
@@ -32,22 +32,20 @@
 #include <sflphone_const.h>
 #include <time.h>
 
-gint is_confID_confstruct ( gconstpointer a, gconstpointer b)
+gint is_confID_confstruct (gconstpointer a, gconstpointer b)
 {
-    conference_obj_t * c = (conference_obj_t*)a;
-    if(g_strcasecmp(c->_confID, (const gchar*) b) == 0)
-    {
+    conference_obj_t * c = (conference_obj_t*) a;
+
+    if (g_strcasecmp (c->_confID, (const gchar*) b) == 0) {
         return 0;
-    }
-    else
-    {
+    } else {
         return 1;
     }
 }
 
 conference_obj_t* create_new_conference (conference_state_t state, const gchar* confID, conference_obj_t ** conf)
 {
-    DEBUG("create_new_conference");
+    DEBUG ("create_new_conference");
 
     // conference_obj_t *obj;
     conference_obj_t *new_conf;
@@ -56,7 +54,7 @@ conference_obj_t* create_new_conference (conference_state_t state, const gchar*
     // Allocate memory
     new_conf = g_new0 (conference_obj_t, 1);
 
-    // Set state field    
+    // Set state field
     new_conf->_state = state;
 
     // Set the ID field
@@ -70,8 +68,8 @@ conference_obj_t* create_new_conference (conference_state_t state, const gchar*
 }
 
 conference_obj_t* create_new_conference_from_details (const gchar *conf_id, GHashTable *details, conference_obj_t ** conf)
-{    
-    DEBUG("create_new_conference_from_details");
+{
+    DEBUG ("create_new_conference_from_details");
 
     conference_obj_t *new_conf;
     gchar* call_id;
@@ -91,11 +89,11 @@ conference_obj_t* create_new_conference_from_details (const gchar *conf_id, GHas
     new_conf->participant_list = NULL;
 
     // get participant list
-    participants = dbus_get_participant_list(conf_id);
+    participants = dbus_get_participant_list (conf_id);
 
     // generate conference participant list
-    conference_participant_list_update(participants, new_conf);
- 
+    conference_participant_list_update (participants, new_conf);
+
     state_str = g_hash_table_lookup (details, "CONF_STATE");
 
     if (g_strcasecmp (state_str, "ACTIVE_ATACHED") == 0)
@@ -114,49 +112,49 @@ void free_conference_obj_t (conference_obj_t *c)
 {
     g_free (c->_confID);
 
-    if(c->participant_list)
+    if (c->participant_list)
         g_slist_free (c->participant_list);
 
     g_free (c);
 }
 
 
-void conference_add_participant(const gchar* call_id, conference_obj_t* conf)
+void conference_add_participant (const gchar* call_id, conference_obj_t* conf)
 {
     // store the new participant list after appending participant id
-    conf->participant_list = g_slist_append(conf->participant_list, (gpointer)call_id);
+    conf->participant_list = g_slist_append (conf->participant_list, (gpointer) call_id);
 }
 
 
-void conference_remove_participant(const gchar* call_id, conference_obj_t* conf)
+void conference_remove_participant (const gchar* call_id, conference_obj_t* conf)
 {
     // store the new participant list after removing participant id
-    conf->participant_list = g_slist_remove(conf->participant_list, (gconstpointer)call_id);
+    conf->participant_list = g_slist_remove (conf->participant_list, (gconstpointer) call_id);
 }
 
 
-GSList* conference_next_participant(GSList* participant)
+GSList* conference_next_participant (GSList* participant)
 {
-    return g_slist_next(participant);
+    return g_slist_next (participant);
 }
 
 
-GSList* conference_participant_list_update(gchar** participants, conference_obj_t* conf)
+GSList* conference_participant_list_update (gchar** participants, conference_obj_t* conf)
 {
     gchar* call_id;
     gchar** part;
 
-    if(conf->participant_list) {
-        g_slist_free(conf->participant_list);
-	conf->participant_list = NULL;
+    if (conf->participant_list) {
+        g_slist_free (conf->participant_list);
+        conf->participant_list = NULL;
     }
 
-    DEBUG("Conference: Participant list update");
+    DEBUG ("Conference: Participant list update");
 
     for (part = participants; *part; part++) {
-        call_id = (gchar*)(*part);
-	DEBUG("Adding %s", call_id);
-	conference_add_participant(call_id, conf);
+        call_id = (gchar*) (*part);
+        DEBUG ("Adding %s", call_id);
+        conference_add_participant (call_id, conf);
     }
 
 }
diff --git a/sflphone-client-gnome/src/conference_obj.h b/sflphone-client-gnome/src/conference_obj.h
index 5215ee7bd5aebbc9bea181e6fb622a34b42c6a55..56f46e28dffa0b45bfc725356e8487c4e83b7b9d 100644
--- a/sflphone-client-gnome/src/conference_obj.h
+++ b/sflphone-client-gnome/src/conference_obj.h
@@ -41,12 +41,11 @@
 /** @enum conference_state_t
   * This enum have all the states a conference can take.
   */
-typedef enum
-{
-   CONFERENCE_STATE_ACTIVE_ATACHED = 0,
-   CONFERENCE_STATE_ACTIVE_DETACHED,
-   CONFERENCE_STATE_RECORD,
-   CONFERENCE_STATE_HOLD
+typedef enum {
+    CONFERENCE_STATE_ACTIVE_ATACHED = 0,
+    CONFERENCE_STATE_ACTIVE_DETACHED,
+    CONFERENCE_STATE_RECORD,
+    CONFERENCE_STATE_HOLD
 } conference_state_t;
 
 
@@ -60,7 +59,7 @@ typedef struct  {
     gchar* _confID;                  // The call ID
     gboolean _conference_secured;    // the security state of the conference
     gboolean _conf_srtp_enabled;     // security required for this conference
-    GSList* participant_list;             // participant list for this 
+    GSList* participant_list;             // participant list for this
 
 } conference_obj_t;
 
@@ -70,17 +69,17 @@ conference_obj_t* create_new_conference_from_details (const gchar *, GHashTable
 
 void free_conference_obj_t (conference_obj_t *c);
 
-/* 
- * GCompareFunc to compare a confID (gchar* and a callable_obj_t) 
+/*
+ * GCompareFunc to compare a confID (gchar* and a callable_obj_t)
  */
-gint is_confID_confstruct ( gconstpointer, gconstpointer);
+gint is_confID_confstruct (gconstpointer, gconstpointer);
 
-void conference_add_participatn(const gchar*, conference_obj_t *);
+void conference_add_participatn (const gchar*, conference_obj_t *);
 
-void conference_remove_participant(const gchar*, conference_obj_t *);
+void conference_remove_participant (const gchar*, conference_obj_t *);
 
-GSList* conference_next_participant(GSList* participant);
+GSList* conference_next_participant (GSList* participant);
 
-GSList* conference_participant_list_update(gchar**, conference_obj_t*);
+GSList* conference_participant_list_update (gchar**, conference_obj_t*);
 
 #endif
diff --git a/sflphone-client-gnome/src/config/accountconfigdialog.c b/sflphone-client-gnome/src/config/accountconfigdialog.c
index b4a75d272c65753474e8d6689e5c5780857979e0..a83857539c410b31cabffe8b96e768e9859082b8 100644
--- a/sflphone-client-gnome/src/config/accountconfigdialog.c
+++ b/sflphone-client-gnome/src/config/accountconfigdialog.c
@@ -57,7 +57,7 @@
  * TODO: tidy this up
  * by storing these variables
  * in a private structure.
- * Local variables 
+ * Local variables
  */
 GtkDialog * dialog;
 GtkWidget * hbox;
@@ -112,11 +112,11 @@ gchar *current_username;
 
 // Credentials
 enum {
-	COLUMN_CREDENTIAL_REALM,
-	COLUMN_CREDENTIAL_USERNAME,
-	COLUMN_CREDENTIAL_PASSWORD,
-	COLUMN_CREDENTIAL_DATA,
-	COLUMN_CREDENTIAL_COUNT
+    COLUMN_CREDENTIAL_REALM,
+    COLUMN_CREDENTIAL_USERNAME,
+    COLUMN_CREDENTIAL_PASSWORD,
+    COLUMN_CREDENTIAL_DATA,
+    COLUMN_CREDENTIAL_COUNT
 };
 
 /*
@@ -124,1216 +124,1227 @@ enum {
  */
 static void show_password_cb (GtkWidget *widget, gpointer data)
 {
-	gtk_entry_set_visibility (GTK_ENTRY (data), !gtk_entry_get_visibility (GTK_ENTRY (data)));
+    gtk_entry_set_visibility (GTK_ENTRY (data), !gtk_entry_get_visibility (GTK_ENTRY (data)));
 }
 
 /* Signal to protocolComboBox 'changed' */
-void change_protocol_cb (account_t *currentAccount UNUSED) {
-
-	gchar *protocol = gtk_combo_box_get_active_text (GTK_COMBO_BOX (protocolComboBox));
-
-	// Only if tabs are not NULL
-	if(security_tab && advanced_tab) {
-	    if (g_strcasecmp (protocol, "IAX") == 0) {
-		gtk_widget_hide (GTK_WIDGET(security_tab));
-		gtk_widget_hide (GTK_WIDGET(advanced_tab));
-	    }
-	    else {
-                gtk_widget_show (GTK_WIDGET(security_tab));
-		gtk_widget_show (GTK_WIDGET(advanced_tab));
-	    }
-	}
+void change_protocol_cb (account_t *currentAccount UNUSED)
+{
+
+    gchar *protocol = gtk_combo_box_get_active_text (GTK_COMBO_BOX (protocolComboBox));
+
+    // Only if tabs are not NULL
+    if (security_tab && advanced_tab) {
+        if (g_strcasecmp (protocol, "IAX") == 0) {
+            gtk_widget_hide (GTK_WIDGET (security_tab));
+            gtk_widget_hide (GTK_WIDGET (advanced_tab));
+        } else {
+            gtk_widget_show (GTK_WIDGET (security_tab));
+            gtk_widget_show (GTK_WIDGET (advanced_tab));
+        }
+    }
 }
 
-	int
-is_iax_enabled(void)
+int
+is_iax_enabled (void)
 {
-	int res = dbus_is_iax2_enabled();
-	if(res == 1)
-		return TRUE;
-	else
-		return FALSE;
+    int res = dbus_is_iax2_enabled();
+
+    if (res == 1)
+        return TRUE;
+    else
+        return FALSE;
 }
 
 
-        void
-select_dtmf_type( void )
+void
+select_dtmf_type (void)
 {
 
-        DEBUG("DTMF selection changed\n");
+    DEBUG ("DTMF selection changed\n");
 
-        if( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(overrtp) ) )
-        {
-                // dbus_set_audio_manager( ALSA );
-                DEBUG("Selected DTMF over RTP");
-        }
-        else {
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (overrtp))) {
+        // dbus_set_audio_manager( ALSA );
+        DEBUG ("Selected DTMF over RTP");
+    } else {
 
-                // dbus_set_audio_manager( PULSEAUDIO );
-                DEBUG("Selected DTMF over SIP");
-        }
+        // dbus_set_audio_manager( PULSEAUDIO );
+        DEBUG ("Selected DTMF over SIP");
+    }
 
 }
 
-static GPtrArray* getNewCredential (GHashTable * properties) {
+static GPtrArray* getNewCredential (GHashTable * properties)
+{
 
-	GtkTreeIter iter;
-	gboolean valid;
-	gint row_count = 0;
+    GtkTreeIter iter;
+    gboolean valid;
+    gint row_count = 0;
+
+    valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (credentialStore), &iter);
 
-	valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL(credentialStore), &iter);
+    GPtrArray *credential_array = g_ptr_array_new ();
 
-	GPtrArray *credential_array = g_ptr_array_new ();
+    gchar *username;
+    gchar *realm;
+    gchar *password;
+    GHashTable * new_table;
 
-	gchar *username;
-	gchar *realm;
-	gchar *password;
-	GHashTable * new_table;   
+    gtk_tree_model_get (GTK_TREE_MODEL (credentialStore), &iter,
+                        COLUMN_CREDENTIAL_REALM, &realm,
+                        COLUMN_CREDENTIAL_USERNAME, &username,
+                        COLUMN_CREDENTIAL_PASSWORD, &password,
+                        -1);
 
-	gtk_tree_model_get (GTK_TREE_MODEL(credentialStore), &iter,
-			COLUMN_CREDENTIAL_REALM, &realm,
-			COLUMN_CREDENTIAL_USERNAME, &username,
-			COLUMN_CREDENTIAL_PASSWORD, &password,
-			-1);
+    g_hash_table_insert (properties, g_strdup (ACCOUNT_REALM), realm);
 
-	g_hash_table_insert(properties, g_strdup(ACCOUNT_REALM), realm);
+    // better use the current_username as it is the account username in the
+    // g_hash_table_insert(properties, g_strdup(ACCOUNT_AUTHENTICATION_USERNAME), username);
+    g_hash_table_insert (properties, g_strdup (ACCOUNT_AUTHENTICATION_USERNAME), current_username);
 
-	// better use the current_username as it is the account username in the 
-	// g_hash_table_insert(properties, g_strdup(ACCOUNT_AUTHENTICATION_USERNAME), username);
-	g_hash_table_insert(properties, g_strdup(ACCOUNT_AUTHENTICATION_USERNAME), current_username);
+    // Do not change the password if nothing has been changed by the user
+    if (g_strcasecmp (password, PW_HIDDEN) != 0)
+        g_hash_table_insert (properties, g_strdup (ACCOUNT_PASSWORD), password);
 
-	// Do not change the password if nothing has been changed by the user
-	if (g_strcasecmp (password, PW_HIDDEN) != 0)
-		g_hash_table_insert(properties, g_strdup(ACCOUNT_PASSWORD), password);
 
-	
 
-	valid = gtk_tree_model_iter_next (GTK_TREE_MODEL(credentialStore), &iter);
+    valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (credentialStore), &iter);
 
-	while (valid) {        
-		gtk_tree_model_get (GTK_TREE_MODEL(credentialStore), &iter,
-				COLUMN_CREDENTIAL_REALM, &realm,
-				COLUMN_CREDENTIAL_USERNAME, &username,
-				COLUMN_CREDENTIAL_PASSWORD, &password,
-				-1);
+    while (valid) {
+        gtk_tree_model_get (GTK_TREE_MODEL (credentialStore), &iter,
+                            COLUMN_CREDENTIAL_REALM, &realm,
+                            COLUMN_CREDENTIAL_USERNAME, &username,
+                            COLUMN_CREDENTIAL_PASSWORD, &password,
+                            -1);
 
-		DEBUG ("Row %d: %s %s %s", row_count, username, password, realm);
+        DEBUG ("Row %d: %s %s %s", row_count, username, password, realm);
 
-		new_table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
-		g_hash_table_insert(new_table, g_strdup(ACCOUNT_REALM), realm);
-		g_hash_table_insert(new_table, g_strdup(ACCOUNT_USERNAME), username);
-		g_hash_table_insert(new_table, g_strdup(ACCOUNT_PASSWORD), password);
+        new_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+        g_hash_table_insert (new_table, g_strdup (ACCOUNT_REALM), realm);
+        g_hash_table_insert (new_table, g_strdup (ACCOUNT_USERNAME), username);
+        g_hash_table_insert (new_table, g_strdup (ACCOUNT_PASSWORD), password);
 
-		g_ptr_array_add (credential_array, new_table);
+        g_ptr_array_add (credential_array, new_table);
 
-		row_count ++;
+        row_count ++;
 
-		valid = gtk_tree_model_iter_next (GTK_TREE_MODEL(credentialStore), &iter);
-	}
+        valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (credentialStore), &iter);
+    }
 
-	return credential_array;
+    return credential_array;
 }
 
-static void update_credential_cb(GtkWidget *widget, gpointer data UNUSED)
+static void update_credential_cb (GtkWidget *widget, gpointer data UNUSED)
 {
-	GtkTreeIter iter;
-	gtk_tree_model_get_iter_from_string ((GtkTreeModel *) credentialStore, &iter, "0");
-	gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "column"));
-	// g_print ("set password to %s\n", (gchar *) gtk_entry_get_text(GTK_ENTRY(widget)));
-	gtk_list_store_set (GTK_LIST_STORE (credentialStore), &iter, column, (gchar *) gtk_entry_get_text(GTK_ENTRY(widget)), -1);
+    GtkTreeIter iter;
+    gtk_tree_model_get_iter_from_string ( (GtkTreeModel *) credentialStore, &iter, "0");
+    gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "column"));
+    // g_print ("set password to %s\n", (gchar *) gtk_entry_get_text(GTK_ENTRY(widget)));
+    gtk_list_store_set (GTK_LIST_STORE (credentialStore), &iter, column, (gchar *) gtk_entry_get_text (GTK_ENTRY (widget)), -1);
 }
 
-static GtkWidget* create_basic_tab (account_t **a)  {
+static GtkWidget* create_basic_tab (account_t **a)
+{
 
-	GtkWidget * frame;
-	GtkWidget * table;
-	account_t *currentAccount;
-	GtkWidget * clearTextCheckbox;
+    GtkWidget * frame;
+    GtkWidget * table;
+    account_t *currentAccount;
+    GtkWidget * clearTextCheckbox;
 #if GTK_CHECK_VERSION(2,16,0)
 #else
-	GtkWidget *image;
+    GtkWidget *image;
 #endif
 
-	// Default settings
-	gchar *curAccountID = "";
-	gchar *curAccountEnabled = "true";
-	gchar *curAccountType = "SIP";
-	gchar *curAlias = "";
-	gchar *curUsername = "";
-	gchar *curRouteSet = "";
-	gchar *curHostname = "";
-	gchar *curPassword = "";
-	/* TODO: add curProxy, and add boxes for Proxy support */
-	gchar *curMailbox = "";
-	gchar *curUseragent = "";
-
-	currentAccount = *a;
-
-	int row = 0;
-
-	// Load from SIP/IAX/Unknown ?
-	if(currentAccount)
-	{
-		curAccountID = currentAccount->accountID;
-		curAccountType = g_hash_table_lookup(currentAccount->properties, ACCOUNT_TYPE);
-		DEBUG("Config: Current accountType %s", curAccountType);
-		curAccountEnabled = g_hash_table_lookup(currentAccount->properties, ACCOUNT_ENABLED);
-		curAlias = g_hash_table_lookup(currentAccount->properties, ACCOUNT_ALIAS);
-		curHostname = g_hash_table_lookup(currentAccount->properties, ACCOUNT_HOSTNAME);
-		curPassword = g_hash_table_lookup(currentAccount->properties, ACCOUNT_PASSWORD);
-		curUsername = g_hash_table_lookup(currentAccount->properties, ACCOUNT_USERNAME);
-		// curRouteSet = g_hash_table_lookup(currentAccount->properties, ACCOUNT_ROUTE);
-		curMailbox = g_hash_table_lookup(currentAccount->properties, ACCOUNT_MAILBOX);
-		curUseragent = g_hash_table_lookup(currentAccount->properties, ACCOUNT_USERAGENT);
-	}
-
-	gnome_main_section_new (_("Account Parameters"), &frame);
-	gtk_widget_show(frame);
-
-	if(strcmp(curAccountType, "SIP") == 0) {
-	  table = gtk_table_new (9, 2,  FALSE/* homogeneous */);
-	}
-	else if(strcmp(curAccountType, "IAX") == 0) {
-	  table = gtk_table_new (8, 2, FALSE);
-	}
-
-	gtk_table_set_row_spacings( GTK_TABLE(table), 10);
-	gtk_table_set_col_spacings( GTK_TABLE(table), 10);
-	gtk_widget_show (table);
-	gtk_container_add( GTK_CONTAINER( frame) , table );
-
-	label = gtk_label_new_with_mnemonic (_("_Alias"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	entryAlias = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryAlias);
-	gtk_entry_set_text(GTK_ENTRY(entryAlias), curAlias);
-	gtk_table_attach ( GTK_TABLE( table ), entryAlias, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-
-	row++;
-	label = gtk_label_new_with_mnemonic (_("_Protocol"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	protocolComboBox = gtk_combo_box_new_text();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), protocolComboBox);
-	gtk_combo_box_append_text(GTK_COMBO_BOX(protocolComboBox), "SIP");
-	if( is_iax_enabled() ) gtk_combo_box_append_text(GTK_COMBO_BOX(protocolComboBox), "IAX");
-	if(strcmp(curAccountType, "SIP") == 0)
-	{
-		gtk_combo_box_set_active(GTK_COMBO_BOX(protocolComboBox),0);
-	}
-	else if(strcmp(curAccountType, "IAX") == 0)
-	{
-		gtk_combo_box_set_active(GTK_COMBO_BOX(protocolComboBox),1);
-	}
-	else
-	{
-	        DEBUG("Config: Error: Account protocol not valid");
-		/* Should never come here, add debug message. */
-		gtk_combo_box_append_text(GTK_COMBO_BOX(protocolComboBox), _("Unknown"));
-		gtk_combo_box_set_active(GTK_COMBO_BOX(protocolComboBox),2);
-	}
-	gtk_table_attach ( GTK_TABLE( table ), protocolComboBox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	/* Link signal 'changed' */
-	g_signal_connect (G_OBJECT (GTK_COMBO_BOX(protocolComboBox)), "changed",
-			G_CALLBACK (change_protocol_cb),
-			currentAccount);
-
-	row++;
-	label = gtk_label_new_with_mnemonic (_("_Host name"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	entryHostname = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryHostname);
-	gtk_entry_set_text(GTK_ENTRY(entryHostname), curHostname);
-	gtk_table_attach ( GTK_TABLE( table ), entryHostname, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	row++;
-	label = gtk_label_new_with_mnemonic (_("_User name"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);	
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
+    // Default settings
+    gchar *curAccountID = "";
+    gchar *curAccountEnabled = "true";
+    gchar *curAccountType = "SIP";
+    gchar *curAlias = "";
+    gchar *curUsername = "";
+    gchar *curRouteSet = "";
+    gchar *curHostname = "";
+    gchar *curPassword = "";
+    /* TODO: add curProxy, and add boxes for Proxy support */
+    gchar *curMailbox = "";
+    gchar *curUseragent = "";
+
+    currentAccount = *a;
+
+    int row = 0;
+
+    // Load from SIP/IAX/Unknown ?
+    if (currentAccount) {
+        curAccountID = currentAccount->accountID;
+        curAccountType = g_hash_table_lookup (currentAccount->properties, ACCOUNT_TYPE);
+        DEBUG ("Config: Current accountType %s", curAccountType);
+        curAccountEnabled = g_hash_table_lookup (currentAccount->properties, ACCOUNT_ENABLED);
+        curAlias = g_hash_table_lookup (currentAccount->properties, ACCOUNT_ALIAS);
+        curHostname = g_hash_table_lookup (currentAccount->properties, ACCOUNT_HOSTNAME);
+        curPassword = g_hash_table_lookup (currentAccount->properties, ACCOUNT_PASSWORD);
+        curUsername = g_hash_table_lookup (currentAccount->properties, ACCOUNT_USERNAME);
+        // curRouteSet = g_hash_table_lookup(currentAccount->properties, ACCOUNT_ROUTE);
+        curMailbox = g_hash_table_lookup (currentAccount->properties, ACCOUNT_MAILBOX);
+        curUseragent = g_hash_table_lookup (currentAccount->properties, ACCOUNT_USERAGENT);
+    }
+
+    gnome_main_section_new (_ ("Account Parameters"), &frame);
+    gtk_widget_show (frame);
+
+    if (strcmp (curAccountType, "SIP") == 0) {
+        table = gtk_table_new (9, 2,  FALSE/* homogeneous */);
+    } else if (strcmp (curAccountType, "IAX") == 0) {
+        table = gtk_table_new (8, 2, FALSE);
+    }
+
+    gtk_table_set_row_spacings (GTK_TABLE (table), 10);
+    gtk_table_set_col_spacings (GTK_TABLE (table), 10);
+    gtk_widget_show (table);
+    gtk_container_add (GTK_CONTAINER (frame) , table);
+
+    label = gtk_label_new_with_mnemonic (_ ("_Alias"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    entryAlias = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryAlias);
+    gtk_entry_set_text (GTK_ENTRY (entryAlias), curAlias);
+    gtk_table_attach (GTK_TABLE (table), entryAlias, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+
+    row++;
+    label = gtk_label_new_with_mnemonic (_ ("_Protocol"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    protocolComboBox = gtk_combo_box_new_text();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), protocolComboBox);
+    gtk_combo_box_append_text (GTK_COMBO_BOX (protocolComboBox), "SIP");
+
+    if (is_iax_enabled()) gtk_combo_box_append_text (GTK_COMBO_BOX (protocolComboBox), "IAX");
+
+    if (strcmp (curAccountType, "SIP") == 0) {
+        gtk_combo_box_set_active (GTK_COMBO_BOX (protocolComboBox),0);
+    } else if (strcmp (curAccountType, "IAX") == 0) {
+        gtk_combo_box_set_active (GTK_COMBO_BOX (protocolComboBox),1);
+    } else {
+        DEBUG ("Config: Error: Account protocol not valid");
+        /* Should never come here, add debug message. */
+        gtk_combo_box_append_text (GTK_COMBO_BOX (protocolComboBox), _ ("Unknown"));
+        gtk_combo_box_set_active (GTK_COMBO_BOX (protocolComboBox),2);
+    }
+
+    gtk_table_attach (GTK_TABLE (table), protocolComboBox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    /* Link signal 'changed' */
+    g_signal_connect (G_OBJECT (GTK_COMBO_BOX (protocolComboBox)), "changed",
+                      G_CALLBACK (change_protocol_cb),
+                      currentAccount);
+
+    row++;
+    label = gtk_label_new_with_mnemonic (_ ("_Host name"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    entryHostname = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryHostname);
+    gtk_entry_set_text (GTK_ENTRY (entryHostname), curHostname);
+    gtk_table_attach (GTK_TABLE (table), entryHostname, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    row++;
+    label = gtk_label_new_with_mnemonic (_ ("_User name"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 #if GTK_CHECK_VERSION(2,16,0)
-	entryUsername = gtk_entry_new();
-	gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (entryUsername), GTK_ENTRY_ICON_PRIMARY, gdk_pixbuf_new_from_file(ICONS_DIR "/stock_person.svg", NULL));
+    entryUsername = gtk_entry_new();
+    gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (entryUsername), GTK_ENTRY_ICON_PRIMARY, gdk_pixbuf_new_from_file (ICONS_DIR "/stock_person.svg", NULL));
 #else
-	entryUsername = sexy_icon_entry_new();
-	image = gtk_image_new_from_file( ICONS_DIR "/stock_person.svg" );
-	sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(entryUsername), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
+    entryUsername = sexy_icon_entry_new();
+    image = gtk_image_new_from_file (ICONS_DIR "/stock_person.svg");
+    sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (entryUsername), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
 #endif
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUsername);
-	gtk_entry_set_text(GTK_ENTRY(entryUsername), curUsername);
-	gtk_table_attach ( GTK_TABLE( table ), entryUsername, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	if(strcmp(curAccountType, "SIP") == 0) {
-	  g_signal_connect(G_OBJECT (entryUsername), "changed", G_CALLBACK (update_credential_cb), NULL);
-	  g_object_set_data (G_OBJECT (entryUsername), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_USERNAME));
-	}
-
-	// Route set can be update only for SIP account
-	// TODO: uncomment this code and implement route 
-	/*
-	if(strcmp(curAccountType, "SIP") == 0) {
-	  row++;
-	  label = gtk_label_new_with_mnemonic(_("_Route (optional)"));
-	  gtk_table_attach(GTK_TABLE( table ), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	  gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	  entryRouteSet = gtk_entry_new();
-	  gtk_label_set_mnemonic_widget(GTK_LABEL(label), entryRouteSet);
-	  gtk_entry_set_text(GTK_ENTRY(entryRouteSet), curRouteSet);
-	  gtk_table_attach (GTK_TABLE(table), entryRouteSet, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	}
-	*/
-
-	row++;
-	label = gtk_label_new_with_mnemonic (_("_Password"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUsername);
+    gtk_entry_set_text (GTK_ENTRY (entryUsername), curUsername);
+    gtk_table_attach (GTK_TABLE (table), entryUsername, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    if (strcmp (curAccountType, "SIP") == 0) {
+        g_signal_connect (G_OBJECT (entryUsername), "changed", G_CALLBACK (update_credential_cb), NULL);
+        g_object_set_data (G_OBJECT (entryUsername), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_USERNAME));
+    }
+
+    // Route set can be update only for SIP account
+    // TODO: uncomment this code and implement route
+    /*
+    if(strcmp(curAccountType, "SIP") == 0) {
+      row++;
+      label = gtk_label_new_with_mnemonic(_("_Route (optional)"));
+      gtk_table_attach(GTK_TABLE( table ), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+      gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
+      entryRouteSet = gtk_entry_new();
+      gtk_label_set_mnemonic_widget(GTK_LABEL(label), entryRouteSet);
+      gtk_entry_set_text(GTK_ENTRY(entryRouteSet), curRouteSet);
+      gtk_table_attach (GTK_TABLE(table), entryRouteSet, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    }
+    */
+
+    row++;
+    label = gtk_label_new_with_mnemonic (_ ("_Password"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 #if GTK_CHECK_VERSION(2,16,0)
-	entryPassword = gtk_entry_new();
-	GtkSettings *settings = gtk_settings_get_default ();
-	//g_object_set (G_OBJECT (settings), "gtk-entry-password-hint-timeout", 600, NULL);
-	gtk_entry_set_icon_from_stock (GTK_ENTRY (entryPassword), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
+    entryPassword = gtk_entry_new();
+    GtkSettings *settings = gtk_settings_get_default ();
+    //g_object_set (G_OBJECT (settings), "gtk-entry-password-hint-timeout", 600, NULL);
+    gtk_entry_set_icon_from_stock (GTK_ENTRY (entryPassword), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
 #else
-	entryPassword = sexy_icon_entry_new();
-	image = gtk_image_new_from_stock( GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR );
-	sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(entryPassword), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
+    entryPassword = sexy_icon_entry_new();
+    image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR);
+    sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (entryPassword), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
 #endif
-	gtk_entry_set_visibility(GTK_ENTRY(entryPassword), FALSE);
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryPassword);
-	gtk_entry_set_text(GTK_ENTRY(entryPassword), curPassword);
-	gtk_table_attach ( GTK_TABLE( table ), entryPassword, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	if(strcmp(curAccountType, "SIP") == 0) {
-	  g_signal_connect (G_OBJECT (entryPassword), "changed", G_CALLBACK (update_credential_cb), NULL);
-	  g_object_set_data (G_OBJECT (entryPassword), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_PASSWORD));
-	}
-
-	row++;
-	clearTextCheckbox = gtk_check_button_new_with_mnemonic (_("Show password"));
-	g_signal_connect (clearTextCheckbox, "toggled", G_CALLBACK (show_password_cb), entryPassword);
-	gtk_table_attach (GTK_TABLE (table), clearTextCheckbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	row++;
-	label = gtk_label_new_with_mnemonic (_("_Voicemail number"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	entryMailbox = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryMailbox);
-	gtk_entry_set_text(GTK_ENTRY(entryMailbox), curMailbox);
-	gtk_table_attach ( GTK_TABLE( table ), entryMailbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	row++;
-	label = gtk_label_new_with_mnemonic (_("_User-agent"));
-	gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
-	entryUseragent = gtk_entry_new ();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUseragent);
-	gtk_entry_set_text (GTK_ENTRY (entryUseragent), curUseragent);
-	gtk_table_attach ( GTK_TABLE( table ), entryUseragent, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	gtk_widget_show_all( table );
-	gtk_container_set_border_width (GTK_CONTAINER(table), 10);
-
-	*a = currentAccount;
-	return frame;
+    gtk_entry_set_visibility (GTK_ENTRY (entryPassword), FALSE);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryPassword);
+    gtk_entry_set_text (GTK_ENTRY (entryPassword), curPassword);
+    gtk_table_attach (GTK_TABLE (table), entryPassword, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    if (strcmp (curAccountType, "SIP") == 0) {
+        g_signal_connect (G_OBJECT (entryPassword), "changed", G_CALLBACK (update_credential_cb), NULL);
+        g_object_set_data (G_OBJECT (entryPassword), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_PASSWORD));
+    }
+
+    row++;
+    clearTextCheckbox = gtk_check_button_new_with_mnemonic (_ ("Show password"));
+    g_signal_connect (clearTextCheckbox, "toggled", G_CALLBACK (show_password_cb), entryPassword);
+    gtk_table_attach (GTK_TABLE (table), clearTextCheckbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    row++;
+    label = gtk_label_new_with_mnemonic (_ ("_Voicemail number"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    entryMailbox = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryMailbox);
+    gtk_entry_set_text (GTK_ENTRY (entryMailbox), curMailbox);
+    gtk_table_attach (GTK_TABLE (table), entryMailbox, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    row++;
+    label = gtk_label_new_with_mnemonic (_ ("_User-agent"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    entryUseragent = gtk_entry_new ();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryUseragent);
+    gtk_entry_set_text (GTK_ENTRY (entryUseragent), curUseragent);
+    gtk_table_attach (GTK_TABLE (table), entryUseragent, 1, 2, row, row+1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    gtk_widget_show_all (table);
+    gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+
+    *a = currentAccount;
+    return frame;
 }
 
-static void fill_treeview_with_credential (GtkListStore * credentialStore, account_t * account) 
+static void fill_treeview_with_credential (GtkListStore * credentialStore, account_t * account)
 {
-	GtkTreeIter iter;
-	gtk_list_store_clear(credentialStore);
-	gtk_list_store_append (credentialStore, &iter);
-
-	/* This is the default, undeletable credential */
-	gchar * authentication_name = g_hash_table_lookup(account->properties, ACCOUNT_AUTHENTICATION_USERNAME);
-	gchar * realm = g_hash_table_lookup(account->properties, ACCOUNT_REALM);        
-	if (realm == NULL || (g_strcmp0(realm, "") == 0)) {
-		realm = g_strdup("*");
-	}
-
-	if((authentication_name == NULL) || (g_strcmp0(authentication_name, "") == 0)) {
-		gtk_list_store_set(credentialStore, &iter,
-				COLUMN_CREDENTIAL_REALM, realm, 
-				COLUMN_CREDENTIAL_USERNAME, gtk_entry_get_text(GTK_ENTRY(entryUsername)),
-				COLUMN_CREDENTIAL_PASSWORD, gtk_entry_get_text(GTK_ENTRY(entryPassword)),    
-				COLUMN_CREDENTIAL_DATA, account, 
-				-1);
-	} else {
-		gtk_list_store_set(credentialStore, &iter,
-				COLUMN_CREDENTIAL_REALM, g_hash_table_lookup(account->properties, ACCOUNT_REALM), 
-				COLUMN_CREDENTIAL_USERNAME, g_hash_table_lookup(account->properties, ACCOUNT_AUTHENTICATION_USERNAME),
-				// COLUMN_CREDENTIAL_PASSWORD, gtk_entry_get_text(GTK_ENTRY(entryPassword)),    
-				COLUMN_CREDENTIAL_PASSWORD, PW_HIDDEN,    
-				COLUMN_CREDENTIAL_DATA, account, 
-				-1);
-		g_signal_handlers_disconnect_by_func (G_OBJECT(entryUsername), G_CALLBACK(update_credential_cb), NULL);
-	}
-
-	if(account->credential_information == NULL) {
-		DEBUG("No credential defined");
-		return;
-	}
-
-	unsigned int i;
-	for(i = 0; i < account->credential_information->len; i++)
-	{	                    
-		GHashTable * element = g_ptr_array_index(account->credential_information, i);               
-		gtk_list_store_append (credentialStore, &iter);
-		gtk_list_store_set(credentialStore, &iter,
-				COLUMN_CREDENTIAL_REALM, g_hash_table_lookup(element, ACCOUNT_REALM), 
-				COLUMN_CREDENTIAL_USERNAME, g_hash_table_lookup(element, ACCOUNT_USERNAME), 
-				COLUMN_CREDENTIAL_PASSWORD, g_hash_table_lookup(element, ACCOUNT_PASSWORD), 
-				COLUMN_CREDENTIAL_DATA, element, // Pointer
-				-1);
-	}
+    GtkTreeIter iter;
+    gtk_list_store_clear (credentialStore);
+    gtk_list_store_append (credentialStore, &iter);
+
+    /* This is the default, undeletable credential */
+    gchar * authentication_name = g_hash_table_lookup (account->properties, ACCOUNT_AUTHENTICATION_USERNAME);
+    gchar * realm = g_hash_table_lookup (account->properties, ACCOUNT_REALM);
+
+    if (realm == NULL || (g_strcmp0 (realm, "") == 0)) {
+        realm = g_strdup ("*");
+    }
+
+    if ( (authentication_name == NULL) || (g_strcmp0 (authentication_name, "") == 0)) {
+        gtk_list_store_set (credentialStore, &iter,
+                            COLUMN_CREDENTIAL_REALM, realm,
+                            COLUMN_CREDENTIAL_USERNAME, gtk_entry_get_text (GTK_ENTRY (entryUsername)),
+                            COLUMN_CREDENTIAL_PASSWORD, gtk_entry_get_text (GTK_ENTRY (entryPassword)),
+                            COLUMN_CREDENTIAL_DATA, account,
+                            -1);
+    } else {
+        gtk_list_store_set (credentialStore, &iter,
+                            COLUMN_CREDENTIAL_REALM, g_hash_table_lookup (account->properties, ACCOUNT_REALM),
+                            COLUMN_CREDENTIAL_USERNAME, g_hash_table_lookup (account->properties, ACCOUNT_AUTHENTICATION_USERNAME),
+                            // COLUMN_CREDENTIAL_PASSWORD, gtk_entry_get_text(GTK_ENTRY(entryPassword)),
+                            COLUMN_CREDENTIAL_PASSWORD, PW_HIDDEN,
+                            COLUMN_CREDENTIAL_DATA, account,
+                            -1);
+        g_signal_handlers_disconnect_by_func (G_OBJECT (entryUsername), G_CALLBACK (update_credential_cb), NULL);
+    }
+
+    if (account->credential_information == NULL) {
+        DEBUG ("No credential defined");
+        return;
+    }
+
+    unsigned int i;
+
+    for (i = 0; i < account->credential_information->len; i++) {
+        GHashTable * element = g_ptr_array_index (account->credential_information, i);
+        gtk_list_store_append (credentialStore, &iter);
+        gtk_list_store_set (credentialStore, &iter,
+                            COLUMN_CREDENTIAL_REALM, g_hash_table_lookup (element, ACCOUNT_REALM),
+                            COLUMN_CREDENTIAL_USERNAME, g_hash_table_lookup (element, ACCOUNT_USERNAME),
+                            COLUMN_CREDENTIAL_PASSWORD, g_hash_table_lookup (element, ACCOUNT_PASSWORD),
+                            COLUMN_CREDENTIAL_DATA, element, // Pointer
+                            -1);
+    }
 }
 
-static select_credential_cb(GtkTreeSelection *selection, GtkTreeModel *model)
+static select_credential_cb (GtkTreeSelection *selection, GtkTreeModel *model)
 {
-	GtkTreeIter iter;
-	GtkTreePath *path;
-	if(gtk_tree_selection_get_selected (selection, NULL, &iter)) {
-		path = gtk_tree_model_get_path (model, &iter);
-		if(gtk_tree_path_get_indices (path)[0] == 0) {
-			gtk_widget_set_sensitive(GTK_WIDGET(deleteCredButton), FALSE);
-		} else {
-			gtk_widget_set_sensitive(GTK_WIDGET(deleteCredButton), TRUE);
-		}
-	}
+    GtkTreeIter iter;
+    GtkTreePath *path;
+
+    if (gtk_tree_selection_get_selected (selection, NULL, &iter)) {
+        path = gtk_tree_model_get_path (model, &iter);
+
+        if (gtk_tree_path_get_indices (path) [0] == 0) {
+            gtk_widget_set_sensitive (GTK_WIDGET (deleteCredButton), FALSE);
+        } else {
+            gtk_widget_set_sensitive (GTK_WIDGET (deleteCredButton), TRUE);
+        }
+    }
 }
 
 static void add_credential_cb (GtkWidget *button, gpointer data)
 {
-	GtkTreeIter iter;
-	GtkTreeModel *model = (GtkTreeModel *)data;
-
-	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
-	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
-			COLUMN_CREDENTIAL_REALM, "*",
-			COLUMN_CREDENTIAL_USERNAME, _("Authentication"),
-			COLUMN_CREDENTIAL_PASSWORD, _("Secret"),
-			-1);
+    GtkTreeIter iter;
+    GtkTreeModel *model = (GtkTreeModel *) data;
+
+    gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+    gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+                        COLUMN_CREDENTIAL_REALM, "*",
+                        COLUMN_CREDENTIAL_USERNAME, _ ("Authentication"),
+                        COLUMN_CREDENTIAL_PASSWORD, _ ("Secret"),
+                        -1);
 }
 
-static void delete_credential_cb(GtkWidget *button, gpointer data)
+static void delete_credential_cb (GtkWidget *button, gpointer data)
 {
-	GtkTreeIter iter;
-	GtkTreeView *treeview = (GtkTreeView *)data;
-	GtkTreeModel *model = gtk_tree_view_get_model (treeview);
-	GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview);
+    GtkTreeIter iter;
+    GtkTreeView *treeview = (GtkTreeView *) data;
+    GtkTreeModel *model = gtk_tree_view_get_model (treeview);
+    GtkTreeSelection *selection = gtk_tree_view_get_selection (treeview);
 
-	if (gtk_tree_selection_get_selected (selection, NULL, &iter))
-	{
-		GtkTreePath *path;
-		path = gtk_tree_model_get_path (model, &iter);
-		gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
+    if (gtk_tree_selection_get_selected (selection, NULL, &iter)) {
+        GtkTreePath *path;
+        path = gtk_tree_model_get_path (model, &iter);
+        gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
 
-		gtk_tree_path_free (path);
-	}
+        gtk_tree_path_free (path);
+    }
 
 }
 
-static void cell_edited_cb(GtkCellRendererText *renderer, gchar *path_desc, gchar *text, gpointer data)
+static void cell_edited_cb (GtkCellRendererText *renderer, gchar *path_desc, gchar *text, gpointer data)
 {
-	GtkTreeModel *model = (GtkTreeModel *)data;
-	GtkTreePath *path = gtk_tree_path_new_from_string (path_desc);
-	GtkTreeIter iter;
+    GtkTreeModel *model = (GtkTreeModel *) data;
+    GtkTreePath *path = gtk_tree_path_new_from_string (path_desc);
+    GtkTreeIter iter;
 
-	gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (renderer), "column"));
-	DEBUG("path desc in cell_edited_cb: %s\n", text);
+    gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (renderer), "column"));
+    DEBUG ("path desc in cell_edited_cb: %s\n", text);
 
-	if(g_strcasecmp(path_desc, "0") == 0) {
-		if(g_strcasecmp(text, gtk_entry_get_text (GTK_ENTRY(entryUsername))) != 0) {
-			g_signal_handlers_disconnect_by_func (G_OBJECT(entryUsername), G_CALLBACK(update_credential_cb), NULL);
-		}
+    if (g_strcasecmp (path_desc, "0") == 0) {
+        if (g_strcasecmp (text, gtk_entry_get_text (GTK_ENTRY (entryUsername))) != 0) {
+            g_signal_handlers_disconnect_by_func (G_OBJECT (entryUsername), G_CALLBACK (update_credential_cb), NULL);
+        }
 
-		if (column == COLUMN_CREDENTIAL_PASSWORD) { 
-			gtk_entry_set_text (GTK_ENTRY (entryPassword), text);
-			text = PW_HIDDEN;	
-		}
-	}  
+        if (column == COLUMN_CREDENTIAL_PASSWORD) {
+            gtk_entry_set_text (GTK_ENTRY (entryPassword), text);
+            text = PW_HIDDEN;
+        }
+    }
 
-	gtk_tree_model_get_iter (model, &iter, path);
-	gtk_list_store_set (GTK_LIST_STORE (model), &iter, column, text, -1);
-	gtk_tree_path_free (path);
+    gtk_tree_model_get_iter (model, &iter, path);
+    gtk_list_store_set (GTK_LIST_STORE (model), &iter, column, text, -1);
+    gtk_tree_path_free (path);
 
 }
 
-static void editing_started_cb (GtkCellRenderer *cell, GtkCellEditable * editable, const gchar * path, gpointer data) {
+static void editing_started_cb (GtkCellRenderer *cell, GtkCellEditable * editable, const gchar * path, gpointer data)
+{
 
-	DEBUG("Editing started");
-	DEBUG("path desc in editing_started_cb: %s\n", path);
+    DEBUG ("Editing started");
+    DEBUG ("path desc in editing_started_cb: %s\n", path);
 
-	// If we are dealing the first row
-	if (g_strcasecmp (path, "0") == 0)
-	{
-		gtk_entry_set_text (GTK_ENTRY (editable), gtk_entry_get_text (GTK_ENTRY (entryPassword)));
-	}
+    // If we are dealing the first row
+    if (g_strcasecmp (path, "0") == 0) {
+        gtk_entry_set_text (GTK_ENTRY (editable), gtk_entry_get_text (GTK_ENTRY (entryPassword)));
+    }
 }
 
-static void show_advanced_zrtp_options_cb(GtkWidget *widget UNUSED, gpointer data)
+static void show_advanced_zrtp_options_cb (GtkWidget *widget UNUSED, gpointer data)
 {
 
-    DEBUG("Advanced options for SRTP");
-    if (g_strcasecmp(gtk_combo_box_get_active_text(GTK_COMBO_BOX(keyExchangeCombo)), (gchar *) "ZRTP") == 0) {
-        show_advanced_zrtp_options((GHashTable *) data);
-    }
-    else {
-        show_advanced_sdes_options((GHashTable *) data);
+    DEBUG ("Advanced options for SRTP");
+
+    if (g_strcasecmp (gtk_combo_box_get_active_text (GTK_COMBO_BOX (keyExchangeCombo)), (gchar *) "ZRTP") == 0) {
+        show_advanced_zrtp_options ( (GHashTable *) data);
+    } else {
+        show_advanced_sdes_options ( (GHashTable *) data);
     }
 }
 
 
-static void show_advanced_tls_options_cb(GtkWidget *widget UNUSED, gpointer data)
+static void show_advanced_tls_options_cb (GtkWidget *widget UNUSED, gpointer data)
 {
-	DEBUG("Advanced options for TLS");
-	show_advanced_tls_options((GHashTable *) data);
+    DEBUG ("Advanced options for TLS");
+    show_advanced_tls_options ( (GHashTable *) data);
 }
 
-static void key_exchange_changed_cb(GtkWidget *widget, gpointer data)
+static void key_exchange_changed_cb (GtkWidget *widget, gpointer data)
 {
 
-    DEBUG("Key exchange changed %s", gtk_combo_box_get_active_text(GTK_COMBO_BOX(keyExchangeCombo)));
+    DEBUG ("Key exchange changed %s", gtk_combo_box_get_active_text (GTK_COMBO_BOX (keyExchangeCombo)));
 
-    int isSdes = g_strcasecmp(gtk_combo_box_get_active_text(GTK_COMBO_BOX(keyExchangeCombo)), (gchar *) "SDES");
-    int isZrtp = g_strcasecmp(gtk_combo_box_get_active_text(GTK_COMBO_BOX(keyExchangeCombo)), (gchar *) "ZRTP");
+    int isSdes = g_strcasecmp (gtk_combo_box_get_active_text (GTK_COMBO_BOX (keyExchangeCombo)), (gchar *) "SDES");
+    int isZrtp = g_strcasecmp (gtk_combo_box_get_active_text (GTK_COMBO_BOX (keyExchangeCombo)), (gchar *) "ZRTP");
 
-    if ((isSdes == 0) || (isZrtp == 0)) {
-        gtk_widget_set_sensitive(GTK_WIDGET(advancedZrtpButton), TRUE);
+    if ( (isSdes == 0) || (isZrtp == 0)) {
+        gtk_widget_set_sensitive (GTK_WIDGET (advancedZrtpButton), TRUE);
     } else {
-        gtk_widget_set_sensitive(GTK_WIDGET(advancedZrtpButton), FALSE);
-        
+        gtk_widget_set_sensitive (GTK_WIDGET (advancedZrtpButton), FALSE);
+
     }
 }
 
 
-static void use_sip_tls_cb(GtkWidget *widget, gpointer data)
+static void use_sip_tls_cb (GtkWidget *widget, gpointer data)
 {
 
-	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) {
-		DEBUG("Using sips");
-		gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE);
-		// Uncheck stun
-		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(useStunCheckBox), FALSE);
-		gtk_widget_set_sensitive(GTK_WIDGET(useStunCheckBox), FALSE);
-		gtk_widget_set_sensitive(GTK_WIDGET(sameAsLocalRadioButton), TRUE);
-		gtk_widget_set_sensitive(GTK_WIDGET(publishedAddrRadioButton), TRUE);
-		gtk_widget_hide (stunServerLabel);
-		gtk_widget_hide (stunServerEntry);
-
-
-
-		if(!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sameAsLocalRadioButton))) {
-			gtk_widget_show(publishedAddressEntry);
-			gtk_widget_show(publishedPortSpinBox);
-			gtk_widget_show(publishedAddressLabel);
-			gtk_widget_show(publishedPortLabel);
-		}
-
-	} else {
-		gtk_widget_set_sensitive(GTK_WIDGET(data), FALSE);
-		gtk_widget_set_sensitive(GTK_WIDGET(useStunCheckBox), TRUE);
-
-		if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(useStunCheckBox))) {
-			gtk_widget_set_sensitive(GTK_WIDGET(sameAsLocalRadioButton), FALSE);
-			gtk_widget_set_sensitive(GTK_WIDGET(publishedAddrRadioButton), FALSE);
-			gtk_widget_show(stunServerLabel);
-			gtk_widget_show(stunServerEntry);
-			gtk_widget_hide(publishedAddressEntry);
-			gtk_widget_hide(publishedPortSpinBox);
-			gtk_widget_hide(publishedAddressLabel);
-			gtk_widget_hide(publishedPortLabel);
-		}
-		else {
-			gtk_widget_set_sensitive(GTK_WIDGET(sameAsLocalRadioButton), TRUE);
-			gtk_widget_set_sensitive(GTK_WIDGET(publishedAddrRadioButton), TRUE);
-			gtk_widget_hide(stunServerLabel);
-			gtk_widget_hide(stunServerEntry);
-		}
-
-	}   
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
+        DEBUG ("Using sips");
+        gtk_widget_set_sensitive (GTK_WIDGET (data), TRUE);
+        // Uncheck stun
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (useStunCheckBox), FALSE);
+        gtk_widget_set_sensitive (GTK_WIDGET (useStunCheckBox), FALSE);
+        gtk_widget_set_sensitive (GTK_WIDGET (sameAsLocalRadioButton), TRUE);
+        gtk_widget_set_sensitive (GTK_WIDGET (publishedAddrRadioButton), TRUE);
+        gtk_widget_hide (stunServerLabel);
+        gtk_widget_hide (stunServerEntry);
+
+
+
+        if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton))) {
+            gtk_widget_show (publishedAddressEntry);
+            gtk_widget_show (publishedPortSpinBox);
+            gtk_widget_show (publishedAddressLabel);
+            gtk_widget_show (publishedPortLabel);
+        }
+
+    } else {
+        gtk_widget_set_sensitive (GTK_WIDGET (data), FALSE);
+        gtk_widget_set_sensitive (GTK_WIDGET (useStunCheckBox), TRUE);
+
+        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (useStunCheckBox))) {
+            gtk_widget_set_sensitive (GTK_WIDGET (sameAsLocalRadioButton), FALSE);
+            gtk_widget_set_sensitive (GTK_WIDGET (publishedAddrRadioButton), FALSE);
+            gtk_widget_show (stunServerLabel);
+            gtk_widget_show (stunServerEntry);
+            gtk_widget_hide (publishedAddressEntry);
+            gtk_widget_hide (publishedPortSpinBox);
+            gtk_widget_hide (publishedAddressLabel);
+            gtk_widget_hide (publishedPortLabel);
+        } else {
+            gtk_widget_set_sensitive (GTK_WIDGET (sameAsLocalRadioButton), TRUE);
+            gtk_widget_set_sensitive (GTK_WIDGET (publishedAddrRadioButton), TRUE);
+            gtk_widget_hide (stunServerLabel);
+            gtk_widget_hide (stunServerEntry);
+        }
+
+    }
 }
 
-static local_interface_changed_cb(GtkWidget * widget, gpointer data UNUSED) {
+static local_interface_changed_cb (GtkWidget * widget, gpointer data UNUSED)
+{
 
-	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(sameAsLocalRadioButton))) {
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton))) {
 
-		gchar *local_iface_name;
-		gchar *local_iface_addr;
-		local_iface_addr = g_malloc(36);
+        gchar *local_iface_name;
+        gchar *local_iface_addr;
+        local_iface_addr = g_malloc (36);
 
-		local_iface_name = (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (localAddressCombo));
-		// sflphone_get_interface_addr_from_name((char *)local_interface);
-		sflphone_get_interface_addr_from_name(local_iface_name, &local_iface_addr, 36);
+        local_iface_name = (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (localAddressCombo));
+        // sflphone_get_interface_addr_from_name((char *)local_interface);
+        sflphone_get_interface_addr_from_name (local_iface_name, &local_iface_addr, 36);
 
-		gtk_entry_set_text(GTK_ENTRY(localAddressEntry), local_iface_addr);
-		gtk_entry_set_text (GTK_ENTRY(publishedAddressEntry), local_iface_addr);
+        gtk_entry_set_text (GTK_ENTRY (localAddressEntry), local_iface_addr);
+        gtk_entry_set_text (GTK_ENTRY (publishedAddressEntry), local_iface_addr);
 
-		// gchar * local_port = (gchar *) gtk_entry_get_text(GTK_ENTRY(localPortSpinBox));
-		// gtk_spin_button_set_value(GTK_SPIN_BUTTON(publishedPortSpinBox), g_ascii_strtod(local_port, NULL));
-		g_free(local_iface_addr);
-	}
+        // gchar * local_port = (gchar *) gtk_entry_get_text(GTK_ENTRY(localPortSpinBox));
+        // gtk_spin_button_set_value(GTK_SPIN_BUTTON(publishedPortSpinBox), g_ascii_strtod(local_port, NULL));
+        g_free (local_iface_addr);
+    }
 
 }
 
-static set_published_addr_manually_cb(GtkWidget * widget, gpointer data UNUSED)
+static set_published_addr_manually_cb (GtkWidget * widget, gpointer data UNUSED)
 {
 
-	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) {
-		DEBUG("Config: Showing manual publishing options");    
-		gtk_widget_show(publishedPortLabel);            
-		gtk_widget_show(publishedPortSpinBox);
-		gtk_widget_show(publishedAddressLabel);                	
-		gtk_widget_show(publishedAddressEntry);
-	} else {
-		DEBUG("Config: Hiding manual publishing options");   
-		gtk_widget_hide(publishedPortLabel);            
-		gtk_widget_hide(publishedPortSpinBox);
-		gtk_widget_hide(publishedAddressLabel);                	
-		gtk_widget_hide(publishedAddressEntry);
-	}
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
+        DEBUG ("Config: Showing manual publishing options");
+        gtk_widget_show (publishedPortLabel);
+        gtk_widget_show (publishedPortSpinBox);
+        gtk_widget_show (publishedAddressLabel);
+        gtk_widget_show (publishedAddressEntry);
+    } else {
+        DEBUG ("Config: Hiding manual publishing options");
+        gtk_widget_hide (publishedPortLabel);
+        gtk_widget_hide (publishedPortSpinBox);
+        gtk_widget_hide (publishedAddressLabel);
+        gtk_widget_hide (publishedAddressEntry);
+    }
 }
 
-static use_stun_cb(GtkWidget *widget, gpointer data UNUSED)
+static use_stun_cb (GtkWidget *widget, gpointer data UNUSED)
 {
-	gchar *local_interface;
-	gchar *local_address;
-
-	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
-
-		DEBUG("Config: Showing stun options, hiding Local/Published info");
-		gtk_widget_show (stunServerLabel);
-		gtk_widget_show (stunServerEntry);
-		gtk_widget_set_sensitive (sameAsLocalRadioButton, FALSE);
-		gtk_widget_set_sensitive (publishedAddrRadioButton, FALSE);
-
-		gtk_widget_hide (publishedAddressLabel);
-		gtk_widget_hide (publishedPortLabel);
-		gtk_widget_hide (publishedAddressEntry);
-		gtk_widget_hide (publishedPortSpinBox);
-
-	} else {
-
-	        DEBUG("Config: hiding stun options, showing Local/Published info");
-
-		gtk_widget_hide (stunServerLabel);
-		gtk_widget_hide (stunServerEntry);
-		gtk_widget_set_sensitive (sameAsLocalRadioButton, TRUE);
-		gtk_widget_set_sensitive (publishedAddrRadioButton, TRUE);
-
-		if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (publishedAddrRadioButton))) {
-			gtk_widget_show (publishedAddressLabel);
-			gtk_widget_show (publishedPortLabel);
-			gtk_widget_show (publishedAddressEntry);
-			gtk_widget_show (publishedPortSpinBox);
-		}
-	}
+    gchar *local_interface;
+    gchar *local_address;
+
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
+
+        DEBUG ("Config: Showing stun options, hiding Local/Published info");
+        gtk_widget_show (stunServerLabel);
+        gtk_widget_show (stunServerEntry);
+        gtk_widget_set_sensitive (sameAsLocalRadioButton, FALSE);
+        gtk_widget_set_sensitive (publishedAddrRadioButton, FALSE);
+
+        gtk_widget_hide (publishedAddressLabel);
+        gtk_widget_hide (publishedPortLabel);
+        gtk_widget_hide (publishedAddressEntry);
+        gtk_widget_hide (publishedPortSpinBox);
+
+    } else {
+
+        DEBUG ("Config: hiding stun options, showing Local/Published info");
+
+        gtk_widget_hide (stunServerLabel);
+        gtk_widget_hide (stunServerEntry);
+        gtk_widget_set_sensitive (sameAsLocalRadioButton, TRUE);
+        gtk_widget_set_sensitive (publishedAddrRadioButton, TRUE);
+
+        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (publishedAddrRadioButton))) {
+            gtk_widget_show (publishedAddressLabel);
+            gtk_widget_show (publishedPortLabel);
+            gtk_widget_show (publishedAddressEntry);
+            gtk_widget_show (publishedPortSpinBox);
+        }
+    }
 }
 
 
-static same_as_local_cb(GtkWidget * widget, gpointer data UNUSED)
+static same_as_local_cb (GtkWidget * widget, gpointer data UNUSED)
 {
 
-	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) {
-		DEBUG("Same as local");
-		gchar * local_interface;
-		gchar * local_address;
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
+        DEBUG ("Same as local");
+        gchar * local_interface;
+        gchar * local_address;
 
-		local_interface = (gchar *) gtk_combo_box_get_active_text(GTK_COMBO_BOX(localAddressCombo));
-		// sflphone_get_interface_addr_from_name((char *)local_interface);
-		local_address = dbus_get_address_from_interface_name(local_interface);
+        local_interface = (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (localAddressCombo));
+        // sflphone_get_interface_addr_from_name((char *)local_interface);
+        local_address = dbus_get_address_from_interface_name (local_interface);
 
-		gtk_entry_set_text(GTK_ENTRY(publishedAddressEntry), local_address);
+        gtk_entry_set_text (GTK_ENTRY (publishedAddressEntry), local_address);
 
-		gchar * local_port = (gchar *) gtk_entry_get_text(GTK_ENTRY(localPortSpinBox));
-		gtk_spin_button_set_value(GTK_SPIN_BUTTON(publishedPortSpinBox), g_ascii_strtod(local_port, NULL));
-	} 
+        gchar * local_port = (gchar *) gtk_entry_get_text (GTK_ENTRY (localPortSpinBox));
+        gtk_spin_button_set_value (GTK_SPIN_BUTTON (publishedPortSpinBox), g_ascii_strtod (local_port, NULL));
+    }
 
 }
 
 
 
-GtkWidget* create_credential_widget (account_t **a) {
-
-	GtkWidget *frame, *table, *scrolledWindowCredential, *addButton;
-	GtkCellRenderer * renderer;
-	GtkTreeViewColumn * treeViewColumn;
-	GtkTreeSelection * treeSelection;
-
-	/* Credentials tree view */
-	gnome_main_section_new_with_table (_("Credential"), &frame, &table, 1, 1);
-	gtk_container_set_border_width (GTK_CONTAINER(table), 10);
-	gtk_table_set_row_spacings(GTK_TABLE(table), 10);
-
-	scrolledWindowCredential = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindowCredential), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledWindowCredential), GTK_SHADOW_IN);
-	gtk_table_attach_defaults (GTK_TABLE (table), scrolledWindowCredential, 0, 1, 0, 1);
-
-	credentialStore = gtk_list_store_new(COLUMN_CREDENTIAL_COUNT,
-			G_TYPE_STRING,  // Realm
-			G_TYPE_STRING,  // Username
-			G_TYPE_STRING,  // Password
-			G_TYPE_POINTER  // Pointer to the Objectc
-			);
-
-	treeViewCredential = gtk_tree_view_new_with_model(GTK_TREE_MODEL(credentialStore));
-	treeSelection = gtk_tree_view_get_selection(GTK_TREE_VIEW (treeViewCredential));
-	g_signal_connect(G_OBJECT (treeSelection), "changed", G_CALLBACK (select_credential_cb), credentialStore);
-
-	renderer = gtk_cell_renderer_text_new();
-	g_object_set (renderer, "editable", TRUE, "editable-set", TRUE, NULL);
-	g_signal_connect(G_OBJECT (renderer), "edited", G_CALLBACK(cell_edited_cb), credentialStore);
-	g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_REALM));
-	treeViewColumn = gtk_tree_view_column_new_with_attributes ("Realm",
-			renderer,
-			"markup", COLUMN_CREDENTIAL_REALM,
-			NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(treeViewCredential), treeViewColumn);
-
-	renderer = gtk_cell_renderer_text_new();
-	g_object_set (renderer, "editable", TRUE, "editable-set", TRUE, NULL);
-	g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (cell_edited_cb), credentialStore);
-	g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_USERNAME));
-	treeViewColumn = gtk_tree_view_column_new_with_attributes (_("Authentication name"),
-			renderer,
-			"markup", COLUMN_CREDENTIAL_USERNAME,
-			NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(treeViewCredential), treeViewColumn);
-
-	renderer = gtk_cell_renderer_text_new();
-	g_object_set (renderer, "editable", TRUE, "editable-set", TRUE, NULL);
-	g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (cell_edited_cb), credentialStore);
-	g_signal_connect (renderer, "editing-started", G_CALLBACK (editing_started_cb), NULL);
-	g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_PASSWORD));
-	treeViewColumn = gtk_tree_view_column_new_with_attributes (_("Password"),
-			renderer,
-			"markup", COLUMN_CREDENTIAL_PASSWORD,
-			NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(treeViewCredential), treeViewColumn);
-
-	gtk_container_add(GTK_CONTAINER(scrolledWindowCredential), treeViewCredential);
-
-	fill_treeview_with_credential(credentialStore, *a);
-
-	/* Credential Buttons */    
-	hbox = gtk_hbox_new(FALSE, 10);
-	gtk_table_attach_defaults(GTK_TABLE(table), hbox, 0, 3, 1, 2);
-
-	addButton = gtk_button_new_from_stock (GTK_STOCK_ADD);
-	g_signal_connect (addButton, "clicked", G_CALLBACK (add_credential_cb), credentialStore);
-	gtk_box_pack_start(GTK_BOX(hbox), addButton, FALSE, FALSE, 0);
-
-	deleteCredButton = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
-	g_signal_connect (deleteCredButton, "clicked", G_CALLBACK (delete_credential_cb), treeViewCredential);
-	gtk_box_pack_start(GTK_BOX(hbox), deleteCredButton, FALSE, FALSE, 0);
-
-	/* Dynamically resize the window to fit the scrolled window */
-	GtkRequisition requisitionTable;
-	GtkRequisition requisitionTreeView;
-	gtk_widget_size_request (GTK_WIDGET(treeViewCredential), &requisitionTreeView);
-	gtk_widget_size_request (GTK_WIDGET(table), &requisitionTable);
-	gtk_widget_set_size_request (GTK_WIDGET(scrolledWindowCredential), 400, 120);
-	// same_as_local_cb (sameAsLocalRadioButton, NULL);
-	// set_published_addr_manually_cb (publishedAddrRadioButton, NULL);
-
-	return frame;
+GtkWidget* create_credential_widget (account_t **a)
+{
+
+    GtkWidget *frame, *table, *scrolledWindowCredential, *addButton;
+    GtkCellRenderer * renderer;
+    GtkTreeViewColumn * treeViewColumn;
+    GtkTreeSelection * treeSelection;
+
+    /* Credentials tree view */
+    gnome_main_section_new_with_table (_ ("Credential"), &frame, &table, 1, 1);
+    gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 10);
+
+    scrolledWindowCredential = gtk_scrolled_window_new (NULL, NULL);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindowCredential), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+    gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledWindowCredential), GTK_SHADOW_IN);
+    gtk_table_attach_defaults (GTK_TABLE (table), scrolledWindowCredential, 0, 1, 0, 1);
+
+    credentialStore = gtk_list_store_new (COLUMN_CREDENTIAL_COUNT,
+                                          G_TYPE_STRING,  // Realm
+                                          G_TYPE_STRING,  // Username
+                                          G_TYPE_STRING,  // Password
+                                          G_TYPE_POINTER  // Pointer to the Objectc
+                                         );
+
+    treeViewCredential = gtk_tree_view_new_with_model (GTK_TREE_MODEL (credentialStore));
+    treeSelection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeViewCredential));
+    g_signal_connect (G_OBJECT (treeSelection), "changed", G_CALLBACK (select_credential_cb), credentialStore);
+
+    renderer = gtk_cell_renderer_text_new();
+    g_object_set (renderer, "editable", TRUE, "editable-set", TRUE, NULL);
+    g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (cell_edited_cb), credentialStore);
+    g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_REALM));
+    treeViewColumn = gtk_tree_view_column_new_with_attributes ("Realm",
+                     renderer,
+                     "markup", COLUMN_CREDENTIAL_REALM,
+                     NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (treeViewCredential), treeViewColumn);
+
+    renderer = gtk_cell_renderer_text_new();
+    g_object_set (renderer, "editable", TRUE, "editable-set", TRUE, NULL);
+    g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (cell_edited_cb), credentialStore);
+    g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_USERNAME));
+    treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Authentication name"),
+                     renderer,
+                     "markup", COLUMN_CREDENTIAL_USERNAME,
+                     NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (treeViewCredential), treeViewColumn);
+
+    renderer = gtk_cell_renderer_text_new();
+    g_object_set (renderer, "editable", TRUE, "editable-set", TRUE, NULL);
+    g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (cell_edited_cb), credentialStore);
+    g_signal_connect (renderer, "editing-started", G_CALLBACK (editing_started_cb), NULL);
+    g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_PASSWORD));
+    treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Password"),
+                     renderer,
+                     "markup", COLUMN_CREDENTIAL_PASSWORD,
+                     NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (treeViewCredential), treeViewColumn);
+
+    gtk_container_add (GTK_CONTAINER (scrolledWindowCredential), treeViewCredential);
+
+    fill_treeview_with_credential (credentialStore, *a);
+
+    /* Credential Buttons */
+    hbox = gtk_hbox_new (FALSE, 10);
+    gtk_table_attach_defaults (GTK_TABLE (table), hbox, 0, 3, 1, 2);
+
+    addButton = gtk_button_new_from_stock (GTK_STOCK_ADD);
+    g_signal_connect (addButton, "clicked", G_CALLBACK (add_credential_cb), credentialStore);
+    gtk_box_pack_start (GTK_BOX (hbox), addButton, FALSE, FALSE, 0);
+
+    deleteCredButton = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+    g_signal_connect (deleteCredButton, "clicked", G_CALLBACK (delete_credential_cb), treeViewCredential);
+    gtk_box_pack_start (GTK_BOX (hbox), deleteCredButton, FALSE, FALSE, 0);
+
+    /* Dynamically resize the window to fit the scrolled window */
+    GtkRequisition requisitionTable;
+    GtkRequisition requisitionTreeView;
+    gtk_widget_size_request (GTK_WIDGET (treeViewCredential), &requisitionTreeView);
+    gtk_widget_size_request (GTK_WIDGET (table), &requisitionTable);
+    gtk_widget_set_size_request (GTK_WIDGET (scrolledWindowCredential), 400, 120);
+    // same_as_local_cb (sameAsLocalRadioButton, NULL);
+    // set_published_addr_manually_cb (publishedAddrRadioButton, NULL);
+
+    return frame;
 }
 
 
-GtkWidget* create_security_widget (account_t **a) {
-
-	GtkWidget *frame, *table, *sipTlsAdvancedButton, *label;
-	gchar *curSRTPEnabled = NULL, *curKeyExchange = NULL, *curTLSEnabled = NULL;
-
-	// Load from SIP/IAX/Unknown ?
-	if((*a)) {	
-		curKeyExchange = g_hash_table_lookup ((*a)->properties, ACCOUNT_KEY_EXCHANGE);
-		if (curKeyExchange == NULL) {
-			curKeyExchange = "none";
-		}		
-
-		curSRTPEnabled = g_hash_table_lookup ((*a)->properties, ACCOUNT_SRTP_ENABLED);
-		if (curSRTPEnabled == NULL) {
-			curSRTPEnabled = "false";
-		}
-
-		curTLSEnabled = g_hash_table_lookup ((*a)->properties, TLS_ENABLE);
-		if (curTLSEnabled == NULL) {
-			curTLSEnabled = "false";
-		}
-	}
-
-	gnome_main_section_new_with_table (_("Security"), &frame, &table, 2, 3);
-	gtk_container_set_border_width (GTK_CONTAINER(table), 10);
-	gtk_table_set_row_spacings (GTK_TABLE(table), 10);
-	gtk_table_set_col_spacings (GTK_TABLE(table), 10);
-
-	/* TLS subsection */
-	sipTlsAdvancedButton = gtk_button_new_from_stock (GTK_STOCK_EDIT);
-	gtk_table_attach_defaults (GTK_TABLE (table), sipTlsAdvancedButton, 2, 3, 0, 1);
-	gtk_widget_set_sensitive (GTK_WIDGET (sipTlsAdvancedButton), FALSE);    
-	g_signal_connect (G_OBJECT (sipTlsAdvancedButton), "clicked", G_CALLBACK (show_advanced_tls_options_cb), (*a)->properties);
-
-	useSipTlsCheckBox = gtk_check_button_new_with_mnemonic(_("Use TLS transport (sips)"));
-	g_signal_connect (useSipTlsCheckBox, "toggled", G_CALLBACK(use_sip_tls_cb), sipTlsAdvancedButton);
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(useSipTlsCheckBox), (g_strcmp0(curTLSEnabled, "true") == 0) ? TRUE:FALSE);
-	gtk_table_attach_defaults(GTK_TABLE(table), useSipTlsCheckBox, 0, 2, 0, 1);
-
-	/* ZRTP subsection */
-	label = gtk_label_new_with_mnemonic (_("SRTP key exchange"));
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-	keyExchangeCombo = gtk_combo_box_new_text();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), keyExchangeCombo);
-	gtk_combo_box_append_text(GTK_COMBO_BOX(keyExchangeCombo), "ZRTP");
-	gtk_combo_box_append_text(GTK_COMBO_BOX(keyExchangeCombo), "SDES");
-	gtk_combo_box_append_text(GTK_COMBO_BOX(keyExchangeCombo), _("Disabled"));      
-
-	advancedZrtpButton = gtk_button_new_from_stock(GTK_STOCK_PREFERENCES);
-	g_signal_connect(G_OBJECT(advancedZrtpButton), "clicked", G_CALLBACK(show_advanced_zrtp_options_cb), (*a)->properties);
-
-	if (g_strcmp0(curSRTPEnabled, "false") == 0)
-	{
-		gtk_combo_box_set_active(GTK_COMBO_BOX(keyExchangeCombo), 2);
-		gtk_widget_set_sensitive(GTK_WIDGET(advancedZrtpButton), FALSE);
-	} else {
-		if (strcmp(curKeyExchange, ZRTP) == 0) {
-			gtk_combo_box_set_active(GTK_COMBO_BOX(keyExchangeCombo),0);
-		} 
-		else if (strcmp(curKeyExchange, SDES) == 0) {
-			gtk_combo_box_set_active(GTK_COMBO_BOX(keyExchangeCombo),1);
-		}
-		else {
-			gtk_combo_box_set_active(GTK_COMBO_BOX(keyExchangeCombo), 2);
-			gtk_widget_set_sensitive(GTK_WIDGET(advancedZrtpButton), FALSE);
-		}
-	}
-
-	g_signal_connect (G_OBJECT (GTK_COMBO_BOX(keyExchangeCombo)), "changed", G_CALLBACK (key_exchange_changed_cb), *a);
-
-	gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
-	gtk_table_attach_defaults(GTK_TABLE(table), keyExchangeCombo, 1, 2, 1, 2);    
-	gtk_table_attach_defaults(GTK_TABLE(table), advancedZrtpButton, 2, 3, 1, 2);
-
-	gtk_widget_show_all(table);
-
-	return frame;
+GtkWidget* create_security_widget (account_t **a)
+{
+
+    GtkWidget *frame, *table, *sipTlsAdvancedButton, *label;
+    gchar *curSRTPEnabled = NULL, *curKeyExchange = NULL, *curTLSEnabled = NULL;
+
+    // Load from SIP/IAX/Unknown ?
+    if ( (*a)) {
+        curKeyExchange = g_hash_table_lookup ( (*a)->properties, ACCOUNT_KEY_EXCHANGE);
+
+        if (curKeyExchange == NULL) {
+            curKeyExchange = "none";
+        }
+
+        curSRTPEnabled = g_hash_table_lookup ( (*a)->properties, ACCOUNT_SRTP_ENABLED);
+
+        if (curSRTPEnabled == NULL) {
+            curSRTPEnabled = "false";
+        }
+
+        curTLSEnabled = g_hash_table_lookup ( (*a)->properties, TLS_ENABLE);
+
+        if (curTLSEnabled == NULL) {
+            curTLSEnabled = "false";
+        }
+    }
+
+    gnome_main_section_new_with_table (_ ("Security"), &frame, &table, 2, 3);
+    gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 10);
+    gtk_table_set_col_spacings (GTK_TABLE (table), 10);
+
+    /* TLS subsection */
+    sipTlsAdvancedButton = gtk_button_new_from_stock (GTK_STOCK_EDIT);
+    gtk_table_attach_defaults (GTK_TABLE (table), sipTlsAdvancedButton, 2, 3, 0, 1);
+    gtk_widget_set_sensitive (GTK_WIDGET (sipTlsAdvancedButton), FALSE);
+    g_signal_connect (G_OBJECT (sipTlsAdvancedButton), "clicked", G_CALLBACK (show_advanced_tls_options_cb), (*a)->properties);
+
+    useSipTlsCheckBox = gtk_check_button_new_with_mnemonic (_ ("Use TLS transport (sips)"));
+    g_signal_connect (useSipTlsCheckBox, "toggled", G_CALLBACK (use_sip_tls_cb), sipTlsAdvancedButton);
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (useSipTlsCheckBox), (g_strcmp0 (curTLSEnabled, "true") == 0) ? TRUE:FALSE);
+    gtk_table_attach_defaults (GTK_TABLE (table), useSipTlsCheckBox, 0, 2, 0, 1);
+
+    /* ZRTP subsection */
+    label = gtk_label_new_with_mnemonic (_ ("SRTP key exchange"));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    keyExchangeCombo = gtk_combo_box_new_text();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), keyExchangeCombo);
+    gtk_combo_box_append_text (GTK_COMBO_BOX (keyExchangeCombo), "ZRTP");
+    gtk_combo_box_append_text (GTK_COMBO_BOX (keyExchangeCombo), "SDES");
+    gtk_combo_box_append_text (GTK_COMBO_BOX (keyExchangeCombo), _ ("Disabled"));
+
+    advancedZrtpButton = gtk_button_new_from_stock (GTK_STOCK_PREFERENCES);
+    g_signal_connect (G_OBJECT (advancedZrtpButton), "clicked", G_CALLBACK (show_advanced_zrtp_options_cb), (*a)->properties);
+
+    if (g_strcmp0 (curSRTPEnabled, "false") == 0) {
+        gtk_combo_box_set_active (GTK_COMBO_BOX (keyExchangeCombo), 2);
+        gtk_widget_set_sensitive (GTK_WIDGET (advancedZrtpButton), FALSE);
+    } else {
+        if (strcmp (curKeyExchange, ZRTP) == 0) {
+            gtk_combo_box_set_active (GTK_COMBO_BOX (keyExchangeCombo),0);
+        } else if (strcmp (curKeyExchange, SDES) == 0) {
+            gtk_combo_box_set_active (GTK_COMBO_BOX (keyExchangeCombo),1);
+        } else {
+            gtk_combo_box_set_active (GTK_COMBO_BOX (keyExchangeCombo), 2);
+            gtk_widget_set_sensitive (GTK_WIDGET (advancedZrtpButton), FALSE);
+        }
+    }
+
+    g_signal_connect (G_OBJECT (GTK_COMBO_BOX (keyExchangeCombo)), "changed", G_CALLBACK (key_exchange_changed_cb), *a);
+
+    gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2);
+    gtk_table_attach_defaults (GTK_TABLE (table), keyExchangeCombo, 1, 2, 1, 2);
+    gtk_table_attach_defaults (GTK_TABLE (table), advancedZrtpButton, 2, 3, 1, 2);
+
+    gtk_widget_show_all (table);
+
+    return frame;
 }
 
 
 GtkWidget * create_security_tab (account_t **a)
 {
-	GtkWidget * frame;
-	GtkWidget * ret;
-	GtkWidget * hbox;
+    GtkWidget * frame;
+    GtkWidget * ret;
+    GtkWidget * hbox;
 
 
-	ret = gtk_vbox_new(FALSE, 10);
-	gtk_container_set_border_width(GTK_CONTAINER(ret), 10);
+    ret = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
 
-	// Credentials frame
-	frame = create_credential_widget (a);
-	gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+    // Credentials frame
+    frame = create_credential_widget (a);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
 
-	// Security frame
-	frame = create_security_widget (a);
-	gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+    // Security frame
+    frame = create_security_widget (a);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
 
-	gtk_widget_show_all(ret);
+    gtk_widget_show_all (ret);
 
-	return ret;
-	}
+    return ret;
+}
 
-GtkWidget* create_registration_expire (account_t **a) {
+GtkWidget* create_registration_expire (account_t **a)
+{
 
     GtkWidget *table, *frame, *label;
 
     gchar *resolve_once=NULL, *account_expire=NULL;
 
     if (*a) {
-        resolve_once = g_hash_table_lookup ((*a)->properties, ACCOUNT_RESOLVE_ONCE);
-	account_expire = g_hash_table_lookup ((*a)->properties, ACCOUNT_REGISTRATION_EXPIRE);
+        resolve_once = g_hash_table_lookup ( (*a)->properties, ACCOUNT_RESOLVE_ONCE);
+        account_expire = g_hash_table_lookup ( (*a)->properties, ACCOUNT_REGISTRATION_EXPIRE);
     }
 
-    gnome_main_section_new_with_table (_("Registration"), &frame, &table, 2, 3);
-    gtk_container_set_border_width (GTK_CONTAINER(table), 10);
-    gtk_table_set_row_spacings (GTK_TABLE (table), 5);	
-    
-    label = gtk_label_new_with_mnemonic (_("Registration expire"));
+    gnome_main_section_new_with_table (_ ("Registration"), &frame, &table, 2, 3);
+    gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 5);
+
+    label = gtk_label_new_with_mnemonic (_ ("Registration expire"));
     gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1);
     gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
     expireSpinBox = gtk_spin_button_new_with_range (1, 65535, 1);
     gtk_label_set_mnemonic_widget (GTK_LABEL (label), expireSpinBox);
     gtk_spin_button_set_value (GTK_SPIN_BUTTON (expireSpinBox), g_ascii_strtod (account_expire, NULL));
     gtk_table_attach_defaults (GTK_TABLE (table), expireSpinBox, 1, 2, 0, 1);
-	
 
-    entryResolveNameOnlyOnce = gtk_check_button_new_with_mnemonic (_("_Comply with RFC 3263"));
+
+    entryResolveNameOnlyOnce = gtk_check_button_new_with_mnemonic (_ ("_Comply with RFC 3263"));
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (entryResolveNameOnlyOnce),
-				  g_strcasecmp (resolve_once,"false") == 0 ? TRUE: FALSE);
+                                  g_strcasecmp (resolve_once,"false") == 0 ? TRUE: FALSE);
     gtk_table_attach_defaults (GTK_TABLE (table), entryResolveNameOnlyOnce, 0, 2, 1, 2);
-    gtk_widget_set_sensitive (GTK_WIDGET (entryResolveNameOnlyOnce ) , TRUE );
+    gtk_widget_set_sensitive (GTK_WIDGET (entryResolveNameOnlyOnce) , TRUE);
 
     return frame;
 }
 
-GtkWidget* create_network (account_t **a) {
-  
+GtkWidget* create_network (account_t **a)
+{
+
     GtkWidget *table, *frame, *label;
     gchar *local_interface, *local_port;
 
     if (*a) {
-        local_interface = g_hash_table_lookup ((*a)->properties, LOCAL_INTERFACE);
-	local_port = g_hash_table_lookup ((*a)->properties, LOCAL_PORT);
+        local_interface = g_hash_table_lookup ( (*a)->properties, LOCAL_INTERFACE);
+        local_port = g_hash_table_lookup ( (*a)->properties, LOCAL_PORT);
     }
 
-    gnome_main_section_new_with_table (_("Network Interface"), &frame, &table, 2, 3);
-    gtk_container_set_border_width (GTK_CONTAINER(table), 10);
-    gtk_table_set_row_spacings( GTK_TABLE(table), 5);
+    gnome_main_section_new_with_table (_ ("Network Interface"), &frame, &table, 2, 3);
+    gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 5);
 
     /**
-     * Retreive the list of IP interface from the 
+     * Retreive the list of IP interface from the
      * the daemon and build the combo box.
      */
 
-    GtkListStore * ipInterfaceListStore; 
+    GtkListStore * ipInterfaceListStore;
     GtkTreeIter iter;
 
-    ipInterfaceListStore =  gtk_list_store_new( 1, G_TYPE_STRING );
-    label = gtk_label_new_with_mnemonic (_("Local address"));    
-    gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
+    ipInterfaceListStore =  gtk_list_store_new (1, G_TYPE_STRING);
+    label = gtk_label_new_with_mnemonic (_ ("Local address"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 
-    GtkTreeIter current_local_iface_iter = iter;   
+    GtkTreeIter current_local_iface_iter = iter;
     gchar ** iface_list = NULL;
     // iface_list = (gchar**) dbus_get_all_ip_interface();
     iface_list = (gchar**) dbus_get_all_ip_interface_by_name();
     gchar ** iface = NULL;
 
-    // flag to determine if local_address is found 
+    // flag to determine if local_address is found
     gboolean iface_found = FALSE;
 
     gchar *local_iface_addr;
-    gchar *local_iface_name; 
+    gchar *local_iface_name;
+
+    local_iface_addr= g_malloc (36);
 
-    local_iface_addr= g_malloc(36);
-    
     if (iface_list != NULL) {
 
         // fill the iterface combo box
-        for (iface = iface_list; *iface; iface++) {         
-	    DEBUG("Interface %s", *iface);            
-	    gtk_list_store_append(ipInterfaceListStore, &iter );
-	    gtk_list_store_set(ipInterfaceListStore, &iter, 0, *iface, -1 );
-
-	    // set the current local address
-	    if (!iface_found && (g_strcmp0(*iface, local_interface) == 0)) {
-	        DEBUG("Setting active local address combo box");
-		current_local_iface_iter = iter;
-		iface_found = TRUE;
-	  }
-	}
-	    
-	if(!iface_found) {
-	  DEBUG("Did not find local ip address, take fisrt in the list");
-	  gtk_tree_model_get_iter_first(GTK_TREE_MODEL(ipInterfaceListStore), &current_local_iface_iter);
-	}
-	
+        for (iface = iface_list; *iface; iface++) {
+            DEBUG ("Interface %s", *iface);
+            gtk_list_store_append (ipInterfaceListStore, &iter);
+            gtk_list_store_set (ipInterfaceListStore, &iter, 0, *iface, -1);
+
+            // set the current local address
+            if (!iface_found && (g_strcmp0 (*iface, local_interface) == 0)) {
+                DEBUG ("Setting active local address combo box");
+                current_local_iface_iter = iter;
+                iface_found = TRUE;
+            }
+        }
+
+        if (!iface_found) {
+            DEBUG ("Did not find local ip address, take fisrt in the list");
+            gtk_tree_model_get_iter_first (GTK_TREE_MODEL (ipInterfaceListStore), &current_local_iface_iter);
+        }
+
     }
-  
-    
-    localAddressCombo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(ipInterfaceListStore));
+
+
+    localAddressCombo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (ipInterfaceListStore));
     gtk_label_set_mnemonic_widget (GTK_LABEL (label), localAddressCombo);
-    gtk_table_attach ( GTK_TABLE( table ), localAddressCombo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    g_object_unref(G_OBJECT(ipInterfaceListStore));	
+    gtk_table_attach (GTK_TABLE (table), localAddressCombo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    g_object_unref (G_OBJECT (ipInterfaceListStore));
+
 
- 
     GtkCellRenderer * ipInterfaceCellRenderer;
     ipInterfaceCellRenderer = gtk_cell_renderer_text_new();
 
-    gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(localAddressCombo), ipInterfaceCellRenderer, TRUE);
-    gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(localAddressCombo), ipInterfaceCellRenderer, "text", 0, NULL);
-    gtk_combo_box_set_active_iter(GTK_COMBO_BOX(localAddressCombo), &current_local_iface_iter);
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (localAddressCombo), ipInterfaceCellRenderer, TRUE);
+    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (localAddressCombo), ipInterfaceCellRenderer, "text", 0, NULL);
+    gtk_combo_box_set_active_iter (GTK_COMBO_BOX (localAddressCombo), &current_local_iface_iter);
 
 
     // Fill the text entry with the ip address of local interface selected
     localAddressEntry = gtk_entry_new();
     local_iface_name = (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (localAddressCombo));
-    sflphone_get_interface_addr_from_name(local_iface_name, &local_iface_addr, 36);
-    gtk_entry_set_text(GTK_ENTRY(localAddressEntry), local_iface_addr);
-    gtk_widget_set_sensitive(localAddressEntry, FALSE); 
-    gtk_table_attach ( GTK_TABLE( table ), localAddressEntry, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    sflphone_get_interface_addr_from_name (local_iface_name, &local_iface_addr, 36);
+    gtk_entry_set_text (GTK_ENTRY (localAddressEntry), local_iface_addr);
+    gtk_widget_set_sensitive (localAddressEntry, FALSE);
+    gtk_table_attach (GTK_TABLE (table), localAddressEntry, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    g_free (local_iface_addr);
 
-    g_free(local_iface_addr);
-    
     // Local port widget
-    label = gtk_label_new_with_mnemonic (_("Local port"));
-    gtk_table_attach_defaults(GTK_TABLE(table), label, 0, 1, 1, 2);
-    gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-    localPortSpinBox = gtk_spin_button_new_with_range(1, 65535, 1);
+    label = gtk_label_new_with_mnemonic (_ ("Local port"));
+    gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    localPortSpinBox = gtk_spin_button_new_with_range (1, 65535, 1);
     gtk_label_set_mnemonic_widget (GTK_LABEL (label), localPortSpinBox);
-    gtk_spin_button_set_value(GTK_SPIN_BUTTON(localPortSpinBox), g_ascii_strtod(local_port, NULL));
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON (localPortSpinBox), g_ascii_strtod (local_port, NULL));
 
-    gtk_table_attach_defaults(GTK_TABLE(table), localPortSpinBox, 1, 2, 1, 2);
+    gtk_table_attach_defaults (GTK_TABLE (table), localPortSpinBox, 1, 2, 1, 2);
 
     return frame;
 }
 
-GtkWidget* create_published_address (account_t **a) {
-
-	GtkWidget *table, *frame, *label;
-	gchar *use_tls, *published_address, *published_port, *local_address, *stun_enable, *stun_server, *published_sameas_local;
-
-	// Get the user configuration
-	if (*a) {
-
-		use_tls = g_hash_table_lookup ((*a)->properties,  TLS_ENABLE);
-		published_sameas_local = g_hash_table_lookup ((*a)->properties,  PUBLISHED_SAMEAS_LOCAL);
-
-		if (g_strcasecmp (published_sameas_local, "true") == 0) {
-			published_address = dbus_get_address_from_interface_name (g_hash_table_lookup ((*a)->properties, LOCAL_INTERFACE));
-			published_port = g_hash_table_lookup ((*a)->properties,  LOCAL_PORT);
-		}
-		else {
-			published_address = g_hash_table_lookup ((*a)->properties,  PUBLISHED_ADDRESS);
-			published_port = g_hash_table_lookup ((*a)->properties,  PUBLISHED_PORT);
-		}
-
-		stun_enable = g_hash_table_lookup ((*a)->properties,  ACCOUNT_SIP_STUN_ENABLED);
-		stun_server = g_hash_table_lookup ((*a)->properties,  ACCOUNT_SIP_STUN_SERVER);
-		published_sameas_local = g_hash_table_lookup ((*a)->properties,  PUBLISHED_SAMEAS_LOCAL);
-	}
-
-	gnome_main_section_new_with_table (_("Published address"), &frame, &table, 2, 3);
-	gtk_container_set_border_width (GTK_CONTAINER(table), 10);
-	gtk_table_set_row_spacings (GTK_TABLE (table), 5);
-
-	useStunCheckBox = gtk_check_button_new_with_mnemonic(_("Using STUN"));
-	gtk_table_attach_defaults(GTK_TABLE(table), useStunCheckBox, 0, 1, 0, 1);
-	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(useStunCheckBox), 
-			g_strcasecmp(stun_enable, "true") == 0 ? TRUE: FALSE);
-	gtk_widget_set_sensitive (GTK_WIDGET(useStunCheckBox),
-			g_strcasecmp(use_tls,"true") == 0 ? FALSE: TRUE);
-
-	stunServerLabel = gtk_label_new_with_mnemonic (_("STUN server URL"));
-	gtk_table_attach_defaults(GTK_TABLE(table), stunServerLabel, 0, 1, 1, 2);
-	gtk_misc_set_alignment(GTK_MISC (stunServerLabel), 0, 0.5);
-	stunServerEntry = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (stunServerLabel), stunServerEntry);
-	gtk_entry_set_text(GTK_ENTRY(stunServerEntry), stun_server);
-	gtk_table_attach_defaults(GTK_TABLE(table), stunServerEntry, 1, 2, 1, 2);
-
-	sameAsLocalRadioButton = gtk_radio_button_new_with_mnemonic_from_widget(NULL, _("Same as local parameters"));
-	gtk_table_attach_defaults(GTK_TABLE(table), sameAsLocalRadioButton, 0, 2, 3, 4);
-
-	publishedAddrRadioButton = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(sameAsLocalRadioButton), _("Set published address and port:"));
-	gtk_table_attach_defaults(GTK_TABLE(table), publishedAddrRadioButton, 0, 2, 4, 5);
-
-	if (g_strcasecmp (published_sameas_local, "true") == 0) {
-		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton), TRUE);
-		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (publishedAddrRadioButton), FALSE);
-	} else {
-	        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton), FALSE);
-		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (publishedAddrRadioButton), TRUE);
-	}
-
-	publishedAddressLabel = gtk_label_new_with_mnemonic (_("Published address"));
-	gtk_table_attach_defaults( GTK_TABLE(table), publishedAddressLabel, 0, 1, 5, 6);
-	gtk_misc_set_alignment(GTK_MISC (publishedAddressLabel), 0, 0.5);
-	publishedAddressEntry = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (publishedAddressLabel), publishedAddressEntry);
-
-	gtk_entry_set_text(GTK_ENTRY(publishedAddressEntry), published_address);
-	gtk_table_attach_defaults( GTK_TABLE(table), publishedAddressEntry, 1, 2, 5, 6);
-
-	publishedPortLabel = gtk_label_new_with_mnemonic(_("Published port"));
-	gtk_table_attach_defaults(GTK_TABLE(table), publishedPortLabel, 0, 1, 6, 7);
-	gtk_misc_set_alignment(GTK_MISC (publishedPortLabel), 0, 0.5);
-	publishedPortSpinBox = gtk_spin_button_new_with_range(1, 65535, 1);
-	gtk_label_set_mnemonic_widget(GTK_LABEL (publishedPortLabel), publishedPortSpinBox);
-	gtk_spin_button_set_value(GTK_SPIN_BUTTON(publishedPortSpinBox), g_ascii_strtod(published_port, NULL));
-
-	gtk_table_attach_defaults(GTK_TABLE(table), publishedPortSpinBox, 1, 2, 6, 7);
-
-	// This will trigger a signal, and the above two
-	// widgets need to be instanciated before that.
-	g_signal_connect(localAddressCombo, "changed", G_CALLBACK(local_interface_changed_cb), localAddressCombo);   
-
-	g_signal_connect(useStunCheckBox, "toggled", G_CALLBACK(use_stun_cb), useStunCheckBox);	
-
-	g_signal_connect(sameAsLocalRadioButton, "toggled", G_CALLBACK(same_as_local_cb), sameAsLocalRadioButton);   
-	g_signal_connect(publishedAddrRadioButton, "toggled", G_CALLBACK(set_published_addr_manually_cb), publishedAddrRadioButton);
-
-	set_published_addr_manually_cb(publishedAddrRadioButton, NULL);
-
-	return frame;
+GtkWidget* create_published_address (account_t **a)
+{
+
+    GtkWidget *table, *frame, *label;
+    gchar *use_tls, *published_address, *published_port, *local_address, *stun_enable, *stun_server, *published_sameas_local;
+
+    // Get the user configuration
+    if (*a) {
+
+        use_tls = g_hash_table_lookup ( (*a)->properties,  TLS_ENABLE);
+        published_sameas_local = g_hash_table_lookup ( (*a)->properties,  PUBLISHED_SAMEAS_LOCAL);
+
+        if (g_strcasecmp (published_sameas_local, "true") == 0) {
+            published_address = dbus_get_address_from_interface_name (g_hash_table_lookup ( (*a)->properties, LOCAL_INTERFACE));
+            published_port = g_hash_table_lookup ( (*a)->properties,  LOCAL_PORT);
+        } else {
+            published_address = g_hash_table_lookup ( (*a)->properties,  PUBLISHED_ADDRESS);
+            published_port = g_hash_table_lookup ( (*a)->properties,  PUBLISHED_PORT);
+        }
+
+        stun_enable = g_hash_table_lookup ( (*a)->properties,  ACCOUNT_SIP_STUN_ENABLED);
+        stun_server = g_hash_table_lookup ( (*a)->properties,  ACCOUNT_SIP_STUN_SERVER);
+        published_sameas_local = g_hash_table_lookup ( (*a)->properties,  PUBLISHED_SAMEAS_LOCAL);
+    }
+
+    gnome_main_section_new_with_table (_ ("Published address"), &frame, &table, 2, 3);
+    gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 5);
+
+    useStunCheckBox = gtk_check_button_new_with_mnemonic (_ ("Using STUN"));
+    gtk_table_attach_defaults (GTK_TABLE (table), useStunCheckBox, 0, 1, 0, 1);
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (useStunCheckBox),
+                                  g_strcasecmp (stun_enable, "true") == 0 ? TRUE: FALSE);
+    gtk_widget_set_sensitive (GTK_WIDGET (useStunCheckBox),
+                              g_strcasecmp (use_tls,"true") == 0 ? FALSE: TRUE);
+
+    stunServerLabel = gtk_label_new_with_mnemonic (_ ("STUN server URL"));
+    gtk_table_attach_defaults (GTK_TABLE (table), stunServerLabel, 0, 1, 1, 2);
+    gtk_misc_set_alignment (GTK_MISC (stunServerLabel), 0, 0.5);
+    stunServerEntry = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (stunServerLabel), stunServerEntry);
+    gtk_entry_set_text (GTK_ENTRY (stunServerEntry), stun_server);
+    gtk_table_attach_defaults (GTK_TABLE (table), stunServerEntry, 1, 2, 1, 2);
+
+    sameAsLocalRadioButton = gtk_radio_button_new_with_mnemonic_from_widget (NULL, _ ("Same as local parameters"));
+    gtk_table_attach_defaults (GTK_TABLE (table), sameAsLocalRadioButton, 0, 2, 3, 4);
+
+    publishedAddrRadioButton = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (sameAsLocalRadioButton), _ ("Set published address and port:"));
+    gtk_table_attach_defaults (GTK_TABLE (table), publishedAddrRadioButton, 0, 2, 4, 5);
+
+    if (g_strcasecmp (published_sameas_local, "true") == 0) {
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton), TRUE);
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (publishedAddrRadioButton), FALSE);
+    } else {
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton), FALSE);
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (publishedAddrRadioButton), TRUE);
+    }
+
+    publishedAddressLabel = gtk_label_new_with_mnemonic (_ ("Published address"));
+    gtk_table_attach_defaults (GTK_TABLE (table), publishedAddressLabel, 0, 1, 5, 6);
+    gtk_misc_set_alignment (GTK_MISC (publishedAddressLabel), 0, 0.5);
+    publishedAddressEntry = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (publishedAddressLabel), publishedAddressEntry);
+
+    gtk_entry_set_text (GTK_ENTRY (publishedAddressEntry), published_address);
+    gtk_table_attach_defaults (GTK_TABLE (table), publishedAddressEntry, 1, 2, 5, 6);
+
+    publishedPortLabel = gtk_label_new_with_mnemonic (_ ("Published port"));
+    gtk_table_attach_defaults (GTK_TABLE (table), publishedPortLabel, 0, 1, 6, 7);
+    gtk_misc_set_alignment (GTK_MISC (publishedPortLabel), 0, 0.5);
+    publishedPortSpinBox = gtk_spin_button_new_with_range (1, 65535, 1);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (publishedPortLabel), publishedPortSpinBox);
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON (publishedPortSpinBox), g_ascii_strtod (published_port, NULL));
+
+    gtk_table_attach_defaults (GTK_TABLE (table), publishedPortSpinBox, 1, 2, 6, 7);
+
+    // This will trigger a signal, and the above two
+    // widgets need to be instanciated before that.
+    g_signal_connect (localAddressCombo, "changed", G_CALLBACK (local_interface_changed_cb), localAddressCombo);
+
+    g_signal_connect (useStunCheckBox, "toggled", G_CALLBACK (use_stun_cb), useStunCheckBox);
+
+    g_signal_connect (sameAsLocalRadioButton, "toggled", G_CALLBACK (same_as_local_cb), sameAsLocalRadioButton);
+    g_signal_connect (publishedAddrRadioButton, "toggled", G_CALLBACK (set_published_addr_manually_cb), publishedAddrRadioButton);
+
+    set_published_addr_manually_cb (publishedAddrRadioButton, NULL);
+
+    return frame;
 }
 
-GtkWidget* create_advanced_tab (account_t **a) {
+GtkWidget* create_advanced_tab (account_t **a)
+{
 
-	// Build the advanced tab, to appear on the account configuration panel
-        DEBUG("Config: Build advanced tab")
+    // Build the advanced tab, to appear on the account configuration panel
+    DEBUG ("Config: Build advanced tab")
 
-	GtkWidget *ret, *frame;
+    GtkWidget *ret, *frame;
 
-	ret = gtk_vbox_new (FALSE, 10);
-	gtk_container_set_border_width (GTK_CONTAINER(ret), 10);
+    ret = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
 
-	frame = create_registration_expire (a);
-	gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+    frame = create_registration_expire (a);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
 
-	frame = create_network (a);
-	gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+    frame = create_network (a);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
 
-	frame = create_published_address (a);
-	gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+    frame = create_published_address (a);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
 
-	gtk_widget_show_all (ret);
+    gtk_widget_show_all (ret);
 
-	use_stun_cb (GTK_WIDGET (useStunCheckBox), NULL);
+    use_stun_cb (GTK_WIDGET (useStunCheckBox), NULL);
 
-	set_published_addr_manually_cb(GTK_WIDGET (publishedAddrRadioButton), NULL);
+    set_published_addr_manually_cb (GTK_WIDGET (publishedAddrRadioButton), NULL);
 
-	return ret;
+    return ret;
 }
 
-GtkWidget* create_codecs_configuration (account_t **a) {
+GtkWidget* create_codecs_configuration (account_t **a)
+{
+
+    // Main widget
+    GtkWidget *ret, *codecs, *dtmf, *box, *frame, *sipinfo, *table;
+    account_t *currentAccount = *a;
+    gchar *currentDtmfType = "";
+    gboolean dtmf_are_rtp = TRUE;
+    gpointer p;
+
+    ret = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
 
-        // Main widget
-        GtkWidget *ret, *codecs, *dtmf, *box, *frame, *sipinfo, *table;
-        account_t *currentAccount = *a;
-        gchar *currentDtmfType = "";
-        gboolean dtmf_are_rtp = TRUE;
-	gpointer p;
+    box = codecs_box (a);
 
-        ret = gtk_vbox_new(FALSE, 10);
-        gtk_container_set_border_width(GTK_CONTAINER(ret), 10);
+    // Box for the codecs
+    gnome_main_section_new (_ ("Codecs"), &codecs);
+    gtk_box_pack_start (GTK_BOX (ret), codecs, FALSE, FALSE, 0);
+    gtk_widget_set_size_request (GTK_WIDGET (codecs), -1, 200);
+    gtk_widget_show (codecs);
+    gtk_container_add (GTK_CONTAINER (codecs) , box);
 
-        box = codecs_box (a);
+    // Add DTMF type selection for SIP account only
+    p = g_hash_table_lookup (currentAccount->properties, g_strdup (ACCOUNT_TYPE));
 
-        // Box for the codecs
-        gnome_main_section_new (_("Codecs"), &codecs);
-        gtk_box_pack_start (GTK_BOX(ret), codecs, FALSE, FALSE, 0);
-        gtk_widget_set_size_request (GTK_WIDGET (codecs), -1, 200);
-        gtk_widget_show (codecs);
-        gtk_container_add (GTK_CONTAINER (codecs) , box);
+    if (g_strcmp0 (p, "SIP") == 0) {
 
-	// Add DTMF type selection for SIP account only
-	p = g_hash_table_lookup(currentAccount->properties, g_strdup(ACCOUNT_TYPE));
-	if(g_strcmp0(p, "SIP") == 0) {
-	
-	  // Box for dtmf
-	  gnome_main_section_new_with_table (_("DTMF"), &dtmf, &table, 1, 2);
-	  gtk_box_pack_start (GTK_BOX(ret), dtmf, FALSE, FALSE, 0);
-	  gtk_widget_show (dtmf);
+        // Box for dtmf
+        gnome_main_section_new_with_table (_ ("DTMF"), &dtmf, &table, 1, 2);
+        gtk_box_pack_start (GTK_BOX (ret), dtmf, FALSE, FALSE, 0);
+        gtk_widget_show (dtmf);
 
 
-	  currentDtmfType = g_hash_table_lookup (currentAccount->properties, g_strdup(ACCOUNT_DTMF_TYPE));
-	  if (g_strcasecmp(currentDtmfType, OVERRTP) != 0) {
+        currentDtmfType = g_hash_table_lookup (currentAccount->properties, g_strdup (ACCOUNT_DTMF_TYPE));
+
+        if (g_strcasecmp (currentDtmfType, OVERRTP) != 0) {
             dtmf_are_rtp = FALSE;
-	  }
+        }
 
-	  overrtp = gtk_radio_button_new_with_label( NULL, _("RTP") );
-	  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(overrtp), dtmf_are_rtp);
-	  gtk_table_attach ( GTK_TABLE( table ), overrtp, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+        overrtp = gtk_radio_button_new_with_label (NULL, _ ("RTP"));
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (overrtp), dtmf_are_rtp);
+        gtk_table_attach (GTK_TABLE (table), overrtp, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
-	  sipinfo = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(overrtp),  _("SIP"));
-	  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(sipinfo), !dtmf_are_rtp);
-	  g_signal_connect(G_OBJECT(sipinfo), "clicked", G_CALLBACK(select_dtmf_type), NULL);
-	  gtk_table_attach ( GTK_TABLE( table ), sipinfo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	}
+        sipinfo = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (overrtp),  _ ("SIP"));
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sipinfo), !dtmf_are_rtp);
+        g_signal_connect (G_OBJECT (sipinfo), "clicked", G_CALLBACK (select_dtmf_type), NULL);
+        gtk_table_attach (GTK_TABLE (table), sipinfo, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    }
 
-        gtk_widget_show_all(ret);
+    gtk_widget_show_all (ret);
 
-        return ret;
+    return ret;
 
 }
 
-void show_account_window (account_t * a) {
+void show_account_window (account_t * a)
+{
 
     GtkWidget * notebook;
-    GtkWidget *tab, *codecs_tab, *ip_tab; 
+    GtkWidget *tab, *codecs_tab, *ip_tab;
     gint response;
     account_t *currentAccount;
-  
-    // In case the published address is same than local, 
-    // we must resolve published address from interface name 
+
+    // In case the published address is same than local,
+    // we must resolve published address from interface name
     gchar * local_interface;
     gchar * published_address;
-  
-    currentAccount = a;   
+
+    currentAccount = a;
 
     if (currentAccount == NULL) {
-      currentAccount = g_new0(account_t, 1);
-      currentAccount->properties = dbus_account_details(NULL);
-      currentAccount->accountID = "new";    
-      sflphone_fill_codec_list_per_account (&currentAccount);
-      DEBUG("Config: Account is NULL. Will fetch default values");      
+        currentAccount = g_new0 (account_t, 1);
+        currentAccount->properties = dbus_account_details (NULL);
+        currentAccount->accountID = "new";
+        sflphone_fill_codec_list_per_account (&currentAccount);
+        DEBUG ("Config: Account is NULL. Will fetch default values");
     }
 
-    dialog = GTK_DIALOG(gtk_dialog_new_with_buttons (_("Account settings"),
-						     GTK_WINDOW(get_main_window()),
-						     GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-						     GTK_STOCK_CANCEL,
-						     GTK_RESPONSE_CANCEL,
-						     GTK_STOCK_APPLY,				
-						     GTK_RESPONSE_ACCEPT,
-						     NULL));
-    
-    gtk_dialog_set_has_separator(dialog, FALSE);
-    gtk_container_set_border_width (GTK_CONTAINER(dialog), 0);
-    
+    dialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_ ("Account settings"),
+                         GTK_WINDOW (get_main_window()),
+                         GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                         GTK_STOCK_CANCEL,
+                         GTK_RESPONSE_CANCEL,
+                         GTK_STOCK_APPLY,
+                         GTK_RESPONSE_ACCEPT,
+                         NULL));
+
+    gtk_dialog_set_has_separator (dialog, FALSE);
+    gtk_container_set_border_width (GTK_CONTAINER (dialog), 0);
+
     notebook = gtk_notebook_new();
-    gtk_box_pack_start(GTK_BOX (dialog->vbox), notebook, TRUE, TRUE, 0);
-    gtk_container_set_border_width(GTK_CONTAINER(notebook), 10);
-    gtk_widget_show(notebook);
+    gtk_box_pack_start (GTK_BOX (dialog->vbox), notebook, TRUE, TRUE, 0);
+    gtk_container_set_border_width (GTK_CONTAINER (notebook), 10);
+    gtk_widget_show (notebook);
 
     // We do not need the global settings for the IP2IP account
     if (g_strcasecmp (currentAccount->accountID, IP2IP) != 0) {
-      
-      /* General Settings */
-      tab = create_basic_tab(&currentAccount);
-      
-      gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new(_("Basic")));
-      gtk_notebook_page_num(GTK_NOTEBOOK(notebook), tab);
+
+        /* General Settings */
+        tab = create_basic_tab (&currentAccount);
+
+        gtk_notebook_append_page (GTK_NOTEBOOK (notebook), tab, gtk_label_new (_ ("Basic")));
+        gtk_notebook_page_num (GTK_NOTEBOOK (notebook), tab);
 
 
     }
+
     /* Codecs */
     codecs_tab = create_codecs_configuration (&currentAccount);
-    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), codecs_tab, gtk_label_new(_("Codecs")));
-    gtk_notebook_page_num (GTK_NOTEBOOK (notebook), codecs_tab);    
+    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), codecs_tab, gtk_label_new (_ ("Codecs")));
+    gtk_notebook_page_num (GTK_NOTEBOOK (notebook), codecs_tab);
 
     // Get current protocol for this account protocol
     gchar *currentProtocol = "SIP";
-    if(protocolComboBox)
-        currentProtocol = (gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(protocolComboBox));
+
+    if (protocolComboBox)
+        currentProtocol = (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (protocolComboBox));
 
     // Do not need advanced or security one for the IP2IP account
     if (g_strcasecmp (currentAccount->accountID, IP2IP) != 0) {
 
-	/* Advanced */
-	advanced_tab = create_advanced_tab(&currentAccount);
-	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), advanced_tab, gtk_label_new(_("Advanced")));
-	gtk_notebook_page_num(GTK_NOTEBOOK(notebook), advanced_tab);
-	
-	/* Security */
-	security_tab = create_security_tab (&currentAccount);
-	gtk_notebook_append_page(GTK_NOTEBOOK(notebook), security_tab, gtk_label_new(_("Security")));
-	gtk_notebook_page_num(GTK_NOTEBOOK(notebook),security_tab);
+        /* Advanced */
+        advanced_tab = create_advanced_tab (&currentAccount);
+        gtk_notebook_append_page (GTK_NOTEBOOK (notebook), advanced_tab, gtk_label_new (_ ("Advanced")));
+        gtk_notebook_page_num (GTK_NOTEBOOK (notebook), advanced_tab);
 
-    }
-    else {
+        /* Security */
+        security_tab = create_security_tab (&currentAccount);
+        gtk_notebook_append_page (GTK_NOTEBOOK (notebook), security_tab, gtk_label_new (_ ("Security")));
+        gtk_notebook_page_num (GTK_NOTEBOOK (notebook),security_tab);
 
-      /* Custom tab for the IP to IP profile */
-      ip_tab = create_direct_ip_calls_tab (&currentAccount);
-      gtk_notebook_prepend_page (GTK_NOTEBOOK (notebook), ip_tab, gtk_label_new(_("Network")));
-      gtk_notebook_page_num (GTK_NOTEBOOK (notebook), ip_tab);
+    } else {
+
+        /* Custom tab for the IP to IP profile */
+        ip_tab = create_direct_ip_calls_tab (&currentAccount);
+        gtk_notebook_prepend_page (GTK_NOTEBOOK (notebook), ip_tab, gtk_label_new (_ ("Network")));
+        gtk_notebook_page_num (GTK_NOTEBOOK (notebook), ip_tab);
     }
 
     // Emit signal to hide advanced and security tabs in case of IAX
-    if(protocolComboBox)
-        g_signal_emit_by_name (GTK_WIDGET(protocolComboBox), "changed", NULL);
+    if (protocolComboBox)
+        g_signal_emit_by_name (GTK_WIDGET (protocolComboBox), "changed", NULL);
 
     gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook) ,  0);
 
@@ -1341,207 +1352,210 @@ void show_account_window (account_t * a) {
     /* Run dialog */
     /**************/
     response = gtk_dialog_run (GTK_DIALOG (dialog));
-    
+
     // Update protocol in case it changed
     gchar *proto = NULL;
-    if(protocolComboBox)
-        proto = (gchar *) gtk_combo_box_get_active_text(GTK_COMBO_BOX(protocolComboBox));
+
+    if (protocolComboBox)
+        proto = (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (protocolComboBox));
     else
-      proto = "SIP";
+        proto = "SIP";
 
     // If cancel button is pressed
-    if(response == GTK_RESPONSE_CANCEL) {
-      gtk_widget_destroy (GTK_WIDGET(dialog));
-      return;
+    if (response == GTK_RESPONSE_CANCEL) {
+        gtk_widget_destroy (GTK_WIDGET (dialog));
+        return;
     }
 
-    gchar *key = g_strdup(ACCOUNT_USERNAME);
+    gchar *key = g_strdup (ACCOUNT_USERNAME);
 
-    // If accept button is 
+    // If accept button is
     if (g_strcasecmp (currentAccount->accountID, IP2IP) != 0) {
 
-      g_hash_table_replace(currentAccount->properties,
-			   g_strdup(ACCOUNT_ALIAS),
-			   g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryAlias))));
-      g_hash_table_replace(currentAccount->properties,
-			   g_strdup(ACCOUNT_TYPE),
-			   g_strdup(proto));
-      g_hash_table_replace(currentAccount->properties,
-			   g_strdup(ACCOUNT_HOSTNAME),
-			   g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryHostname))));
-      g_hash_table_replace(currentAccount->properties,
-			   g_strdup(ACCOUNT_USERNAME),
-			   g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryUsername))));
-      g_hash_table_replace(currentAccount->properties,
-			   g_strdup(ACCOUNT_PASSWORD),
-			   g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryPassword))));
-      g_hash_table_replace(currentAccount->properties,
-			   g_strdup(ACCOUNT_MAILBOX),
-			   g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryMailbox))));   
-
-      // Variable used to update credentials
-      current_username = (gchar *)g_hash_table_lookup(currentAccount->properties, g_strdup(ACCOUNT_USERNAME));
+        g_hash_table_replace (currentAccount->properties,
+                              g_strdup (ACCOUNT_ALIAS),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (entryAlias))));
+        g_hash_table_replace (currentAccount->properties,
+                              g_strdup (ACCOUNT_TYPE),
+                              g_strdup (proto));
+        g_hash_table_replace (currentAccount->properties,
+                              g_strdup (ACCOUNT_HOSTNAME),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (entryHostname))));
+        g_hash_table_replace (currentAccount->properties,
+                              g_strdup (ACCOUNT_USERNAME),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (entryUsername))));
+        g_hash_table_replace (currentAccount->properties,
+                              g_strdup (ACCOUNT_PASSWORD),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (entryPassword))));
+        g_hash_table_replace (currentAccount->properties,
+                              g_strdup (ACCOUNT_MAILBOX),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (entryMailbox))));
+
+        // Variable used to update credentials
+        current_username = (gchar *) g_hash_table_lookup (currentAccount->properties, g_strdup (ACCOUNT_USERNAME));
 
     }
 
     if (proto && strcmp (proto, "SIP") == 0) {
-      
-      if (g_strcasecmp (currentAccount->accountID, IP2IP) != 0) {
-
-	g_hash_table_replace(currentAccount->properties,
-			   g_strdup(ACCOUNT_RESOLVE_ONCE),
-			   g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(entryResolveNameOnlyOnce)) ? "false": "true"));
-
-	g_hash_table_replace(currentAccount->properties,
-			   g_strdup(ACCOUNT_REGISTRATION_EXPIRE),
-			   g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(expireSpinBox))));
-	
-	/*
-	// TODO: uncomment this code and implement route 
-	g_hash_table_replace(currentAccount->properties,
-			     g_strdup(ACCOUNT_ROUTE),
-			     g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryRouteSet))));
-	*/
-	
-	g_hash_table_replace(currentAccount->properties, 
-			     g_strdup(ACCOUNT_USERAGENT), 
-			     g_strdup(gtk_entry_get_text (GTK_ENTRY(entryUseragent))));
-
-	g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_SIP_STUN_ENABLED), 
-			     g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(useStunCheckBox)) ? "true":"false"));
-	
-	g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_SIP_STUN_SERVER), 
-			     g_strdup(gtk_entry_get_text(GTK_ENTRY(stunServerEntry))));
-	
-	g_hash_table_replace(currentAccount->properties, g_strdup(PUBLISHED_SAMEAS_LOCAL), g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sameAsLocalRadioButton)) ? "true":"false"));	
-
-	if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sameAsLocalRadioButton))) {
-	  
-	  g_hash_table_replace(currentAccount->properties,
-			       g_strdup(PUBLISHED_PORT),
-			       g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(publishedPortSpinBox))));
-
-	  g_hash_table_replace(currentAccount->properties,
-			       g_strdup(PUBLISHED_ADDRESS),
-			       g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(publishedAddressEntry))));
-	}
-	else {
-	  
-	  g_hash_table_replace(currentAccount->properties,
-			       g_strdup(PUBLISHED_PORT),
-			       g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(localPortSpinBox))));
-	  local_interface = g_strdup((gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(localAddressCombo)));
-	  
-	  published_address = dbus_get_address_from_interface_name(local_interface);
-	      
-	  g_hash_table_replace(currentAccount->properties,
-			       g_strdup(PUBLISHED_ADDRESS),
-			       published_address);
-	}
-
-	if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(overrtp))) {
-	  g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_DTMF_TYPE), g_strdup(OVERRTP));
-	}
-	else {
-	  g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_DTMF_TYPE), g_strdup(SIPINFO));
-	}
-	
-	gchar* keyExchange = (gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(keyExchangeCombo));
-	
-	if (g_strcasecmp(keyExchange, "ZRTP") == 0) {
-	  g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_SRTP_ENABLED), g_strdup("true"));
-	  g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_KEY_EXCHANGE), g_strdup(ZRTP));
-	}
-	
-	else if(g_strcasecmp(keyExchange, "SDES") == 0) {
-	  g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_SRTP_ENABLED), g_strdup("true"));
-	  g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_KEY_EXCHANGE), g_strdup(SDES));
-	}
-	
-	else {
-	  g_hash_table_replace(currentAccount->properties, g_strdup(ACCOUNT_SRTP_ENABLED), g_strdup("false"));
-	}
-	
-	g_hash_table_replace(currentAccount->properties, g_strdup(TLS_ENABLE), 
-			     g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(useSipTlsCheckBox)) ? "true":"false"));
-      }
-      
-      g_hash_table_replace(currentAccount->properties,
-			   g_strdup(LOCAL_INTERFACE),
-			   g_strdup((gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(localAddressCombo))));
-	  
-      g_hash_table_replace(currentAccount->properties,
-			   g_strdup(LOCAL_PORT),
-			   g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(localPortSpinBox))));
+
+        if (g_strcasecmp (currentAccount->accountID, IP2IP) != 0) {
+
+            g_hash_table_replace (currentAccount->properties,
+                                  g_strdup (ACCOUNT_RESOLVE_ONCE),
+                                  g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (entryResolveNameOnlyOnce)) ? "false": "true"));
+
+            g_hash_table_replace (currentAccount->properties,
+                                  g_strdup (ACCOUNT_REGISTRATION_EXPIRE),
+                                  g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (expireSpinBox))));
+
+            /*
+            // TODO: uncomment this code and implement route
+            g_hash_table_replace(currentAccount->properties,
+            		     g_strdup(ACCOUNT_ROUTE),
+            		     g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(entryRouteSet))));
+            */
+
+            g_hash_table_replace (currentAccount->properties,
+                                  g_strdup (ACCOUNT_USERAGENT),
+                                  g_strdup (gtk_entry_get_text (GTK_ENTRY (entryUseragent))));
+
+            g_hash_table_replace (currentAccount->properties, g_strdup (ACCOUNT_SIP_STUN_ENABLED),
+                                  g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (useStunCheckBox)) ? "true":"false"));
+
+            g_hash_table_replace (currentAccount->properties, g_strdup (ACCOUNT_SIP_STUN_SERVER),
+                                  g_strdup (gtk_entry_get_text (GTK_ENTRY (stunServerEntry))));
+
+            g_hash_table_replace (currentAccount->properties, g_strdup (PUBLISHED_SAMEAS_LOCAL), g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton)) ? "true":"false"));
+
+            if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (sameAsLocalRadioButton))) {
+
+                g_hash_table_replace (currentAccount->properties,
+                                      g_strdup (PUBLISHED_PORT),
+                                      g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (publishedPortSpinBox))));
+
+                g_hash_table_replace (currentAccount->properties,
+                                      g_strdup (PUBLISHED_ADDRESS),
+                                      g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (publishedAddressEntry))));
+            } else {
+
+                g_hash_table_replace (currentAccount->properties,
+                                      g_strdup (PUBLISHED_PORT),
+                                      g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (localPortSpinBox))));
+                local_interface = g_strdup ( (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (localAddressCombo)));
+
+                published_address = dbus_get_address_from_interface_name (local_interface);
+
+                g_hash_table_replace (currentAccount->properties,
+                                      g_strdup (PUBLISHED_ADDRESS),
+                                      published_address);
+            }
+
+            if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (overrtp))) {
+                g_hash_table_replace (currentAccount->properties, g_strdup (ACCOUNT_DTMF_TYPE), g_strdup (OVERRTP));
+            } else {
+                g_hash_table_replace (currentAccount->properties, g_strdup (ACCOUNT_DTMF_TYPE), g_strdup (SIPINFO));
+            }
+
+            gchar* keyExchange = (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (keyExchangeCombo));
+
+            if (g_strcasecmp (keyExchange, "ZRTP") == 0) {
+                g_hash_table_replace (currentAccount->properties, g_strdup (ACCOUNT_SRTP_ENABLED), g_strdup ("true"));
+                g_hash_table_replace (currentAccount->properties, g_strdup (ACCOUNT_KEY_EXCHANGE), g_strdup (ZRTP));
+            }
+
+            else if (g_strcasecmp (keyExchange, "SDES") == 0) {
+                g_hash_table_replace (currentAccount->properties, g_strdup (ACCOUNT_SRTP_ENABLED), g_strdup ("true"));
+                g_hash_table_replace (currentAccount->properties, g_strdup (ACCOUNT_KEY_EXCHANGE), g_strdup (SDES));
+            }
+
+            else {
+                g_hash_table_replace (currentAccount->properties, g_strdup (ACCOUNT_SRTP_ENABLED), g_strdup ("false"));
+            }
+
+            g_hash_table_replace (currentAccount->properties, g_strdup (TLS_ENABLE),
+                                  g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (useSipTlsCheckBox)) ? "true":"false"));
+        }
+
+        g_hash_table_replace (currentAccount->properties,
+                              g_strdup (LOCAL_INTERFACE),
+                              g_strdup ( (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (localAddressCombo))));
+
+        g_hash_table_replace (currentAccount->properties,
+                              g_strdup (LOCAL_PORT),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (localPortSpinBox))));
 
     }
-    
-    if (currentProtocol && strcmp(currentProtocol, "SIP") == 0) {
-
-      /* Set new credentials if any */
-      DEBUG("Config: Setting credentials"); 
-      if (g_strcasecmp (currentAccount->accountID, IP2IP) != 0) {
-      
-	/* This hack is necessary because of the way the 
-	 * configuration file is made (.ini at that time).
-	 * and deleting account per account is too much 
-	 * of a trouble. 
-	 */
-	dbus_delete_all_credential(currentAccount);
-      
-	GPtrArray * credential = getNewCredential(currentAccount->properties);         
-	currentAccount->credential_information = credential;
-	if(currentAccount->credential_information != NULL) {
-	  int i;
-	  for(i = 0; i < currentAccount->credential_information->len; i++) {
-	    dbus_set_credential(currentAccount, i);
-	  }
-	  dbus_set_number_of_credential(currentAccount, currentAccount->credential_information->len);
-	}
-      }
+
+    if (currentProtocol && strcmp (currentProtocol, "SIP") == 0) {
+
+        /* Set new credentials if any */
+        DEBUG ("Config: Setting credentials");
+
+        if (g_strcasecmp (currentAccount->accountID, IP2IP) != 0) {
+
+            /* This hack is necessary because of the way the
+             * configuration file is made (.ini at that time).
+             * and deleting account per account is too much
+             * of a trouble.
+             */
+            dbus_delete_all_credential (currentAccount);
+
+            GPtrArray * credential = getNewCredential (currentAccount->properties);
+            currentAccount->credential_information = credential;
+
+            if (currentAccount->credential_information != NULL) {
+                int i;
+
+                for (i = 0; i < currentAccount->credential_information->len; i++) {
+                    dbus_set_credential (currentAccount, i);
+                }
+
+                dbus_set_number_of_credential (currentAccount, currentAccount->credential_information->len);
+            }
+        }
     }
 
     /** @todo Verify if it's the best condition to check */
-    if (g_strcasecmp(currentAccount->accountID, "new") == 0) {
-      dbus_add_account(currentAccount);
-    }
-    else {
-      dbus_set_account_details(currentAccount);
+    if (g_strcasecmp (currentAccount->accountID, "new") == 0) {
+        dbus_add_account (currentAccount);
+    } else {
+        dbus_set_account_details (currentAccount);
     }
-    
+
     // Perpetuate changes to the deamon
     codec_list_update_to_daemon (currentAccount);
-    
-    gtk_widget_destroy (GTK_WIDGET(dialog));
-} 
 
-GtkWidget* create_direct_ip_calls_tab (account_t **a) {
+    gtk_widget_destroy (GTK_WIDGET (dialog));
+}
 
-	GtkWidget *ret, *frame, *label;
-	gchar *description;
+GtkWidget* create_direct_ip_calls_tab (account_t **a)
+{
+
+    GtkWidget *ret, *frame, *label;
+    gchar *description;
 
-	ret = gtk_vbox_new(FALSE, 10);
-	gtk_container_set_border_width(GTK_CONTAINER(ret), 10);
+    ret = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
 
-	description = g_markup_printf_escaped(_("This profile is used when you want to reach a remote peer simply by typing a sip URI such as <b>sip:remotepeer</b>. The settings you define here will also be used if no account can be matched to an incoming or outgoing call."));
-	label = gtk_label_new (NULL);
-	gtk_label_set_markup (GTK_LABEL (label), description);
-	gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);    
-	gtk_box_pack_start (GTK_BOX (ret), label, FALSE, FALSE, 0);
+    description = g_markup_printf_escaped (_ ("This profile is used when you want to reach a remote peer simply by typing a sip URI such as <b>sip:remotepeer</b>. The settings you define here will also be used if no account can be matched to an incoming or outgoing call."));
+    label = gtk_label_new (NULL);
+    gtk_label_set_markup (GTK_LABEL (label), description);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    gtk_box_pack_start (GTK_BOX (ret), label, FALSE, FALSE, 0);
 
-	GtkRequisition requisition;
-	gtk_widget_size_request (GTK_WIDGET (ret), &requisition);
-	gtk_widget_set_size_request (GTK_WIDGET (label), 350, -1);        
-	gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+    GtkRequisition requisition;
+    gtk_widget_size_request (GTK_WIDGET (ret), &requisition);
+    gtk_widget_set_size_request (GTK_WIDGET (label), 350, -1);
+    gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
 
-	frame = create_network (a);
-	gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+    frame = create_network (a);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
 
-	frame = create_security_widget (a);
-	gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+    frame = create_security_widget (a);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
 
-	gtk_widget_show_all (ret);
-	return ret;
+    gtk_widget_show_all (ret);
+    return ret;
 
 }
 
diff --git a/sflphone-client-gnome/src/config/accountconfigdialog.h b/sflphone-client-gnome/src/config/accountconfigdialog.h
index dee7c8d33e3742dbc8600985d8d480f7a2653531..ecfd97cf1b9c9d1c1751f98935b47539f2b5ed0d 100644
--- a/sflphone-client-gnome/src/config/accountconfigdialog.h
+++ b/sflphone-client-gnome/src/config/accountconfigdialog.h
@@ -2,17 +2,17 @@
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -28,7 +28,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
- 
+
 #ifndef __ACCOUNTWINDOW_H__
 #define __ACCOUNTWINDOW_H__
 /** @file accountconfigdialog.h
@@ -39,10 +39,10 @@
 #include "preferencesdialog.h"
 #include "accountlist.h"
 
-/** 
- * Display the main account widget 
+/**
+ * Display the main account widget
  * @param a The account you want to edit or null for a new account
- */  
+ */
 void show_account_window (account_t *a);
 
 GtkWidget* create_registration_expire (account_t **a);
@@ -50,4 +50,4 @@ GtkWidget* create_registration_expire (account_t **a);
 GtkWidget* create_direct_ip_calls_tab (account_t **a);
 
 
-#endif 
+#endif
diff --git a/sflphone-client-gnome/src/config/accountlistconfigdialog.c b/sflphone-client-gnome/src/config/accountlistconfigdialog.c
index 0c6a975e8e342d29ee5d039adf1729361034ed48..bf9887cfabd8e19e2d1ec4fb662ed27234fe472e 100644
--- a/sflphone-client-gnome/src/config/accountlistconfigdialog.c
+++ b/sflphone-client-gnome/src/config/accountlistconfigdialog.c
@@ -2,17 +2,17 @@
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
  *  Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -50,49 +50,51 @@ GtkListStore * accountStore;
 
 GtkDialog * accountListDialog = NULL;
 
-account_t * selectedAccount = NULL;      
+account_t * selectedAccount = NULL;
 // Account properties
 enum {
-	COLUMN_ACCOUNT_ALIAS,
-	COLUMN_ACCOUNT_TYPE,
-	COLUMN_ACCOUNT_STATUS,
-	COLUMN_ACCOUNT_ACTIVE,
-	COLUMN_ACCOUNT_DATA,
-	COLUMN_ACCOUNT_COUNT
+    COLUMN_ACCOUNT_ALIAS,
+    COLUMN_ACCOUNT_TYPE,
+    COLUMN_ACCOUNT_STATUS,
+    COLUMN_ACCOUNT_ACTIVE,
+    COLUMN_ACCOUNT_DATA,
+    COLUMN_ACCOUNT_COUNT
 };
 
 /**
  * Fills the treelist with accounts
  */
-void account_list_config_dialog_fill() {
+void account_list_config_dialog_fill()
+{
 
-	if (accountListDialog == NULL) {
-		DEBUG("Dialog is not opened");
-		return;
-	}
+    if (accountListDialog == NULL) {
+        DEBUG ("Dialog is not opened");
+        return;
+    }
 
-	GtkTreeIter iter;
+    GtkTreeIter iter;
 
-	gtk_list_store_clear(accountStore);
+    gtk_list_store_clear (accountStore);
 
-	unsigned int i;
-	for(i = 0; i < account_list_get_size(); i++) {
-		account_t * a = account_list_get_nth (i);
+    unsigned int i;
 
-		if (a) {
-			gtk_list_store_append (accountStore, &iter);
+    for (i = 0; i < account_list_get_size(); i++) {
+        account_t * a = account_list_get_nth (i);
 
-			DEBUG("Filling accounts: Account is enabled :%s", g_hash_table_lookup(a->properties, ACCOUNT_ENABLED));
+        if (a) {
+            gtk_list_store_append (accountStore, &iter);
 
-			gtk_list_store_set(accountStore, &iter,
-					COLUMN_ACCOUNT_ALIAS, g_hash_table_lookup(a->properties, ACCOUNT_ALIAS),  // Name
-					COLUMN_ACCOUNT_TYPE, g_hash_table_lookup(a->properties, ACCOUNT_TYPE),   // Protocol
-					COLUMN_ACCOUNT_STATUS, account_state_name(a->state),      // Status
-					COLUMN_ACCOUNT_ACTIVE, (g_strcasecmp(g_hash_table_lookup(a->properties, ACCOUNT_ENABLED),"true") == 0)? TRUE:FALSE,  // Enable/Disable
-					COLUMN_ACCOUNT_DATA, a,   // Pointer
-					-1);
-		}
-	}
+            DEBUG ("Filling accounts: Account is enabled :%s", g_hash_table_lookup (a->properties, ACCOUNT_ENABLED));
+
+            gtk_list_store_set (accountStore, &iter,
+                                COLUMN_ACCOUNT_ALIAS, g_hash_table_lookup (a->properties, ACCOUNT_ALIAS), // Name
+                                COLUMN_ACCOUNT_TYPE, g_hash_table_lookup (a->properties, ACCOUNT_TYPE),  // Protocol
+                                COLUMN_ACCOUNT_STATUS, account_state_name (a->state),     // Status
+                                COLUMN_ACCOUNT_ACTIVE, (g_strcasecmp (g_hash_table_lookup (a->properties, ACCOUNT_ENABLED),"true") == 0) ? TRUE:FALSE,  // Enable/Disable
+                                COLUMN_ACCOUNT_DATA, a,   // Pointer
+                                -1);
+        }
+    }
 
 }
 
@@ -101,497 +103,507 @@ void account_list_config_dialog_fill() {
 /**
  * Call back when the user click on an account in the list
  */
-	static void
-select_account_cb(GtkTreeSelection *selection, GtkTreeModel *model)
+static void
+select_account_cb (GtkTreeSelection *selection, GtkTreeModel *model)
 {
-	GtkTreeIter iter;
-	GValue val;
-	gchar *state;
-
-	memset (&val, 0, sizeof(val));
-	if (!gtk_tree_selection_get_selected(selection, &model, &iter))
-	{
-		selectedAccount = NULL;
-		gtk_widget_set_sensitive(GTK_WIDGET(accountMoveUpButton), FALSE);
-		gtk_widget_set_sensitive(GTK_WIDGET(accountMoveDownButton), FALSE);
-		gtk_widget_set_sensitive(GTK_WIDGET(editButton), FALSE);
-		gtk_widget_set_sensitive(GTK_WIDGET(deleteButton), FALSE);                
-		return;
-	}
-
-	// The Gvalue will be initialized in the following function
-	gtk_tree_model_get_value(model, &iter, COLUMN_ACCOUNT_DATA, &val);
-
-	selectedAccount = (account_t*)g_value_get_pointer(&val);
-	g_value_unset(&val);
-
-	if(selectedAccount != NULL) {
-		gtk_widget_set_sensitive(GTK_WIDGET(editButton), TRUE);
-		if (g_strcasecmp (selectedAccount->accountID, IP2IP) != 0) {
-			gtk_widget_set_sensitive(GTK_WIDGET(accountMoveUpButton), TRUE);
-			gtk_widget_set_sensitive(GTK_WIDGET(accountMoveDownButton), TRUE);
-			gtk_widget_set_sensitive(GTK_WIDGET(deleteButton), TRUE);      
-
-			/* Update status bar about current registration state */
-			gtk_statusbar_pop (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION);
-
-			if (selectedAccount->protocol_state_description != NULL  
-				&& selectedAccount->protocol_state_code != 0) {
-
-				gchar * response = g_strdup_printf(
-					_("Server returned \"%s\" (%d)"),
-					selectedAccount->protocol_state_description, 
-					selectedAccount->protocol_state_code);
-				gchar * message = g_strconcat(
-					account_state_name(selectedAccount->state), 
-					". ", 
-					response,
-					NULL);
-
-				gtk_statusbar_push (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION, message);
-
-				g_free(response);
-				g_free(message);
-
-			} else {
-				state = (gchar*) account_state_name (selectedAccount->state);        
-				gtk_statusbar_push (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION, state);        
-			}
-		}
-		else {
-			gtk_widget_set_sensitive(GTK_WIDGET(accountMoveUpButton), FALSE);
-			gtk_widget_set_sensitive(GTK_WIDGET(accountMoveDownButton), FALSE);
-			gtk_widget_set_sensitive(GTK_WIDGET(deleteButton), FALSE);      
-		}
-	}
-
-	DEBUG("Selecting account in account window");
+    GtkTreeIter iter;
+    GValue val;
+    gchar *state;
+
+    memset (&val, 0, sizeof (val));
+
+    if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
+        selectedAccount = NULL;
+        gtk_widget_set_sensitive (GTK_WIDGET (accountMoveUpButton), FALSE);
+        gtk_widget_set_sensitive (GTK_WIDGET (accountMoveDownButton), FALSE);
+        gtk_widget_set_sensitive (GTK_WIDGET (editButton), FALSE);
+        gtk_widget_set_sensitive (GTK_WIDGET (deleteButton), FALSE);
+        return;
+    }
+
+    // The Gvalue will be initialized in the following function
+    gtk_tree_model_get_value (model, &iter, COLUMN_ACCOUNT_DATA, &val);
+
+    selectedAccount = (account_t*) g_value_get_pointer (&val);
+    g_value_unset (&val);
+
+    if (selectedAccount != NULL) {
+        gtk_widget_set_sensitive (GTK_WIDGET (editButton), TRUE);
+
+        if (g_strcasecmp (selectedAccount->accountID, IP2IP) != 0) {
+            gtk_widget_set_sensitive (GTK_WIDGET (accountMoveUpButton), TRUE);
+            gtk_widget_set_sensitive (GTK_WIDGET (accountMoveDownButton), TRUE);
+            gtk_widget_set_sensitive (GTK_WIDGET (deleteButton), TRUE);
+
+            /* Update status bar about current registration state */
+            gtk_statusbar_pop (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION);
+
+            if (selectedAccount->protocol_state_description != NULL
+                    && selectedAccount->protocol_state_code != 0) {
+
+                gchar * response = g_strdup_printf (
+                                       _ ("Server returned \"%s\" (%d)"),
+                                       selectedAccount->protocol_state_description,
+                                       selectedAccount->protocol_state_code);
+                gchar * message = g_strconcat (
+                                      account_state_name (selectedAccount->state),
+                                      ". ",
+                                      response,
+                                      NULL);
+
+                gtk_statusbar_push (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION, message);
+
+                g_free (response);
+                g_free (message);
+
+            } else {
+                state = (gchar*) account_state_name (selectedAccount->state);
+                gtk_statusbar_push (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION, state);
+            }
+        } else {
+            gtk_widget_set_sensitive (GTK_WIDGET (accountMoveUpButton), FALSE);
+            gtk_widget_set_sensitive (GTK_WIDGET (accountMoveDownButton), FALSE);
+            gtk_widget_set_sensitive (GTK_WIDGET (deleteButton), FALSE);
+        }
+    }
+
+    DEBUG ("Selecting account in account window");
 }
 
-static void enable_account_cb (GtkCellRendererToggle *rend UNUSED, gchar* path,  gpointer data ) {
-
-	GtkTreeIter iter;
-	GtkTreePath *treePath;    
-	GtkTreeModel *model;
-	gboolean enable;
-	account_t* acc ;
-
-	// The IP2IP profile can't be disabled
-	if (g_strcasecmp (path, "0") == 0)
-		return;
-
-	// Get pointer on object
-	treePath = gtk_tree_path_new_from_string(path);
-	model = gtk_tree_view_get_model(GTK_TREE_VIEW(data));
-	gtk_tree_model_get_iter(model, &iter, treePath);
-	gtk_tree_model_get(model, &iter,
-			COLUMN_ACCOUNT_ACTIVE, &enable,
-			COLUMN_ACCOUNT_DATA, &acc,
-			-1);
-	
-	enable = !enable;
-
-	DEBUG("Account is %d enabled", enable);
-	// Store value
-	gtk_list_store_set(GTK_LIST_STORE(model), &iter,
-			COLUMN_ACCOUNT_ACTIVE, enable,
-			-1);
-
-	// Modify account state
-	gchar * registrationState;
-	if (enable == TRUE) {
-		registrationState = g_strdup("true");
-	} else {
-		registrationState = g_strdup("false");
-	}
-	DEBUG("Replacing with %s", registrationState);
-	g_hash_table_replace( acc->properties , g_strdup(ACCOUNT_ENABLED), registrationState);
-
-	dbus_send_register(acc->accountID, enable);
+static void enable_account_cb (GtkCellRendererToggle *rend UNUSED, gchar* path,  gpointer data)
+{
+
+    GtkTreeIter iter;
+    GtkTreePath *treePath;
+    GtkTreeModel *model;
+    gboolean enable;
+    account_t* acc ;
+
+    // The IP2IP profile can't be disabled
+    if (g_strcasecmp (path, "0") == 0)
+        return;
+
+    // Get pointer on object
+    treePath = gtk_tree_path_new_from_string (path);
+    model = gtk_tree_view_get_model (GTK_TREE_VIEW (data));
+    gtk_tree_model_get_iter (model, &iter, treePath);
+    gtk_tree_model_get (model, &iter,
+                        COLUMN_ACCOUNT_ACTIVE, &enable,
+                        COLUMN_ACCOUNT_DATA, &acc,
+                        -1);
+
+    enable = !enable;
+
+    DEBUG ("Account is %d enabled", enable);
+    // Store value
+    gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+                        COLUMN_ACCOUNT_ACTIVE, enable,
+                        -1);
+
+    // Modify account state
+    gchar * registrationState;
+
+    if (enable == TRUE) {
+        registrationState = g_strdup ("true");
+    } else {
+        registrationState = g_strdup ("false");
+    }
+
+    DEBUG ("Replacing with %s", registrationState);
+    g_hash_table_replace (acc->properties , g_strdup (ACCOUNT_ENABLED), registrationState);
+
+    dbus_send_register (acc->accountID, enable);
 
 }
 
 /**
  * Move account in list depending on direction and selected account
  */
-static void account_move (gboolean moveUp, gpointer data) {
-
-	GtkTreeIter iter;
-	GtkTreeIter *iter2;
-	GtkTreeView *treeView;
-	GtkTreeModel *model;
-	GtkTreeSelection *selection;
-	GtkTreePath *treePath;
-	gchar *path;
-
-	// Get view, model and selection of codec store
-	treeView = GTK_TREE_VIEW (data);
-	model = gtk_tree_view_get_model (GTK_TREE_VIEW(treeView));
-	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(treeView));
-
-	// Find selected iteration and create a copy
-	gtk_tree_selection_get_selected (GTK_TREE_SELECTION(selection), &model, &iter);
-	iter2 = gtk_tree_iter_copy (&iter);
-
-	// Find path of iteration
-	path = gtk_tree_model_get_string_from_iter(GTK_TREE_MODEL(model), &iter);
-
-	// The first real account in the list can't move up because of the IP2IP account
-	// It can still move down though
-	if (g_strcasecmp (path, "1") == 0 && moveUp)
-		return;
-
-	treePath = gtk_tree_path_new_from_string(path);
-	gint *indices = gtk_tree_path_get_indices(treePath);
-	gint indice = indices[0];
-
-	// Depending on button direction get new path
-	if(moveUp)
-		gtk_tree_path_prev(treePath);
-	else
-		gtk_tree_path_next(treePath);
-	gtk_tree_model_get_iter(model, &iter, treePath);
-
-	// Swap iterations if valid
-	if(gtk_list_store_iter_is_valid(GTK_LIST_STORE(model), &iter))
-		gtk_list_store_swap(GTK_LIST_STORE(model), &iter, iter2);
-
-	// Scroll to new position
-	gtk_tree_view_scroll_to_cell (treeView, treePath, NULL, FALSE, 0, 0);
-
-	// Free resources
-	gtk_tree_path_free(treePath);
-	gtk_tree_iter_free(iter2);
-	g_free(path);
-
-	// Perpetuate changes in account queue
-	if(moveUp)
-		account_list_move_up(indice);
-	else
-		account_list_move_down(indice);
-
-
-	// Set the order in the configuration file
-	dbus_set_accounts_order (account_list_get_ordered_list ());
+static void account_move (gboolean moveUp, gpointer data)
+{
+
+    GtkTreeIter iter;
+    GtkTreeIter *iter2;
+    GtkTreeView *treeView;
+    GtkTreeModel *model;
+    GtkTreeSelection *selection;
+    GtkTreePath *treePath;
+    gchar *path;
+
+    // Get view, model and selection of codec store
+    treeView = GTK_TREE_VIEW (data);
+    model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeView));
+    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeView));
+
+    // Find selected iteration and create a copy
+    gtk_tree_selection_get_selected (GTK_TREE_SELECTION (selection), &model, &iter);
+    iter2 = gtk_tree_iter_copy (&iter);
+
+    // Find path of iteration
+    path = gtk_tree_model_get_string_from_iter (GTK_TREE_MODEL (model), &iter);
+
+    // The first real account in the list can't move up because of the IP2IP account
+    // It can still move down though
+    if (g_strcasecmp (path, "1") == 0 && moveUp)
+        return;
+
+    treePath = gtk_tree_path_new_from_string (path);
+    gint *indices = gtk_tree_path_get_indices (treePath);
+    gint indice = indices[0];
+
+    // Depending on button direction get new path
+    if (moveUp)
+        gtk_tree_path_prev (treePath);
+    else
+        gtk_tree_path_next (treePath);
+
+    gtk_tree_model_get_iter (model, &iter, treePath);
+
+    // Swap iterations if valid
+    if (gtk_list_store_iter_is_valid (GTK_LIST_STORE (model), &iter))
+        gtk_list_store_swap (GTK_LIST_STORE (model), &iter, iter2);
+
+    // Scroll to new position
+    gtk_tree_view_scroll_to_cell (treeView, treePath, NULL, FALSE, 0, 0);
+
+    // Free resources
+    gtk_tree_path_free (treePath);
+    gtk_tree_iter_free (iter2);
+    g_free (path);
+
+    // Perpetuate changes in account queue
+    if (moveUp)
+        account_list_move_up (indice);
+    else
+        account_list_move_down (indice);
+
+
+    // Set the order in the configuration file
+    dbus_set_accounts_order (account_list_get_ordered_list ());
 }
 
 /**
  * Called from move up account button signal
  */
-	static void
-account_move_up_cb(GtkButton *button UNUSED, gpointer data)
+static void
+account_move_up_cb (GtkButton *button UNUSED, gpointer data)
 {
-	// Change tree view ordering and get indice changed
-	account_move(TRUE, data);
+    // Change tree view ordering and get indice changed
+    account_move (TRUE, data);
 }
 
 /**
  * Called from move down account button signal
  */
-	static void
-account_move_down_cb(GtkButton *button UNUSED, gpointer data)
+static void
+account_move_down_cb (GtkButton *button UNUSED, gpointer data)
 {
-	// Change tree view ordering and get indice changed
-	account_move(FALSE, data);
+    // Change tree view ordering and get indice changed
+    account_move (FALSE, data);
 }
 
-	static void 
+static void
 help_contents_cb (GtkWidget * widget,
-		gpointer data UNUSED)
+                  gpointer data UNUSED)
 {
-	GError *error = NULL;
+    GError *error = NULL;
 
-	//gboolean success = gtk_show_uri (NULL, "ghelp: sflphone.xml", GDK_CURRENT_TIME, &error);
-	gnome_help_display ("sflphone.xml", "accounts", &error);
+    //gboolean success = gtk_show_uri (NULL, "ghelp: sflphone.xml", GDK_CURRENT_TIME, &error);
+    gnome_help_display ("sflphone.xml", "accounts", &error);
 
-	if (error != NULL)
-	{    
-		g_warning ("%s", error->message);
+    if (error != NULL) {
+        g_warning ("%s", error->message);
 
-		g_error_free (error);
-	}    
+        g_error_free (error);
+    }
 }
 
-	static void
+static void
 close_dialog_cb (GtkWidget * widget,
-		gpointer data UNUSED)
+                 gpointer data UNUSED)
 {
-	gtk_dialog_response(GTK_DIALOG(accountListDialog), GTK_RESPONSE_ACCEPT);
+    gtk_dialog_response (GTK_DIALOG (accountListDialog), GTK_RESPONSE_ACCEPT);
 
 }
 
-void highlight_ip_profile (GtkTreeViewColumn *col, GtkCellRenderer *rend, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) {
-
-	GValue val;
-	account_t *current;
-
-	memset (&val, 0, sizeof(val));
-	gtk_tree_model_get_value(tree_model, iter, COLUMN_ACCOUNT_DATA, &val);
-	current = (account_t*) g_value_get_pointer(&val);
-
-	g_value_unset (&val);
-
-	if (current != NULL) {
+void highlight_ip_profile (GtkTreeViewColumn *col, GtkCellRenderer *rend, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
+{
 
-		// Make the first line appear differently
-		(g_strcasecmp (current->accountID, IP2IP) == 0) ? g_object_set (G_OBJECT (rend), "weight", PANGO_WEIGHT_THIN, 
-																					 "style", PANGO_STYLE_ITALIC, 
-																					 "stretch", PANGO_STRETCH_ULTRA_EXPANDED,
-																					 "scale", 0.95,
-																					 NULL) : 
-														g_object_set (G_OBJECT (rend), "weight", PANGO_WEIGHT_MEDIUM, 
-																					 "style", PANGO_STYLE_NORMAL, 
-																					 "stretch", PANGO_STRETCH_NORMAL,
-																					 "scale", 1.0,
-																					 NULL) ; 
-	}
+    GValue val;
+    account_t *current;
+
+    memset (&val, 0, sizeof (val));
+    gtk_tree_model_get_value (tree_model, iter, COLUMN_ACCOUNT_DATA, &val);
+    current = (account_t*) g_value_get_pointer (&val);
+
+    g_value_unset (&val);
+
+    if (current != NULL) {
+
+        // Make the first line appear differently
+        (g_strcasecmp (current->accountID, IP2IP) == 0) ? g_object_set (G_OBJECT (rend), "weight", PANGO_WEIGHT_THIN,
+                "style", PANGO_STYLE_ITALIC,
+                "stretch", PANGO_STRETCH_ULTRA_EXPANDED,
+                "scale", 0.95,
+                NULL) :
+        g_object_set (G_OBJECT (rend), "weight", PANGO_WEIGHT_MEDIUM,
+                      "style", PANGO_STYLE_NORMAL,
+                      "stretch", PANGO_STRETCH_NORMAL,
+                      "scale", 1.0,
+                      NULL) ;
+    }
 }
 
-void highlight_registration (GtkTreeViewColumn *col, GtkCellRenderer *rend, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) {
+void highlight_registration (GtkTreeViewColumn *col, GtkCellRenderer *rend, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
+{
 
-	GValue val;
-	account_t *current;
-	GdkColor green = {0, 255, 0, 0};
+    GValue val;
+    account_t *current;
+    GdkColor green = {0, 255, 0, 0};
 
-	memset (&val, 0, sizeof(val));
-	gtk_tree_model_get_value(tree_model, iter, COLUMN_ACCOUNT_DATA, &val);
-	current = (account_t*) g_value_get_pointer(&val);
+    memset (&val, 0, sizeof (val));
+    gtk_tree_model_get_value (tree_model, iter, COLUMN_ACCOUNT_DATA, &val);
+    current = (account_t*) g_value_get_pointer (&val);
 
-	g_value_unset (&val);
+    g_value_unset (&val);
 
-	if (current != NULL) {
-		if (g_strcasecmp (current->accountID, IP2IP) != 0) {
-			// Color the account state: green -> registered, otherwise red
-			(current->state == ACCOUNT_STATE_REGISTERED) ? g_object_set (G_OBJECT (rend), "foreground", "Dark Green", NULL) :
-													g_object_set (G_OBJECT (rend), "foreground", "Dark Red", NULL);
-		}
-		else 
-			g_object_set (G_OBJECT (rend), "foreground", "Black", NULL);
-	}
+    if (current != NULL) {
+        if (g_strcasecmp (current->accountID, IP2IP) != 0) {
+            // Color the account state: green -> registered, otherwise red
+            (current->state == ACCOUNT_STATE_REGISTERED) ? g_object_set (G_OBJECT (rend), "foreground", "Dark Green", NULL) :
+            g_object_set (G_OBJECT (rend), "foreground", "Dark Red", NULL);
+        } else
+            g_object_set (G_OBJECT (rend), "foreground", "Black", NULL);
+    }
 
 }
 
 /**
  * Account settings tab
  */
-GtkWidget* create_account_list(GtkDialog * dialog) {
-
-	GtkWidget *table, *scrolledWindow, *buttonBox;
-	GtkCellRenderer *renderer;
-	GtkTreeView * treeView;
-	GtkTreeViewColumn *treeViewColumn;
-	GtkTreeSelection *treeSelection;
-	GtkRequisition requisition;
-
-	selectedAccount = NULL;
-
-	table = gtk_table_new (1, 2, FALSE/* homogeneous */);
-	gtk_table_set_col_spacings(GTK_TABLE(table), 10); 
-	gtk_container_set_border_width (GTK_CONTAINER (table), 10);    
-
-	scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
-	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_SHADOW_IN);
-	gtk_table_attach (GTK_TABLE(table), scrolledWindow, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	accountStore = gtk_list_store_new(COLUMN_ACCOUNT_COUNT,
-			G_TYPE_STRING,  // Name
-			G_TYPE_STRING,  // Protocol
-			G_TYPE_STRING,  // Status
-			G_TYPE_BOOLEAN, // Enabled / Disabled
-			G_TYPE_POINTER  // Pointer to the Object
-			);
-
-	account_list_config_dialog_fill();
-
-	treeView = GTK_TREE_VIEW (gtk_tree_view_new_with_model (GTK_TREE_MODEL(accountStore)));
-	treeSelection = gtk_tree_view_get_selection(GTK_TREE_VIEW (treeView));
-	g_signal_connect(G_OBJECT (treeSelection), "changed",
-			G_CALLBACK (select_account_cb),
-			accountStore);
-
-	renderer = gtk_cell_renderer_toggle_new();
-	treeViewColumn = gtk_tree_view_column_new_with_attributes("Enabled", renderer, "active", COLUMN_ACCOUNT_ACTIVE , NULL);
-	gtk_tree_view_append_column(GTK_TREE_VIEW(treeView), treeViewColumn);
-	g_signal_connect (G_OBJECT(renderer) , "toggled" , G_CALLBACK (enable_account_cb), (gpointer)treeView );
-
-	// gtk_cell_renderer_toggle_set_activatable (renderer, FALSE); 
-
-	renderer = gtk_cell_renderer_text_new();
-	treeViewColumn = gtk_tree_view_column_new_with_attributes ("Alias",
-			renderer,
-			"markup", COLUMN_ACCOUNT_ALIAS,
-			NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(treeView), treeViewColumn);
-
-	// A double click on the account line opens the window to edit the account
-	g_signal_connect( G_OBJECT( treeView ) , "row-activated" , G_CALLBACK( edit_account_cb ) , NULL );
-	gtk_tree_view_column_set_cell_data_func (treeViewColumn, renderer, highlight_ip_profile, NULL, NULL);
-
-	renderer = gtk_cell_renderer_text_new();
-	treeViewColumn = gtk_tree_view_column_new_with_attributes (_("Protocol"),
-			renderer,
-			"markup", COLUMN_ACCOUNT_TYPE,
-			NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(treeView), treeViewColumn);
-	gtk_tree_view_column_set_cell_data_func (treeViewColumn, renderer, highlight_ip_profile, NULL, NULL);
-
-	renderer = gtk_cell_renderer_text_new();
-	treeViewColumn = gtk_tree_view_column_new_with_attributes (_("Status"),
-			renderer,
-			"markup", COLUMN_ACCOUNT_STATUS,
-			NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(treeView), treeViewColumn);
-	// Highlight IP profile
-	gtk_tree_view_column_set_cell_data_func (treeViewColumn, renderer, highlight_ip_profile, NULL, NULL);
-	// Highlight account registration state 
-	gtk_tree_view_column_set_cell_data_func (treeViewColumn, renderer, highlight_registration, NULL, NULL);
-
-	g_object_unref(G_OBJECT(accountStore));
-
-	gtk_container_add (GTK_CONTAINER(scrolledWindow), GTK_WIDGET (treeView));
-
-	/* The buttons to press! */    
-	buttonBox = gtk_vbutton_box_new();
-	gtk_box_set_spacing(GTK_BOX(buttonBox), 10);
-	gtk_button_box_set_layout(GTK_BUTTON_BOX(buttonBox), GTK_BUTTONBOX_START);
-	gtk_table_attach (GTK_TABLE(table), buttonBox, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	accountMoveUpButton = gtk_button_new_from_stock(GTK_STOCK_GO_UP);
-	gtk_widget_set_sensitive(GTK_WIDGET(accountMoveUpButton), FALSE);
-	gtk_box_pack_start(GTK_BOX(buttonBox), accountMoveUpButton, FALSE, FALSE, 0);
-	g_signal_connect(G_OBJECT(accountMoveUpButton), "clicked", G_CALLBACK(account_move_up_cb), treeView);
-
-	accountMoveDownButton = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN);
-	gtk_widget_set_sensitive(GTK_WIDGET(accountMoveDownButton), FALSE);
-	gtk_box_pack_start(GTK_BOX(buttonBox), accountMoveDownButton, FALSE, FALSE, 0);
-	g_signal_connect(G_OBJECT(accountMoveDownButton), "clicked", G_CALLBACK(account_move_down_cb), treeView);
-
-	addButton = gtk_button_new_from_stock (GTK_STOCK_ADD);
-	g_signal_connect_swapped(G_OBJECT(addButton), "clicked",
-			G_CALLBACK(add_account_cb), NULL);
-	gtk_box_pack_start(GTK_BOX(buttonBox), addButton, FALSE, FALSE, 0);
-
-	editButton = gtk_button_new_from_stock (GTK_STOCK_EDIT);
-	gtk_widget_set_sensitive(GTK_WIDGET(editButton), FALSE);    
-	g_signal_connect_swapped(G_OBJECT(editButton), "clicked",
-			G_CALLBACK(edit_account_cb), NULL);
-	gtk_box_pack_start(GTK_BOX(buttonBox), editButton, FALSE, FALSE, 0);
-
-	deleteButton = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
-	gtk_widget_set_sensitive(GTK_WIDGET(deleteButton), FALSE);    
-	g_signal_connect_swapped(G_OBJECT(deleteButton), "clicked",
-			G_CALLBACK(delete_account_cb), NULL);
-	gtk_box_pack_start(GTK_BOX(buttonBox), deleteButton, FALSE, FALSE, 0);
-
-	/* help and close buttons */    
-	GtkWidget * buttonHbox = gtk_hbutton_box_new();
-	gtk_table_attach(GTK_TABLE(table), buttonHbox, 0, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 10);
-
-	GtkWidget * helpButton = gtk_button_new_from_stock (GTK_STOCK_HELP);
-	g_signal_connect_swapped(G_OBJECT(helpButton), "clicked",
-			G_CALLBACK(help_contents_cb), NULL);
-	gtk_box_pack_start(GTK_BOX(buttonHbox), helpButton, FALSE, FALSE, 0);
-
-	GtkWidget * closeButton = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
-	g_signal_connect_swapped(G_OBJECT(closeButton), "clicked",  G_CALLBACK(close_dialog_cb), NULL);
-	gtk_box_pack_start(GTK_BOX(buttonHbox), closeButton, FALSE, FALSE, 0);
-
-	gtk_widget_show_all(table);
-	// account_list_config_dialog_fill();
-
-	/* Resize the scrolledWindow for a better view */
-	gtk_widget_size_request(GTK_WIDGET(treeView), &requisition);
-	gtk_widget_set_size_request(GTK_WIDGET(scrolledWindow), requisition.width + 20, requisition.height);
-	GtkRequisition requisitionButton;
-	gtk_widget_size_request(GTK_WIDGET(deleteButton), &requisitionButton);
-	gtk_widget_set_size_request(GTK_WIDGET(closeButton), requisitionButton.width, -1);
-	gtk_widget_set_size_request(GTK_WIDGET(helpButton), requisitionButton.width, -1);    
-
-	gtk_widget_show_all(table);
-
-	return table;
+GtkWidget* create_account_list (GtkDialog * dialog)
+{
+
+    GtkWidget *table, *scrolledWindow, *buttonBox;
+    GtkCellRenderer *renderer;
+    GtkTreeView * treeView;
+    GtkTreeViewColumn *treeViewColumn;
+    GtkTreeSelection *treeSelection;
+    GtkRequisition requisition;
+
+    selectedAccount = NULL;
+
+    table = gtk_table_new (1, 2, FALSE/* homogeneous */);
+    gtk_table_set_col_spacings (GTK_TABLE (table), 10);
+    gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+
+    scrolledWindow = gtk_scrolled_window_new (NULL, NULL);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+    gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledWindow), GTK_SHADOW_IN);
+    gtk_table_attach (GTK_TABLE (table), scrolledWindow, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    accountStore = gtk_list_store_new (COLUMN_ACCOUNT_COUNT,
+                                       G_TYPE_STRING,  // Name
+                                       G_TYPE_STRING,  // Protocol
+                                       G_TYPE_STRING,  // Status
+                                       G_TYPE_BOOLEAN, // Enabled / Disabled
+                                       G_TYPE_POINTER  // Pointer to the Object
+                                      );
+
+    account_list_config_dialog_fill();
+
+    treeView = GTK_TREE_VIEW (gtk_tree_view_new_with_model (GTK_TREE_MODEL (accountStore)));
+    treeSelection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeView));
+    g_signal_connect (G_OBJECT (treeSelection), "changed",
+                      G_CALLBACK (select_account_cb),
+                      accountStore);
+
+    renderer = gtk_cell_renderer_toggle_new();
+    treeViewColumn = gtk_tree_view_column_new_with_attributes ("Enabled", renderer, "active", COLUMN_ACCOUNT_ACTIVE , NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (treeView), treeViewColumn);
+    g_signal_connect (G_OBJECT (renderer) , "toggled" , G_CALLBACK (enable_account_cb), (gpointer) treeView);
+
+    // gtk_cell_renderer_toggle_set_activatable (renderer, FALSE);
+
+    renderer = gtk_cell_renderer_text_new();
+    treeViewColumn = gtk_tree_view_column_new_with_attributes ("Alias",
+                     renderer,
+                     "markup", COLUMN_ACCOUNT_ALIAS,
+                     NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (treeView), treeViewColumn);
+
+    // A double click on the account line opens the window to edit the account
+    g_signal_connect (G_OBJECT (treeView) , "row-activated" , G_CALLBACK (edit_account_cb) , NULL);
+    gtk_tree_view_column_set_cell_data_func (treeViewColumn, renderer, highlight_ip_profile, NULL, NULL);
+
+    renderer = gtk_cell_renderer_text_new();
+    treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Protocol"),
+                     renderer,
+                     "markup", COLUMN_ACCOUNT_TYPE,
+                     NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (treeView), treeViewColumn);
+    gtk_tree_view_column_set_cell_data_func (treeViewColumn, renderer, highlight_ip_profile, NULL, NULL);
+
+    renderer = gtk_cell_renderer_text_new();
+    treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Status"),
+                     renderer,
+                     "markup", COLUMN_ACCOUNT_STATUS,
+                     NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (treeView), treeViewColumn);
+    // Highlight IP profile
+    gtk_tree_view_column_set_cell_data_func (treeViewColumn, renderer, highlight_ip_profile, NULL, NULL);
+    // Highlight account registration state
+    gtk_tree_view_column_set_cell_data_func (treeViewColumn, renderer, highlight_registration, NULL, NULL);
+
+    g_object_unref (G_OBJECT (accountStore));
+
+    gtk_container_add (GTK_CONTAINER (scrolledWindow), GTK_WIDGET (treeView));
+
+    /* The buttons to press! */
+    buttonBox = gtk_vbutton_box_new();
+    gtk_box_set_spacing (GTK_BOX (buttonBox), 10);
+    gtk_button_box_set_layout (GTK_BUTTON_BOX (buttonBox), GTK_BUTTONBOX_START);
+    gtk_table_attach (GTK_TABLE (table), buttonBox, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    accountMoveUpButton = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
+    gtk_widget_set_sensitive (GTK_WIDGET (accountMoveUpButton), FALSE);
+    gtk_box_pack_start (GTK_BOX (buttonBox), accountMoveUpButton, FALSE, FALSE, 0);
+    g_signal_connect (G_OBJECT (accountMoveUpButton), "clicked", G_CALLBACK (account_move_up_cb), treeView);
+
+    accountMoveDownButton = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
+    gtk_widget_set_sensitive (GTK_WIDGET (accountMoveDownButton), FALSE);
+    gtk_box_pack_start (GTK_BOX (buttonBox), accountMoveDownButton, FALSE, FALSE, 0);
+    g_signal_connect (G_OBJECT (accountMoveDownButton), "clicked", G_CALLBACK (account_move_down_cb), treeView);
+
+    addButton = gtk_button_new_from_stock (GTK_STOCK_ADD);
+    g_signal_connect_swapped (G_OBJECT (addButton), "clicked",
+                              G_CALLBACK (add_account_cb), NULL);
+    gtk_box_pack_start (GTK_BOX (buttonBox), addButton, FALSE, FALSE, 0);
+
+    editButton = gtk_button_new_from_stock (GTK_STOCK_EDIT);
+    gtk_widget_set_sensitive (GTK_WIDGET (editButton), FALSE);
+    g_signal_connect_swapped (G_OBJECT (editButton), "clicked",
+                              G_CALLBACK (edit_account_cb), NULL);
+    gtk_box_pack_start (GTK_BOX (buttonBox), editButton, FALSE, FALSE, 0);
+
+    deleteButton = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+    gtk_widget_set_sensitive (GTK_WIDGET (deleteButton), FALSE);
+    g_signal_connect_swapped (G_OBJECT (deleteButton), "clicked",
+                              G_CALLBACK (delete_account_cb), NULL);
+    gtk_box_pack_start (GTK_BOX (buttonBox), deleteButton, FALSE, FALSE, 0);
+
+    /* help and close buttons */
+    GtkWidget * buttonHbox = gtk_hbutton_box_new();
+    gtk_table_attach (GTK_TABLE (table), buttonHbox, 0, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 10);
+
+    GtkWidget * helpButton = gtk_button_new_from_stock (GTK_STOCK_HELP);
+    g_signal_connect_swapped (G_OBJECT (helpButton), "clicked",
+                              G_CALLBACK (help_contents_cb), NULL);
+    gtk_box_pack_start (GTK_BOX (buttonHbox), helpButton, FALSE, FALSE, 0);
+
+    GtkWidget * closeButton = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
+    g_signal_connect_swapped (G_OBJECT (closeButton), "clicked",  G_CALLBACK (close_dialog_cb), NULL);
+    gtk_box_pack_start (GTK_BOX (buttonHbox), closeButton, FALSE, FALSE, 0);
+
+    gtk_widget_show_all (table);
+    // account_list_config_dialog_fill();
+
+    /* Resize the scrolledWindow for a better view */
+    gtk_widget_size_request (GTK_WIDGET (treeView), &requisition);
+    gtk_widget_set_size_request (GTK_WIDGET (scrolledWindow), requisition.width + 20, requisition.height);
+    GtkRequisition requisitionButton;
+    gtk_widget_size_request (GTK_WIDGET (deleteButton), &requisitionButton);
+    gtk_widget_set_size_request (GTK_WIDGET (closeButton), requisitionButton.width, -1);
+    gtk_widget_set_size_request (GTK_WIDGET (helpButton), requisitionButton.width, -1);
+
+    gtk_widget_show_all (table);
+
+    return table;
 }
 
-	void
-show_account_list_config_dialog(void)
+void
+show_account_list_config_dialog (void)
 {
-	GtkWidget * accountFrame;
-	GtkWidget * tab;
-
-	accountListDialog = GTK_DIALOG(gtk_dialog_new_with_buttons (_("Accounts"),
-				GTK_WINDOW(get_main_window()),
-				GTK_DIALOG_DESTROY_WITH_PARENT,
-				NULL));
-
-	/* Set window properties */
-	gtk_dialog_set_has_separator(accountListDialog, FALSE);
-	gtk_container_set_border_width(GTK_CONTAINER(accountListDialog), 0);
-	gtk_window_set_resizable(GTK_WINDOW(accountListDialog), FALSE);
-
-	gnome_main_section_new (_("Configured Accounts"), &accountFrame);
-	gtk_box_pack_start( GTK_BOX(accountListDialog->vbox ), accountFrame , TRUE, TRUE, 0);
-	gtk_widget_show(accountFrame);
-
-	/* Accounts tab */
-	tab = create_account_list(accountListDialog);
-	gtk_widget_show(tab);    
-	gtk_container_add(GTK_CONTAINER(accountFrame), tab);
-
-	/* Status bar for the account list */
-	status_bar = gtk_statusbar_new();
-	gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (status_bar), FALSE);    
-	gtk_widget_show(status_bar);
-	gtk_box_pack_start(GTK_BOX(accountListDialog->vbox ), status_bar, TRUE, TRUE, 0);
-
-	int number_accounts = account_list_get_registered_accounts ();
-	if (number_accounts) {
-		gchar * message = g_strdup_printf(n_("There is %d active account",
-					"There are %d active accounts", number_accounts),
-				number_accounts);
-		gtk_statusbar_push (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION, message);
-		g_free(message);
-	} else {
-		gtk_statusbar_push (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION, _("You have no active account"));        
-	}
-
-	gtk_dialog_run(accountListDialog);
-
-	status_bar_display_account ();
-
-	gtk_widget_destroy(GTK_WIDGET(accountListDialog));
-
-	accountListDialog = NULL;
-
-	update_actions ();
+    GtkWidget * accountFrame;
+    GtkWidget * tab;
+
+    accountListDialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_ ("Accounts"),
+                                    GTK_WINDOW (get_main_window()),
+                                    GTK_DIALOG_DESTROY_WITH_PARENT,
+                                    NULL));
+
+    /* Set window properties */
+    gtk_dialog_set_has_separator (accountListDialog, FALSE);
+    gtk_container_set_border_width (GTK_CONTAINER (accountListDialog), 0);
+    gtk_window_set_resizable (GTK_WINDOW (accountListDialog), FALSE);
+
+    gnome_main_section_new (_ ("Configured Accounts"), &accountFrame);
+    gtk_box_pack_start (GTK_BOX (accountListDialog->vbox), accountFrame , TRUE, TRUE, 0);
+    gtk_widget_show (accountFrame);
+
+    /* Accounts tab */
+    tab = create_account_list (accountListDialog);
+    gtk_widget_show (tab);
+    gtk_container_add (GTK_CONTAINER (accountFrame), tab);
+
+    /* Status bar for the account list */
+    status_bar = gtk_statusbar_new();
+    gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (status_bar), FALSE);
+    gtk_widget_show (status_bar);
+    gtk_box_pack_start (GTK_BOX (accountListDialog->vbox), status_bar, TRUE, TRUE, 0);
+
+    int number_accounts = account_list_get_registered_accounts ();
+
+    if (number_accounts) {
+        gchar * message = g_strdup_printf (n_ ("There is %d active account",
+                                               "There are %d active accounts", number_accounts),
+                                           number_accounts);
+        gtk_statusbar_push (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION, message);
+        g_free (message);
+    } else {
+        gtk_statusbar_push (GTK_STATUSBAR (status_bar), CONTEXT_ID_REGISTRATION, _ ("You have no active account"));
+    }
+
+    gtk_dialog_run (accountListDialog);
+
+    status_bar_display_account ();
+
+    gtk_widget_destroy (GTK_WIDGET (accountListDialog));
+
+    accountListDialog = NULL;
+
+    update_actions ();
 }
 
 
 /**
  * Delete an account
  */
-static void delete_account_cb (void) {
-	
-	if(selectedAccount != NULL) {
-		dbus_remove_account(selectedAccount->accountID);
-	}
+static void delete_account_cb (void)
+{
+
+    if (selectedAccount != NULL) {
+        dbus_remove_account (selectedAccount->accountID);
+    }
 }
 
 
 /**
  * Edit an account
  */
-static void edit_account_cb (void) {
+static void edit_account_cb (void)
+{
 
-	if(selectedAccount != NULL) {
-		show_account_window (selectedAccount);
-	} 
+    if (selectedAccount != NULL) {
+        show_account_window (selectedAccount);
+    }
 }
 
 /**
  * Add an account
  */
-static void add_account_cb (void) {
+static void add_account_cb (void)
+{
 
-	show_account_window (NULL);
+    show_account_window (NULL);
 }
diff --git a/sflphone-client-gnome/src/config/accountlistconfigdialog.h b/sflphone-client-gnome/src/config/accountlistconfigdialog.h
index a1ec479f2b6d274d4b2d81b0cb5fba673e56c605..d2b4c5e0e163efd3e36148962f7351bac813f86c 100644
--- a/sflphone-client-gnome/src/config/accountlistconfigdialog.h
+++ b/sflphone-client-gnome/src/config/accountlistconfigdialog.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -34,9 +34,9 @@
 
 #include <sflphone_const.h>
 
-void show_account_list_config_dialog(void);
-void account_list_config_dialog_fill(void);
-   
+void show_account_list_config_dialog (void);
+void account_list_config_dialog_fill (void);
+
 static void delete_account_cb (void);
 
 static void add_account_cb (void);
diff --git a/sflphone-client-gnome/src/config/addressbook-config.c b/sflphone-client-gnome/src/config/addressbook-config.c
index 34a2d05583f31cab857c00a11cfdbb0f90253c28..ae08d55b2fea17e50bab04607871322b6c74a4f6 100644
--- a/sflphone-client-gnome/src/config/addressbook-config.c
+++ b/sflphone-client-gnome/src/config/addressbook-config.c
@@ -38,13 +38,12 @@ GtkWidget *book_tree_view;
 
 GtkWidget *photo, *cards_label, *scale_label, *scrolled_label, *scrolled_window, *scale_button, *business, *mobile, *home;
 
-enum
-{
+enum {
     COLUMN_BOOK_ACTIVE, COLUMN_BOOK_NAME, COLUMN_BOOK_UID
 };
 
-    void
-addressbook_config_load_parameters(AddressBook_Config **settings)
+void
+addressbook_config_load_parameters (AddressBook_Config **settings)
 {
 
     GHashTable *_params = NULL;
@@ -56,143 +55,138 @@ addressbook_config_load_parameters(AddressBook_Config **settings)
     // Fetch the settings from D-Bus
     _params = (GHashTable*) dbus_get_addressbook_settings();
 
-    if (_params == NULL)
-    {
+    if (_params == NULL) {
         _settings->enable = 1;
         _settings->max_results = 30;
         _settings->display_contact_photo = 0;
         _settings->search_phone_business = 1;
         _settings->search_phone_home = 1;
         _settings->search_phone_mobile = 1;
-    }
-    else
-    {
-        _settings->enable = (gint64) (g_hash_table_lookup (_params, 
-                    ADDRESSBOOK_ENABLE));
-        _settings->max_results = (gint64) (g_hash_table_lookup(_params,
-                    ADDRESSBOOK_MAX_RESULTS));
-        _settings->display_contact_photo = (gint64) (g_hash_table_lookup(_params,
-                    ADDRESSBOOK_DISPLAY_CONTACT_PHOTO));
-        _settings->search_phone_business = (gint64) (g_hash_table_lookup(_params,
-                    ADDRESSBOOK_DISPLAY_PHONE_BUSINESS));
-        _settings->search_phone_home = (gint64) (g_hash_table_lookup(_params,
-                    ADDRESSBOOK_DISPLAY_PHONE_HOME));
-        _settings->search_phone_mobile = (gint64) (g_hash_table_lookup(_params,
-                    ADDRESSBOOK_DISPLAY_PHONE_MOBILE));
+    } else {
+        _settings->enable = (gint64) (g_hash_table_lookup (_params,
+                                      ADDRESSBOOK_ENABLE));
+        _settings->max_results = (gint64) (g_hash_table_lookup (_params,
+                                           ADDRESSBOOK_MAX_RESULTS));
+        _settings->display_contact_photo = (gint64) (g_hash_table_lookup (_params,
+                                           ADDRESSBOOK_DISPLAY_CONTACT_PHOTO));
+        _settings->search_phone_business = (gint64) (g_hash_table_lookup (_params,
+                                           ADDRESSBOOK_DISPLAY_PHONE_BUSINESS));
+        _settings->search_phone_home = (gint64) (g_hash_table_lookup (_params,
+                                       ADDRESSBOOK_DISPLAY_PHONE_HOME));
+        _settings->search_phone_mobile = (gint64) (g_hash_table_lookup (_params,
+                                         ADDRESSBOOK_DISPLAY_PHONE_MOBILE));
     }
 
     *settings = _settings;
 }
 
-    void
-addressbook_config_save_parameters(void)
+void
+addressbook_config_save_parameters (void)
 {
 
     GHashTable *params = NULL;
 
-    params = g_hash_table_new(NULL, g_str_equal);
-    g_hash_table_replace(params, (gpointer) ADDRESSBOOK_ENABLE,
-            (gpointer) addressbook_config->enable);
-    g_hash_table_replace(params, (gpointer) ADDRESSBOOK_MAX_RESULTS,
-            (gpointer) addressbook_config->max_results);
-    g_hash_table_replace(params, (gpointer) ADDRESSBOOK_DISPLAY_CONTACT_PHOTO,
-            (gpointer) addressbook_config->display_contact_photo);
-    g_hash_table_replace(params, (gpointer) ADDRESSBOOK_DISPLAY_PHONE_BUSINESS,
-            (gpointer) addressbook_config->search_phone_business);
-    g_hash_table_replace(params, (gpointer) ADDRESSBOOK_DISPLAY_PHONE_HOME,
-            (gpointer) addressbook_config->search_phone_home);
-    g_hash_table_replace(params, (gpointer) ADDRESSBOOK_DISPLAY_PHONE_MOBILE,
-            (gpointer) addressbook_config->search_phone_mobile);
-
-    dbus_set_addressbook_settings(params);
+    params = g_hash_table_new (NULL, g_str_equal);
+    g_hash_table_replace (params, (gpointer) ADDRESSBOOK_ENABLE,
+                          (gpointer) addressbook_config->enable);
+    g_hash_table_replace (params, (gpointer) ADDRESSBOOK_MAX_RESULTS,
+                          (gpointer) addressbook_config->max_results);
+    g_hash_table_replace (params, (gpointer) ADDRESSBOOK_DISPLAY_CONTACT_PHOTO,
+                          (gpointer) addressbook_config->display_contact_photo);
+    g_hash_table_replace (params, (gpointer) ADDRESSBOOK_DISPLAY_PHONE_BUSINESS,
+                          (gpointer) addressbook_config->search_phone_business);
+    g_hash_table_replace (params, (gpointer) ADDRESSBOOK_DISPLAY_PHONE_HOME,
+                          (gpointer) addressbook_config->search_phone_home);
+    g_hash_table_replace (params, (gpointer) ADDRESSBOOK_DISPLAY_PHONE_MOBILE,
+                          (gpointer) addressbook_config->search_phone_mobile);
+
+    dbus_set_addressbook_settings (params);
 
     // Decrement the reference count
-    g_hash_table_unref(params);
+    g_hash_table_unref (params);
 }
 
 void
-enable_options(){
-
-    if (!addressbook_config->enable)
-    {
-        DEBUG("Disable addressbook options\n");
-        gtk_widget_set_sensitive(photo, FALSE);
-	gtk_widget_set_sensitive(scrolled_label, FALSE);
-	gtk_widget_set_sensitive(cards_label, FALSE);
-        gtk_widget_set_sensitive(scrolled_window, FALSE);
-        gtk_widget_set_sensitive(scale_button, FALSE);
-        gtk_widget_set_sensitive(scale_label, FALSE);
-	gtk_widget_set_sensitive(business, FALSE);
-        gtk_widget_set_sensitive(mobile, FALSE);
-        gtk_widget_set_sensitive(home, FALSE);
-	gtk_widget_set_sensitive(book_tree_view, FALSE);
-        
-	
-    }
-    else
-    {
-      DEBUG("Enable addressbook options\n");
-	gtk_widget_set_sensitive(photo, TRUE);
-	gtk_widget_set_sensitive(scrolled_label, TRUE);
-	gtk_widget_set_sensitive(cards_label, TRUE);
-        gtk_widget_set_sensitive(scrolled_window, TRUE);
-        gtk_widget_set_sensitive(scale_button, TRUE);
-	gtk_widget_set_sensitive(scale_label, TRUE);
-	gtk_widget_set_sensitive(business, TRUE);
-        gtk_widget_set_sensitive(mobile, TRUE);
-        gtk_widget_set_sensitive(home, TRUE);
-	gtk_widget_set_sensitive(book_tree_view, TRUE);
+enable_options()
+{
+
+    if (!addressbook_config->enable) {
+        DEBUG ("Disable addressbook options\n");
+        gtk_widget_set_sensitive (photo, FALSE);
+        gtk_widget_set_sensitive (scrolled_label, FALSE);
+        gtk_widget_set_sensitive (cards_label, FALSE);
+        gtk_widget_set_sensitive (scrolled_window, FALSE);
+        gtk_widget_set_sensitive (scale_button, FALSE);
+        gtk_widget_set_sensitive (scale_label, FALSE);
+        gtk_widget_set_sensitive (business, FALSE);
+        gtk_widget_set_sensitive (mobile, FALSE);
+        gtk_widget_set_sensitive (home, FALSE);
+        gtk_widget_set_sensitive (book_tree_view, FALSE);
+
+
+    } else {
+        DEBUG ("Enable addressbook options\n");
+        gtk_widget_set_sensitive (photo, TRUE);
+        gtk_widget_set_sensitive (scrolled_label, TRUE);
+        gtk_widget_set_sensitive (cards_label, TRUE);
+        gtk_widget_set_sensitive (scrolled_window, TRUE);
+        gtk_widget_set_sensitive (scale_button, TRUE);
+        gtk_widget_set_sensitive (scale_label, TRUE);
+        gtk_widget_set_sensitive (business, TRUE);
+        gtk_widget_set_sensitive (mobile, TRUE);
+        gtk_widget_set_sensitive (home, TRUE);
+        gtk_widget_set_sensitive (book_tree_view, TRUE);
     }
 }
 
-    static void
+static void
 enable_cb (GtkWidget *widget)
 {
 
     addressbook_config->enable
-        = (guint) gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+    = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 
     enable_options();
 
-    
+
 }
 
-    static void
+static void
 max_results_cb (GtkSpinButton *button)
 {
-    addressbook_config->max_results = gtk_spin_button_get_value_as_int(button);
+    addressbook_config->max_results = gtk_spin_button_get_value_as_int (button);
 }
 
-    static void
-display_contact_photo_cb(GtkWidget *widget)
+static void
+display_contact_photo_cb (GtkWidget *widget)
 {
 
     addressbook_config->display_contact_photo
-        = (guint) gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+    = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 }
 
-    static void
-search_phone_business_cb(GtkWidget *widget)
+static void
+search_phone_business_cb (GtkWidget *widget)
 {
 
     addressbook_config->search_phone_business
-        = (guint) gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+    = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 }
 
-    static void
-search_phone_home_cb(GtkWidget *widget)
+static void
+search_phone_home_cb (GtkWidget *widget)
 {
 
-    addressbook_config->search_phone_home = (guint) gtk_toggle_button_get_active(
-            GTK_TOGGLE_BUTTON(widget));
+    addressbook_config->search_phone_home = (guint) gtk_toggle_button_get_active (
+                                                GTK_TOGGLE_BUTTON (widget));
 }
 
-    static void
-search_phone_mobile_cb(GtkWidget *widget)
+static void
+search_phone_mobile_cb (GtkWidget *widget)
 {
 
     addressbook_config->search_phone_mobile
-        = (guint) gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+    = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 }
 
 /**
@@ -200,8 +194,8 @@ search_phone_mobile_cb(GtkWidget *widget)
  * and in configuration files
  */
 static void
-addressbook_config_book_active_toggled(
-        GtkCellRendererToggle *renderer UNUSED, gchar *path, gpointer data)
+addressbook_config_book_active_toggled (
+    GtkCellRendererToggle *renderer UNUSED, gchar *path, gpointer data)
 {
     GtkTreeIter iter;
     GtkTreePath *treePath;
@@ -211,66 +205,64 @@ addressbook_config_book_active_toggled(
     gchar* uid;
 
     // Get path of clicked book active toggle box
-    treePath = gtk_tree_path_new_from_string(path);
-    model = gtk_tree_view_get_model(GTK_TREE_VIEW(data));
-    gtk_tree_model_get_iter(model, &iter, treePath);
+    treePath = gtk_tree_path_new_from_string (path);
+    model = gtk_tree_view_get_model (GTK_TREE_VIEW (data));
+    gtk_tree_model_get_iter (model, &iter, treePath);
 
     // Get active value  at iteration
-    gtk_tree_model_get(model, &iter, COLUMN_BOOK_ACTIVE, &active,
-            COLUMN_BOOK_UID, &uid, COLUMN_BOOK_NAME, &name, -1);
+    gtk_tree_model_get (model, &iter, COLUMN_BOOK_ACTIVE, &active,
+                        COLUMN_BOOK_UID, &uid, COLUMN_BOOK_NAME, &name, -1);
 
     // Toggle active value
     active = !active;
 
     // Store value
-    gtk_list_store_set(GTK_LIST_STORE(model), &iter, COLUMN_BOOK_ACTIVE, active, -1);
+    gtk_list_store_set (GTK_LIST_STORE (model), &iter, COLUMN_BOOK_ACTIVE, active, -1);
 
-    gtk_tree_path_free(treePath);
+    gtk_tree_path_free (treePath);
 
     // Update current memory stored books data
-    books_get_book_data_by_uid(uid)->active = active;
+    books_get_book_data_by_uid (uid)->active = active;
 
     // Save data
 
     gboolean valid;
 
     // Initiate double array char list for one string
-    const gchar** list = (void*) malloc(sizeof(void*));
+    const gchar** list = (void*) malloc (sizeof (void*));
     int c = 0;
 
     /* Get the first iter in the list */
-    valid = gtk_tree_model_get_iter_first(model, &iter);
+    valid = gtk_tree_model_get_iter_first (model, &iter);
 
-    while (valid)
-    {
+    while (valid) {
         // Get active value at iteration
-        gtk_tree_model_get(model, &iter, COLUMN_BOOK_ACTIVE, &active,
-                COLUMN_BOOK_UID, &uid, COLUMN_BOOK_NAME, &name, -1);
+        gtk_tree_model_get (model, &iter, COLUMN_BOOK_ACTIVE, &active,
+                            COLUMN_BOOK_UID, &uid, COLUMN_BOOK_NAME, &name, -1);
 
-        if (active)
-        {
+        if (active) {
             // Reallocate memory each time
             if (c != 0)
-                list = (void*) realloc(list, (c + 1) * sizeof(void*));
+                list = (void*) realloc (list, (c + 1) * sizeof (void*));
 
-            *(list + c) = uid;
+            * (list + c) = uid;
             c++;
         }
 
-        valid = gtk_tree_model_iter_next(model, &iter);
+        valid = gtk_tree_model_iter_next (model, &iter);
     }
 
     // Allocate NULL array at the end for Dbus
-    list = (void*) realloc(list, (c + 1) * sizeof(void*));
-    *(list + c) = NULL;
+    list = (void*) realloc (list, (c + 1) * sizeof (void*));
+    * (list + c) = NULL;
 
     // Call daemon to store in config file
-    dbus_set_addressbook_list(list);
+    dbus_set_addressbook_list (list);
 
-    free(list);
+    free (list);
 }
 
-    static void
+static void
 addressbook_config_fill_book_list()
 {
     GtkTreeIter list_store_iterator;
@@ -280,24 +272,23 @@ addressbook_config_fill_book_list()
     GSList *books_data = addressbook_get_books_data();
 
     // Get model of view and clear it
-    store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(book_tree_view)));
-    gtk_list_store_clear(store);
+    store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (book_tree_view)));
+    gtk_list_store_clear (store);
 
     // Populate window
     for (book_list_iterator = books_data; book_list_iterator != NULL; book_list_iterator
-            = book_list_iterator->next)
-    {
+            = book_list_iterator->next) {
         book_data = (book_data_t *) book_list_iterator->data;
-        gtk_list_store_append(store, &list_store_iterator);
-        gtk_list_store_set(store, &list_store_iterator, COLUMN_BOOK_ACTIVE,
-                book_data->active, COLUMN_BOOK_UID, book_data->uid, COLUMN_BOOK_NAME,
-                book_data->name, -1);
+        gtk_list_store_append (store, &list_store_iterator);
+        gtk_list_store_set (store, &list_store_iterator, COLUMN_BOOK_ACTIVE,
+                            book_data->active, COLUMN_BOOK_UID, book_data->uid, COLUMN_BOOK_NAME,
+                            book_data->name, -1);
     }
 
-    store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(book_tree_view)));
+    store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (book_tree_view)));
 }
 
-    GtkWidget*
+GtkWidget*
 create_addressbook_settings()
 {
 
@@ -309,140 +300,140 @@ create_addressbook_settings()
     GtkTreeViewColumn *tree_view_column;
 
     // Load the user value
-    addressbook_config_load_parameters(&addressbook_config);
+    addressbook_config_load_parameters (&addressbook_config);
 
-    ret = gtk_vbox_new(FALSE, 10);
-    gtk_container_set_border_width(GTK_CONTAINER(ret), 10);
+    ret = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
 
-    gnome_main_section_new_with_table (_("General"), &result_frame, &table, 3, 3);
-    gtk_box_pack_start(GTK_BOX(ret), result_frame, FALSE, FALSE, 0);
+    gnome_main_section_new_with_table (_ ("General"), &result_frame, &table, 3, 3);
+    gtk_box_pack_start (GTK_BOX (ret), result_frame, FALSE, FALSE, 0);
     // gtk_widget_show (result_frame);
 
 
     // PHOTO DISPLAY
-    item = gtk_check_button_new_with_mnemonic( _("_Use Evolution address books"));
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(item), addressbook_config->enable);
-    g_signal_connect (G_OBJECT(item) , "clicked" , G_CALLBACK (enable_cb), NULL);
-    gtk_table_attach ( GTK_TABLE( table ), item, 1, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    item = gtk_check_button_new_with_mnemonic (_ ("_Use Evolution address books"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), addressbook_config->enable);
+    g_signal_connect (G_OBJECT (item) , "clicked" , G_CALLBACK (enable_cb), NULL);
+    gtk_table_attach (GTK_TABLE (table), item, 1, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
     // SCALE BUTTON - NUMBER OF RESULTS
-    scale_button = gtk_hbox_new(FALSE, 0);
-    scale_label = gtk_label_new (_("Download limit :"));
-    gtk_box_pack_start(GTK_BOX(scale_button),scale_label,FALSE,FALSE,0);
-    value = gtk_spin_button_new_with_range(1, 500, 1);
+    scale_button = gtk_hbox_new (FALSE, 0);
+    scale_label = gtk_label_new (_ ("Download limit :"));
+    gtk_box_pack_start (GTK_BOX (scale_button),scale_label,FALSE,FALSE,0);
+    value = gtk_spin_button_new_with_range (1, 500, 1);
     gtk_label_set_mnemonic_widget (GTK_LABEL (scale_label), value);
-    gtk_spin_button_set_value (GTK_SPIN_BUTTON( value ) , addressbook_config->max_results);
-    g_signal_connect (G_OBJECT (value) , "value-changed" , G_CALLBACK(max_results_cb), NULL );
-    gtk_box_pack_start(GTK_BOX(scale_button),value,TRUE,TRUE,10);
-    gtk_table_attach ( GTK_TABLE( table ), scale_button, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND |GTK_FILL, 0, 0);
-    cards_label = gtk_label_new(_("cards"));
-    gtk_table_attach( GTK_TABLE(table), cards_label, 2, 3, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_widget_show_all(scale_button);
-    
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON (value) , addressbook_config->max_results);
+    g_signal_connect (G_OBJECT (value) , "value-changed" , G_CALLBACK (max_results_cb), NULL);
+    gtk_box_pack_start (GTK_BOX (scale_button),value,TRUE,TRUE,10);
+    gtk_table_attach (GTK_TABLE (table), scale_button, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND |GTK_FILL, 0, 0);
+    cards_label = gtk_label_new (_ ("cards"));
+    gtk_table_attach (GTK_TABLE (table), cards_label, 2, 3, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_show_all (scale_button);
+
 
     // PHOTO DISPLAY
-    photo = gtk_check_button_new_with_mnemonic( _("_Display contact photo if available"));
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(photo), addressbook_config->display_contact_photo);
-    g_signal_connect (G_OBJECT(photo) , "clicked" , G_CALLBACK (display_contact_photo_cb), NULL);
-    gtk_table_attach ( GTK_TABLE( table ), photo, 1, 3, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    
+    photo = gtk_check_button_new_with_mnemonic (_ ("_Display contact photo if available"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (photo), addressbook_config->display_contact_photo);
+    g_signal_connect (G_OBJECT (photo) , "clicked" , G_CALLBACK (display_contact_photo_cb), NULL);
+    gtk_table_attach (GTK_TABLE (table), photo, 1, 3, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
 
 
     // Fields
-    gnome_main_section_new_with_table (_("Fields from Evolution's address books"), &result_frame, &table, 1, 3);
-    gtk_box_pack_start(GTK_BOX(ret), result_frame, FALSE, FALSE, 0);
+    gnome_main_section_new_with_table (_ ("Fields from Evolution's address books"), &result_frame, &table, 1, 3);
+    gtk_box_pack_start (GTK_BOX (ret), result_frame, FALSE, FALSE, 0);
     // gtk_widget_show (result_frame);
 
-    business = gtk_check_button_new_with_mnemonic( _("_Work"));
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(business), addressbook_config->search_phone_business);
-    g_signal_connect (G_OBJECT(business) , "clicked" , G_CALLBACK (search_phone_business_cb) , NULL);
-    gtk_table_attach ( GTK_TABLE( table ), business, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_widget_set_sensitive(business, FALSE);
+    business = gtk_check_button_new_with_mnemonic (_ ("_Work"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (business), addressbook_config->search_phone_business);
+    g_signal_connect (G_OBJECT (business) , "clicked" , G_CALLBACK (search_phone_business_cb) , NULL);
+    gtk_table_attach (GTK_TABLE (table), business, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (business, FALSE);
 
-    home = gtk_check_button_new_with_mnemonic( _("_Home"));
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(home), addressbook_config->search_phone_home);
-    g_signal_connect (G_OBJECT(home) , "clicked" , G_CALLBACK (search_phone_home_cb) , NULL);
-    gtk_table_attach ( GTK_TABLE( table ), home, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_widget_set_sensitive(home, FALSE);
+    home = gtk_check_button_new_with_mnemonic (_ ("_Home"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (home), addressbook_config->search_phone_home);
+    g_signal_connect (G_OBJECT (home) , "clicked" , G_CALLBACK (search_phone_home_cb) , NULL);
+    gtk_table_attach (GTK_TABLE (table), home, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (home, FALSE);
+
+    mobile = gtk_check_button_new_with_mnemonic (_ ("_Mobile"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mobile), addressbook_config->search_phone_mobile);
+    g_signal_connect (G_OBJECT (mobile) , "clicked" , G_CALLBACK (search_phone_mobile_cb) , NULL);
+    gtk_table_attach (GTK_TABLE (table), mobile, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
-    mobile = gtk_check_button_new_with_mnemonic( _("_Mobile"));
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(mobile), addressbook_config->search_phone_mobile);
-    g_signal_connect (G_OBJECT(mobile) , "clicked" , G_CALLBACK (search_phone_mobile_cb) , NULL);
-    gtk_table_attach ( GTK_TABLE( table ), mobile, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    
 
     // Address Book
-    gnome_main_section_new_with_table (_("Address Books"), &result_frame, &table, 2, 3);
-    gtk_box_pack_start(GTK_BOX(ret), result_frame, TRUE, TRUE, 0);
+    gnome_main_section_new_with_table (_ ("Address Books"), &result_frame, &table, 2, 3);
+    gtk_box_pack_start (GTK_BOX (ret), result_frame, TRUE, TRUE, 0);
     gtk_widget_show (result_frame);
 
-    scrolled_label = gtk_label_new (_("Select which Evolution address books to use"));
-    gtk_misc_set_alignment(GTK_MISC(scrolled_label), 0.00, 0.2);
-    
-    gtk_table_attach ( GTK_TABLE( table ), scrolled_label, 1, 4, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_widget_set_sensitive(scrolled_label, FALSE);
+    scrolled_label = gtk_label_new (_ ("Select which Evolution address books to use"));
+    gtk_misc_set_alignment (GTK_MISC (scrolled_label), 0.00, 0.2);
+
+    gtk_table_attach (GTK_TABLE (table), scrolled_label, 1, 4, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (scrolled_label, FALSE);
 
-    scrolled_window = gtk_scrolled_window_new(NULL, NULL);
-    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-    gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolled_window), GTK_SHADOW_IN);
+    scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+    gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN);
 
-    gtk_table_attach ( GTK_TABLE( table ), scrolled_window, 1, 4, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_table_attach (GTK_TABLE (table), scrolled_window, 1, 4, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
 
 
-    store = gtk_list_store_new(3,
-            G_TYPE_BOOLEAN,             // Active
-            G_TYPE_STRING,             // uid
-            G_TYPE_STRING              // Name
-            );
+    store = gtk_list_store_new (3,
+                                G_TYPE_BOOLEAN,             // Active
+                                G_TYPE_STRING,             // uid
+                                G_TYPE_STRING              // Name
+                               );
 
     // Create tree view with list store
-    book_tree_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
+    book_tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
 
     // Get tree selection manager
-    tree_selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(book_tree_view));
+    tree_selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (book_tree_view));
 
     // Active column
     renderer = gtk_cell_renderer_toggle_new();
-    tree_view_column = gtk_tree_view_column_new_with_attributes("", renderer, "active", COLUMN_BOOK_ACTIVE, NULL);
-    gtk_tree_view_append_column(GTK_TREE_VIEW(book_tree_view), tree_view_column);
+    tree_view_column = gtk_tree_view_column_new_with_attributes ("", renderer, "active", COLUMN_BOOK_ACTIVE, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (book_tree_view), tree_view_column);
 
     // Toggle active property on clicked
-    g_signal_connect(G_OBJECT(renderer), "toggled", G_CALLBACK(addressbook_config_book_active_toggled), (gpointer)book_tree_view);
+    g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (addressbook_config_book_active_toggled), (gpointer) book_tree_view);
 
     // Name column
     renderer = gtk_cell_renderer_text_new();
-    tree_view_column = gtk_tree_view_column_new_with_attributes(_("Name"), renderer, "markup", COLUMN_BOOK_NAME, NULL);
-    gtk_tree_view_append_column(GTK_TREE_VIEW(book_tree_view), tree_view_column);
+    tree_view_column = gtk_tree_view_column_new_with_attributes (_ ("Name"), renderer, "markup", COLUMN_BOOK_NAME, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (book_tree_view), tree_view_column);
 
-    g_object_unref(G_OBJECT(store));
-    gtk_container_add(GTK_CONTAINER(scrolled_window), book_tree_view);
+    g_object_unref (G_OBJECT (store));
+    gtk_container_add (GTK_CONTAINER (scrolled_window), book_tree_view);
 
     addressbook_config_fill_book_list();
 
-    gtk_widget_show_all(ret);
+    gtk_widget_show_all (ret);
 
     enable_options();
 
     return ret;
 }
 
-    gboolean
-addressbook_display(AddressBook_Config *settings, const gchar *field)
+gboolean
+addressbook_display (AddressBook_Config *settings, const gchar *field)
 {
 
     gboolean display = FALSE;
 
-    if (g_strcasecmp(field, ADDRESSBOOK_DISPLAY_CONTACT_PHOTO) == 0)
+    if (g_strcasecmp (field, ADDRESSBOOK_DISPLAY_CONTACT_PHOTO) == 0)
         display = (settings->display_contact_photo == 1) ? TRUE : FALSE;
 
-    else if (g_strcasecmp(field, ADDRESSBOOK_DISPLAY_PHONE_BUSINESS) == 0)
+    else if (g_strcasecmp (field, ADDRESSBOOK_DISPLAY_PHONE_BUSINESS) == 0)
         display = (settings->search_phone_business == 1) ? TRUE : FALSE;
 
-    else if (g_strcasecmp(field, ADDRESSBOOK_DISPLAY_PHONE_HOME) == 0)
+    else if (g_strcasecmp (field, ADDRESSBOOK_DISPLAY_PHONE_HOME) == 0)
         display = (settings->search_phone_home == 1) ? TRUE : FALSE;
 
-    else if (g_strcasecmp(field, ADDRESSBOOK_DISPLAY_PHONE_MOBILE) == 0)
+    else if (g_strcasecmp (field, ADDRESSBOOK_DISPLAY_PHONE_MOBILE) == 0)
         display = (settings->search_phone_mobile == 1) ? TRUE : FALSE;
 
     else
diff --git a/sflphone-client-gnome/src/config/addressbook-config.h b/sflphone-client-gnome/src/config/addressbook-config.h
index fb419e876db7d59fd59f0de69909211ccff7078e..2a534e5ebac8625196246cd0930948eed1aecb15 100644
--- a/sflphone-client-gnome/src/config/addressbook-config.h
+++ b/sflphone-client-gnome/src/config/addressbook-config.h
@@ -46,10 +46,9 @@ G_BEGIN_DECLS
 #define ADDRESSBOOK_DISPLAY_PHONE_HOME       "ADDRESSBOOK_DISPLAY_PHONE_HOME"
 #define ADDRESSBOOK_DISPLAY_PHONE_MOBILE     "ADDRESSBOOK_DISPLAY_PHONE_MOBILE"
 
-typedef struct _AddressBook_Config
-{
-	// gint64: a signed integer guaranteed to be 64 bits on all platforms
-	// To print or scan values of this type, use G_GINT64_MODIFIER and/or G_GINT64_FORMAT
+typedef struct _AddressBook_Config {
+    // gint64: a signed integer guaranteed to be 64 bits on all platforms
+    // To print or scan values of this type, use G_GINT64_MODIFIER and/or G_GINT64_FORMAT
     gint64 enable;
     gint64 max_results;
     gint64 display_contact_photo;
@@ -62,7 +61,7 @@ typedef struct _AddressBook_Config
  * Save the parameters through D-BUS
  */
 void
-addressbook_config_save_parameters(void);
+addressbook_config_save_parameters (void);
 
 /**
  * Initialize the address book structure, and retrieve the saved parameters through D-Bus
@@ -70,10 +69,10 @@ addressbook_config_save_parameters(void);
  * @param settings  The addressbook structure
  */
 void
-addressbook_config_load_parameters(AddressBook_Config **settings);
+addressbook_config_load_parameters (AddressBook_Config **settings);
 
 gboolean
-addressbook_display(AddressBook_Config *settings, const gchar *field);
+addressbook_display (AddressBook_Config *settings, const gchar *field);
 
 GtkWidget*
 create_addressbook_settings();
diff --git a/sflphone-client-gnome/src/config/assistant.c b/sflphone-client-gnome/src/config/assistant.c
index 7b5c342a81312a6c0b292aa3bdcd9511a980de53..8b1f7d3a288e589e2a70f0fb1818a2d921436a5a 100644
--- a/sflphone-client-gnome/src/config/assistant.c
+++ b/sflphone-client-gnome/src/config/assistant.c
@@ -54,25 +54,26 @@ char message[1024];
 /**
  * Forward function
  */
-static gint forward_page_func( gint current_page , gpointer data );
+static gint forward_page_func (gint current_page , gpointer data);
 
 /**
  * Page template
  */
-static GtkWidget* create_vbox(GtkAssistantPageType type, const gchar *title, const gchar *section);
-void prefill_sip(void) ;
-
-void set_account_type( GtkWidget* widget , gpointer data UNUSED ) {
-	if( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( widget )) ){
-		account_type = _SIP;
-	}else{
-		account_type = _IAX ;
-	}
+static GtkWidget* create_vbox (GtkAssistantPageType type, const gchar *title, const gchar *section);
+void prefill_sip (void) ;
+
+void set_account_type (GtkWidget* widget , gpointer data UNUSED)
+{
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
+        account_type = _SIP;
+    } else {
+        account_type = _IAX ;
+    }
 }
 
 static void show_password_cb (GtkWidget *widget, gpointer data)
 {
-	gtk_entry_set_visibility (GTK_ENTRY (data), !gtk_entry_get_visibility (GTK_ENTRY (data)));
+    gtk_entry_set_visibility (GTK_ENTRY (data), !gtk_entry_get_visibility (GTK_ENTRY (data)));
 }
 
 
@@ -80,36 +81,38 @@ static void show_password_cb (GtkWidget *widget, gpointer data)
  * Fills string message with the final message of account registration
  * with alias, server and username specified.
  */
-void getMessageSummary( char * message , const gchar * alias, const gchar * server, const gchar * username, const gboolean zrtp) 
+void getMessageSummary (char * message , const gchar * alias, const gchar * server, const gchar * username, const gboolean zrtp)
 {
-	char var[64];
-	sprintf( message, _("This assistant is now finished."));
-	strcat( message, "\n" );
-	strcat( message, _("You can at any time check your registration state or modify your accounts parameters in the Options/Accounts window."));
-	strcat( message, "\n\n");
-	
-	strcat( message, _("Alias"));
-	sprintf( var, " :   %s\n", alias);
-	strcat( message, var);
-	
-	strcat( message, _("Server"));
-	sprintf( var, " :   %s\n", server);
-	strcat( message, var);
-	
-	strcat( message, _("Username"));
-	sprintf( var, " :   %s\n", username);
-	strcat( message, var);
-	
-    strcat( message, _("Security: "));
-	if (zrtp) {
-	    strcat( message, _("SRTP/ZRTP draft-zimmermann"));
-	} else {
-	    strcat( message, _("None"));
-	}
+    char var[64];
+    sprintf (message, _ ("This assistant is now finished."));
+    strcat (message, "\n");
+    strcat (message, _ ("You can at any time check your registration state or modify your accounts parameters in the Options/Accounts window."));
+    strcat (message, "\n\n");
+
+    strcat (message, _ ("Alias"));
+    sprintf (var, " :   %s\n", alias);
+    strcat (message, var);
+
+    strcat (message, _ ("Server"));
+    sprintf (var, " :   %s\n", server);
+    strcat (message, var);
+
+    strcat (message, _ ("Username"));
+    sprintf (var, " :   %s\n", username);
+    strcat (message, var);
+
+    strcat (message, _ ("Security: "));
+
+    if (zrtp) {
+        strcat (message, _ ("SRTP/ZRTP draft-zimmermann"));
+    } else {
+        strcat (message, _ ("None"));
+    }
 }
 
-void set_sflphone_org( GtkWidget* widget , gpointer data UNUSED ) {
-	use_sflphone_org = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))?1:0) ;
+void set_sflphone_org (GtkWidget* widget , gpointer data UNUSED)
+{
+    use_sflphone_org = (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)) ?1:0) ;
 }
 
 
@@ -118,9 +121,11 @@ void set_sflphone_org( GtkWidget* widget , gpointer data UNUSED ) {
  * Callback when the close button of the dialog is clicked
  * Action : close the assistant widget and get back to sflphone main window
  */
-static void close_callback( void ) {
-	gtk_widget_destroy(wiz->assistant);
-	g_free(wiz); wiz = NULL;
+static void close_callback (void)
+{
+    gtk_widget_destroy (wiz->assistant);
+    g_free (wiz);
+    wiz = NULL;
 
     status_bar_display_account ();
 }
@@ -129,10 +134,12 @@ static void close_callback( void ) {
  * Callback when the cancel button of the dialog is clicked
  * Action : close the assistant widget and get back to sflphone main window
  */
-static void cancel_callback( void ) {
-	gtk_widget_destroy(wiz->assistant);
-	g_free(wiz); wiz = NULL;
-    
+static void cancel_callback (void)
+{
+    gtk_widget_destroy (wiz->assistant);
+    g_free (wiz);
+    wiz = NULL;
+
     status_bar_display_account ();
 }
 
@@ -140,536 +147,564 @@ static void cancel_callback( void ) {
  * Callback when the button apply is clicked
  * Action : Set the account parameters with the entries values and called dbus_add_account
  */
-static void sip_apply_callback( void ) {
-	if(use_sflphone_org){
-		prefill_sip();
-		account_type = _SIP;
-	}
-	if( account_type == _SIP ) {
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ALIAS), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->sip_alias))));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ENABLED), g_strdup("true"));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_MAILBOX), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->sip_voicemail))));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_TYPE), g_strdup("SIP"));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_HOSTNAME), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->sip_server))));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_PASSWORD), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->sip_password))));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_USERNAME), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->sip_username))));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_SIP_STUN_ENABLED), g_strdup((gchar *)(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wiz->enable))? "true":"false")));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_SIP_STUN_SERVER), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->addr))));
-
-        if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wiz->zrtp_enable)) == TRUE) {
-        	    g_hash_table_insert(current->properties, g_strdup(ACCOUNT_SRTP_ENABLED), g_strdup((gchar *)"true"));
-        	    g_hash_table_insert(current->properties, g_strdup(ACCOUNT_KEY_EXCHANGE), g_strdup((gchar *)ZRTP));
-        	    g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ZRTP_DISPLAY_SAS), g_strdup((gchar *)"true"));
-        	    g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ZRTP_NOT_SUPP_WARNING), g_strdup((gchar *)"true"));
-        	    g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ZRTP_HELLO_HASH), g_strdup((gchar *)"true"));
-        	    g_hash_table_insert(current->properties, g_strdup(ACCOUNT_DISPLAY_SAS_ONCE), g_strdup((gchar *)"false"));
+static void sip_apply_callback (void)
+{
+    if (use_sflphone_org) {
+        prefill_sip();
+        account_type = _SIP;
+    }
+
+    if (account_type == _SIP) {
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_ALIAS), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->sip_alias))));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_ENABLED), g_strdup ("true"));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_MAILBOX), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->sip_voicemail))));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_TYPE), g_strdup ("SIP"));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_HOSTNAME), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->sip_server))));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_PASSWORD), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->sip_password))));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_USERNAME), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->sip_username))));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_SIP_STUN_ENABLED), g_strdup ( (gchar *) (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (wiz->enable)) ? "true":"false")));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_SIP_STUN_SERVER), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->addr))));
+
+        if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (wiz->zrtp_enable)) == TRUE) {
+            g_hash_table_insert (current->properties, g_strdup (ACCOUNT_SRTP_ENABLED), g_strdup ( (gchar *) "true"));
+            g_hash_table_insert (current->properties, g_strdup (ACCOUNT_KEY_EXCHANGE), g_strdup ( (gchar *) ZRTP));
+            g_hash_table_insert (current->properties, g_strdup (ACCOUNT_ZRTP_DISPLAY_SAS), g_strdup ( (gchar *) "true"));
+            g_hash_table_insert (current->properties, g_strdup (ACCOUNT_ZRTP_NOT_SUPP_WARNING), g_strdup ( (gchar *) "true"));
+            g_hash_table_insert (current->properties, g_strdup (ACCOUNT_ZRTP_HELLO_HASH), g_strdup ( (gchar *) "true"));
+            g_hash_table_insert (current->properties, g_strdup (ACCOUNT_DISPLAY_SAS_ONCE), g_strdup ( (gchar *) "false"));
         }
 
 
-	// Add default interface info
-	gchar ** iface_list = NULL;
-	iface_list = (gchar**) dbus_get_all_ip_interface_by_name();
+        // Add default interface info
+        gchar ** iface_list = NULL;
+        iface_list = (gchar**) dbus_get_all_ip_interface_by_name();
         gchar ** iface = NULL;
 
-	// select the first interface available
-	iface = iface_list;
-	DEBUG("Selected interface %s", *iface);
+        // select the first interface available
+        iface = iface_list;
+        DEBUG ("Selected interface %s", *iface);
 
-	g_hash_table_insert(current->properties, g_strdup(LOCAL_INTERFACE), g_strdup((gchar *)*iface));
+        g_hash_table_insert (current->properties, g_strdup (LOCAL_INTERFACE), g_strdup ( (gchar *) *iface));
 
-	g_hash_table_insert(current->properties, g_strdup(PUBLISHED_ADDRESS), g_strdup((gchar *)*iface));
+        g_hash_table_insert (current->properties, g_strdup (PUBLISHED_ADDRESS), g_strdup ( (gchar *) *iface));
 
-	dbus_add_account( current );
-	getMessageSummary(message, 
-			  gtk_entry_get_text (GTK_ENTRY(wiz->sip_alias)),
-			  gtk_entry_get_text (GTK_ENTRY(wiz->sip_server)),
-			  gtk_entry_get_text (GTK_ENTRY(wiz->sip_username)),
-			  (gboolean)(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wiz->zrtp_enable)))
-			  );
+        dbus_add_account (current);
+        getMessageSummary (message,
+                           gtk_entry_get_text (GTK_ENTRY (wiz->sip_alias)),
+                           gtk_entry_get_text (GTK_ENTRY (wiz->sip_server)),
+                           gtk_entry_get_text (GTK_ENTRY (wiz->sip_username)),
+                           (gboolean) (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (wiz->zrtp_enable)))
+                          );
 
-	gtk_label_set_text (GTK_LABEL(wiz->label_summary), message);
-	}
+        gtk_label_set_text (GTK_LABEL (wiz->label_summary), message);
+    }
 }
 
 /**
  * Callback when the button apply is clicked
  * Action : Set the account parameters with the entries values and called dbus_add_account
  */
-static void iax_apply_callback( void ) {
-	if( account_type == _IAX) {
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ALIAS), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->iax_alias))));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_ENABLED), g_strdup("true"));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_MAILBOX), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->iax_voicemail))));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_TYPE), g_strdup("IAX"));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_USERNAME), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->iax_username))));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_HOSTNAME), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->iax_server))));
-		g_hash_table_insert(current->properties, g_strdup(ACCOUNT_PASSWORD), g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(wiz->iax_password))));
-
-		dbus_add_account( current );
-		getMessageSummary(message, 
-			gtk_entry_get_text (GTK_ENTRY(wiz->iax_alias)),
-			gtk_entry_get_text (GTK_ENTRY(wiz->iax_server)),
-			gtk_entry_get_text (GTK_ENTRY(wiz->iax_username)),
-			FALSE
-		) ;
-
-		gtk_label_set_text (GTK_LABEL(wiz->label_summary), message);
-	}
+static void iax_apply_callback (void)
+{
+    if (account_type == _IAX) {
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_ALIAS), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->iax_alias))));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_ENABLED), g_strdup ("true"));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_MAILBOX), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->iax_voicemail))));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_TYPE), g_strdup ("IAX"));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_USERNAME), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->iax_username))));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_HOSTNAME), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->iax_server))));
+        g_hash_table_insert (current->properties, g_strdup (ACCOUNT_PASSWORD), g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (wiz->iax_password))));
+
+        dbus_add_account (current);
+        getMessageSummary (message,
+                           gtk_entry_get_text (GTK_ENTRY (wiz->iax_alias)),
+                           gtk_entry_get_text (GTK_ENTRY (wiz->iax_server)),
+                           gtk_entry_get_text (GTK_ENTRY (wiz->iax_username)),
+                           FALSE
+                          ) ;
+
+        gtk_label_set_text (GTK_LABEL (wiz->label_summary), message);
+    }
 }
 
-void enable_stun( GtkWidget* widget ) {
-	gtk_widget_set_sensitive( GTK_WIDGET( wiz->addr ), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)));
+void enable_stun (GtkWidget* widget)
+{
+    gtk_widget_set_sensitive (GTK_WIDGET (wiz->addr), gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)));
 }
 
-void build_wizard( void ) {
-        use_sflphone_org = 1;
-	if (wiz)
-		return ;
-
-	wiz = ( struct _wizard* )g_malloc( sizeof( struct _wizard));
-	current = g_new0(account_t, 1);
-	current->properties = NULL;
-	current->properties = dbus_account_details(NULL);	
-	if (current->properties == NULL) {
-	    DEBUG("Failed to get default values. Creating from scratch");
-	    current->properties = g_hash_table_new(NULL, g_str_equal);
-	}
+void build_wizard (void)
+{
+    use_sflphone_org = 1;
+
+    if (wiz)
+        return ;
+
+    wiz = (struct _wizard*) g_malloc (sizeof (struct _wizard));
+    current = g_new0 (account_t, 1);
+    current->properties = NULL;
+    current->properties = dbus_account_details (NULL);
+
+    if (current->properties == NULL) {
+        DEBUG ("Failed to get default values. Creating from scratch");
+        current->properties = g_hash_table_new (NULL, g_str_equal);
+    }
+
     current->accountID = "new";
 
-	wiz->assistant = gtk_assistant_new();
+    wiz->assistant = gtk_assistant_new();
 
-	gtk_window_set_title( GTK_WINDOW(wiz->assistant), _("SFLphone account creation wizard") );
-	gtk_window_set_position(GTK_WINDOW(wiz->assistant), GTK_WIN_POS_CENTER);
-	gtk_window_set_default_size(GTK_WINDOW(wiz->assistant), 200 , 200);
+    gtk_window_set_title (GTK_WINDOW (wiz->assistant), _ ("SFLphone account creation wizard"));
+    gtk_window_set_position (GTK_WINDOW (wiz->assistant), GTK_WIN_POS_CENTER);
+    gtk_window_set_default_size (GTK_WINDOW (wiz->assistant), 200 , 200);
 
-	build_intro();
-	build_sfl_or_account();
-	build_select_account();
-	build_sip_account_configuration();
-	build_nat_settings();
-	build_iax_account_configuration();
-	build_email_configuration();
-	build_summary();
+    build_intro();
+    build_sfl_or_account();
+    build_select_account();
+    build_sip_account_configuration();
+    build_nat_settings();
+    build_iax_account_configuration();
+    build_email_configuration();
+    build_summary();
 
-	g_signal_connect(G_OBJECT(wiz->assistant), "close" , G_CALLBACK(close_callback), NULL);
+    g_signal_connect (G_OBJECT (wiz->assistant), "close" , G_CALLBACK (close_callback), NULL);
 
-	g_signal_connect(G_OBJECT(wiz->assistant), "cancel" , G_CALLBACK(cancel_callback), NULL);
+    g_signal_connect (G_OBJECT (wiz->assistant), "cancel" , G_CALLBACK (cancel_callback), NULL);
 
-	gtk_widget_show_all(wiz->assistant);
+    gtk_widget_show_all (wiz->assistant);
 
-	gtk_assistant_set_forward_page_func( GTK_ASSISTANT( wiz->assistant ), (GtkAssistantPageFunc) forward_page_func , NULL , NULL );
-	gtk_assistant_update_buttons_state(GTK_ASSISTANT(wiz->assistant));
+    gtk_assistant_set_forward_page_func (GTK_ASSISTANT (wiz->assistant), (GtkAssistantPageFunc) forward_page_func , NULL , NULL);
+    gtk_assistant_update_buttons_state (GTK_ASSISTANT (wiz->assistant));
 }
 
-GtkWidget* build_intro() {
-	GtkWidget *label;
+GtkWidget* build_intro()
+{
+    GtkWidget *label;
 
-	wiz->intro = create_vbox( GTK_ASSISTANT_PAGE_INTRO  , "SFLphone GNOME client" , _("Welcome to the Account creation wizard of SFLphone!"));
-	label = gtk_label_new(_("This installation wizard will help you configure an account.")) ;
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-	gtk_widget_set_size_request(GTK_WIDGET(label), 380, -1);
-	gtk_box_pack_start(GTK_BOX(wiz->intro), label, FALSE, TRUE, 0);
+    wiz->intro = create_vbox (GTK_ASSISTANT_PAGE_INTRO  , "SFLphone GNOME client" , _ ("Welcome to the Account creation wizard of SFLphone!"));
+    label = gtk_label_new (_ ("This installation wizard will help you configure an account.")) ;
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+    gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+    gtk_widget_set_size_request (GTK_WIDGET (label), 380, -1);
+    gtk_box_pack_start (GTK_BOX (wiz->intro), label, FALSE, TRUE, 0);
 
-	gtk_assistant_set_page_complete(GTK_ASSISTANT(wiz->assistant),  wiz->intro, TRUE);
-	return wiz->intro;
+    gtk_assistant_set_page_complete (GTK_ASSISTANT (wiz->assistant),  wiz->intro, TRUE);
+    return wiz->intro;
 }
 
-GtkWidget* build_select_account() {
-	GtkWidget* sip;
-	GtkWidget* iax;
+GtkWidget* build_select_account()
+{
+    GtkWidget* sip;
+    GtkWidget* iax;
 
-	wiz->protocols = create_vbox( GTK_ASSISTANT_PAGE_CONTENT , _("VoIP Protocols") , _("Select an account type"));
+    wiz->protocols = create_vbox (GTK_ASSISTANT_PAGE_CONTENT , _ ("VoIP Protocols") , _ ("Select an account type"));
 
-	sip = gtk_radio_button_new_with_label(NULL, _("SIP (Session Initiation Protocol)"));
-	gtk_box_pack_start( GTK_BOX(wiz->protocols) , sip , TRUE, TRUE, 0);
-	iax = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(sip), _("IAX2 (InterAsterix Exchange)"));
-	gtk_box_pack_start( GTK_BOX(wiz->protocols) , iax , TRUE, TRUE, 0);
+    sip = gtk_radio_button_new_with_label (NULL, _ ("SIP (Session Initiation Protocol)"));
+    gtk_box_pack_start (GTK_BOX (wiz->protocols) , sip , TRUE, TRUE, 0);
+    iax = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (sip), _ ("IAX2 (InterAsterix Exchange)"));
+    gtk_box_pack_start (GTK_BOX (wiz->protocols) , iax , TRUE, TRUE, 0);
 
-	g_signal_connect(G_OBJECT( sip ) , "clicked" , G_CALLBACK( set_account_type ) , NULL );
+    g_signal_connect (G_OBJECT (sip) , "clicked" , G_CALLBACK (set_account_type) , NULL);
 
-	gtk_assistant_set_page_complete(GTK_ASSISTANT(wiz->assistant),  wiz->protocols, TRUE);
-	return wiz->protocols;
+    gtk_assistant_set_page_complete (GTK_ASSISTANT (wiz->assistant),  wiz->protocols, TRUE);
+    return wiz->protocols;
 }
 
 
-GtkWidget* build_sfl_or_account() {
-	GtkWidget* sfl;
-	GtkWidget* cus;
+GtkWidget* build_sfl_or_account()
+{
+    GtkWidget* sfl;
+    GtkWidget* cus;
 
-	wiz->sflphone_org = create_vbox( GTK_ASSISTANT_PAGE_CONTENT , _("Account") , _("Please select one of the following options"));
+    wiz->sflphone_org = create_vbox (GTK_ASSISTANT_PAGE_CONTENT , _ ("Account") , _ ("Please select one of the following options"));
 
-	sfl = gtk_radio_button_new_with_label( NULL, _("Create a free SIP/IAX2 account on sflphone.org"));
-	gtk_box_pack_start( GTK_BOX(wiz->sflphone_org) , sfl , TRUE, TRUE, 0);
-	cus = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(sfl), _("Register an existing SIP or IAX2 account"));
-	gtk_box_pack_start( GTK_BOX(wiz->sflphone_org) , cus , TRUE, TRUE, 0);
-	g_signal_connect(G_OBJECT( sfl ) , "clicked" , G_CALLBACK( set_sflphone_org ) , NULL );
+    sfl = gtk_radio_button_new_with_label (NULL, _ ("Create a free SIP/IAX2 account on sflphone.org"));
+    gtk_box_pack_start (GTK_BOX (wiz->sflphone_org) , sfl , TRUE, TRUE, 0);
+    cus = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (sfl), _ ("Register an existing SIP or IAX2 account"));
+    gtk_box_pack_start (GTK_BOX (wiz->sflphone_org) , cus , TRUE, TRUE, 0);
+    g_signal_connect (G_OBJECT (sfl) , "clicked" , G_CALLBACK (set_sflphone_org) , NULL);
 
-	return wiz->sflphone_org;
+    return wiz->sflphone_org;
 }
 
 
-GtkWidget* build_sip_account_configuration( void ) {
-	GtkWidget* table;
-	GtkWidget* label;
+GtkWidget* build_sip_account_configuration (void)
+{
+    GtkWidget* table;
+    GtkWidget* label;
     GtkWidget *image;
-	GtkWidget * clearTextCheckbox;
-
-	wiz->sip_account = create_vbox( GTK_ASSISTANT_PAGE_CONTENT , _("SIP account settings") , _("Please fill the following information"));
-	// table
-	table = gtk_table_new ( 7, 2  ,  FALSE/* homogeneous */);
-	gtk_table_set_row_spacings( GTK_TABLE(table), 10);
-	gtk_table_set_col_spacings( GTK_TABLE(table), 10);
-	gtk_box_pack_start( GTK_BOX(wiz->sip_account) , table , TRUE, TRUE, 0);
-
-	// alias field
-	label = gtk_label_new_with_mnemonic (_("_Alias"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	wiz->sip_alias = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_alias);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->sip_alias, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	// server field
-	label = gtk_label_new_with_mnemonic (_("_Host name"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	wiz->sip_server = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_server);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->sip_server, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	// username field
-	label = gtk_label_new_with_mnemonic (_("_User name"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
+    GtkWidget * clearTextCheckbox;
+
+    wiz->sip_account = create_vbox (GTK_ASSISTANT_PAGE_CONTENT , _ ("SIP account settings") , _ ("Please fill the following information"));
+    // table
+    table = gtk_table_new (7, 2  ,  FALSE/* homogeneous */);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 10);
+    gtk_table_set_col_spacings (GTK_TABLE (table), 10);
+    gtk_box_pack_start (GTK_BOX (wiz->sip_account) , table , TRUE, TRUE, 0);
+
+    // alias field
+    label = gtk_label_new_with_mnemonic (_ ("_Alias"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    wiz->sip_alias = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_alias);
+    gtk_table_attach (GTK_TABLE (table), wiz->sip_alias, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    // server field
+    label = gtk_label_new_with_mnemonic (_ ("_Host name"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    wiz->sip_server = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_server);
+    gtk_table_attach (GTK_TABLE (table), wiz->sip_server, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    // username field
+    label = gtk_label_new_with_mnemonic (_ ("_User name"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 #if GTK_CHECK_VERSION(2,16,0)
-	wiz->sip_username = gtk_entry_new();
-    gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (wiz->sip_username), GTK_ENTRY_ICON_PRIMARY, gdk_pixbuf_new_from_file(ICONS_DIR "/stock_person.svg", NULL));
+    wiz->sip_username = gtk_entry_new();
+    gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (wiz->sip_username), GTK_ENTRY_ICON_PRIMARY, gdk_pixbuf_new_from_file (ICONS_DIR "/stock_person.svg", NULL));
 #else
-	wiz->sip_username = sexy_icon_entry_new();
-	image = gtk_image_new_from_file( ICONS_DIR "/stock_person.svg" );
-	sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(wiz->sip_username), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
+    wiz->sip_username = sexy_icon_entry_new();
+    image = gtk_image_new_from_file (ICONS_DIR "/stock_person.svg");
+    sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (wiz->sip_username), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
 #endif
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_username);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->sip_username, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	// password field
-        
-	label = gtk_label_new_with_mnemonic (_("_Password"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_username);
+    gtk_table_attach (GTK_TABLE (table), wiz->sip_username, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    // password field
+
+    label = gtk_label_new_with_mnemonic (_ ("_Password"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 #if GTK_CHECK_VERSION(2,16,0)
-	wiz->sip_password = gtk_entry_new();
+    wiz->sip_password = gtk_entry_new();
     gtk_entry_set_icon_from_stock (GTK_ENTRY (wiz->sip_password), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
 #else
-        
 
-	wiz->sip_password = sexy_icon_entry_new();
-	image = gtk_image_new_from_stock( GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR );
-	sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(wiz->sip_password), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
+
+    wiz->sip_password = sexy_icon_entry_new();
+    image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR);
+    sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (wiz->sip_password), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
 #endif
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_password);
-	gtk_entry_set_visibility(GTK_ENTRY(wiz->sip_password), FALSE);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->sip_password, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	
-	clearTextCheckbox = gtk_check_button_new_with_mnemonic (_("Show password"));
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_password);
+    gtk_entry_set_visibility (GTK_ENTRY (wiz->sip_password), FALSE);
+    gtk_table_attach (GTK_TABLE (table), wiz->sip_password, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    clearTextCheckbox = gtk_check_button_new_with_mnemonic (_ ("Show password"));
     g_signal_connect (clearTextCheckbox, "toggled", G_CALLBACK (show_password_cb), wiz->sip_password);
     gtk_table_attach (GTK_TABLE (table), clearTextCheckbox, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
     // voicemail number field
-	label = gtk_label_new_with_mnemonic (_("_Voicemail number"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	wiz->sip_voicemail = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_voicemail);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->sip_voicemail, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    label = gtk_label_new_with_mnemonic (_ ("_Voicemail number"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    wiz->sip_voicemail = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_voicemail);
+    gtk_table_attach (GTK_TABLE (table), wiz->sip_voicemail, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
     // Security options
-	wiz->zrtp_enable = gtk_check_button_new_with_mnemonic(_("Secure communications with _ZRTP"));
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wiz->zrtp_enable), FALSE);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->zrtp_enable, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_widget_set_sensitive( GTK_WIDGET( wiz->zrtp_enable ) , TRUE );
-	
-	//gtk_assistant_set_page_complete(GTK_ASSISTANT(wiz->assistant),  wiz->sip_account, TRUE);
-	return wiz->sip_account;
+    wiz->zrtp_enable = gtk_check_button_new_with_mnemonic (_ ("Secure communications with _ZRTP"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wiz->zrtp_enable), FALSE);
+    gtk_table_attach (GTK_TABLE (table), wiz->zrtp_enable, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (GTK_WIDGET (wiz->zrtp_enable) , TRUE);
+
+    //gtk_assistant_set_page_complete(GTK_ASSISTANT(wiz->assistant),  wiz->sip_account, TRUE);
+    return wiz->sip_account;
 }
 
-GtkWidget* build_email_configuration( void ) {
-	GtkWidget* label;
-	GtkWidget*  table;
+GtkWidget* build_email_configuration (void)
+{
+    GtkWidget* label;
+    GtkWidget*  table;
 
-	wiz->email = create_vbox( GTK_ASSISTANT_PAGE_CONTENT , _("Optional email address") , _("This email address will be used to send your voicemail messages."));
+    wiz->email = create_vbox (GTK_ASSISTANT_PAGE_CONTENT , _ ("Optional email address") , _ ("This email address will be used to send your voicemail messages."));
 
-	table = gtk_table_new ( 4, 2  ,  FALSE/* homogeneous */);
-	gtk_table_set_row_spacings( GTK_TABLE(table), 10);
-	gtk_table_set_col_spacings( GTK_TABLE(table), 10);
-	gtk_box_pack_start( GTK_BOX(wiz->email) , table , TRUE, TRUE, 0);
+    table = gtk_table_new (4, 2  ,  FALSE/* homogeneous */);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 10);
+    gtk_table_set_col_spacings (GTK_TABLE (table), 10);
+    gtk_box_pack_start (GTK_BOX (wiz->email) , table , TRUE, TRUE, 0);
 
-	// email field
-	label = gtk_label_new_with_mnemonic (_("_Email address"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	wiz->mailbox = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->mailbox);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->mailbox, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    // email field
+    label = gtk_label_new_with_mnemonic (_ ("_Email address"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    wiz->mailbox = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->mailbox);
+    gtk_table_attach (GTK_TABLE (table), wiz->mailbox, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
     // Security options
-	wiz->zrtp_enable = gtk_check_button_new_with_mnemonic(_("Secure communications with _ZRTP"));
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wiz->zrtp_enable), FALSE);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->zrtp_enable, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_widget_set_sensitive( GTK_WIDGET( wiz->zrtp_enable ) , TRUE );
-	
-	return wiz->email;
+    wiz->zrtp_enable = gtk_check_button_new_with_mnemonic (_ ("Secure communications with _ZRTP"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wiz->zrtp_enable), FALSE);
+    gtk_table_attach (GTK_TABLE (table), wiz->zrtp_enable, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (GTK_WIDGET (wiz->zrtp_enable) , TRUE);
+
+    return wiz->email;
 }
 
-GtkWidget* build_iax_account_configuration( void ) {
-	GtkWidget* label;
-	GtkWidget*  table;
+GtkWidget* build_iax_account_configuration (void)
+{
+    GtkWidget* label;
+    GtkWidget*  table;
     GtkWidget *image;
-	GtkWidget * clearTextCheckbox;
-
-	wiz->iax_account = create_vbox( GTK_ASSISTANT_PAGE_CONFIRM , _("IAX2 account settings") , _("Please fill the following information"));
-
-	table = gtk_table_new ( 6, 2  ,  FALSE/* homogeneous */);
-	gtk_table_set_row_spacings( GTK_TABLE(table), 10);
-	gtk_table_set_col_spacings( GTK_TABLE(table), 10);
-	gtk_box_pack_start( GTK_BOX(wiz->iax_account) , table , TRUE, TRUE, 0);
-
-	// alias field
-	label = gtk_label_new_with_mnemonic (_("_Alias"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	wiz->iax_alias = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_alias);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->iax_alias, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	// server field
-	label = gtk_label_new_with_mnemonic (_("_Host name"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	wiz->iax_server = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_server);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->iax_server, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	// username field
-	label = gtk_label_new_with_mnemonic (_("_User name"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
+    GtkWidget * clearTextCheckbox;
+
+    wiz->iax_account = create_vbox (GTK_ASSISTANT_PAGE_CONFIRM , _ ("IAX2 account settings") , _ ("Please fill the following information"));
+
+    table = gtk_table_new (6, 2  ,  FALSE/* homogeneous */);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 10);
+    gtk_table_set_col_spacings (GTK_TABLE (table), 10);
+    gtk_box_pack_start (GTK_BOX (wiz->iax_account) , table , TRUE, TRUE, 0);
+
+    // alias field
+    label = gtk_label_new_with_mnemonic (_ ("_Alias"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    wiz->iax_alias = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_alias);
+    gtk_table_attach (GTK_TABLE (table), wiz->iax_alias, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    // server field
+    label = gtk_label_new_with_mnemonic (_ ("_Host name"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    wiz->iax_server = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_server);
+    gtk_table_attach (GTK_TABLE (table), wiz->iax_server, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    // username field
+    label = gtk_label_new_with_mnemonic (_ ("_User name"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 #if GTK_CHECK_VERSION(2,16,0)
-	wiz->iax_username = gtk_entry_new();
-    gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (wiz->iax_username), GTK_ENTRY_ICON_PRIMARY, gdk_pixbuf_new_from_file(ICONS_DIR "/stock_person.svg", NULL));
+    wiz->iax_username = gtk_entry_new();
+    gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (wiz->iax_username), GTK_ENTRY_ICON_PRIMARY, gdk_pixbuf_new_from_file (ICONS_DIR "/stock_person.svg", NULL));
 #else
-	wiz->iax_username = sexy_icon_entry_new();
-	image = gtk_image_new_from_file( ICONS_DIR "/stock_person.svg" );
-	sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(wiz->iax_username), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
+    wiz->iax_username = sexy_icon_entry_new();
+    image = gtk_image_new_from_file (ICONS_DIR "/stock_person.svg");
+    sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (wiz->iax_username), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
 #endif
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_username);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->iax_username, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_username);
+    gtk_table_attach (GTK_TABLE (table), wiz->iax_username, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
-	// password field
-	label = gtk_label_new_with_mnemonic (_("_Password"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
+    // password field
+    label = gtk_label_new_with_mnemonic (_ ("_Password"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
 #if GTK_CHECK_VERSION(2,16,0)
-	wiz->iax_password = gtk_entry_new();
+    wiz->iax_password = gtk_entry_new();
     gtk_entry_set_icon_from_stock (GTK_ENTRY (wiz->iax_password), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
 #else
-	wiz->iax_password = sexy_icon_entry_new();
-	image = gtk_image_new_from_stock( GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR );
-	sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(wiz->iax_password), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
+    wiz->iax_password = sexy_icon_entry_new();
+    image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR);
+    sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (wiz->iax_password), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
 #endif
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_password);
-	gtk_entry_set_visibility(GTK_ENTRY(wiz->iax_password), FALSE);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->iax_password, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_password);
+    gtk_entry_set_visibility (GTK_ENTRY (wiz->iax_password), FALSE);
+    gtk_table_attach (GTK_TABLE (table), wiz->iax_password, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
-	clearTextCheckbox = gtk_check_button_new_with_mnemonic (_("Show password"));
+    clearTextCheckbox = gtk_check_button_new_with_mnemonic (_ ("Show password"));
     g_signal_connect (clearTextCheckbox, "toggled", G_CALLBACK (show_password_cb), wiz->iax_password);
     gtk_table_attach (GTK_TABLE (table), clearTextCheckbox, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
     // voicemail number field
-	label = gtk_label_new_with_mnemonic (_("_Voicemail number"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	wiz->iax_voicemail = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_voicemail);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->iax_voicemail, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    label = gtk_label_new_with_mnemonic (_ ("_Voicemail number"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    wiz->iax_voicemail = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_voicemail);
+    gtk_table_attach (GTK_TABLE (table), wiz->iax_voicemail, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
-	current -> state = ACCOUNT_STATE_UNREGISTERED;
+    current -> state = ACCOUNT_STATE_UNREGISTERED;
 
-	g_signal_connect( G_OBJECT( wiz->assistant ) , "apply" , G_CALLBACK( iax_apply_callback ), NULL);
+    g_signal_connect (G_OBJECT (wiz->assistant) , "apply" , G_CALLBACK (iax_apply_callback), NULL);
 
-	return wiz->iax_account;
+    return wiz->iax_account;
 }
 
-GtkWidget* build_nat_settings( void ) {
-	GtkWidget* label;
-	GtkWidget* table;
-
-	wiz->nat = create_vbox( GTK_ASSISTANT_PAGE_CONFIRM , _("Network Address Translation (NAT)") , _("You should probably enable this if you are behind a firewall."));
-
-	// table
-	table = gtk_table_new ( 2, 2  ,  FALSE/* homogeneous */);
-	gtk_table_set_row_spacings( GTK_TABLE(table), 10);
-	gtk_table_set_col_spacings( GTK_TABLE(table), 10);
-	gtk_box_pack_start( GTK_BOX(wiz->nat), table , TRUE, TRUE, 0);
-
-	// enable
-	wiz->enable = gtk_check_button_new_with_mnemonic(_("E_nable STUN"));
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wiz->enable), FALSE);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->enable, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_widget_set_sensitive( GTK_WIDGET( wiz->enable ) , TRUE );
-	g_signal_connect( G_OBJECT( GTK_TOGGLE_BUTTON(wiz->enable)) , "toggled" , G_CALLBACK( enable_stun ), NULL);
-
-	// server address
-	label = gtk_label_new_with_mnemonic (_("_STUN server"));
-	gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-	wiz->addr = gtk_entry_new();
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->addr);
-	gtk_table_attach ( GTK_TABLE( table ), wiz->addr, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_widget_set_sensitive( GTK_WIDGET( wiz->addr ), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(wiz->enable)));
-
-	g_signal_connect( G_OBJECT( wiz->assistant ) , "apply" , G_CALLBACK( sip_apply_callback ), NULL);
-
-	return wiz->nat;
+GtkWidget* build_nat_settings (void)
+{
+    GtkWidget* label;
+    GtkWidget* table;
+
+    wiz->nat = create_vbox (GTK_ASSISTANT_PAGE_CONFIRM , _ ("Network Address Translation (NAT)") , _ ("You should probably enable this if you are behind a firewall."));
+
+    // table
+    table = gtk_table_new (2, 2  ,  FALSE/* homogeneous */);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 10);
+    gtk_table_set_col_spacings (GTK_TABLE (table), 10);
+    gtk_box_pack_start (GTK_BOX (wiz->nat), table , TRUE, TRUE, 0);
+
+    // enable
+    wiz->enable = gtk_check_button_new_with_mnemonic (_ ("E_nable STUN"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wiz->enable), FALSE);
+    gtk_table_attach (GTK_TABLE (table), wiz->enable, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (GTK_WIDGET (wiz->enable) , TRUE);
+    g_signal_connect (G_OBJECT (GTK_TOGGLE_BUTTON (wiz->enable)) , "toggled" , G_CALLBACK (enable_stun), NULL);
+
+    // server address
+    label = gtk_label_new_with_mnemonic (_ ("_STUN server"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    wiz->addr = gtk_entry_new();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->addr);
+    gtk_table_attach (GTK_TABLE (table), wiz->addr, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (GTK_WIDGET (wiz->addr), gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (wiz->enable)));
+
+    g_signal_connect (G_OBJECT (wiz->assistant) , "apply" , G_CALLBACK (sip_apply_callback), NULL);
+
+    return wiz->nat;
 }
 
-GtkWidget* build_summary() {
-	wiz->summary = create_vbox( GTK_ASSISTANT_PAGE_SUMMARY  , _("Account Registration") , _("Congratulations!"));
+GtkWidget* build_summary()
+{
+    wiz->summary = create_vbox (GTK_ASSISTANT_PAGE_SUMMARY  , _ ("Account Registration") , _ ("Congratulations!"));
 
-	strcpy(message,"");
-	wiz->label_summary = gtk_label_new(message) ;
-	gtk_label_set_selectable (GTK_LABEL(wiz->label_summary), TRUE);
-	gtk_misc_set_alignment(GTK_MISC(wiz->label_summary), 0, 0);
-	gtk_label_set_line_wrap(GTK_LABEL(wiz->label_summary), TRUE);
-	//gtk_widget_set_size_request(GTK_WIDGET(wiz->label_summary), 380, -1);
-	gtk_box_pack_start(GTK_BOX(wiz->summary), wiz->label_summary, FALSE, TRUE, 0);
+    strcpy (message,"");
+    wiz->label_summary = gtk_label_new (message) ;
+    gtk_label_set_selectable (GTK_LABEL (wiz->label_summary), TRUE);
+    gtk_misc_set_alignment (GTK_MISC (wiz->label_summary), 0, 0);
+    gtk_label_set_line_wrap (GTK_LABEL (wiz->label_summary), TRUE);
+    //gtk_widget_set_size_request(GTK_WIDGET(wiz->label_summary), 380, -1);
+    gtk_box_pack_start (GTK_BOX (wiz->summary), wiz->label_summary, FALSE, TRUE, 0);
 
-	return wiz->summary;
+    return wiz->summary;
 }
 
-GtkWidget* build_registration_error() {
-	GtkWidget *label;
-	wiz->reg_failed = create_vbox( GTK_ASSISTANT_PAGE_SUMMARY  , "Account Registration" , "Registration error");
+GtkWidget* build_registration_error()
+{
+    GtkWidget *label;
+    wiz->reg_failed = create_vbox (GTK_ASSISTANT_PAGE_SUMMARY  , "Account Registration" , "Registration error");
 
-	label = gtk_label_new(" Please correct the information.") ;
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-	gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
-	gtk_widget_set_size_request(GTK_WIDGET(label), 380, -1);
-	gtk_box_pack_start(GTK_BOX(wiz->reg_failed), label, FALSE, TRUE, 0);
+    label = gtk_label_new (" Please correct the information.") ;
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+    gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+    gtk_widget_set_size_request (GTK_WIDGET (label), 380, -1);
+    gtk_box_pack_start (GTK_BOX (wiz->reg_failed), label, FALSE, TRUE, 0);
 
-	return wiz->reg_failed;
+    return wiz->reg_failed;
 }
 
-void set_sip_infos_sentivite(gboolean b) {
-	gtk_widget_set_sensitive(GTK_WIDGET(wiz->sip_alias), b);
-	gtk_widget_set_sensitive(GTK_WIDGET(wiz->sip_server), b);
-	gtk_widget_set_sensitive(GTK_WIDGET(wiz->sip_username), b);
-	gtk_widget_set_sensitive(GTK_WIDGET(wiz->sip_password), b);
+void set_sip_infos_sentivite (gboolean b)
+{
+    gtk_widget_set_sensitive (GTK_WIDGET (wiz->sip_alias), b);
+    gtk_widget_set_sensitive (GTK_WIDGET (wiz->sip_server), b);
+    gtk_widget_set_sensitive (GTK_WIDGET (wiz->sip_username), b);
+    gtk_widget_set_sensitive (GTK_WIDGET (wiz->sip_password), b);
 }
 
-void prefill_sip(void) {
-	if (use_sflphone_org == 1) {
- 		char alias[300];
- 		char *email;
- 		email = (char *)gtk_entry_get_text (GTK_ENTRY(wiz->mailbox) );
- 		rest_account ra = get_rest_account(SFLPHONE_ORG_SERVER,email);
- 		if (ra.success) {
-			set_sip_infos_sentivite(FALSE);
-			strcpy(alias,ra.user);
-			strcat(alias,"@");
-			strcat(alias,"sip.sflphone.org");
-			gtk_entry_set_text (GTK_ENTRY(wiz->sip_alias),alias );
-			gtk_entry_set_text (GTK_ENTRY(wiz->sip_server), SFLPHONE_ORG_SERVER);
-			gtk_entry_set_text (GTK_ENTRY(wiz->sip_username), ra.user);
-			gtk_entry_set_text (GTK_ENTRY(wiz->sip_password), ra.passwd);
- 		}
-	}
+void prefill_sip (void)
+{
+    if (use_sflphone_org == 1) {
+        char alias[300];
+        char *email;
+        email = (char *) gtk_entry_get_text (GTK_ENTRY (wiz->mailbox));
+        rest_account ra = get_rest_account (SFLPHONE_ORG_SERVER,email);
+
+        if (ra.success) {
+            set_sip_infos_sentivite (FALSE);
+            strcpy (alias,ra.user);
+            strcat (alias,"@");
+            strcat (alias,"sip.sflphone.org");
+            gtk_entry_set_text (GTK_ENTRY (wiz->sip_alias),alias);
+            gtk_entry_set_text (GTK_ENTRY (wiz->sip_server), SFLPHONE_ORG_SERVER);
+            gtk_entry_set_text (GTK_ENTRY (wiz->sip_username), ra.user);
+            gtk_entry_set_text (GTK_ENTRY (wiz->sip_password), ra.passwd);
+        }
+    }
 }
 
 typedef enum {
-	PAGE_INTRO,
-	PAGE_SFL,
-	PAGE_TYPE,
-	PAGE_SIP,
-	PAGE_STUN,
-	PAGE_IAX,
-	PAGE_EMAIL,
-	PAGE_SUMMARY
+    PAGE_INTRO,
+    PAGE_SFL,
+    PAGE_TYPE,
+    PAGE_SIP,
+    PAGE_STUN,
+    PAGE_IAX,
+    PAGE_EMAIL,
+    PAGE_SUMMARY
 } assistant_state;
 
-static gint forward_page_func( gint current_page , gpointer data UNUSED) {
- 	gint next_page = 0;
-
-	switch( current_page ){
-		case PAGE_INTRO:
-			next_page = PAGE_SFL;
-			break;
-		case PAGE_SFL:
- 			if (use_sflphone_org) {
-				next_page = PAGE_EMAIL;
- 			} else
-				next_page = PAGE_TYPE;
-			break;
-		case PAGE_TYPE:
- 			if( account_type == _SIP ) {
-				set_sip_infos_sentivite(TRUE);
-				next_page = PAGE_SIP;
- 			} else
-				next_page = PAGE_IAX;
-			break;
-		case PAGE_SIP:
-			next_page = PAGE_STUN;
-			break;
-		case PAGE_EMAIL:
-			next_page = PAGE_STUN;
-			break;
-		case PAGE_STUN:
-			next_page = PAGE_SUMMARY;
-			break;
-		case PAGE_IAX:
-			next_page = PAGE_SUMMARY;
-			break;
-		case PAGE_SUMMARY:
-			next_page = PAGE_SUMMARY;
-			break;
-		default:
-			next_page = -1;
-	}
-	return next_page;
+static gint forward_page_func (gint current_page , gpointer data UNUSED)
+{
+    gint next_page = 0;
+
+    switch (current_page) {
+        case PAGE_INTRO:
+            next_page = PAGE_SFL;
+            break;
+        case PAGE_SFL:
+
+            if (use_sflphone_org) {
+                next_page = PAGE_EMAIL;
+            } else
+                next_page = PAGE_TYPE;
+
+            break;
+        case PAGE_TYPE:
+
+            if (account_type == _SIP) {
+                set_sip_infos_sentivite (TRUE);
+                next_page = PAGE_SIP;
+            } else
+                next_page = PAGE_IAX;
+
+            break;
+        case PAGE_SIP:
+            next_page = PAGE_STUN;
+            break;
+        case PAGE_EMAIL:
+            next_page = PAGE_STUN;
+            break;
+        case PAGE_STUN:
+            next_page = PAGE_SUMMARY;
+            break;
+        case PAGE_IAX:
+            next_page = PAGE_SUMMARY;
+            break;
+        case PAGE_SUMMARY:
+            next_page = PAGE_SUMMARY;
+            break;
+        default:
+            next_page = -1;
+    }
+
+    return next_page;
 }
 
 
-static GtkWidget* create_vbox(GtkAssistantPageType type, const gchar *title, const gchar *section) {
-	GtkWidget *vbox;
-	GtkWidget *label;
-	gchar *str;
+static GtkWidget* create_vbox (GtkAssistantPageType type, const gchar *title, const gchar *section)
+{
+    GtkWidget *vbox;
+    GtkWidget *label;
+    gchar *str;
+
+    vbox = gtk_vbox_new (FALSE, 6);
+    gtk_container_set_border_width (GTK_CONTAINER (vbox), 24);
 
-	vbox = gtk_vbox_new(FALSE, 6);
-	gtk_container_set_border_width(GTK_CONTAINER(vbox), 24);
+    gtk_assistant_append_page (GTK_ASSISTANT (wiz->assistant), vbox);
+    gtk_assistant_set_page_type (GTK_ASSISTANT (wiz->assistant), vbox, type);
+    str = g_strdup_printf (" %s", title);
+    gtk_assistant_set_page_title (GTK_ASSISTANT (wiz->assistant), vbox, str);
 
-	gtk_assistant_append_page(GTK_ASSISTANT(wiz->assistant), vbox);
-	gtk_assistant_set_page_type(GTK_ASSISTANT(wiz->assistant), vbox, type);
-	str = g_strdup_printf(" %s", title);
-	gtk_assistant_set_page_title(GTK_ASSISTANT(wiz->assistant), vbox, str);
+    g_free (str);
 
-	g_free(str);
+    gtk_assistant_set_page_complete (GTK_ASSISTANT (wiz->assistant), vbox, TRUE);
 
-	gtk_assistant_set_page_complete(GTK_ASSISTANT(wiz->assistant), vbox, TRUE);
+    wiz->logo = gdk_pixbuf_new_from_file (LOGO, NULL);
+    gtk_assistant_set_page_header_image (GTK_ASSISTANT (wiz->assistant),vbox, wiz->logo);
+    g_object_unref (wiz->logo);
 
-	wiz->logo = gdk_pixbuf_new_from_file(LOGO, NULL);
-	gtk_assistant_set_page_header_image(GTK_ASSISTANT(wiz->assistant),vbox, wiz->logo);
-	g_object_unref(wiz->logo);
+    if (section) {
+        label = gtk_label_new (NULL);
+        str = g_strdup_printf ("<b>%s</b>\n", section);
+        gtk_label_set_markup (GTK_LABEL (label), str);
+        g_free (str);
+        gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
+        gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+    }
 
-	if (section) {
-		label = gtk_label_new(NULL);
-		str = g_strdup_printf("<b>%s</b>\n", section);
-		gtk_label_set_markup(GTK_LABEL(label), str);
-		g_free(str);
-		gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-		gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-	}
-	return vbox;
+    return vbox;
 }
 
 #endif // GTK_CHECK_VERSION
diff --git a/sflphone-client-gnome/src/config/assistant.h b/sflphone-client-gnome/src/config/assistant.h
index 2ac083e04cb5d26ab14208291d50896a2bbe5f00..314ac7624e3e14e1fc0e3d6f3e66f5aedb486eb8 100644
--- a/sflphone-client-gnome/src/config/assistant.h
+++ b/sflphone-client-gnome/src/config/assistant.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -42,49 +42,48 @@
 #define _SIP  0
 #define _IAX  1
 
-struct _wizard
-{
-  GtkWidget *window;
-  GtkWidget *assistant;
-  GdkPixbuf *logo;
-  GtkWidget *intro;
-  /** Page 1  - Protocol selection */
-  GtkWidget *account_type;
-  GtkWidget *protocols;
-  GtkWidget *sip;
-  GtkWidget *email;
-  GtkWidget *iax;
-  /** Page 2 - SIP account creation */
-  GtkWidget *sip_account;
-  GtkWidget *sip_alias;
-  GtkWidget *sip_server;
-  GtkWidget *sip_username;
-  GtkWidget *sip_password;
-  GtkWidget *sip_voicemail;
-  GtkWidget *test;
-  GtkWidget *state;
-  GtkWidget *mailbox;
-  GtkWidget *zrtp_enable;
-  /** Page 3 - IAX account creation */
-  GtkWidget *iax_account;
-  GtkWidget *iax_alias;
-  GtkWidget *iax_server;
-  GtkWidget *iax_username;
-  GtkWidget *iax_password;
-  GtkWidget *iax_voicemail;
-  /** Page 4 - Nat detection */
-  GtkWidget *nat;
-  GtkWidget *enable;
-  GtkWidget *addr;
-  /** Page 5 - Registration successful*/
-  GtkWidget *summary;
-  GtkWidget *label_summary;
-  /** Page 6 - Registration failed*/
-  GtkWidget *reg_failed;
-
-  GtkWidget *sflphone_org;
-  
-}; 
+struct _wizard {
+    GtkWidget *window;
+    GtkWidget *assistant;
+    GdkPixbuf *logo;
+    GtkWidget *intro;
+    /** Page 1  - Protocol selection */
+    GtkWidget *account_type;
+    GtkWidget *protocols;
+    GtkWidget *sip;
+    GtkWidget *email;
+    GtkWidget *iax;
+    /** Page 2 - SIP account creation */
+    GtkWidget *sip_account;
+    GtkWidget *sip_alias;
+    GtkWidget *sip_server;
+    GtkWidget *sip_username;
+    GtkWidget *sip_password;
+    GtkWidget *sip_voicemail;
+    GtkWidget *test;
+    GtkWidget *state;
+    GtkWidget *mailbox;
+    GtkWidget *zrtp_enable;
+    /** Page 3 - IAX account creation */
+    GtkWidget *iax_account;
+    GtkWidget *iax_alias;
+    GtkWidget *iax_server;
+    GtkWidget *iax_username;
+    GtkWidget *iax_password;
+    GtkWidget *iax_voicemail;
+    /** Page 4 - Nat detection */
+    GtkWidget *nat;
+    GtkWidget *enable;
+    GtkWidget *addr;
+    /** Page 5 - Registration successful*/
+    GtkWidget *summary;
+    GtkWidget *label_summary;
+    /** Page 6 - Registration failed*/
+    GtkWidget *reg_failed;
+
+    GtkWidget *sflphone_org;
+
+};
 
 /**
  * @file druid.h
@@ -94,7 +93,7 @@ struct _wizard
 /**
  * Callbacks functions
  */
-void set_account_type( GtkWidget* widget , gpointer data );
+void set_account_type (GtkWidget* widget , gpointer data);
 
 //static void cancel_callback( void );
 
@@ -103,20 +102,20 @@ void set_account_type( GtkWidget* widget , gpointer data );
 //static void sip_apply_callback( void );
 //static void iax_apply_callback( void );
 
-void enable_stun( GtkWidget *widget );
+void enable_stun (GtkWidget *widget);
 
 /**
  * Related-pages function
  */
 void build_wizard();
-GtkWidget* build_intro( void );
-GtkWidget* build_select_account( void );
-GtkWidget* build_sip_account_configuration( void );
-GtkWidget* build_nat_settings( void );
-GtkWidget* build_iax_account_configuration( void );
-GtkWidget* build_summary( void );
-GtkWidget* build_registration_error( void );
-GtkWidget* build_email_configuration( void );
+GtkWidget* build_intro (void);
+GtkWidget* build_select_account (void);
+GtkWidget* build_sip_account_configuration (void);
+GtkWidget* build_nat_settings (void);
+GtkWidget* build_iax_account_configuration (void);
+GtkWidget* build_summary (void);
+GtkWidget* build_registration_error (void);
+GtkWidget* build_email_configuration (void);
 GtkWidget* build_sfl_or_account (void);
 
 /**
diff --git a/sflphone-client-gnome/src/config/audioconf.c b/sflphone-client-gnome/src/config/audioconf.c
index d27b64d2f246e92d73b701036bafc14fbf3a4199..4dd871fdffc2e3b0ca944121274312b66b38d8e2 100644
--- a/sflphone-client-gnome/src/config/audioconf.c
+++ b/sflphone-client-gnome/src/config/audioconf.c
@@ -52,111 +52,111 @@ GtkWidget *noise_conf;
 
 // Codec properties ID
 enum {
-	COLUMN_CODEC_ACTIVE,
-	COLUMN_CODEC_NAME,
-	COLUMN_CODEC_FREQUENCY,
-	COLUMN_CODEC_BITRATE,
-	COLUMN_CODEC_BANDWIDTH,
-	CODEC_COLUMN_COUNT
+    COLUMN_CODEC_ACTIVE,
+    COLUMN_CODEC_NAME,
+    COLUMN_CODEC_FREQUENCY,
+    COLUMN_CODEC_BITRATE,
+    COLUMN_CODEC_BANDWIDTH,
+    CODEC_COLUMN_COUNT
 };
 
 /**
  * Fills the tree list with supported codecs
  */
-void preferences_dialog_fill_codec_list (account_t **a) {
-
-	GtkListStore *codecStore;
-	GtkTreeIter iter;
-	GQueue *current;
-
-	// Get model of view and clear it
-	codecStore = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (codecTreeView)));
-	gtk_list_store_clear (codecStore);
-
-	if ((*a) != NULL) {
-		current = (*a)->codecs;
-	}
-	else {
-		// Failover
-		current = get_system_codec_list ();
-	}
-
-
-	// Insert codecs
-	unsigned int i;
-	for(i = 0; i < current->length; i++)
-	{
-		codec_t *c = codec_list_get_nth (i, current);
-		if (c)
-		{
-			DEBUG ("%s", c->name);
-			gtk_list_store_append (codecStore, &iter);
-			gtk_list_store_set (codecStore, &iter,
-					COLUMN_CODEC_ACTIVE,	c->is_active,									// Active
-					COLUMN_CODEC_NAME,		c->name,										// Name
-					COLUMN_CODEC_FREQUENCY,	g_strdup_printf("%d kHz", c->sample_rate/1000),	// Frequency (kHz)
-					COLUMN_CODEC_BITRATE,	g_strdup_printf("%.1f kbps", c->_bitrate),		// Bitrate (kbps)
-					COLUMN_CODEC_BANDWIDTH,	g_strdup_printf("%.1f kbps", c->_bandwidth),	// Bandwidth (kpbs)
-					-1);
-		}
-	}
+void preferences_dialog_fill_codec_list (account_t **a)
+{
+
+    GtkListStore *codecStore;
+    GtkTreeIter iter;
+    GQueue *current;
+
+    // Get model of view and clear it
+    codecStore = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (codecTreeView)));
+    gtk_list_store_clear (codecStore);
+
+    if ( (*a) != NULL) {
+        current = (*a)->codecs;
+    } else {
+        // Failover
+        current = get_system_codec_list ();
+    }
+
+
+    // Insert codecs
+    unsigned int i;
+
+    for (i = 0; i < current->length; i++) {
+        codec_t *c = codec_list_get_nth (i, current);
+
+        if (c) {
+            DEBUG ("%s", c->name);
+            gtk_list_store_append (codecStore, &iter);
+            gtk_list_store_set (codecStore, &iter,
+                                COLUMN_CODEC_ACTIVE,	c->is_active,									// Active
+                                COLUMN_CODEC_NAME,		c->name,										// Name
+                                COLUMN_CODEC_FREQUENCY,	g_strdup_printf ("%d kHz", c->sample_rate/1000),	// Frequency (kHz)
+                                COLUMN_CODEC_BITRATE,	g_strdup_printf ("%.1f kbps", c->_bitrate),		// Bitrate (kbps)
+                                COLUMN_CODEC_BANDWIDTH,	g_strdup_printf ("%.1f kbps", c->_bandwidth),	// Bandwidth (kpbs)
+                                -1);
+        }
+    }
 }
 
 /**
  * Fill store with output audio plugins
  */
-	void
+void
 preferences_dialog_fill_audio_plugin_list()
 {
-	GtkTreeIter iter;
-	gchar** list;
-	gchar* managerName;
-
-	gtk_list_store_clear(pluginlist);
-
-	// Call dbus to retreive list
-	list = dbus_get_audio_plugin_list();
-	// For each API name included in list
-	int c = 0;
-
-	if (list != NULL){
-		for(managerName = list[c]; managerName != NULL; managerName = list[c])
-		{
-			c++;
-			gtk_list_store_append(pluginlist, &iter);
-			gtk_list_store_set(pluginlist, &iter, 0 , managerName, -1);
-		}
-	}
-	list = NULL;
+    GtkTreeIter iter;
+    gchar** list;
+    gchar* managerName;
+
+    gtk_list_store_clear (pluginlist);
+
+    // Call dbus to retreive list
+    list = dbus_get_audio_plugin_list();
+    // For each API name included in list
+    int c = 0;
+
+    if (list != NULL) {
+        for (managerName = list[c]; managerName != NULL; managerName = list[c]) {
+            c++;
+            gtk_list_store_append (pluginlist, &iter);
+            gtk_list_store_set (pluginlist, &iter, 0 , managerName, -1);
+        }
+    }
+
+    list = NULL;
 }
 
 
 /**
  * Fill output audio device store
  */
-	void
+void
 preferences_dialog_fill_output_audio_device_list()
 {
 
-	GtkTreeIter iter;
-	gchar** list;
-	gchar** audioDevice;
-	int index;
-
-	gtk_list_store_clear(outputlist);
-
-	// Call dbus to retreive list
-	list = dbus_get_audio_output_device_list();
-
-	// For each device name included in list
-	int c = 0;
-	for(audioDevice = list; *list ; list++)
-	{
-		index = dbus_get_audio_device_index( *list );
-		gtk_list_store_append(outputlist, &iter);
-		gtk_list_store_set(outputlist, &iter, 0, *list, 1, index, -1);
-		c++;
-	}
+    GtkTreeIter iter;
+    gchar** list;
+    gchar** audioDevice;
+    int index;
+
+    gtk_list_store_clear (outputlist);
+
+    // Call dbus to retreive list
+    list = dbus_get_audio_output_device_list();
+
+    // For each device name included in list
+    int c = 0;
+
+    for (audioDevice = list; *list ; list++) {
+        index = dbus_get_audio_device_index (*list);
+        gtk_list_store_append (outputlist, &iter);
+        gtk_list_store_set (outputlist, &iter, 0, *list, 1, index, -1);
+        c++;
+    }
 }
 
 
@@ -173,18 +173,19 @@ preferences_dialog_fill_ringtone_audio_device_list()
     gchar** audioDevice;
     int index;
 
-    gtk_list_store_clear(ringtonelist);
+    gtk_list_store_clear (ringtonelist);
 
     // Call dbus to retreive output device
     list = dbus_get_audio_output_device_list();
 
     // For each device name in the list
     int c = 0;
-    for(audioDevice = list; *list; list++) {
-      index = dbus_get_audio_device_index( *list );
-      gtk_list_store_append(ringtonelist, &iter);
-      gtk_list_store_set(ringtonelist, &iter, 0, *list, 1, index, -1);
-      c++;
+
+    for (audioDevice = list; *list; list++) {
+        index = dbus_get_audio_device_index (*list);
+        gtk_list_store_append (ringtonelist, &iter);
+        gtk_list_store_set (ringtonelist, &iter, 0, *list, 1, index, -1);
+        c++;
     }
 }
 
@@ -193,899 +194,902 @@ preferences_dialog_fill_ringtone_audio_device_list()
 /**
  * Select active output audio device
  */
-	void
+void
 select_active_output_audio_device()
 {
-	if( SHOW_ALSA_CONF )
-	{
-
-		GtkTreeModel* model;
-		GtkTreeIter iter;
-		gchar** devices;
-		int currentDeviceIndex;
-		int deviceIndex;
-
-		// Select active output device on server
-		devices = dbus_get_current_audio_devices_index();
-		currentDeviceIndex = atoi(devices[0]);
-		DEBUG("audio device index for output = %d", currentDeviceIndex);
-		model = gtk_combo_box_get_model(GTK_COMBO_BOX(output));
-
-		// Find the currently set output device
-		gtk_tree_model_get_iter_first(model, &iter);
-		do {
-			gtk_tree_model_get(model, &iter, 1, &deviceIndex, -1);
-			if(deviceIndex == currentDeviceIndex)
-			{
-				// Set current iteration the active one
-				gtk_combo_box_set_active_iter(GTK_COMBO_BOX(output), &iter);
-				return;
-			}
-		} while(gtk_tree_model_iter_next(model, &iter));
-
-		// No index was found, select first one
-		WARN("Warning : No active output device found");
-		gtk_combo_box_set_active(GTK_COMBO_BOX(output), 0);
-	}
+    if (SHOW_ALSA_CONF) {
+
+        GtkTreeModel* model;
+        GtkTreeIter iter;
+        gchar** devices;
+        int currentDeviceIndex;
+        int deviceIndex;
+
+        // Select active output device on server
+        devices = dbus_get_current_audio_devices_index();
+        currentDeviceIndex = atoi (devices[0]);
+        DEBUG ("audio device index for output = %d", currentDeviceIndex);
+        model = gtk_combo_box_get_model (GTK_COMBO_BOX (output));
+
+        // Find the currently set output device
+        gtk_tree_model_get_iter_first (model, &iter);
+
+        do {
+            gtk_tree_model_get (model, &iter, 1, &deviceIndex, -1);
+
+            if (deviceIndex == currentDeviceIndex) {
+                // Set current iteration the active one
+                gtk_combo_box_set_active_iter (GTK_COMBO_BOX (output), &iter);
+                return;
+            }
+        } while (gtk_tree_model_iter_next (model, &iter));
+
+        // No index was found, select first one
+        WARN ("Warning : No active output device found");
+        gtk_combo_box_set_active (GTK_COMBO_BOX (output), 0);
+    }
 }
 
 
 /**
  * Select active output audio device
  */
-	void
+void
 select_active_ringtone_audio_device()
 {
-	if( SHOW_ALSA_CONF )
-	{
-
-		GtkTreeModel* model;
-		GtkTreeIter iter;
-		gchar** devices;
-		int currentDeviceIndex;
-		int deviceIndex;
-
-		// Select active ringtone device on server
-		devices = dbus_get_current_audio_devices_index();
-		currentDeviceIndex = atoi(devices[2]);
-		DEBUG("audio device index for ringtone = %d", currentDeviceIndex);
-		model = gtk_combo_box_get_model(GTK_COMBO_BOX(ringtone));
-
-		// Find the currently set ringtone device
-		gtk_tree_model_get_iter_first(model, &iter);
-		do {
-			gtk_tree_model_get(model, &iter, 1, &deviceIndex, -1);
-			if(deviceIndex == currentDeviceIndex)
-			{
-				// Set current iteration the active one
-				gtk_combo_box_set_active_iter(GTK_COMBO_BOX(ringtone), &iter);
-				return;
-			}
-		} while(gtk_tree_model_iter_next(model, &iter));
-
-		// No index was found, select first one
-		WARN("Warning : No active ringtone device found");
-		gtk_combo_box_set_active(GTK_COMBO_BOX(ringtone), 0);
-	}
+    if (SHOW_ALSA_CONF) {
+
+        GtkTreeModel* model;
+        GtkTreeIter iter;
+        gchar** devices;
+        int currentDeviceIndex;
+        int deviceIndex;
+
+        // Select active ringtone device on server
+        devices = dbus_get_current_audio_devices_index();
+        currentDeviceIndex = atoi (devices[2]);
+        DEBUG ("audio device index for ringtone = %d", currentDeviceIndex);
+        model = gtk_combo_box_get_model (GTK_COMBO_BOX (ringtone));
+
+        // Find the currently set ringtone device
+        gtk_tree_model_get_iter_first (model, &iter);
+
+        do {
+            gtk_tree_model_get (model, &iter, 1, &deviceIndex, -1);
+
+            if (deviceIndex == currentDeviceIndex) {
+                // Set current iteration the active one
+                gtk_combo_box_set_active_iter (GTK_COMBO_BOX (ringtone), &iter);
+                return;
+            }
+        } while (gtk_tree_model_iter_next (model, &iter));
+
+        // No index was found, select first one
+        WARN ("Warning : No active ringtone device found");
+        gtk_combo_box_set_active (GTK_COMBO_BOX (ringtone), 0);
+    }
 }
 
 /**
  * Fill input audio device store
  */
-	void
+void
 preferences_dialog_fill_input_audio_device_list()
 {
 
-	GtkTreeIter iter;
-	gchar** list;
-	gchar** audioDevice;
-	int index ;
-	gtk_list_store_clear(inputlist);
-
-	// Call dbus to retreive list
-	list = dbus_get_audio_input_device_list();
-
-	// For each device name included in list
-	//int c = 0;
-	for(audioDevice = list; *list; list++)
-	{
-		index = dbus_get_audio_device_index( *list );
-		gtk_list_store_append(inputlist, &iter);
-		gtk_list_store_set(inputlist, &iter, 0, *list, 1, index, -1);
-		//c++;
-	}
+    GtkTreeIter iter;
+    gchar** list;
+    gchar** audioDevice;
+    int index ;
+    gtk_list_store_clear (inputlist);
+
+    // Call dbus to retreive list
+    list = dbus_get_audio_input_device_list();
+
+    // For each device name included in list
+    //int c = 0;
+    for (audioDevice = list; *list; list++) {
+        index = dbus_get_audio_device_index (*list);
+        gtk_list_store_append (inputlist, &iter);
+        gtk_list_store_set (inputlist, &iter, 0, *list, 1, index, -1);
+        //c++;
+    }
 
 }
 
 /**
  * Select active input audio device
  */
-	void
+void
 select_active_input_audio_device()
 {
-	if( SHOW_ALSA_CONF)
-	{
-
-		GtkTreeModel* model;
-		GtkTreeIter iter;
-		gchar** devices;
-		int currentDeviceIndex;
-		int deviceIndex;
-
-		// Select active input device on server
-		devices = dbus_get_current_audio_devices_index();
-		currentDeviceIndex = atoi(devices[1]);
-		model = gtk_combo_box_get_model(GTK_COMBO_BOX(input));
-
-		// Find the currently set input device
-		gtk_tree_model_get_iter_first(model, &iter);
-		do {
-			gtk_tree_model_get(model, &iter, 1, &deviceIndex, -1);
-			if(deviceIndex == currentDeviceIndex)
-			{
-				// Set current iteration the active one
-				gtk_combo_box_set_active_iter(GTK_COMBO_BOX(input), &iter);
-				return;
-			}
-		} while(gtk_tree_model_iter_next(model, &iter));
-
-		// No index was found, select first one
-		WARN("Warning : No active input device found");
-		gtk_combo_box_set_active(GTK_COMBO_BOX(input), 0);
-	}
+    if (SHOW_ALSA_CONF) {
+
+        GtkTreeModel* model;
+        GtkTreeIter iter;
+        gchar** devices;
+        int currentDeviceIndex;
+        int deviceIndex;
+
+        // Select active input device on server
+        devices = dbus_get_current_audio_devices_index();
+        currentDeviceIndex = atoi (devices[1]);
+        model = gtk_combo_box_get_model (GTK_COMBO_BOX (input));
+
+        // Find the currently set input device
+        gtk_tree_model_get_iter_first (model, &iter);
+
+        do {
+            gtk_tree_model_get (model, &iter, 1, &deviceIndex, -1);
+
+            if (deviceIndex == currentDeviceIndex) {
+                // Set current iteration the active one
+                gtk_combo_box_set_active_iter (GTK_COMBO_BOX (input), &iter);
+                return;
+            }
+        } while (gtk_tree_model_iter_next (model, &iter));
+
+        // No index was found, select first one
+        WARN ("Warning : No active input device found");
+        gtk_combo_box_set_active (GTK_COMBO_BOX (input), 0);
+    }
 }
 
 /**
  * Select the output audio plugin by calling the server
  */
-	static void
-select_output_audio_plugin(GtkComboBox* widget, gpointer data UNUSED)
+static void
+select_output_audio_plugin (GtkComboBox* widget, gpointer data UNUSED)
 {
-	GtkTreeModel* model;
-	GtkTreeIter iter;
-	int comboBoxIndex;
-	gchar* pluginName;
-
-	comboBoxIndex = gtk_combo_box_get_active(widget);
-
-	if(comboBoxIndex >= 0)
-	{
-		model = gtk_combo_box_get_model(widget);
-		gtk_combo_box_get_active_iter(widget, &iter);
-		gtk_tree_model_get(model, &iter, 0, &pluginName, -1);
-		dbus_set_output_audio_plugin(pluginName);
-		//update_combo_box( pluginName);
-	}
+    GtkTreeModel* model;
+    GtkTreeIter iter;
+    int comboBoxIndex;
+    gchar* pluginName;
+
+    comboBoxIndex = gtk_combo_box_get_active (widget);
+
+    if (comboBoxIndex >= 0) {
+        model = gtk_combo_box_get_model (widget);
+        gtk_combo_box_get_active_iter (widget, &iter);
+        gtk_tree_model_get (model, &iter, 0, &pluginName, -1);
+        dbus_set_output_audio_plugin (pluginName);
+        //update_combo_box( pluginName);
+    }
 }
 
 /**
  * Select active output audio plugin
  */
-	void
+void
 select_active_output_audio_plugin()
 {
-	GtkTreeModel* model;
-	GtkTreeIter iter;
-	gchar* pluginname;
-	gchar* tmp;
-
-	// Select active output device on server
-	pluginname = dbus_get_current_audio_output_plugin();
-	tmp = pluginname;
-	model = gtk_combo_box_get_model(GTK_COMBO_BOX(plugin));
-
-	// Find the currently alsa plugin
-	gtk_tree_model_get_iter_first(model, &iter);
-	do {
-		gtk_tree_model_get(model, &iter, 0, &pluginname , -1);
-		if( g_strcasecmp( tmp , pluginname ) == 0 )
-		{
-			// Set current iteration the active one
-			gtk_combo_box_set_active_iter(GTK_COMBO_BOX(plugin), &iter);
-			//update_combo_box( plugin );
-			return;
-		}
-	} while(gtk_tree_model_iter_next(model, &iter));
-
-	// No index was found, select first one
-	WARN("Warning : No active output device found");
-	gtk_combo_box_set_active(GTK_COMBO_BOX(plugin), 0);
+    GtkTreeModel* model;
+    GtkTreeIter iter;
+    gchar* pluginname;
+    gchar* tmp;
+
+    // Select active output device on server
+    pluginname = dbus_get_current_audio_output_plugin();
+    tmp = pluginname;
+    model = gtk_combo_box_get_model (GTK_COMBO_BOX (plugin));
+
+    // Find the currently alsa plugin
+    gtk_tree_model_get_iter_first (model, &iter);
+
+    do {
+        gtk_tree_model_get (model, &iter, 0, &pluginname , -1);
+
+        if (g_strcasecmp (tmp , pluginname) == 0) {
+            // Set current iteration the active one
+            gtk_combo_box_set_active_iter (GTK_COMBO_BOX (plugin), &iter);
+            //update_combo_box( plugin );
+            return;
+        }
+    } while (gtk_tree_model_iter_next (model, &iter));
+
+    // No index was found, select first one
+    WARN ("Warning : No active output device found");
+    gtk_combo_box_set_active (GTK_COMBO_BOX (plugin), 0);
 }
 
 
 /**
  * Set the audio output device on the server with its index
  */
-	static void
-select_audio_output_device(GtkComboBox* comboBox, gpointer data UNUSED)
+static void
+select_audio_output_device (GtkComboBox* comboBox, gpointer data UNUSED)
 {
-	GtkTreeModel* model;
-	GtkTreeIter iter;
-	int comboBoxIndex;
-	int deviceIndex;
+    GtkTreeModel* model;
+    GtkTreeIter iter;
+    int comboBoxIndex;
+    int deviceIndex;
 
-	comboBoxIndex = gtk_combo_box_get_active(comboBox);
+    comboBoxIndex = gtk_combo_box_get_active (comboBox);
 
-	if(comboBoxIndex >= 0)
-	{
-		model = gtk_combo_box_get_model(comboBox);
-		gtk_combo_box_get_active_iter(comboBox, &iter);
-		gtk_tree_model_get(model, &iter, 1, &deviceIndex, -1);
+    if (comboBoxIndex >= 0) {
+        model = gtk_combo_box_get_model (comboBox);
+        gtk_combo_box_get_active_iter (comboBox, &iter);
+        gtk_tree_model_get (model, &iter, 1, &deviceIndex, -1);
 
-		dbus_set_audio_output_device(deviceIndex);
-	}
+        dbus_set_audio_output_device (deviceIndex);
+    }
 }
 
 /**
  * Set the audio input device on the server with its index
  */
-	static void
-select_audio_input_device(GtkComboBox* comboBox, gpointer data UNUSED)
+static void
+select_audio_input_device (GtkComboBox* comboBox, gpointer data UNUSED)
 {
-	GtkTreeModel* model;
-	GtkTreeIter iter;
-	int comboBoxIndex;
-	int deviceIndex;
+    GtkTreeModel* model;
+    GtkTreeIter iter;
+    int comboBoxIndex;
+    int deviceIndex;
 
-	comboBoxIndex = gtk_combo_box_get_active(comboBox);
+    comboBoxIndex = gtk_combo_box_get_active (comboBox);
 
-	if(comboBoxIndex >= 0)
-	{
-		model = gtk_combo_box_get_model(comboBox);
-		gtk_combo_box_get_active_iter(comboBox, &iter);
-		gtk_tree_model_get(model, &iter, 1, &deviceIndex, -1);
+    if (comboBoxIndex >= 0) {
+        model = gtk_combo_box_get_model (comboBox);
+        gtk_combo_box_get_active_iter (comboBox, &iter);
+        gtk_tree_model_get (model, &iter, 1, &deviceIndex, -1);
 
-		dbus_set_audio_input_device(deviceIndex);
-	}
+        dbus_set_audio_input_device (deviceIndex);
+    }
 }
 
 /**
  * Set the audio ringtone device on the server with its index
  */
 static void
-select_audio_ringtone_device(GtkComboBox *comboBox, gpointer data UNUSED)
+select_audio_ringtone_device (GtkComboBox *comboBox, gpointer data UNUSED)
 {
     GtkTreeModel *model;
     GtkTreeIter iter;
     int comboBoxIndex;
     int deviceIndex;
 
-    comboBoxIndex = gtk_combo_box_get_active(comboBox);
+    comboBoxIndex = gtk_combo_box_get_active (comboBox);
 
-    if(comboBoxIndex >= 0) {
-        model = gtk_combo_box_get_model(comboBox);
-	gtk_combo_box_get_active_iter(comboBox, &iter);
+    if (comboBoxIndex >= 0) {
+        model = gtk_combo_box_get_model (comboBox);
+        gtk_combo_box_get_active_iter (comboBox, &iter);
 
-	gtk_tree_model_get(model, &iter, 1, &deviceIndex, -1);
+        gtk_tree_model_get (model, &iter, 1, &deviceIndex, -1);
 
-	dbus_set_audio_ringtone_device(deviceIndex);
+        dbus_set_audio_ringtone_device (deviceIndex);
     }
 }
 
 /**
  * Toggle move buttons on if a codec is selected, off elsewise
  */
-	static void
-select_codec(GtkTreeSelection *selection, GtkTreeModel *model)
+static void
+select_codec (GtkTreeSelection *selection, GtkTreeModel *model)
 {
-	GtkTreeIter iter;
-
-	if(!gtk_tree_selection_get_selected(selection, &model, &iter))
-	{
-		gtk_widget_set_sensitive(GTK_WIDGET(codecMoveUpButton), FALSE);
-		gtk_widget_set_sensitive(GTK_WIDGET(codecMoveDownButton), FALSE);
-	}
-	else
-	{
-		gtk_widget_set_sensitive(GTK_WIDGET(codecMoveUpButton), TRUE);
-		gtk_widget_set_sensitive(GTK_WIDGET(codecMoveDownButton), TRUE);
-	}
+    GtkTreeIter iter;
+
+    if (!gtk_tree_selection_get_selected (selection, &model, &iter)) {
+        gtk_widget_set_sensitive (GTK_WIDGET (codecMoveUpButton), FALSE);
+        gtk_widget_set_sensitive (GTK_WIDGET (codecMoveDownButton), FALSE);
+    } else {
+        gtk_widget_set_sensitive (GTK_WIDGET (codecMoveUpButton), TRUE);
+        gtk_widget_set_sensitive (GTK_WIDGET (codecMoveDownButton), TRUE);
+    }
 }
 
 /**
  * Toggle active value of codec on click and update changes to the deamon
  * and in configuration files
  */
-	static void
-codec_active_toggled (GtkCellRendererToggle *renderer UNUSED, gchar *path, gpointer data )
+static void
+codec_active_toggled (GtkCellRendererToggle *renderer UNUSED, gchar *path, gpointer data)
 {
-	GtkTreeIter iter;
-	GtkTreePath *treePath;
-	GtkTreeModel *model;
-	gboolean active;
-	char* name;
-	char* srate;
-	codec_t* codec;
-	account_t *acc;
-
-	// Get path of clicked codec active toggle box
-	treePath = gtk_tree_path_new_from_string(path);
-	model = gtk_tree_view_get_model (GTK_TREE_VIEW (codecTreeView));
-	gtk_tree_model_get_iter(model, &iter, treePath);
-
-	// Retrieve userdata
-	acc = (account_t*) data;
-
-	if (!acc)
-		ERROR ("Aie, no account selected");
-
-	// Get active value and name at iteration
-	gtk_tree_model_get(model, &iter,
-			COLUMN_CODEC_ACTIVE, &active,
-			COLUMN_CODEC_NAME, &name,
-			COLUMN_CODEC_FREQUENCY, &srate,
-			-1);
-
-	printf("%s, %s\n", name, srate);
-	printf("%i\n", g_queue_get_length (acc->codecs));
-
-	// codec_list_get_by_name(name);
-	if ((g_strcasecmp(name,"speex")==0) && (g_strcasecmp(srate,"8 kHz")==0))
-		codec = codec_list_get_by_payload((gconstpointer) 110, acc->codecs);
-	else if ((g_strcasecmp(name,"speex")==0) && (g_strcasecmp(srate,"16 kHz")==0))
-		codec = codec_list_get_by_payload((gconstpointer) 111, acc->codecs);
-	else if ((g_strcasecmp(name,"speex")==0) && (g_strcasecmp(srate,"32 kHz")==0))
-		codec = codec_list_get_by_payload((gconstpointer) 112, acc->codecs);
-	else
-		codec = codec_list_get_by_name ((gconstpointer) name, acc->codecs);
-
-	// Toggle active value
-	active = !active;
-
-	// Store value
-	gtk_list_store_set(GTK_LIST_STORE(model), &iter,
-			COLUMN_CODEC_ACTIVE, active,
-			-1);
-
-	gtk_tree_path_free(treePath);
-
-	// Modify codec queue to represent change
-	if (active)
-		codec_set_active (&codec);
-	else
-		codec_set_inactive (&codec);
-
-	// Perpetuate changes to the deamon
-	// codec_list_update_to_daemon (acc);
+    GtkTreeIter iter;
+    GtkTreePath *treePath;
+    GtkTreeModel *model;
+    gboolean active;
+    char* name;
+    char* srate;
+    codec_t* codec;
+    account_t *acc;
+
+    // Get path of clicked codec active toggle box
+    treePath = gtk_tree_path_new_from_string (path);
+    model = gtk_tree_view_get_model (GTK_TREE_VIEW (codecTreeView));
+    gtk_tree_model_get_iter (model, &iter, treePath);
+
+    // Retrieve userdata
+    acc = (account_t*) data;
+
+    if (!acc)
+        ERROR ("Aie, no account selected");
+
+    // Get active value and name at iteration
+    gtk_tree_model_get (model, &iter,
+                        COLUMN_CODEC_ACTIVE, &active,
+                        COLUMN_CODEC_NAME, &name,
+                        COLUMN_CODEC_FREQUENCY, &srate,
+                        -1);
+
+    printf ("%s, %s\n", name, srate);
+    printf ("%i\n", g_queue_get_length (acc->codecs));
+
+    // codec_list_get_by_name(name);
+    if ( (g_strcasecmp (name,"speex") ==0) && (g_strcasecmp (srate,"8 kHz") ==0))
+        codec = codec_list_get_by_payload ( (gconstpointer) 110, acc->codecs);
+    else if ( (g_strcasecmp (name,"speex") ==0) && (g_strcasecmp (srate,"16 kHz") ==0))
+        codec = codec_list_get_by_payload ( (gconstpointer) 111, acc->codecs);
+    else if ( (g_strcasecmp (name,"speex") ==0) && (g_strcasecmp (srate,"32 kHz") ==0))
+        codec = codec_list_get_by_payload ( (gconstpointer) 112, acc->codecs);
+    else
+        codec = codec_list_get_by_name ( (gconstpointer) name, acc->codecs);
+
+    // Toggle active value
+    active = !active;
+
+    // Store value
+    gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+                        COLUMN_CODEC_ACTIVE, active,
+                        -1);
+
+    gtk_tree_path_free (treePath);
+
+    // Modify codec queue to represent change
+    if (active)
+        codec_set_active (&codec);
+    else
+        codec_set_inactive (&codec);
+
+    // Perpetuate changes to the deamon
+    // codec_list_update_to_daemon (acc);
 }
 
 /**
  * Move codec in list depending on direction and selected codec and
  * update changes in the daemon list and the configuration files
  */
-static void codec_move (gboolean moveUp, gpointer data) {
-
-	GtkTreeIter iter;
-	GtkTreeIter *iter2;
-	GtkTreeView *treeView;
-	GtkTreeModel *model;
-	GtkTreeSelection *selection;
-	GtkTreePath *treePath;
-	gchar *path;
-	account_t *acc;
-	GQueue *acc_q;
-
-	// Get view, model and selection of codec store
-	model = gtk_tree_view_get_model(GTK_TREE_VIEW(codecTreeView));
-	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(codecTreeView));
-
-	// Retrieve the user data
-	acc = (account_t*) data;
-	if (acc)
-		acc_q = acc->codecs;
-
-	// Find selected iteration and create a copy
-	gtk_tree_selection_get_selected(GTK_TREE_SELECTION(selection), &model, &iter);
-	iter2 = gtk_tree_iter_copy(&iter);
-
-	// Find path of iteration
-	path = gtk_tree_model_get_string_from_iter(GTK_TREE_MODEL(model), &iter);
-	treePath = gtk_tree_path_new_from_string(path);
-	gint *indices = gtk_tree_path_get_indices(treePath);
-	gint indice = indices[0];
-
-	// Depending on button direction get new path
-	if(moveUp)
-		gtk_tree_path_prev(treePath);
-	else
-		gtk_tree_path_next(treePath);
-	gtk_tree_model_get_iter(model, &iter, treePath);
-
-	// Swap iterations if valid
-	if(gtk_list_store_iter_is_valid(GTK_LIST_STORE(model), &iter))
-		gtk_list_store_swap(GTK_LIST_STORE(model), &iter, iter2);
-
-	// Scroll to new position
-	gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (codecTreeView), treePath, NULL, FALSE, 0, 0);
-
-	// Free resources
-	gtk_tree_path_free(treePath);
-	gtk_tree_iter_free(iter2);
-	g_free(path);
-
-	// Perpetuate changes in codec queue
-	if(moveUp)
-		codec_list_move_codec_up (indice, &acc_q);
-	else
-		codec_list_move_codec_down (indice, &acc_q);
+static void codec_move (gboolean moveUp, gpointer data)
+{
+
+    GtkTreeIter iter;
+    GtkTreeIter *iter2;
+    GtkTreeView *treeView;
+    GtkTreeModel *model;
+    GtkTreeSelection *selection;
+    GtkTreePath *treePath;
+    gchar *path;
+    account_t *acc;
+    GQueue *acc_q;
+
+    // Get view, model and selection of codec store
+    model = gtk_tree_view_get_model (GTK_TREE_VIEW (codecTreeView));
+    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (codecTreeView));
+
+    // Retrieve the user data
+    acc = (account_t*) data;
+
+    if (acc)
+        acc_q = acc->codecs;
+
+    // Find selected iteration and create a copy
+    gtk_tree_selection_get_selected (GTK_TREE_SELECTION (selection), &model, &iter);
+    iter2 = gtk_tree_iter_copy (&iter);
+
+    // Find path of iteration
+    path = gtk_tree_model_get_string_from_iter (GTK_TREE_MODEL (model), &iter);
+    treePath = gtk_tree_path_new_from_string (path);
+    gint *indices = gtk_tree_path_get_indices (treePath);
+    gint indice = indices[0];
+
+    // Depending on button direction get new path
+    if (moveUp)
+        gtk_tree_path_prev (treePath);
+    else
+        gtk_tree_path_next (treePath);
+
+    gtk_tree_model_get_iter (model, &iter, treePath);
+
+    // Swap iterations if valid
+    if (gtk_list_store_iter_is_valid (GTK_LIST_STORE (model), &iter))
+        gtk_list_store_swap (GTK_LIST_STORE (model), &iter, iter2);
+
+    // Scroll to new position
+    gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (codecTreeView), treePath, NULL, FALSE, 0, 0);
+
+    // Free resources
+    gtk_tree_path_free (treePath);
+    gtk_tree_iter_free (iter2);
+    g_free (path);
+
+    // Perpetuate changes in codec queue
+    if (moveUp)
+        codec_list_move_codec_up (indice, &acc_q);
+    else
+        codec_list_move_codec_down (indice, &acc_q);
 
 }
 
 /**
  * Called from move up codec button signal
  */
-static void codec_move_up (GtkButton *button UNUSED, gpointer data) {
+static void codec_move_up (GtkButton *button UNUSED, gpointer data)
+{
 
-	// Change tree view ordering and get indice changed
-	codec_move (TRUE, data);
+    // Change tree view ordering and get indice changed
+    codec_move (TRUE, data);
 }
 
 /**
  * Called from move down codec button signal
  */
-static void codec_move_down(GtkButton *button UNUSED, gpointer data) {
+static void codec_move_down (GtkButton *button UNUSED, gpointer data)
+{
 
-	// Change tree view ordering and get indice changed
-	codec_move (FALSE, data);
+    // Change tree view ordering and get indice changed
+    codec_move (FALSE, data);
 }
 
-	int
-is_ringtone_enabled( void )
+int
+is_ringtone_enabled (void)
 {
-	return dbus_is_ringtone_enabled();
+    return dbus_is_ringtone_enabled();
 }
 
-	void
-ringtone_enabled( void )
+void
+ringtone_enabled (void)
 {
-	dbus_ringtone_enabled();
+    dbus_ringtone_enabled();
 }
 
-	void
-ringtone_changed( GtkFileChooser *chooser , GtkLabel *label UNUSED)
+void
+ringtone_changed (GtkFileChooser *chooser , GtkLabel *label UNUSED)
 {
-	gchar* tone = gtk_file_chooser_get_filename( GTK_FILE_CHOOSER( chooser ));
-	dbus_set_ringtone_choice( tone );
+    gchar* tone = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
+    dbus_set_ringtone_choice (tone);
 }
 
-	gchar*
-get_ringtone_choice( void )
+gchar*
+get_ringtone_choice (void)
 {
-	return dbus_get_ringtone_choice();
+    return dbus_get_ringtone_choice();
 }
 
 
 GtkWidget* codecs_box (account_t **a)
 {
-	GtkWidget *ret;
-	GtkWidget *scrolledWindow;
-	GtkWidget *buttonBox;
-
-	GtkListStore *codecStore;
-	GtkCellRenderer *renderer;
-	GtkTreeSelection *treeSelection;
-	GtkTreeViewColumn *treeViewColumn;
-
-	ret = gtk_hbox_new(FALSE, 10);
-	gtk_container_set_border_width(GTK_CONTAINER(ret), 10);
-
-	scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
-	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_SHADOW_IN);
-
-	gtk_box_pack_start(GTK_BOX(ret), scrolledWindow, TRUE, TRUE, 0);
-	codecStore = gtk_list_store_new(CODEC_COLUMN_COUNT,
-			G_TYPE_BOOLEAN,		// Active
-			G_TYPE_STRING,		// Name
-			G_TYPE_STRING,		// Frequency
-			G_TYPE_STRING,		// Bit rate
-			G_TYPE_STRING		// Bandwith
-			);
-
-	// Create codec tree view with list store
-	codecTreeView = gtk_tree_view_new_with_model(GTK_TREE_MODEL(codecStore));
-
-	// Get tree selection manager
-	treeSelection = gtk_tree_view_get_selection(GTK_TREE_VIEW(codecTreeView));
-	g_signal_connect(G_OBJECT(treeSelection), "changed",
-			G_CALLBACK (select_codec),
-			codecStore);
-
-	// Active column
-	renderer = gtk_cell_renderer_toggle_new();
-	treeViewColumn = gtk_tree_view_column_new_with_attributes("", renderer, "active", COLUMN_CODEC_ACTIVE, NULL);
-	gtk_tree_view_append_column(GTK_TREE_VIEW(codecTreeView), treeViewColumn);
-
-	// Toggle codec active property on clicked
-	g_signal_connect(G_OBJECT(renderer), "toggled", G_CALLBACK (codec_active_toggled), (gpointer) *a);
-
-	// Name column
-	renderer = gtk_cell_renderer_text_new();
-	treeViewColumn = gtk_tree_view_column_new_with_attributes(_("Name"), renderer, "markup", COLUMN_CODEC_NAME, NULL);
-	gtk_tree_view_append_column(GTK_TREE_VIEW(codecTreeView), treeViewColumn);
-
-	// Bit rate column
-	renderer = gtk_cell_renderer_text_new();
-	treeViewColumn = gtk_tree_view_column_new_with_attributes(_("Frequency"), renderer, "text", COLUMN_CODEC_FREQUENCY, NULL);
-	gtk_tree_view_append_column(GTK_TREE_VIEW(codecTreeView), treeViewColumn);
-
-	// Bandwith column
-	renderer = gtk_cell_renderer_text_new();
-	treeViewColumn = gtk_tree_view_column_new_with_attributes(_("Bitrate"), renderer, "text", COLUMN_CODEC_BITRATE, NULL);
-	gtk_tree_view_append_column(GTK_TREE_VIEW(codecTreeView), treeViewColumn);
-
-	// Frequency column
-	renderer = gtk_cell_renderer_text_new();
-	treeViewColumn = gtk_tree_view_column_new_with_attributes(_("Bandwidth"), renderer, "text", COLUMN_CODEC_BANDWIDTH, NULL);
-	gtk_tree_view_append_column(GTK_TREE_VIEW(codecTreeView), treeViewColumn);
-
-	g_object_unref(G_OBJECT(codecStore));
-	gtk_container_add(GTK_CONTAINER(scrolledWindow), codecTreeView);
-
-	// Create button box
-	buttonBox = gtk_vbox_new(FALSE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(buttonBox), 10);
-	gtk_box_pack_start(GTK_BOX(ret), buttonBox, FALSE, FALSE, 0);
-
-	codecMoveUpButton = gtk_button_new_from_stock(GTK_STOCK_GO_UP);
-	gtk_widget_set_sensitive(GTK_WIDGET(codecMoveUpButton), FALSE);
-	gtk_box_pack_start(GTK_BOX(buttonBox), codecMoveUpButton, FALSE, FALSE, 0);
-	g_signal_connect(G_OBJECT(codecMoveUpButton), "clicked", G_CALLBACK(codec_move_up), *a);
-
-	codecMoveDownButton = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN);
-	gtk_widget_set_sensitive(GTK_WIDGET(codecMoveDownButton), FALSE);
-	gtk_box_pack_start(GTK_BOX(buttonBox), codecMoveDownButton, FALSE, FALSE, 0);
-	g_signal_connect(G_OBJECT(codecMoveDownButton), "clicked", G_CALLBACK(codec_move_down), *a);
-
-	preferences_dialog_fill_codec_list (a);
-
-	return ret;
+    GtkWidget *ret;
+    GtkWidget *scrolledWindow;
+    GtkWidget *buttonBox;
+
+    GtkListStore *codecStore;
+    GtkCellRenderer *renderer;
+    GtkTreeSelection *treeSelection;
+    GtkTreeViewColumn *treeViewColumn;
+
+    ret = gtk_hbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
+
+    scrolledWindow = gtk_scrolled_window_new (NULL, NULL);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+    gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledWindow), GTK_SHADOW_IN);
+
+    gtk_box_pack_start (GTK_BOX (ret), scrolledWindow, TRUE, TRUE, 0);
+    codecStore = gtk_list_store_new (CODEC_COLUMN_COUNT,
+                                     G_TYPE_BOOLEAN,		// Active
+                                     G_TYPE_STRING,		// Name
+                                     G_TYPE_STRING,		// Frequency
+                                     G_TYPE_STRING,		// Bit rate
+                                     G_TYPE_STRING		// Bandwith
+                                    );
+
+    // Create codec tree view with list store
+    codecTreeView = gtk_tree_view_new_with_model (GTK_TREE_MODEL (codecStore));
+
+    // Get tree selection manager
+    treeSelection = gtk_tree_view_get_selection (GTK_TREE_VIEW (codecTreeView));
+    g_signal_connect (G_OBJECT (treeSelection), "changed",
+                      G_CALLBACK (select_codec),
+                      codecStore);
+
+    // Active column
+    renderer = gtk_cell_renderer_toggle_new();
+    treeViewColumn = gtk_tree_view_column_new_with_attributes ("", renderer, "active", COLUMN_CODEC_ACTIVE, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (codecTreeView), treeViewColumn);
+
+    // Toggle codec active property on clicked
+    g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (codec_active_toggled), (gpointer) *a);
+
+    // Name column
+    renderer = gtk_cell_renderer_text_new();
+    treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Name"), renderer, "markup", COLUMN_CODEC_NAME, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (codecTreeView), treeViewColumn);
+
+    // Bit rate column
+    renderer = gtk_cell_renderer_text_new();
+    treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Frequency"), renderer, "text", COLUMN_CODEC_FREQUENCY, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (codecTreeView), treeViewColumn);
+
+    // Bandwith column
+    renderer = gtk_cell_renderer_text_new();
+    treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Bitrate"), renderer, "text", COLUMN_CODEC_BITRATE, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (codecTreeView), treeViewColumn);
+
+    // Frequency column
+    renderer = gtk_cell_renderer_text_new();
+    treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Bandwidth"), renderer, "text", COLUMN_CODEC_BANDWIDTH, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (codecTreeView), treeViewColumn);
+
+    g_object_unref (G_OBJECT (codecStore));
+    gtk_container_add (GTK_CONTAINER (scrolledWindow), codecTreeView);
+
+    // Create button box
+    buttonBox = gtk_vbox_new (FALSE, 0);
+    gtk_container_set_border_width (GTK_CONTAINER (buttonBox), 10);
+    gtk_box_pack_start (GTK_BOX (ret), buttonBox, FALSE, FALSE, 0);
+
+    codecMoveUpButton = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
+    gtk_widget_set_sensitive (GTK_WIDGET (codecMoveUpButton), FALSE);
+    gtk_box_pack_start (GTK_BOX (buttonBox), codecMoveUpButton, FALSE, FALSE, 0);
+    g_signal_connect (G_OBJECT (codecMoveUpButton), "clicked", G_CALLBACK (codec_move_up), *a);
+
+    codecMoveDownButton = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
+    gtk_widget_set_sensitive (GTK_WIDGET (codecMoveDownButton), FALSE);
+    gtk_box_pack_start (GTK_BOX (buttonBox), codecMoveDownButton, FALSE, FALSE, 0);
+    g_signal_connect (G_OBJECT (codecMoveDownButton), "clicked", G_CALLBACK (codec_move_down), *a);
+
+    preferences_dialog_fill_codec_list (a);
+
+    return ret;
 }
 
-	void
-select_audio_manager( void )
+void
+select_audio_manager (void)
 {
-	DEBUG("audio manager selected");
-
-	if( !SHOW_ALSA_CONF && !gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(pulse) ) )
-	{
-		dbus_set_audio_manager( ALSA );
-		DEBUG(" display alsa conf panel");
-		alsabox = alsa_box();
-		gtk_container_add( GTK_CONTAINER(alsa_conf ) , alsabox);
-		gtk_widget_show( alsa_conf );
-		gtk_widget_set_sensitive(GTK_WIDGET(alsa_conf), TRUE);
-
-		gtk_action_set_sensitive (GTK_ACTION (volumeToggle), TRUE);
-	}
-	else if( SHOW_ALSA_CONF && gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(pulse) ))
-	{
-		dbus_set_audio_manager( PULSEAUDIO );
-		DEBUG(" remove alsa conf panel");
-		gtk_container_remove( GTK_CONTAINER(alsa_conf) , alsabox );
-		gtk_widget_hide( alsa_conf );
-		if (gtk_toggle_action_get_active ( GTK_TOGGLE_ACTION (volumeToggle)))
-		{
-			main_window_volume_controls(FALSE);
-			eel_gconf_set_integer (SHOW_VOLUME_CONTROLS, FALSE);
-			gtk_toggle_action_set_active ( GTK_TOGGLE_ACTION (volumeToggle), FALSE);
-		}
-		gtk_action_set_sensitive (GTK_ACTION (volumeToggle), FALSE);
-	} else {
-		DEBUG("alsa conf panel...nothing");
-	}
+    DEBUG ("audio manager selected");
+
+    if (!SHOW_ALSA_CONF && !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pulse))) {
+        dbus_set_audio_manager (ALSA);
+        DEBUG (" display alsa conf panel");
+        alsabox = alsa_box();
+        gtk_container_add (GTK_CONTAINER (alsa_conf) , alsabox);
+        gtk_widget_show (alsa_conf);
+        gtk_widget_set_sensitive (GTK_WIDGET (alsa_conf), TRUE);
+
+        gtk_action_set_sensitive (GTK_ACTION (volumeToggle), TRUE);
+    } else if (SHOW_ALSA_CONF && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pulse))) {
+        dbus_set_audio_manager (PULSEAUDIO);
+        DEBUG (" remove alsa conf panel");
+        gtk_container_remove (GTK_CONTAINER (alsa_conf) , alsabox);
+        gtk_widget_hide (alsa_conf);
+
+        if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (volumeToggle))) {
+            main_window_volume_controls (FALSE);
+            eel_gconf_set_integer (SHOW_VOLUME_CONTROLS, FALSE);
+            gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (volumeToggle), FALSE);
+        }
+
+        gtk_action_set_sensitive (GTK_ACTION (volumeToggle), FALSE);
+    } else {
+        DEBUG ("alsa conf panel...nothing");
+    }
 
 }
 
 void
-active_echo_cancel(void) {
+active_echo_cancel (void)
+{
 
     gchar* state;
     gchar* newstate;
 
-    DEBUG("Audio: Active echo cancel clicked");
+    DEBUG ("Audio: Active echo cancel clicked");
     state = dbus_get_echo_cancel_state();
 
-    DEBUG("Audio: Get echo cancel state %s", state);
+    DEBUG ("Audio: Get echo cancel state %s", state);
 
-    if(strcmp(state, "enabled") == 0)
-      newstate = "disabled";
+    if (strcmp (state, "enabled") == 0)
+        newstate = "disabled";
     else
-      newstate = "enabled";
+        newstate = "enabled";
+
+    dbus_set_echo_cancel_state (newstate);
 
-    dbus_set_echo_cancel_state(newstate);
-      
 }
 
 
 void
-active_noise_suppress(void) {
+active_noise_suppress (void)
+{
 
     gchar *state;
     gchar *newstate;
 
-    DEBUG("Audio: Active noise suppress clicked");
+    DEBUG ("Audio: Active noise suppress clicked");
     state = dbus_get_noise_suppress_state();
 
-    DEBUG("Audio: Get echo cancel state %s", state);
+    DEBUG ("Audio: Get echo cancel state %s", state);
 
-    if(strcmp(state, "enabled") == 0)
-      newstate = "disabled";
+    if (strcmp (state, "enabled") == 0)
+        newstate = "disabled";
     else
-      newstate = "enabled";
+        newstate = "enabled";
+
+    dbus_set_noise_suppress_state (newstate);
 
-    dbus_set_noise_suppress_state(newstate);
 
-    
 }
 
 GtkWidget* alsa_box()
 {
-	GtkWidget *ret;
-	GtkWidget *table;
-	GtkWidget *item;
-	GtkCellRenderer *renderer;
-
-	ret = gtk_hbox_new(FALSE, 10);
-	gtk_widget_show( ret );
-
-	table = gtk_table_new(5, 3, FALSE);
-	gtk_table_set_col_spacing(GTK_TABLE(table), 0, 40);
-	gtk_box_pack_start( GTK_BOX(ret) , table , TRUE , TRUE , 1);
-	gtk_widget_show(table);
-
-	DEBUG("Audio: Configuration plugin");
-	item = gtk_label_new(_("ALSA plugin"));
-	gtk_misc_set_alignment(GTK_MISC(item), 0, 0.5);
-	gtk_table_attach(GTK_TABLE(table), item, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
-	gtk_widget_show( item );
-	// Set choices of audio managers
-	pluginlist = gtk_list_store_new(1, G_TYPE_STRING);
-	preferences_dialog_fill_audio_plugin_list();
-	plugin = gtk_combo_box_new_with_model(GTK_TREE_MODEL(pluginlist));
-	select_active_output_audio_plugin();
-	gtk_label_set_mnemonic_widget(GTK_LABEL(item), plugin);
-	g_signal_connect(G_OBJECT(plugin), "changed", G_CALLBACK(select_output_audio_plugin), plugin);
-
-	// Set rendering
-	renderer = gtk_cell_renderer_text_new();
-	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(plugin), renderer, TRUE);
-	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(plugin), renderer, "text", 0, NULL);
-	gtk_table_attach(GTK_TABLE(table), plugin, 2, 3, 1, 2, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
-	gtk_widget_show(plugin);
-
-	// Device : Output device
-	// Create title label
-	DEBUG("Audio: Configuration output");
-	item = gtk_label_new(_("Output"));
-	gtk_misc_set_alignment(GTK_MISC(item), 0, 0.5);
-	gtk_table_attach(GTK_TABLE(table), item, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
-	gtk_widget_show(item);
-	// Set choices of output devices
-	outputlist = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT);
-	preferences_dialog_fill_output_audio_device_list();
-	output = gtk_combo_box_new_with_model(GTK_TREE_MODEL(outputlist));
-	select_active_output_audio_device();
-	gtk_label_set_mnemonic_widget(GTK_LABEL(item), output);
-	g_signal_connect(G_OBJECT(output), "changed", G_CALLBACK(select_audio_output_device), output);
-
-	// Set rendering
-	renderer = gtk_cell_renderer_text_new();
-	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(output), renderer, TRUE);
-	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(output), renderer, "text", 0, NULL);
-	gtk_table_attach(GTK_TABLE(table), output, 2, 3, 2, 3, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
-	gtk_widget_show(output);
-
-	// Device : Input device
-	// Create title label
-	DEBUG("Audio: Configuration input");
-	item = gtk_label_new(_("Input"));
-	gtk_misc_set_alignment(GTK_MISC(item), 0, 0.5);
-	gtk_table_attach(GTK_TABLE(table), item, 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
-	gtk_widget_show(item);
-
-	// Set choices of output devices
-	inputlist = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT);
-	preferences_dialog_fill_input_audio_device_list();
-	input = gtk_combo_box_new_with_model(GTK_TREE_MODEL(inputlist));
-	select_active_input_audio_device();
-	gtk_label_set_mnemonic_widget(GTK_LABEL(item), input);
-	g_signal_connect(G_OBJECT(input), "changed", G_CALLBACK(select_audio_input_device), input);
-
-	// Set rendering
-	renderer = gtk_cell_renderer_text_new();
-	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(input), renderer, TRUE);
-	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(input), renderer, "text", 0, NULL);
-	gtk_table_attach(GTK_TABLE(table), input, 2, 3, 3, 4, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
-	gtk_widget_show(input);
-
-
-	DEBUG("Audio: Configuration rintgtone");
-	item = gtk_label_new(_("Ringtone"));
-	gtk_misc_set_alignment(GTK_MISC(item), 0, 0.5);
-	gtk_table_attach(GTK_TABLE(table), item, 1, 2, 4, 5, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
-	gtk_widget_show(item);
-	// set choices of ringtone devices
-	ringtonelist = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT);
-	preferences_dialog_fill_ringtone_audio_device_list();
-	ringtone = gtk_combo_box_new_with_model(GTK_TREE_MODEL(ringtonelist));
-	select_active_ringtone_audio_device();
-	gtk_label_set_mnemonic_widget(GTK_LABEL(item), output);
-	g_signal_connect(G_OBJECT(ringtone), "changed", G_CALLBACK(select_audio_ringtone_device), output);
-
-	// Set rendering
-	renderer = gtk_cell_renderer_text_new();
-	gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(ringtone), renderer, TRUE);
-	gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(ringtone), renderer, "text", 0, NULL);
-	gtk_table_attach(GTK_TABLE(table), ringtone, 2, 3, 4, 5, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
-	gtk_widget_show(ringtone);
-
-	gtk_widget_show_all(ret);
-
-	DEBUG("done");
-	return ret;
+    GtkWidget *ret;
+    GtkWidget *table;
+    GtkWidget *item;
+    GtkCellRenderer *renderer;
+
+    ret = gtk_hbox_new (FALSE, 10);
+    gtk_widget_show (ret);
+
+    table = gtk_table_new (5, 3, FALSE);
+    gtk_table_set_col_spacing (GTK_TABLE (table), 0, 40);
+    gtk_box_pack_start (GTK_BOX (ret) , table , TRUE , TRUE , 1);
+    gtk_widget_show (table);
+
+    DEBUG ("Audio: Configuration plugin");
+    item = gtk_label_new (_ ("ALSA plugin"));
+    gtk_misc_set_alignment (GTK_MISC (item), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), item, 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+    gtk_widget_show (item);
+    // Set choices of audio managers
+    pluginlist = gtk_list_store_new (1, G_TYPE_STRING);
+    preferences_dialog_fill_audio_plugin_list();
+    plugin = gtk_combo_box_new_with_model (GTK_TREE_MODEL (pluginlist));
+    select_active_output_audio_plugin();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (item), plugin);
+    g_signal_connect (G_OBJECT (plugin), "changed", G_CALLBACK (select_output_audio_plugin), plugin);
+
+    // Set rendering
+    renderer = gtk_cell_renderer_text_new();
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (plugin), renderer, TRUE);
+    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (plugin), renderer, "text", 0, NULL);
+    gtk_table_attach (GTK_TABLE (table), plugin, 2, 3, 1, 2, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+    gtk_widget_show (plugin);
+
+    // Device : Output device
+    // Create title label
+    DEBUG ("Audio: Configuration output");
+    item = gtk_label_new (_ ("Output"));
+    gtk_misc_set_alignment (GTK_MISC (item), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), item, 1, 2, 2, 3, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+    gtk_widget_show (item);
+    // Set choices of output devices
+    outputlist = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
+    preferences_dialog_fill_output_audio_device_list();
+    output = gtk_combo_box_new_with_model (GTK_TREE_MODEL (outputlist));
+    select_active_output_audio_device();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (item), output);
+    g_signal_connect (G_OBJECT (output), "changed", G_CALLBACK (select_audio_output_device), output);
+
+    // Set rendering
+    renderer = gtk_cell_renderer_text_new();
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (output), renderer, TRUE);
+    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (output), renderer, "text", 0, NULL);
+    gtk_table_attach (GTK_TABLE (table), output, 2, 3, 2, 3, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+    gtk_widget_show (output);
+
+    // Device : Input device
+    // Create title label
+    DEBUG ("Audio: Configuration input");
+    item = gtk_label_new (_ ("Input"));
+    gtk_misc_set_alignment (GTK_MISC (item), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), item, 1, 2, 3, 4, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+    gtk_widget_show (item);
+
+    // Set choices of output devices
+    inputlist = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
+    preferences_dialog_fill_input_audio_device_list();
+    input = gtk_combo_box_new_with_model (GTK_TREE_MODEL (inputlist));
+    select_active_input_audio_device();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (item), input);
+    g_signal_connect (G_OBJECT (input), "changed", G_CALLBACK (select_audio_input_device), input);
+
+    // Set rendering
+    renderer = gtk_cell_renderer_text_new();
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (input), renderer, TRUE);
+    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (input), renderer, "text", 0, NULL);
+    gtk_table_attach (GTK_TABLE (table), input, 2, 3, 3, 4, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+    gtk_widget_show (input);
+
+
+    DEBUG ("Audio: Configuration rintgtone");
+    item = gtk_label_new (_ ("Ringtone"));
+    gtk_misc_set_alignment (GTK_MISC (item), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), item, 1, 2, 4, 5, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+    gtk_widget_show (item);
+    // set choices of ringtone devices
+    ringtonelist = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT);
+    preferences_dialog_fill_ringtone_audio_device_list();
+    ringtone = gtk_combo_box_new_with_model (GTK_TREE_MODEL (ringtonelist));
+    select_active_ringtone_audio_device();
+    gtk_label_set_mnemonic_widget (GTK_LABEL (item), output);
+    g_signal_connect (G_OBJECT (ringtone), "changed", G_CALLBACK (select_audio_ringtone_device), output);
+
+    // Set rendering
+    renderer = gtk_cell_renderer_text_new();
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (ringtone), renderer, TRUE);
+    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (ringtone), renderer, "text", 0, NULL);
+    gtk_table_attach (GTK_TABLE (table), ringtone, 2, 3, 4, 5, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+    gtk_widget_show (ringtone);
+
+    gtk_widget_show_all (ret);
+
+    DEBUG ("done");
+    return ret;
 }
 
 GtkWidget* noise_box()
 {
-	GtkWidget *ret;
-	GtkWidget *enableEchoCancel;
-	GtkWidget *enableNoiseReduction;
-	gboolean echocancelActive, noisesuppressActive;
-	gchar *state;
-
-	ret = gtk_hbox_new( TRUE , 1);
-	
-	enableEchoCancel = gtk_check_button_new_with_mnemonic( _("_Echo Suppression"));
-	state = dbus_get_echo_cancel_state();
-	echocancelActive = FALSE;
-        if(strcmp(state, "enabled") == 0)
-	  echocancelActive = TRUE;
-	else
-	  echocancelActive = FALSE;
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enableEchoCancel), echocancelActive);
-	g_signal_connect(G_OBJECT(enableEchoCancel), "clicked", active_echo_cancel, NULL);
-
-	gtk_box_pack_start( GTK_BOX(ret), enableEchoCancel, TRUE , TRUE , 1);
-
-
-	enableNoiseReduction = gtk_check_button_new_with_mnemonic( _("_Noise Reduction"));
-	state = dbus_get_noise_suppress_state();
-	noisesuppressActive = FALSE;
-	if(strcmp(state, "enabled") == 0)
-	  noisesuppressActive = TRUE;
-	else
-	  noisesuppressActive = FALSE;
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enableNoiseReduction), noisesuppressActive);
-	gtk_box_pack_start( GTK_BOX(ret) , enableNoiseReduction , TRUE , TRUE , 1);
-
-	g_signal_connect(G_OBJECT(enableNoiseReduction), "clicked", active_noise_suppress, NULL);
+    GtkWidget *ret;
+    GtkWidget *enableEchoCancel;
+    GtkWidget *enableNoiseReduction;
+    gboolean echocancelActive, noisesuppressActive;
+    gchar *state;
 
-	return ret;
+    ret = gtk_hbox_new (TRUE , 1);
+
+    enableEchoCancel = gtk_check_button_new_with_mnemonic (_ ("_Echo Suppression"));
+    state = dbus_get_echo_cancel_state();
+    echocancelActive = FALSE;
+
+    if (strcmp (state, "enabled") == 0)
+        echocancelActive = TRUE;
+    else
+        echocancelActive = FALSE;
+
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enableEchoCancel), echocancelActive);
+    g_signal_connect (G_OBJECT (enableEchoCancel), "clicked", active_echo_cancel, NULL);
+
+    gtk_box_pack_start (GTK_BOX (ret), enableEchoCancel, TRUE , TRUE , 1);
+
+
+    enableNoiseReduction = gtk_check_button_new_with_mnemonic (_ ("_Noise Reduction"));
+    state = dbus_get_noise_suppress_state();
+    noisesuppressActive = FALSE;
+
+    if (strcmp (state, "enabled") == 0)
+        noisesuppressActive = TRUE;
+    else
+        noisesuppressActive = FALSE;
+
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enableNoiseReduction), noisesuppressActive);
+    gtk_box_pack_start (GTK_BOX (ret) , enableNoiseReduction , TRUE , TRUE , 1);
+
+    g_signal_connect (G_OBJECT (enableNoiseReduction), "clicked", active_noise_suppress, NULL);
+
+    return ret;
 }
 
-static void record_path_changed( GtkFileChooser *chooser , GtkLabel *label UNUSED)
+static void record_path_changed (GtkFileChooser *chooser , GtkLabel *label UNUSED)
 {
-	DEBUG("record_path_changed");
+    DEBUG ("record_path_changed");
 
-	gchar* path;
-	path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER( chooser ));
-	DEBUG("path2 %s", path);
-	dbus_set_record_path( path );
+    gchar* path;
+    path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
+    DEBUG ("path2 %s", path);
+    dbus_set_record_path (path);
 }
 
 GtkWidget* create_audio_configuration()
 {
-	// Main widget
-	GtkWidget *ret;
-	// Sub boxes
-	GtkWidget *box;
-	GtkWidget *frame;
+    // Main widget
+    GtkWidget *ret;
+    // Sub boxes
+    GtkWidget *box;
+    GtkWidget *frame;
 
-	ret = gtk_vbox_new(FALSE, 10);
-	gtk_container_set_border_width(GTK_CONTAINER(ret), 10);
+    ret = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
 
-	GtkWidget *alsa;
-	GtkWidget *table;
-
-	gnome_main_section_new_with_table (_("Sound Manager"), &frame, &table, 1, 2);
-	gtk_box_pack_start(GTK_BOX(ret), frame, FALSE, FALSE, 0);
-
-	int audio_manager = dbus_get_audio_manager();
-	gboolean pulse_audio = FALSE;
-	if (audio_manager == PULSEAUDIO) {
-		pulse_audio = TRUE;
-	}
-
-	pulse = gtk_radio_button_new_with_mnemonic( NULL , _("_Pulseaudio"));
-	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(pulse), pulse_audio);
-	gtk_table_attach ( GTK_TABLE( table ), pulse, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	alsa = gtk_radio_button_new_with_mnemonic_from_widget(GTK_RADIO_BUTTON(pulse),  _("_ALSA"));
-	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(alsa), !pulse_audio);
-	g_signal_connect(G_OBJECT(alsa), "clicked", G_CALLBACK(select_audio_manager), NULL);
-	gtk_table_attach ( GTK_TABLE( table ), alsa, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	// Box for the ALSA configuration
-	gnome_main_section_new (_("ALSA settings"), &alsa_conf);
-	gtk_box_pack_start(GTK_BOX(ret), alsa_conf, FALSE, FALSE, 0);
-	gtk_widget_show( alsa_conf );
-	if( SHOW_ALSA_CONF )
-	{
-		// Box for the ALSA configuration
-		printf("ALSA Created \n");
-		alsabox = alsa_box();
-		gtk_container_add( GTK_CONTAINER(alsa_conf) , alsabox );
-		gtk_widget_hide( alsa_conf );
-	}
-
-	// Recorded file saving path
-	GtkWidget *label;
-	GtkWidget *folderChooser;
-	gchar *dftPath;
-
-	/* Get the path where to save audio files */
-	dftPath = dbus_get_record_path ();
-	DEBUG("load recording path %s\n", dftPath);
-
-	gnome_main_section_new_with_table (_("Recordings"), &frame, &table, 1, 2);
-	gtk_box_pack_start(GTK_BOX(ret), frame, FALSE, FALSE, 0);
-
-	// label
-	label = gtk_label_new(_("Destination folder"));
-	gtk_table_attach( GTK_TABLE(table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
-
-	// folder chooser button
-	folderChooser = gtk_file_chooser_button_new(_("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-	gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER( folderChooser), dftPath);
-	g_signal_connect( G_OBJECT( folderChooser ) , "selection_changed" , G_CALLBACK( record_path_changed ) , NULL );
-	gtk_table_attach(GTK_TABLE(table), folderChooser, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
-
-	// Box for the ringtones
-	gnome_main_section_new_with_table (_("Ringtones"), &frame, &table, 1, 2);
-	gtk_box_pack_start(GTK_BOX(ret), frame, FALSE, FALSE, 0); 
-
-	GtkWidget *enableTone;
-	GtkWidget *fileChooser;
-
-	enableTone = gtk_check_button_new_with_mnemonic( _("_Enable ringtones"));
-	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(enableTone), dbus_is_ringtone_enabled() );
-	g_signal_connect(G_OBJECT( enableTone) , "clicked" , G_CALLBACK( ringtone_enabled ) , NULL);
-	gtk_table_attach ( GTK_TABLE( table ), enableTone, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	// file chooser button
-	fileChooser = gtk_file_chooser_button_new(_("Choose a ringtone"), GTK_FILE_CHOOSER_ACTION_OPEN);
-	gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER( fileChooser) , g_get_home_dir());
-	gtk_file_chooser_set_filename(GTK_FILE_CHOOSER( fileChooser) , get_ringtone_choice());
-	g_signal_connect( G_OBJECT( fileChooser ) , "selection_changed" , G_CALLBACK( ringtone_changed ) , NULL );
-
-	GtkFileFilter *filter = gtk_file_filter_new();
-	gtk_file_filter_set_name( filter , _("Audio Files") );
-	gtk_file_filter_add_pattern(filter , "*.wav" );
-	gtk_file_filter_add_pattern(filter , "*.ul" );
-	gtk_file_filter_add_pattern(filter , "*.au" );
-	gtk_file_chooser_add_filter( GTK_FILE_CHOOSER( fileChooser ) , filter);
-	gtk_table_attach ( GTK_TABLE( table ), fileChooser, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-	gnome_main_section_new (_("Voice enhancement settings"), &noise_conf);
-	gtk_box_pack_start(GTK_BOX(ret), noise_conf, FALSE, FALSE, 0);
-	gtk_widget_show( noise_conf );
-
-	// Box for the voice enhancement configuration
-	noisebox = noise_box();
-	gtk_container_add( GTK_CONTAINER(noise_conf) , noisebox );
-	
+    GtkWidget *alsa;
+    GtkWidget *table;
 
-	gtk_widget_show_all(ret);
+    gnome_main_section_new_with_table (_ ("Sound Manager"), &frame, &table, 1, 2);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
 
-	if(!pulse_audio) {
-		gtk_widget_show(alsa_conf);
-	}
-	else{
-		gtk_widget_hide(alsa_conf);
-	}
+    int audio_manager = dbus_get_audio_manager();
+    gboolean pulse_audio = FALSE;
 
-	return ret;
+    if (audio_manager == PULSEAUDIO) {
+        pulse_audio = TRUE;
+    }
+
+    pulse = gtk_radio_button_new_with_mnemonic (NULL , _ ("_Pulseaudio"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pulse), pulse_audio);
+    gtk_table_attach (GTK_TABLE (table), pulse, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    alsa = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (pulse),  _ ("_ALSA"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (alsa), !pulse_audio);
+    g_signal_connect (G_OBJECT (alsa), "clicked", G_CALLBACK (select_audio_manager), NULL);
+    gtk_table_attach (GTK_TABLE (table), alsa, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    // Box for the ALSA configuration
+    gnome_main_section_new (_ ("ALSA settings"), &alsa_conf);
+    gtk_box_pack_start (GTK_BOX (ret), alsa_conf, FALSE, FALSE, 0);
+    gtk_widget_show (alsa_conf);
+
+    if (SHOW_ALSA_CONF) {
+        // Box for the ALSA configuration
+        printf ("ALSA Created \n");
+        alsabox = alsa_box();
+        gtk_container_add (GTK_CONTAINER (alsa_conf) , alsabox);
+        gtk_widget_hide (alsa_conf);
+    }
+
+    // Recorded file saving path
+    GtkWidget *label;
+    GtkWidget *folderChooser;
+    gchar *dftPath;
+
+    /* Get the path where to save audio files */
+    dftPath = dbus_get_record_path ();
+    DEBUG ("load recording path %s\n", dftPath);
+
+    gnome_main_section_new_with_table (_ ("Recordings"), &frame, &table, 1, 2);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+
+    // label
+    label = gtk_label_new (_ ("Destination folder"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
+
+    // folder chooser button
+    folderChooser = gtk_file_chooser_button_new (_ ("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
+    gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (folderChooser), dftPath);
+    g_signal_connect (G_OBJECT (folderChooser) , "selection_changed" , G_CALLBACK (record_path_changed) , NULL);
+    gtk_table_attach (GTK_TABLE (table), folderChooser, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
+
+    // Box for the ringtones
+    gnome_main_section_new_with_table (_ ("Ringtones"), &frame, &table, 1, 2);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+
+    GtkWidget *enableTone;
+    GtkWidget *fileChooser;
+
+    enableTone = gtk_check_button_new_with_mnemonic (_ ("_Enable ringtones"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enableTone), dbus_is_ringtone_enabled());
+    g_signal_connect (G_OBJECT (enableTone) , "clicked" , G_CALLBACK (ringtone_enabled) , NULL);
+    gtk_table_attach (GTK_TABLE (table), enableTone, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    // file chooser button
+    fileChooser = gtk_file_chooser_button_new (_ ("Choose a ringtone"), GTK_FILE_CHOOSER_ACTION_OPEN);
+    gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (fileChooser) , g_get_home_dir());
+    gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (fileChooser) , get_ringtone_choice());
+    g_signal_connect (G_OBJECT (fileChooser) , "selection_changed" , G_CALLBACK (ringtone_changed) , NULL);
+
+    GtkFileFilter *filter = gtk_file_filter_new();
+    gtk_file_filter_set_name (filter , _ ("Audio Files"));
+    gtk_file_filter_add_pattern (filter , "*.wav");
+    gtk_file_filter_add_pattern (filter , "*.ul");
+    gtk_file_filter_add_pattern (filter , "*.au");
+    gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (fileChooser) , filter);
+    gtk_table_attach (GTK_TABLE (table), fileChooser, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    gnome_main_section_new (_ ("Voice enhancement settings"), &noise_conf);
+    gtk_box_pack_start (GTK_BOX (ret), noise_conf, FALSE, FALSE, 0);
+    gtk_widget_show (noise_conf);
+
+    // Box for the voice enhancement configuration
+    noisebox = noise_box();
+    gtk_container_add (GTK_CONTAINER (noise_conf) , noisebox);
+
+
+    gtk_widget_show_all (ret);
+
+    if (!pulse_audio) {
+        gtk_widget_show (alsa_conf);
+    } else {
+        gtk_widget_hide (alsa_conf);
+    }
+
+    return ret;
 }
 /*
 GtkWidget* create_codecs_configuration (account_t **a) {
diff --git a/sflphone-client-gnome/src/config/audioconf.h b/sflphone-client-gnome/src/config/audioconf.h
index b195b947d8ce1d0b6ff6f35ca0cb077469f56ce4..70fadb3dc3c06c1fc7af069d8e4e52bec6595b33 100644
--- a/sflphone-client-gnome/src/config/audioconf.h
+++ b/sflphone-client-gnome/src/config/audioconf.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *  
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -42,6 +42,6 @@ GtkWidget* pulse_box();
 GtkWidget* codecs_box();
 GtkWidget* ringtone_box();
 
-gboolean get_api( );
+gboolean get_api();
 
 #endif // __AUDIO_CONF_H
diff --git a/sflphone-client-gnome/src/config/hooks-config.c b/sflphone-client-gnome/src/config/hooks-config.c
index 7331cc88fc94e634f1097c7585ff12e71d66ee8c..df257d6eaa561cf777cadb03a55ada635b0ad325 100644
--- a/sflphone-client-gnome/src/config/hooks-config.c
+++ b/sflphone-client-gnome/src/config/hooks-config.c
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *  
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -34,14 +34,15 @@ URLHook_Config *_urlhook_config;
 
 GtkWidget *field, *command, *prefix;
 
-void hooks_load_parameters (URLHook_Config** settings){
+void hooks_load_parameters (URLHook_Config** settings)
+{
 
     GHashTable *_params = NULL;
     URLHook_Config *_settings;
 
     // Allocate a struct
     _settings = g_new0 (URLHook_Config, 1);
-    
+
     // Fetch the settings from D-Bus
     _params = (GHashTable*) dbus_get_hook_settings ();
 
@@ -52,38 +53,38 @@ void hooks_load_parameters (URLHook_Config** settings){
         _settings->iax2_enabled = "0";
         _settings->phone_number_enabled = "0";
         _settings->phone_number_prefix = "";
+    } else {
+        _settings->sip_field = (gchar*) (g_hash_table_lookup (_params, URLHOOK_SIP_FIELD));
+        _settings->command = (gchar*) (g_hash_table_lookup (_params, URLHOOK_COMMAND));
+        _settings->sip_enabled = (gchar*) (g_hash_table_lookup (_params, URLHOOK_SIP_ENABLED));
+        _settings->iax2_enabled = (gchar*) (g_hash_table_lookup (_params, URLHOOK_IAX2_ENABLED));
+        _settings->phone_number_enabled = (gchar*) (g_hash_table_lookup (_params, PHONE_NUMBER_HOOK_ENABLED));
+        _settings->phone_number_prefix = (gchar*) (g_hash_table_lookup (_params, PHONE_NUMBER_HOOK_ADD_PREFIX));
     }
-    else {
-        _settings->sip_field =  (gchar*)(g_hash_table_lookup (_params, URLHOOK_SIP_FIELD));
-        _settings->command =  (gchar*)(g_hash_table_lookup (_params, URLHOOK_COMMAND));
-        _settings->sip_enabled =  (gchar*)(g_hash_table_lookup (_params, URLHOOK_SIP_ENABLED));
-        _settings->iax2_enabled =  (gchar*)(g_hash_table_lookup (_params, URLHOOK_IAX2_ENABLED));
-        _settings->phone_number_enabled =  (gchar*)(g_hash_table_lookup (_params, PHONE_NUMBER_HOOK_ENABLED ));
-        _settings->phone_number_prefix =  (gchar*)(g_hash_table_lookup (_params, PHONE_NUMBER_HOOK_ADD_PREFIX ));
-    }
- 
+
     *settings = _settings;
 }
 
 
-void hooks_save_parameters (void){
+void hooks_save_parameters (void)
+{
 
     GHashTable *params = NULL;
-    
+
     params = g_hash_table_new (NULL, g_str_equal);
-    g_hash_table_replace (params, (gpointer)URLHOOK_SIP_FIELD, 
-                                g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(field))));
-    g_hash_table_replace (params, (gpointer)URLHOOK_COMMAND, 
-                                g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(command))));
-    g_hash_table_replace (params, (gpointer)URLHOOK_SIP_ENABLED, 
-                                (gpointer)g_strdup(_urlhook_config->sip_enabled));
-    g_hash_table_replace (params, (gpointer)URLHOOK_IAX2_ENABLED, 
-                                (gpointer)g_strdup(_urlhook_config->iax2_enabled));
-    g_hash_table_replace (params, (gpointer)PHONE_NUMBER_HOOK_ENABLED, 
-                                (gpointer)g_strdup(_urlhook_config->phone_number_enabled));
-    g_hash_table_replace (params, (gpointer)PHONE_NUMBER_HOOK_ADD_PREFIX, 
-                                g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(prefix)))); 
-    
+    g_hash_table_replace (params, (gpointer) URLHOOK_SIP_FIELD,
+                          g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (field))));
+    g_hash_table_replace (params, (gpointer) URLHOOK_COMMAND,
+                          g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (command))));
+    g_hash_table_replace (params, (gpointer) URLHOOK_SIP_ENABLED,
+                          (gpointer) g_strdup (_urlhook_config->sip_enabled));
+    g_hash_table_replace (params, (gpointer) URLHOOK_IAX2_ENABLED,
+                          (gpointer) g_strdup (_urlhook_config->iax2_enabled));
+    g_hash_table_replace (params, (gpointer) PHONE_NUMBER_HOOK_ENABLED,
+                          (gpointer) g_strdup (_urlhook_config->phone_number_enabled));
+    g_hash_table_replace (params, (gpointer) PHONE_NUMBER_HOOK_ADD_PREFIX,
+                          g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (prefix))));
+
     dbus_set_hook_settings (params);
 
     // Decrement the reference count
@@ -91,104 +92,111 @@ void hooks_save_parameters (void){
 
 }
 
-static void sip_enabled_cb (GtkWidget *widget) {
+static void sip_enabled_cb (GtkWidget *widget)
+{
 
     guint check;
 
-    check = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
+    check = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+
     if (check)
         _urlhook_config->sip_enabled="1";
     else
         _urlhook_config->sip_enabled="0";
 }
 
-static void iax2_enabled_cb (GtkWidget *widget) {
+static void iax2_enabled_cb (GtkWidget *widget)
+{
 
     guint check;
 
-    check = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
+    check = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+
     if (check)
         _urlhook_config->iax2_enabled="1";
     else
         _urlhook_config->iax2_enabled="0";
 }
 
-static void phone_number_enabled_cb (GtkWidget *widget) {
+static void phone_number_enabled_cb (GtkWidget *widget)
+{
 
     guint check;
 
-    check = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
-    if (check){
+    check = (guint) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+
+    if (check) {
         _urlhook_config->phone_number_enabled="1";
-        gtk_widget_set_sensitive (GTK_WIDGET (prefix), TRUE);  
-    }else{
+        gtk_widget_set_sensitive (GTK_WIDGET (prefix), TRUE);
+    } else {
         _urlhook_config->phone_number_enabled="0";
-        gtk_widget_set_sensitive (GTK_WIDGET (prefix), FALSE);  
+        gtk_widget_set_sensitive (GTK_WIDGET (prefix), FALSE);
     }
 }
 
 
-GtkWidget* create_hooks_settings (){
+GtkWidget* create_hooks_settings ()
+{
 
     GtkWidget *ret, *frame, *table, *label, *widg;
 
     // Load the user value
     hooks_load_parameters (&_urlhook_config);
 
-    ret = gtk_vbox_new(FALSE, 10);
-    gtk_container_set_border_width(GTK_CONTAINER(ret), 10);
+    ret = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
 
-    gnome_main_section_new_with_table (_("URL Argument"), &frame, &table, 5, 2);
-    gtk_box_pack_start(GTK_BOX(ret), frame, FALSE, FALSE, 0);
+    gnome_main_section_new_with_table (_ ("URL Argument"), &frame, &table, 5, 2);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
     gtk_widget_show (frame);
 
 
-    label = gtk_label_new(_("Custom commands on incoming calls with URL"));
-    gtk_table_attach ( GTK_TABLE( table ), label, 0, 2, 0, 1, GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    label = gtk_label_new (_ ("Custom commands on incoming calls with URL"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 2, 0, 1, GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    label = gtk_label_new (_ ("%s will be replaced with the passed URL."));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 2, 1, 2, GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
-    label = gtk_label_new(_("%s will be replaced with the passed URL."));
-    gtk_table_attach ( GTK_TABLE( table ), label, 0, 2, 1, 2, GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    widg = gtk_check_button_new_with_mnemonic (_ ("Trigger on specific _SIP header"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widg), (g_strcasecmp (_urlhook_config->sip_enabled, "1") ==0) ?TRUE:FALSE);
+    g_signal_connect (G_OBJECT (widg) , "clicked" , G_CALLBACK (sip_enabled_cb), NULL);
+    gtk_table_attach (GTK_TABLE (table), widg, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
-    widg = gtk_check_button_new_with_mnemonic( _("Trigger on specific _SIP header"));
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(widg), (g_strcasecmp (_urlhook_config->sip_enabled, "1")==0)?TRUE:FALSE);
-    g_signal_connect (G_OBJECT(widg) , "clicked" , G_CALLBACK (sip_enabled_cb), NULL);
-    gtk_table_attach ( GTK_TABLE( table ), widg, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
- 
     field = gtk_entry_new ();
-    gtk_entry_set_text(GTK_ENTRY(field), _urlhook_config->sip_field);
-    gtk_table_attach ( GTK_TABLE( table ), field, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_entry_set_text (GTK_ENTRY (field), _urlhook_config->sip_field);
+    gtk_table_attach (GTK_TABLE (table), field, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
-    widg = gtk_check_button_new_with_mnemonic( _("Trigger on _IAX2 URL"));
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(widg), (g_strcasecmp (_urlhook_config->iax2_enabled, "1")==0)?TRUE:FALSE); 
-    g_signal_connect (G_OBJECT(widg) , "clicked" , G_CALLBACK (iax2_enabled_cb), NULL);
-    gtk_table_attach ( GTK_TABLE( table ), widg, 0, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    widg = gtk_check_button_new_with_mnemonic (_ ("Trigger on _IAX2 URL"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widg), (g_strcasecmp (_urlhook_config->iax2_enabled, "1") ==0) ?TRUE:FALSE);
+    g_signal_connect (G_OBJECT (widg) , "clicked" , G_CALLBACK (iax2_enabled_cb), NULL);
+    gtk_table_attach (GTK_TABLE (table), widg, 0, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
-    label = gtk_label_new_with_mnemonic (_("Command to _run"));
-    gtk_misc_set_alignment(GTK_MISC(label), 0.05, 0.5);
-    gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    label = gtk_label_new_with_mnemonic (_ ("Command to _run"));
+    gtk_misc_set_alignment (GTK_MISC (label), 0.05, 0.5);
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
     command = gtk_entry_new ();
     gtk_label_set_mnemonic_widget (GTK_LABEL (label), command);
-    gtk_entry_set_text(GTK_ENTRY(command), _urlhook_config->command);
-    gtk_table_attach ( GTK_TABLE( table ), command, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 10);
+    gtk_entry_set_text (GTK_ENTRY (command), _urlhook_config->command);
+    gtk_table_attach (GTK_TABLE (table), command, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 10);
 
 
 
-    gnome_main_section_new_with_table (_("Phone number rewriting"), &frame, &table, 4, 2);
-    gtk_box_pack_start(GTK_BOX(ret), frame, FALSE, FALSE, 0);
+    gnome_main_section_new_with_table (_ ("Phone number rewriting"), &frame, &table, 4, 2);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
     gtk_widget_show (frame);
 
-    widg = gtk_check_button_new_with_mnemonic( _("_Prefix dialed numbers with"));
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(widg), (g_strcasecmp (_urlhook_config->phone_number_enabled, "1")==0)?TRUE:FALSE);
-    g_signal_connect (G_OBJECT(widg) , "clicked" , G_CALLBACK (phone_number_enabled_cb), NULL);
-    gtk_table_attach ( GTK_TABLE( table ), widg, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
- 
+    widg = gtk_check_button_new_with_mnemonic (_ ("_Prefix dialed numbers with"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widg), (g_strcasecmp (_urlhook_config->phone_number_enabled, "1") ==0) ?TRUE:FALSE);
+    g_signal_connect (G_OBJECT (widg) , "clicked" , G_CALLBACK (phone_number_enabled_cb), NULL);
+    gtk_table_attach (GTK_TABLE (table), widg, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
     prefix = gtk_entry_new ();
     gtk_label_set_mnemonic_widget (GTK_LABEL (label), prefix);
-    gtk_entry_set_text(GTK_ENTRY(prefix), _urlhook_config->phone_number_prefix);
-    gtk_widget_set_sensitive (GTK_WIDGET (prefix), gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widg)));
-    gtk_table_attach ( GTK_TABLE( table ), prefix, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 10);
+    gtk_entry_set_text (GTK_ENTRY (prefix), _urlhook_config->phone_number_prefix);
+    gtk_widget_set_sensitive (GTK_WIDGET (prefix), gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widg)));
+    gtk_table_attach (GTK_TABLE (table), prefix, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 10);
 
-    gtk_widget_show_all(ret);
+    gtk_widget_show_all (ret);
 
     return ret;
 }
diff --git a/sflphone-client-gnome/src/config/hooks-config.h b/sflphone-client-gnome/src/config/hooks-config.h
index 5fcd951b21c4105b25842955b2b1cfd75e73a40a..f1b575517ae1206156ed3967a00f46fc9809f0bd 100644
--- a/sflphone-client-gnome/src/config/hooks-config.h
+++ b/sflphone-client-gnome/src/config/hooks-config.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *  
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *  
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *  
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -55,8 +55,8 @@ typedef struct _URLHook_Config {
     gchar *sip_field;
     gchar *command;
     gchar *phone_number_enabled;
-    gchar *phone_number_prefix; 
-}URLHook_Config;
+    gchar *phone_number_prefix;
+} URLHook_Config;
 
 /**
  * Save the parameters through D-BUS
diff --git a/sflphone-client-gnome/src/config/preferencesdialog.c b/sflphone-client-gnome/src/config/preferencesdialog.c
index ff68a31c7af95928bd411b15cbf9e38a2fd4da02..7aae7db058df4eeae98624b86cd838e4f1ff2ca3 100644
--- a/sflphone-client-gnome/src/config/preferencesdialog.c
+++ b/sflphone-client-gnome/src/config/preferencesdialog.c
@@ -75,71 +75,73 @@ static void
 set_md5_hash_cb (GtkWidget *widget UNUSED, gpointer data UNUSED)
 {
 
-  gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget));
-  dbus_set_md5_credential_hashing (enabled);
+    gboolean enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+    dbus_set_md5_credential_hashing (enabled);
 }
 
 static void
 start_hidden (void)
 {
-	gboolean currentstate = eel_gconf_get_integer (START_HIDDEN);
-	eel_gconf_set_integer (START_HIDDEN, !currentstate);
+    gboolean currentstate = eel_gconf_get_integer (START_HIDDEN);
+    eel_gconf_set_integer (START_HIDDEN, !currentstate);
 }
 
 static void
 set_popup_mode (GtkWidget *widget, gpointer *userdata)
 {
-	gboolean currentstate = eel_gconf_get_integer (POPUP_ON_CALL);
-	if (currentstate || gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
-		eel_gconf_set_integer (POPUP_ON_CALL, !currentstate);
-	}
+    gboolean currentstate = eel_gconf_get_integer (POPUP_ON_CALL);
+
+    if (currentstate || gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
+        eel_gconf_set_integer (POPUP_ON_CALL, !currentstate);
+    }
 }
 
 void
 set_notif_level ()
 {
-	gboolean current_state = eel_gconf_get_integer (NOTIFY_ALL);
-	eel_gconf_set_integer (NOTIFY_ALL, !current_state);
+    gboolean current_state = eel_gconf_get_integer (NOTIFY_ALL);
+    eel_gconf_set_integer (NOTIFY_ALL, !current_state);
 }
 
 static void
 history_limit_cb (GtkSpinButton *button, void *ptr)
 {
-  history_limit = gtk_spin_button_get_value_as_int ((GtkSpinButton *) (ptr));
+    history_limit = gtk_spin_button_get_value_as_int ( (GtkSpinButton *) (ptr));
 }
 
 static void
 history_enabled_cb (GtkWidget *widget)
 {
-  history_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
-  gtk_widget_set_sensitive (GTK_WIDGET (history_value), history_enabled);
+    history_enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+    gtk_widget_set_sensitive (GTK_WIDGET (history_value), history_enabled);
 
-  // Toggle it through D-Bus
-  eel_gconf_set_integer (HISTORY_ENABLED, !eel_gconf_get_integer (HISTORY_ENABLED));
+    // Toggle it through D-Bus
+    eel_gconf_set_integer (HISTORY_ENABLED, !eel_gconf_get_integer (HISTORY_ENABLED));
 }
 
 void
 clean_history (void)
 {
-  calllist_clean_history ();
+    calllist_clean_history ();
 }
 
-void showstatusicon_cb (GtkWidget *widget, gpointer data) {
+void showstatusicon_cb (GtkWidget *widget, gpointer data)
+{
 
-  gboolean currentstatus = FALSE;
+    gboolean currentstatus = FALSE;
 
-  // data contains the previous value of dbus_is_status_icon_enabled () - ie before the click.
-  currentstatus = (gboolean) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+    // data contains the previous value of dbus_is_status_icon_enabled () - ie before the click.
+    currentstatus = (gboolean) gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 
-  // Update the widget states
-  gtk_widget_set_sensitive (GTK_WIDGET (popupwindow), currentstatus);
-  gtk_widget_set_sensitive (GTK_WIDGET (neverpopupwindow), currentstatus);
-  gtk_widget_set_sensitive (GTK_WIDGET (starthidden), currentstatus);
+    // Update the widget states
+    gtk_widget_set_sensitive (GTK_WIDGET (popupwindow), currentstatus);
+    gtk_widget_set_sensitive (GTK_WIDGET (neverpopupwindow), currentstatus);
+    gtk_widget_set_sensitive (GTK_WIDGET (starthidden), currentstatus);
 
-  currentstatus ?       show_status_icon () : hide_status_icon ();
+    currentstatus ?       show_status_icon () : hide_status_icon ();
 
-	// Update through D-Bus
-	eel_gconf_set_integer (SHOW_STATUSICON, currentstatus);
+    // Update through D-Bus
+    eel_gconf_set_integer (SHOW_STATUSICON, currentstatus);
 }
 
 
@@ -147,125 +149,125 @@ GtkWidget*
 create_general_settings ()
 {
 
-  GtkWidget *ret, *notifAll, *trayItem, *frame, *checkBoxWidget, *label, *table;
-  gboolean statusicon;
-
-  // Load history configuration
-  history_load_configuration ();
-
-  // Main widget
-  ret = gtk_vbox_new (FALSE, 10);
-  gtk_container_set_border_width (GTK_CONTAINER(ret), 10);
-
-  // Notifications Frame
-  gnome_main_section_new_with_table (_("Desktop Notifications"), &frame,
-      &table, 2, 1);
-  gtk_box_pack_start (GTK_BOX(ret), frame, FALSE, FALSE, 0);
-
-  // Notification All
-  notifAll = gtk_check_button_new_with_mnemonic (_("_Enable notifications"));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(notifAll), eel_gconf_get_integer (NOTIFY_ALL));
-  g_signal_connect(G_OBJECT( notifAll ) , "clicked" , G_CALLBACK( set_notif_level ) , NULL );
-  gtk_table_attach (GTK_TABLE(table), notifAll, 0, 1, 0, 1, GTK_EXPAND
-      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
-
-  // System Tray option frame
-  gnome_main_section_new_with_table (_("System Tray Icon"), &frame, &table, 4,
-      1);
-  gtk_box_pack_start (GTK_BOX(ret), frame, FALSE, FALSE, 0);
-
-  // Whether or not displaying an icon in the system tray
-  statusicon = eel_gconf_get_integer (SHOW_STATUSICON);
-
-  showstatusicon = gtk_check_button_new_with_mnemonic (
-      _("Show SFLphone in the system tray"));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(showstatusicon), statusicon);
-  g_signal_connect (G_OBJECT (showstatusicon) , "clicked" , G_CALLBACK (showstatusicon_cb), NULL);
-  gtk_table_attach (GTK_TABLE (table), showstatusicon, 0, 1, 0, 1, GTK_EXPAND
-      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
-
-  popupwindow = gtk_radio_button_new_with_mnemonic (NULL,
-      _("_Popup main window on incoming call"));
-  g_signal_connect(G_OBJECT (popupwindow), "toggled", G_CALLBACK (set_popup_mode), NULL);
-  gtk_table_attach (GTK_TABLE(table), popupwindow, 0, 1, 1, 2, GTK_EXPAND
-      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
-
-  neverpopupwindow = gtk_radio_button_new_with_mnemonic_from_widget (
-      GTK_RADIO_BUTTON (popupwindow), _("Ne_ver popup main window"));
-  gtk_table_attach (GTK_TABLE(table), neverpopupwindow, 0, 1, 2, 3, GTK_EXPAND
-      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
-
-	// Toggle according to the user configuration
-	eel_gconf_get_integer (POPUP_ON_CALL) ? gtk_toggle_button_set_active (
-												GTK_TOGGLE_BUTTON (popupwindow), 
-												TRUE) : 
-											gtk_toggle_button_set_active (
-												GTK_TOGGLE_BUTTON (neverpopupwindow), 
-												TRUE);
-
-  starthidden = gtk_check_button_new_with_mnemonic (
-      _("Hide SFLphone window on _startup"));
-
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(starthidden),
-      eel_gconf_get_integer (START_HIDDEN));
-  g_signal_connect(G_OBJECT (starthidden) , "clicked" , G_CALLBACK( start_hidden ) , NULL);
-  gtk_table_attach (GTK_TABLE(table), starthidden, 0, 1, 3, 4, GTK_EXPAND
-      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
-
-  // Update the widget states
-  gtk_widget_set_sensitive (GTK_WIDGET (popupwindow),statusicon);
-  gtk_widget_set_sensitive (GTK_WIDGET (neverpopupwindow),statusicon);
-  gtk_widget_set_sensitive (GTK_WIDGET (starthidden),statusicon);
-
-  // HISTORY CONFIGURATION
-  gnome_main_section_new_with_table (_("Calls History"), &frame, &table, 3, 1);
-  gtk_box_pack_start (GTK_BOX(ret), frame, FALSE, FALSE, 0);
-
-  checkBoxWidget = gtk_check_button_new_with_mnemonic (
-      _("_Keep my history for at least"));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkBoxWidget),
-      history_enabled);
-  g_signal_connect (G_OBJECT (checkBoxWidget) , "clicked" , G_CALLBACK (history_enabled_cb) , NULL);
-  gtk_table_attach (GTK_TABLE(table), checkBoxWidget, 0, 1, 0, 1, GTK_EXPAND
-      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
-
-  history_value = gtk_spin_button_new_with_range (1, 99, 1);
-  gtk_spin_button_set_value (GTK_SPIN_BUTTON(history_value), history_limit);
-  g_signal_connect( G_OBJECT (history_value) , "value-changed" , G_CALLBACK (history_limit_cb) , history_value);
-  gtk_widget_set_sensitive (GTK_WIDGET (history_value),
-      gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkBoxWidget)));
-  gtk_table_attach (GTK_TABLE(table), history_value, 1, 2, 0, 1, GTK_EXPAND
-      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
-
-  label = gtk_label_new (_("days"));
-  gtk_table_attach (GTK_TABLE(table), label, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL,
-      GTK_EXPAND | GTK_FILL, 0, 5);
-
-  gtk_widget_show_all (ret);
-
-  return ret;
+    GtkWidget *ret, *notifAll, *trayItem, *frame, *checkBoxWidget, *label, *table;
+    gboolean statusicon;
+
+    // Load history configuration
+    history_load_configuration ();
+
+    // Main widget
+    ret = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
+
+    // Notifications Frame
+    gnome_main_section_new_with_table (_ ("Desktop Notifications"), &frame,
+                                       &table, 2, 1);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+
+    // Notification All
+    notifAll = gtk_check_button_new_with_mnemonic (_ ("_Enable notifications"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (notifAll), eel_gconf_get_integer (NOTIFY_ALL));
+    g_signal_connect (G_OBJECT (notifAll) , "clicked" , G_CALLBACK (set_notif_level) , NULL);
+    gtk_table_attach (GTK_TABLE (table), notifAll, 0, 1, 0, 1, GTK_EXPAND
+                      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
+
+    // System Tray option frame
+    gnome_main_section_new_with_table (_ ("System Tray Icon"), &frame, &table, 4,
+                                       1);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+
+    // Whether or not displaying an icon in the system tray
+    statusicon = eel_gconf_get_integer (SHOW_STATUSICON);
+
+    showstatusicon = gtk_check_button_new_with_mnemonic (
+                         _ ("Show SFLphone in the system tray"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (showstatusicon), statusicon);
+    g_signal_connect (G_OBJECT (showstatusicon) , "clicked" , G_CALLBACK (showstatusicon_cb), NULL);
+    gtk_table_attach (GTK_TABLE (table), showstatusicon, 0, 1, 0, 1, GTK_EXPAND
+                      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
+
+    popupwindow = gtk_radio_button_new_with_mnemonic (NULL,
+                  _ ("_Popup main window on incoming call"));
+    g_signal_connect (G_OBJECT (popupwindow), "toggled", G_CALLBACK (set_popup_mode), NULL);
+    gtk_table_attach (GTK_TABLE (table), popupwindow, 0, 1, 1, 2, GTK_EXPAND
+                      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
+
+    neverpopupwindow = gtk_radio_button_new_with_mnemonic_from_widget (
+                           GTK_RADIO_BUTTON (popupwindow), _ ("Ne_ver popup main window"));
+    gtk_table_attach (GTK_TABLE (table), neverpopupwindow, 0, 1, 2, 3, GTK_EXPAND
+                      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
+
+    // Toggle according to the user configuration
+    eel_gconf_get_integer (POPUP_ON_CALL) ? gtk_toggle_button_set_active (
+        GTK_TOGGLE_BUTTON (popupwindow),
+        TRUE) :
+    gtk_toggle_button_set_active (
+        GTK_TOGGLE_BUTTON (neverpopupwindow),
+        TRUE);
+
+    starthidden = gtk_check_button_new_with_mnemonic (
+                      _ ("Hide SFLphone window on _startup"));
+
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (starthidden),
+                                  eel_gconf_get_integer (START_HIDDEN));
+    g_signal_connect (G_OBJECT (starthidden) , "clicked" , G_CALLBACK (start_hidden) , NULL);
+    gtk_table_attach (GTK_TABLE (table), starthidden, 0, 1, 3, 4, GTK_EXPAND
+                      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
+
+    // Update the widget states
+    gtk_widget_set_sensitive (GTK_WIDGET (popupwindow),statusicon);
+    gtk_widget_set_sensitive (GTK_WIDGET (neverpopupwindow),statusicon);
+    gtk_widget_set_sensitive (GTK_WIDGET (starthidden),statusicon);
+
+    // HISTORY CONFIGURATION
+    gnome_main_section_new_with_table (_ ("Calls History"), &frame, &table, 3, 1);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+
+    checkBoxWidget = gtk_check_button_new_with_mnemonic (
+                         _ ("_Keep my history for at least"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkBoxWidget),
+                                  history_enabled);
+    g_signal_connect (G_OBJECT (checkBoxWidget) , "clicked" , G_CALLBACK (history_enabled_cb) , NULL);
+    gtk_table_attach (GTK_TABLE (table), checkBoxWidget, 0, 1, 0, 1, GTK_EXPAND
+                      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
+
+    history_value = gtk_spin_button_new_with_range (1, 99, 1);
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON (history_value), history_limit);
+    g_signal_connect (G_OBJECT (history_value) , "value-changed" , G_CALLBACK (history_limit_cb) , history_value);
+    gtk_widget_set_sensitive (GTK_WIDGET (history_value),
+                              gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkBoxWidget)));
+    gtk_table_attach (GTK_TABLE (table), history_value, 1, 2, 0, 1, GTK_EXPAND
+                      | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 5);
+
+    label = gtk_label_new (_ ("days"));
+    gtk_table_attach (GTK_TABLE (table), label, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL,
+                      GTK_EXPAND | GTK_FILL, 0, 5);
+
+    gtk_widget_show_all (ret);
+
+    return ret;
 }
 
 void
 save_configuration_parameters (void)
 {
 
-  // Address book config
-  addressbook_config_save_parameters ();
-  hooks_save_parameters ();
+    // Address book config
+    addressbook_config_save_parameters ();
+    hooks_save_parameters ();
 
-  // History config
-  dbus_set_history_limit (history_limit);
+    // History config
+    dbus_set_history_limit (history_limit);
 
-  // Direct IP calls config
-  // dbus_set_ip2ip_details (directIpCallsProperties);
+    // Direct IP calls config
+    // dbus_set_ip2ip_details (directIpCallsProperties);
 }
 
 void
 history_load_configuration ()
 {
-  history_limit = dbus_get_history_limit ();
-  history_enabled = eel_gconf_get_integer (HISTORY_ENABLED); 
+    history_limit = dbus_get_history_limit ();
+    history_enabled = eel_gconf_get_integer (HISTORY_ENABLED);
 }
 
 /**
@@ -274,69 +276,69 @@ history_load_configuration ()
 void
 show_preferences_dialog ()
 {
-  GtkDialog * dialog;
-  GtkWidget * notebook;
-  GtkWidget * tab;
-  guint result;
-
-  dialogOpen = TRUE;
-
-  dialog = GTK_DIALOG(gtk_dialog_new_with_buttons (_("Preferences"),
-          GTK_WINDOW(get_main_window()),
-          GTK_DIALOG_DESTROY_WITH_PARENT,
-          GTK_STOCK_CLOSE,
-          GTK_RESPONSE_ACCEPT,
-          NULL));
-
-  // Set window properties
-  gtk_dialog_set_has_separator (dialog, FALSE);
-  gtk_window_set_default_size (GTK_WINDOW(dialog), 600, 400);
-  gtk_container_set_border_width (GTK_CONTAINER(dialog), 0);
-
-  // Create tabs container
-  notebook = gtk_notebook_new ();
-  gtk_box_pack_start (GTK_BOX (dialog->vbox), notebook, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER(notebook), 10);
-  gtk_widget_show (notebook);
-
-  // General settings tab
-  tab = create_general_settings ();
-  gtk_notebook_append_page (GTK_NOTEBOOK(notebook), tab, gtk_label_new (
-      _("General")));
-  gtk_notebook_page_num (GTK_NOTEBOOK(notebook), tab);
-
-  // Audio tab
-  tab = create_audio_configuration ();
-  gtk_notebook_append_page (GTK_NOTEBOOK(notebook), tab, gtk_label_new (
-      _("Audio")));
-  gtk_notebook_page_num (GTK_NOTEBOOK(notebook), tab);
-
-  // Addressbook tab
-  tab = create_addressbook_settings ();
-  gtk_notebook_append_page (GTK_NOTEBOOK(notebook), tab, gtk_label_new (
-      _("Address Book")));
-  gtk_notebook_page_num (GTK_NOTEBOOK(notebook), tab);
-
-  // Hooks tab
-  tab = create_hooks_settings ();
-  gtk_notebook_append_page (GTK_NOTEBOOK(notebook), tab, gtk_label_new (
-      _("Hooks")));
-  gtk_notebook_page_num (GTK_NOTEBOOK(notebook), tab);
-
-  // Shortcuts tab
-  tab = create_shortcuts_settings();
-  gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new(_("Shortcuts")));
-  gtk_notebook_page_num(GTK_NOTEBOOK(notebook), tab);
-
-  gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
-
-  result = gtk_dialog_run (dialog);
-
-  save_configuration_parameters ();
-  update_actions ();
-
-  dialogOpen = FALSE;
-
-  gtk_widget_destroy (GTK_WIDGET(dialog));
+    GtkDialog * dialog;
+    GtkWidget * notebook;
+    GtkWidget * tab;
+    guint result;
+
+    dialogOpen = TRUE;
+
+    dialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_ ("Preferences"),
+                         GTK_WINDOW (get_main_window()),
+                         GTK_DIALOG_DESTROY_WITH_PARENT,
+                         GTK_STOCK_CLOSE,
+                         GTK_RESPONSE_ACCEPT,
+                         NULL));
+
+    // Set window properties
+    gtk_dialog_set_has_separator (dialog, FALSE);
+    gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 400);
+    gtk_container_set_border_width (GTK_CONTAINER (dialog), 0);
+
+    // Create tabs container
+    notebook = gtk_notebook_new ();
+    gtk_box_pack_start (GTK_BOX (dialog->vbox), notebook, TRUE, TRUE, 0);
+    gtk_container_set_border_width (GTK_CONTAINER (notebook), 10);
+    gtk_widget_show (notebook);
+
+    // General settings tab
+    tab = create_general_settings ();
+    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), tab, gtk_label_new (
+                                  _ ("General")));
+    gtk_notebook_page_num (GTK_NOTEBOOK (notebook), tab);
+
+    // Audio tab
+    tab = create_audio_configuration ();
+    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), tab, gtk_label_new (
+                                  _ ("Audio")));
+    gtk_notebook_page_num (GTK_NOTEBOOK (notebook), tab);
+
+    // Addressbook tab
+    tab = create_addressbook_settings ();
+    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), tab, gtk_label_new (
+                                  _ ("Address Book")));
+    gtk_notebook_page_num (GTK_NOTEBOOK (notebook), tab);
+
+    // Hooks tab
+    tab = create_hooks_settings ();
+    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), tab, gtk_label_new (
+                                  _ ("Hooks")));
+    gtk_notebook_page_num (GTK_NOTEBOOK (notebook), tab);
+
+    // Shortcuts tab
+    tab = create_shortcuts_settings();
+    gtk_notebook_append_page (GTK_NOTEBOOK (notebook), tab, gtk_label_new (_ ("Shortcuts")));
+    gtk_notebook_page_num (GTK_NOTEBOOK (notebook), tab);
+
+    gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
+
+    result = gtk_dialog_run (dialog);
+
+    save_configuration_parameters ();
+    update_actions ();
+
+    dialogOpen = FALSE;
+
+    gtk_widget_destroy (GTK_WIDGET (dialog));
 }
 
diff --git a/sflphone-client-gnome/src/config/preferencesdialog.h b/sflphone-client-gnome/src/config/preferencesdialog.h
index e14a240111419084212a5e59f9bcde86b944adb8..fb5193bf70ac1bb8e7ad608eae116ebb92f4e097 100644
--- a/sflphone-client-gnome/src/config/preferencesdialog.h
+++ b/sflphone-client-gnome/src/config/preferencesdialog.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -85,7 +85,7 @@ void select_active_output_audio_plugin();
  * because the default plugin always use default audio device
  * @param plugin The description of the selected plugin
  */
-void update_combo_box( gchar* plugin );
+void update_combo_box (gchar* plugin);
 
 /**
  * Build the widget to display codec list
@@ -97,7 +97,7 @@ GtkWidget * create_codec_table();
  * Create the main account window in a new window
  * @return GtkWidget* The widget created
  */
-GtkWidget * create_accounts_tab(GtkDialog * dialog);
+GtkWidget * create_accounts_tab (GtkDialog * dialog);
 
 /**
  * Create the audio configuration tab and add it to the main configuration window
@@ -121,4 +121,4 @@ void save_configuration_parameters (void);
 
 void history_load_configuration (void);
 
-#endif 
+#endif
diff --git a/sflphone-client-gnome/src/config/shortcuts-config.c b/sflphone-client-gnome/src/config/shortcuts-config.c
index 64bdfd0d434fe677c195bab07d7f1dffaf51cdf4..47fb054bd257f51bf9529654e7979980c04d2150 100644
--- a/sflphone-client-gnome/src/config/shortcuts-config.c
+++ b/sflphone-client-gnome/src/config/shortcuts-config.c
@@ -36,44 +36,43 @@
 GtkWidget*
 create_shortcuts_settings()
 {
-  GtkWidget *vbox, *result_frame, *window, *treeview, *scrolled_window, *label;
+    GtkWidget *vbox, *result_frame, *window, *treeview, *scrolled_window, *label;
 
-  GtkTreeIter iter;
-  guint i = 0;
+    GtkTreeIter iter;
+    guint i = 0;
 
-  vbox = gtk_vbox_new(FALSE, 10);
-  gtk_container_set_border_width(GTK_CONTAINER(vbox), 10);
+    vbox = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
 
-  gnome_main_section_new(_("General"), &result_frame);
+    gnome_main_section_new (_ ("General"), &result_frame);
 
-  label = gtk_label_new(_("Be careful: these shortcuts might override system-wide shortcuts."));
+    label = gtk_label_new (_ ("Be careful: these shortcuts might override system-wide shortcuts."));
 
-  treeview = gtk_tree_view_new();
-  setup_tree_view(treeview);
+    treeview = gtk_tree_view_new();
+    setup_tree_view (treeview);
 
-  GtkListStore *store = gtk_list_store_new(COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_UINT);
+    GtkListStore *store = gtk_list_store_new (COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_UINT);
 
-  Accelerator* list = shortcuts_get_list();
+    Accelerator* list = shortcuts_get_list();
 
-  while (list[i].action != NULL)
-    {
-      gtk_list_store_append(store, &iter);
-      gtk_list_store_set(store, &iter, ACTION, _(list[i].action), MASK,
-          (gint) list[i].mask, VALUE, XKeycodeToKeysym(GDK_DISPLAY(),
-              list[i].value, 0), -1);
-      i++;
+    while (list[i].action != NULL) {
+        gtk_list_store_append (store, &iter);
+        gtk_list_store_set (store, &iter, ACTION, _ (list[i].action), MASK,
+                            (gint) list[i].mask, VALUE, XKeycodeToKeysym (GDK_DISPLAY(),
+                                    list[i].value, 0), -1);
+        i++;
     }
 
-  gtk_tree_view_set_model(GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store));
-  g_object_unref(store);
+    gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store));
+    g_object_unref (store);
 
-  gtk_container_add(GTK_CONTAINER (result_frame), treeview);
-  gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
-  gtk_box_pack_start(GTK_BOX(vbox), result_frame, FALSE, FALSE, 0);
+    gtk_container_add (GTK_CONTAINER (result_frame), treeview);
+    gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (vbox), result_frame, FALSE, FALSE, 0);
 
-  gtk_widget_show_all(vbox);
+    gtk_widget_show_all (vbox);
 
-  return vbox;
+    return vbox;
 }
 
 /*
@@ -81,76 +80,77 @@ create_shortcuts_settings()
  * second is a keyboard accelerator.
  */
 static void
-setup_tree_view(GtkWidget *treeview)
+setup_tree_view (GtkWidget *treeview)
 {
-  GtkCellRenderer *renderer;
-  GtkTreeViewColumn *column;
-
-  renderer = gtk_cell_renderer_text_new();
-  column = gtk_tree_view_column_new_with_attributes("Action", renderer, "text",
-      ACTION, NULL);
-  gtk_tree_view_append_column(GTK_TREE_VIEW (treeview), column);
-
-  renderer = gtk_cell_renderer_accel_new();
-  g_object_set(renderer, "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_GTK,
-      "editable", TRUE, NULL);
-  column = gtk_tree_view_column_new_with_attributes("Shortcut", renderer,
-      "accel-mods", MASK, "accel-key", VALUE, NULL);
-
-  gtk_tree_view_append_column(GTK_TREE_VIEW (treeview), column);
-  g_signal_connect (G_OBJECT (renderer), "accel_edited", G_CALLBACK (accel_edited), (gpointer) treeview);
-  g_signal_connect (G_OBJECT (renderer), "accel_cleared", G_CALLBACK (accel_cleared), (gpointer) treeview);
+    GtkCellRenderer *renderer;
+    GtkTreeViewColumn *column;
+
+    renderer = gtk_cell_renderer_text_new();
+    column = gtk_tree_view_column_new_with_attributes ("Action", renderer, "text",
+             ACTION, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
+
+    renderer = gtk_cell_renderer_accel_new();
+    g_object_set (renderer, "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_GTK,
+                  "editable", TRUE, NULL);
+    column = gtk_tree_view_column_new_with_attributes ("Shortcut", renderer,
+             "accel-mods", MASK, "accel-key", VALUE, NULL);
+
+    gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
+    g_signal_connect (G_OBJECT (renderer), "accel_edited", G_CALLBACK (accel_edited), (gpointer) treeview);
+    g_signal_connect (G_OBJECT (renderer), "accel_cleared", G_CALLBACK (accel_cleared), (gpointer) treeview);
 }
 
 static void
-accel_edited(GtkCellRendererAccel *renderer, gchar *path, guint accel_key,
-    GdkModifierType mask, guint hardware_keycode, GtkTreeView *treeview)
+accel_edited (GtkCellRendererAccel *renderer, gchar *path, guint accel_key,
+              GdkModifierType mask, guint hardware_keycode, GtkTreeView *treeview)
 {
-  DEBUG("Accel edited");
-
-  GtkTreeModel *model;
-  GtkTreeIter iter;
-
-  Accelerator* list = shortcuts_get_list();
-  model = gtk_tree_view_get_model(treeview);
-  gint code = XKeysymToKeycode(GDK_DISPLAY(), accel_key);
-
-  // Disable existing binding if key already used
-  int i = 0;
-  gtk_tree_model_get_iter_first(model, &iter);
-  while (list[i].action != NULL)
-      {
-          if(list[i].value == code)
-            {
-              gtk_list_store_set(GTK_LIST_STORE (model), &iter, MASK, 0, VALUE, 0, -1);
-              WARN("This key was already affected");
-            }
-          gtk_tree_model_iter_next(model, &iter);
-          i++;
-      }
-
-  // Update treeview
-  if (gtk_tree_model_get_iter_from_string(model, &iter, path))
-    gtk_list_store_set(GTK_LIST_STORE (model), &iter, MASK, (gint) mask, VALUE,
-        accel_key, -1);
-
-  // Update GDK bindings
-  shortcuts_update_bindings(atoi(path), code);
+    DEBUG ("Accel edited");
+
+    GtkTreeModel *model;
+    GtkTreeIter iter;
+
+    Accelerator* list = shortcuts_get_list();
+    model = gtk_tree_view_get_model (treeview);
+    gint code = XKeysymToKeycode (GDK_DISPLAY(), accel_key);
+
+    // Disable existing binding if key already used
+    int i = 0;
+    gtk_tree_model_get_iter_first (model, &iter);
+
+    while (list[i].action != NULL) {
+        if (list[i].value == code) {
+            gtk_list_store_set (GTK_LIST_STORE (model), &iter, MASK, 0, VALUE, 0, -1);
+            WARN ("This key was already affected");
+        }
+
+        gtk_tree_model_iter_next (model, &iter);
+        i++;
+    }
+
+    // Update treeview
+    if (gtk_tree_model_get_iter_from_string (model, &iter, path))
+        gtk_list_store_set (GTK_LIST_STORE (model), &iter, MASK, (gint) mask, VALUE,
+                            accel_key, -1);
+
+    // Update GDK bindings
+    shortcuts_update_bindings (atoi (path), code);
 }
 
 static void
-accel_cleared(GtkCellRendererAccel *renderer, gchar *path, GtkTreeView *treeview)
+accel_cleared (GtkCellRendererAccel *renderer, gchar *path, GtkTreeView *treeview)
 {
-  DEBUG("Accel cleared");
+    DEBUG ("Accel cleared");
+
+    GtkTreeModel *model;
+    GtkTreeIter iter;
 
-  GtkTreeModel *model;
-  GtkTreeIter iter;
+    // Update treeview
+    model = gtk_tree_view_get_model (treeview);
 
-  // Update treeview
-  model = gtk_tree_view_get_model(treeview);
-  if (gtk_tree_model_get_iter_from_string(model, &iter, path))
-    gtk_list_store_set(GTK_LIST_STORE (model), &iter, MASK, 0, VALUE, 0, -1);
+    if (gtk_tree_model_get_iter_from_string (model, &iter, path))
+        gtk_list_store_set (GTK_LIST_STORE (model), &iter, MASK, 0, VALUE, 0, -1);
 
-  // Update GDK bindings
-  shortcuts_update_bindings(atoi(path), 0);
+    // Update GDK bindings
+    shortcuts_update_bindings (atoi (path), 0);
 }
diff --git a/sflphone-client-gnome/src/config/shortcuts-config.h b/sflphone-client-gnome/src/config/shortcuts-config.h
index 02682ab0a1631384205a7ae4939c4ae25fa48610..10a4b85bfffb81c50dc50eb468bab733e0b8c09e 100644
--- a/sflphone-client-gnome/src/config/shortcuts-config.h
+++ b/sflphone-client-gnome/src/config/shortcuts-config.h
@@ -39,9 +39,8 @@
 
 G_BEGIN_DECLS
 
-enum
-{
-  ACTION = 0, MASK, VALUE, COLUMNS
+enum {
+    ACTION = 0, MASK, VALUE, COLUMNS
 };
 
 GtkWidget*
@@ -52,11 +51,11 @@ setup_tree_view (GtkWidget *treeview);
 
 static void
 accel_edited (GtkCellRendererAccel *renderer, gchar *path, guint accel_key,
-    GdkModifierType mask, guint hardware_keycode, GtkTreeView *treeview);
+              GdkModifierType mask, guint hardware_keycode, GtkTreeView *treeview);
 
 static void
 accel_cleared (GtkCellRendererAccel *renderer, gchar *path,
-    GtkTreeView *treeview);
+               GtkTreeView *treeview);
 
 G_END_DECLS
 
diff --git a/sflphone-client-gnome/src/config/tlsadvanceddialog.c b/sflphone-client-gnome/src/config/tlsadvanceddialog.c
index 4050d0338f8ba1b2714ba083b29681444689afaf..530880d7957b23051f8c6deb910219a765f5eeab 100644
--- a/sflphone-client-gnome/src/config/tlsadvanceddialog.c
+++ b/sflphone-client-gnome/src/config/tlsadvanceddialog.c
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -41,328 +41,326 @@
 #include <libsexy/sexy-icon-entry.h>
 #endif
 
-void show_advanced_tls_options(GHashTable * properties)
+void show_advanced_tls_options (GHashTable * properties)
 {
     GtkDialog * tlsDialog;
     GtkWidget * ret;
-            
-    tlsDialog = GTK_DIALOG(gtk_dialog_new_with_buttons (_("Advanced options for TLS"),
-                GTK_WINDOW(get_main_window()),
-                GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                GTK_STOCK_CANCEL,
-                GTK_RESPONSE_CANCEL,
-                GTK_STOCK_SAVE,
-                GTK_RESPONSE_ACCEPT,
-                NULL));
-
-    gtk_window_set_policy( GTK_WINDOW(tlsDialog), FALSE, FALSE, FALSE );
-    gtk_dialog_set_has_separator(tlsDialog, TRUE);
-    gtk_container_set_border_width (GTK_CONTAINER(tlsDialog), 0);
-
-    ret = gtk_vbox_new(FALSE, 10);
-    gtk_container_set_border_width(GTK_CONTAINER(ret), 10);
-    gtk_box_pack_start(GTK_BOX(tlsDialog->vbox), ret, FALSE, FALSE, 0);  
-            
-    GtkWidget *frame, *table;     
-    gnome_main_section_new_with_table (_("TLS transport"), &frame, &table, 3, 13);
-    gtk_container_set_border_width(GTK_CONTAINER (table), 10);
-    gtk_box_pack_start(GTK_BOX(ret), frame, FALSE, FALSE, 0);
-        
-    gchar * description = g_markup_printf_escaped(_("TLS transport can be used along with UDP for those calls that would\n"\
-                                                    "require secure sip transactions (aka SIPS). You can configure a different\n"\
-                                                    "TLS transport for each account. However, each of them will run on a dedicated\n"\
-                                                    "port, different one from each other\n"));
-    GtkWidget * label;                                         
-    label = gtk_label_new(NULL);
-    gtk_widget_set_size_request(label, 600, 70); 
-    gtk_label_set_line_wrap (GTK_LABEL(label), TRUE);
-    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-    gtk_label_set_markup(GTK_LABEL(label), description);
-    gtk_table_attach(GTK_TABLE(table), label, 0, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-            
+
+    tlsDialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_ ("Advanced options for TLS"),
+                            GTK_WINDOW (get_main_window()),
+                            GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                            GTK_STOCK_CANCEL,
+                            GTK_RESPONSE_CANCEL,
+                            GTK_STOCK_SAVE,
+                            GTK_RESPONSE_ACCEPT,
+                            NULL));
+
+    gtk_window_set_policy (GTK_WINDOW (tlsDialog), FALSE, FALSE, FALSE);
+    gtk_dialog_set_has_separator (tlsDialog, TRUE);
+    gtk_container_set_border_width (GTK_CONTAINER (tlsDialog), 0);
+
+    ret = gtk_vbox_new (FALSE, 10);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 10);
+    gtk_box_pack_start (GTK_BOX (tlsDialog->vbox), ret, FALSE, FALSE, 0);
+
+    GtkWidget *frame, *table;
+    gnome_main_section_new_with_table (_ ("TLS transport"), &frame, &table, 3, 13);
+    gtk_container_set_border_width (GTK_CONTAINER (table), 10);
+    gtk_box_pack_start (GTK_BOX (ret), frame, FALSE, FALSE, 0);
+
+    gchar * description = g_markup_printf_escaped (_ ("TLS transport can be used along with UDP for those calls that would\n"\
+                          "require secure sip transactions (aka SIPS). You can configure a different\n"\
+                          "TLS transport for each account. However, each of them will run on a dedicated\n"\
+                          "port, different one from each other\n"));
+    GtkWidget * label;
+    label = gtk_label_new (NULL);
+    gtk_widget_set_size_request (label, 600, 70);
+    gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    gtk_label_set_markup (GTK_LABEL (label), description);
+    gtk_table_attach (GTK_TABLE (table), label, 0, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
     gchar * account_id;
     gchar * tls_listener_port;
     gchar * tls_ca_list_file;
     gchar * tls_certificate_file;
     gchar * tls_private_key_file;
-    gchar * tls_password;    
+    gchar * tls_password;
     gchar * tls_method;
     gchar * tls_ciphers;
     gchar * tls_server_name;
-    gchar * verify_server; 
-    gchar * verify_client;     
-    gchar * require_client_certificate;    	    
+    gchar * verify_server;
+    gchar * verify_client;
+    gchar * require_client_certificate;
     gchar * negotiation_timeout_sec;
-    gchar * negotiation_timeout_msec;	  
+    gchar * negotiation_timeout_msec;
 
     if (properties != NULL) {
 
-        account_id = g_hash_table_lookup(properties, ACCOUNT_ID);
-        tls_listener_port = g_hash_table_lookup(properties, TLS_LISTENER_PORT);
-        tls_ca_list_file = g_hash_table_lookup(properties, TLS_CA_LIST_FILE);
-	tls_certificate_file = g_hash_table_lookup(properties, TLS_CERTIFICATE_FILE);
-	tls_private_key_file = g_hash_table_lookup(properties, TLS_PRIVATE_KEY_FILE);
-	tls_password = g_hash_table_lookup(properties, TLS_PASSWORD);	    
-	tls_method = g_hash_table_lookup(properties, TLS_METHOD);
-	tls_ciphers = g_hash_table_lookup(properties, TLS_CIPHERS);	  
-	tls_server_name = g_hash_table_lookup(properties, TLS_SERVER_NAME);	  	    
-	verify_server = g_hash_table_lookup(properties, TLS_VERIFY_SERVER);	    	    
-	verify_client = g_hash_table_lookup(properties, TLS_VERIFY_CLIENT);	 	      
-	require_client_certificate = g_hash_table_lookup(properties, TLS_REQUIRE_CLIENT_CERTIFICATE);	    	    
-	negotiation_timeout_sec = g_hash_table_lookup(properties, TLS_NEGOTIATION_TIMEOUT_SEC);
-	negotiation_timeout_msec = g_hash_table_lookup(properties, TLS_NEGOTIATION_TIMEOUT_MSEC);   
+        account_id = g_hash_table_lookup (properties, ACCOUNT_ID);
+        tls_listener_port = g_hash_table_lookup (properties, TLS_LISTENER_PORT);
+        tls_ca_list_file = g_hash_table_lookup (properties, TLS_CA_LIST_FILE);
+        tls_certificate_file = g_hash_table_lookup (properties, TLS_CERTIFICATE_FILE);
+        tls_private_key_file = g_hash_table_lookup (properties, TLS_PRIVATE_KEY_FILE);
+        tls_password = g_hash_table_lookup (properties, TLS_PASSWORD);
+        tls_method = g_hash_table_lookup (properties, TLS_METHOD);
+        tls_ciphers = g_hash_table_lookup (properties, TLS_CIPHERS);
+        tls_server_name = g_hash_table_lookup (properties, TLS_SERVER_NAME);
+        verify_server = g_hash_table_lookup (properties, TLS_VERIFY_SERVER);
+        verify_client = g_hash_table_lookup (properties, TLS_VERIFY_CLIENT);
+        require_client_certificate = g_hash_table_lookup (properties, TLS_REQUIRE_CLIENT_CERTIFICATE);
+        negotiation_timeout_sec = g_hash_table_lookup (properties, TLS_NEGOTIATION_TIMEOUT_SEC);
+        negotiation_timeout_msec = g_hash_table_lookup (properties, TLS_NEGOTIATION_TIMEOUT_MSEC);
 
     }
 
-    
-    label = gtk_label_new(_("Global TLS listener (all accounts)"));
-    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-    gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    GtkWidget * tlsListenerPort;    
-    GtkWidget * hbox = gtk_hbox_new(FALSE, 10);
-    gtk_table_attach(GTK_TABLE(table), hbox, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    tlsListenerPort = gtk_spin_button_new_with_range(0, 65535, 1);
-    gtk_label_set_mnemonic_widget(GTK_LABEL (label), tlsListenerPort);
-    gtk_spin_button_set_value(GTK_SPIN_BUTTON(tlsListenerPort), g_ascii_strtod(tls_listener_port, NULL));
-    gtk_box_pack_start_defaults(GTK_BOX(hbox), tlsListenerPort);
-
-    if(g_strcmp0(account_id, IP2IP_PROFILE) != 0) {
-      gtk_widget_set_sensitive(tlsListenerPort, FALSE);    
+
+    label = gtk_label_new (_ ("Global TLS listener (all accounts)"));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    GtkWidget * tlsListenerPort;
+    GtkWidget * hbox = gtk_hbox_new (FALSE, 10);
+    gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    tlsListenerPort = gtk_spin_button_new_with_range (0, 65535, 1);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), tlsListenerPort);
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON (tlsListenerPort), g_ascii_strtod (tls_listener_port, NULL));
+    gtk_box_pack_start_defaults (GTK_BOX (hbox), tlsListenerPort);
+
+    if (g_strcmp0 (account_id, IP2IP_PROFILE) != 0) {
+        gtk_widget_set_sensitive (tlsListenerPort, FALSE);
     }
-       
-    label = gtk_label_new( _("Certificate of Authority list"));
-    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-    gtk_table_attach (GTK_TABLE(table), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    label = gtk_label_new (_ ("Certificate of Authority list"));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
     GtkWidget * caListFileChooser;
-    caListFileChooser = gtk_file_chooser_button_new(_("Choose a CA list file (optional)"), GTK_FILE_CHOOSER_ACTION_OPEN);
-    gtk_table_attach (GTK_TABLE(table), caListFileChooser, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    caListFileChooser = gtk_file_chooser_button_new (_ ("Choose a CA list file (optional)"), GTK_FILE_CHOOSER_ACTION_OPEN);
+    gtk_table_attach (GTK_TABLE (table), caListFileChooser, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
 
     if (tls_ca_list_file == NULL) {
-        gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(caListFileChooser));
+        gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER (caListFileChooser));
 
-    } 
-    else {
-        if(g_strcmp0(tls_ca_list_file, "") == 0) {
+    } else {
+        if (g_strcmp0 (tls_ca_list_file, "") == 0) {
 
-	    gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(caListFileChooser));
-	}
-	else{
+            gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER (caListFileChooser));
+        } else {
 
-	    GFile * file = g_file_new_for_path(tls_ca_list_file);
-	    gtk_file_chooser_set_file (GTK_FILE_CHOOSER(caListFileChooser), file, NULL);
-	    g_object_unref(file);
-	}
+            GFile * file = g_file_new_for_path (tls_ca_list_file);
+            gtk_file_chooser_set_file (GTK_FILE_CHOOSER (caListFileChooser), file, NULL);
+            g_object_unref (file);
+        }
     }
 
-    label = gtk_label_new( _("Public endpoint certificate file"));
-    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-    gtk_table_attach (GTK_TABLE(table), label, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    label = gtk_label_new (_ ("Public endpoint certificate file"));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
     GtkWidget * certificateFileChooser;
-    certificateFileChooser = gtk_file_chooser_button_new(_("Choose a public endpoint certificate (optional)"), GTK_FILE_CHOOSER_ACTION_OPEN);
-    gtk_table_attach (GTK_TABLE(table), certificateFileChooser, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    certificateFileChooser = gtk_file_chooser_button_new (_ ("Choose a public endpoint certificate (optional)"), GTK_FILE_CHOOSER_ACTION_OPEN);
+    gtk_table_attach (GTK_TABLE (table), certificateFileChooser, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
     if (tls_certificate_file == NULL) {
         // gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(caListFileChooser), g_get_home_dir());
-	gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(caListFileChooser));
+        gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER (caListFileChooser));
     } else {
-	if(g_strcmp0(tls_certificate_file, "") == 0){
+        if (g_strcmp0 (tls_certificate_file, "") == 0) {
 
-	    gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(certificateFileChooser));
-	}
-	else {
+            gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER (certificateFileChooser));
+        } else {
 
-	    GFile * file = g_file_new_for_path(tls_certificate_file);
-	    gtk_file_chooser_set_file (GTK_FILE_CHOOSER(certificateFileChooser), file, NULL);
-	    g_object_unref(file);
-	}
+            GFile * file = g_file_new_for_path (tls_certificate_file);
+            gtk_file_chooser_set_file (GTK_FILE_CHOOSER (certificateFileChooser), file, NULL);
+            g_object_unref (file);
+        }
     }
-         
-    label = gtk_label_new(("Private key file"));
- 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-    gtk_table_attach (GTK_TABLE(table), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    label = gtk_label_new ( ("Private key file"));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
     GtkWidget * privateKeyFileChooser;
-    privateKeyFileChooser = gtk_file_chooser_button_new(_("Choose a private key file (optional)"), GTK_FILE_CHOOSER_ACTION_OPEN);
-    gtk_table_attach (GTK_TABLE(table), privateKeyFileChooser, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    privateKeyFileChooser = gtk_file_chooser_button_new (_ ("Choose a private key file (optional)"), GTK_FILE_CHOOSER_ACTION_OPEN);
+    gtk_table_attach (GTK_TABLE (table), privateKeyFileChooser, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
     if (tls_private_key_file == NULL) {
-	gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(caListFileChooser));
+        gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER (caListFileChooser));
     } else {
 
-	if(g_strcmp0(tls_private_key_file, "") == 0) {
+        if (g_strcmp0 (tls_private_key_file, "") == 0) {
 
-	    gtk_file_chooser_unselect_all(GTK_FILE_CHOOSER(privateKeyFileChooser));
-	}
-	else {
+            gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER (privateKeyFileChooser));
+        } else {
 
-	    GFile * file = g_file_new_for_path(tls_private_key_file);
-	    gtk_file_chooser_set_file (GTK_FILE_CHOOSER(privateKeyFileChooser), file, NULL);
-	    g_object_unref(file);
+            GFile * file = g_file_new_for_path (tls_private_key_file);
+            gtk_file_chooser_set_file (GTK_FILE_CHOOSER (privateKeyFileChooser), file, NULL);
+            g_object_unref (file);
 
-	}
+        }
 
     }
-  
- 	label = gtk_label_new_with_mnemonic (_("Password for the private key"));
- 	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-	gtk_table_attach (GTK_TABLE(table), label, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);  
- 	GtkWidget * privateKeyPasswordEntry;
+
+    label = gtk_label_new_with_mnemonic (_ ("Password for the private key"));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    GtkWidget * privateKeyPasswordEntry;
 #if GTK_CHECK_VERSION(2,16,0)
-	privateKeyPasswordEntry = gtk_entry_new();
-	gtk_entry_set_icon_from_stock (GTK_ENTRY (privateKeyPasswordEntry), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
+    privateKeyPasswordEntry = gtk_entry_new();
+    gtk_entry_set_icon_from_stock (GTK_ENTRY (privateKeyPasswordEntry), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION);
 #else
-	privateKeyPasswordEntry = sexy_icon_entry_new();
-	GtkWidget * image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR );
-	sexy_icon_entry_set_icon(SEXY_ICON_ENTRY(privateKeyPasswordEntry), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
+    privateKeyPasswordEntry = sexy_icon_entry_new();
+    GtkWidget * image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION , GTK_ICON_SIZE_SMALL_TOOLBAR);
+    sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (privateKeyPasswordEntry), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
 #endif
-	gtk_entry_set_visibility(GTK_ENTRY(privateKeyPasswordEntry), FALSE);
-	gtk_label_set_mnemonic_widget (GTK_LABEL (label), privateKeyPasswordEntry);
-	gtk_entry_set_text(GTK_ENTRY(privateKeyPasswordEntry), tls_password);
-	gtk_table_attach (GTK_TABLE(table), privateKeyPasswordEntry, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);  
-   
-    /* TLS protocol methods */    
-    GtkListStore * tlsProtocolMethodListStore; 
+    gtk_entry_set_visibility (GTK_ENTRY (privateKeyPasswordEntry), FALSE);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), privateKeyPasswordEntry);
+    gtk_entry_set_text (GTK_ENTRY (privateKeyPasswordEntry), tls_password);
+    gtk_table_attach (GTK_TABLE (table), privateKeyPasswordEntry, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    /* TLS protocol methods */
+    GtkListStore * tlsProtocolMethodListStore;
     GtkTreeIter iter;
     GtkWidget * tlsProtocolMethodCombo;
-    
-    tlsProtocolMethodListStore =  gtk_list_store_new( 1, G_TYPE_STRING );
-	label = gtk_label_new_with_mnemonic (_("TLS protocol method"));
-	gtk_table_attach (GTK_TABLE(table), label, 0, 1, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5);
-			
-	gchar** supported_tls_method = NULL;
+
+    tlsProtocolMethodListStore =  gtk_list_store_new (1, G_TYPE_STRING);
+    label = gtk_label_new_with_mnemonic (_ ("TLS protocol method"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+
+    gchar** supported_tls_method = NULL;
     supported_tls_method = dbus_get_supported_tls_method();
     GtkTreeIter supported_tls_method_iter = iter;
+
     if (supported_tls_method != NULL) {
         char **supported_tls_method_ptr;
+
         for (supported_tls_method_ptr = supported_tls_method; *supported_tls_method_ptr; supported_tls_method_ptr++) {
-            DEBUG("Supported Method %s", *supported_tls_method_ptr);
-            gtk_list_store_append(tlsProtocolMethodListStore, &iter );
-            gtk_list_store_set(tlsProtocolMethodListStore, &iter, 0, *supported_tls_method_ptr, -1 );
-            
-            if (g_strcmp0(*supported_tls_method_ptr, tls_method) == 0) {
-                DEBUG("Setting active element in TLS protocol combo box");
+            DEBUG ("Supported Method %s", *supported_tls_method_ptr);
+            gtk_list_store_append (tlsProtocolMethodListStore, &iter);
+            gtk_list_store_set (tlsProtocolMethodListStore, &iter, 0, *supported_tls_method_ptr, -1);
+
+            if (g_strcmp0 (*supported_tls_method_ptr, tls_method) == 0) {
+                DEBUG ("Setting active element in TLS protocol combo box");
                 supported_tls_method_iter = iter;
             }
         }
     }
-    
-    tlsProtocolMethodCombo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(tlsProtocolMethodListStore));
-    gtk_label_set_mnemonic_widget(GTK_LABEL(label), tlsProtocolMethodCombo);
-    gtk_table_attach(GTK_TABLE(table), tlsProtocolMethodCombo, 1, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    g_object_unref(G_OBJECT(tlsProtocolMethodListStore));	
-    
+
+    tlsProtocolMethodCombo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (tlsProtocolMethodListStore));
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), tlsProtocolMethodCombo);
+    gtk_table_attach (GTK_TABLE (table), tlsProtocolMethodCombo, 1, 2, 7, 8, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    g_object_unref (G_OBJECT (tlsProtocolMethodListStore));
+
     GtkCellRenderer *tlsProtocolMethodCellRenderer;
     tlsProtocolMethodCellRenderer = gtk_cell_renderer_text_new();
-    gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(tlsProtocolMethodCombo), tlsProtocolMethodCellRenderer, TRUE);
-    gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(tlsProtocolMethodCombo), tlsProtocolMethodCellRenderer, "text", 0, NULL);
-    gtk_combo_box_set_active_iter(GTK_COMBO_BOX(tlsProtocolMethodCombo), &supported_tls_method_iter);
-	
+    gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (tlsProtocolMethodCombo), tlsProtocolMethodCellRenderer, TRUE);
+    gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (tlsProtocolMethodCombo), tlsProtocolMethodCellRenderer, "text", 0, NULL);
+    gtk_combo_box_set_active_iter (GTK_COMBO_BOX (tlsProtocolMethodCombo), &supported_tls_method_iter);
+
     /* Cipher list */
     GtkWidget * cipherListEntry;
-    label = gtk_label_new_with_mnemonic (_("TLS cipher list"));
-    gtk_table_attach (GTK_TABLE(table), label, 0, 1, 8, 9, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+    label = gtk_label_new_with_mnemonic (_ ("TLS cipher list"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 8, 9, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
     cipherListEntry = gtk_entry_new();
-    gtk_label_set_mnemonic_widget(GTK_LABEL(label), cipherListEntry);
-    gtk_entry_set_text(GTK_ENTRY(cipherListEntry), tls_ciphers);
-    gtk_table_attach (GTK_TABLE(table), cipherListEntry, 1, 2, 8, 9, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-	
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), cipherListEntry);
+    gtk_entry_set_text (GTK_ENTRY (cipherListEntry), tls_ciphers);
+    gtk_table_attach (GTK_TABLE (table), cipherListEntry, 1, 2, 8, 9, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
     GtkWidget * serverNameInstance;
-    label = gtk_label_new_with_mnemonic (_("Server name instance for outgoing TLS connection"));
-    gtk_table_attach (GTK_TABLE(table), label, 0, 1, 9, 10, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+    label = gtk_label_new_with_mnemonic (_ ("Server name instance for outgoing TLS connection"));
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 9, 10, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
     serverNameInstance = gtk_entry_new();
-    gtk_label_set_mnemonic_widget(GTK_LABEL(label), serverNameInstance);
-    gtk_entry_set_text(GTK_ENTRY(serverNameInstance), tls_server_name);
-    gtk_table_attach (GTK_TABLE(table), serverNameInstance, 1, 2, 9, 10, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-
-    label = gtk_label_new(_("Negotiation timeout (sec:msec)"));
-    gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-    gtk_table_attach(GTK_TABLE(table), label, 0, 1, 10, 11, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    GtkWidget * tlsTimeOutSec; 
-    hbox = gtk_hbox_new(FALSE, 10);
-    gtk_table_attach(GTK_TABLE(table), hbox, 1, 2, 10, 11, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    tlsTimeOutSec = gtk_spin_button_new_with_range(0, pow(2,sizeof(long)), 1);
-    gtk_label_set_mnemonic_widget(GTK_LABEL (label), tlsTimeOutSec);
-    gtk_spin_button_set_value(GTK_SPIN_BUTTON(tlsTimeOutSec), g_ascii_strtod(negotiation_timeout_sec, NULL));
-    gtk_box_pack_start_defaults(GTK_BOX(hbox), tlsTimeOutSec);   
-    GtkWidget * tlsTimeOutMSec;    
-    tlsTimeOutMSec = gtk_spin_button_new_with_range(0, pow(2,sizeof(long)), 1);
-    gtk_label_set_mnemonic_widget(GTK_LABEL (label), tlsTimeOutMSec);
-    gtk_spin_button_set_value(GTK_SPIN_BUTTON(tlsTimeOutMSec), g_ascii_strtod(negotiation_timeout_msec, NULL));
-    gtk_box_pack_start_defaults(GTK_BOX(hbox), tlsTimeOutMSec);   
-    
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), serverNameInstance);
+    gtk_entry_set_text (GTK_ENTRY (serverNameInstance), tls_server_name);
+    gtk_table_attach (GTK_TABLE (table), serverNameInstance, 1, 2, 9, 10, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    label = gtk_label_new (_ ("Negotiation timeout (sec:msec)"));
+    gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
+    gtk_table_attach (GTK_TABLE (table), label, 0, 1, 10, 11, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    GtkWidget * tlsTimeOutSec;
+    hbox = gtk_hbox_new (FALSE, 10);
+    gtk_table_attach (GTK_TABLE (table), hbox, 1, 2, 10, 11, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    tlsTimeOutSec = gtk_spin_button_new_with_range (0, pow (2,sizeof (long)), 1);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), tlsTimeOutSec);
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON (tlsTimeOutSec), g_ascii_strtod (negotiation_timeout_sec, NULL));
+    gtk_box_pack_start_defaults (GTK_BOX (hbox), tlsTimeOutSec);
+    GtkWidget * tlsTimeOutMSec;
+    tlsTimeOutMSec = gtk_spin_button_new_with_range (0, pow (2,sizeof (long)), 1);
+    gtk_label_set_mnemonic_widget (GTK_LABEL (label), tlsTimeOutMSec);
+    gtk_spin_button_set_value (GTK_SPIN_BUTTON (tlsTimeOutMSec), g_ascii_strtod (negotiation_timeout_msec, NULL));
+    gtk_box_pack_start_defaults (GTK_BOX (hbox), tlsTimeOutMSec);
+
     GtkWidget * verifyCertificateServer;
-    verifyCertificateServer = gtk_check_button_new_with_mnemonic(_("Verify incoming certificates, as a server"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(verifyCertificateServer),
-				 g_strcasecmp(verify_server,"true") == 0 ? TRUE: FALSE);
-    gtk_table_attach (GTK_TABLE(table), verifyCertificateServer, 0, 1, 11, 12, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    verifyCertificateServer = gtk_check_button_new_with_mnemonic (_ ("Verify incoming certificates, as a server"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (verifyCertificateServer),
+                                  g_strcasecmp (verify_server,"true") == 0 ? TRUE: FALSE);
+    gtk_table_attach (GTK_TABLE (table), verifyCertificateServer, 0, 1, 11, 12, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
     GtkWidget * verifyCertificateClient;
-    verifyCertificateClient = gtk_check_button_new_with_mnemonic(_("Verify certificates from answer, as a client"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(verifyCertificateClient),
-				 g_strcasecmp(verify_client,"true") == 0 ? TRUE: FALSE);
-    gtk_table_attach (GTK_TABLE(table), verifyCertificateClient, 0, 1, 12, 13, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    verifyCertificateClient = gtk_check_button_new_with_mnemonic (_ ("Verify certificates from answer, as a client"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (verifyCertificateClient),
+                                  g_strcasecmp (verify_client,"true") == 0 ? TRUE: FALSE);
+    gtk_table_attach (GTK_TABLE (table), verifyCertificateClient, 0, 1, 12, 13, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
 
     GtkWidget * requireCertificate;
-    requireCertificate = gtk_check_button_new_with_mnemonic(_("Require certificate for incoming tls connections"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(requireCertificate),
-				 g_strcasecmp(require_client_certificate,"true") == 0 ? TRUE: FALSE);
-    gtk_table_attach (GTK_TABLE(table), requireCertificate, 0, 1, 13, 14, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-    gtk_widget_show_all(ret);
-          
-    if(gtk_dialog_run(GTK_DIALOG(tlsDialog)) == GTK_RESPONSE_ACCEPT) {
-				
-        g_hash_table_replace(properties,
-			     g_strdup(TLS_LISTENER_PORT),
-			     g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(tlsListenerPort))));		
-        g_hash_table_replace(properties,
-			     g_strdup(TLS_CA_LIST_FILE), g_strdup(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(caListFileChooser))));
-       
-        g_hash_table_replace(properties,
-			     g_strdup(TLS_CERTIFICATE_FILE), g_strdup(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(certificateFileChooser))));
-	
-        g_hash_table_replace(properties,
-			     g_strdup(TLS_PRIVATE_KEY_FILE), g_strdup(gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(privateKeyFileChooser))));
-				
-	g_hash_table_replace(properties,
-			     g_strdup(TLS_PASSWORD),
-			     g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(privateKeyPasswordEntry))));  				
-												
-	g_hash_table_replace(properties,
-			     g_strdup(TLS_METHOD),
-			     g_strdup((gchar *)gtk_combo_box_get_active_text(GTK_COMBO_BOX(tlsProtocolMethodCombo))));
-				
-	g_hash_table_replace(properties,
-			     g_strdup(TLS_CIPHERS),
-			     g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(cipherListEntry))));  
-				
-	g_hash_table_replace(properties,
-			     g_strdup(TLS_SERVER_NAME),
-			     g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(serverNameInstance))));					  				   
-
-	g_hash_table_replace(properties,
-			     g_strdup(TLS_VERIFY_SERVER),
-			     g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(verifyCertificateServer)) ? "true": "false"));
-
-	g_hash_table_replace(properties,
-			     g_strdup(TLS_VERIFY_CLIENT),
-			     g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(verifyCertificateClient)) ? "true": "false"));	
-				
-	g_hash_table_replace(properties,
-			     g_strdup(TLS_REQUIRE_CLIENT_CERTIFICATE),
-			     g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(requireCertificate)) ? "true": "false"));	
-				
-	g_hash_table_replace(properties,
-			     g_strdup(TLS_NEGOTIATION_TIMEOUT_SEC),
-			     g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(tlsTimeOutSec))));		
-
-	g_hash_table_replace(properties,
-			     g_strdup(TLS_NEGOTIATION_TIMEOUT_MSEC),
-			     g_strdup((gchar *)gtk_entry_get_text(GTK_ENTRY(tlsTimeOutMSec))));																				
-    }    
-    
-    gtk_widget_destroy (GTK_WIDGET(tlsDialog));
+    requireCertificate = gtk_check_button_new_with_mnemonic (_ ("Require certificate for incoming tls connections"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (requireCertificate),
+                                  g_strcasecmp (require_client_certificate,"true") == 0 ? TRUE: FALSE);
+    gtk_table_attach (GTK_TABLE (table), requireCertificate, 0, 1, 13, 14, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    gtk_widget_show_all (ret);
+
+    if (gtk_dialog_run (GTK_DIALOG (tlsDialog)) == GTK_RESPONSE_ACCEPT) {
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_LISTENER_PORT),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (tlsListenerPort))));
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_CA_LIST_FILE), g_strdup (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (caListFileChooser))));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_CERTIFICATE_FILE), g_strdup (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (certificateFileChooser))));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_PRIVATE_KEY_FILE), g_strdup (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (privateKeyFileChooser))));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_PASSWORD),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (privateKeyPasswordEntry))));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_METHOD),
+                              g_strdup ( (gchar *) gtk_combo_box_get_active_text (GTK_COMBO_BOX (tlsProtocolMethodCombo))));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_CIPHERS),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (cipherListEntry))));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_SERVER_NAME),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (serverNameInstance))));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_VERIFY_SERVER),
+                              g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (verifyCertificateServer)) ? "true": "false"));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_VERIFY_CLIENT),
+                              g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (verifyCertificateClient)) ? "true": "false"));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_REQUIRE_CLIENT_CERTIFICATE),
+                              g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (requireCertificate)) ? "true": "false"));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_NEGOTIATION_TIMEOUT_SEC),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (tlsTimeOutSec))));
+
+        g_hash_table_replace (properties,
+                              g_strdup (TLS_NEGOTIATION_TIMEOUT_MSEC),
+                              g_strdup ( (gchar *) gtk_entry_get_text (GTK_ENTRY (tlsTimeOutMSec))));
+    }
+
+    gtk_widget_destroy (GTK_WIDGET (tlsDialog));
 }
diff --git a/sflphone-client-gnome/src/config/tlsadvanceddialog.h b/sflphone-client-gnome/src/config/tlsadvanceddialog.h
index 4c7ed3a37f04144264d4410b3d54c33d3209ca8b..d60fdf8e9a1c2f96339547e937699c9364c00fd8 100644
--- a/sflphone-client-gnome/src/config/tlsadvanceddialog.h
+++ b/sflphone-client-gnome/src/config/tlsadvanceddialog.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -27,7 +27,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
- 
+
 #ifndef __SFL_TLS_ADVANCED_DIALOG__
 #define __SFL_TLS_ADVANCED_DIALOG__
 /** @file tlsadvanceddialog.h
@@ -37,10 +37,10 @@
 #include <glib.h>
 #include <mainwindow.h>
 
-/** 
+/**
  * Display the advanced options window for zrtp
- */  
+ */
 
-void show_advanced_tls_options(GHashTable * properties);
+void show_advanced_tls_options (GHashTable * properties);
 
-#endif 
+#endif
diff --git a/sflphone-client-gnome/src/config/utils.c b/sflphone-client-gnome/src/config/utils.c
index 7049d796069507e169258f9e792f4c02ed8cb18a..ded55acc62272e06b2bd6192e5bc6bab29e18532 100644
--- a/sflphone-client-gnome/src/config/utils.c
+++ b/sflphone-client-gnome/src/config/utils.c
@@ -32,7 +32,7 @@
 
 void gnome_main_section_new_with_table (gchar *title, GtkWidget **frame, GtkWidget **table, gint nb_col, gint nb_row)
 {
-  GtkWidget *_frame, *_table, *label, *align;
+    GtkWidget *_frame, *_table, *label, *align;
     PangoAttrList *attrs = NULL;
     PangoAttribute *attr = NULL;
 
@@ -44,28 +44,28 @@ void gnome_main_section_new_with_table (gchar *title, GtkWidget **frame, GtkWidg
 
     _frame = gtk_frame_new (title);
     gtk_frame_set_shadow_type (GTK_FRAME (_frame), GTK_SHADOW_NONE);
-    gtk_container_set_border_width(GTK_CONTAINER(_frame), 2);
-    
+    gtk_container_set_border_width (GTK_CONTAINER (_frame), 2);
+
     label = gtk_frame_get_label_widget (GTK_FRAME (_frame));
     gtk_label_set_attributes (GTK_LABEL (label), attrs);
     pango_attr_list_unref (attrs);
 
-    align = gtk_alignment_new( 0.08, 0.2, 0.1, 0.1 ); 
-    gtk_container_add( GTK_CONTAINER(_frame), align );
+    align = gtk_alignment_new (0.08, 0.2, 0.1, 0.1);
+    gtk_container_add (GTK_CONTAINER (_frame), align);
+
+    _table = gtk_table_new (nb_col, nb_row, FALSE);
+    gtk_table_set_row_spacings (GTK_TABLE (_table), 2);
+    gtk_table_set_col_spacings (GTK_TABLE (_table), 2);
+    gtk_widget_show (_table);
+    gtk_container_add (GTK_CONTAINER (align), _table);
 
-    _table = gtk_table_new(nb_col, nb_row, FALSE);
-    gtk_table_set_row_spacings( GTK_TABLE(_table), 2);
-    gtk_table_set_col_spacings( GTK_TABLE(_table), 2);
-    gtk_widget_show(_table);
-    gtk_container_add( GTK_CONTAINER(align), _table );
-    
     *table = _table;
     *frame = _frame;
 }
 
 void gnome_main_section_new_with_vbox (gchar *title, GtkWidget **frame, GtkWidget **vbox, gint nb_row)
 {
-  GtkWidget *_frame, *_vbox, *label, *align;
+    GtkWidget *_frame, *_vbox, *label, *align;
     PangoAttrList *attrs = NULL;
     PangoAttribute *attr = NULL;
 
@@ -77,19 +77,19 @@ void gnome_main_section_new_with_vbox (gchar *title, GtkWidget **frame, GtkWidge
 
     _frame = gtk_frame_new (title);
     gtk_frame_set_shadow_type (GTK_FRAME (_frame), GTK_SHADOW_NONE);
-    gtk_container_set_border_width(GTK_CONTAINER(_frame), 2);
-    
+    gtk_container_set_border_width (GTK_CONTAINER (_frame), 2);
+
     label = gtk_frame_get_label_widget (GTK_FRAME (_frame));
     gtk_label_set_attributes (GTK_LABEL (label), attrs);
     pango_attr_list_unref (attrs);
 
-    align = gtk_alignment_new( 0.08, 0.2, 0.1, 0.1 ); 
-    gtk_container_add( GTK_CONTAINER(_frame), align );
-    
-    _vbox = gtk_vbox_new(FALSE, 10);
-    gtk_widget_show(_vbox);
-    gtk_container_add( GTK_CONTAINER(align), _vbox);
-    
+    align = gtk_alignment_new (0.08, 0.2, 0.1, 0.1);
+    gtk_container_add (GTK_CONTAINER (_frame), align);
+
+    _vbox = gtk_vbox_new (FALSE, 10);
+    gtk_widget_show (_vbox);
+    gtk_container_add (GTK_CONTAINER (align), _vbox);
+
     *vbox = _vbox;
     *frame = _frame;
 }
@@ -99,7 +99,7 @@ void gnome_main_section_new (gchar *title, GtkWidget **frame)
     GtkWidget *_frame, *label;
     PangoAttrList *attrs = NULL;
     PangoAttribute *attr = NULL;
- 
+
     attrs = pango_attr_list_new ();
     attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
     attr->start_index = 0;
@@ -108,8 +108,8 @@ void gnome_main_section_new (gchar *title, GtkWidget **frame)
 
     _frame = gtk_frame_new (title);
     gtk_frame_set_shadow_type (GTK_FRAME (_frame), GTK_SHADOW_NONE);
-    gtk_container_set_border_width(GTK_CONTAINER(_frame), 2);
-     
+    gtk_container_set_border_width (GTK_CONTAINER (_frame), 2);
+
     label = gtk_frame_get_label_widget (GTK_FRAME (_frame));
     gtk_label_set_attributes (GTK_LABEL (label), attrs);
     pango_attr_list_unref (attrs);
diff --git a/sflphone-client-gnome/src/config/zrtpadvanceddialog.c b/sflphone-client-gnome/src/config/zrtpadvanceddialog.c
index 469cf52a3c4230eef362788eab10485e329c3355..476565d2aead977d42cd642db65580961efd2f04 100644
--- a/sflphone-client-gnome/src/config/zrtpadvanceddialog.c
+++ b/sflphone-client-gnome/src/config/zrtpadvanceddialog.c
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -34,7 +34,7 @@
 
 #include <gtk/gtk.h>
 
-void show_advanced_zrtp_options(GHashTable * properties)
+void show_advanced_zrtp_options (GHashTable * properties)
 {
     GtkDialog * securityDialog;
 
@@ -44,142 +44,143 @@ void show_advanced_zrtp_options(GHashTable * properties)
     GtkWidget * enableSASConfirm;
     GtkWidget * enableZrtpNotSuppOther;
     GtkWidget * displaySasOnce;
-    
+
     gchar * curSasConfirm = "true";
     gchar * curHelloEnabled = "true";
     gchar * curZrtpNotSuppOther = "true";
     gchar * curDisplaySasOnce = "false";
-    
-    if(properties != NULL) {
-        curHelloEnabled = g_hash_table_lookup(properties, ACCOUNT_ZRTP_HELLO_HASH);
-        curSasConfirm = g_hash_table_lookup(properties, ACCOUNT_ZRTP_DISPLAY_SAS);
-        curZrtpNotSuppOther = g_hash_table_lookup(properties, ACCOUNT_ZRTP_NOT_SUPP_WARNING);
-        curDisplaySasOnce = g_hash_table_lookup(properties, ACCOUNT_DISPLAY_SAS_ONCE); 
+
+    if (properties != NULL) {
+        curHelloEnabled = g_hash_table_lookup (properties, ACCOUNT_ZRTP_HELLO_HASH);
+        curSasConfirm = g_hash_table_lookup (properties, ACCOUNT_ZRTP_DISPLAY_SAS);
+        curZrtpNotSuppOther = g_hash_table_lookup (properties, ACCOUNT_ZRTP_NOT_SUPP_WARNING);
+        curDisplaySasOnce = g_hash_table_lookup (properties, ACCOUNT_DISPLAY_SAS_ONCE);
+    }
+
+    securityDialog = GTK_DIALOG	(gtk_dialog_new_with_buttons (_ ("ZRTP Options"),
+                                 GTK_WINDOW (get_main_window()),
+                                 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                                 GTK_STOCK_CANCEL,
+                                 GTK_RESPONSE_CANCEL,
+                                 GTK_STOCK_SAVE,
+                                 GTK_RESPONSE_ACCEPT,
+                                 NULL)
+                                );
+    gtk_window_set_policy (GTK_WINDOW (securityDialog), FALSE, FALSE, FALSE);
+    gtk_dialog_set_has_separator (securityDialog, TRUE);
+    gtk_container_set_border_width (GTK_CONTAINER (securityDialog), 0);
+
+
+    tableZrtp = gtk_table_new (4, 2  , FALSE/* homogeneous */);
+    gtk_table_set_row_spacings (GTK_TABLE (tableZrtp), 10);
+    gtk_table_set_col_spacings (GTK_TABLE (tableZrtp), 10);
+    gtk_box_pack_start (GTK_BOX (securityDialog->vbox), tableZrtp, FALSE, FALSE, 0);
+    gtk_widget_show (tableZrtp);
+
+    enableHelloHash = gtk_check_button_new_with_mnemonic (_ ("Send Hello Hash in S_DP"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enableHelloHash),
+                                  g_strcasecmp (curHelloEnabled,"true") == 0 ? TRUE: FALSE);
+    gtk_table_attach (GTK_TABLE (tableZrtp), enableHelloHash, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (GTK_WIDGET (enableHelloHash) , TRUE);
+
+    enableSASConfirm = gtk_check_button_new_with_mnemonic (_ ("Ask User to Confirm SAS"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enableSASConfirm),
+                                  g_strcasecmp (curSasConfirm,"true") == 0 ? TRUE: FALSE);
+    gtk_table_attach (GTK_TABLE (tableZrtp), enableSASConfirm, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (GTK_WIDGET (enableSASConfirm) , TRUE);
+
+    enableZrtpNotSuppOther = gtk_check_button_new_with_mnemonic (_ ("_Warn if ZRTP not supported"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enableZrtpNotSuppOther),
+                                  g_strcasecmp (curZrtpNotSuppOther,"true") == 0 ? TRUE: FALSE);
+    gtk_table_attach (GTK_TABLE (tableZrtp), enableZrtpNotSuppOther, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (GTK_WIDGET (enableZrtpNotSuppOther) , TRUE);
+
+    displaySasOnce = gtk_check_button_new_with_mnemonic (_ ("Display SAS once for hold events"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (displaySasOnce),
+                                  g_strcasecmp (curDisplaySasOnce,"true") == 0 ? TRUE: FALSE);
+    gtk_table_attach (GTK_TABLE (tableZrtp), displaySasOnce, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (GTK_WIDGET (displaySasOnce) , TRUE);
+
+    gtk_widget_show_all (tableZrtp);
+
+    gtk_container_set_border_width (GTK_CONTAINER (tableZrtp), 10);
+
+    if (gtk_dialog_run (GTK_DIALOG (securityDialog)) == GTK_RESPONSE_ACCEPT) {
+        g_hash_table_replace (properties,
+                              g_strdup (ACCOUNT_ZRTP_DISPLAY_SAS),
+                              g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enableSASConfirm)) ? "true": "false"));
+
+        g_hash_table_replace (properties,
+                              g_strdup (ACCOUNT_DISPLAY_SAS_ONCE),
+                              g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (displaySasOnce)) ? "true": "false"));
+
+        g_hash_table_replace (properties,
+                              g_strdup (ACCOUNT_ZRTP_HELLO_HASH),
+                              g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enableHelloHash)) ? "true": "false"));
+
+        g_hash_table_replace (properties,
+                              g_strdup (ACCOUNT_ZRTP_NOT_SUPP_WARNING),
+                              g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enableZrtpNotSuppOther)) ? "true": "false"));
     }
-    
-    securityDialog = GTK_DIALOG	(gtk_dialog_new_with_buttons (	_("ZRTP Options"),
-			    GTK_WINDOW (get_main_window()),
-																GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-																GTK_STOCK_CANCEL,
-																GTK_RESPONSE_CANCEL,
-																GTK_STOCK_SAVE,
-																GTK_RESPONSE_ACCEPT,
-																NULL)
-								);
-    gtk_window_set_policy( GTK_WINDOW(securityDialog), FALSE, FALSE, FALSE );
-    gtk_dialog_set_has_separator(securityDialog, TRUE);
-    gtk_container_set_border_width (GTK_CONTAINER(securityDialog), 0);
-
-    
-    tableZrtp = gtk_table_new (4, 2  , FALSE/* homogeneous */);  
-    gtk_table_set_row_spacings( GTK_TABLE(tableZrtp), 10);
-    gtk_table_set_col_spacings( GTK_TABLE(tableZrtp), 10); 
-    gtk_box_pack_start(GTK_BOX(securityDialog->vbox), tableZrtp, FALSE, FALSE, 0);  
-    gtk_widget_show(tableZrtp);
-    
-    enableHelloHash = gtk_check_button_new_with_mnemonic(_("Send Hello Hash in S_DP"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enableHelloHash),
-            g_strcasecmp(curHelloEnabled,"true") == 0 ? TRUE: FALSE);
-    gtk_table_attach ( GTK_TABLE(tableZrtp), enableHelloHash, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_widget_set_sensitive( GTK_WIDGET( enableHelloHash ) , TRUE );
-        
-    enableSASConfirm = gtk_check_button_new_with_mnemonic(_("Ask User to Confirm SAS"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enableSASConfirm),
-            g_strcasecmp(curSasConfirm,"true") == 0 ? TRUE: FALSE);
-    gtk_table_attach ( GTK_TABLE(tableZrtp), enableSASConfirm, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_widget_set_sensitive( GTK_WIDGET( enableSASConfirm ) , TRUE ); 
-  
-    enableZrtpNotSuppOther = gtk_check_button_new_with_mnemonic(_("_Warn if ZRTP not supported"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enableZrtpNotSuppOther),
-            g_strcasecmp(curZrtpNotSuppOther,"true") == 0 ? TRUE: FALSE);
-    gtk_table_attach ( GTK_TABLE(tableZrtp), enableZrtpNotSuppOther, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_widget_set_sensitive( GTK_WIDGET( enableZrtpNotSuppOther ) , TRUE );
-  
-    displaySasOnce = gtk_check_button_new_with_mnemonic(_("Display SAS once for hold events"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(displaySasOnce),
-            g_strcasecmp(curDisplaySasOnce,"true") == 0 ? TRUE: FALSE);
-    gtk_table_attach ( GTK_TABLE(tableZrtp), displaySasOnce, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_widget_set_sensitive( GTK_WIDGET( displaySasOnce ) , TRUE );
-    
-    gtk_widget_show_all(tableZrtp);
-
-    gtk_container_set_border_width (GTK_CONTAINER(tableZrtp), 10);
-        
-    if(gtk_dialog_run(GTK_DIALOG(securityDialog)) == GTK_RESPONSE_ACCEPT) {        
-        g_hash_table_replace(properties,
-                g_strdup(ACCOUNT_ZRTP_DISPLAY_SAS),
-                g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enableSASConfirm)) ? "true": "false"));   
-                
-         g_hash_table_replace(properties,
-                g_strdup(ACCOUNT_DISPLAY_SAS_ONCE),
-                g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(displaySasOnce)) ? "true": "false")); 
-                
-        g_hash_table_replace(properties,
-                g_strdup(ACCOUNT_ZRTP_HELLO_HASH),
-                g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enableHelloHash)) ? "true": "false"));
-                
-        g_hash_table_replace(properties,
-                g_strdup(ACCOUNT_ZRTP_NOT_SUPP_WARNING),
-                g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enableZrtpNotSuppOther)) ? "true": "false"));                
-    }    
-    
-    gtk_widget_destroy (GTK_WIDGET(securityDialog));
+
+    gtk_widget_destroy (GTK_WIDGET (securityDialog));
 }
 
 
-void show_advanced_sdes_options(GHashTable * properties) {
+void show_advanced_sdes_options (GHashTable * properties)
+{
 
     GtkDialog * securityDialog;
 
     GtkWidget * sdesTable;
     GtkWidget * enableRtpFallback;
     gchar * rtpFallback = "false";
-    
-    if(properties != NULL) {
-        rtpFallback = g_hash_table_lookup(properties, ACCOUNT_SRTP_RTP_FALLBACK);
+
+    if (properties != NULL) {
+        rtpFallback = g_hash_table_lookup (properties, ACCOUNT_SRTP_RTP_FALLBACK);
     }
 
-    securityDialog = GTK_DIALOG	(gtk_dialog_new_with_buttons (	_("SDES Options"),
+    securityDialog = GTK_DIALOG	(gtk_dialog_new_with_buttons (_ ("SDES Options"),
+
+                                 GTK_WINDOW (get_main_window()),
+                                 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
 
-			       	GTK_WINDOW (get_main_window()),							
-				GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+                                 GTK_STOCK_CANCEL,
 
-				GTK_STOCK_CANCEL,
+                                 GTK_RESPONSE_CANCEL,
 
-			        GTK_RESPONSE_CANCEL,
+                                 GTK_STOCK_SAVE,
 
-				GTK_STOCK_SAVE,
+                                 GTK_RESPONSE_ACCEPT,
 
-				GTK_RESPONSE_ACCEPT,	       
-				
-				NULL));
+                                 NULL));
 
-    gtk_window_set_policy( GTK_WINDOW(securityDialog), FALSE, FALSE, FALSE );
-    gtk_dialog_set_has_separator(securityDialog, TRUE);
-    gtk_container_set_border_width (GTK_CONTAINER(securityDialog), 0);
+    gtk_window_set_policy (GTK_WINDOW (securityDialog), FALSE, FALSE, FALSE);
+    gtk_dialog_set_has_separator (securityDialog, TRUE);
+    gtk_container_set_border_width (GTK_CONTAINER (securityDialog), 0);
 
-    sdesTable = gtk_table_new (1, 2  , FALSE/* homogeneous */);  
-    gtk_table_set_row_spacings( GTK_TABLE(sdesTable), 10);
-    gtk_table_set_col_spacings( GTK_TABLE(sdesTable), 10); 
-    gtk_box_pack_start(GTK_BOX(securityDialog->vbox), sdesTable, FALSE, FALSE, 0);  
-    gtk_widget_show(sdesTable);
+    sdesTable = gtk_table_new (1, 2  , FALSE/* homogeneous */);
+    gtk_table_set_row_spacings (GTK_TABLE (sdesTable), 10);
+    gtk_table_set_col_spacings (GTK_TABLE (sdesTable), 10);
+    gtk_box_pack_start (GTK_BOX (securityDialog->vbox), sdesTable, FALSE, FALSE, 0);
+    gtk_widget_show (sdesTable);
 
-    enableRtpFallback = gtk_check_button_new_with_mnemonic(_("Fallback on RTP on SDES failure"));
-    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enableRtpFallback),
-				 g_strcasecmp(rtpFallback,"true") == 0 ? TRUE: FALSE);
-    gtk_table_attach ( GTK_TABLE(sdesTable), enableRtpFallback, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-    gtk_widget_set_sensitive( GTK_WIDGET( enableRtpFallback ) , TRUE );
+    enableRtpFallback = gtk_check_button_new_with_mnemonic (_ ("Fallback on RTP on SDES failure"));
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enableRtpFallback),
+                                  g_strcasecmp (rtpFallback,"true") == 0 ? TRUE: FALSE);
+    gtk_table_attach (GTK_TABLE (sdesTable), enableRtpFallback, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+    gtk_widget_set_sensitive (GTK_WIDGET (enableRtpFallback) , TRUE);
 
 
-    gtk_widget_show_all(sdesTable);
+    gtk_widget_show_all (sdesTable);
+
+    gtk_container_set_border_width (GTK_CONTAINER (sdesTable), 10);
+
+    if (gtk_dialog_run (GTK_DIALOG (securityDialog)) == GTK_RESPONSE_ACCEPT) {
+        g_hash_table_replace (properties,
+                              g_strdup (ACCOUNT_SRTP_RTP_FALLBACK),
+                              g_strdup (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enableRtpFallback)) ? "true": "false"));
+    }
 
-    gtk_container_set_border_width (GTK_CONTAINER(sdesTable), 10);
-        
-    if(gtk_dialog_run(GTK_DIALOG(securityDialog)) == GTK_RESPONSE_ACCEPT) {        
-        g_hash_table_replace(properties,
-                g_strdup(ACCOUNT_SRTP_RTP_FALLBACK),
-	        g_strdup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enableRtpFallback)) ? "true": "false"));                
-    }    
-    
-    gtk_widget_destroy (GTK_WIDGET(securityDialog));
+    gtk_widget_destroy (GTK_WIDGET (securityDialog));
 }
diff --git a/sflphone-client-gnome/src/config/zrtpadvanceddialog.h b/sflphone-client-gnome/src/config/zrtpadvanceddialog.h
index c561d6a1f15f8e10167149ae91aa39e3f07e4678..fc6f4ec839887c5b6c9b19b2f2b26a4473482328 100644
--- a/sflphone-client-gnome/src/config/zrtpadvanceddialog.h
+++ b/sflphone-client-gnome/src/config/zrtpadvanceddialog.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -27,7 +27,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
- 
+
 #ifndef __SFL_ZRTP_ADVANCED_DIALOG__
 #define __SFL_ZRTP_ADVANCED_DIALOG__
 /** @file zrtpadvanceddialog.h
@@ -36,12 +36,12 @@
 
 #include <glib.h>
 #include <mainwindow.h>
-/** 
+/**
  * Display the advanced options window for zrtp
- */  
+ */
 
-void show_advanced_zrtp_options(GHashTable * properties);
+void show_advanced_zrtp_options (GHashTable * properties);
 
-void show_advanced_sdes_options(GHashTable * properties);
+void show_advanced_sdes_options (GHashTable * properties);
 
-#endif 
+#endif
diff --git a/sflphone-client-gnome/src/contacts/addressbook.c b/sflphone-client-gnome/src/contacts/addressbook.c
index 9c7e8d38b449dcc762d00d66dc0d4d320e7b4d65..0b38124c1df3840437de6448c455771bafaa24dd 100644
--- a/sflphone-client-gnome/src/contacts/addressbook.c
+++ b/sflphone-client-gnome/src/contacts/addressbook.c
@@ -34,28 +34,29 @@
 #include <addressbook-config.h>
 
 static void
-handler_async_search(GList *, gpointer);
+handler_async_search (GList *, gpointer);
 
 /**
  * Perform a search on address book
  */
 void
-addressbook_search(GtkEntry* entry)
+addressbook_search (GtkEntry* entry)
 {
 
-    const gchar* query = gtk_entry_get_text(GTK_ENTRY (entry));
-    if (strlen(query) >= 3) {
+    const gchar* query = gtk_entry_get_text (GTK_ENTRY (entry));
+
+    if (strlen (query) >= 3) {
 
         AddressBook_Config *addressbook_config;
-	
-	// Activate waiting layer
-	activateWaitingLayer();
 
-	// Load the address book parameters
-	addressbook_config_load_parameters(&addressbook_config);
-      
-	// Start the asynchronous search as soon as we have an entry */
-	search_async(gtk_entry_get_text(GTK_ENTRY (entry)), addressbook_config->max_results, &handler_async_search, addressbook_config);
+        // Activate waiting layer
+        activateWaitingLayer();
+
+        // Load the address book parameters
+        addressbook_config_load_parameters (&addressbook_config);
+
+        // Start the asynchronous search as soon as we have an entry */
+        search_async (gtk_entry_get_text (GTK_ENTRY (entry)), addressbook_config->max_results, &handler_async_search, addressbook_config);
 
     }
 }
@@ -66,12 +67,12 @@ addressbook_search(GtkEntry* entry)
 gboolean
 addressbook_is_enabled()
 {
-  AddressBook_Config *addressbook_config;
-  
-  // Load the address book parameters
-  addressbook_config_load_parameters(&addressbook_config);
+    AddressBook_Config *addressbook_config;
 
-  return (guint)addressbook_config->enable;
+    // Load the address book parameters
+    addressbook_config_load_parameters (&addressbook_config);
+
+    return (guint) addressbook_config->enable;
 }
 
 /**
@@ -80,7 +81,7 @@ addressbook_is_enabled()
 gboolean
 addressbook_is_ready()
 {
-  return books_ready();
+    return books_ready();
 }
 
 /**
@@ -89,7 +90,7 @@ addressbook_is_ready()
 gboolean
 addressbook_is_active()
 {
-  return books_active();
+    return books_active();
 }
 
 /**
@@ -100,31 +101,32 @@ static void
 addressbook_config_books()
 {
 
-  gchar **config_book_uid;
-  book_data_t *book_data;
-  gchar **list;
+    gchar **config_book_uid;
+    book_data_t *book_data;
+    gchar **list;
 
-  // Retrieve list of books
-  list = (gchar **) dbus_get_addressbook_list();
+    // Retrieve list of books
+    list = (gchar **) dbus_get_addressbook_list();
 
-  if (list) {
+    if (list) {
 
-      for (config_book_uid = list; *config_book_uid; config_book_uid++) {
+        for (config_book_uid = list; *config_book_uid; config_book_uid++) {
 
-          // Get corresponding book data
-          book_data = books_get_book_data_by_uid(*config_book_uid);
+            // Get corresponding book data
+            book_data = books_get_book_data_by_uid (*config_book_uid);
 
-          // If book_data exists
-          if (book_data != NULL) {
+            // If book_data exists
+            if (book_data != NULL) {
 
-              book_data->active = TRUE;
-	  }
-      }
-      g_strfreev(list);
-  }
+                book_data->active = TRUE;
+            }
+        }
 
-  // Update buttons
-  update_actions ();
+        g_strfreev (list);
+    }
+
+    // Update buttons
+    update_actions ();
 }
 
 /**
@@ -133,8 +135,8 @@ addressbook_config_books()
 GSList *
 addressbook_get_books_data()
 {
-  addressbook_config_books();
-  return books_data;
+    addressbook_config_books();
+    return books_data;
 }
 
 /**
@@ -144,66 +146,69 @@ addressbook_get_books_data()
 void
 addressbook_init()
 {
-  // Call books initialization
-  init(&addressbook_config_books);
+    // Call books initialization
+    init (&addressbook_config_books);
 }
 
 /**
  * Callback called after all book have been processed
  */
 static void
-handler_async_search(GList *hits, gpointer user_data)
+handler_async_search (GList *hits, gpointer user_data)
 {
 
-  GList *i;
-  GdkPixbuf *photo = NULL;
-  AddressBook_Config *addressbook_config;
-  callable_obj_t *j;
+    GList *i;
+    GdkPixbuf *photo = NULL;
+    AddressBook_Config *addressbook_config;
+    callable_obj_t *j;
 
-  // freeing calls
-  while ((j = (callable_obj_t *) g_queue_pop_tail(contacts->callQueue)) != NULL)
-    {
-      free_callable_obj_t(j);
+    // freeing calls
+    while ( (j = (callable_obj_t *) g_queue_pop_tail (contacts->callQueue)) != NULL) {
+        free_callable_obj_t (j);
     }
 
-  // Retrieve the address book parameters
-  addressbook_config = (AddressBook_Config*) user_data;
-
-  // reset previous results
-  calltree_reset(contacts);
-  calllist_reset(contacts);
-
-  for (i = hits; i != NULL; i = i->next)
-    {
-      Hit *entry;
-      entry = i->data;
-      if (entry)
-        {
-          // Get the photo
-          if (addressbook_display(addressbook_config,
-              ADDRESSBOOK_DISPLAY_CONTACT_PHOTO))
-            photo = entry->photo;
-          // Create entry for business phone information
-          if (addressbook_display(addressbook_config,
-              ADDRESSBOOK_DISPLAY_PHONE_BUSINESS))
-            calllist_add_contact(entry->name, entry->phone_business,
-                CONTACT_PHONE_BUSINESS, photo);
-          // Create entry for home phone information
-          if (addressbook_display(addressbook_config,
-              ADDRESSBOOK_DISPLAY_PHONE_HOME))
-            calllist_add_contact(entry->name, entry->phone_home,
-                CONTACT_PHONE_HOME, photo);
-          // Create entry for mobile phone information
-          if (addressbook_display(addressbook_config,
-              ADDRESSBOOK_DISPLAY_PHONE_MOBILE))
-            calllist_add_contact(entry->name, entry->phone_mobile,
-                CONTACT_PHONE_MOBILE, photo);
+    // Retrieve the address book parameters
+    addressbook_config = (AddressBook_Config*) user_data;
+
+    // reset previous results
+    calltree_reset (contacts);
+    calllist_reset (contacts);
+
+    for (i = hits; i != NULL; i = i->next) {
+        Hit *entry;
+        entry = i->data;
+
+        if (entry) {
+            // Get the photo
+            if (addressbook_display (addressbook_config,
+                                     ADDRESSBOOK_DISPLAY_CONTACT_PHOTO))
+                photo = entry->photo;
+
+            // Create entry for business phone information
+            if (addressbook_display (addressbook_config,
+                                     ADDRESSBOOK_DISPLAY_PHONE_BUSINESS))
+                calllist_add_contact (entry->name, entry->phone_business,
+                                      CONTACT_PHONE_BUSINESS, photo);
+
+            // Create entry for home phone information
+            if (addressbook_display (addressbook_config,
+                                     ADDRESSBOOK_DISPLAY_PHONE_HOME))
+                calllist_add_contact (entry->name, entry->phone_home,
+                                      CONTACT_PHONE_HOME, photo);
+
+            // Create entry for mobile phone information
+            if (addressbook_display (addressbook_config,
+                                     ADDRESSBOOK_DISPLAY_PHONE_MOBILE))
+                calllist_add_contact (entry->name, entry->phone_mobile,
+                                      CONTACT_PHONE_MOBILE, photo);
         }
-      free_hit(entry);
+
+        free_hit (entry);
     }
-  g_list_free(hits);
 
-  // Deactivate waiting image
-  deactivateWaitingLayer();
+    g_list_free (hits);
+
+    // Deactivate waiting image
+    deactivateWaitingLayer();
 }
 
diff --git a/sflphone-client-gnome/src/contacts/addressbook.h b/sflphone-client-gnome/src/contacts/addressbook.h
index f87f9dba19ec292e18783d5abf57650e4bf12aa3..cc2760f035e558b431c234dacb434cfcfc8936ed 100644
--- a/sflphone-client-gnome/src/contacts/addressbook.h
+++ b/sflphone-client-gnome/src/contacts/addressbook.h
@@ -63,7 +63,7 @@ addressbook_is_active();
  * Perform a search in addressbook
  */
 void
-addressbook_search(GtkEntry*);
+addressbook_search (GtkEntry*);
 
 /**
  * Initialize addressbook
diff --git a/sflphone-client-gnome/src/contacts/addressbook/eds.c b/sflphone-client-gnome/src/contacts/addressbook/eds.c
index 236235313ffeedc298d07a695b3e71f11f25f4e1..6cb165d34bf6e91acd141bceb1b676d33b316ce5 100644
--- a/sflphone-client-gnome/src/contacts/addressbook/eds.c
+++ b/sflphone-client-gnome/src/contacts/addressbook/eds.c
@@ -44,22 +44,20 @@
 /**
  * Structure used to store search callback and data
  */
-typedef struct _Search_Handler_And_Data
-{
-  int search_id;
-  SearchAsyncHandler handler;
-  gpointer user_data;
-  GList *hits;
-  int max_results_remaining;
-  int book_views_remaining;
+typedef struct _Search_Handler_And_Data {
+    int search_id;
+    SearchAsyncHandler handler;
+    gpointer user_data;
+    GList *hits;
+    int max_results_remaining;
+    int book_views_remaining;
 } Search_Handler_And_Data;
 
 /**
  * Structure used to store open callback and data
  */
-typedef struct _Open_Handler_And_Data
-{
-  OpenAsyncHandler handler;
+typedef struct _Open_Handler_And_Data {
+    OpenAsyncHandler handler;
 } Open_Handler_And_Data;
 
 /**
@@ -75,8 +73,7 @@ int remaining_books_to_open;
 /**
  * Fields on which search will be performed
  */
-static EContactField search_fields[] =
-  { E_CONTACT_FULL_NAME, E_CONTACT_PHONE_BUSINESS, E_CONTACT_NICKNAME, 0 };
+static EContactField search_fields[] = { E_CONTACT_FULL_NAME, E_CONTACT_PHONE_BUSINESS, E_CONTACT_NICKNAME, 0 };
 
 static int n_search_fields = G_N_ELEMENTS (search_fields) - 1;
 
@@ -84,13 +81,13 @@ static int n_search_fields = G_N_ELEMENTS (search_fields) - 1;
  * Freeing a hit instance
  */
 void
-free_hit(Hit *h)
+free_hit (Hit *h)
 {
-  g_free(h->name);
-  g_free(h->phone_business);
-  g_free(h->phone_home);
-  g_free(h->phone_mobile);
-  g_free(h);
+    g_free (h->name);
+    g_free (h->phone_business);
+    g_free (h->phone_home);
+    g_free (h->phone_mobile);
+    g_free (h);
 }
 
 /**
@@ -99,7 +96,7 @@ free_hit(Hit *h)
 gboolean
 books_ready()
 {
-  return (g_slist_length(books_data) > 0);
+    return (g_slist_length (books_data) > 0);
 }
 
 /**
@@ -108,203 +105,199 @@ books_ready()
 gboolean
 books_active()
 {
-  GSList *book_list_iterator;
-  book_data_t *book_data;
-
-  // Iterate throw the list
-  for (book_list_iterator = books_data; book_list_iterator != NULL; book_list_iterator
-      = book_list_iterator->next)
-    {
-      book_data = (book_data_t *) book_list_iterator->data;
-      if (book_data->active)
-        return TRUE;
+    GSList *book_list_iterator;
+    book_data_t *book_data;
+
+    // Iterate throw the list
+    for (book_list_iterator = books_data; book_list_iterator != NULL; book_list_iterator
+            = book_list_iterator->next) {
+        book_data = (book_data_t *) book_list_iterator->data;
+
+        if (book_data->active)
+            return TRUE;
     }
 
-  // If no result
-  return FALSE;
+    // If no result
+    return FALSE;
 }
 /**
  * Get a specific book data by UID
  */
 book_data_t *
-books_get_book_data_by_uid(gchar *uid)
+books_get_book_data_by_uid (gchar *uid)
 {
-  GSList *book_list_iterator;
-  book_data_t *book_data;
-
-  // Iterate throw the list
-  for (book_list_iterator = books_data; book_list_iterator != NULL; book_list_iterator
-      = book_list_iterator->next)
-    {
-      book_data = (book_data_t *) book_list_iterator->data;
-      if (strcmp(book_data->uid, uid) == 0)
-        return book_data;
+    GSList *book_list_iterator;
+    book_data_t *book_data;
+
+    // Iterate throw the list
+    for (book_list_iterator = books_data; book_list_iterator != NULL; book_list_iterator
+            = book_list_iterator->next) {
+        book_data = (book_data_t *) book_list_iterator->data;
+
+        if (strcmp (book_data->uid, uid) == 0)
+            return book_data;
     }
 
-  // If no result
-  return NULL;
+    // If no result
+    return NULL;
 }
 
 /**
  * Split a string of tokens separated by whitespace into an array of tokens.
  */
 static GArray *
-split_query_string(const gchar *str)
+split_query_string (const gchar *str)
 {
-  GArray *parts = g_array_sized_new(FALSE, FALSE, sizeof (char *), 2);
-  PangoLogAttr *attrs;
-  guint str_len = strlen (str), word_start = 0, i;
-
-  attrs = g_new0 (PangoLogAttr, str_len + 1);
-  /* TODO: do we need to specify a particular language or is NULL ok? */
-  pango_get_log_attrs (str, -1, -1, NULL, attrs, str_len + 1);
-
-  for (i = 0; i < str_len + 1; i++)
-    {
-      char *start_word, *end_word, *word;
-      if (attrs[i].is_word_end)
-        {
-          start_word = g_utf8_offset_to_pointer (str, word_start);
-          end_word = g_utf8_offset_to_pointer (str, i);
-          word = g_strndup (start_word, end_word - start_word);
-          g_array_append_val (parts, word);
+    GArray *parts = g_array_sized_new (FALSE, FALSE, sizeof (char *), 2);
+    PangoLogAttr *attrs;
+    guint str_len = strlen (str), word_start = 0, i;
+
+    attrs = g_new0 (PangoLogAttr, str_len + 1);
+    /* TODO: do we need to specify a particular language or is NULL ok? */
+    pango_get_log_attrs (str, -1, -1, NULL, attrs, str_len + 1);
+
+    for (i = 0; i < str_len + 1; i++) {
+        char *start_word, *end_word, *word;
+
+        if (attrs[i].is_word_end) {
+            start_word = g_utf8_offset_to_pointer (str, word_start);
+            end_word = g_utf8_offset_to_pointer (str, i);
+            word = g_strndup (start_word, end_word - start_word);
+            g_array_append_val (parts, word);
         }
-      if (attrs[i].is_word_start)
-        {
-          word_start = i;
+
+        if (attrs[i].is_word_start) {
+            word_start = i;
         }
     }
-  g_free (attrs);
-  return parts;
+
+    g_free (attrs);
+    return parts;
 }
 
-  /**
-   * Create a query which looks for the specified string in a contact's full name, email addresses and
-   * nick name.
-   */
+/**
+ * Create a query which looks for the specified string in a contact's full name, email addresses and
+ * nick name.
+ */
 static EBookQuery*
-create_query(const char* s)
+create_query (const char* s)
 {
-  EBookQuery *query;
-  GArray *parts = split_query_string(s);
-  EBookQuery ***field_queries;
-  EBookQuery **q;
-  EBookQuery **phone;
-  guint j;
-  int i;
-
-  q = g_new0 (EBookQuery *, n_search_fields);
-  field_queries = g_new0 (EBookQuery **, n_search_fields);
-
-  for (i = 0; i < n_search_fields; i++)
-    {
-      field_queries[i] = g_new0 (EBookQuery *, parts->len);
-      for (j = 0; j < parts->len; j++)
-        {
-          field_queries[i][j] = e_book_query_field_test(search_fields[i],
-              E_BOOK_QUERY_CONTAINS, g_array_index (parts, gchar *, j));
+    EBookQuery *query;
+    GArray *parts = split_query_string (s);
+    EBookQuery ***field_queries;
+    EBookQuery **q;
+    EBookQuery **phone;
+    guint j;
+    int i;
+
+    q = g_new0 (EBookQuery *, n_search_fields);
+    field_queries = g_new0 (EBookQuery **, n_search_fields);
+
+    for (i = 0; i < n_search_fields; i++) {
+        field_queries[i] = g_new0 (EBookQuery *, parts->len);
+
+        for (j = 0; j < parts->len; j++) {
+            field_queries[i][j] = e_book_query_field_test (search_fields[i],
+                                  E_BOOK_QUERY_CONTAINS, g_array_index (parts, gchar *, j));
         }
-      q[i] = e_book_query_and(parts->len, field_queries[i], TRUE);
+
+        q[i] = e_book_query_and (parts->len, field_queries[i], TRUE);
     }
-  g_array_free(parts, TRUE);
 
-  phone = g_new0 (EBookQuery *, 3);
-  phone[0] = e_book_query_field_exists(E_CONTACT_PHONE_BUSINESS);
-  phone[1] = e_book_query_field_exists(E_CONTACT_PHONE_HOME);
-  phone[2] = e_book_query_field_exists(E_CONTACT_PHONE_MOBILE);
+    g_array_free (parts, TRUE);
 
-  query = e_book_query_andv(e_book_query_or(n_search_fields, q, FALSE),
-      e_book_query_or(3, phone, FALSE), NULL);
+    phone = g_new0 (EBookQuery *, 3);
+    phone[0] = e_book_query_field_exists (E_CONTACT_PHONE_BUSINESS);
+    phone[1] = e_book_query_field_exists (E_CONTACT_PHONE_HOME);
+    phone[2] = e_book_query_field_exists (E_CONTACT_PHONE_MOBILE);
 
-  for (i = 0; i < n_search_fields; i++)
-    {
-      g_free(field_queries[i]);
+    query = e_book_query_andv (e_book_query_or (n_search_fields, q, FALSE),
+                               e_book_query_or (3, phone, FALSE), NULL);
+
+    for (i = 0; i < n_search_fields; i++) {
+        g_free (field_queries[i]);
     }
-  g_free(field_queries);
-  g_free(q);
-  g_free(phone);
 
-  return query;
+    g_free (field_queries);
+    g_free (q);
+    g_free (phone);
+
+    return query;
 }
 
 /**
  * Retrieve the contact's picture
  */
 static GdkPixbuf*
-pixbuf_from_contact(EContact *contact)
+pixbuf_from_contact (EContact *contact)
 {
 
-  GdkPixbuf *pixbuf = NULL;
-  EContactPhoto *photo = e_contact_get(contact, E_CONTACT_PHOTO);
-  if (photo)
-    {
-      GdkPixbufLoader *loader;
+    GdkPixbuf *pixbuf = NULL;
+    EContactPhoto *photo = e_contact_get (contact, E_CONTACT_PHOTO);
+
+    if (photo) {
+        GdkPixbufLoader *loader;
 
-      loader = gdk_pixbuf_loader_new();
+        loader = gdk_pixbuf_loader_new();
 
-      if (photo->type == E_CONTACT_PHOTO_TYPE_INLINED)
-        {
-          if (gdk_pixbuf_loader_write(loader,
-              (guchar *) photo->data.inlined.data, photo->data.inlined.length,
-              NULL))
-            pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
+        if (photo->type == E_CONTACT_PHOTO_TYPE_INLINED) {
+            if (gdk_pixbuf_loader_write (loader,
+                                         (guchar *) photo->data.inlined.data, photo->data.inlined.length,
+                                         NULL))
+                pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
         }
 
-      // If pixbuf has been found, check size and resize if needed
-      if (pixbuf)
-        {
-          GdkPixbuf *tmp;
-          gint width = gdk_pixbuf_get_width(pixbuf);
-          gint height = gdk_pixbuf_get_height(pixbuf);
-          double scale = 1.0;
-
-          if (height > width)
-            {
-              scale = pixbuf_size / (double) height;
-            }
-          else
-            {
-              scale = pixbuf_size / (double) width;
+        // If pixbuf has been found, check size and resize if needed
+        if (pixbuf) {
+            GdkPixbuf *tmp;
+            gint width = gdk_pixbuf_get_width (pixbuf);
+            gint height = gdk_pixbuf_get_height (pixbuf);
+            double scale = 1.0;
+
+            if (height > width) {
+                scale = pixbuf_size / (double) height;
+            } else {
+                scale = pixbuf_size / (double) width;
             }
 
-          if (scale < 1.0)
-            {
-              tmp = gdk_pixbuf_scale_simple(pixbuf, width * scale, height
-                  * scale, GDK_INTERP_BILINEAR);
-              g_object_unref(pixbuf);
-              pixbuf = tmp;
+            if (scale < 1.0) {
+                tmp = gdk_pixbuf_scale_simple (pixbuf, width * scale, height
+                                               * scale, GDK_INTERP_BILINEAR);
+                g_object_unref (pixbuf);
+                pixbuf = tmp;
             }
         }
-      e_contact_photo_free(photo);
+
+        e_contact_photo_free (photo);
     }
-  return pixbuf;
+
+    return pixbuf;
 }
 
 /**
  * Callback for asynchronous open of books
  */
 static void
-eds_async_open_callback(EBook *book, EBookStatus status, gpointer closure)
+eds_async_open_callback (EBook *book, EBookStatus status, gpointer closure)
 {
     Open_Handler_And_Data *had = (Open_Handler_And_Data *) closure;
 
     remaining_books_to_open--;
 
-    DEBUG("eds_async_open_callback remaining book to open: %i", remaining_books_to_open);
+    DEBUG ("eds_async_open_callback remaining book to open: %i", remaining_books_to_open);
 
     if (status == E_BOOK_ERROR_OK) {
 
-        book_data_t *book_data = g_new(book_data_t, 1);
-	book_data->active = FALSE;
-	book_data->name = g_strdup(e_source_peek_name(e_book_get_source(book)));
-	book_data->uid = g_strdup(e_source_peek_uid(e_book_get_source(book)));
-	book_data->ebook = book;
-	books_data = g_slist_prepend(books_data, book_data);
-	had->handler();
-    }
-    else {
+        book_data_t *book_data = g_new (book_data_t, 1);
+        book_data->active = FALSE;
+        book_data->name = g_strdup (e_source_peek_name (e_book_get_source (book)));
+        book_data->uid = g_strdup (e_source_peek_uid (e_book_get_source (book)));
+        book_data->ebook = book;
+        books_data = g_slist_prepend (books_data, book_data);
+        had->handler();
+    } else {
 
-        WARN("Got error %d when opening book", status);
+        WARN ("Got error %d when opening book", status);
     }
 }
 
@@ -312,88 +305,84 @@ eds_async_open_callback(EBook *book, EBookStatus status, gpointer closure)
  * Initialize address book
  */
 void
-init(OpenAsyncHandler callback)
+init (OpenAsyncHandler callback)
 {
-  GSList *list, *l;
-  ESourceList *source_list = NULL;
-  remaining_books_to_open = 0;
-  books_data = NULL;
-
-  source_list = e_source_list_new_for_gconf_default("/apps/evolution/addressbook/sources");
-  
-  if (source_list == NULL)
-    {
-      DEBUG("Error could not initialize source list for addressbook");
-      return;
+    GSList *list, *l;
+    ESourceList *source_list = NULL;
+    remaining_books_to_open = 0;
+    books_data = NULL;
+
+    source_list = e_source_list_new_for_gconf_default ("/apps/evolution/addressbook/sources");
+
+    if (source_list == NULL) {
+        DEBUG ("Error could not initialize source list for addressbook");
+        return;
     }
 
-  list = e_source_list_peek_groups(source_list);
-
-  Open_Handler_And_Data *had = g_new (Open_Handler_And_Data, 1);
-  had->handler = callback;
-
-  for (l = list; l != NULL; l = l->next)
-    {
-
-      ESourceGroup *group = l->data;
-      GSList *sources = NULL, *m;
-      sources = e_source_group_peek_sources(group);
-      for (m = sources; m != NULL; m = m->next)
-        {
-          ESource *source = m->data;
-          EBook *book = e_book_new(source, NULL);
-          if (book != NULL)
-            {
-              // Keep count of remaining books to open
-
-	      DEBUG("init addressbook %i", remaining_books_to_open);
-              remaining_books_to_open++;
-	      
-              // Asynchronous open
-              e_book_async_open(book, FALSE, eds_async_open_callback, had);
+    list = e_source_list_peek_groups (source_list);
+
+    Open_Handler_And_Data *had = g_new (Open_Handler_And_Data, 1);
+    had->handler = callback;
+
+    for (l = list; l != NULL; l = l->next) {
+
+        ESourceGroup *group = l->data;
+        GSList *sources = NULL, *m;
+        sources = e_source_group_peek_sources (group);
+
+        for (m = sources; m != NULL; m = m->next) {
+            ESource *source = m->data;
+            EBook *book = e_book_new (source, NULL);
+
+            if (book != NULL) {
+                // Keep count of remaining books to open
+
+                DEBUG ("init addressbook %i", remaining_books_to_open);
+                remaining_books_to_open++;
+
+                // Asynchronous open
+                e_book_async_open (book, FALSE, eds_async_open_callback, had);
             }
         }
     }
-  current_search_id = 0;
 
-  g_object_unref(source_list);
+    current_search_id = 0;
+
+    g_object_unref (source_list);
 }
 
 /**
  * Final callback after all books have been processed.
  */
 static void
-view_finish(EBookView *book_view, Search_Handler_And_Data *had)
+view_finish (EBookView *book_view, Search_Handler_And_Data *had)
 {
-  GList *i;
-  SearchAsyncHandler had_handler = had->handler;
-  GList *had_hits = had->hits;
-  gpointer had_user_data = had->user_data;
-  int search_id = had->search_id;
-  g_free(had);
-
-  if (book_view != NULL)
-    g_object_unref(book_view);
-
-  if (search_id == current_search_id)
-    {
-      // Reinitialize search id to prevent overflow
-      if (current_search_id > 5000)
-        current_search_id = 0;
-
-      // Call display callback
-      had_handler(had_hits, had_user_data);
-    }
-  else
-    {
-      // Some hits could have been processed but will not be used
-      for (i = had_hits; i != NULL; i = i->next)
-        {
-          Hit *entry;
-          entry = i->data;
-          free_hit(entry);
+    GList *i;
+    SearchAsyncHandler had_handler = had->handler;
+    GList *had_hits = had->hits;
+    gpointer had_user_data = had->user_data;
+    int search_id = had->search_id;
+    g_free (had);
+
+    if (book_view != NULL)
+        g_object_unref (book_view);
+
+    if (search_id == current_search_id) {
+        // Reinitialize search id to prevent overflow
+        if (current_search_id > 5000)
+            current_search_id = 0;
+
+        // Call display callback
+        had_handler (had_hits, had_user_data);
+    } else {
+        // Some hits could have been processed but will not be used
+        for (i = had_hits; i != NULL; i = i->next) {
+            Hit *entry;
+            entry = i->data;
+            free_hit (entry);
         }
-      g_list_free(had_hits);
+
+        g_list_free (had_hits);
     }
 }
 
@@ -402,79 +391,76 @@ view_finish(EBookView *book_view, Search_Handler_And_Data *had)
  * Used to store book search results.
  */
 static void
-view_contacts_added_cb(EBookView *book_view, GList *contacts,
-    gpointer user_data)
+view_contacts_added_cb (EBookView *book_view, GList *contacts,
+                        gpointer user_data)
 {
-  GdkPixbuf *photo;
+    GdkPixbuf *photo;
 
-  Search_Handler_And_Data *had = (Search_Handler_And_Data *) user_data;
+    Search_Handler_And_Data *had = (Search_Handler_And_Data *) user_data;
 
-  // If it's not the last search launched, stop it
-  if (had->search_id != current_search_id)
-    {
-      e_book_view_stop(book_view);
-      return;
+    // If it's not the last search launched, stop it
+    if (had->search_id != current_search_id) {
+        e_book_view_stop (book_view);
+        return;
     }
 
-  // If we reached max results
-  if (had->max_results_remaining <= 0)
-    {
-      e_book_view_stop(book_view);
-      had->book_views_remaining--;
-
-      // All books have been computed
-      if (had->book_views_remaining == 0)
-        {
-          view_finish(book_view, had);
-          return;
+    // If we reached max results
+    if (had->max_results_remaining <= 0) {
+        e_book_view_stop (book_view);
+        had->book_views_remaining--;
+
+        // All books have been computed
+        if (had->book_views_remaining == 0) {
+            view_finish (book_view, had);
+            return;
         }
     }
 
-  // For each contact
-  for (; contacts != NULL; contacts = g_list_next (contacts))
-    {
-      EContact *contact;
-      Hit *hit;
-      gchar *number;
-
-      contact = E_CONTACT (contacts->data);
-      hit = g_new (Hit, 1);
-
-      // Get the photo contact
-      photo = pixbuf_from_contact(contact);
-      hit->photo = photo;
-
-      // Get business phone information
-      fetch_information_from_contact(contact, E_CONTACT_PHONE_BUSINESS, &number);
-      hit->phone_business = g_strdup(number);
-
-      // Get home phone information
-      fetch_information_from_contact(contact, E_CONTACT_PHONE_HOME, &number);
-      hit->phone_home = g_strdup(number);
-
-      // Get mobile phone information
-      fetch_information_from_contact(contact, E_CONTACT_PHONE_MOBILE, &number);
-      hit->phone_mobile = g_strdup(number);
-
-      hit->name = g_strdup((char*) e_contact_get_const(contact,
-          E_CONTACT_NAME_OR_ORG));
-      if (!hit->name)
-        hit->name = "";
-
-      // Append list of contacts
-      had->hits = g_list_append(had->hits, hit);
-      had->max_results_remaining--;
-
-      // If we reached max results
-      if (had->max_results_remaining <= 0)
-        {
-          e_book_view_stop(book_view);
-          had->book_views_remaining--;
-          if (had->book_views_remaining == 0)
-            {
-              view_finish(book_view, had);
+    // For each contact
+    for (; contacts != NULL; contacts = g_list_next (contacts)) {
+        EContact *contact;
+        Hit *hit;
+        gchar *number;
+
+        contact = E_CONTACT (contacts->data);
+        hit = g_new (Hit, 1);
+
+        // Get the photo contact
+        photo = pixbuf_from_contact (contact);
+        hit->photo = photo;
+
+        // Get business phone information
+        fetch_information_from_contact (contact, E_CONTACT_PHONE_BUSINESS, &number);
+        hit->phone_business = g_strdup (number);
+
+        // Get home phone information
+        fetch_information_from_contact (contact, E_CONTACT_PHONE_HOME, &number);
+        hit->phone_home = g_strdup (number);
+
+        // Get mobile phone information
+        fetch_information_from_contact (contact, E_CONTACT_PHONE_MOBILE, &number);
+        hit->phone_mobile = g_strdup (number);
+
+        hit->name = g_strdup ( (char*) e_contact_get_const (contact,
+                               E_CONTACT_NAME_OR_ORG));
+
+        if (!hit->name)
+            hit->name = "";
+
+        // Append list of contacts
+        had->hits = g_list_append (had->hits, hit);
+        had->max_results_remaining--;
+
+        // If we reached max results
+        if (had->max_results_remaining <= 0) {
+            e_book_view_stop (book_view);
+            had->book_views_remaining--;
+
+            if (had->book_views_remaining == 0) {
+                view_finish (book_view, had);
             }
-          break;
+
+            break;
         }
     }
 }
@@ -484,17 +470,16 @@ view_contacts_added_cb(EBookView *book_view, GList *contacts,
  * Used to call final callback when all books have been read.
  */
 static void
-view_completed_cb(EBookView *book_view, EBookViewStatus status UNUSED,
-gpointer user_data)
+view_completed_cb (EBookView *book_view, EBookViewStatus status UNUSED,
+                   gpointer user_data)
 {
-  Search_Handler_And_Data *had = (Search_Handler_And_Data *) user_data;
-  had->book_views_remaining--;
-
-  // All books have been prcessed
-  if (had->book_views_remaining == 0)
-    {
-      // Call finish function
-      view_finish(book_view, had);
+    Search_Handler_And_Data *had = (Search_Handler_And_Data *) user_data;
+    had->book_views_remaining--;
+
+    // All books have been prcessed
+    if (had->book_views_remaining == 0) {
+        // Call finish function
+        view_finish (book_view, had);
     }
 }
 
@@ -502,66 +487,61 @@ gpointer user_data)
  * Perform an asynchronous search
  */
 void
-search_async(const char *query, int max_results, SearchAsyncHandler handler,
-    gpointer user_data)
+search_async (const char *query, int max_results, SearchAsyncHandler handler,
+              gpointer user_data)
 {
-  // Increment search id
-  current_search_id++;
+    // Increment search id
+    current_search_id++;
 
-  // If query is null
-  if (strlen(query) < 1 || g_slist_length(books_data) == 0)
-    {
-      // If data displayed (from previous search), directly call callback
-      handler(NULL, user_data);
+    // If query is null
+    if (strlen (query) < 1 || g_slist_length (books_data) == 0) {
+        // If data displayed (from previous search), directly call callback
+        handler (NULL, user_data);
 
-      return;
+        return;
     }
 
-  GSList *iter;
-  EBookQuery* book_query = create_query(query);
-  Search_Handler_And_Data *had = g_new (Search_Handler_And_Data, 1);
-  int search_count = 0;
-
-  // Initialize search data
-  had->search_id = current_search_id;
-  had->handler = handler;
-  had->user_data = user_data;
-  had->hits = NULL;
-  had->max_results_remaining = max_results;
-  had->book_views_remaining = 0;
-
-  // Iterate throw books data
-  for (iter = books_data; iter != NULL; iter = iter->next)
-    {
-      book_data_t *book_data = (book_data_t *) iter->data;
-
-      // If book is active
-      if (book_data->active)
-        {
-          EBookView *book_view = NULL;
-          e_book_get_book_view(book_data->ebook, book_query, NULL, max_results,
-              &book_view, NULL);
-
-          // If book view exists
-          if (book_view != NULL)
-            {
-              // Perform search
-              had->book_views_remaining++;
-              g_signal_connect (book_view, "contacts_added", (GCallback) view_contacts_added_cb, had);
-              g_signal_connect (book_view, "sequence_complete", (GCallback) view_completed_cb, had);
-              e_book_view_start(book_view);
-              search_count++;
+    GSList *iter;
+    EBookQuery* book_query = create_query (query);
+    Search_Handler_And_Data *had = g_new (Search_Handler_And_Data, 1);
+    int search_count = 0;
+
+    // Initialize search data
+    had->search_id = current_search_id;
+    had->handler = handler;
+    had->user_data = user_data;
+    had->hits = NULL;
+    had->max_results_remaining = max_results;
+    had->book_views_remaining = 0;
+
+    // Iterate throw books data
+    for (iter = books_data; iter != NULL; iter = iter->next) {
+        book_data_t *book_data = (book_data_t *) iter->data;
+
+        // If book is active
+        if (book_data->active) {
+            EBookView *book_view = NULL;
+            e_book_get_book_view (book_data->ebook, book_query, NULL, max_results,
+                                  &book_view, NULL);
+
+            // If book view exists
+            if (book_view != NULL) {
+                // Perform search
+                had->book_views_remaining++;
+                g_signal_connect (book_view, "contacts_added", (GCallback) view_contacts_added_cb, had);
+                g_signal_connect (book_view, "sequence_complete", (GCallback) view_completed_cb, had);
+                e_book_view_start (book_view);
+                search_count++;
             }
         }
     }
 
-  e_book_query_unref(book_query);
+    e_book_query_unref (book_query);
 
-  // If no search has been executed (no book selected)
-  if (search_count == 0)
-    {
-      // Call last callback anyway
-      view_finish(NULL, had);
+    // If no search has been executed (no book selected)
+    if (search_count == 0) {
+        // Call last callback anyway
+        view_finish (NULL, had);
     }
 }
 
@@ -569,17 +549,17 @@ search_async(const char *query, int max_results, SearchAsyncHandler handler,
  * Fetch information for a specific contact
  */
 void
-fetch_information_from_contact(EContact *contact, EContactField field,
-    gchar **info)
+fetch_information_from_contact (EContact *contact, EContactField field,
+                                gchar **info)
 {
-  gchar *to_fetch;
+    gchar *to_fetch;
+
+    to_fetch = g_strdup ( (char*) e_contact_get_const (contact, field));
 
-  to_fetch = g_strdup((char*) e_contact_get_const(contact, field));
-  if (!to_fetch)
-    {
-      to_fetch = g_strdup(EMPTY_ENTRY);
+    if (!to_fetch) {
+        to_fetch = g_strdup (EMPTY_ENTRY);
     }
 
-  *info = g_strdup(to_fetch);
+    *info = g_strdup (to_fetch);
 }
 
diff --git a/sflphone-client-gnome/src/contacts/addressbook/eds.h b/sflphone-client-gnome/src/contacts/addressbook/eds.h
index 7ff8cbd025f27b28d19951a7b5f2411fcaf511cd..2e44756a9ae962aae343729882e200912838322a 100644
--- a/sflphone-client-gnome/src/contacts/addressbook/eds.h
+++ b/sflphone-client-gnome/src/contacts/addressbook/eds.h
@@ -56,24 +56,22 @@ int current_search_id;
 /**
  * Represent a contact entry
  */
-typedef struct _Hit
-{
-  gchar *name;
-  GdkPixbuf *photo;
-  gchar *phone_business;
-  gchar *phone_home;
-  gchar *phone_mobile;
+typedef struct _Hit {
+    gchar *name;
+    GdkPixbuf *photo;
+    gchar *phone_business;
+    gchar *phone_home;
+    gchar *phone_mobile;
 } Hit;
 
 /**
  * Book structure for "outside world"
  */
-typedef struct
-{
-  gchar *uid;
-  gchar *name;
-  gboolean active;
-  EBook *ebook;
+typedef struct {
+    gchar *uid;
+    gchar *name;
+    gboolean active;
+    EBook *ebook;
 } book_data_t;
 
 GSList *books_data;
@@ -82,46 +80,46 @@ GSList *books_data;
  * Free a contact entry
  */
 void
-free_hit(Hit *h);
+free_hit (Hit *h);
 
 /**
  * Template callback function for the asynchronous search
  */
 typedef void
-(* SearchAsyncHandler)(GList *hits, gpointer user_data);
+(* SearchAsyncHandler) (GList *hits, gpointer user_data);
 
 /**
  * Template callback function for the asynchronous open
  */
 typedef void
-(* OpenAsyncHandler)();
+(* OpenAsyncHandler) ();
 
 /**
  * Initialize the address book.
  * Connection to evolution data server
  */
 void
-init(OpenAsyncHandler);
+init (OpenAsyncHandler);
 
 /**
  * Asynchronous search function
  */
 void
-search_async(const char *query, int max_results, SearchAsyncHandler handler,
-    gpointer user_data);
+search_async (const char *query, int max_results, SearchAsyncHandler handler,
+              gpointer user_data);
 
 /**
  * Retrieve the specified information from the contact
  */
 void
-fetch_information_from_contact(EContact *contact, EContactField field,
-    gchar **info);
+fetch_information_from_contact (EContact *contact, EContactField field,
+                                gchar **info);
 
 GSList*
-get_books(void);
+get_books (void);
 
 book_data_t *
-books_get_book_data_by_uid(gchar *uid);
+books_get_book_data_by_uid (gchar *uid);
 
 /**
  * Public way to know if we can perform a search
diff --git a/sflphone-client-gnome/src/contacts/calllist.c b/sflphone-client-gnome/src/contacts/calllist.c
index 10744e58ff0fb1c1548661fedceb5f4c9faef927..ead96bbc2eaec2955fdbad2646b054166ca97096 100644
--- a/sflphone-client-gnome/src/contacts/calllist.c
+++ b/sflphone-client-gnome/src/contacts/calllist.c
@@ -33,66 +33,66 @@
 #include <contacts/searchbar.h>
 
 // TODO : sflphoneGTK : try to do this more generic
-void calllist_add_contact (gchar *contact_name, gchar *contact_phone, contact_type_t type, GdkPixbuf *photo){
+void calllist_add_contact (gchar *contact_name, gchar *contact_phone, contact_type_t type, GdkPixbuf *photo)
+{
 
     callable_obj_t *new_call;
     GdkPixbuf *pixbuf;
 
     /* Check if the information is valid */
-    if (g_strcasecmp (contact_phone, EMPTY_ENTRY) != 0){
+    if (g_strcasecmp (contact_phone, EMPTY_ENTRY) != 0) {
         create_new_call (CONTACT, CALL_STATE_DIALING, "", "", contact_name, contact_phone, &new_call);
 
         // Attach a pixbuf to a contact
         if (photo) {
-            attach_thumbnail (new_call, gdk_pixbuf_copy(photo));
-        }
-        else {
+            attach_thumbnail (new_call, gdk_pixbuf_copy (photo));
+        } else {
             switch (type) {
                 case CONTACT_PHONE_BUSINESS:
-                    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/users.svg", NULL);
+                    pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/users.svg", NULL);
                     break;
                 case CONTACT_PHONE_HOME:
-                    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/home.svg", NULL);
+                    pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/home.svg", NULL);
                     break;
                 case CONTACT_PHONE_MOBILE:
-                    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/phone.svg", NULL);
+                    pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/phone.svg", NULL);
                     break;
                 default:
-                    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/contact_default.svg", NULL);
+                    pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/contact_default.svg", NULL);
                     break;
             }
+
             attach_thumbnail (new_call, pixbuf);
         }
 
         calllist_add (contacts, new_call);
-        calltree_add_call(contacts, new_call, NULL);
+        calltree_add_call (contacts, new_call, NULL);
     }
 }
 
 void
 calllist_init (calltab_t* tab)
 {
-  tab->callQueue = g_queue_new ();
-  tab->selectedCall = NULL;
+    tab->callQueue = g_queue_new ();
+    tab->selectedCall = NULL;
 }
 
 void
 calllist_clean (calltab_t* tab)
 {
-  g_queue_free (tab->callQueue);
+    g_queue_free (tab->callQueue);
 }
 
 void
 calllist_reset (calltab_t* tab)
 {
-  g_queue_free (tab->callQueue);
-  tab->callQueue = g_queue_new();
+    g_queue_free (tab->callQueue);
+    tab->callQueue = g_queue_new();
 }
 
 void calllist_add_history_entry (callable_obj_t *obj)
 {
-    if (eel_gconf_get_integer (HISTORY_ENABLED))
-    {
+    if (eel_gconf_get_integer (HISTORY_ENABLED)) {
         g_queue_push_tail (history->callQueue, (gpointer *) obj);
         calltree_add_call (history, obj, NULL);
     }
@@ -101,89 +101,84 @@ void calllist_add_history_entry (callable_obj_t *obj)
 void
 calllist_add (calltab_t* tab, callable_obj_t * c)
 {
-    if( tab == history )
-    {
+    if (tab == history) {
         calllist_add_history_entry (c);
-    }
-    else
+    } else
         g_queue_push_tail (tab->callQueue, (gpointer *) c);
 }
 
 // TODO : sflphoneGTK : try to do this more generic
 void
-calllist_clean_history( void )
+calllist_clean_history (void)
 {
-  unsigned int i;
-  guint size = calllist_get_size( history );
-  DEBUG("history list size = %i", calllist_get_size( history ));
-  for( i = 0 ; i < size ; i++ )
-  {
-    DEBUG("Delete calls");
-    callable_obj_t* c = calllist_get_nth( history , i );
-    // Delete the call from the call tree
-    DEBUG("Delete calls");
-    calltree_remove_call(history, c, NULL);
-  }
-  calllist_reset( history );
+    unsigned int i;
+    guint size = calllist_get_size (history);
+    DEBUG ("history list size = %i", calllist_get_size (history));
+
+    for (i = 0 ; i < size ; i++) {
+        DEBUG ("Delete calls");
+        callable_obj_t* c = calllist_get_nth (history , i);
+        // Delete the call from the call tree
+        DEBUG ("Delete calls");
+        calltree_remove_call (history, c, NULL);
+    }
+
+    calllist_reset (history);
 }
 
 // TODO : sflphoneGTK : try to do this more generic
 void
-calllist_remove_from_history( callable_obj_t* c )
+calllist_remove_from_history (callable_obj_t* c)
 {
-  calllist_remove( history, c->_callID );
-  calltree_remove_call(history, c, NULL);
-  DEBUG("Size of history = %i" , calllist_get_size( history ));
+    calllist_remove (history, c->_callID);
+    calltree_remove_call (history, c, NULL);
+    DEBUG ("Size of history = %i" , calllist_get_size (history));
 }
 
 void
 calllist_remove (calltab_t* tab, const gchar * callID)
 {
-  callable_obj_t * c = calllist_get(tab, callID);
-  if (c)
-  {
-    g_queue_remove(tab->callQueue, c);
-  }
+    callable_obj_t * c = calllist_get (tab, callID);
+
+    if (c) {
+        g_queue_remove (tab->callQueue, c);
+    }
 }
 
 
 callable_obj_t *
-calllist_get_by_state (calltab_t* tab, call_state_t state )
+calllist_get_by_state (calltab_t* tab, call_state_t state)
 {
-  GList * c = g_queue_find_custom (tab->callQueue, &state, get_state_callstruct);
-  if (c)
-  {
-    return (callable_obj_t *)c->data;
-  }
-  else
-  {
-    return NULL;
-  }
+    GList * c = g_queue_find_custom (tab->callQueue, &state, get_state_callstruct);
+
+    if (c) {
+        return (callable_obj_t *) c->data;
+    } else {
+        return NULL;
+    }
 
 }
 
 guint
 calllist_get_size (calltab_t* tab)
 {
-  return g_queue_get_length (tab->callQueue);
+    return g_queue_get_length (tab->callQueue);
 }
 
 callable_obj_t *
-calllist_get_nth (calltab_t* tab, guint n )
+calllist_get_nth (calltab_t* tab, guint n)
 {
-  return g_queue_peek_nth (tab->callQueue, n);
+    return g_queue_peek_nth (tab->callQueue, n);
 }
 
 callable_obj_t *
-calllist_get (calltab_t* tab, const gchar * callID )
+calllist_get (calltab_t* tab, const gchar * callID)
 {
-  GList * c = g_queue_find_custom (tab->callQueue, callID, is_callID_callstruct);
-  if (c)
-  {
-    return (callable_obj_t *)c->data;
-  }
-  else
-  {
-    return NULL;
-  }
+    GList * c = g_queue_find_custom (tab->callQueue, callID, is_callID_callstruct);
+
+    if (c) {
+        return (callable_obj_t *) c->data;
+    } else {
+        return NULL;
+    }
 }
diff --git a/sflphone-client-gnome/src/contacts/calllist.h b/sflphone-client-gnome/src/contacts/calllist.h
index db3cee03dcb4df6adc6685db1a8ffe234532530d..7b6704600fb3cb0c6a4aa498d1b437d90351533c 100644
--- a/sflphone-client-gnome/src/contacts/calllist.h
+++ b/sflphone-client-gnome/src/contacts/calllist.h
@@ -40,17 +40,17 @@
   */
 
 typedef struct {
-	GtkTreeStore* store;
-	GtkWidget* view;
-	GtkWidget* tree;
-        GtkWidget* searchbar;
-
-        // Calllist vars
-	GQueue* callQueue;
-        gint selectedType;
-	callable_obj_t* selectedCall;
-        conference_obj_t* selectedConf;
-        gchar *_name;
+    GtkTreeStore* store;
+    GtkWidget* view;
+    GtkWidget* tree;
+    GtkWidget* searchbar;
+
+    // Calllist vars
+    GQueue* callQueue;
+    gint selectedType;
+    callable_obj_t* selectedCall;
+    conference_obj_t* selectedConf;
+    gchar *_name;
 } calltab_t;
 
 void
@@ -64,7 +64,7 @@ calllist_init (calltab_t* tab);
 
 /** This function empty and free the call list. */
 void
-calllist_clean(calltab_t* tab);
+calllist_clean (calltab_t* tab);
 
 /** This function empty, free the call list and allocate a new one. */
 void
@@ -72,11 +72,11 @@ calllist_reset (calltab_t* tab);
 
 /** Get the maximun number of calls in the history calltab */
 gdouble
-call_history_get_max_calls( void );
+call_history_get_max_calls (void);
 
 /** Set the maximun number of calls in the history calltab */
 void
-call_history_set_max_calls( const gdouble number );
+call_history_set_max_calls (const gdouble number);
 
 /** This function append a call to list.
   * @param c The call you want to add
@@ -106,13 +106,13 @@ calllist_get_size (calltab_t* tab);
   * @param n The position of the call you want
   * @return A call or NULL */
 callable_obj_t *
-calllist_get_nth (calltab_t* tab, guint n );
+calllist_get_nth (calltab_t* tab, guint n);
 
 /** Return the call corresponding to the callID
   * @param n The callID of the call you want
   * @return A call or NULL */
 callable_obj_t *
-calllist_get (calltab_t* tab, const gchar * callID );
+calllist_get (calltab_t* tab, const gchar * callID);
 
 /**
  * Clean the history. Delete all calls
@@ -125,7 +125,7 @@ calllist_clean_history();
  * @param c The call to remove
  */
 void
-calllist_remove_from_history( callable_obj_t* c);
+calllist_remove_from_history (callable_obj_t* c);
 
 /**
  * Initialize a non-empty call list
diff --git a/sflphone-client-gnome/src/contacts/calltab.c b/sflphone-client-gnome/src/contacts/calltab.c
index ac194bf8287fe4a233e827aae2d2c9acfc22afa8..fab48e76318b7810a5969b7edaeb47382af70125 100644
--- a/sflphone-client-gnome/src/contacts/calltab.c
+++ b/sflphone-client-gnome/src/contacts/calltab.c
@@ -36,28 +36,28 @@
 
 calltab_t* calltab_init (gboolean searchbar_type, gchar *name)
 {
-	calltab_t* ret;
+    calltab_t* ret;
 
-	ret = malloc(sizeof(calltab_t));
+    ret = malloc (sizeof (calltab_t));
 
-	ret->store = NULL;
-	ret->view = NULL;
-	ret->tree = NULL;
-        ret->searchbar = NULL;
-	ret->callQueue = NULL;
-	ret->selectedCall = NULL;
-	ret->selectedConf = NULL;
-        ret->_name = g_strdup (name);
+    ret->store = NULL;
+    ret->view = NULL;
+    ret->tree = NULL;
+    ret->searchbar = NULL;
+    ret->callQueue = NULL;
+    ret->selectedCall = NULL;
+    ret->selectedConf = NULL;
+    ret->_name = g_strdup (name);
 
-	calltree_create (ret, searchbar_type);
-	calllist_init(ret);
+    calltree_create (ret, searchbar_type);
+    calllist_init (ret);
 
 
-	return ret;
+    return ret;
 }
 
 void
-calltab_select_call (calltab_t* tab, callable_obj_t * c )
+calltab_select_call (calltab_t* tab, callable_obj_t * c)
 {
     tab->selectedType = A_CALL;
     tab->selectedCall = c;
@@ -66,7 +66,7 @@ calltab_select_call (calltab_t* tab, callable_obj_t * c )
 
 
 void
-calltab_select_conf (conference_obj_t * c )
+calltab_select_conf (conference_obj_t * c)
 {
     current_calls->selectedType = A_CONFERENCE;
     current_calls->selectedConf = c;
@@ -74,7 +74,7 @@ calltab_select_conf (conference_obj_t * c )
 }
 
 gint
-calltab_get_selected_type(calltab_t* tab)
+calltab_get_selected_type (calltab_t* tab)
 {
     return tab->selectedType;
 }
@@ -82,7 +82,7 @@ calltab_get_selected_type(calltab_t* tab)
 callable_obj_t *
 calltab_get_selected_call (calltab_t* tab)
 {
-  return tab->selectedCall;
+    return tab->selectedCall;
 }
 
 conference_obj_t*
diff --git a/sflphone-client-gnome/src/contacts/calltab.h b/sflphone-client-gnome/src/contacts/calltab.h
index db14867ac51839ec0c3eb85c2bea116576fe69d5..1d748620ba3f3e9e1dd908e0ae03b16332f78ec8 100644
--- a/sflphone-client-gnome/src/contacts/calltab.h
+++ b/sflphone-client-gnome/src/contacts/calltab.h
@@ -54,7 +54,7 @@ void
 calltab_select_conf (conference_obj_t *);
 
 gint
-calltab_get_selected_type(calltab_t* tab);
+calltab_get_selected_type (calltab_t* tab);
 
 /** Return the selected call.
   * @return The number of the caller */
diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c
index 6417d628fb4775731f2354fde2ac82ba910c61e6..5b90c5553f64aafc85de1446dfc1eda365fb080c 100644
--- a/sflphone-client-gnome/src/contacts/calltree.c
+++ b/sflphone-client-gnome/src/contacts/calltree.c
@@ -62,41 +62,41 @@ conference_obj_t *dragged_conf;
 conference_obj_t *selected_conf;
 
 
-static void drag_begin_cb(GtkWidget *widget, GdkDragContext *dc, gpointer data);
-static void drag_end_cb(GtkWidget * mblist, GdkDragContext * context, gpointer data);
-void drag_data_received_cb(GtkWidget *widget, GdkDragContext *dc, gint x, gint y, GtkSelectionData *selection_data, guint info, guint t, gpointer data);
+static void drag_begin_cb (GtkWidget *widget, GdkDragContext *dc, gpointer data);
+static void drag_end_cb (GtkWidget * mblist, GdkDragContext * context, gpointer data);
+void drag_data_received_cb (GtkWidget *widget, GdkDragContext *dc, gint x, gint y, GtkSelectionData *selection_data, guint info, guint t, gpointer data);
 
 
 enum {
-	COLUMN_ACCOUNT_STATE = 0,
-	COLUMN_ACCOUNT_DESC,
-	COLUMN_ACCOUNT_SECURITY,
-	COLUMN_ACCOUNT_PTR,
+    COLUMN_ACCOUNT_STATE = 0,
+    COLUMN_ACCOUNT_DESC,
+    COLUMN_ACCOUNT_SECURITY,
+    COLUMN_ACCOUNT_PTR,
 };
 
 
 /**
  * Show popup menu
  */
-	static gboolean
+static gboolean
 popup_menu (GtkWidget *widget,
-		gpointer   user_data UNUSED)
+            gpointer   user_data UNUSED)
 {
-	show_popup_menu(widget, NULL);
-	return TRUE;
+    show_popup_menu (widget, NULL);
+    return TRUE;
 }
 
 /* Call back when the user click on a call in the list */
-	static void
-call_selected_cb(GtkTreeSelection *sel, void* data UNUSED )
+static void
+call_selected_cb (GtkTreeSelection *sel, void* data UNUSED)
 {
 
-    DEBUG("CallTree: Selection callback");
+    DEBUG ("CallTree: Selection callback");
 
     GtkTreeIter iter;
     GValue val;
-    GtkTreeModel *model = (GtkTreeModel*)active_calltree->store;
-    
+    GtkTreeModel *model = (GtkTreeModel*) active_calltree->store;
+
     GtkTreePath* path;
     gchar* string_path;
 
@@ -106,163 +106,162 @@ call_selected_cb(GtkTreeSelection *sel, void* data UNUSED )
     }
 
     // store info for dragndrop
-    path = gtk_tree_model_get_path(model, &iter);
-    string_path = gtk_tree_path_to_string(path);
-    selected_path_depth = gtk_tree_path_get_depth(path);
+    path = gtk_tree_model_get_path (model, &iter);
+    string_path = gtk_tree_path_to_string (path);
+    selected_path_depth = gtk_tree_path_get_depth (path);
 
-    if(gtk_tree_model_iter_has_child(GTK_TREE_MODEL(model), &iter)) {
+    if (gtk_tree_model_iter_has_child (GTK_TREE_MODEL (model), &iter)) {
 
-        DEBUG("CallTree: Selected a conference");
-	selected_type = A_CONFERENCE;
+        DEBUG ("CallTree: Selected a conference");
+        selected_type = A_CONFERENCE;
 
-	val.g_type = 0;
-	gtk_tree_model_get_value (model, &iter, COLUMN_ACCOUNT_PTR, &val);
+        val.g_type = 0;
+        gtk_tree_model_get_value (model, &iter, COLUMN_ACCOUNT_PTR, &val);
 
-	calltab_select_conf((conference_obj_t*) g_value_get_pointer(&val));
+        calltab_select_conf ( (conference_obj_t*) g_value_get_pointer (&val));
 
-	selected_conf = (conference_obj_t*)g_value_get_pointer(&val);
+        selected_conf = (conference_obj_t*) g_value_get_pointer (&val);
 
-	if(selected_conf) {
+        if (selected_conf) {
 
-	    selected_call_id = selected_conf->_confID;
-	    selected_path = string_path;
-	    selected_call = NULL;
+            selected_call_id = selected_conf->_confID;
+            selected_path = string_path;
+            selected_call = NULL;
 
-	}
+        }
 
-	DEBUG("CallTree: selected_path %s, selected_call_id %s, selected_path_depth %d", 
-	                          selected_path, selected_call_id, selected_path_depth);
+        DEBUG ("CallTree: selected_path %s, selected_call_id %s, selected_path_depth %d",
+               selected_path, selected_call_id, selected_path_depth);
 
-    }
-    else {
-      
-        DEBUG("CallTree: Selected a call");
-	selected_type = A_CALL;
-
-	val.g_type = 0;
-	gtk_tree_model_get_value (model, &iter, COLUMN_ACCOUNT_PTR, &val);
-	
-	calltab_select_call(active_calltree, (callable_obj_t*) g_value_get_pointer(&val));
-	
-	selected_call = (callable_obj_t*)g_value_get_pointer(&val);
-
-	if(selected_call) {
-
-	    selected_call_id = selected_call->_callID;
-	    selected_path = string_path;
-	    selected_conf = NULL;
-	}
-
-	DEBUG("CallTree: selected_path %s, selected_call_id %s, selected_path_depth %d", 
-	                            selected_path, selected_call_id, selected_path_depth);
+    } else {
+
+        DEBUG ("CallTree: Selected a call");
+        selected_type = A_CALL;
+
+        val.g_type = 0;
+        gtk_tree_model_get_value (model, &iter, COLUMN_ACCOUNT_PTR, &val);
+
+        calltab_select_call (active_calltree, (callable_obj_t*) g_value_get_pointer (&val));
+
+        selected_call = (callable_obj_t*) g_value_get_pointer (&val);
+
+        if (selected_call) {
+
+            selected_call_id = selected_call->_callID;
+            selected_path = string_path;
+            selected_conf = NULL;
+        }
+
+        DEBUG ("CallTree: selected_path %s, selected_call_id %s, selected_path_depth %d",
+               selected_path, selected_call_id, selected_path_depth);
     }
 
-    g_value_unset(&val);
+    g_value_unset (&val);
     update_actions();
 }
 
 /* A row is activated when it is double clicked */
-	void 
-row_activated(GtkTreeView       *tree_view UNUSED,
-		GtkTreePath       *path UNUSED,
-		GtkTreeViewColumn *column UNUSED,
-		void * data UNUSED) {
+void
+row_activated (GtkTreeView       *tree_view UNUSED,
+               GtkTreePath       *path UNUSED,
+               GtkTreeViewColumn *column UNUSED,
+               void * data UNUSED)
+{
     callable_obj_t* selectedCall = NULL;
     callable_obj_t* new_call;
     conference_obj_t* selectedConf = NULL;
     gchar *account_id;
-	
-    DEBUG("CallTree: Double click action");
-    
-    if(calltab_get_selected_type(active_calltree) == A_CALL) {
-      
-	selectedCall = calltab_get_selected_call(active_calltree);
-
-	if (selectedCall) {
-	    DEBUG("CallTree: Selected a call");
-	    
-	    // Get the right event from the right calltree
-	    if( active_calltree == current_calls ) {
-
-	      DEBUG("CallTree: Active tree is current calls");
-	      
-	      switch(selectedCall->_state) {
-	      case CALL_STATE_INCOMING:
-		  dbus_accept(selectedCall);
-		  stop_notification();
-		  break;
-	      case CALL_STATE_HOLD:
-		  dbus_unhold(selectedCall);
-		  break;
-	      case CALL_STATE_RINGING:
-	      case CALL_STATE_CURRENT:
-	      case CALL_STATE_BUSY:
-	      case CALL_STATE_FAILURE:
-		  break;
-	      case CALL_STATE_DIALING:
-		  sflphone_place_call (selectedCall);
-		  break;
-	      default:
-		  WARN("Row activated - Should not happen!");
-		  break;
-	      }
-	    }
-		
-	    // If history or contact: double click action places a new call
-	    else {
-
-	        DEBUG("CallTree: Active tree is history or contact");
-
-		account_id = g_strdup (selectedCall->_accountID);
-		      
-		// Create a new call
-		create_new_call (CALL, CALL_STATE_DIALING, "", account_id, selectedCall->_peer_name, selectedCall->_peer_number, &new_call);
-
-		calllist_add(current_calls, new_call);
-		calltree_add_call(current_calls, new_call, NULL);
-		sflphone_place_call(new_call);
-		calltree_display(current_calls);
-	    }
-	}
-    }
-    else if(calltab_get_selected_type(current_calls) == A_CONFERENCE) {
-
-        DEBUG("CallTree: Selected a conference");
-	    
-	if( active_calltree == current_calls ) {
-
-	    selectedConf = calltab_get_selected_conf(current_calls);
-
-	    if(selectedConf) {
-
-	        switch(selectedConf->_state) {
-		case CONFERENCE_STATE_ACTIVE_ATACHED:
-		    // sflphone_add_main_participant(selectedConf);
-		    break;
-		case CONFERENCE_STATE_ACTIVE_DETACHED:
-		    sflphone_add_main_participant(selectedConf);
-		    break;
-		case CONFERENCE_STATE_HOLD:
-		    sflphone_conference_off_hold(selectedConf);
-		    break;
-		}
-	    }
-	}
+
+    DEBUG ("CallTree: Double click action");
+
+    if (calltab_get_selected_type (active_calltree) == A_CALL) {
+
+        selectedCall = calltab_get_selected_call (active_calltree);
+
+        if (selectedCall) {
+            DEBUG ("CallTree: Selected a call");
+
+            // Get the right event from the right calltree
+            if (active_calltree == current_calls) {
+
+                DEBUG ("CallTree: Active tree is current calls");
+
+                switch (selectedCall->_state) {
+                    case CALL_STATE_INCOMING:
+                        dbus_accept (selectedCall);
+                        stop_notification();
+                        break;
+                    case CALL_STATE_HOLD:
+                        dbus_unhold (selectedCall);
+                        break;
+                    case CALL_STATE_RINGING:
+                    case CALL_STATE_CURRENT:
+                    case CALL_STATE_BUSY:
+                    case CALL_STATE_FAILURE:
+                        break;
+                    case CALL_STATE_DIALING:
+                        sflphone_place_call (selectedCall);
+                        break;
+                    default:
+                        WARN ("Row activated - Should not happen!");
+                        break;
+                }
+            }
+
+            // If history or contact: double click action places a new call
+            else {
+
+                DEBUG ("CallTree: Active tree is history or contact");
+
+                account_id = g_strdup (selectedCall->_accountID);
+
+                // Create a new call
+                create_new_call (CALL, CALL_STATE_DIALING, "", account_id, selectedCall->_peer_name, selectedCall->_peer_number, &new_call);
+
+                calllist_add (current_calls, new_call);
+                calltree_add_call (current_calls, new_call, NULL);
+                sflphone_place_call (new_call);
+                calltree_display (current_calls);
+            }
+        }
+    } else if (calltab_get_selected_type (current_calls) == A_CONFERENCE) {
+
+        DEBUG ("CallTree: Selected a conference");
+
+        if (active_calltree == current_calls) {
+
+            selectedConf = calltab_get_selected_conf (current_calls);
+
+            if (selectedConf) {
+
+                switch (selectedConf->_state) {
+                    case CONFERENCE_STATE_ACTIVE_ATACHED:
+                        // sflphone_add_main_participant(selectedConf);
+                        break;
+                    case CONFERENCE_STATE_ACTIVE_DETACHED:
+                        sflphone_add_main_participant (selectedConf);
+                        break;
+                    case CONFERENCE_STATE_HOLD:
+                        sflphone_conference_off_hold (selectedConf);
+                        break;
+                }
+            }
+        }
     }
 }
 
 
 /* Catch cursor-activated signal. That is, when the entry is single clicked */
-	void  
-row_single_click(GtkTreeView *tree_view UNUSED, void * data UNUSED)
+void
+row_single_click (GtkTreeView *tree_view UNUSED, void * data UNUSED)
 {
     callable_obj_t * selectedCall = NULL;
     account_t * account_details = NULL;
     gchar * displaySasOnce="";
 
-    DEBUG("CallTree: Single click action");
+    DEBUG ("CallTree: Single click action");
 
-    selectedCall = calltab_get_selected_call( active_calltree );
+    selectedCall = calltab_get_selected_call (active_calltree);
 
     /*
     if(!selected_call) {
@@ -272,76 +271,79 @@ row_single_click(GtkTreeView *tree_view UNUSED, void * data UNUSED)
 
     if (selectedCall) {
 
-        account_details = account_list_get_by_id(selectedCall->_accountID);
-	DEBUG("AccountID %s", selectedCall->_accountID);
-
-	if(account_details != NULL) {
-	    displaySasOnce = g_hash_table_lookup(account_details->properties, ACCOUNT_DISPLAY_SAS_ONCE);
-	    DEBUG("Display SAS once %s", displaySasOnce);
-	}
-	else {
-	    GHashTable * properties = NULL;
-	    sflphone_get_ip2ip_properties (&properties);
-	    if(properties != NULL)
-	      { displaySasOnce = g_hash_table_lookup(properties, ACCOUNT_DISPLAY_SAS_ONCE); DEBUG("IP2IP displaysasonce %s", displaySasOnce); }
-	}
-
-	/*  Make sure that we are not in the history tab since 
-	 *  nothing is defined for it yet 
-	 */
-	if( active_calltree == current_calls ) {
-
-	    // sflphone_selected_call_codec(selectedCall);
-
-	    // DEBUG("single click action: %s", dbus_get_current_codec_name(selectedCall));
-	    // sflphone_display_selected_codec(dbus_get_current_codec_name(selectedCall));
-
-	  switch(selectedCall->_srtp_state) {
-
-	  case SRTP_STATE_ZRTP_SAS_UNCONFIRMED:
-	      selectedCall->_srtp_state = SRTP_STATE_ZRTP_SAS_CONFIRMED;
-	      if(g_strcasecmp(displaySasOnce,"true") == 0) {
-		  selectedCall->_zrtp_confirmed = TRUE;
-	      }
-	      dbus_confirm_sas(selectedCall);
-	      calltree_update_call(current_calls, selectedCall, NULL);
-	      break;
-	  case SRTP_STATE_ZRTP_SAS_CONFIRMED:
-	      selectedCall->_srtp_state = SRTP_STATE_ZRTP_SAS_UNCONFIRMED;
-	      dbus_reset_sas(selectedCall);
-	      calltree_update_call(current_calls, selectedCall, NULL);
-	      break;
-	  default:
-	      DEBUG("Single click but no action");
-	      break;
-	  }
-	}
+        account_details = account_list_get_by_id (selectedCall->_accountID);
+        DEBUG ("AccountID %s", selectedCall->_accountID);
+
+        if (account_details != NULL) {
+            displaySasOnce = g_hash_table_lookup (account_details->properties, ACCOUNT_DISPLAY_SAS_ONCE);
+            DEBUG ("Display SAS once %s", displaySasOnce);
+        } else {
+            GHashTable * properties = NULL;
+            sflphone_get_ip2ip_properties (&properties);
+
+            if (properties != NULL) {
+                displaySasOnce = g_hash_table_lookup (properties, ACCOUNT_DISPLAY_SAS_ONCE);
+                DEBUG ("IP2IP displaysasonce %s", displaySasOnce);
+            }
+        }
+
+        /*  Make sure that we are not in the history tab since
+         *  nothing is defined for it yet
+         */
+        if (active_calltree == current_calls) {
+
+            // sflphone_selected_call_codec(selectedCall);
+
+            // DEBUG("single click action: %s", dbus_get_current_codec_name(selectedCall));
+            // sflphone_display_selected_codec(dbus_get_current_codec_name(selectedCall));
+
+            switch (selectedCall->_srtp_state) {
+
+                case SRTP_STATE_ZRTP_SAS_UNCONFIRMED:
+                    selectedCall->_srtp_state = SRTP_STATE_ZRTP_SAS_CONFIRMED;
+
+                    if (g_strcasecmp (displaySasOnce,"true") == 0) {
+                        selectedCall->_zrtp_confirmed = TRUE;
+                    }
+
+                    dbus_confirm_sas (selectedCall);
+                    calltree_update_call (current_calls, selectedCall, NULL);
+                    break;
+                case SRTP_STATE_ZRTP_SAS_CONFIRMED:
+                    selectedCall->_srtp_state = SRTP_STATE_ZRTP_SAS_UNCONFIRMED;
+                    dbus_reset_sas (selectedCall);
+                    calltree_update_call (current_calls, selectedCall, NULL);
+                    break;
+                default:
+                    DEBUG ("Single click but no action");
+                    break;
+            }
+        }
     }
 }
 
-	static gboolean
-button_pressed(GtkWidget* widget, GdkEventButton *event, gpointer user_data UNUSED)
+static gboolean
+button_pressed (GtkWidget* widget, GdkEventButton *event, gpointer user_data UNUSED)
 {
-    if (event->button == 3 && event->type == GDK_BUTTON_PRESS){
-        if( active_calltree == current_calls ) {
-	    show_popup_menu(widget,  event);
-	    return TRUE;
-	}
-	else if (active_calltree == history) {
-	    show_popup_menu_history (widget,  event);
-	    return TRUE;
-	}
-	else {
-	    show_popup_menu_contacts (widget, event);
-	    return TRUE;
-	}
+    if (event->button == 3 && event->type == GDK_BUTTON_PRESS) {
+        if (active_calltree == current_calls) {
+            show_popup_menu (widget,  event);
+            return TRUE;
+        } else if (active_calltree == history) {
+            show_popup_menu_history (widget,  event);
+            return TRUE;
+        } else {
+            show_popup_menu_contacts (widget, event);
+            return TRUE;
+        }
     }
+
     return FALSE;
 }
 
 
-gchar* 
-calltree_display_call_info(callable_obj_t * c, CallDisplayType display_type, gchar *audio_codec, gchar** display_info)
+gchar*
+calltree_display_call_info (callable_obj_t * c, CallDisplayType display_type, gchar *audio_codec, gchar** display_info)
 {
 
     gchar * description;
@@ -349,150 +351,147 @@ calltree_display_call_info(callable_obj_t * c, CallDisplayType display_type, gch
 
     gchar * peer_number = c->_peer_number;
     gchar * hostname = NULL;
-    gchar * display_number = "";  
+    gchar * display_number = "";
 
-    DEBUG("CallTree: Display call info");
+    DEBUG ("CallTree: Display call info");
 
     // If call is outgoing, keep the hostname, strip it elsewhere
-    if(c->_type == CALL && c->_history_state == OUTGOING) {
+    if (c->_type == CALL && c->_history_state == OUTGOING) {
 
-        display_number = peer_number; 
-    }
-    else {
+        display_number = peer_number;
+    } else {
 
         // Get the hostname for this call (NULL if not existent)
-        hostname = g_strrstr(peer_number, "@");
-
-	// Test if we are dialing a new number
-	if(g_strcmp0("", c->_peer_number) != 0) {
-
-	    // Strip the hostname if existent
-	    if(hostname) {
-	        display_number = g_strndup(peer_number, hostname - peer_number);
-	    }
-	    else {
-	        display_number = peer_number;
-	    }
-	}
-	else {
-
-	    display_number = peer_number;
-	}
+        hostname = g_strrstr (peer_number, "@");
+
+        // Test if we are dialing a new number
+        if (g_strcmp0 ("", c->_peer_number) != 0) {
+
+            // Strip the hostname if existent
+            if (hostname) {
+                display_number = g_strndup (peer_number, hostname - peer_number);
+            } else {
+                display_number = peer_number;
+            }
+        } else {
+
+            display_number = peer_number;
+        }
     }
+
     // Different display depending on type
-    switch(display_type) {
-
-    case DISPLAY_TYPE_CALL:
-
-        DEBUG("CallTree: Display a normal call");
-        if(c->_state_code == 0) {
-
-	    if(g_strcmp0("", c->_peer_name) == 0) {
-	        description = g_markup_printf_escaped("<b>%s</b><i>%s</i>",
-						      display_number, c->_peer_name);
-	    }
-	    else {
-	        description = g_markup_printf_escaped("<b>%s</b>   <i>%s</i>",
-						      c->_peer_name, display_number);
-	    }
-
-	}
-	else {
-	    if(g_strcmp0("", c->_peer_name) == 0) {
-	        description = g_markup_printf_escaped("<b>%s</b><i>%s</i>\n<i>%s (%d)</i>",
-						      display_number, c->_peer_name,
-						      c->_state_code_description, c->_state_code);
-	    }
-	    else {
-	        description = g_markup_printf_escaped("<b>%s</b>   <i>%s</i>\n<i>%s (%d)</i>",
-						      c->_peer_name, display_number,
-						      c->_state_code_description, c->_state_code);
-	    }
-	}
-	break;
-
-
-    case DISPLAY_TYPE_CALL_TRANSFER: 
-
-        DEBUG("CallTree: Display a call transfer")
-
-        if(g_strcmp0("",c->_peer_name) == 0){
-	    description = g_markup_printf_escaped("<b>%s</b><i>%s</i>\n<i>Transfert to:%s</i> ",
-						  display_number, c->_peer_name, c->_trsft_to);
-	}
-	else {
-	    description = g_markup_printf_escaped("<b>%s</b>   <i>%s</i>\n<i>Transfert to:%s</i> ",
-						  c->_peer_name, display_number, c->_trsft_to);
-	}	
-	break;
-
-
-    case DISPLAY_TYPE_STATE_CODE : 
-
-        DEBUG("CallTree: Display a state code");
-
-        if(g_strcmp0("",c->_peer_name) == 0){
-
-	    if (c->_state_code) {
-
-	        description = g_markup_printf_escaped("<b>%s</b><i>%s</i>\n<i>%s (%d)</i>  <i>%s</i>",
-						      display_number, c->_peer_name,
-						      c->_state_code_description, c->_state_code,
-						      audio_codec);
-	    } else {
-	        description = g_markup_printf_escaped("<b>%s</b><i>%s</i>\n<i>%s</i>",
-						      display_number, c->_peer_name, audio_codec);
-	    }
-	}
-	else {
-	    if (c->_state_code) {
-	        description = g_markup_printf_escaped("<b>%s</b>   <i>%s</i>\n<i>%s (%d)</i>  <i>%s</i>",
-						      c->_peer_name, display_number, 
-						      c->_state_code_description, c->_state_code,
-						      audio_codec);
-	    } else {
-	        description = g_markup_printf_escaped("<b>%s</b>   <i>%s</i>\n<i>%s</i>",
-						      c->_peer_name, display_number, audio_codec);
-	    }
-	}
-	break;
-
-    case DISPLAY_TYPE_SAS:
-
-        DEBUG("CallTree: Display a call with sas");
-
-        if(g_strcmp0("", c->_peer_name) == 0){
-	    description = g_markup_printf_escaped("<b>%s</b><i>%s</i>\n<i>Confirm SAS <b>%s</b> ?</i> ",
-						  display_number, c->_peer_name, c->_sas);
-	}
-	else {
-	  description = g_markup_printf_escaped("<b>%s</b>   <i>%s</i>\n<i>Confirm SAS <b>%s</b> ?</i> ",
-						c->_peer_name, display_number, c->_sas);
-	}
-	break;
-
-    case DISPLAY_TYPE_HISTORY :
-
-        DEBUG("CallTree: Display history entry");
-
-        if(g_strcmp0("", c->_peer_name) == 0) {
-	    description = g_markup_printf_escaped("<b>%s</b><i>%s</i>",
-						  display_number, c->_peer_name);
-	}
-	else {
-	  description = g_markup_printf_escaped("<b>%s</b>   <i>%s</i>",
-						c->_peer_name, display_number);
-	}
-	break;
-
-    default : 
-        DEBUG("CallTree: Not an allowable type of display");
-	break;
+    switch (display_type) {
+
+        case DISPLAY_TYPE_CALL:
+
+            DEBUG ("CallTree: Display a normal call");
+
+            if (c->_state_code == 0) {
+
+                if (g_strcmp0 ("", c->_peer_name) == 0) {
+                    description = g_markup_printf_escaped ("<b>%s</b><i>%s</i>",
+                                                           display_number, c->_peer_name);
+                } else {
+                    description = g_markup_printf_escaped ("<b>%s</b>   <i>%s</i>",
+                                                           c->_peer_name, display_number);
+                }
+
+            } else {
+                if (g_strcmp0 ("", c->_peer_name) == 0) {
+                    description = g_markup_printf_escaped ("<b>%s</b><i>%s</i>\n<i>%s (%d)</i>",
+                                                           display_number, c->_peer_name,
+                                                           c->_state_code_description, c->_state_code);
+                } else {
+                    description = g_markup_printf_escaped ("<b>%s</b>   <i>%s</i>\n<i>%s (%d)</i>",
+                                                           c->_peer_name, display_number,
+                                                           c->_state_code_description, c->_state_code);
+                }
+            }
+
+            break;
+
+
+        case DISPLAY_TYPE_CALL_TRANSFER:
+
+            DEBUG ("CallTree: Display a call transfer")
+
+            if (g_strcmp0 ("",c->_peer_name) == 0) {
+                description = g_markup_printf_escaped ("<b>%s</b><i>%s</i>\n<i>Transfert to:%s</i> ",
+                                                       display_number, c->_peer_name, c->_trsft_to);
+            } else {
+                description = g_markup_printf_escaped ("<b>%s</b>   <i>%s</i>\n<i>Transfert to:%s</i> ",
+                                                       c->_peer_name, display_number, c->_trsft_to);
+            }
+
+            break;
+
+
+        case DISPLAY_TYPE_STATE_CODE :
+
+            DEBUG ("CallTree: Display a state code");
+
+            if (g_strcmp0 ("",c->_peer_name) == 0) {
+
+                if (c->_state_code) {
+
+                    description = g_markup_printf_escaped ("<b>%s</b><i>%s</i>\n<i>%s (%d)</i>  <i>%s</i>",
+                                                           display_number, c->_peer_name,
+                                                           c->_state_code_description, c->_state_code,
+                                                           audio_codec);
+                } else {
+                    description = g_markup_printf_escaped ("<b>%s</b><i>%s</i>\n<i>%s</i>",
+                                                           display_number, c->_peer_name, audio_codec);
+                }
+            } else {
+                if (c->_state_code) {
+                    description = g_markup_printf_escaped ("<b>%s</b>   <i>%s</i>\n<i>%s (%d)</i>  <i>%s</i>",
+                                                           c->_peer_name, display_number,
+                                                           c->_state_code_description, c->_state_code,
+                                                           audio_codec);
+                } else {
+                    description = g_markup_printf_escaped ("<b>%s</b>   <i>%s</i>\n<i>%s</i>",
+                                                           c->_peer_name, display_number, audio_codec);
+                }
+            }
+
+            break;
+
+        case DISPLAY_TYPE_SAS:
+
+            DEBUG ("CallTree: Display a call with sas");
+
+            if (g_strcmp0 ("", c->_peer_name) == 0) {
+                description = g_markup_printf_escaped ("<b>%s</b><i>%s</i>\n<i>Confirm SAS <b>%s</b> ?</i> ",
+                                                       display_number, c->_peer_name, c->_sas);
+            } else {
+                description = g_markup_printf_escaped ("<b>%s</b>   <i>%s</i>\n<i>Confirm SAS <b>%s</b> ?</i> ",
+                                                       c->_peer_name, display_number, c->_sas);
+            }
+
+            break;
+
+        case DISPLAY_TYPE_HISTORY :
+
+            DEBUG ("CallTree: Display history entry");
+
+            if (g_strcmp0 ("", c->_peer_name) == 0) {
+                description = g_markup_printf_escaped ("<b>%s</b><i>%s</i>",
+                                                       display_number, c->_peer_name);
+            } else {
+                description = g_markup_printf_escaped ("<b>%s</b>   <i>%s</i>",
+                                                       c->_peer_name, display_number);
+            }
+
+            break;
+
+        default :
+            DEBUG ("CallTree: Not an allowable type of display");
+            break;
 
     }
 
     // return description;
-    tmp_info = g_strdup(description);
+    tmp_info = g_strdup (description);
     *display_info = tmp_info;
 }
 
@@ -501,191 +500,193 @@ calltree_display_call_info(callable_obj_t * c, CallDisplayType display_type, gch
 /**
  * Reset call tree
  */
-	void
+void
 calltree_reset (calltab_t* tab)
 {
-	gtk_tree_store_clear (tab->store);
+    gtk_tree_store_clear (tab->store);
 }
 
 void
-focus_on_calltree_out(){
-	//DEBUG("set_focus_on_calltree_out");
-	// gtk_widget_grab_focus(GTK_WIDGET(sw));
-	focus_is_on_calltree = FALSE;
+focus_on_calltree_out()
+{
+    //DEBUG("set_focus_on_calltree_out");
+    // gtk_widget_grab_focus(GTK_WIDGET(sw));
+    focus_is_on_calltree = FALSE;
 }
 
 void
-focus_on_calltree_in(){
-	//DEBUG("set_focus_on_calltree_in");
-	// gtk_widget_grab_focus(GTK_WIDGET(sw));
-	focus_is_on_calltree = TRUE;
+focus_on_calltree_in()
+{
+    //DEBUG("set_focus_on_calltree_in");
+    // gtk_widget_grab_focus(GTK_WIDGET(sw));
+    focus_is_on_calltree = TRUE;
 }
 
-	void
+void
 calltree_create (calltab_t* tab, gboolean searchbar_type)
 {
 
-	tab->tree = gtk_vbox_new(FALSE, 10);
+    tab->tree = gtk_vbox_new (FALSE, 10);
 
-	// Fix bug #708 (resize)
-	gtk_widget_set_size_request(tab->tree,100,80);
+    // Fix bug #708 (resize)
+    gtk_widget_set_size_request (tab->tree,100,80);
 
-	gtk_container_set_border_width (GTK_CONTAINER (tab->tree), 0);
+    gtk_container_set_border_width (GTK_CONTAINER (tab->tree), 0);
 
-	sw = gtk_scrolled_window_new( NULL, NULL);
-	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
-	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
+    sw = gtk_scrolled_window_new (NULL, NULL);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+    gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
 
 
-	tab->store = gtk_tree_store_new (4,
-			GDK_TYPE_PIXBUF,// Icon
-			G_TYPE_STRING,  // Description
-			GDK_TYPE_PIXBUF, // Security Icon
-			G_TYPE_POINTER  // Pointer to the Object
-			);
+    tab->store = gtk_tree_store_new (4,
+                                     GDK_TYPE_PIXBUF,// Icon
+                                     G_TYPE_STRING,  // Description
+                                     GDK_TYPE_PIXBUF, // Security Icon
+                                     G_TYPE_POINTER  // Pointer to the Object
+                                    );
 
-	tab->view = gtk_tree_view_new_with_model (GTK_TREE_MODEL(tab->store));
-	gtk_tree_view_set_enable_search( GTK_TREE_VIEW(tab->view), FALSE);
-	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(tab->view), FALSE);
-	g_signal_connect (G_OBJECT (tab->view), "row-activated",
-			G_CALLBACK (row_activated),
-			NULL);
+    tab->view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (tab->store));
+    gtk_tree_view_set_enable_search (GTK_TREE_VIEW (tab->view), FALSE);
+    gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tab->view), FALSE);
+    g_signal_connect (G_OBJECT (tab->view), "row-activated",
+                      G_CALLBACK (row_activated),
+                      NULL);
 
-	GTK_WIDGET_SET_FLAGS (GTK_WIDGET(sw),GTK_CAN_FOCUS);
-	gtk_widget_grab_focus (GTK_WIDGET(sw));
+    GTK_WIDGET_SET_FLAGS (GTK_WIDGET (sw),GTK_CAN_FOCUS);
+    gtk_widget_grab_focus (GTK_WIDGET (sw));
 
-	g_signal_connect (G_OBJECT (tab->view), "cursor-changed",
-			G_CALLBACK (row_single_click),
-			NULL);
+    g_signal_connect (G_OBJECT (tab->view), "cursor-changed",
+                      G_CALLBACK (row_single_click),
+                      NULL);
 
-	// Connect the popup menu
-	g_signal_connect (G_OBJECT (tab->view), "popup-menu",
-			G_CALLBACK (popup_menu),
-			NULL);
-	g_signal_connect (G_OBJECT (tab->view), "button-press-event",
-			G_CALLBACK (button_pressed),
-			NULL);
+    // Connect the popup menu
+    g_signal_connect (G_OBJECT (tab->view), "popup-menu",
+                      G_CALLBACK (popup_menu),
+                      NULL);
+    g_signal_connect (G_OBJECT (tab->view), "button-press-event",
+                      G_CALLBACK (button_pressed),
+                      NULL);
 
-	// g_signal_connect (G_OBJECT (sw), "key-release-event",
-	//                   G_CALLBACK (on_key_released), NULL);
+    // g_signal_connect (G_OBJECT (sw), "key-release-event",
+    //                   G_CALLBACK (on_key_released), NULL);
 
-	g_signal_connect_after (G_OBJECT (tab->view), "focus-in-event",
-			G_CALLBACK (focus_on_calltree_in), NULL);
-	g_signal_connect_after (G_OBJECT (tab->view), "focus-out-event",
-			G_CALLBACK (focus_on_calltree_out), NULL);
+    g_signal_connect_after (G_OBJECT (tab->view), "focus-in-event",
+                            G_CALLBACK (focus_on_calltree_in), NULL);
+    g_signal_connect_after (G_OBJECT (tab->view), "focus-out-event",
+                            G_CALLBACK (focus_on_calltree_out), NULL);
 
 
-	if(tab != history && tab!=contacts) {
+    if (tab != history && tab!=contacts) {
 
-		DEBUG("SET TREE VIEW REORDABLE");
-		// Make calltree reordable for drag n drop
-		gtk_tree_view_set_reorderable(GTK_TREE_VIEW(tab->view), TRUE); 
+        DEBUG ("SET TREE VIEW REORDABLE");
+        // Make calltree reordable for drag n drop
+        gtk_tree_view_set_reorderable (GTK_TREE_VIEW (tab->view), TRUE);
 
-		// source widget drag n drop signals
-		g_signal_connect (G_OBJECT (tab->view), "drag_begin", G_CALLBACK (drag_begin_cb), NULL);
-		g_signal_connect (G_OBJECT (tab->view), "drag_end", G_CALLBACK (drag_end_cb), NULL);
+        // source widget drag n drop signals
+        g_signal_connect (G_OBJECT (tab->view), "drag_begin", G_CALLBACK (drag_begin_cb), NULL);
+        g_signal_connect (G_OBJECT (tab->view), "drag_end", G_CALLBACK (drag_end_cb), NULL);
 
-		// destination widget drag n drop signals
-		g_signal_connect (G_OBJECT (tab->view), "drag_data_received", G_CALLBACK (drag_data_received_cb), NULL);
+        // destination widget drag n drop signals
+        g_signal_connect (G_OBJECT (tab->view), "drag_data_received", G_CALLBACK (drag_data_received_cb), NULL);
 
-	}
+    }
 
 
-	gtk_widget_grab_focus(GTK_WIDGET(tab->view));
+    gtk_widget_grab_focus (GTK_WIDGET (tab->view));
+
+    rend = gtk_cell_renderer_pixbuf_new();
+    col = gtk_tree_view_column_new_with_attributes ("Icon",
+            rend,
+            "pixbuf", 0,
+            NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (tab->view), col);
+
+    rend = gtk_cell_renderer_text_new();
+    col = gtk_tree_view_column_new_with_attributes ("Description",
+            rend,
+            "markup", COLUMN_ACCOUNT_DESC,
+            NULL);
+    g_object_set (rend, "wrap-mode", (PangoWrapMode) PANGO_WRAP_WORD_CHAR, NULL);
+    g_object_set (rend, "wrap-width", (gint) CALLTREE_TEXT_WIDTH, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (tab->view), col);
+
+    /* Security icon */
+    rend = gtk_cell_renderer_pixbuf_new();
+    col = gtk_tree_view_column_new_with_attributes ("Icon",
+            rend,
+            "pixbuf", COLUMN_ACCOUNT_SECURITY,
+            NULL);
+    g_object_set (rend, "xalign", (gfloat) 1.0, NULL);
+    g_object_set (rend, "yalign", (gfloat) 0.0, NULL);
+    gtk_tree_view_append_column (GTK_TREE_VIEW (tab->view), col);
+
+
+    g_object_unref (G_OBJECT (tab->store));
+    gtk_container_add (GTK_CONTAINER (sw), tab->view);
+
+    sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (tab->view));
+    g_signal_connect (G_OBJECT (sel), "changed",
+                      G_CALLBACK (call_selected_cb),
+                      NULL);
+
+    gtk_box_pack_start (GTK_BOX (tab->tree), sw, TRUE, TRUE, 0);
+
+    // search bar if tab is either "history" or "addressbook"
+    if (searchbar_type) {
+        calltab_create_searchbar (tab);
+        gtk_box_pack_start (GTK_BOX (tab->tree), tab->searchbar, FALSE, TRUE, 0);
+    }
 
-	rend = gtk_cell_renderer_pixbuf_new();
-	col = gtk_tree_view_column_new_with_attributes ("Icon",
-			rend,
-			"pixbuf", 0,
-			NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(tab->view), col);
+    gtk_widget_show (tab->tree);
+}
 
-	rend = gtk_cell_renderer_text_new();
-	col = gtk_tree_view_column_new_with_attributes ("Description",
-			rend,
-			"markup", COLUMN_ACCOUNT_DESC,
-			NULL);
-	g_object_set(rend, "wrap-mode", (PangoWrapMode) PANGO_WRAP_WORD_CHAR, NULL);
-	g_object_set(rend, "wrap-width", (gint) CALLTREE_TEXT_WIDTH, NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(tab->view), col);
 
-	/* Security icon */
-	rend = gtk_cell_renderer_pixbuf_new();
-	col = gtk_tree_view_column_new_with_attributes ("Icon",
-			rend,
-			"pixbuf", COLUMN_ACCOUNT_SECURITY,
-			NULL);
-	g_object_set(rend, "xalign", (gfloat) 1.0, NULL);
-	g_object_set(rend, "yalign", (gfloat) 0.0, NULL);
-	gtk_tree_view_append_column (GTK_TREE_VIEW(tab->view), col);
+void
+calltree_remove_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
+{
 
+    GtkTreeIter iter;
+    GValue val;
+    callable_obj_t * iterCall;
+    GtkTreeStore* store = tab->store;
 
-	g_object_unref(G_OBJECT(tab->store));
-	gtk_container_add(GTK_CONTAINER(sw), tab->view);
+    if (!c)
+        ERROR ("CallTree: Error: Not a valid call");
 
-	sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (tab->view));
-	g_signal_connect (G_OBJECT (sel), "changed",
-			G_CALLBACK (call_selected_cb),
-			NULL);
+    DEBUG ("CallTree: Remove call %s", c->_callID);
 
-	gtk_box_pack_start(GTK_BOX(tab->tree), sw, TRUE, TRUE, 0);
+    int nbChild = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store), parent);
+    int i;
 
-	// search bar if tab is either "history" or "addressbook"
-	if(searchbar_type){
-		calltab_create_searchbar (tab);
-		gtk_box_pack_start(GTK_BOX(tab->tree), tab->searchbar, FALSE, TRUE, 0);
-	}
+    for (i = 0; i < nbChild; i++) {
+        if (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter, parent, i)) {
+            if (gtk_tree_model_iter_has_child (GTK_TREE_MODEL (store), &iter)) {
+                calltree_remove_call (tab, c, &iter);
+            }
 
-	gtk_widget_show(tab->tree);
-}
+            val.g_type = 0;
+            gtk_tree_model_get_value (GTK_TREE_MODEL (store), &iter, COLUMN_ACCOUNT_PTR, &val);
 
+            iterCall = (callable_obj_t*) g_value_get_pointer (&val);
+            g_value_unset (&val);
 
-	void
-calltree_remove_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
-{
+            if (iterCall == c) {
+                gtk_tree_store_remove (store, &iter);
+            }
+        }
+    }
 
-	GtkTreeIter iter;
-	GValue val;
-	callable_obj_t * iterCall;
-	GtkTreeStore* store = tab->store;
-
-	if(!c)
-	  ERROR("CallTree: Error: Not a valid call");
-
-	DEBUG("CallTree: Remove call %s", c->_callID);
-
-	int nbChild = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), parent);
-	int i;
-	for( i = 0; i < nbChild; i++)
-	{
-		if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, parent, i))
-		{
-			if(gtk_tree_model_iter_has_child(GTK_TREE_MODEL(store), &iter))
-			{
-				calltree_remove_call (tab, c, &iter);
-			}
-
-			val.g_type = 0;
-			gtk_tree_model_get_value (GTK_TREE_MODEL(store), &iter, COLUMN_ACCOUNT_PTR, &val);
-
-			iterCall = (callable_obj_t*) g_value_get_pointer(&val);
-			g_value_unset(&val);
-
-			if(iterCall == c)
-			{
-				gtk_tree_store_remove(store, &iter);
-			}
-		}
-	}
-	callable_obj_t * selectedCall = calltab_get_selected_call(tab);
-	if(selectedCall == c)
-		calltab_select_call(tab, NULL);
-	update_actions();
-
-	DEBUG("Calltre remove call ended");
+    callable_obj_t * selectedCall = calltab_get_selected_call (tab);
+
+    if (selectedCall == c)
+        calltab_select_call (tab, NULL);
+
+    update_actions();
+
+    DEBUG ("Calltre remove call ended");
 }
 
-	void
+void
 calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
 {
     GdkPixbuf *pixbuf=NULL;
@@ -701,165 +702,177 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
     account_t* account_details=NULL;
     gchar *audio_codec = "";
 
-    int nbChild = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), parent);
+    int nbChild = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store), parent);
     int i;
 
-    if(c != NULL) {
-        account_details = account_list_get_by_id(c->_accountID);
-	if(account_details != NULL) {
-	    srtp_enabled = g_hash_table_lookup(account_details->properties, ACCOUNT_SRTP_ENABLED);
-	    if(g_strcasecmp(g_hash_table_lookup(account_details->properties, ACCOUNT_ZRTP_DISPLAY_SAS),"false") == 0) 
-	      { display_sas = FALSE; }
-	} else {
-	    GHashTable * properties = NULL;
-	    sflphone_get_ip2ip_properties (&properties);
-	    if(properties != NULL) {
-	        srtp_enabled = g_hash_table_lookup(properties, ACCOUNT_SRTP_ENABLED);
-	        if(g_strcasecmp(g_hash_table_lookup(properties, ACCOUNT_ZRTP_DISPLAY_SAS),"false") == 0) 
-		  { display_sas = FALSE; }
-	    }
-	}
-    } 
-
-    for( i = 0; i < nbChild; i++) {
-
-        if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, parent, i)) {
-
-	    if(gtk_tree_model_iter_has_child(GTK_TREE_MODEL(store), &iter)) {
-	      calltree_update_call (tab, c, &iter);
-	    }
-
-	    val.g_type = 0;
-	    gtk_tree_model_get_value (GTK_TREE_MODEL(store), &iter, COLUMN_ACCOUNT_PTR, &val);
-
-	
-	    iterCall = (callable_obj_t*) g_value_get_pointer(&val);
-	    g_value_unset(&val);
-	
-	    if(iterCall != c) {
-	        continue;
-	    }
-
-	    /* Update text */
-	    gchar * description;
-	    gchar * date="";
-	    gchar * duration="";
-	    audio_codec = call_get_audio_codec (c);
-	
-	    if(c->_state == CALL_STATE_TRANSFERT) {
-
-	        calltree_display_call_info(c, DISPLAY_TYPE_CALL_TRANSFER, NULL, &description);
-			    
-	    }
-	    else {
-
-	        if((c->_sas != NULL) && (display_sas == TRUE) && (c->_srtp_state == SRTP_STATE_ZRTP_SAS_UNCONFIRMED) && (c->_zrtp_confirmed == FALSE)) {
-		    calltree_display_call_info(c, DISPLAY_TYPE_SAS, NULL, &description);
-		} else {
-		    calltree_display_call_info(c, DISPLAY_TYPE_STATE_CODE, audio_codec, &description);		    
-		}
-	    }
-
-	    /* Update icons */
-	    if( tab == current_calls ) {
-	        DEBUG("Receiving in state %d", c->_state);
-		switch(c->_state) {
-		case CALL_STATE_HOLD:
-		    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/hold.svg", NULL);
-		    break;
-		case CALL_STATE_INCOMING:
-		case CALL_STATE_RINGING:
-		    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/ring.svg", NULL);
-		    break;
-		case CALL_STATE_CURRENT:
-		    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/current.svg", NULL);
-		    break;
-		case CALL_STATE_DIALING:
-      	            pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/dial.svg", NULL);
-		    break;
-		case CALL_STATE_FAILURE:
-		    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/fail.svg", NULL);
-		    break;
-		case CALL_STATE_BUSY:
-	            pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/busy.svg", NULL);
-		    break;
-		case CALL_STATE_TRANSFERT:
-	            pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/transfert.svg", NULL);
-		    break;
-		case CALL_STATE_RECORD:
-	            pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/icon_rec.svg", NULL);
-		    break;
-		default:
-		    WARN("Update calltree - Should not happen!");
-		}        
-
-		switch(c->_srtp_state) {
-		case SRTP_STATE_SDES_SUCCESS:
-		    DEBUG("SDES negotiation succes");
-		    pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_confirmed.svg", NULL); 
-		    break;
-		case SRTP_STATE_ZRTP_SAS_UNCONFIRMED:
-	            DEBUG("Secure is ON");
-		    pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_unconfirmed.svg", NULL);
-		    if(c->_sas != NULL) { DEBUG("SAS is ready with value %s", c->_sas); }
-		    break;
-		case SRTP_STATE_ZRTP_SAS_CONFIRMED:
-		    DEBUG("SAS is confirmed");
-		    pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_confirmed.svg", NULL);   
-		    break;
-		case SRTP_STATE_ZRTP_SAS_SIGNED:   
-		    DEBUG("Secure is ON with SAS signed and verified");
-		    pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_certified.svg", NULL);
-		    break;
-		case SRTP_STATE_UNLOCKED:  
-		    DEBUG("Secure is off calltree %d", c->_state);
-		    if(g_strcasecmp(srtp_enabled,"true") == 0) {
-		        pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_off.svg", NULL); 
-		    }
-		    break;
-		default:
-		    WARN("Update calltree srtp state #%d- Should not happen!", c->_srtp_state); 
-		    if(g_strcasecmp(srtp_enabled,"true") == 0) {
-		        pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_off.svg", NULL);    
-		    }
-
-		}
-	
-	    }
-	    else if(tab == history) {
-	        switch(c->_history_state) {
-		case INCOMING:
-		    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/incoming.svg", NULL);
-		    break;
-		case OUTGOING:
-		    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/outgoing.svg", NULL);
-		    break;
-		case MISSED:
-		    pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/missed.svg", NULL);
-		    break;
-		default:
-		    WARN("History - Should not happen!");
-		}
-
-		calltree_display_call_info(c, DISPLAY_TYPE_HISTORY, NULL, &description);
-
-		date = get_formatted_start_timestamp (c);
-		duration = get_call_duration (c);
-		duration = g_strconcat( date , duration , NULL);
-		description = g_strconcat( description , duration, NULL);
-	    }
-
-	    gtk_tree_store_set(store, &iter,
-			   0, pixbuf, // Icon
-			   1, description, // Description
-			   2, pixbuf_security,
-			   3, c,
-			   -1);
-
-	    if (pixbuf != NULL)
-	        g_object_unref(G_OBJECT(pixbuf));
-	}
-      
+    if (c != NULL) {
+        account_details = account_list_get_by_id (c->_accountID);
+
+        if (account_details != NULL) {
+            srtp_enabled = g_hash_table_lookup (account_details->properties, ACCOUNT_SRTP_ENABLED);
+
+            if (g_strcasecmp (g_hash_table_lookup (account_details->properties, ACCOUNT_ZRTP_DISPLAY_SAS),"false") == 0) {
+                display_sas = FALSE;
+            }
+        } else {
+            GHashTable * properties = NULL;
+            sflphone_get_ip2ip_properties (&properties);
+
+            if (properties != NULL) {
+                srtp_enabled = g_hash_table_lookup (properties, ACCOUNT_SRTP_ENABLED);
+
+                if (g_strcasecmp (g_hash_table_lookup (properties, ACCOUNT_ZRTP_DISPLAY_SAS),"false") == 0) {
+                    display_sas = FALSE;
+                }
+            }
+        }
+    }
+
+    for (i = 0; i < nbChild; i++) {
+
+        if (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter, parent, i)) {
+
+            if (gtk_tree_model_iter_has_child (GTK_TREE_MODEL (store), &iter)) {
+                calltree_update_call (tab, c, &iter);
+            }
+
+            val.g_type = 0;
+            gtk_tree_model_get_value (GTK_TREE_MODEL (store), &iter, COLUMN_ACCOUNT_PTR, &val);
+
+
+            iterCall = (callable_obj_t*) g_value_get_pointer (&val);
+            g_value_unset (&val);
+
+            if (iterCall != c) {
+                continue;
+            }
+
+            /* Update text */
+            gchar * description;
+            gchar * date="";
+            gchar * duration="";
+            audio_codec = call_get_audio_codec (c);
+
+            if (c->_state == CALL_STATE_TRANSFERT) {
+
+                calltree_display_call_info (c, DISPLAY_TYPE_CALL_TRANSFER, NULL, &description);
+
+            } else {
+
+                if ( (c->_sas != NULL) && (display_sas == TRUE) && (c->_srtp_state == SRTP_STATE_ZRTP_SAS_UNCONFIRMED) && (c->_zrtp_confirmed == FALSE)) {
+                    calltree_display_call_info (c, DISPLAY_TYPE_SAS, NULL, &description);
+                } else {
+                    calltree_display_call_info (c, DISPLAY_TYPE_STATE_CODE, audio_codec, &description);
+                }
+            }
+
+            /* Update icons */
+            if (tab == current_calls) {
+                DEBUG ("Receiving in state %d", c->_state);
+
+                switch (c->_state) {
+                    case CALL_STATE_HOLD:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/hold.svg", NULL);
+                        break;
+                    case CALL_STATE_INCOMING:
+                    case CALL_STATE_RINGING:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/ring.svg", NULL);
+                        break;
+                    case CALL_STATE_CURRENT:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/current.svg", NULL);
+                        break;
+                    case CALL_STATE_DIALING:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/dial.svg", NULL);
+                        break;
+                    case CALL_STATE_FAILURE:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/fail.svg", NULL);
+                        break;
+                    case CALL_STATE_BUSY:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/busy.svg", NULL);
+                        break;
+                    case CALL_STATE_TRANSFERT:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/transfert.svg", NULL);
+                        break;
+                    case CALL_STATE_RECORD:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/icon_rec.svg", NULL);
+                        break;
+                    default:
+                        WARN ("Update calltree - Should not happen!");
+                }
+
+                switch (c->_srtp_state) {
+                    case SRTP_STATE_SDES_SUCCESS:
+                        DEBUG ("SDES negotiation succes");
+                        pixbuf_security = gdk_pixbuf_new_from_file (ICONS_DIR "/lock_confirmed.svg", NULL);
+                        break;
+                    case SRTP_STATE_ZRTP_SAS_UNCONFIRMED:
+                        DEBUG ("Secure is ON");
+                        pixbuf_security = gdk_pixbuf_new_from_file (ICONS_DIR "/lock_unconfirmed.svg", NULL);
+
+                        if (c->_sas != NULL) {
+                            DEBUG ("SAS is ready with value %s", c->_sas);
+                        }
+
+                        break;
+                    case SRTP_STATE_ZRTP_SAS_CONFIRMED:
+                        DEBUG ("SAS is confirmed");
+                        pixbuf_security = gdk_pixbuf_new_from_file (ICONS_DIR "/lock_confirmed.svg", NULL);
+                        break;
+                    case SRTP_STATE_ZRTP_SAS_SIGNED:
+                        DEBUG ("Secure is ON with SAS signed and verified");
+                        pixbuf_security = gdk_pixbuf_new_from_file (ICONS_DIR "/lock_certified.svg", NULL);
+                        break;
+                    case SRTP_STATE_UNLOCKED:
+                        DEBUG ("Secure is off calltree %d", c->_state);
+
+                        if (g_strcasecmp (srtp_enabled,"true") == 0) {
+                            pixbuf_security = gdk_pixbuf_new_from_file (ICONS_DIR "/lock_off.svg", NULL);
+                        }
+
+                        break;
+                    default:
+                        WARN ("Update calltree srtp state #%d- Should not happen!", c->_srtp_state);
+
+                        if (g_strcasecmp (srtp_enabled,"true") == 0) {
+                            pixbuf_security = gdk_pixbuf_new_from_file (ICONS_DIR "/lock_off.svg", NULL);
+                        }
+
+                }
+
+            } else if (tab == history) {
+                switch (c->_history_state) {
+                    case INCOMING:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/incoming.svg", NULL);
+                        break;
+                    case OUTGOING:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/outgoing.svg", NULL);
+                        break;
+                    case MISSED:
+                        pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/missed.svg", NULL);
+                        break;
+                    default:
+                        WARN ("History - Should not happen!");
+                }
+
+                calltree_display_call_info (c, DISPLAY_TYPE_HISTORY, NULL, &description);
+
+                date = get_formatted_start_timestamp (c);
+                duration = get_call_duration (c);
+                duration = g_strconcat (date , duration , NULL);
+                description = g_strconcat (description , duration, NULL);
+            }
+
+            gtk_tree_store_set (store, &iter,
+                                0, pixbuf, // Icon
+                                1, description, // Description
+                                2, pixbuf_security,
+                                3, c,
+                                -1);
+
+            if (pixbuf != NULL)
+                g_object_unref (G_OBJECT (pixbuf));
+        }
+
     }
 
     update_actions();
@@ -869,191 +882,186 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
 void calltree_add_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
 {
 
-        DEBUG("CallTree: Add call to calltree id: %s, peer name: %s", c->_callID, c->_peer_name);
-
-	if (tab == history)
-	{
-		calltree_add_history_entry (c);
-		return;
-	}
-
-	account_t* account_details=NULL;
-
-	GdkPixbuf *pixbuf=NULL;
-	GdkPixbuf *pixbuf_security=NULL;
-	GtkTreeIter iter;
-	gchar* key_exchange="";
-	gchar* srtp_enabled="";
-
-	// New call in the list
-	gchar * description;
-	gchar * date="";
-	gchar *duration="";
-
-	calltree_display_call_info(c, DISPLAY_TYPE_CALL, NULL, &description);
-
-	gtk_tree_store_prepend (tab->store, &iter, parent);
-
-	if(c != NULL) {
-		account_details = account_list_get_by_id(c->_callID);
-		if(account_details != NULL) {
-			srtp_enabled = g_hash_table_lookup(account_details->properties, ACCOUNT_SRTP_ENABLED);
-			key_exchange = g_hash_table_lookup(account_details->properties, ACCOUNT_KEY_EXCHANGE);
-		}
-	} 
-
-	DEBUG("Added call key exchange is %s", key_exchange)
-
-	if( tab == current_calls )
-	{
-		switch(c->_state)
-		{
-			case CALL_STATE_INCOMING:
-				pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/ring.svg", NULL);
-				break;
-			case CALL_STATE_DIALING:
-				pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/dial.svg", NULL);
-				break;
-			case CALL_STATE_RINGING:
-				pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/ring.svg", NULL);
-				break;
-			case CALL_STATE_CURRENT:
-				// If the call has been initiated by a another client and, when we start, it is already current
-				pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/current.svg", NULL);
-				break;
-			case CALL_STATE_HOLD:
-				// If the call has been initiated by a another client and, when we start, it is already current
-				pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/hold.svg", NULL);
-				break;
-			case CALL_STATE_FAILURE:
-				// If the call has been initiated by a another client and, when we start, it is already current
-				pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/fail.svg", NULL);
-				break;
-			default:
-				WARN("Update calltree add - Should not happen!");
-		}
-
-		if(g_strcasecmp(srtp_enabled,"true") == 0) {
-			pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/secure_off.svg", NULL);
-		}
-	}
-
-	else if (tab == contacts) {
-		pixbuf = c->_contact_thumbnail;
-		description = g_strconcat( description , NULL);
-	}
-
-	else {
-		WARN ("This widget doesn't exist - This is a bug in the application.");
-	}
-
-
-	//Resize it
-	if(pixbuf)
-	{
-		if(gdk_pixbuf_get_width(pixbuf) > 32 || gdk_pixbuf_get_height(pixbuf) > 32)
-		{
-			pixbuf =  gdk_pixbuf_scale_simple(pixbuf, 32, 32, GDK_INTERP_BILINEAR);
-		}
-	}
-
-	if(pixbuf_security)
-	{
-		if(gdk_pixbuf_get_width(pixbuf_security) > 32 || gdk_pixbuf_get_height(pixbuf_security) > 32)
-		{
-			pixbuf_security =  gdk_pixbuf_scale_simple(pixbuf_security, 32, 32, GDK_INTERP_BILINEAR);
-		}
-	}
-
-	gtk_tree_store_set(tab->store, &iter,
-			0, pixbuf, // Icon
-			1, description, // Description
-			2, pixbuf_security, // Informs user about the state of security
-			3, c,      // Pointer
-			-1);
-
-	if (pixbuf != NULL)
-	{ g_object_unref(G_OBJECT(pixbuf)); }
-	if (pixbuf_security != NULL)
-	{ g_object_unref(G_OBJECT(pixbuf)); }
-
-	gtk_tree_view_set_model (GTK_TREE_VIEW(history->view), GTK_TREE_MODEL(history->store));
-
-	gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(tab->view)), &iter);
-
-	history_reinit(history);
+    DEBUG ("CallTree: Add call to calltree id: %s, peer name: %s", c->_callID, c->_peer_name);
+
+    if (tab == history) {
+        calltree_add_history_entry (c);
+        return;
+    }
+
+    account_t* account_details=NULL;
+
+    GdkPixbuf *pixbuf=NULL;
+    GdkPixbuf *pixbuf_security=NULL;
+    GtkTreeIter iter;
+    gchar* key_exchange="";
+    gchar* srtp_enabled="";
+
+    // New call in the list
+    gchar * description;
+    gchar * date="";
+    gchar *duration="";
+
+    calltree_display_call_info (c, DISPLAY_TYPE_CALL, NULL, &description);
+
+    gtk_tree_store_prepend (tab->store, &iter, parent);
+
+    if (c != NULL) {
+        account_details = account_list_get_by_id (c->_callID);
+
+        if (account_details != NULL) {
+            srtp_enabled = g_hash_table_lookup (account_details->properties, ACCOUNT_SRTP_ENABLED);
+            key_exchange = g_hash_table_lookup (account_details->properties, ACCOUNT_KEY_EXCHANGE);
+        }
+    }
+
+    DEBUG ("Added call key exchange is %s", key_exchange)
+
+    if (tab == current_calls) {
+        switch (c->_state) {
+            case CALL_STATE_INCOMING:
+                pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/ring.svg", NULL);
+                break;
+            case CALL_STATE_DIALING:
+                pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/dial.svg", NULL);
+                break;
+            case CALL_STATE_RINGING:
+                pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/ring.svg", NULL);
+                break;
+            case CALL_STATE_CURRENT:
+                // If the call has been initiated by a another client and, when we start, it is already current
+                pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/current.svg", NULL);
+                break;
+            case CALL_STATE_HOLD:
+                // If the call has been initiated by a another client and, when we start, it is already current
+                pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/hold.svg", NULL);
+                break;
+            case CALL_STATE_FAILURE:
+                // If the call has been initiated by a another client and, when we start, it is already current
+                pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/fail.svg", NULL);
+                break;
+            default:
+                WARN ("Update calltree add - Should not happen!");
+        }
+
+        if (g_strcasecmp (srtp_enabled,"true") == 0) {
+            pixbuf_security = gdk_pixbuf_new_from_file (ICONS_DIR "/secure_off.svg", NULL);
+        }
+    }
+
+    else if (tab == contacts) {
+        pixbuf = c->_contact_thumbnail;
+        description = g_strconcat (description , NULL);
+    }
+
+    else {
+        WARN ("This widget doesn't exist - This is a bug in the application.");
+    }
+
+
+    //Resize it
+    if (pixbuf) {
+        if (gdk_pixbuf_get_width (pixbuf) > 32 || gdk_pixbuf_get_height (pixbuf) > 32) {
+            pixbuf =  gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
+        }
+    }
+
+    if (pixbuf_security) {
+        if (gdk_pixbuf_get_width (pixbuf_security) > 32 || gdk_pixbuf_get_height (pixbuf_security) > 32) {
+            pixbuf_security =  gdk_pixbuf_scale_simple (pixbuf_security, 32, 32, GDK_INTERP_BILINEAR);
+        }
+    }
+
+    gtk_tree_store_set (tab->store, &iter,
+                        0, pixbuf, // Icon
+                        1, description, // Description
+                        2, pixbuf_security, // Informs user about the state of security
+                        3, c,      // Pointer
+                        -1);
+
+    if (pixbuf != NULL) {
+        g_object_unref (G_OBJECT (pixbuf));
+    }
+
+    if (pixbuf_security != NULL) {
+        g_object_unref (G_OBJECT (pixbuf));
+    }
+
+    gtk_tree_view_set_model (GTK_TREE_VIEW (history->view), GTK_TREE_MODEL (history->store));
+
+    gtk_tree_selection_select_iter (gtk_tree_view_get_selection (GTK_TREE_VIEW (tab->view)), &iter);
+
+    history_reinit (history);
 }
 
 void calltree_add_history_entry (callable_obj_t * c)
 {
 
-	DEBUG("calltree_add_history_entry %s", c->_callID);
-
-	if (!eel_gconf_get_integer (HISTORY_ENABLED))
-		return;
-
-	GdkPixbuf *pixbuf=NULL;
-	GdkPixbuf *pixbuf_security=NULL;
-	GtkTreeIter iter;
-
-	// New call in the list
-	gchar * description, *date="", *duration="";
-
-	calltree_display_call_info(c, DISPLAY_TYPE_HISTORY, NULL, &description);
-
-	gtk_tree_store_prepend (history->store, &iter, NULL);
-
-	switch(c->_history_state)
-	{
-		case INCOMING:
-			pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/incoming.svg", NULL);
-			break;
-		case OUTGOING:
-			pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/outgoing.svg", NULL);
-			break;
-		case MISSED:
-			pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/missed.svg", NULL);
-			break;
-		default:
-			WARN("History - Should not happen!");
-	}
-
-	date = get_formatted_start_timestamp (c);
-	duration = get_call_duration (c);
-	duration = g_strconcat( date , duration , NULL);
-	description = g_strconcat( description , duration, NULL);
-
-	//Resize it
-	if(pixbuf)
-	{
-		if(gdk_pixbuf_get_width(pixbuf) > 32 || gdk_pixbuf_get_height(pixbuf) > 32)
-		{
-			pixbuf =  gdk_pixbuf_scale_simple(pixbuf, 32, 32, GDK_INTERP_BILINEAR);
-		}
-	}
-
-	if(pixbuf_security != NULL)
-	{
-		if(gdk_pixbuf_get_width(pixbuf_security) > 32 || gdk_pixbuf_get_height(pixbuf_security) > 32)
-		{
-			pixbuf_security =  gdk_pixbuf_scale_simple(pixbuf_security, 32, 32, GDK_INTERP_BILINEAR);
-		}
-	}
-	gtk_tree_store_set(history->store, &iter,
-			0, pixbuf, // Icon
-			1, description, // Description
-			2, pixbuf_security, // Icon
-			3, c,      // Pointer
-			-1);
-
-	if (pixbuf != NULL)
-		g_object_unref(G_OBJECT(pixbuf));
-	if (pixbuf_security != NULL)
-	{ g_object_unref(G_OBJECT(pixbuf_security)); }
-
-	gtk_tree_view_set_model (GTK_TREE_VIEW(history->view), GTK_TREE_MODEL(history->store));
-
-	history_reinit(history);
+    DEBUG ("calltree_add_history_entry %s", c->_callID);
+
+    if (!eel_gconf_get_integer (HISTORY_ENABLED))
+        return;
+
+    GdkPixbuf *pixbuf=NULL;
+    GdkPixbuf *pixbuf_security=NULL;
+    GtkTreeIter iter;
+
+    // New call in the list
+    gchar * description, *date="", *duration="";
+
+    calltree_display_call_info (c, DISPLAY_TYPE_HISTORY, NULL, &description);
+
+    gtk_tree_store_prepend (history->store, &iter, NULL);
+
+    switch (c->_history_state) {
+        case INCOMING:
+            pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/incoming.svg", NULL);
+            break;
+        case OUTGOING:
+            pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/outgoing.svg", NULL);
+            break;
+        case MISSED:
+            pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/missed.svg", NULL);
+            break;
+        default:
+            WARN ("History - Should not happen!");
+    }
+
+    date = get_formatted_start_timestamp (c);
+    duration = get_call_duration (c);
+    duration = g_strconcat (date , duration , NULL);
+    description = g_strconcat (description , duration, NULL);
+
+    //Resize it
+    if (pixbuf) {
+        if (gdk_pixbuf_get_width (pixbuf) > 32 || gdk_pixbuf_get_height (pixbuf) > 32) {
+            pixbuf =  gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
+        }
+    }
+
+    if (pixbuf_security != NULL) {
+        if (gdk_pixbuf_get_width (pixbuf_security) > 32 || gdk_pixbuf_get_height (pixbuf_security) > 32) {
+            pixbuf_security =  gdk_pixbuf_scale_simple (pixbuf_security, 32, 32, GDK_INTERP_BILINEAR);
+        }
+    }
+
+    gtk_tree_store_set (history->store, &iter,
+                        0, pixbuf, // Icon
+                        1, description, // Description
+                        2, pixbuf_security, // Icon
+                        3, c,      // Pointer
+                        -1);
+
+    if (pixbuf != NULL)
+        g_object_unref (G_OBJECT (pixbuf));
+
+    if (pixbuf_security != NULL) {
+        g_object_unref (G_OBJECT (pixbuf_security));
+    }
+
+    gtk_tree_view_set_model (GTK_TREE_VIEW (history->view), GTK_TREE_MODEL (history->store));
+
+    history_reinit (history);
 }
 
 
@@ -1064,7 +1072,7 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf)
     GdkPixbuf *pixbuf_security=NULL;
     GtkTreeIter iter;
     GtkTreePath *path;
-    GtkTreeModel *model = (GtkTreeModel*)active_calltree->store;
+    GtkTreeModel *model = (GtkTreeModel*) active_calltree->store;
 
     // gchar** participant = dbus_get_participant_list(conf->_confID);
     // gchar** pl;
@@ -1077,191 +1085,188 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf)
     gchar* srtp_enabled="";
 
     // New call in the list
-    
+
     gchar * description;
 
 
-    if(!conf) {
-      ERROR("Calltree: Error: Conference is null!!");
-      return;
+    if (!conf) {
+        ERROR ("Calltree: Error: Conference is null!!");
+        return;
     }
 
-    DEBUG("Calltree: Add conference %s", conf->_confID);
+    DEBUG ("Calltree: Add conference %s", conf->_confID);
 
     // description = g_markup_printf_escaped("<b>%s</b>", conf->_confID);
-    description = g_markup_printf_escaped("<b>%s</b>", "");
+    description = g_markup_printf_escaped ("<b>%s</b>", "");
 
     gtk_tree_store_append (tab->store, &iter, NULL);
 
-    if( tab == current_calls )
-    {	
-
-        switch(conf->_state)
-	{
-	    case CONFERENCE_STATE_ACTIVE_ATACHED:
-	    {
-			
-	        pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/usersActive.svg", NULL);
-		break;
-	    }
-	    case CONFERENCE_STATE_ACTIVE_DETACHED:
-	    case CONFERENCE_STATE_HOLD:
-	    {
-			
-			
-	        pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/users.svg", NULL);
-		break;
-	    }
-	    default:
-	        WARN("Update conference add - Should not happen!");
-	}
-    }
-    else
-    {
-	DEBUG("Error Conference State NULL for conferece %s!!!!!", conf->_confID);
+    if (tab == current_calls) {
+
+        switch (conf->_state) {
+            case CONFERENCE_STATE_ACTIVE_ATACHED: {
+
+                pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/usersActive.svg", NULL);
+                break;
+            }
+            case CONFERENCE_STATE_ACTIVE_DETACHED:
+            case CONFERENCE_STATE_HOLD: {
+
+
+                pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/users.svg", NULL);
+                break;
+            }
+            default:
+                WARN ("Update conference add - Should not happen!");
+        }
+    } else {
+        DEBUG ("Error Conference State NULL for conferece %s!!!!!", conf->_confID);
     }
 
 
     //Resize it
-    if(pixbuf) {
-	if(gdk_pixbuf_get_width(pixbuf) > 32 || gdk_pixbuf_get_height(pixbuf) > 32) {
-	    pixbuf =  gdk_pixbuf_scale_simple(pixbuf, 32, 32, GDK_INTERP_BILINEAR);
-	}
+    if (pixbuf) {
+        if (gdk_pixbuf_get_width (pixbuf) > 32 || gdk_pixbuf_get_height (pixbuf) > 32) {
+            pixbuf =  gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);
+        }
+    } else {
+        DEBUG ("Error no pixbuff for conference from %s", ICONS_DIR);
     }
-    else {
-        DEBUG("Error no pixbuff for conference from %s", ICONS_DIR);
-    }
-    
+
     // Used to determine if at least one participant use a security feature
-    // If true (at least on call use a security feature) we need to display security icons 
+    // If true (at least on call use a security feature) we need to display security icons
     conf->_conf_srtp_enabled = FALSE;
-    
+
     // Used to determine if the conference is secured
     // Every participant to a conference must be secured, the conference is not secured elsewhere
     conf->_conference_secured = TRUE;
 
-    DEBUG("Calltree: Determine if conference is secured");
-    
+    DEBUG ("Calltree: Determine if conference is secured");
+
     // participant = conf->participant;
     // participant = dbus_get_participant_list(conf->_confID);
     conference_participant = conf->participant_list;
-    if(conference_participant) {
-
-        DEBUG("Calltree: Determine if at least one participant uses SRTP");
-	
-	// participant = conf->participant;
-	// participant = dbus_get_participant_list(conf->_confID);
-	// for (pl = participant; *pl; pl++)
-	while(conference_participant) {
-	    
-	    // call_id = (gchar*)(*pl);
-	    call_id = (gchar*)(conference_participant->data);
-	    call = calllist_get (tab, call_id);
-	    
-	    if(call != NULL) {
-	      
-	      account_details = account_list_get_by_id(call->_callID);
-	      if(account_details != NULL) {
-		srtp_enabled = g_hash_table_lookup(account_details->properties, ACCOUNT_SRTP_ENABLED);
-	      }
-	      
-	      if(g_strcasecmp(srtp_enabled,"true") == 0) {
-		DEBUG("Calltree: SRTP enabled for participant %s", call_id);
-		conf->_conf_srtp_enabled = TRUE;
-		break;
-	      } 
-	      else {
-		DEBUG("Calltree: SRTP is not enabled for participant %s", call_id);
-	      }
-	      
-	    }
-	    
-	    conference_participant = conference_next_participant(conference_participant);
-	    
-	  }
-
-	DEBUG("Calltree: Determine if all conference participant are secured");
-	
-	if(conf->_conf_srtp_enabled) {
-	    // participant = conf->participant;
-	    conference_participant = conf->participant_list;
-	    // for (pl = participant; *pl; pl++)
-	    while(conference_participant) {	    
-		// call_id = (gchar*)(*pl);
-		call_id = (gchar*)(conference_participant->data);
-		call = calllist_get (tab, call_id);
-		
-		if(call != NULL) {
-		  
-		  if(call->_srtp_state == 0) {
-		      DEBUG("Calltree: Participant %s is not secured", call_id);
-							conf->_conference_secured = FALSE;
-							break;
-		  }
-		  else {
-		      DEBUG("Calltree: Participant %s is secured", call_id);
-		  }
-		}
-		conference_participant = conference_next_participant(conference_participant);
-	    }
-	}
+
+    if (conference_participant) {
+
+        DEBUG ("Calltree: Determine if at least one participant uses SRTP");
+
+        // participant = conf->participant;
+        // participant = dbus_get_participant_list(conf->_confID);
+        // for (pl = participant; *pl; pl++)
+        while (conference_participant) {
+
+            // call_id = (gchar*)(*pl);
+            call_id = (gchar*) (conference_participant->data);
+            call = calllist_get (tab, call_id);
+
+            if (call != NULL) {
+
+                account_details = account_list_get_by_id (call->_callID);
+
+                if (account_details != NULL) {
+                    srtp_enabled = g_hash_table_lookup (account_details->properties, ACCOUNT_SRTP_ENABLED);
+                }
+
+                if (g_strcasecmp (srtp_enabled,"true") == 0) {
+                    DEBUG ("Calltree: SRTP enabled for participant %s", call_id);
+                    conf->_conf_srtp_enabled = TRUE;
+                    break;
+                } else {
+                    DEBUG ("Calltree: SRTP is not enabled for participant %s", call_id);
+                }
+
+            }
+
+            conference_participant = conference_next_participant (conference_participant);
+
+        }
+
+        DEBUG ("Calltree: Determine if all conference participant are secured");
+
+        if (conf->_conf_srtp_enabled) {
+            // participant = conf->participant;
+            conference_participant = conf->participant_list;
+
+            // for (pl = participant; *pl; pl++)
+            while (conference_participant) {
+                // call_id = (gchar*)(*pl);
+                call_id = (gchar*) (conference_participant->data);
+                call = calllist_get (tab, call_id);
+
+                if (call != NULL) {
+
+                    if (call->_srtp_state == 0) {
+                        DEBUG ("Calltree: Participant %s is not secured", call_id);
+                        conf->_conference_secured = FALSE;
+                        break;
+                    } else {
+                        DEBUG ("Calltree: Participant %s is secured", call_id);
+                    }
+                }
+
+                conference_participant = conference_next_participant (conference_participant);
+            }
+        }
     }
 
-    if(conf->_conf_srtp_enabled) {
-	if(conf->_conference_secured) {
-	    DEBUG("Calltree: Conference is secured");
-	    pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_confirmed.svg", NULL);
-	}
-	else {
-	    DEBUG("Calltree: Conference is not secured");
-	    pixbuf_security = gdk_pixbuf_new_from_file(ICONS_DIR "/lock_off.svg", NULL);
-	}
+    if (conf->_conf_srtp_enabled) {
+        if (conf->_conference_secured) {
+            DEBUG ("Calltree: Conference is secured");
+            pixbuf_security = gdk_pixbuf_new_from_file (ICONS_DIR "/lock_confirmed.svg", NULL);
+        } else {
+            DEBUG ("Calltree: Conference is not secured");
+            pixbuf_security = gdk_pixbuf_new_from_file (ICONS_DIR "/lock_off.svg", NULL);
+        }
     }
-    
-    DEBUG("Calltree: Add conference to tree store");
-    
-    gtk_tree_store_set(tab->store, &iter,
-		       0, pixbuf, // Icon
-		       1, description, // Description
-		       2, pixbuf_security,
-		       3, conf, // Pointer
-		       -1);
+
+    DEBUG ("Calltree: Add conference to tree store");
+
+    gtk_tree_store_set (tab->store, &iter,
+                        0, pixbuf, // Icon
+                        1, description, // Description
+                        2, pixbuf_security,
+                        3, conf, // Pointer
+                        -1);
 
     if (pixbuf != NULL)
-      g_object_unref(G_OBJECT(pixbuf));
-    
+        g_object_unref (G_OBJECT (pixbuf));
+
     // participant = conf->participant;
     // participant = dbus_get_participant_list(conf->_confID);
     conference_participant = conf->participant_list;
-    if(conference_participant) {
-
-        DEBUG("Calltre: Adding conference participant");
-	// for (pl = participant; *pl; pl++)
-	while(conference_participant) {
-	    
-	    DEBUG("OK");
-	    call_id = (gchar*)(conference_participant->data);
-	    call = calllist_get (tab, call_id);
-	    // create_new_call_from_details (conf_id, conference_details, &c);
-	    
-	    calltree_remove_call(tab, call, NULL);
-	    calltree_add_call (tab, call, &iter);
-	    
-	    conference_participant = conference_next_participant(conference_participant);
-	}
+
+    if (conference_participant) {
+
+        DEBUG ("Calltre: Adding conference participant");
+
+        // for (pl = participant; *pl; pl++)
+        while (conference_participant) {
+
+            DEBUG ("OK");
+            call_id = (gchar*) (conference_participant->data);
+            call = calllist_get (tab, call_id);
+            // create_new_call_from_details (conf_id, conference_details, &c);
+
+            calltree_remove_call (tab, call, NULL);
+            calltree_add_call (tab, call, &iter);
+
+            conference_participant = conference_next_participant (conference_participant);
+        }
     }
+
     /*
-    else 
-	  {
-	    WARN ("Conferences cannot be added in this widget - This is a bug in the application.");    
-	  }
+    else
+      {
+        WARN ("Conferences cannot be added in this widget - This is a bug in the application.");
+      }
     */
 
-    gtk_tree_view_set_model(GTK_TREE_VIEW(tab->view), GTK_TREE_MODEL(tab->store));
+    gtk_tree_view_set_model (GTK_TREE_VIEW (tab->view), GTK_TREE_MODEL (tab->store));
 
-    path = gtk_tree_model_get_path(model, &iter);
+    path = gtk_tree_model_get_path (model, &iter);
 
-    gtk_tree_view_expand_row(GTK_TREE_VIEW(tab->view), path, FALSE);
+    gtk_tree_view_expand_row (GTK_TREE_VIEW (tab->view), path, FALSE);
 
     update_actions();
 
@@ -1271,7 +1276,7 @@ void calltree_add_conference (calltab_t* tab, conference_obj_t* conf)
 void calltree_update_conference (calltab_t* tab, const gchar* confID)
 {
 
-	DEBUG("calltree_update_conference");
+    DEBUG ("calltree_update_conference");
 
 
 }
@@ -1280,8 +1285,8 @@ void calltree_update_conference (calltab_t* tab, const gchar* confID)
 void calltree_remove_conference (calltab_t* tab, const conference_obj_t* conf, GtkTreeIter *parent)
 {
 
-    DEBUG("calltree_remove_conference %s\n", conf->_confID);
-    
+    DEBUG ("calltree_remove_conference %s\n", conf->_confID);
+
     GtkTreeIter iter_parent;
     GtkTreeIter iter_child;
     GValue confval;
@@ -1290,50 +1295,53 @@ void calltree_remove_conference (calltab_t* tab, const conference_obj_t* conf, G
     callable_obj_t * call;
     GtkTreeStore* store = tab->store;
 
-    int nbChild = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), parent);
+    int nbChild = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store), parent);
 
     int nbParticipant;
 
     int i, j;
-    for( i = 0; i < nbChild; i++) {
 
-        if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter_parent, parent, i)) {
+    for (i = 0; i < nbChild; i++) {
+
+        if (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter_parent, parent, i)) {
+
+            if (gtk_tree_model_iter_has_child (GTK_TREE_MODEL (store), &iter_parent)) {
+
+                calltree_remove_conference (tab, conf, &iter_parent);
 
-	    if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(store), &iter_parent)) {
+                confval.g_type = 0;
+                gtk_tree_model_get_value (GTK_TREE_MODEL (store), &iter_parent, COLUMN_ACCOUNT_PTR, &confval);
 
-	        calltree_remove_conference (tab, conf, &iter_parent);
+                tempconf = (conference_obj_t*) g_value_get_pointer (&confval);
+                g_value_unset (&confval);
 
-		confval.g_type = 0;
-		gtk_tree_model_get_value (GTK_TREE_MODEL(store), &iter_parent, COLUMN_ACCOUNT_PTR, &confval);
+                if (tempconf == conf) {
 
-		tempconf = (conference_obj_t*) g_value_get_pointer(&confval);
-		g_value_unset(&confval);
+                    nbParticipant = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store), &iter_parent);
+                    DEBUG ("nbParticipant: %i", nbParticipant);
 
-		if(tempconf == conf) {
-		    
-		    nbParticipant = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(store), &iter_parent);
-		    DEBUG("nbParticipant: %i", nbParticipant);
-		    for( j = 0; j < nbParticipant; j++) {
-		        call = NULL;
-			if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter_child, &iter_parent, j)){
+                    for (j = 0; j < nbParticipant; j++) {
+                        call = NULL;
 
-			    callval.g_type = 0;
-			    gtk_tree_model_get_value (GTK_TREE_MODEL(store), &iter_child, COLUMN_ACCOUNT_PTR, &callval);
+                        if (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter_child, &iter_parent, j)) {
 
-			    call = (callable_obj_t*)g_value_get_pointer(&callval);
-			    g_value_unset(&callval);
-			    
-			    if(call) {
-			        calltree_add_call (tab, call, NULL);
-			    }
-			}
-			
-		    }
+                            callval.g_type = 0;
+                            gtk_tree_model_get_value (GTK_TREE_MODEL (store), &iter_child, COLUMN_ACCOUNT_PTR, &callval);
 
-		    gtk_tree_store_remove(store, &iter_parent);
-		}
-	    }
-	}
+                            call = (callable_obj_t*) g_value_get_pointer (&callval);
+                            g_value_unset (&callval);
+
+                            if (call) {
+                                calltree_add_call (tab, call, NULL);
+                            }
+                        }
+
+                    }
+
+                    gtk_tree_store_remove (store, &iter_parent);
+                }
+            }
+        }
     }
 
     // callable_obj_t * selectedCall = calltab_get_selected_call(tab);
@@ -1341,13 +1349,14 @@ void calltree_remove_conference (calltab_t* tab, const conference_obj_t* conf, G
     // calltab_select_call(tab, NULL);
 
     update_actions();
-	
+
 }
 
 
-void calltree_display (calltab_t *tab) {
+void calltree_display (calltab_t *tab)
+{
+
 
-  
     GtkTreeSelection *sel;
 
     /* If we already are displaying the specified calltree */
@@ -1360,12 +1369,13 @@ void calltree_display (calltab_t *tab) {
         DEBUG ("display main tab");
 
 
-	if (active_calltree==contacts) {
-	    gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)contactButton, FALSE);
-	} else {
-	    gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)historyButton, FALSE);
-	}
-	// gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)currentCallsButton, TRUE);
+        if (active_calltree==contacts) {
+            gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, FALSE);
+        } else {
+            gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton, FALSE);
+        }
+
+        // gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)currentCallsButton, TRUE);
 
     }
 
@@ -1374,417 +1384,409 @@ void calltree_display (calltab_t *tab) {
 
         DEBUG ("display history tab");
 
-	if (active_calltree==contacts) {
-	    gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)contactButton, FALSE);
-	}
+        if (active_calltree==contacts) {
+            gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, FALSE);
+        }
 
-	gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)historyButton, TRUE);
+        gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton, TRUE);
     }
 
     else if (tab==contacts) {
 
         DEBUG ("display contact tab");
 
-	if (active_calltree==history) {
-	    gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)historyButton, FALSE);
-	}
+        if (active_calltree==history) {
+            gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton, FALSE);
+        }
 
-	gtk_toggle_tool_button_set_active ((GtkToggleToolButton*)contactButton, TRUE);
+        gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, TRUE);
     }
 
     else
         ERROR ("calltree.c line %d . This is probably a bug in the application", __LINE__);
-    
+
 
     gtk_widget_hide (active_calltree->tree);
     active_calltree = tab;
     gtk_widget_show (active_calltree->tree);
-    
+
     sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (active_calltree->view));
-    DEBUG("Emit signal changed from calltree_display");
-    g_signal_emit_by_name(sel, "changed");
+    DEBUG ("Emit signal changed from calltree_display");
+    g_signal_emit_by_name (sel, "changed");
     update_actions();
 }
 
 
 
 
-static void drag_begin_cb(GtkWidget *widget, GdkDragContext *dc, gpointer data)
+static void drag_begin_cb (GtkWidget *widget, GdkDragContext *dc, gpointer data)
 {
 
     GtkTargetList* target_list;
 
 }
 
-static void drag_end_cb(GtkWidget * widget, GdkDragContext * context, gpointer data)
+static void drag_end_cb (GtkWidget * widget, GdkDragContext * context, gpointer data)
 {
-    DEBUG("CallTree: Drag end callback");
-    DEBUG("CallTree: selected_path %s, selected_call_id %s, selected_path_depth %d", 
-	                             selected_path, selected_call_id, selected_path_depth);
-    DEBUG("CallTree: dragged path %s, dragged_call_id %s, dragged_path_depth %d", 
-                                     dragged_path, dragged_call_id, dragged_path_depth);
-
-    GtkTreeModel *model = (GtkTreeModel*)current_calls->store;
-    GtkTreePath *path = gtk_tree_path_new_from_string(dragged_path);
-    GtkTreePath *dpath = gtk_tree_path_new_from_string(dragged_path);
-    GtkTreePath *spath = gtk_tree_path_new_from_string(selected_path);
-    
+    DEBUG ("CallTree: Drag end callback");
+    DEBUG ("CallTree: selected_path %s, selected_call_id %s, selected_path_depth %d",
+           selected_path, selected_call_id, selected_path_depth);
+    DEBUG ("CallTree: dragged path %s, dragged_call_id %s, dragged_path_depth %d",
+           dragged_path, dragged_call_id, dragged_path_depth);
+
+    GtkTreeModel *model = (GtkTreeModel*) current_calls->store;
+    GtkTreePath *path = gtk_tree_path_new_from_string (dragged_path);
+    GtkTreePath *dpath = gtk_tree_path_new_from_string (dragged_path);
+    GtkTreePath *spath = gtk_tree_path_new_from_string (selected_path);
+
     GtkTreeIter iter;
     GtkTreeIter iter_parent;
     GtkTreeIter iter_children;
     GtkTreeIter parent_conference; // conference for which this call is attached
 
     GValue val;
-    
+
     callable_obj_t* call;
     conference_obj_t* conf;
 
 
     // Make sure drag n drop does not imply a dialing call for either selected and dragged call
-    if(selected_call && (selected_type == A_CALL)) {
-
-      DEBUG("CallTree: Selected a call");
-      if(selected_call->_state == CALL_STATE_DIALING || 
-	 selected_call->_state == CALL_STATE_INVALID ||
-	 selected_call->_state == CALL_STATE_FAILURE ||
-	 selected_call->_state == CALL_STATE_BUSY ||
-	 selected_call->_state == CALL_STATE_TRANSFERT) {
- 
-          DEBUG("CallTree: Selected an invalid call");
-
-	  calltree_remove_call(current_calls, selected_call, NULL);
-	  calltree_add_call(current_calls, selected_call, NULL);
-
-	  dragged_call = NULL; 
-	  return;
-      }
-    
-
-      if(dragged_call && (dragged_type == A_CALL)) {
-
-	DEBUG("CallTree: Dragged on a call");
-	if(dragged_call->_state == CALL_STATE_DIALING || 
-	   dragged_call->_state == CALL_STATE_INVALID ||
-	   dragged_call->_state == CALL_STATE_FAILURE ||
-	   dragged_call->_state == CALL_STATE_BUSY ||
-	   dragged_call->_state == CALL_STATE_TRANSFERT) {
- 
-	    DEBUG("CallTree: Dragged on an invalid call");
-
-	    calltree_remove_call(current_calls, selected_call, NULL);
-	  
-	    if(selected_call->_confID) {
-
-	        gtk_tree_path_up(spath);
-		gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &parent_conference, spath);
-		
-		calltree_add_call(current_calls, selected_call, &parent_conference);
-	    }
-	    else {
-
-	        calltree_add_call(current_calls, selected_call, NULL);
-	    }
-
-	    dragged_call = NULL; 
-	    return;
-	}
-      }
+    if (selected_call && (selected_type == A_CALL)) {
+
+        DEBUG ("CallTree: Selected a call");
+
+        if (selected_call->_state == CALL_STATE_DIALING ||
+                selected_call->_state == CALL_STATE_INVALID ||
+                selected_call->_state == CALL_STATE_FAILURE ||
+                selected_call->_state == CALL_STATE_BUSY ||
+                selected_call->_state == CALL_STATE_TRANSFERT) {
+
+            DEBUG ("CallTree: Selected an invalid call");
+
+            calltree_remove_call (current_calls, selected_call, NULL);
+            calltree_add_call (current_calls, selected_call, NULL);
+
+            dragged_call = NULL;
+            return;
+        }
+
+
+        if (dragged_call && (dragged_type == A_CALL)) {
+
+            DEBUG ("CallTree: Dragged on a call");
+
+            if (dragged_call->_state == CALL_STATE_DIALING ||
+                    dragged_call->_state == CALL_STATE_INVALID ||
+                    dragged_call->_state == CALL_STATE_FAILURE ||
+                    dragged_call->_state == CALL_STATE_BUSY ||
+                    dragged_call->_state == CALL_STATE_TRANSFERT) {
+
+                DEBUG ("CallTree: Dragged on an invalid call");
+
+                calltree_remove_call (current_calls, selected_call, NULL);
+
+                if (selected_call->_confID) {
+
+                    gtk_tree_path_up (spath);
+                    gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &parent_conference, spath);
+
+                    calltree_add_call (current_calls, selected_call, &parent_conference);
+                } else {
+
+                    calltree_add_call (current_calls, selected_call, NULL);
+                }
+
+                dragged_call = NULL;
+                return;
+            }
+        }
 
     }
 
 
     // Make sure a conference is only dragged on another conference
-    if(selected_conf && (selected_type == A_CONFERENCE)) {
+    if (selected_conf && (selected_type == A_CONFERENCE)) {
 
-        DEBUG("CallTree: Selected a conference");
+        DEBUG ("CallTree: Selected a conference");
 
-	if(!dragged_conf && (dragged_type == A_CALL)) {
+        if (!dragged_conf && (dragged_type == A_CALL)) {
 
-	    DEBUG("CallTree: Dragged on a call");
+            DEBUG ("CallTree: Dragged on a call");
 
-	    conf = selected_conf;
+            conf = selected_conf;
 
-	    calltree_remove_conference(current_calls, conf, NULL);
-	    calltree_add_conference(current_calls, conf);
+            calltree_remove_conference (current_calls, conf, NULL);
+            calltree_add_conference (current_calls, conf);
 
-	    dragged_call = NULL;
-	    return; 
-	}
+            dragged_call = NULL;
+            return;
+        }
     }
 
 
-    if(selected_path_depth == 1) {
+    if (selected_path_depth == 1) {
 
-        if(dragged_path_depth == 1) {
+        if (dragged_path_depth == 1) {
 
-	  if (selected_type == A_CALL && dragged_type == A_CALL) {
+            if (selected_type == A_CALL && dragged_type == A_CALL) {
 
-	    if(gtk_tree_path_compare (dpath, spath) == 0) {
-	        // draged a call on itself
-	    }
-	    else {
-	      // dragged a single call on a single call
-	      if(selected_call != NULL && dragged_call != NULL)
-		sflphone_join_participant(selected_call->_callID, dragged_call->_callID);
-	    }
-	  }
-	  else if(selected_type == A_CALL && dragged_type == A_CONFERENCE) {
+                if (gtk_tree_path_compare (dpath, spath) == 0) {
+                    // draged a call on itself
+                } else {
+                    // dragged a single call on a single call
+                    if (selected_call != NULL && dragged_call != NULL)
+                        sflphone_join_participant (selected_call->_callID, dragged_call->_callID);
+                }
+            } else if (selected_type == A_CALL && dragged_type == A_CONFERENCE) {
 
-	      // dragged a single call on a conference
-	      if(!selected_call) {
-	          DEBUG("Error: call dragged on a conference is null");
-		  return;
-	      }
+                // dragged a single call on a conference
+                if (!selected_call) {
+                    DEBUG ("Error: call dragged on a conference is null");
+                    return;
+                }
 
-	      selected_call->_confID = g_strdup(dragged_call_id);
-	      sflphone_add_participant(selected_call_id, dragged_call_id);
-	  }
-	  else if(selected_type == A_CONFERENCE && dragged_type == A_CALL) {
+                selected_call->_confID = g_strdup (dragged_call_id);
+                sflphone_add_participant (selected_call_id, dragged_call_id);
+            } else if (selected_type == A_CONFERENCE && dragged_type == A_CALL) {
 
-	      // dragged a conference on a single call
-	      conf = selected_conf;
-			        
-	      calltree_remove_conference(current_calls, conf, NULL);
-	      calltree_add_conference(current_calls, conf);
+                // dragged a conference on a single call
+                conf = selected_conf;
 
+                calltree_remove_conference (current_calls, conf, NULL);
+                calltree_add_conference (current_calls, conf);
 
-	  }
-	  else if(selected_type == A_CONFERENCE && dragged_type == A_CONFERENCE){
 
-	      // dragged a conference on a conference
-	      if(gtk_tree_path_compare (dpath, spath) == 0) {
+            } else if (selected_type == A_CONFERENCE && dragged_type == A_CONFERENCE) {
 
-		  if(!current_calls) {
-		      DEBUG("Error while joining the same conference\n");
-		      return;
-		  }
+                // dragged a conference on a conference
+                if (gtk_tree_path_compare (dpath, spath) == 0) {
 
-		  DEBUG("Joined the same conference!\n");
-		  gtk_tree_view_expand_row(GTK_TREE_VIEW(current_calls->view), path, FALSE);
-	      }
-	      else {
+                    if (!current_calls) {
+                        DEBUG ("Error while joining the same conference\n");
+                        return;
+                    }
 
-		  if(!selected_conf) {
-		      DEBUG("Error: selected conference is null while joining 2 conference");
-		  }
+                    DEBUG ("Joined the same conference!\n");
+                    gtk_tree_view_expand_row (GTK_TREE_VIEW (current_calls->view), path, FALSE);
+                } else {
 
-		  if(!dragged_conf) {
-		      DEBUG("Error: dragged conference is null while joining 2 conference");
-		  }
+                    if (!selected_conf) {
+                        DEBUG ("Error: selected conference is null while joining 2 conference");
+                    }
 
-		  DEBUG("Joined two conference %s, %s!\n", dragged_path, selected_path);
-		  sflphone_join_conference(selected_conf->_confID, dragged_conf->_confID);
-	      }
-	  }
+                    if (!dragged_conf) {
+                        DEBUG ("Error: dragged conference is null while joining 2 conference");
+                    }
 
-	  // TODO: dragged a single call on a NULL element (should do nothing)
-	  // TODO: dragged a conference on a NULL element (should do nothing)
+                    DEBUG ("Joined two conference %s, %s!\n", dragged_path, selected_path);
+                    sflphone_join_conference (selected_conf->_confID, dragged_conf->_confID);
+                }
+            }
 
-	}
-	else {
- 
-	    // dragged_path_depth == 2
-	  if (selected_type == A_CALL && dragged_type == A_CALL) {
+            // TODO: dragged a single call on a NULL element (should do nothing)
+            // TODO: dragged a conference on a NULL element (should do nothing)
 
-	      // TODO: dragged a call on a conference call
-	      calltree_remove_call(current_calls, selected_call, NULL);
-	      calltree_add_call(current_calls, selected_call, NULL);
-	  }
+        } else {
 
-	  else if(selected_type == A_CONFERENCE && dragged_type == A_CALL) {
+            // dragged_path_depth == 2
+            if (selected_type == A_CALL && dragged_type == A_CALL) {
 
-	      // TODO: dragged a conference on a conference call
-	      calltree_remove_conference(current_calls, selected_conf, NULL);
-	      calltree_add_conference(current_calls, selected_conf);
-	  }
+                // TODO: dragged a call on a conference call
+                calltree_remove_call (current_calls, selected_call, NULL);
+                calltree_add_call (current_calls, selected_call, NULL);
+            }
 
-	  // TODO: dragged a single call on a NULL element 
-	  // TODO: dragged a conference on a NULL element
-	}
-    }
-    else {
+            else if (selected_type == A_CONFERENCE && dragged_type == A_CALL) {
+
+                // TODO: dragged a conference on a conference call
+                calltree_remove_conference (current_calls, selected_conf, NULL);
+                calltree_add_conference (current_calls, selected_conf);
+            }
+
+            // TODO: dragged a single call on a NULL element
+            // TODO: dragged a conference on a NULL element
+        }
+    } else {
 
         // selected_path_depth == 2
-      
-        if(dragged_path_depth == 1) {
-
-	    if(selected_type == A_CALL && dragged_type == A_CALL) {
-
-	      // dragged a conference call on a call
-	      sflphone_detach_participant(selected_call_id);
-		    
-	      if(selected_call != NULL && dragged_call != NULL)
-		  sflphone_join_participant(selected_call->_callID, dragged_call->_callID);
-
-	    }
-	    else if(selected_type == A_CALL && dragged_type == A_CONFERENCE) {
-
-	        // dragged a conference call on a conference
-	        sflphone_detach_participant(selected_call_id);
-	      
-		if(selected_call != NULL && dragged_conf != NULL) {
-
-		    DEBUG("Adding a participant, since dragged call on a conference");
-
-		    sflphone_add_participant(selected_call_id, dragged_call_id);
-		}
-	    }
-	    else {
-
-	        // dragged a conference call on a NULL element
-	        sflphone_detach_participant(selected_call_id);
-	    }
-		
-	}
-	else {
-
-	    // dragged_path_depth == 2
-	    // dragged a conference call on another conference call (same conference)
-	    // TODO: dragged a conference call on another conference call (different conference)
-	      
-	    gtk_tree_path_up(path);
-
-	    gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &parent_conference, path);
-
-	    gtk_tree_path_up(dpath);
-	    gtk_tree_path_up(spath);
-		
-	    if(gtk_tree_path_compare (dpath, spath) == 0) {
-
-	        DEBUG("Dragged a call in the same conference");
-		calltree_remove_call (current_calls, selected_call, NULL);
-		calltree_add_call (current_calls, selected_call, &parent_conference);
-	    }
-	    else {
-
-
-	        DEBUG("Dragged a conference call onto another conference call %s, %s", gtk_tree_path_to_string(dpath), gtk_tree_path_to_string(spath));
-
-		conf = NULL;
-		
-		val.g_type = 0;
-		if(gtk_tree_model_get_iter (model, &iter, dpath)) {
-		  
-		    DEBUG("we got an iter!");
-		    gtk_tree_model_get_value (model, &iter, COLUMN_ACCOUNT_PTR, &val);
-		  
-		    conf = (conference_obj_t*)g_value_get_pointer(&val);
-		}
-		g_value_unset(&val);
-
-		sflphone_detach_participant(selected_call_id);
-
-		if(conf) {
-
-		    DEBUG("we got a conf!");
-		    sflphone_add_participant(selected_call_id, conf->_confID);
-		}
-		else {
-
-		    DEBUG("didn't find a conf!");
-		}
-	    }
-
-	    // TODO: dragged a conference call on another conference call (different conference)
-	    // TODO: dragged a conference call on a NULL element (same conference)
-	    // TODO: dragged a conference call on a NULL element (different conference)
-	}
-	
-    }	
+
+        if (dragged_path_depth == 1) {
+
+            if (selected_type == A_CALL && dragged_type == A_CALL) {
+
+                // dragged a conference call on a call
+                sflphone_detach_participant (selected_call_id);
+
+                if (selected_call != NULL && dragged_call != NULL)
+                    sflphone_join_participant (selected_call->_callID, dragged_call->_callID);
+
+            } else if (selected_type == A_CALL && dragged_type == A_CONFERENCE) {
+
+                // dragged a conference call on a conference
+                sflphone_detach_participant (selected_call_id);
+
+                if (selected_call != NULL && dragged_conf != NULL) {
+
+                    DEBUG ("Adding a participant, since dragged call on a conference");
+
+                    sflphone_add_participant (selected_call_id, dragged_call_id);
+                }
+            } else {
+
+                // dragged a conference call on a NULL element
+                sflphone_detach_participant (selected_call_id);
+            }
+
+        } else {
+
+            // dragged_path_depth == 2
+            // dragged a conference call on another conference call (same conference)
+            // TODO: dragged a conference call on another conference call (different conference)
+
+            gtk_tree_path_up (path);
+
+            gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &parent_conference, path);
+
+            gtk_tree_path_up (dpath);
+            gtk_tree_path_up (spath);
+
+            if (gtk_tree_path_compare (dpath, spath) == 0) {
+
+                DEBUG ("Dragged a call in the same conference");
+                calltree_remove_call (current_calls, selected_call, NULL);
+                calltree_add_call (current_calls, selected_call, &parent_conference);
+            } else {
+
+
+                DEBUG ("Dragged a conference call onto another conference call %s, %s", gtk_tree_path_to_string (dpath), gtk_tree_path_to_string (spath));
+
+                conf = NULL;
+
+                val.g_type = 0;
+
+                if (gtk_tree_model_get_iter (model, &iter, dpath)) {
+
+                    DEBUG ("we got an iter!");
+                    gtk_tree_model_get_value (model, &iter, COLUMN_ACCOUNT_PTR, &val);
+
+                    conf = (conference_obj_t*) g_value_get_pointer (&val);
+                }
+
+                g_value_unset (&val);
+
+                sflphone_detach_participant (selected_call_id);
+
+                if (conf) {
+
+                    DEBUG ("we got a conf!");
+                    sflphone_add_participant (selected_call_id, conf->_confID);
+                } else {
+
+                    DEBUG ("didn't find a conf!");
+                }
+            }
+
+            // TODO: dragged a conference call on another conference call (different conference)
+            // TODO: dragged a conference call on a NULL element (same conference)
+            // TODO: dragged a conference call on a NULL element (different conference)
+        }
+
+    }
 
 }
 
 
-void drag_data_received_cb(GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint t, gpointer data)
+void drag_data_received_cb (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint t, gpointer data)
 {
 
     // DEBUG("drag_data_received_cb\n");
-    GtkTreeView *tree_view = GTK_TREE_VIEW(widget);
+    GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
     GtkTreePath *drop_path;
     GtkTreeViewDropPosition position;
     GValue val;
 
-    GtkTreeModel *model = (GtkTreeModel*)active_calltree->store;
-    GtkTreeModel* tree_model = gtk_tree_view_get_model(tree_view);
+    GtkTreeModel *model = (GtkTreeModel*) active_calltree->store;
+    GtkTreeModel* tree_model = gtk_tree_view_get_model (tree_view);
 
     GtkTreeIter iter;
     gchar value;
 
 
     val.g_type = 0;
-    gtk_tree_view_get_drag_dest_row(tree_view, &drop_path, &position);
-
-    if(drop_path) {
-
-        gtk_tree_model_get_iter(tree_model, &iter, drop_path);
-	gtk_tree_model_get_value(tree_model, &iter, COLUMN_ACCOUNT_PTR, &val);
-
-	    
-	if(gtk_tree_model_iter_has_child(tree_model, &iter)) {
-
-	    DEBUG("CallTree: Dragging on a conference");
-	    dragged_type = A_CONFERENCE;
-	    dragged_call = NULL;
-	}
-	else {
-
-	    DEBUG("CallTree: Dragging on a call");
-	    dragged_type = A_CALL;
-	    dragged_conf = NULL;
-	}
-
-	switch (position)  {
-
-	case GTK_TREE_VIEW_DROP_AFTER:
-	    DEBUG("CallTree: GTK_TREE_VIEW_DROP_AFTER");
-	    dragged_path = gtk_tree_path_to_string(drop_path);
-	    dragged_path_depth = gtk_tree_path_get_depth(drop_path);
-	    dragged_call_id = "NULL";
-	    dragged_call = NULL;
-	    dragged_conf = NULL;
-	    break;
-
-	case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
-	    DEBUG("CallTree: GTK_TREE_VIEW_DROP_INTO_OR_AFTER");
-	    dragged_path = gtk_tree_path_to_string(drop_path);
-	    dragged_path_depth = gtk_tree_path_get_depth(drop_path);
-	    if (dragged_type == A_CALL) {
-	      
-	        dragged_call_id = ((callable_obj_t*)g_value_get_pointer(&val))->_callID;
-		dragged_call = (callable_obj_t*)g_value_get_pointer(&val);
-	    }
-	    else {
-
-	        dragged_call_id = ((conference_obj_t*)g_value_get_pointer(&val))->_confID;
-		dragged_conf = (conference_obj_t*)g_value_get_pointer(&val);
-	    }
-	    break;
-
-	case GTK_TREE_VIEW_DROP_BEFORE:
-	    DEBUG("CallTree: GTK_TREE_VIEW_DROP_BEFORE");
-	    dragged_path = gtk_tree_path_to_string(drop_path);
-	    dragged_path_depth = gtk_tree_path_get_depth(drop_path);
-	    dragged_call_id = "NULL";
-	    dragged_call = NULL;
-	    dragged_conf = NULL;
-	    break;
-
-	case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
-	    DEBUG("CallTree: GTK_TREE_VIEW_DROP_INTO_OR_BEFORE");
-	    dragged_path = gtk_tree_path_to_string(drop_path);
-	    dragged_path_depth = gtk_tree_path_get_depth(drop_path);
-	    if (dragged_type == A_CALL) {
-	        dragged_call_id = ((callable_obj_t*)g_value_get_pointer(&val))->_callID;
-		dragged_call = (callable_obj_t*)g_value_get_pointer(&val);
-	    }
-	    else {
-	      dragged_call_id = ((conference_obj_t*)g_value_get_pointer(&val))->_confID;
-	      dragged_conf = (conference_obj_t*)g_value_get_pointer(&val);
-	    }
-	    break;
-	    
-	default:
-	  return;
-	}
+    gtk_tree_view_get_drag_dest_row (tree_view, &drop_path, &position);
+
+    if (drop_path) {
+
+        gtk_tree_model_get_iter (tree_model, &iter, drop_path);
+        gtk_tree_model_get_value (tree_model, &iter, COLUMN_ACCOUNT_PTR, &val);
+
+
+        if (gtk_tree_model_iter_has_child (tree_model, &iter)) {
+
+            DEBUG ("CallTree: Dragging on a conference");
+            dragged_type = A_CONFERENCE;
+            dragged_call = NULL;
+        } else {
+
+            DEBUG ("CallTree: Dragging on a call");
+            dragged_type = A_CALL;
+            dragged_conf = NULL;
+        }
+
+        switch (position)  {
+
+            case GTK_TREE_VIEW_DROP_AFTER:
+                DEBUG ("CallTree: GTK_TREE_VIEW_DROP_AFTER");
+                dragged_path = gtk_tree_path_to_string (drop_path);
+                dragged_path_depth = gtk_tree_path_get_depth (drop_path);
+                dragged_call_id = "NULL";
+                dragged_call = NULL;
+                dragged_conf = NULL;
+                break;
+
+            case GTK_TREE_VIEW_DROP_INTO_OR_AFTER:
+                DEBUG ("CallTree: GTK_TREE_VIEW_DROP_INTO_OR_AFTER");
+                dragged_path = gtk_tree_path_to_string (drop_path);
+                dragged_path_depth = gtk_tree_path_get_depth (drop_path);
+
+                if (dragged_type == A_CALL) {
+
+                    dragged_call_id = ( (callable_obj_t*) g_value_get_pointer (&val))->_callID;
+                    dragged_call = (callable_obj_t*) g_value_get_pointer (&val);
+                } else {
+
+                    dragged_call_id = ( (conference_obj_t*) g_value_get_pointer (&val))->_confID;
+                    dragged_conf = (conference_obj_t*) g_value_get_pointer (&val);
+                }
+
+                break;
+
+            case GTK_TREE_VIEW_DROP_BEFORE:
+                DEBUG ("CallTree: GTK_TREE_VIEW_DROP_BEFORE");
+                dragged_path = gtk_tree_path_to_string (drop_path);
+                dragged_path_depth = gtk_tree_path_get_depth (drop_path);
+                dragged_call_id = "NULL";
+                dragged_call = NULL;
+                dragged_conf = NULL;
+                break;
+
+            case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE:
+                DEBUG ("CallTree: GTK_TREE_VIEW_DROP_INTO_OR_BEFORE");
+                dragged_path = gtk_tree_path_to_string (drop_path);
+                dragged_path_depth = gtk_tree_path_get_depth (drop_path);
+
+                if (dragged_type == A_CALL) {
+                    dragged_call_id = ( (callable_obj_t*) g_value_get_pointer (&val))->_callID;
+                    dragged_call = (callable_obj_t*) g_value_get_pointer (&val);
+                } else {
+                    dragged_call_id = ( (conference_obj_t*) g_value_get_pointer (&val))->_confID;
+                    dragged_conf = (conference_obj_t*) g_value_get_pointer (&val);
+                }
+
+                break;
+
+            default:
+                return;
+        }
     }
 }
diff --git a/sflphone-client-gnome/src/contacts/calltree.h b/sflphone-client-gnome/src/contacts/calltree.h
index c383caa9ed9ee6ee6abaaf305584fdc8c2a060b7..d94d741bbb70a7be7c65fdbf34a3d18442f8eadf 100644
--- a/sflphone-client-gnome/src/contacts/calltree.h
+++ b/sflphone-client-gnome/src/contacts/calltree.h
@@ -67,7 +67,7 @@ typedef enum {
  * @return GtkWidget* A new widget
  */
 void
-calltree_create(calltab_t* tab, gboolean searchbar_type);
+calltree_create (calltab_t* tab, gboolean searchbar_type);
 
 /**
  * Add a call in the calltree
@@ -90,7 +90,7 @@ calltree_update_call (calltab_t* ct, callable_obj_t * c, GtkTreeIter *parent);
 void
 calltree_remove_call (calltab_t* ct, callable_obj_t * c, GtkTreeIter *parent);
 
-void 
+void
 calltree_add_history_entry (callable_obj_t * c);
 
 void
@@ -109,6 +109,6 @@ void
 calltree_display (calltab_t *tab);
 
 void
-row_activated(GtkTreeView *, GtkTreePath *, GtkTreeViewColumn *, void *);
+row_activated (GtkTreeView *, GtkTreePath *, GtkTreeViewColumn *, void *);
 
 #endif
diff --git a/sflphone-client-gnome/src/contacts/conferencelist.c b/sflphone-client-gnome/src/contacts/conferencelist.c
index 42216fdcd0c6427457b1b34f7d22df3603829702..155b82d240820d8c261a6de7482858b59a2d1e38 100644
--- a/sflphone-client-gnome/src/contacts/conferencelist.c
+++ b/sflphone-client-gnome/src/contacts/conferencelist.c
@@ -31,13 +31,13 @@
 #include <conferencelist.h>
 
 
-gchar* 
+gchar*
 generate_conf_id (void)
 {
     gchar *conf_id;
 
-    conf_id = g_new0(gchar, 30);
-    g_sprintf(conf_id, "%d", rand());
+    conf_id = g_new0 (gchar, 30);
+    g_sprintf (conf_id, "%d", rand());
     return conf_id;
 }
 
@@ -65,12 +65,12 @@ conferencelist_reset()
 
 
 void
-conferencelist_add(const conference_obj_t* conf)
+conferencelist_add (const conference_obj_t* conf)
 {
-    gchar* c = (gchar*)conferencelist_get(conf->_confID);
-    if(!c)
-    {
-        g_queue_push_tail (conferenceQueue, (gpointer)conf);
+    gchar* c = (gchar*) conferencelist_get (conf->_confID);
+
+    if (!c) {
+        g_queue_push_tail (conferenceQueue, (gpointer) conf);
     }
 }
 
@@ -78,40 +78,36 @@ conferencelist_add(const conference_obj_t* conf)
 void
 conferencelist_remove (const gchar* conf)
 {
-    gchar* c = (gchar*)conferencelist_get(conf);
-    if (c)
-    {
-        g_queue_remove(conferenceQueue, c);
+    gchar* c = (gchar*) conferencelist_get (conf);
+
+    if (c) {
+        g_queue_remove (conferenceQueue, c);
     }
 }
 
-conference_obj_t* 
+conference_obj_t*
 conferencelist_get (const gchar* conf_id)
 {
 
-    GList* c = g_queue_find_custom(conferenceQueue, conf_id, is_confID_confstruct);
-    if (c)
-    {
-	return (conference_obj_t*)c->data;
-    }
-    else
-    {
-	return NULL;
+    GList* c = g_queue_find_custom (conferenceQueue, conf_id, is_confID_confstruct);
+
+    if (c) {
+        return (conference_obj_t*) c->data;
+    } else {
+        return NULL;
     }
 }
 
 
-conference_obj_t* 
-conferencelist_get_nth ( guint n )
+conference_obj_t*
+conferencelist_get_nth (guint n)
 {
-    GList* c = g_queue_peek_nth(conferenceQueue, n);
-    if (c)
-    {
-	return (conference_obj_t*)c->data;
-    }
-    else
-    {
-	return NULL;
+    GList* c = g_queue_peek_nth (conferenceQueue, n);
+
+    if (c) {
+        return (conference_obj_t*) c->data;
+    } else {
+        return NULL;
     }
 }
 
diff --git a/sflphone-client-gnome/src/contacts/conferencelist.h b/sflphone-client-gnome/src/contacts/conferencelist.h
index 2652b892b7aba376bd1692224a8eafa3741f0bdc..afde7f2e0878d86035305ba27c19ec0580000fbf 100644
--- a/sflphone-client-gnome/src/contacts/conferencelist.h
+++ b/sflphone-client-gnome/src/contacts/conferencelist.h
@@ -74,7 +74,7 @@ conferencelist_get_size ();
   * @param n The position of the call you want
   * @return A call or NULL */
 conference_obj_t*
-conferencelist_get_nth (guint n );
+conferencelist_get_nth (guint n);
 
 /** Return the call corresponding to the callID
   * @param n The callID of the call you want
diff --git a/sflphone-client-gnome/src/contacts/history.c b/sflphone-client-gnome/src/contacts/history.c
index f354e73ceef65f5946a4b8386f4f68373d41c907..3a11a70f0f2e2b2f0bf8f219ea123726fac046bd 100644
--- a/sflphone-client-gnome/src/contacts/history.c
+++ b/sflphone-client-gnome/src/contacts/history.c
@@ -41,7 +41,7 @@ static gboolean history_is_visible (GtkTreeModel*, GtkTreeIter*, gpointer);
 
 void history_search (SearchType search_type)
 {
-    if(history_filter != NULL) {
+    if (history_filter != NULL) {
         gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (history_filter));
     }
 }
@@ -64,58 +64,57 @@ void history_set_searchbar_widget (GtkWidget *searchbar)
     history_searchbar_widget = searchbar;
 }
 
-static GtkTreeModel* history_create_filter (GtkTreeModel* child) 
+static GtkTreeModel* history_create_filter (GtkTreeModel* child)
 {
     GtkTreeModel* ret;
 
-    DEBUG("Create Filter");
+    DEBUG ("Create Filter");
     ret = gtk_tree_model_filter_new (child, NULL);
     gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (ret), history_is_visible, NULL, NULL);
     return GTK_TREE_MODEL (ret);
 }
 
-static gboolean history_is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSED) 
+static gboolean history_is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpointer data UNUSED)
 {
     GValue val, obj;
 
     callable_obj_t *history_entry = NULL;
     gchar* text = NULL;
 
-    gchar* search = (gchar*)gtk_entry_get_text(GTK_ENTRY(history_searchbar_widget));
+    gchar* search = (gchar*) gtk_entry_get_text (GTK_ENTRY (history_searchbar_widget));
+
+    memset (&val, 0, sizeof (val));
+    memset (&obj, 0, sizeof (obj));
 
-    memset (&val, 0, sizeof(val));
-    memset (&obj, 0, sizeof(obj));
-    
     // Fetch the call description
-    gtk_tree_model_get_value (GTK_TREE_MODEL(model), iter, 1, &val);
-    if(G_VALUE_HOLDS_STRING(&val)){
-        text = (gchar *)g_value_get_string(&val);
+    gtk_tree_model_get_value (GTK_TREE_MODEL (model), iter, 1, &val);
+
+    if (G_VALUE_HOLDS_STRING (&val)) {
+        text = (gchar *) g_value_get_string (&val);
     }
-    
+
     // Fetch the call type
-    gtk_tree_model_get_value (GTK_TREE_MODEL(model), iter, 3, &obj);
-    if (G_VALUE_HOLDS_POINTER (&obj)){
+    gtk_tree_model_get_value (GTK_TREE_MODEL (model), iter, 3, &obj);
+
+    if (G_VALUE_HOLDS_POINTER (&obj)) {
         history_entry = (gpointer) g_value_get_pointer (&obj);
     }
 
-    if(text != NULL)
-    {
-        if (history_entry)
-        {
+    if (text != NULL) {
+        if (history_entry) {
             // Filter according to the type of call
             // MISSED, INCOMING, OUTGOING, ALL
-            if ((int)get_current_history_search_type () == SEARCH_ALL)
-                return g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
-            else
-            {
+            if ( (int) get_current_history_search_type () == SEARCH_ALL)
+                return g_regex_match_simple (search, text, G_REGEX_CASELESS, 0);
+            else {
                 // We need a match on the history_state_t and the current search type
-                return (history_entry->_history_state + 1) == (int)get_current_history_search_type () &&  
-                    g_regex_match_simple(search, text, G_REGEX_CASELESS, 0);
+                return (history_entry->_history_state + 1) == (int) get_current_history_search_type () &&
+                       g_regex_match_simple (search, text, G_REGEX_CASELESS, 0);
             }
         }
     }
 
-    // Clean up 
+    // Clean up
     g_value_unset (&val);
     g_value_unset (&obj);
 
diff --git a/sflphone-client-gnome/src/contacts/history.h b/sflphone-client-gnome/src/contacts/history.h
index f91393ccb1316d1da74bb171b7e8d7c2d5595ee8..a02e4857832d7f8c345beb7f7d4cba8d63bd0262 100644
--- a/sflphone-client-gnome/src/contacts/history.h
+++ b/sflphone-client-gnome/src/contacts/history.h
@@ -63,6 +63,6 @@ void history_reinit (calltab_t* history);
  * Set history search bar widget (needed for is_visible)
  */
 void
-history_set_searchbar_widget(GtkWidget *);
+history_set_searchbar_widget (GtkWidget *);
 
 #endif
diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c
index 09e2da62e4f79badf94d55b9010b7aeed909b3cf..eec22e53011b822c0af323d84c72efcf99e4f20b 100644
--- a/sflphone-client-gnome/src/contacts/searchbar.c
+++ b/sflphone-client-gnome/src/contacts/searchbar.c
@@ -47,12 +47,11 @@ GdkPixbuf *missed_pixbuf = NULL;
 
 void searchbar_entry_changed (GtkEntry* entry, gchar* arg1 UNUSED, gpointer data UNUSED)
 {
-    DEBUG("searchbar_entry_changed");
+    DEBUG ("searchbar_entry_changed");
 
     if (active_calltree == contacts) {
         addressbook_search (entry);
-    }
-    else if (active_calltree == history) {
+    } else if (active_calltree == history) {
         history_search (HistorySearchType);
     }
 }
@@ -65,12 +64,12 @@ static void search_all (GtkWidget *item, GtkEntry  *entry)
 
     gtk_entry_set_icon_from_stock (entry, GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND);
     gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY,
-            g_markup_printf_escaped("%s\n%s", 
-                  _("Search all"),
-                  _("Click here to change the search type")));
+                                     g_markup_printf_escaped ("%s\n%s",
+                                                              _ ("Search all"),
+                                                              _ ("Click here to change the search type")));
 
     history_search (HistorySearchType);
-} 
+}
 
 static void search_by_missed (GtkWidget *item, GtkEntry  *entry)
 {
@@ -78,11 +77,11 @@ static void search_by_missed (GtkWidget *item, GtkEntry  *entry)
 
     gtk_entry_set_icon_from_pixbuf (entry, GTK_ENTRY_ICON_PRIMARY, missed_pixbuf);
     gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY,
-            g_markup_printf_escaped("%s\n%s", 
-                  _("Search by missed call"),
-                  _("Click here to change the search type")));
+                                     g_markup_printf_escaped ("%s\n%s",
+                                                              _ ("Search by missed call"),
+                                                              _ ("Click here to change the search type")));
     history_search (HistorySearchType);
-} 
+}
 
 static void search_by_incoming (GtkWidget *item, GtkEntry *entry)
 {
@@ -90,11 +89,11 @@ static void search_by_incoming (GtkWidget *item, GtkEntry *entry)
 
     gtk_entry_set_icon_from_pixbuf (entry, GTK_ENTRY_ICON_PRIMARY, incoming_pixbuf);
     gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY,
-            g_markup_printf_escaped("%s\n%s", 
-                  _("Search by incoming call"),
-                  _("Click here to change the search type")));
+                                     g_markup_printf_escaped ("%s\n%s",
+                                                              _ ("Search by incoming call"),
+                                                              _ ("Click here to change the search type")));
     history_search (HistorySearchType);
-} 
+}
 
 static void search_by_outgoing (GtkWidget *item, GtkEntry  *entry)
 {
@@ -102,18 +101,18 @@ static void search_by_outgoing (GtkWidget *item, GtkEntry  *entry)
 
     gtk_entry_set_icon_from_pixbuf (entry, GTK_ENTRY_ICON_PRIMARY, outgoing_pixbuf);
     gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_PRIMARY,
-            g_markup_printf_escaped("%s\n%s", 
-                  _("Search by outgoing call"),
-                  _("Click here to change the search type")));
+                                     g_markup_printf_escaped ("%s\n%s",
+                                                              _ ("Search by outgoing call"),
+                                                              _ ("Click here to change the search type")));
     history_search (HistorySearchType);
-} 
+}
 
 static void icon_press_cb (GtkEntry *entry, gint position, GdkEventButton *event, gpointer data)
 {
     if (position == GTK_ENTRY_ICON_PRIMARY && active_calltree == history)
-        gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 
-                event->button, event->time);
-    else 
+        gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
+                        event->button, event->time);
+    else
         gtk_entry_set_text (entry, "");
 }
 
@@ -128,30 +127,28 @@ static void text_changed_cb (GtkEntry *entry, GParamSpec *pspec)
 #endif
 
 void
-focus_on_searchbar_out(){
-    DEBUG("set_focus_on_searchbar_out");
+focus_on_searchbar_out()
+{
+    DEBUG ("set_focus_on_searchbar_out");
     // gtk_widget_grab_focus(GTK_WIDGET(sw));
     focus_is_on_searchbar = FALSE;
 }
 
 void
-focus_on_searchbar_in(){
-    DEBUG("set_focus_on_searchbar_in");
+focus_on_searchbar_in()
+{
+    DEBUG ("set_focus_on_searchbar_in");
     // gtk_widget_grab_focus(GTK_WIDGET(sw));
     focus_is_on_searchbar = TRUE;
 }
 
-void searchbar_init(calltab_t *tab)
+void searchbar_init (calltab_t *tab)
 {
-    if (g_strcasecmp (tab->_name, CONTACTS) == 0) 
-    {
+    if (g_strcasecmp (tab->_name, CONTACTS) == 0) {
         addressbook_init();
-    }
-    else if (g_strcasecmp (tab->_name, HISTORY) == 0) 
-    {
+    } else if (g_strcasecmp (tab->_name, HISTORY) == 0) {
         history_init();
-    }
-    else
+    } else
         ERROR ("searchbar.c - searchbar_init should not happen within this widget\n");
 }
 
@@ -160,7 +157,7 @@ GtkWidget* history_searchbar_new (void)
 
     GtkWidget *ret, *item, *image;
 
-    ret = gtk_hbox_new(FALSE, 0);
+    ret = gtk_hbox_new (FALSE, 0);
 
 #if GTK_CHECK_VERSION(2,16,0)
 
@@ -213,40 +210,41 @@ GtkWidget* history_searchbar_new (void)
 
 #else
     searchbox = sexy_icon_entry_new();
-    image = gtk_image_new_from_stock( GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR);
-    sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(searchbox), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
-    sexy_icon_entry_add_clear_button( SEXY_ICON_ENTRY(searchbox) );
+    image = gtk_image_new_from_stock (GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR);
+    sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (searchbox), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
+    sexy_icon_entry_add_clear_button (SEXY_ICON_ENTRY (searchbox));
 #endif
 
-    g_signal_connect_after(GTK_ENTRY(searchbox), "changed", G_CALLBACK(searchbar_entry_changed), NULL);
+    g_signal_connect_after (GTK_ENTRY (searchbox), "changed", G_CALLBACK (searchbar_entry_changed), NULL);
     g_signal_connect_after (G_OBJECT (searchbox), "focus-in-event",
-            G_CALLBACK (focus_on_searchbar_in), NULL);
+                            G_CALLBACK (focus_on_searchbar_in), NULL);
     g_signal_connect_after (G_OBJECT (searchbox), "focus-out-event",
-            G_CALLBACK (focus_on_searchbar_out), NULL);
+                            G_CALLBACK (focus_on_searchbar_out), NULL);
 
-    gtk_box_pack_start(GTK_BOX(ret), searchbox, TRUE, TRUE, 0);
-    history_set_searchbar_widget(searchbox);
+    gtk_box_pack_start (GTK_BOX (ret), searchbox, TRUE, TRUE, 0);
+    history_set_searchbar_widget (searchbox);
 
     return ret;
 }
 
-GtkWidget* contacts_searchbar_new () {
+GtkWidget* contacts_searchbar_new ()
+{
 
     GtkWidget *ret;
 
-    ret = gtk_hbox_new(FALSE, 0);
+    ret = gtk_hbox_new (FALSE, 0);
 
 #if GTK_CHECK_VERSION(2,16,0)
 
-    GdkPixbuf *pixbuf; 
+    GdkPixbuf *pixbuf;
 
     searchbox = gtk_entry_new();
     gtk_entry_set_icon_from_stock (GTK_ENTRY (searchbox), GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR);
     pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/stock_person.svg", NULL);
     gtk_entry_set_icon_from_pixbuf (GTK_ENTRY (searchbox), GTK_ENTRY_ICON_PRIMARY, pixbuf);
     gtk_entry_set_icon_tooltip_text (GTK_ENTRY (searchbox), GTK_ENTRY_ICON_PRIMARY,
-            "Search contacts\n"
-            "GNOME evolution backend");
+                                     "Search contacts\n"
+                                     "GNOME evolution backend");
 
 
     // Set the clean insensitive
@@ -260,29 +258,31 @@ GtkWidget* contacts_searchbar_new () {
     GtkWidget *image;
 
     searchbox = sexy_icon_entry_new();
-    image = gtk_image_new_from_stock( GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR);
-    sexy_icon_entry_set_icon( SEXY_ICON_ENTRY(searchbox), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE(image) );
-    sexy_icon_entry_add_clear_button( SEXY_ICON_ENTRY(searchbox) );
+    image = gtk_image_new_from_stock (GTK_STOCK_FIND , GTK_ICON_SIZE_SMALL_TOOLBAR);
+    sexy_icon_entry_set_icon (SEXY_ICON_ENTRY (searchbox), SEXY_ICON_ENTRY_PRIMARY , GTK_IMAGE (image));
+    sexy_icon_entry_add_clear_button (SEXY_ICON_ENTRY (searchbox));
 #endif
 
-    g_signal_connect_after(GTK_ENTRY(searchbox), "changed", G_CALLBACK(searchbar_entry_changed), NULL);
+    g_signal_connect_after (GTK_ENTRY (searchbox), "changed", G_CALLBACK (searchbar_entry_changed), NULL);
 
     g_signal_connect_after (G_OBJECT (searchbox), "focus-in-event",
-            G_CALLBACK (focus_on_searchbar_in), NULL);
+                            G_CALLBACK (focus_on_searchbar_in), NULL);
     g_signal_connect_after (G_OBJECT (searchbox), "focus-out-event",
-            G_CALLBACK (focus_on_searchbar_out), NULL);
+                            G_CALLBACK (focus_on_searchbar_out), NULL);
 
-    gtk_box_pack_start(GTK_BOX(ret), searchbox, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX (ret), searchbox, TRUE, TRUE, 0);
 
     return ret;
 }
 
-void activateWaitingLayer() {
-    gtk_widget_show(waitingLayer);
+void activateWaitingLayer()
+{
+    gtk_widget_show (waitingLayer);
 }
 
-void deactivateWaitingLayer() {
-    gtk_widget_hide(waitingLayer);
+void deactivateWaitingLayer()
+{
+    gtk_widget_hide (waitingLayer);
 }
 
 SearchType get_current_history_search_type (void)
diff --git a/sflphone-client-gnome/src/contacts/searchbar.h b/sflphone-client-gnome/src/contacts/searchbar.h
index f1464cd554a2d1385fa5bcfafab0d3faf1d5cfd9..0fa107cce7fd48f3b82d74b9f97c45fa3ca8cb4d 100644
--- a/sflphone-client-gnome/src/contacts/searchbar.h
+++ b/sflphone-client-gnome/src/contacts/searchbar.h
@@ -69,7 +69,7 @@ SearchType get_current_history_search_type (void);
 /**
  * Initialize a specific search bar
  */
-void searchbar_init(calltab_t *);
+void searchbar_init (calltab_t *);
 
 /**
  * Activate a waiting layer during search
diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c
index 6e6659d8006ccf9deba223b87860b5a3e1aa713e..f1284db9450fbe237daebb26672dfeccb6602938 100644
--- a/sflphone-client-gnome/src/dbus/dbus.c
+++ b/sflphone-client-gnome/src/dbus/dbus.c
@@ -54,1880 +54,1824 @@ DBusGProxy * callManagerProxy;
 DBusGProxy * configurationManagerProxy;
 DBusGProxy * instanceProxy;
 
-	static void
-incoming_call_cb(DBusGProxy *proxy UNUSED, const gchar* accountID,
-		const gchar* callID, const gchar* from, void * foo  UNUSED )
+static void
+incoming_call_cb (DBusGProxy *proxy UNUSED, const gchar* accountID,
+                  const gchar* callID, const gchar* from, void * foo  UNUSED)
 {
-	DEBUG("Incoming call (%s) from %s", callID, from);
+    DEBUG ("Incoming call (%s) from %s", callID, from);
 
-	callable_obj_t * c;
-	gchar *peer_name, *peer_number;
-	// We receive the from field under a formatted way. We want to extract the number and the name of the caller
-	peer_name = call_get_peer_name(from);
-	peer_number = call_get_peer_number(from);
+    callable_obj_t * c;
+    gchar *peer_name, *peer_number;
+    // We receive the from field under a formatted way. We want to extract the number and the name of the caller
+    peer_name = call_get_peer_name (from);
+    peer_number = call_get_peer_number (from);
 
-	DEBUG("    peer name: %s", peer_name);
-	DEBUG("    peer number: %s", peer_number);
+    DEBUG ("    peer name: %s", peer_name);
+    DEBUG ("    peer number: %s", peer_number);
 
-	create_new_call(CALL, CALL_STATE_INCOMING, g_strdup(callID), g_strdup(
-				accountID), peer_name, peer_number, &c);
+    create_new_call (CALL, CALL_STATE_INCOMING, g_strdup (callID), g_strdup (
+                         accountID), peer_name, peer_number, &c);
 #if GTK_CHECK_VERSION(2,10,0)
-	status_tray_icon_blink(TRUE);
-	popup_main_window();
+    status_tray_icon_blink (TRUE);
+    popup_main_window();
 #endif
 
-	set_timestamp(&c->_time_start);
-	notify_incoming_call(c);
-	sflphone_incoming_call(c);
-}
-
-	static void
-zrtp_negotiation_failed_cb(DBusGProxy *proxy UNUSED, const gchar* callID,
-		const gchar* reason, const gchar* severity, void * foo  UNUSED )
-{
-	DEBUG ("Zrtp negotiation failed.");
-	main_window_zrtp_negotiation_failed(callID, reason, severity);
-	callable_obj_t * c = NULL;
-	c = calllist_get(current_calls, callID);
-	if (c)
-	{
-		notify_zrtp_negotiation_failed(c);
-	}
-}
-
-	static void
-curent_selected_codec(DBusGProxy *proxy UNUSED, const gchar* callID,
-		const gchar* codecName, void * foo  UNUSED )
-{
-	// DEBUG ("%s codec decided for call %s",codecName,callID);
-	// sflphone_display_selected_codec (codecName);
-}
-
-	static void
-volume_changed_cb(DBusGProxy *proxy UNUSED, const gchar* device, const gdouble value,
-		void * foo  UNUSED )
-{
-	DEBUG ("Volume of %s changed to %f.",device, value);
-	set_slider(device, value);
-}
-
-	static void
-voice_mail_cb(DBusGProxy *proxy UNUSED, const gchar* accountID, const guint nb,
-		void * foo  UNUSED )
-{
-	DEBUG ("%d Voice mail waiting!",nb);
-	sflphone_notify_voice_mail(accountID, nb);
-}
-
-	static void
-incoming_message_cb(DBusGProxy *proxy UNUSED, const gchar* callID UNUSED, const gchar *from, const gchar* msg, void * foo  UNUSED )
-{
-	DEBUG ("Message %s!",msg);
-
-	// Get the call information. Does this call exist?
-	callable_obj_t * c = calllist_get (current_calls, callID);
-
-	/* First check if the call is valid */
-	if (c) {
-
-		/* Make the instant messaging main window pops */
-		im_widget_display (&c);
-
-		/* Display the message */
-		im_widget_add_message (c->_im_widget, get_peer_information (c), msg, 0);
-	
-	} else {
-		ERROR ("Message received, but no recipient found");
-	}
-}
-
-	static void
-call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* state,
-		void * foo  UNUSED )
-{
-	DEBUG ("Call %s state %s",callID, state);
-	callable_obj_t * c = calllist_get(current_calls, callID);
-	if (c)
-	{
-		if (strcmp(state, "HUNGUP") == 0)
-		{
-			if (c->_state == CALL_STATE_CURRENT)
-			{
-				// peer hung up, the conversation was established, so _stop has been initialized with the current time value
-				DEBUG("call state current");
-				set_timestamp(&c->_time_stop);
-				calltree_update_call(history, c, NULL);
-			}
-			stop_notification();
-			sflphone_hung_up(c);
-			calltree_update_call(history, c, NULL );
-			status_bar_display_account();
-		}
-		else if (strcmp(state, "UNHOLD_CURRENT") == 0)
-		{
-			sflphone_current(c);
-		}
-		else if (strcmp(state, "UNHOLD_RECORD") == 0)
-		{
-			sflphone_record(c);
-		}
-		else if (strcmp(state, "HOLD") == 0)
-		{
-			sflphone_hold(c);
-		}
-		else if (strcmp(state, "RINGING") == 0)
-		{
-			sflphone_ringing(c);
-		}
-		else if (strcmp(state, "CURRENT") == 0)
-		{
-			sflphone_current(c);
-		}
-		else if (strcmp(state, "FAILURE") == 0)
-		{
-			sflphone_fail(c);
-		}
-		else if (strcmp(state, "BUSY") == 0)
-		{
-			sflphone_busy(c);
-		}
-	}
-	else
-	{
-		// The callID is unknow, threat it like a new call
-		// If it were an incoming call, we won't be here
-		// It means that a new call has been initiated with an other client (cli for instance)
-		if (strcmp(state, "RINGING") == 0 || strcmp(state, "CURRENT") == 0)
-		{
-			callable_obj_t *new_call;
-			GHashTable *call_details;
-			gchar *type;
-
-			DEBUG ("New ringing call! accountID: %s", callID);
-
-			// We fetch the details associated to the specified call
-			call_details = dbus_get_call_details(callID);
-			create_new_call_from_details(callID, call_details, &new_call);
-
-			// Restore the callID to be synchronous with the daemon
-			new_call->_callID = g_strdup(callID);
-			type = g_hash_table_lookup(call_details, "CALL_TYPE");
-
-			if (g_strcasecmp(type, "0") == 0)
-			{
-				// DEBUG("incoming\n");
-				new_call->_history_state = INCOMING;
-			}
-			else
-			{
-				// DEBUG("outgoing\n");
-				new_call->_history_state = OUTGOING;
-			}
-
-			calllist_add(current_calls, new_call);
-			calllist_add(history, new_call);
-			calltree_add_call(current_calls, new_call, NULL);
-			update_actions();
-			calltree_display(current_calls);
-
-			//sflphone_incoming_call (new_call);
-		}
-	}
-}
-
-	static void
-conference_changed_cb(DBusGProxy *proxy UNUSED, const gchar* confID,
-		const gchar* state, void * foo  UNUSED )
-{
-
-	// sflphone_display_transfer_status("Transfer successfull");
-	conference_obj_t* changed_conf = conferencelist_get(confID);
-	gchar** participants;
-	gchar** part;
-
-	DEBUG("conference new state %s\n", state);
-
-	if (changed_conf)
-	{
-		// remove old conference from calltree
-		calltree_remove_conference(current_calls, changed_conf, NULL);
-
-		// update conference state
-		if (strcmp(state, "ACTIVE_ATACHED") == 0)
-		{
-			changed_conf->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
-		}
-		else if (strcmp(state, "ACTIVE_DETACHED") == 0)
-		{
-			changed_conf->_state = CONFERENCE_STATE_ACTIVE_DETACHED;
-		}
-		else if (strcmp(state, "HOLD") == 0)
-		{
-			changed_conf->_state = CONFERENCE_STATE_HOLD;
-		}
-		else
-		{
-			DEBUG("Error: conference state not recognized");
-		}
-
-		participants = (gchar**) dbus_get_participant_list(changed_conf->_confID);
-
-		// update conferece participants
-		conference_participant_list_update(participants, changed_conf);
-
-		// add new conference to calltree
-		calltree_add_conference(current_calls, changed_conf);
-	}
-}
-
-	static void
-conference_created_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo  UNUSED )
+    set_timestamp (&c->_time_start);
+    notify_incoming_call (c);
+    sflphone_incoming_call (c);
+}
+
+static void
+zrtp_negotiation_failed_cb (DBusGProxy *proxy UNUSED, const gchar* callID,
+                            const gchar* reason, const gchar* severity, void * foo  UNUSED)
+{
+    DEBUG ("Zrtp negotiation failed.");
+    main_window_zrtp_negotiation_failed (callID, reason, severity);
+    callable_obj_t * c = NULL;
+    c = calllist_get (current_calls, callID);
+
+    if (c) {
+        notify_zrtp_negotiation_failed (c);
+    }
+}
+
+static void
+curent_selected_codec (DBusGProxy *proxy UNUSED, const gchar* callID,
+                       const gchar* codecName, void * foo  UNUSED)
+{
+    // DEBUG ("%s codec decided for call %s",codecName,callID);
+    // sflphone_display_selected_codec (codecName);
+}
+
+static void
+volume_changed_cb (DBusGProxy *proxy UNUSED, const gchar* device, const gdouble value,
+                   void * foo  UNUSED)
+{
+    DEBUG ("Volume of %s changed to %f.",device, value);
+    set_slider (device, value);
+}
+
+static void
+voice_mail_cb (DBusGProxy *proxy UNUSED, const gchar* accountID, const guint nb,
+               void * foo  UNUSED)
 {
-	DEBUG ("DBUS: Conference %s added", confID);
+    DEBUG ("%d Voice mail waiting!",nb);
+    sflphone_notify_voice_mail (accountID, nb);
+}
 
-	conference_obj_t* new_conf;
-	callable_obj_t* call;
-	gchar* call_id;
-	gchar** participants;
-	gchar** part;
+static void
+incoming_message_cb (DBusGProxy *proxy UNUSED, const gchar* callID UNUSED, const gchar *from, const gchar* msg, void * foo  UNUSED)
+{
+    DEBUG ("Message %s!",msg);
+
+    // Get the call information. Does this call exist?
+    callable_obj_t * c = calllist_get (current_calls, callID);
 
-	create_new_conference(CONFERENCE_STATE_ACTIVE_ATACHED, confID, &new_conf);
+    /* First check if the call is valid */
+    if (c) {
 
-	participants = (gchar**) dbus_get_participant_list(new_conf->_confID);
+        /* Make the instant messaging main window pops */
+        im_widget_display (&c);
 
-	// Update conference list
-	conference_participant_list_update(participants, new_conf);
+        /* Display the message */
+        im_widget_add_message (c->_im_widget, get_peer_information (c), msg, 0);
 
-	// Add conference ID in in each calls
-	for (part = participants; *part; part++) {
-		call_id = (gchar*) (*part);
-		call = calllist_get(current_calls, call_id);
-		call->_confID = g_strdup(confID);
-	}
+    } else {
+        ERROR ("Message received, but no recipient found");
+    }
+}
 
-	conferencelist_add(new_conf);
-	calltree_add_conference(current_calls, new_conf);
+static void
+call_state_cb (DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* state,
+               void * foo  UNUSED)
+{
+    DEBUG ("Call %s state %s",callID, state);
+    callable_obj_t * c = calllist_get (current_calls, callID);
+
+    if (c) {
+        if (strcmp (state, "HUNGUP") == 0) {
+            if (c->_state == CALL_STATE_CURRENT) {
+                // peer hung up, the conversation was established, so _stop has been initialized with the current time value
+                DEBUG ("call state current");
+                set_timestamp (&c->_time_stop);
+                calltree_update_call (history, c, NULL);
+            }
+
+            stop_notification();
+            sflphone_hung_up (c);
+            calltree_update_call (history, c, NULL);
+            status_bar_display_account();
+        } else if (strcmp (state, "UNHOLD_CURRENT") == 0) {
+            sflphone_current (c);
+        } else if (strcmp (state, "UNHOLD_RECORD") == 0) {
+            sflphone_record (c);
+        } else if (strcmp (state, "HOLD") == 0) {
+            sflphone_hold (c);
+        } else if (strcmp (state, "RINGING") == 0) {
+            sflphone_ringing (c);
+        } else if (strcmp (state, "CURRENT") == 0) {
+            sflphone_current (c);
+        } else if (strcmp (state, "FAILURE") == 0) {
+            sflphone_fail (c);
+        } else if (strcmp (state, "BUSY") == 0) {
+            sflphone_busy (c);
+        }
+    } else {
+        // The callID is unknow, threat it like a new call
+        // If it were an incoming call, we won't be here
+        // It means that a new call has been initiated with an other client (cli for instance)
+        if (strcmp (state, "RINGING") == 0 || strcmp (state, "CURRENT") == 0) {
+            callable_obj_t *new_call;
+            GHashTable *call_details;
+            gchar *type;
+
+            DEBUG ("New ringing call! accountID: %s", callID);
+
+            // We fetch the details associated to the specified call
+            call_details = dbus_get_call_details (callID);
+            create_new_call_from_details (callID, call_details, &new_call);
+
+            // Restore the callID to be synchronous with the daemon
+            new_call->_callID = g_strdup (callID);
+            type = g_hash_table_lookup (call_details, "CALL_TYPE");
+
+            if (g_strcasecmp (type, "0") == 0) {
+                // DEBUG("incoming\n");
+                new_call->_history_state = INCOMING;
+            } else {
+                // DEBUG("outgoing\n");
+                new_call->_history_state = OUTGOING;
+            }
+
+            calllist_add (current_calls, new_call);
+            calllist_add (history, new_call);
+            calltree_add_call (current_calls, new_call, NULL);
+            update_actions();
+            calltree_display (current_calls);
+
+            //sflphone_incoming_call (new_call);
+        }
+    }
 }
 
-	static void
-conference_removed_cb(DBusGProxy *proxy UNUSED, const gchar* confID, void * foo  UNUSED )
+static void
+conference_changed_cb (DBusGProxy *proxy UNUSED, const gchar* confID,
+                       const gchar* state, void * foo  UNUSED)
 {
-	DEBUG ("DBUS: Conference removed %s", confID);
 
-	conference_obj_t * c = conferencelist_get(confID);
-	calltree_remove_conference(current_calls, c, NULL);
+    // sflphone_display_transfer_status("Transfer successfull");
+    conference_obj_t* changed_conf = conferencelist_get (confID);
+    gchar** participants;
+    gchar** part;
+
+    DEBUG ("conference new state %s\n", state);
+
+    if (changed_conf) {
+        // remove old conference from calltree
+        calltree_remove_conference (current_calls, changed_conf, NULL);
 
-	GSList *participant = c->participant_list;
-	callable_obj_t *call;
-	while(participant) {
+        // update conference state
+        if (strcmp (state, "ACTIVE_ATACHED") == 0) {
+            changed_conf->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
+        } else if (strcmp (state, "ACTIVE_DETACHED") == 0) {
+            changed_conf->_state = CONFERENCE_STATE_ACTIVE_DETACHED;
+        } else if (strcmp (state, "HOLD") == 0) {
+            changed_conf->_state = CONFERENCE_STATE_HOLD;
+        } else {
+            DEBUG ("Error: conference state not recognized");
+        }
 
-		call = calllist_get(current_calls, (const gchar *)(participant->data));
-		if(call) {
-			DEBUG("DBUS: Remove participant %s", call->_callID);
-			if(call->_confID){
-				g_free(call->_confID);
-				call->_confID = NULL;
-			}
-		}
-		participant = conference_next_participant(participant);
-	}
+        participants = (gchar**) dbus_get_participant_list (changed_conf->_confID);
 
-	conferencelist_remove(c->_confID);
+        // update conferece participants
+        conference_participant_list_update (participants, changed_conf);
+
+        // add new conference to calltree
+        calltree_add_conference (current_calls, changed_conf);
+    }
 }
 
-	static void
-accounts_changed_cb(DBusGProxy *proxy UNUSED, void * foo  UNUSED )
+static void
+conference_created_cb (DBusGProxy *proxy UNUSED, const gchar* confID, void * foo  UNUSED)
 {
-	DEBUG ("Accounts changed");
-	sflphone_fill_account_list();
-	sflphone_fill_ip2ip_profile();
-	account_list_config_dialog_fill();
+    DEBUG ("DBUS: Conference %s added", confID);
+
+    conference_obj_t* new_conf;
+    callable_obj_t* call;
+    gchar* call_id;
+    gchar** participants;
+    gchar** part;
+
+    create_new_conference (CONFERENCE_STATE_ACTIVE_ATACHED, confID, &new_conf);
 
-	// Update the status bar in case something happened
-	// Should fix ticket #1215
-	status_bar_display_account();
+    participants = (gchar**) dbus_get_participant_list (new_conf->_confID);
 
-	// Update the tooltip on the status icon
-	statusicon_set_tooltip ();
+    // Update conference list
+    conference_participant_list_update (participants, new_conf);
+
+    // Add conference ID in in each calls
+    for (part = participants; *part; part++) {
+        call_id = (gchar*) (*part);
+        call = calllist_get (current_calls, call_id);
+        call->_confID = g_strdup (confID);
+    }
+
+    conferencelist_add (new_conf);
+    calltree_add_conference (current_calls, new_conf);
+}
+
+static void
+conference_removed_cb (DBusGProxy *proxy UNUSED, const gchar* confID, void * foo  UNUSED)
+{
+    DEBUG ("DBUS: Conference removed %s", confID);
+
+    conference_obj_t * c = conferencelist_get (confID);
+    calltree_remove_conference (current_calls, c, NULL);
+
+    GSList *participant = c->participant_list;
+    callable_obj_t *call;
+
+    while (participant) {
+
+        call = calllist_get (current_calls, (const gchar *) (participant->data));
+
+        if (call) {
+            DEBUG ("DBUS: Remove participant %s", call->_callID);
+
+            if (call->_confID) {
+                g_free (call->_confID);
+                call->_confID = NULL;
+            }
+        }
+
+        participant = conference_next_participant (participant);
+    }
+
+    conferencelist_remove (c->_confID);
 }
 
-	static void
-transfer_succeded_cb(DBusGProxy *proxy UNUSED, void * foo  UNUSED )
+static void
+accounts_changed_cb (DBusGProxy *proxy UNUSED, void * foo  UNUSED)
 {
-	DEBUG ("Transfer succeded\n");
-	sflphone_display_transfer_status("Transfer successfull");
+    DEBUG ("Accounts changed");
+    sflphone_fill_account_list();
+    sflphone_fill_ip2ip_profile();
+    account_list_config_dialog_fill();
+
+    // Update the status bar in case something happened
+    // Should fix ticket #1215
+    status_bar_display_account();
+
+    // Update the tooltip on the status icon
+    statusicon_set_tooltip ();
 }
 
-	static void
-transfer_failed_cb(DBusGProxy *proxy UNUSED, void * foo  UNUSED )
+static void
+transfer_succeded_cb (DBusGProxy *proxy UNUSED, void * foo  UNUSED)
 {
-	DEBUG ("Transfer failed\n");
-	sflphone_display_transfer_status("Transfer failed");
+    DEBUG ("Transfer succeded\n");
+    sflphone_display_transfer_status ("Transfer successfull");
 }
 
-	static void
-secure_sdes_on_cb(DBusGProxy *proxy UNUSED, const gchar *callID, void *foo UNUSED)
+static void
+transfer_failed_cb (DBusGProxy *proxy UNUSED, void * foo  UNUSED)
 {
-	DEBUG("SRTP using SDES is on");
-	callable_obj_t *c = calllist_get(current_calls, callID);
-	if (c)
-	{
-		sflphone_srtp_sdes_on(c);
-		notify_secure_on(c);
-	}
+    DEBUG ("Transfer failed\n");
+    sflphone_display_transfer_status ("Transfer failed");
+}
+
+static void
+secure_sdes_on_cb (DBusGProxy *proxy UNUSED, const gchar *callID, void *foo UNUSED)
+{
+    DEBUG ("SRTP using SDES is on");
+    callable_obj_t *c = calllist_get (current_calls, callID);
+
+    if (c) {
+        sflphone_srtp_sdes_on (c);
+        notify_secure_on (c);
+    }
 
 }
 
-	static void
-secure_sdes_off_cb(DBusGProxy *proxy UNUSED, const gchar *callID, void *foo UNUSED)
+static void
+secure_sdes_off_cb (DBusGProxy *proxy UNUSED, const gchar *callID, void *foo UNUSED)
 {
-	DEBUG("SRTP using SDES is off");
-	callable_obj_t *c = calllist_get(current_calls, callID);
-	if (c)
-	{
-		sflphone_srtp_sdes_off(c);
-		notify_secure_off(c);
-	}
+    DEBUG ("SRTP using SDES is off");
+    callable_obj_t *c = calllist_get (current_calls, callID);
+
+    if (c) {
+        sflphone_srtp_sdes_off (c);
+        notify_secure_off (c);
+    }
 }
 
-	static void
-secure_zrtp_on_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* cipher,
-		void * foo  UNUSED )
+static void
+secure_zrtp_on_cb (DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* cipher,
+                   void * foo  UNUSED)
 {
-	DEBUG ("SRTP using ZRTP is ON secure_on_cb");
-	callable_obj_t * c = calllist_get(current_calls, callID);
-	if (c)
-	{
-		c->_srtp_cipher = g_strdup(cipher);
+    DEBUG ("SRTP using ZRTP is ON secure_on_cb");
+    callable_obj_t * c = calllist_get (current_calls, callID);
 
-		sflphone_srtp_zrtp_on(c);
-		notify_secure_on(c);
-	}
+    if (c) {
+        c->_srtp_cipher = g_strdup (cipher);
+
+        sflphone_srtp_zrtp_on (c);
+        notify_secure_on (c);
+    }
 }
 
-	static void
-secure_zrtp_off_cb(DBusGProxy *proxy UNUSED, const gchar* callID, void * foo  UNUSED )
+static void
+secure_zrtp_off_cb (DBusGProxy *proxy UNUSED, const gchar* callID, void * foo  UNUSED)
 {
-	DEBUG ("SRTP using ZRTP is OFF");
-	callable_obj_t * c = calllist_get(current_calls, callID);
-	if (c)
-	{
-		sflphone_srtp_zrtp_off(c);
-		notify_secure_off(c);
-	}
+    DEBUG ("SRTP using ZRTP is OFF");
+    callable_obj_t * c = calllist_get (current_calls, callID);
+
+    if (c) {
+        sflphone_srtp_zrtp_off (c);
+        notify_secure_off (c);
+    }
 }
 
-	static void
-show_zrtp_sas_cb(DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* sas,
-		const gboolean verified, void * foo  UNUSED )
+static void
+show_zrtp_sas_cb (DBusGProxy *proxy UNUSED, const gchar* callID, const gchar* sas,
+                  const gboolean verified, void * foo  UNUSED)
 {
-	DEBUG ("Showing SAS");
-	callable_obj_t * c = calllist_get(current_calls, callID);
-	if (c)
-	{
-		sflphone_srtp_zrtp_show_sas(c, sas, verified);
-	}
+    DEBUG ("Showing SAS");
+    callable_obj_t * c = calllist_get (current_calls, callID);
+
+    if (c) {
+        sflphone_srtp_zrtp_show_sas (c, sas, verified);
+    }
 }
 
-	static void
-confirm_go_clear_cb(DBusGProxy *proxy UNUSED, const gchar* callID, void * foo  UNUSED )
+static void
+confirm_go_clear_cb (DBusGProxy *proxy UNUSED, const gchar* callID, void * foo  UNUSED)
 {
-	DEBUG ("Confirm Go Clear request");
-	callable_obj_t * c = calllist_get(current_calls, callID);
-	if (c)
-	{
-		sflphone_confirm_go_clear(c);
-	}
+    DEBUG ("Confirm Go Clear request");
+    callable_obj_t * c = calllist_get (current_calls, callID);
+
+    if (c) {
+        sflphone_confirm_go_clear (c);
+    }
 }
 
-	static void
-zrtp_not_supported_cb(DBusGProxy *proxy UNUSED, const gchar* callID, void * foo  UNUSED )
+static void
+zrtp_not_supported_cb (DBusGProxy *proxy UNUSED, const gchar* callID, void * foo  UNUSED)
 {
-	DEBUG ("ZRTP not supported on the other end");
-	callable_obj_t * c = calllist_get(current_calls, callID);
-	if (c)
-	{
-		sflphone_srtp_zrtp_not_supported(c);
-		notify_zrtp_not_supported(c);
-	}
+    DEBUG ("ZRTP not supported on the other end");
+    callable_obj_t * c = calllist_get (current_calls, callID);
+
+    if (c) {
+        sflphone_srtp_zrtp_not_supported (c);
+        notify_zrtp_not_supported (c);
+    }
 }
 
-	static void
-sip_call_state_cb(DBusGProxy *proxy UNUSED, const gchar* callID,
-		const gchar* description, const guint code, void * foo  UNUSED )
+static void
+sip_call_state_cb (DBusGProxy *proxy UNUSED, const gchar* callID,
+                   const gchar* description, const guint code, void * foo  UNUSED)
 {
-	callable_obj_t * c = NULL;
-	c = calllist_get(current_calls, callID);
+    callable_obj_t * c = NULL;
+    c = calllist_get (current_calls, callID);
 
-	if (c != NULL)
-	{
-		DEBUG("sip_call_state_cb received code %d", code);
-		sflphone_call_state_changed(c, description, code);
-	}
+    if (c != NULL) {
+        DEBUG ("sip_call_state_cb received code %d", code);
+        sflphone_call_state_changed (c, description, code);
+    }
 }
 
-	static void
-error_alert(DBusGProxy *proxy UNUSED, int errCode, void * foo  UNUSED )
+static void
+error_alert (DBusGProxy *proxy UNUSED, int errCode, void * foo  UNUSED)
 {
-	ERROR ("Error notifying : (%i)", errCode);
-	sflphone_throw_exception(errCode);
+    ERROR ("Error notifying : (%i)", errCode);
+    sflphone_throw_exception (errCode);
 }
 
-	gboolean
+gboolean
 dbus_connect()
 {
 
-	GError *error = NULL;
-	connection = NULL;
-	instanceProxy = NULL;
-
-	g_type_init();
-
-	connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
-
-	if (error)
-	{
-		ERROR ("Failed to open connection to bus: %s",
-				error->message);
-		g_error_free(error);
-		return FALSE;
-	}
-
-	/* Create a proxy object for the "bus driver" (name "org.freedesktop.DBus") */
-
-	instanceProxy = dbus_g_proxy_new_for_name(connection,
-			"org.sflphone.SFLphone", "/org/sflphone/SFLphone/Instance",
-			"org.sflphone.SFLphone.Instance");
-	/*
-	   instanceProxy = dbus_g_proxy_new_for_name_owner (connection,
-	   "org.sflphone.SFLphone",
-	   "/org/sflphone/SFLphone/Instance",
-	   "org.sflphone.SFLphone.Instance",
-	   &error);
-	 */
-
-	if (instanceProxy == NULL)
-	{
-		ERROR ("Failed to get proxy to Instance");
-		return FALSE;
-	}
-
-	DEBUG ("DBus connected to Instance");
-
-	callManagerProxy = dbus_g_proxy_new_for_name(connection,
-			"org.sflphone.SFLphone", "/org/sflphone/SFLphone/CallManager",
-			"org.sflphone.SFLphone.CallManager");
-
-	/*
-	   callManagerProxy = dbus_g_proxy_new_for_name_owner (connection,
-	   "org.sflphone.SFLphone",
-	   "/org/sflphone/SFLphone/CallManager",
-	   "org.sflphone.SFLphone.CallManager",
-	   &error);
-	 */
-	if (callManagerProxy == NULL)
-	{
-		ERROR ("Failed to get proxy to CallManagers");
-		return FALSE;
-	}
-
-	DEBUG ("DBus connected to CallManager");
-	/* STRING STRING STRING Marshaller */
-	/* Incoming call */
-	dbus_g_object_register_marshaller(
-			g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE,
-			G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_add_signal(callManagerProxy, "incomingCall", G_TYPE_STRING,
-			G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "incomingCall",
-			G_CALLBACK(incoming_call_cb), NULL, NULL);
-
-	dbus_g_proxy_add_signal(callManagerProxy, "zrtpNegotiationFailed",
-			G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "zrtpNegotiationFailed",
-			G_CALLBACK(zrtp_negotiation_failed_cb), NULL, NULL);
-
-	/* Current codec */
-	dbus_g_object_register_marshaller(
-			g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE,
-			G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_add_signal(callManagerProxy, "currentSelectedCodec",
-			G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "currentSelectedCodec",
-			G_CALLBACK(curent_selected_codec), NULL, NULL);
-
-	/* Register a marshaller for STRING,STRING */
-	dbus_g_object_register_marshaller(
-			g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, G_TYPE_STRING,
-			G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_add_signal(callManagerProxy, "callStateChanged", G_TYPE_STRING,
-			G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "callStateChanged",
-			G_CALLBACK(call_state_cb), NULL, NULL);
-
-	dbus_g_object_register_marshaller(g_cclosure_user_marshal_VOID__STRING_INT,
-			G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INVALID);
-	dbus_g_proxy_add_signal(callManagerProxy, "voiceMailNotify", G_TYPE_STRING,
-			G_TYPE_INT, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "voiceMailNotify",
-			G_CALLBACK(voice_mail_cb), NULL, NULL);
-
-	dbus_g_proxy_add_signal(callManagerProxy, "incomingMessage", G_TYPE_STRING,
-			G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "incomingMessage",
-			G_CALLBACK(incoming_message_cb), NULL, NULL);
-
-	dbus_g_object_register_marshaller(
-			g_cclosure_user_marshal_VOID__STRING_DOUBLE, G_TYPE_NONE, G_TYPE_STRING,
-			G_TYPE_DOUBLE, G_TYPE_INVALID);
-	dbus_g_proxy_add_signal(callManagerProxy, "volumeChanged", G_TYPE_STRING,
-			G_TYPE_DOUBLE, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "volumeChanged",
-			G_CALLBACK(volume_changed_cb), NULL, NULL);
-
-	dbus_g_proxy_add_signal(callManagerProxy, "transferSucceded", G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "transferSucceded",
-			G_CALLBACK(transfer_succeded_cb), NULL, NULL);
-
-	dbus_g_proxy_add_signal(callManagerProxy, "transferFailed", G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "transferFailed",
-			G_CALLBACK(transfer_failed_cb), NULL, NULL);
-
-	/* Conference related callback */
-
-	dbus_g_object_register_marshaller(g_cclosure_user_marshal_VOID__STRING,
-			G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_add_signal(callManagerProxy, "conferenceChanged", G_TYPE_STRING,
-			G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "conferenceChanged",
-			G_CALLBACK(conference_changed_cb), NULL, NULL);
-
-	dbus_g_proxy_add_signal(callManagerProxy, "conferenceCreated", G_TYPE_STRING,
-			G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "conferenceCreated",
-			G_CALLBACK(conference_created_cb), NULL, NULL);
-
-	dbus_g_proxy_add_signal(callManagerProxy, "conferenceRemoved", G_TYPE_STRING,
-			G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "conferenceRemoved",
-			G_CALLBACK(conference_removed_cb), NULL, NULL);
-
-	/* Security related callbacks */
-
-	dbus_g_proxy_add_signal(callManagerProxy, "secureSdesOn", G_TYPE_STRING,
-			G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "secureSdesOn",
-			G_CALLBACK(secure_sdes_on_cb), NULL, NULL);
-
-	dbus_g_proxy_add_signal(callManagerProxy, "secureSdesOff", G_TYPE_STRING,
-			G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "secureSdesOff",
-			G_CALLBACK(secure_sdes_off_cb), NULL, NULL);
-
-	/* Register a marshaller for STRING,STRING,BOOL */
-	dbus_g_object_register_marshaller(
-			g_cclosure_user_marshal_VOID__STRING_STRING_BOOL, G_TYPE_NONE,
-			G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
-	dbus_g_proxy_add_signal(callManagerProxy, "showSAS", G_TYPE_STRING,
-			G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "showSAS",
-			G_CALLBACK(show_zrtp_sas_cb), NULL, NULL);
-
-	dbus_g_proxy_add_signal(callManagerProxy, "secureZrtpOn", G_TYPE_STRING,
-			G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "secureZrtpOn",
-			G_CALLBACK(secure_zrtp_on_cb), NULL, NULL);
-
-	/* Register a marshaller for STRING*/
-	dbus_g_object_register_marshaller(g_cclosure_user_marshal_VOID__STRING,
-			G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INVALID);
-	dbus_g_proxy_add_signal(callManagerProxy, "secureZrtpOff", G_TYPE_STRING,
-			G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "secureZrtpOff",
-			G_CALLBACK(secure_zrtp_off_cb), NULL, NULL);
-	dbus_g_proxy_add_signal(callManagerProxy, "zrtpNotSuppOther", G_TYPE_STRING,
-			G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "zrtpNotSuppOther",
-			G_CALLBACK(zrtp_not_supported_cb), NULL, NULL);
-	dbus_g_proxy_add_signal(callManagerProxy, "confirmGoClear", G_TYPE_STRING,
-			G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "confirmGoClear",
-			G_CALLBACK(confirm_go_clear_cb), NULL, NULL);
-
-	/* VOID STRING STRING INT */
-	dbus_g_object_register_marshaller(
-			g_cclosure_user_marshal_VOID__STRING_STRING_INT, G_TYPE_NONE,
-			G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INVALID);
-
-	dbus_g_proxy_add_signal(callManagerProxy, "sipCallStateChanged",
-			G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(callManagerProxy, "sipCallStateChanged",
-			G_CALLBACK(sip_call_state_cb), NULL, NULL);
-
-	configurationManagerProxy = dbus_g_proxy_new_for_name(connection,
-			"org.sflphone.SFLphone", "/org/sflphone/SFLphone/ConfigurationManager",
-			"org.sflphone.SFLphone.ConfigurationManager");
-
-	/*
-	   configurationManagerProxy = dbus_g_proxy_new_for_name_owner (connection,
-	   "org.sflphone.SFLphone",
-	   "/org/sflphone/SFLphone/ConfigurationManager",
-	   "org.sflphone.SFLphone.ConfigurationManager",
-	   &error);
-	 */
-	if (!configurationManagerProxy)
-	{
-		ERROR ("Failed to get proxy to ConfigurationManager");
-		return FALSE;
-	}
-	DEBUG ("DBus connected to ConfigurationManager");
-	dbus_g_proxy_add_signal(configurationManagerProxy, "accountsChanged",
-			G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(configurationManagerProxy, "accountsChanged",
-			G_CALLBACK(accounts_changed_cb), NULL, NULL);
-
-	dbus_g_object_register_marshaller(g_cclosure_user_marshal_VOID__INT,
-			G_TYPE_NONE, G_TYPE_INT, G_TYPE_INVALID);
-	dbus_g_proxy_add_signal(configurationManagerProxy, "errorAlert", G_TYPE_INT,
-			G_TYPE_INVALID);
-	dbus_g_proxy_connect_signal(configurationManagerProxy, "errorAlert",
-			G_CALLBACK(error_alert), NULL, NULL);
-
-	/* Defines a default timeout for the proxies */
+    GError *error = NULL;
+    connection = NULL;
+    instanceProxy = NULL;
+
+    g_type_init();
+
+    connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+
+    if (error) {
+        ERROR ("Failed to open connection to bus: %s",
+               error->message);
+        g_error_free (error);
+        return FALSE;
+    }
+
+    /* Create a proxy object for the "bus driver" (name "org.freedesktop.DBus") */
+
+    instanceProxy = dbus_g_proxy_new_for_name (connection,
+                    "org.sflphone.SFLphone", "/org/sflphone/SFLphone/Instance",
+                    "org.sflphone.SFLphone.Instance");
+    /*
+       instanceProxy = dbus_g_proxy_new_for_name_owner (connection,
+       "org.sflphone.SFLphone",
+       "/org/sflphone/SFLphone/Instance",
+       "org.sflphone.SFLphone.Instance",
+       &error);
+     */
+
+    if (instanceProxy == NULL) {
+        ERROR ("Failed to get proxy to Instance");
+        return FALSE;
+    }
+
+    DEBUG ("DBus connected to Instance");
+
+    callManagerProxy = dbus_g_proxy_new_for_name (connection,
+                       "org.sflphone.SFLphone", "/org/sflphone/SFLphone/CallManager",
+                       "org.sflphone.SFLphone.CallManager");
+
+    /*
+       callManagerProxy = dbus_g_proxy_new_for_name_owner (connection,
+       "org.sflphone.SFLphone",
+       "/org/sflphone/SFLphone/CallManager",
+       "org.sflphone.SFLphone.CallManager",
+       &error);
+     */
+    if (callManagerProxy == NULL) {
+        ERROR ("Failed to get proxy to CallManagers");
+        return FALSE;
+    }
+
+    DEBUG ("DBus connected to CallManager");
+    /* STRING STRING STRING Marshaller */
+    /* Incoming call */
+    dbus_g_object_register_marshaller (
+        g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE,
+        G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal (callManagerProxy, "incomingCall", G_TYPE_STRING,
+                             G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "incomingCall",
+                                 G_CALLBACK (incoming_call_cb), NULL, NULL);
+
+    dbus_g_proxy_add_signal (callManagerProxy, "zrtpNegotiationFailed",
+                             G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "zrtpNegotiationFailed",
+                                 G_CALLBACK (zrtp_negotiation_failed_cb), NULL, NULL);
+
+    /* Current codec */
+    dbus_g_object_register_marshaller (
+        g_cclosure_user_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE,
+        G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal (callManagerProxy, "currentSelectedCodec",
+                             G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "currentSelectedCodec",
+                                 G_CALLBACK (curent_selected_codec), NULL, NULL);
+
+    /* Register a marshaller for STRING,STRING */
+    dbus_g_object_register_marshaller (
+        g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, G_TYPE_STRING,
+        G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal (callManagerProxy, "callStateChanged", G_TYPE_STRING,
+                             G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "callStateChanged",
+                                 G_CALLBACK (call_state_cb), NULL, NULL);
+
+    dbus_g_object_register_marshaller (g_cclosure_user_marshal_VOID__STRING_INT,
+                                       G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal (callManagerProxy, "voiceMailNotify", G_TYPE_STRING,
+                             G_TYPE_INT, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "voiceMailNotify",
+                                 G_CALLBACK (voice_mail_cb), NULL, NULL);
+
+    dbus_g_proxy_add_signal (callManagerProxy, "incomingMessage", G_TYPE_STRING,
+                             G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "incomingMessage",
+                                 G_CALLBACK (incoming_message_cb), NULL, NULL);
+
+    dbus_g_object_register_marshaller (
+        g_cclosure_user_marshal_VOID__STRING_DOUBLE, G_TYPE_NONE, G_TYPE_STRING,
+        G_TYPE_DOUBLE, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal (callManagerProxy, "volumeChanged", G_TYPE_STRING,
+                             G_TYPE_DOUBLE, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "volumeChanged",
+                                 G_CALLBACK (volume_changed_cb), NULL, NULL);
+
+    dbus_g_proxy_add_signal (callManagerProxy, "transferSucceded", G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "transferSucceded",
+                                 G_CALLBACK (transfer_succeded_cb), NULL, NULL);
+
+    dbus_g_proxy_add_signal (callManagerProxy, "transferFailed", G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "transferFailed",
+                                 G_CALLBACK (transfer_failed_cb), NULL, NULL);
+
+    /* Conference related callback */
+
+    dbus_g_object_register_marshaller (g_cclosure_user_marshal_VOID__STRING,
+                                       G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal (callManagerProxy, "conferenceChanged", G_TYPE_STRING,
+                             G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "conferenceChanged",
+                                 G_CALLBACK (conference_changed_cb), NULL, NULL);
+
+    dbus_g_proxy_add_signal (callManagerProxy, "conferenceCreated", G_TYPE_STRING,
+                             G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "conferenceCreated",
+                                 G_CALLBACK (conference_created_cb), NULL, NULL);
+
+    dbus_g_proxy_add_signal (callManagerProxy, "conferenceRemoved", G_TYPE_STRING,
+                             G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "conferenceRemoved",
+                                 G_CALLBACK (conference_removed_cb), NULL, NULL);
+
+    /* Security related callbacks */
+
+    dbus_g_proxy_add_signal (callManagerProxy, "secureSdesOn", G_TYPE_STRING,
+                             G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "secureSdesOn",
+                                 G_CALLBACK (secure_sdes_on_cb), NULL, NULL);
+
+    dbus_g_proxy_add_signal (callManagerProxy, "secureSdesOff", G_TYPE_STRING,
+                             G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "secureSdesOff",
+                                 G_CALLBACK (secure_sdes_off_cb), NULL, NULL);
+
+    /* Register a marshaller for STRING,STRING,BOOL */
+    dbus_g_object_register_marshaller (
+        g_cclosure_user_marshal_VOID__STRING_STRING_BOOL, G_TYPE_NONE,
+        G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal (callManagerProxy, "showSAS", G_TYPE_STRING,
+                             G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "showSAS",
+                                 G_CALLBACK (show_zrtp_sas_cb), NULL, NULL);
+
+    dbus_g_proxy_add_signal (callManagerProxy, "secureZrtpOn", G_TYPE_STRING,
+                             G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "secureZrtpOn",
+                                 G_CALLBACK (secure_zrtp_on_cb), NULL, NULL);
+
+    /* Register a marshaller for STRING*/
+    dbus_g_object_register_marshaller (g_cclosure_user_marshal_VOID__STRING,
+                                       G_TYPE_NONE, G_TYPE_STRING, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal (callManagerProxy, "secureZrtpOff", G_TYPE_STRING,
+                             G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "secureZrtpOff",
+                                 G_CALLBACK (secure_zrtp_off_cb), NULL, NULL);
+    dbus_g_proxy_add_signal (callManagerProxy, "zrtpNotSuppOther", G_TYPE_STRING,
+                             G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "zrtpNotSuppOther",
+                                 G_CALLBACK (zrtp_not_supported_cb), NULL, NULL);
+    dbus_g_proxy_add_signal (callManagerProxy, "confirmGoClear", G_TYPE_STRING,
+                             G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "confirmGoClear",
+                                 G_CALLBACK (confirm_go_clear_cb), NULL, NULL);
+
+    /* VOID STRING STRING INT */
+    dbus_g_object_register_marshaller (
+        g_cclosure_user_marshal_VOID__STRING_STRING_INT, G_TYPE_NONE,
+        G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INVALID);
+
+    dbus_g_proxy_add_signal (callManagerProxy, "sipCallStateChanged",
+                             G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (callManagerProxy, "sipCallStateChanged",
+                                 G_CALLBACK (sip_call_state_cb), NULL, NULL);
+
+    configurationManagerProxy = dbus_g_proxy_new_for_name (connection,
+                                "org.sflphone.SFLphone", "/org/sflphone/SFLphone/ConfigurationManager",
+                                "org.sflphone.SFLphone.ConfigurationManager");
+
+    /*
+       configurationManagerProxy = dbus_g_proxy_new_for_name_owner (connection,
+       "org.sflphone.SFLphone",
+       "/org/sflphone/SFLphone/ConfigurationManager",
+       "org.sflphone.SFLphone.ConfigurationManager",
+       &error);
+     */
+    if (!configurationManagerProxy) {
+        ERROR ("Failed to get proxy to ConfigurationManager");
+        return FALSE;
+    }
+
+    DEBUG ("DBus connected to ConfigurationManager");
+    dbus_g_proxy_add_signal (configurationManagerProxy, "accountsChanged",
+                             G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (configurationManagerProxy, "accountsChanged",
+                                 G_CALLBACK (accounts_changed_cb), NULL, NULL);
+
+    dbus_g_object_register_marshaller (g_cclosure_user_marshal_VOID__INT,
+                                       G_TYPE_NONE, G_TYPE_INT, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal (configurationManagerProxy, "errorAlert", G_TYPE_INT,
+                             G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal (configurationManagerProxy, "errorAlert",
+                                 G_CALLBACK (error_alert), NULL, NULL);
+
+    /* Defines a default timeout for the proxies */
 #if HAVE_DBUS_G_PROXY_SET_DEFAULT_TIMEOUT
-	dbus_g_proxy_set_default_timeout(callManagerProxy, DEFAULT_DBUS_TIMEOUT);
-	dbus_g_proxy_set_default_timeout(instanceProxy, DEFAULT_DBUS_TIMEOUT);
-	dbus_g_proxy_set_default_timeout(configurationManagerProxy, DEFAULT_DBUS_TIMEOUT);
+    dbus_g_proxy_set_default_timeout (callManagerProxy, DEFAULT_DBUS_TIMEOUT);
+    dbus_g_proxy_set_default_timeout (instanceProxy, DEFAULT_DBUS_TIMEOUT);
+    dbus_g_proxy_set_default_timeout (configurationManagerProxy, DEFAULT_DBUS_TIMEOUT);
 #endif
 
-	return TRUE;
+    return TRUE;
 }
 
-	void
+void
 dbus_clean()
 {
-	g_object_unref(callManagerProxy);
-	g_object_unref(configurationManagerProxy);
-	g_object_unref(instanceProxy);
+    g_object_unref (callManagerProxy);
+    g_object_unref (configurationManagerProxy);
+    g_object_unref (instanceProxy);
 }
 
-	void
-dbus_hold(const callable_obj_t * c)
+void
+dbus_hold (const callable_obj_t * c)
 {
-	DEBUG("dbus_hold %s\n", c->_callID);
+    DEBUG ("dbus_hold %s\n", c->_callID);
+
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_hold (callManagerProxy, c->_callID, &error);
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_hold(callManagerProxy, c->_callID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call hold() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call hold() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_unhold(const callable_obj_t * c)
+void
+dbus_unhold (const callable_obj_t * c)
 {
-	DEBUG("dbus_unhold %s\n", c->_callID);
+    DEBUG ("dbus_unhold %s\n", c->_callID);
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_unhold(callManagerProxy, c->_callID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call unhold() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_unhold (callManagerProxy, c->_callID, &error);
+
+    if (error) {
+        ERROR ("Failed to call unhold() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_hold_conference(const conference_obj_t * c)
+void
+dbus_hold_conference (const conference_obj_t * c)
 {
-	DEBUG("dbus_hold_conference %s\n", c->_confID);
+    DEBUG ("dbus_hold_conference %s\n", c->_confID);
+
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_hold_conference (callManagerProxy,
+            c->_confID, &error);
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_hold_conference(callManagerProxy,
-			c->_confID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call hold() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call hold() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_unhold_conference(const conference_obj_t * c)
+void
+dbus_unhold_conference (const conference_obj_t * c)
 {
-	DEBUG("dbus_unhold_conference %s\n", c->_confID);
+    DEBUG ("dbus_unhold_conference %s\n", c->_confID);
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_unhold_conference(callManagerProxy,
-			c->_confID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call unhold() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_unhold_conference (callManagerProxy,
+            c->_confID, &error);
+
+    if (error) {
+        ERROR ("Failed to call unhold() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_hang_up(const callable_obj_t * c)
+void
+dbus_hang_up (const callable_obj_t * c)
 {
-	DEBUG("dbus_hang_up %s\n", c->_callID);
+    DEBUG ("dbus_hang_up %s\n", c->_callID);
+
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_hang_up (callManagerProxy, c->_callID,
+            &error);
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_hang_up(callManagerProxy, c->_callID,
-			&error);
-	if (error)
-	{
-		ERROR ("Failed to call hang_up() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call hang_up() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_hang_up_conference(const conference_obj_t * c)
+void
+dbus_hang_up_conference (const conference_obj_t * c)
 {
-	DEBUG("dbus_hang_up_conference %s\n", c->_confID);
+    DEBUG ("dbus_hang_up_conference %s\n", c->_confID);
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_hang_up_conference(callManagerProxy,
-			c->_confID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call hang_up() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_hang_up_conference (callManagerProxy,
+            c->_confID, &error);
+
+    if (error) {
+        ERROR ("Failed to call hang_up() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_transfert(const callable_obj_t * c)
+void
+dbus_transfert (const callable_obj_t * c)
 {
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_transfert(callManagerProxy, c->_callID,
-			c->_trsft_to, &error);
-	if (error)
-	{
-		ERROR ("Failed to call transfert() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_transfert (callManagerProxy, c->_callID,
+            c->_trsft_to, &error);
+
+    if (error) {
+        ERROR ("Failed to call transfert() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_accept(const callable_obj_t * c)
+void
+dbus_accept (const callable_obj_t * c)
 {
 #if GTK_CHECK_VERSION(2,10,0)
-	status_tray_icon_blink(FALSE);
+    status_tray_icon_blink (FALSE);
 #endif
 
-	DEBUG("dbus_accept %s\n", c->_callID);
+    DEBUG ("dbus_accept %s\n", c->_callID);
+
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_accept (callManagerProxy, c->_callID, &error);
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_accept(callManagerProxy, c->_callID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call accept(%s) on CallManager: %s", c->_callID,
-				(error->message == NULL ? g_quark_to_string(error->domain): error->message));
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call accept(%s) on CallManager: %s", c->_callID,
+               (error->message == NULL ? g_quark_to_string (error->domain) : error->message));
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_refuse(const callable_obj_t * c)
+void
+dbus_refuse (const callable_obj_t * c)
 {
 #if GTK_CHECK_VERSION(2,10,0)
-	status_tray_icon_blink(FALSE);
+    status_tray_icon_blink (FALSE);
 #endif
 
-	DEBUG("dbus_refuse %s\n", c->_callID);
+    DEBUG ("dbus_refuse %s\n", c->_callID);
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_refuse(callManagerProxy, c->_callID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call refuse() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_refuse (callManagerProxy, c->_callID, &error);
+
+    if (error) {
+        ERROR ("Failed to call refuse() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_place_call(const callable_obj_t * c)
+void
+dbus_place_call (const callable_obj_t * c)
 {
-	DEBUG("dbus_place_call %s\n", c->_callID);
+    DEBUG ("dbus_place_call %s\n", c->_callID);
+
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_place_call (callManagerProxy, c->_accountID,
+            c->_callID, c->_peer_number, &error);
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_place_call(callManagerProxy, c->_accountID,
-			c->_callID, c->_peer_number, &error);
-	if (error)
-	{
-		ERROR ("Failed to call placeCall() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call placeCall() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	gchar**
+gchar**
 dbus_account_list()
 {
-	GError *error = NULL;
-	char ** array;
-
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_account_list(
-				configurationManagerProxy, &array, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_account_list) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_account_list: %s", error->message);
-		}
-		g_error_free(error);
-		return NULL;
-	}
-	else
-	{
-		DEBUG ("DBus called get_account_list() on ConfigurationManager");
-		return array;
-	}
-}
-
-	GHashTable*
-dbus_account_details(gchar * accountID)
-{
-	GError *error = NULL;
-	GHashTable * details;
-
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_account_details(
-				configurationManagerProxy, accountID, &details, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_account_details) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_account_details: %s", error->message);
-		}
-		g_error_free(error);
-		return NULL;
-	}
-	else
-	{
-		return details;
-	}
-}
-
-	void
-dbus_set_credential(account_t *a, int index)
-{
-	DEBUG("Sending credential %d to server", index);
-	GError *error = NULL;
-	GHashTable * credential = g_ptr_array_index(a->credential_information, index);
-
-	if (credential == NULL)
-	{
-		DEBUG("Credential %d was deleted", index);
-	}
-	else
-	{
-		org_sflphone_SFLphone_ConfigurationManager_set_credential(
-				configurationManagerProxy, a->accountID, index, credential, &error);
-	}
-
-	if (error)
-	{
-		ERROR ("Failed to call set_credential() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-}
-	void
-dbus_set_number_of_credential(account_t *a, int number)
-{
-	DEBUG("Sending number of credential %d to server", number);
-	GError *error = NULL;
-
-	org_sflphone_SFLphone_ConfigurationManager_set_number_of_credential(
-			configurationManagerProxy, a->accountID, number, &error);
-
-	if (error)
-	{
-		ERROR ("Failed to call set_number_of_credential() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-}
-	void
-dbus_delete_all_credential(account_t *a)
-{
-	DEBUG("Deleting all credentials\n");
-	GError *error = NULL;
-
-	org_sflphone_SFLphone_ConfigurationManager_delete_all_credential(
-			configurationManagerProxy, a->accountID, &error);
-
-	if (error)
-	{
-		ERROR ("Failed to call deleteAllCredential on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-}
-
-	int
-dbus_get_number_of_credential(gchar * accountID)
-{
-	GError *error = NULL;
-	int number = 0;
-
-	DEBUG("Getting number of credential for account %s", accountID);
-
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_number_of_credential(
-				configurationManagerProxy, accountID, &number, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_account_details) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_account_details: %s", error->message);
-		}
-		g_error_free(error);
-		return 0;
-	}
-	else
-	{
-		DEBUG("%d credential(s) found for account %s", number, accountID);
-		return number;
-	}
-}
-
-	GHashTable*
-dbus_get_credential(gchar * accountID, int index)
-{
-	GError *error = NULL;
-	GHashTable * details;
-
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_credential(
-				configurationManagerProxy, accountID, index, &details, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_account_details) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_account_details: %s", error->message);
-		}
-		g_error_free(error);
-		return NULL;
-	}
-	else
-	{
-		return details;
-	}
-}
-
-	GHashTable*
-dbus_get_ip2_ip_details(void)
-{
-	GError *error = NULL;
-	GHashTable * details;
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_ip2_ip_details(
-				configurationManagerProxy, &details, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_ip2_ip_details) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_ip2_ip_details: %s", error->message);
-		}
-		g_error_free(error);
-		return NULL;
-	}
-	else
-	{
-		return details;
-	}
-}
-
-	void
-dbus_set_ip2ip_details(GHashTable * properties)
-{
-	GError *error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_ip2_ip_details(
-			configurationManagerProxy, properties, &error);
-	if (error)
-	{
-		ERROR ("Failed to call set_ip_2ip_details() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-}
-
-	void
-dbus_send_register(gchar* accountID, const guint enable)
-{
-	GError *error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_send_register(
-			configurationManagerProxy, accountID, enable, &error);
-	if (error)
-	{
-		ERROR ("Failed to call send_register() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-}
-
-	void
-dbus_remove_account(gchar * accountID)
-{
-	GError *error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_remove_account(
-			configurationManagerProxy, accountID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call remove_account() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-}
-
-	void
-dbus_set_account_details(account_t *a)
-{
-	GError *error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_account_details(
-			configurationManagerProxy, a->accountID, a->properties, &error);
-	if (error)
-	{
-		ERROR ("Failed to call set_account_details() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-}
-	gchar*
-dbus_add_account(account_t *a)
-{
-	gchar* accountId;
-	GError *error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_add_account(
-			configurationManagerProxy, a->properties, &accountId, &error);
-	if (error)
-	{
-		ERROR ("Failed to call add_account() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return accountId;
-}
-
-	void
-dbus_set_volume(const gchar * device, gdouble value)
-{
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_set_volume(callManagerProxy, device, value,
-			&error);
-
-	if (error)
-	{
-		ERROR ("Failed to call set_volume() on callManagerProxy: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    char ** array;
+
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_account_list (
+                configurationManagerProxy, &array, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_account_list) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_account_list: %s", error->message);
+        }
+
+        g_error_free (error);
+        return NULL;
+    } else {
+        DEBUG ("DBus called get_account_list() on ConfigurationManager");
+        return array;
+    }
+}
+
+GHashTable*
+dbus_account_details (gchar * accountID)
+{
+    GError *error = NULL;
+    GHashTable * details;
+
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_account_details (
+                configurationManagerProxy, accountID, &details, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_account_details) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_account_details: %s", error->message);
+        }
+
+        g_error_free (error);
+        return NULL;
+    } else {
+        return details;
+    }
+}
+
+void
+dbus_set_credential (account_t *a, int index)
+{
+    DEBUG ("Sending credential %d to server", index);
+    GError *error = NULL;
+    GHashTable * credential = g_ptr_array_index (a->credential_information, index);
+
+    if (credential == NULL) {
+        DEBUG ("Credential %d was deleted", index);
+    } else {
+        org_sflphone_SFLphone_ConfigurationManager_set_credential (
+            configurationManagerProxy, a->accountID, index, credential, &error);
+    }
+
+    if (error) {
+        ERROR ("Failed to call set_credential() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+}
+void
+dbus_set_number_of_credential (account_t *a, int number)
+{
+    DEBUG ("Sending number of credential %d to server", number);
+    GError *error = NULL;
+
+    org_sflphone_SFLphone_ConfigurationManager_set_number_of_credential (
+        configurationManagerProxy, a->accountID, number, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_number_of_credential() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+}
+void
+dbus_delete_all_credential (account_t *a)
+{
+    DEBUG ("Deleting all credentials\n");
+    GError *error = NULL;
+
+    org_sflphone_SFLphone_ConfigurationManager_delete_all_credential (
+        configurationManagerProxy, a->accountID, &error);
+
+    if (error) {
+        ERROR ("Failed to call deleteAllCredential on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+}
+
+int
+dbus_get_number_of_credential (gchar * accountID)
+{
+    GError *error = NULL;
+    int number = 0;
+
+    DEBUG ("Getting number of credential for account %s", accountID);
+
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_number_of_credential (
+                configurationManagerProxy, accountID, &number, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_account_details) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_account_details: %s", error->message);
+        }
+
+        g_error_free (error);
+        return 0;
+    } else {
+        DEBUG ("%d credential(s) found for account %s", number, accountID);
+        return number;
+    }
+}
+
+GHashTable*
+dbus_get_credential (gchar * accountID, int index)
+{
+    GError *error = NULL;
+    GHashTable * details;
+
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_credential (
+                configurationManagerProxy, accountID, index, &details, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_account_details) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_account_details: %s", error->message);
+        }
+
+        g_error_free (error);
+        return NULL;
+    } else {
+        return details;
+    }
+}
+
+GHashTable*
+dbus_get_ip2_ip_details (void)
+{
+    GError *error = NULL;
+    GHashTable * details;
+
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_ip2_ip_details (
+                configurationManagerProxy, &details, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_ip2_ip_details) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_ip2_ip_details: %s", error->message);
+        }
+
+        g_error_free (error);
+        return NULL;
+    } else {
+        return details;
+    }
+}
+
+void
+dbus_set_ip2ip_details (GHashTable * properties)
+{
+    GError *error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_ip2_ip_details (
+        configurationManagerProxy, properties, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_ip_2ip_details() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+}
+
+void
+dbus_send_register (gchar* accountID, const guint enable)
+{
+    GError *error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_send_register (
+        configurationManagerProxy, accountID, enable, &error);
+
+    if (error) {
+        ERROR ("Failed to call send_register() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+}
+
+void
+dbus_remove_account (gchar * accountID)
+{
+    GError *error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_remove_account (
+        configurationManagerProxy, accountID, &error);
+
+    if (error) {
+        ERROR ("Failed to call remove_account() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+}
+
+void
+dbus_set_account_details (account_t *a)
+{
+    GError *error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_account_details (
+        configurationManagerProxy, a->accountID, a->properties, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_account_details() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+}
+gchar*
+dbus_add_account (account_t *a)
+{
+    gchar* accountId;
+    GError *error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_add_account (
+        configurationManagerProxy, a->properties, &accountId, &error);
+
+    if (error) {
+        ERROR ("Failed to call add_account() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+
+    return accountId;
+}
+
+void
+dbus_set_volume (const gchar * device, gdouble value)
+{
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_set_volume (callManagerProxy, device, value,
+            &error);
+
+    if (error) {
+        ERROR ("Failed to call set_volume() on callManagerProxy: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	gdouble
-dbus_get_volume(const gchar * device)
+gdouble
+dbus_get_volume (const gchar * device)
 {
-	gdouble value;
-	GError *error = NULL;
+    gdouble value;
+    GError *error = NULL;
 
-	org_sflphone_SFLphone_CallManager_get_volume(callManagerProxy, device,
-			&value, &error);
+    org_sflphone_SFLphone_CallManager_get_volume (callManagerProxy, device,
+            &value, &error);
 
-	if (error)
-	{
-		ERROR ("Failed to call get_volume() on callManagerProxy: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return value;
+    if (error) {
+        ERROR ("Failed to call get_volume() on callManagerProxy: %s",
+               error->message);
+        g_error_free (error);
+    }
+
+    return value;
 }
 
-	void
-dbus_play_dtmf(const gchar * key)
+void
+dbus_play_dtmf (const gchar * key)
 {
-	GError *error = NULL;
+    GError *error = NULL;
 
-	org_sflphone_SFLphone_CallManager_play_dt_mf(callManagerProxy, key, &error);
+    org_sflphone_SFLphone_CallManager_play_dt_mf (callManagerProxy, key, &error);
 
-	if (error)
-	{
-		ERROR ("Failed to call playDTMF() on callManagerProxy: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call playDTMF() on callManagerProxy: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_start_tone(const int start, const guint type)
+void
+dbus_start_tone (const int start, const guint type)
 {
-	GError *error = NULL;
+    GError *error = NULL;
 
-	org_sflphone_SFLphone_CallManager_start_tone(callManagerProxy, start, type,
-			&error);
+    org_sflphone_SFLphone_CallManager_start_tone (callManagerProxy, start, type,
+            &error);
 
-	if (error)
-	{
-		ERROR ("Failed to call startTone() on callManagerProxy: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call startTone() on callManagerProxy: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_register(int pid, gchar * name)
+void
+dbus_register (int pid, gchar * name)
 {
-	GError *error = NULL;
+    GError *error = NULL;
 
-	org_sflphone_SFLphone_Instance_register(instanceProxy, pid, name, &error);
+    org_sflphone_SFLphone_Instance_register (instanceProxy, pid, name, &error);
 
-	if (error)
-	{
-		ERROR ("Failed to call register() on instanceProxy: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call register() on instanceProxy: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_unregister(int pid)
+void
+dbus_unregister (int pid)
 {
-	GError *error = NULL;
+    GError *error = NULL;
 
-	org_sflphone_SFLphone_Instance_unregister(instanceProxy, pid, &error);
+    org_sflphone_SFLphone_Instance_unregister (instanceProxy, pid, &error);
 
-	if (error)
-	{
-		ERROR ("Failed to call unregister() on instanceProxy: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call unregister() on instanceProxy: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	gchar**
+gchar**
 dbus_codec_list()
 {
 
-	GError *error = NULL;
-	gchar** array = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_codec_list(
-			configurationManagerProxy, &array, &error);
+    GError *error = NULL;
+    gchar** array = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_codec_list (
+        configurationManagerProxy, &array, &error);
+
+    if (error) {
+        ERROR ("Failed to call get_codec_list() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 
-	if (error)
-	{
-		ERROR ("Failed to call get_codec_list() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return array;
+    return array;
 }
 
-	gchar**
-dbus_codec_details(int payload)
+gchar**
+dbus_codec_details (int payload)
 {
 
-	GError *error = NULL;
-	gchar ** array;
-	org_sflphone_SFLphone_ConfigurationManager_get_codec_details(
-			configurationManagerProxy, payload, &array, &error);
+    GError *error = NULL;
+    gchar ** array;
+    org_sflphone_SFLphone_ConfigurationManager_get_codec_details (
+        configurationManagerProxy, payload, &array, &error);
+
+    if (error) {
+        ERROR ("Failed to call get_codec_details() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 
-	if (error)
-	{
-		ERROR ("Failed to call get_codec_details() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return array;
+    return array;
 }
 
-	gchar*
-dbus_get_current_codec_name(const callable_obj_t * c)
+gchar*
+dbus_get_current_codec_name (const callable_obj_t * c)
 {
 
-	gchar* codecName = "";
-	GError* error = NULL;
+    gchar* codecName = "";
+    GError* error = NULL;
 
-	org_sflphone_SFLphone_CallManager_get_current_codec_name(callManagerProxy,
-			c->_callID, &codecName, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    org_sflphone_SFLphone_CallManager_get_current_codec_name (callManagerProxy,
+            c->_callID, &codecName, &error);
 
-	DEBUG("dbus_get_current_codec_name : codecName : %s", codecName);
+    if (error) {
+        g_error_free (error);
+    }
 
-	return codecName;
+    DEBUG ("dbus_get_current_codec_name : codecName : %s", codecName);
+
+    return codecName;
 }
 
-	gchar**
-dbus_get_active_codec_list(gchar *accountID)
+gchar**
+dbus_get_active_codec_list (gchar *accountID)
 {
 
-	gchar ** array;
-	GError *error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_active_codec_list(
-			configurationManagerProxy, accountID, &array, &error);
+    gchar ** array;
+    GError *error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_active_codec_list (
+        configurationManagerProxy, accountID, &array, &error);
+
+    if (error) {
+        ERROR ("Failed to call get_active_codec_list() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 
-	if (error)
-	{
-		ERROR ("Failed to call get_active_codec_list() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return array;
+    return array;
 }
 
-	void
-dbus_set_active_codec_list(const gchar** list, const gchar *accountID)
+void
+dbus_set_active_codec_list (const gchar** list, const gchar *accountID)
 {
 
-	GError *error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_active_codec_list(
-			configurationManagerProxy, list, accountID, &error);
+    GError *error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_active_codec_list (
+        configurationManagerProxy, list, accountID, &error);
 
-	if (error)
-	{
-		ERROR ("Failed to call set_active_codec_list() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Failed to call set_active_codec_list() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
 
 /**
  * Get a list of output supported audio plugins
  */
-	gchar**
+gchar**
 dbus_get_audio_plugin_list()
 {
-	gchar** array;
-	GError* error = NULL;
-
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_audio_plugin_list(
-				configurationManagerProxy, &array, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_output_plugin_list) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_out_plugin_list: %s", error->message);
-		}
-		g_error_free(error);
-		return NULL;
-	}
-	else
-	{
-		return array;
-	}
-}
-
-	void
-dbus_set_input_audio_plugin(gchar* audioPlugin)
-{
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_input_audio_plugin(
-			configurationManagerProxy, audioPlugin, &error);
-	if (error)
-	{
-		ERROR("Failed to call set_input_audio_plugin() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
-}
-
-	void
-dbus_set_output_audio_plugin(gchar* audioPlugin)
-{
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_output_audio_plugin(
-			configurationManagerProxy, audioPlugin, &error);
-	if (error)
-	{
-		ERROR("Failed to call set_output_audio_plugin() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
+    gchar** array;
+    GError* error = NULL;
+
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_audio_plugin_list (
+                configurationManagerProxy, &array, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_output_plugin_list) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_out_plugin_list: %s", error->message);
+        }
+
+        g_error_free (error);
+        return NULL;
+    } else {
+        return array;
+    }
+}
+
+void
+dbus_set_input_audio_plugin (gchar* audioPlugin)
+{
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_input_audio_plugin (
+        configurationManagerProxy, audioPlugin, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_input_audio_plugin() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
+}
+
+void
+dbus_set_output_audio_plugin (gchar* audioPlugin)
+{
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_output_audio_plugin (
+        configurationManagerProxy, audioPlugin, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_output_audio_plugin() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
 }
 
 /**
  * Get all output devices index supported by current audio manager
  */
-	gchar**
+gchar**
 dbus_get_audio_output_device_list()
 {
-	gchar** array;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_audio_output_device_list(
-			configurationManagerProxy, &array, &error);
-	if (error)
-	{
-		ERROR("Failed to call get_audio_output_device_list() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
-	return array;
+    gchar** array;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_audio_output_device_list (
+        configurationManagerProxy, &array, &error);
+
+    if (error) {
+        ERROR ("Failed to call get_audio_output_device_list() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
+
+    return array;
 }
 
 /**
  * Set audio output device from its index
  */
-	void
-dbus_set_audio_output_device(const int index)
+void
+dbus_set_audio_output_device (const int index)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_audio_output_device(
-			configurationManagerProxy, index, &error);
-	if (error)
-	{
-		ERROR("Failed to call set_audio_output_device() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_audio_output_device (
+        configurationManagerProxy, index, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_audio_output_device() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
 }
 
 /**
  * Set audio input device from its index
  */
-	void
-dbus_set_audio_input_device(const int index)
+void
+dbus_set_audio_input_device (const int index)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_audio_input_device(
-			configurationManagerProxy, index, &error);
-	if (error)
-	{
-		ERROR("Failed to call set_audio_input_device() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_audio_input_device (
+        configurationManagerProxy, index, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_audio_input_device() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
 }
 
 /**
  * Set adio ringtone device from its index
  */
-	void
-dbus_set_audio_ringtone_device(const int index) 
+void
+dbus_set_audio_ringtone_device (const int index)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_audio_ringtone_device(
-			configurationManagerProxy, index, &error);
-	if(error) 
-	{
-		ERROR("Failed to call set_audio_ringtone_device() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_audio_ringtone_device (
+        configurationManagerProxy, index, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_audio_ringtone_device() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
 }
 
 /**
  * Get all input devices index supported by current audio manager
  */
-	gchar**
+gchar**
 dbus_get_audio_input_device_list()
 {
-	gchar** array;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_audio_input_device_list(
-			configurationManagerProxy, &array, &error);
-	if (error)
-	{
-		ERROR("Failed to call get_audio_input_device_list() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
-	return array;
+    gchar** array;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_audio_input_device_list (
+        configurationManagerProxy, &array, &error);
+
+    if (error) {
+        ERROR ("Failed to call get_audio_input_device_list() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
+
+    return array;
 }
 
 /**
  * Get output device index and input device index
  */
-	gchar**
+gchar**
 dbus_get_current_audio_devices_index()
 {
-	gchar** array;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_current_audio_devices_index(
-			configurationManagerProxy, &array, &error);
-	if (error)
-	{
-		ERROR("Failed to call get_current_audio_devices_index() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
-	return array;
+    gchar** array;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_current_audio_devices_index (
+        configurationManagerProxy, &array, &error);
+
+    if (error) {
+        ERROR ("Failed to call get_current_audio_devices_index() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
+
+    return array;
 }
 
 /**
  * Get index
  */
-	int
-dbus_get_audio_device_index(const gchar *name)
+int
+dbus_get_audio_device_index (const gchar *name)
 {
-	int index;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_audio_device_index(
-			configurationManagerProxy, name, &index, &error);
-	if (error)
-	{
-		ERROR("Failed to call get_audio_device_index() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
-	return index;
+    int index;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_audio_device_index (
+        configurationManagerProxy, name, &index, &error);
+
+    if (error) {
+        ERROR ("Failed to call get_audio_device_index() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
+
+    return index;
 }
 
 /**
  * Get audio plugin
  */
-	gchar*
+gchar*
 dbus_get_current_audio_output_plugin()
 {
-	gchar* plugin = "";
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_current_audio_output_plugin(
-			configurationManagerProxy, &plugin, &error);
-	if (error)
-	{
-		ERROR("Failed to call get_current_audio_output_plugin() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
-	return plugin;
+    gchar* plugin = "";
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_current_audio_output_plugin (
+        configurationManagerProxy, &plugin, &error);
+
+    if (error) {
+        ERROR ("Failed to call get_current_audio_output_plugin() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
+
+    return plugin;
 }
 
 /**
- * Get echo canceller state 
+ * Get echo canceller state
  */
-	gchar*
+gchar*
 dbus_get_echo_cancel_state()
 {
-	gchar* state = "";
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_echo_cancel_state(configurationManagerProxy, &state, &error);
-	if(error) {
-		ERROR("DBus: Failed to call get_echo_cancel_state() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
-	return state;
+    gchar* state = "";
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_echo_cancel_state (configurationManagerProxy, &state, &error);
+
+    if (error) {
+        ERROR ("DBus: Failed to call get_echo_cancel_state() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
+
+    return state;
 }
 
 /**
  * Set echo canceller state
  */
-	void
-dbus_set_echo_cancel_state(gchar* state)
+void
+dbus_set_echo_cancel_state (gchar* state)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_echo_cancel_state(
-			configurationManagerProxy, state, &error);
-	if (error)
-	{
-		ERROR("Failed to call set_echo_cancel_state() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_echo_cancel_state (
+        configurationManagerProxy, state, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_echo_cancel_state() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
 }
 
 
 /**
  * Get noise reduction state
  */
-	gchar*
+gchar*
 dbus_get_noise_suppress_state()
 {
-	gchar* state = "";
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_noise_suppress_state(configurationManagerProxy, &state, &error);
-	if(error) {
-		ERROR("DBus: Failed to call get_noise_suppress_state() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
-	return state;
+    gchar* state = "";
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_noise_suppress_state (configurationManagerProxy, &state, &error);
+
+    if (error) {
+        ERROR ("DBus: Failed to call get_noise_suppress_state() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
+
+    return state;
 }
 
 /**
  * Set echo canceller state
  */
-	void
-dbus_set_noise_suppress_state(gchar* state)
+void
+dbus_set_noise_suppress_state (gchar* state)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_noise_suppress_state(
-			configurationManagerProxy, state, &error);
-	if (error)
-	{
-		ERROR("Failed to call set_noise_suppress_state() on ConfigurationManager: %s", error->message);
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_noise_suppress_state (
+        configurationManagerProxy, state, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_noise_suppress_state() on ConfigurationManager: %s", error->message);
+        g_error_free (error);
+    }
 }
 
 
-	gchar*
+gchar*
 dbus_get_ringtone_choice()
 {
-	gchar* tone;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_ringtone_choice(
-			configurationManagerProxy, &tone, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
-	return tone;
+    gchar* tone;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_ringtone_choice (
+        configurationManagerProxy, &tone, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
+
+    return tone;
 }
 
-	void
-dbus_set_ringtone_choice(const gchar* tone)
+void
+dbus_set_ringtone_choice (const gchar* tone)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_ringtone_choice(
-			configurationManagerProxy, tone, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_ringtone_choice (
+        configurationManagerProxy, tone, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	int
+int
 dbus_is_ringtone_enabled()
 {
-	int res;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_is_ringtone_enabled(
-			configurationManagerProxy, &res, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
-	return res;
+    int res;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_is_ringtone_enabled (
+        configurationManagerProxy, &res, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
+
+    return res;
 }
 
-	void
+void
 dbus_ringtone_enabled()
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_ringtone_enabled(
-			configurationManagerProxy, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_ringtone_enabled (
+        configurationManagerProxy, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	gboolean
+gboolean
 dbus_is_md5_credential_hashing()
 {
-	int res;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_is_md5_credential_hashing(
-			configurationManagerProxy, &res, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
-	return res;
+    int res;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_is_md5_credential_hashing (
+        configurationManagerProxy, &res, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
+
+    return res;
 }
 
-	void
-dbus_set_md5_credential_hashing(gboolean enabled)
+void
+dbus_set_md5_credential_hashing (gboolean enabled)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_md5_credential_hashing(
-			configurationManagerProxy, enabled, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_md5_credential_hashing (
+        configurationManagerProxy, enabled, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	int
+int
 dbus_is_iax2_enabled()
 {
-	int res;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_is_iax2_enabled(
-			configurationManagerProxy, &res, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
-	return res;
+    int res;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_is_iax2_enabled (
+        configurationManagerProxy, &res, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
+
+    return res;
 }
 
-	int
+int
 dbus_get_dialpad()
 {
-	int state;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_dialpad(
-			configurationManagerProxy, &state, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
-	return state;
+    int state;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_dialpad (
+        configurationManagerProxy, &state, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
+
+    return state;
 }
 
-	void
-dbus_set_dialpad(gboolean display)
+void
+dbus_set_dialpad (gboolean display)
 {
 
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_dialpad(
-			configurationManagerProxy, display, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_dialpad (
+        configurationManagerProxy, display, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	int
+int
 dbus_get_searchbar()
 {
-	int state;
-	GError* error = NULL;
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_searchbar(
-				configurationManagerProxy, &state, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_searchbar) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_searchbar: %s", error->message);
-		}
-		g_error_free(error);
-		return -1;
-	}
-	else
-	{
-		return state;
-	}
-}
-
-	void
+    int state;
+    GError* error = NULL;
+
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_searchbar (
+                configurationManagerProxy, &state, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_searchbar) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_searchbar: %s", error->message);
+        }
+
+        g_error_free (error);
+        return -1;
+    } else {
+        return state;
+    }
+}
+
+void
 dbus_set_searchbar()
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_searchbar(
-			configurationManagerProxy, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_searchbar (
+        configurationManagerProxy, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_join_participant(const gchar* sel_callID, const gchar* drag_callID)
+void
+dbus_join_participant (const gchar* sel_callID, const gchar* drag_callID)
 {
 
-	DEBUG("dbus_join_participant %s and %s\n", sel_callID, drag_callID);
+    DEBUG ("dbus_join_participant %s and %s\n", sel_callID, drag_callID);
 
-	GError* error = NULL;
+    GError* error = NULL;
 
-	org_sflphone_SFLphone_CallManager_join_participant(callManagerProxy,
-			sel_callID, drag_callID, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    org_sflphone_SFLphone_CallManager_join_participant (callManagerProxy,
+            sel_callID, drag_callID, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 
 }
 
-	void
-dbus_add_participant(const gchar* callID, const gchar* confID)
+void
+dbus_add_participant (const gchar* callID, const gchar* confID)
 {
 
-	DEBUG("dbus_add_participant %s and %s\n", callID, confID);
+    DEBUG ("dbus_add_participant %s and %s\n", callID, confID);
+
+    GError* error = NULL;
 
-	GError* error = NULL;
+    org_sflphone_SFLphone_CallManager_add_participant (callManagerProxy, callID,
+            confID, &error);
 
-	org_sflphone_SFLphone_CallManager_add_participant(callManagerProxy, callID,
-			confID, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    if (error) {
+        g_error_free (error);
+    }
 
 }
 
-	void
-dbus_add_main_participant(const gchar* confID)
+void
+dbus_add_main_participant (const gchar* confID)
 {
-	DEBUG("dbus_add_participant %s\n", confID);
+    DEBUG ("dbus_add_participant %s\n", confID);
+
+    GError* error = NULL;
 
-	GError* error = NULL;
+    org_sflphone_SFLphone_CallManager_add_main_participant (callManagerProxy,
+            confID, &error);
 
-	org_sflphone_SFLphone_CallManager_add_main_participant(callManagerProxy,
-			confID, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_detach_participant(const gchar* callID)
+void
+dbus_detach_participant (const gchar* callID)
 {
 
-	DEBUG("dbus_detach_participant %s\n", callID);
+    DEBUG ("dbus_detach_participant %s\n", callID);
 
-	GError* error = NULL;
-	org_sflphone_SFLphone_CallManager_detach_participant(callManagerProxy,
-			callID, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_CallManager_detach_participant (callManagerProxy,
+            callID, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 
 }
 
-dbus_join_conference(const gchar* sel_confID, const gchar* drag_confID)
+dbus_join_conference (const gchar* sel_confID, const gchar* drag_confID)
 {
 
-	DEBUG("dbus_join_conference %s and %s\n", sel_confID, drag_confID);
+    DEBUG ("dbus_join_conference %s and %s\n", sel_confID, drag_confID);
+
+    GError* error = NULL;
 
-	GError* error = NULL;
+    org_sflphone_SFLphone_CallManager_join_conference (callManagerProxy,
+            sel_confID, drag_confID, &error);
 
-	org_sflphone_SFLphone_CallManager_join_conference(callManagerProxy,
-			sel_confID, drag_confID, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    if (error) {
+        g_error_free (error);
+    }
 
 }
 
-	void
-dbus_set_record(const gchar* id)
+void
+dbus_set_record (const gchar* id)
 {
-	DEBUG("dbus_set_record %s\n", id);
+    DEBUG ("dbus_set_record %s\n", id);
+
+    GError* error = NULL;
+    org_sflphone_SFLphone_CallManager_set_recording (callManagerProxy, id, &error);
 
-	GError* error = NULL;
-	org_sflphone_SFLphone_CallManager_set_recording(callManagerProxy, id, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	gboolean
-dbus_get_is_recording(const callable_obj_t * c)
+gboolean
+dbus_get_is_recording (const callable_obj_t * c)
 {
-	DEBUG("dbus_get_is_recording %s\n", c->_callID);
-	GError* error = NULL;
-	gboolean isRecording;
-	org_sflphone_SFLphone_CallManager_get_is_recording(callManagerProxy,
-			c->_callID, &isRecording, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
-	//DEBUG("RECORDING: %i",isRecording);
-	return isRecording;
+    DEBUG ("dbus_get_is_recording %s\n", c->_callID);
+    GError* error = NULL;
+    gboolean isRecording;
+    org_sflphone_SFLphone_CallManager_get_is_recording (callManagerProxy,
+            c->_callID, &isRecording, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
+
+    //DEBUG("RECORDING: %i",isRecording);
+    return isRecording;
 }
 
-	void
-dbus_set_record_path(const gchar* path)
+void
+dbus_set_record_path (const gchar* path)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_record_path(
-			configurationManagerProxy, path, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_record_path (
+        configurationManagerProxy, path, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	gchar*
-dbus_get_record_path(void)
+gchar*
+dbus_get_record_path (void)
 {
-	GError* error = NULL;
-	gchar *path;
-	org_sflphone_SFLphone_ConfigurationManager_get_record_path(
-			configurationManagerProxy, &path, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
-	return path;
+    GError* error = NULL;
+    gchar *path;
+    org_sflphone_SFLphone_ConfigurationManager_get_record_path (
+        configurationManagerProxy, &path, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
+
+    return path;
 }
 
-	void
-dbus_set_history_limit(const guint days)
+void
+dbus_set_history_limit (const guint days)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_history_limit(
-			configurationManagerProxy, days, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_history_limit (
+        configurationManagerProxy, days, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	guint
-dbus_get_history_limit(void)
+guint
+dbus_get_history_limit (void)
 {
-	GError* error = NULL;
-	gint days = 30;
-	org_sflphone_SFLphone_ConfigurationManager_get_history_limit(
-			configurationManagerProxy, &days, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
-	return (guint) days;
+    GError* error = NULL;
+    gint days = 30;
+    org_sflphone_SFLphone_ConfigurationManager_get_history_limit (
+        configurationManagerProxy, &days, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
+
+    return (guint) days;
 }
 
-	void
-dbus_set_audio_manager(int api)
+void
+dbus_set_audio_manager (int api)
 {
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_audio_manager(
-			configurationManagerProxy, api, &error);
-	if (error)
-	{
-		g_error_free(error);
-	}
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_audio_manager (
+        configurationManagerProxy, api, &error);
+
+    if (error) {
+        g_error_free (error);
+    }
 }
 
-	int
-dbus_get_audio_manager(void)
+int
+dbus_get_audio_manager (void)
 {
-	int api;
-	GError* error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_audio_manager(
-			configurationManagerProxy, &api, &error);
-	if (error)
-	{
-		ERROR("Error calling dbus_get_audio_manager");
-		g_error_free(error);
-	}
-
-	return api;
+    int api;
+    GError* error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_audio_manager (
+        configurationManagerProxy, &api, &error);
+
+    if (error) {
+        ERROR ("Error calling dbus_get_audio_manager");
+        g_error_free (error);
+    }
+
+    return api;
 }
 
 /*
@@ -1965,602 +1909,584 @@ dbus_get_audio_manager(void)
    }
  */
 
-	GHashTable*
-dbus_get_addressbook_settings(void)
+GHashTable*
+dbus_get_addressbook_settings (void)
 {
 
-	GError *error = NULL;
-	GHashTable *results = NULL;
+    GError *error = NULL;
+    GHashTable *results = NULL;
+
+    //DEBUG ("Calling org_sflphone_SFLphone_ConfigurationManager_get_addressbook_settings");
 
-	//DEBUG ("Calling org_sflphone_SFLphone_ConfigurationManager_get_addressbook_settings");
+    org_sflphone_SFLphone_ConfigurationManager_get_addressbook_settings (
+        configurationManagerProxy, &results, &error);
 
-	org_sflphone_SFLphone_ConfigurationManager_get_addressbook_settings(
-			configurationManagerProxy, &results, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_addressbook_settings");
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_addressbook_settings");
+        g_error_free (error);
+    }
 
-	return results;
+    return results;
 }
 
-	void
-dbus_set_addressbook_settings(GHashTable * settings)
+void
+dbus_set_addressbook_settings (GHashTable * settings)
 {
 
-	GError *error = NULL;
+    GError *error = NULL;
+
+    DEBUG ("Calling org_sflphone_SFLphone_ConfigurationManager_set_addressbook_settings");
 
-	DEBUG ("Calling org_sflphone_SFLphone_ConfigurationManager_set_addressbook_settings");
+    org_sflphone_SFLphone_ConfigurationManager_set_addressbook_settings (
+        configurationManagerProxy, settings, &error);
 
-	org_sflphone_SFLphone_ConfigurationManager_set_addressbook_settings(
-			configurationManagerProxy, settings, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_set_addressbook_settings");
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_set_addressbook_settings");
+        g_error_free (error);
+    }
 }
 
-	gchar**
-dbus_get_addressbook_list(void)
+gchar**
+dbus_get_addressbook_list (void)
 {
 
-	GError *error = NULL;
-	gchar** array;
+    GError *error = NULL;
+    gchar** array;
 
-	org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list(
-			configurationManagerProxy, &array, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list");
-		g_error_free(error);
-	}
+    org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list (
+        configurationManagerProxy, &array, &error);
 
-	return array;
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_addressbook_list");
+        g_error_free (error);
+    }
+
+    return array;
 }
 
-	void
-dbus_set_addressbook_list(const gchar** list)
+void
+dbus_set_addressbook_list (const gchar** list)
 {
 
-	GError *error = NULL;
+    GError *error = NULL;
+
+    org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list (
+        configurationManagerProxy, list, &error);
 
-	org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list(
-			configurationManagerProxy, list, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list");
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_set_addressbook_list");
+        g_error_free (error);
+    }
 }
 
-	GHashTable*
-dbus_get_hook_settings(void)
+GHashTable*
+dbus_get_hook_settings (void)
 {
 
-	GError *error = NULL;
-	GHashTable *results = NULL;
+    GError *error = NULL;
+    GHashTable *results = NULL;
 
-	//DEBUG ("Calling org_sflphone_SFLphone_ConfigurationManager_get_addressbook_settings");
+    //DEBUG ("Calling org_sflphone_SFLphone_ConfigurationManager_get_addressbook_settings");
 
-	org_sflphone_SFLphone_ConfigurationManager_get_hook_settings(
-			configurationManagerProxy, &results, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_hook_settings");
-		g_error_free(error);
-	}
+    org_sflphone_SFLphone_ConfigurationManager_get_hook_settings (
+        configurationManagerProxy, &results, &error);
 
-	return results;
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_hook_settings");
+        g_error_free (error);
+    }
+
+    return results;
 }
 
-	void
-dbus_set_hook_settings(GHashTable * settings)
+void
+dbus_set_hook_settings (GHashTable * settings)
 {
 
-	GError *error = NULL;
+    GError *error = NULL;
+
+    org_sflphone_SFLphone_ConfigurationManager_set_hook_settings (
+        configurationManagerProxy, settings, &error);
 
-	org_sflphone_SFLphone_ConfigurationManager_set_hook_settings(
-			configurationManagerProxy, settings, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_set_hook_settings");
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_set_hook_settings");
+        g_error_free (error);
+    }
 }
 
-	GHashTable*
-dbus_get_call_details(const gchar *callID)
+GHashTable*
+dbus_get_call_details (const gchar *callID)
 {
-	GError *error = NULL;
-	GHashTable *details = NULL;
+    GError *error = NULL;
+    GHashTable *details = NULL;
 
-	org_sflphone_SFLphone_CallManager_get_call_details(callManagerProxy, callID,
-			&details, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_call_details");
-		g_error_free(error);
-	}
+    org_sflphone_SFLphone_CallManager_get_call_details (callManagerProxy, callID,
+            &details, &error);
 
-	return details;
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_call_details");
+        g_error_free (error);
+    }
+
+    return details;
 }
 
-	gchar**
-dbus_get_call_list(void)
+gchar**
+dbus_get_call_list (void)
 {
-	GError *error = NULL;
-	gchar **list = NULL;
+    GError *error = NULL;
+    gchar **list = NULL;
+
+    org_sflphone_SFLphone_CallManager_get_call_list (callManagerProxy, &list,
+            &error);
 
-	org_sflphone_SFLphone_CallManager_get_call_list(callManagerProxy, &list,
-			&error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_call_list");
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_call_list");
+        g_error_free (error);
+    }
 
-	return list;
+    return list;
 }
 
-	gchar**
-dbus_get_conference_list(void)
+gchar**
+dbus_get_conference_list (void)
 {
-	GError *error = NULL;
-	gchar **list = NULL;
+    GError *error = NULL;
+    gchar **list = NULL;
+
+    org_sflphone_SFLphone_CallManager_get_conference_list (callManagerProxy,
+            &list, &error);
 
-	org_sflphone_SFLphone_CallManager_get_conference_list(callManagerProxy,
-			&list, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_conference_list");
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_conference_list");
+        g_error_free (error);
+    }
 
-	return list;
+    return list;
 }
 
-	gchar**
-dbus_get_participant_list(const char *confID)
+gchar**
+dbus_get_participant_list (const char *confID)
 {
-	GError *error = NULL;
-	gchar **list = NULL;
+    GError *error = NULL;
+    gchar **list = NULL;
 
-	DEBUG("DBUS: Get conference %s participant list", confID);
+    DEBUG ("DBUS: Get conference %s participant list", confID);
 
-	org_sflphone_SFLphone_CallManager_get_participant_list(callManagerProxy,
-			confID, &list, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_participant_list");
-		g_error_free(error);
-	}
+    org_sflphone_SFLphone_CallManager_get_participant_list (callManagerProxy,
+            confID, &list, &error);
 
-	return list;
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_participant_list");
+        g_error_free (error);
+    }
+
+    return list;
 }
 
-	GHashTable*
-dbus_get_conference_details(const gchar *confID)
+GHashTable*
+dbus_get_conference_details (const gchar *confID)
 {
-	GError *error = NULL;
-	GHashTable *details = NULL;
+    GError *error = NULL;
+    GHashTable *details = NULL;
+
+    org_sflphone_SFLphone_CallManager_get_conference_details (callManagerProxy,
+            confID, &details, &error);
 
-	org_sflphone_SFLphone_CallManager_get_conference_details(callManagerProxy,
-			confID, &details, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_conference_details");
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_conference_details");
+        g_error_free (error);
+    }
 
-	return details;
+    return details;
 }
 
-	void
-dbus_set_accounts_order(const gchar* order)
+void
+dbus_set_accounts_order (const gchar* order)
 {
 
-	GError *error = NULL;
+    GError *error = NULL;
+
+    org_sflphone_SFLphone_ConfigurationManager_set_accounts_order (
+        configurationManagerProxy, order, &error);
 
-	org_sflphone_SFLphone_ConfigurationManager_set_accounts_order(
-			configurationManagerProxy, order, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_set_accounts_order");
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_set_accounts_order");
+        g_error_free (error);
+    }
 }
 
-	GHashTable*
-dbus_get_history(void)
+GHashTable*
+dbus_get_history (void)
 {
-	GError *error = NULL;
-	GHashTable *entries = NULL;
+    GError *error = NULL;
+    GHashTable *entries = NULL;
 
-	org_sflphone_SFLphone_ConfigurationManager_get_history(
-			configurationManagerProxy, &entries, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_history");
-		g_error_free(error);
-	}
+    org_sflphone_SFLphone_ConfigurationManager_get_history (
+        configurationManagerProxy, &entries, &error);
 
-	return entries;
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_CallManager_get_history");
+        g_error_free (error);
+    }
+
+    return entries;
 }
 
-	void
-dbus_set_history(GHashTable* entries)
+void
+dbus_set_history (GHashTable* entries)
 {
-	GError *error = NULL;
+    GError *error = NULL;
+
+    org_sflphone_SFLphone_ConfigurationManager_set_history (
+        configurationManagerProxy, entries, &error);
 
-	org_sflphone_SFLphone_ConfigurationManager_set_history(
-			configurationManagerProxy, entries, &error);
-	if (error)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_CallManager_set_history");
-		g_error_free(error);
-	}
+    if (error) {
+        ERROR ("Error calling org_sflphone_SFLphone_CallManager_set_history");
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_confirm_sas(const callable_obj_t * c)
+void
+dbus_confirm_sas (const callable_obj_t * c)
 {
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_set_sa_sverified(callManagerProxy,
-			c->_callID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call setSASVerified() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_set_sa_sverified (callManagerProxy,
+            c->_callID, &error);
+
+    if (error) {
+        ERROR ("Failed to call setSASVerified() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_reset_sas(const callable_obj_t * c)
+void
+dbus_reset_sas (const callable_obj_t * c)
 {
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_reset_sa_sverified(callManagerProxy,
-			c->_callID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call resetSASVerified on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_reset_sa_sverified (callManagerProxy,
+            c->_callID, &error);
+
+    if (error) {
+        ERROR ("Failed to call resetSASVerified on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_set_confirm_go_clear(const callable_obj_t * c)
+void
+dbus_set_confirm_go_clear (const callable_obj_t * c)
 {
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_set_confirm_go_clear(callManagerProxy,
-			c->_callID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call set_confirm_go_clear on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_set_confirm_go_clear (callManagerProxy,
+            c->_callID, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_confirm_go_clear on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_request_go_clear(const callable_obj_t * c)
+void
+dbus_request_go_clear (const callable_obj_t * c)
 {
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_request_go_clear(callManagerProxy,
-			c->_callID, &error);
-	if (error)
-	{
-		ERROR ("Failed to call request_go_clear on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_request_go_clear (callManagerProxy,
+            c->_callID, &error);
+
+    if (error) {
+        ERROR ("Failed to call request_go_clear on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	gchar**
+gchar**
 dbus_get_supported_tls_method()
 {
-	GError *error = NULL;
-	gchar** array = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_get_supported_tls_method(
-			configurationManagerProxy, &array, &error);
-
-	if (error != NULL)
-	{
-		ERROR ("Failed to call get_supported_tls_method() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return array;
-}
-
-	GHashTable*
-dbus_get_tls_settings_default(void)
-{
-	GError *error = NULL;
-	GHashTable *results = NULL;
-
-	org_sflphone_SFLphone_ConfigurationManager_get_tls_settings_default(
-			configurationManagerProxy, &results, &error);
-	if (error != NULL)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_tls_settings_default");
-		g_error_free(error);
-	}
-
-	return results;
-}
-
-	gchar *
-dbus_get_address_from_interface_name(gchar* interface)
+    GError *error = NULL;
+    gchar** array = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_get_supported_tls_method (
+        configurationManagerProxy, &array, &error);
+
+    if (error != NULL) {
+        ERROR ("Failed to call get_supported_tls_method() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+
+    return array;
+}
+
+GHashTable*
+dbus_get_tls_settings_default (void)
+{
+    GError *error = NULL;
+    GHashTable *results = NULL;
+
+    org_sflphone_SFLphone_ConfigurationManager_get_tls_settings_default (
+        configurationManagerProxy, &results, &error);
+
+    if (error != NULL) {
+        ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_tls_settings_default");
+        g_error_free (error);
+    }
+
+    return results;
+}
+
+gchar *
+dbus_get_address_from_interface_name (gchar* interface)
 {
-	GError *error = NULL;
-	gchar * address;
-
-	org_sflphone_SFLphone_ConfigurationManager_get_addr_from_interface_name(
-			configurationManagerProxy, interface, &address, &error);
-	if (error != NULL)
-	{
-		ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_addr_from_interface_name\n");
-		g_error_free(error);
-	}
-
-	return address;
+    GError *error = NULL;
+    gchar * address;
+
+    org_sflphone_SFLphone_ConfigurationManager_get_addr_from_interface_name (
+        configurationManagerProxy, interface, &address, &error);
+
+    if (error != NULL) {
+        ERROR ("Error calling org_sflphone_SFLphone_ConfigurationManager_get_addr_from_interface_name\n");
+        g_error_free (error);
+    }
+
+    return address;
 
 }
 
-	gchar **
-dbus_get_all_ip_interface(void)
+gchar **
+dbus_get_all_ip_interface (void)
 {
-	GError *error = NULL;
-	gchar ** array;
+    GError *error = NULL;
+    gchar ** array;
+
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_all_ip_interface (
+                configurationManagerProxy, &array, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_all_ip_interface) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_all_ip_interface: %s", error->message);
+        }
 
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_all_ip_interface(
-				configurationManagerProxy, &array, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_all_ip_interface) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_all_ip_interface: %s", error->message);
-		}
-		g_error_free(error);
-		return NULL;
-	}
-	else
-	{
-		DEBUG ("DBus called get_all_ip_interface() on ConfigurationManager");
-		return array;
-	}
+        g_error_free (error);
+        return NULL;
+    } else {
+        DEBUG ("DBus called get_all_ip_interface() on ConfigurationManager");
+        return array;
+    }
 }
 
-	gchar **
-dbus_get_all_ip_interface_by_name(void)
+gchar **
+dbus_get_all_ip_interface_by_name (void)
 {
-	GError *error = NULL;
-	gchar ** array;
+    GError *error = NULL;
+    gchar ** array;
 
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_all_ip_interface_by_name(
-				configurationManagerProxy, &array, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_all_ip_interface) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_all_ip_interface: %s", error->message);
-		}
-		g_error_free(error);
-		return NULL;
-	}
-	else
-	{
-		DEBUG ("DBus called get_all_ip_interface() on ConfigurationManager");
-		return array;
-	}
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_all_ip_interface_by_name (
+                configurationManagerProxy, &array, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_all_ip_interface) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_all_ip_interface: %s", error->message);
+        }
+
+        g_error_free (error);
+        return NULL;
+    } else {
+        DEBUG ("DBus called get_all_ip_interface() on ConfigurationManager");
+        return array;
+    }
 }
 
-	guint
-dbus_get_window_width(void)
+guint
+dbus_get_window_width (void)
 {
 
-	GError *error = NULL;
-	guint value;
+    GError *error = NULL;
+    guint value;
+
+    org_sflphone_SFLphone_ConfigurationManager_get_window_width (
+        configurationManagerProxy, &value, &error);
 
-	org_sflphone_SFLphone_ConfigurationManager_get_window_width(
-			configurationManagerProxy, &value, &error);
+    if (error != NULL) {
+        ERROR ("Failed to call get_window_width() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 
-	if (error != NULL)
-	{
-		ERROR ("Failed to call get_window_width() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return value;
+    return value;
 }
 
-	guint
-dbus_get_window_height(void)
+guint
+dbus_get_window_height (void)
 {
 
-	GError *error = NULL;
-	guint value;
+    GError *error = NULL;
+    guint value;
+
+    org_sflphone_SFLphone_ConfigurationManager_get_window_height (
+        configurationManagerProxy, &value, &error);
 
-	org_sflphone_SFLphone_ConfigurationManager_get_window_height(
-			configurationManagerProxy, &value, &error);
+    if (error != NULL) {
+        ERROR ("Failed to call get_window_height() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 
-	if (error != NULL)
-	{
-		ERROR ("Failed to call get_window_height() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return value;
+    return value;
 }
 
-	void
-dbus_set_window_width(const guint width)
+void
+dbus_set_window_width (const guint width)
 {
 
-	GError *error = NULL;
+    GError *error = NULL;
 
-	org_sflphone_SFLphone_ConfigurationManager_set_window_width(
-			configurationManagerProxy, width, &error);
+    org_sflphone_SFLphone_ConfigurationManager_set_window_width (
+        configurationManagerProxy, width, &error);
 
-	if (error != NULL)
-	{
-		ERROR ("Failed to call set_window_width() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error != NULL) {
+        ERROR ("Failed to call set_window_width() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_set_window_height(const guint height)
+void
+dbus_set_window_height (const guint height)
 {
 
-	GError *error = NULL;
+    GError *error = NULL;
 
-	org_sflphone_SFLphone_ConfigurationManager_set_window_height(
-			configurationManagerProxy, height, &error);
+    org_sflphone_SFLphone_ConfigurationManager_set_window_height (
+        configurationManagerProxy, height, &error);
 
-	if (error != NULL)
-	{
-		ERROR ("Failed to call set_window_height() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error != NULL) {
+        ERROR ("Failed to call set_window_height() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	guint
-dbus_get_window_position_x(void)
+guint
+dbus_get_window_position_x (void)
 {
 
-	GError *error = NULL;
-	guint value;
+    GError *error = NULL;
+    guint value;
 
-	org_sflphone_SFLphone_ConfigurationManager_get_window_position_x(
-			configurationManagerProxy, &value, &error);
+    org_sflphone_SFLphone_ConfigurationManager_get_window_position_x (
+        configurationManagerProxy, &value, &error);
 
-	if (error != NULL)
-	{
-		ERROR ("Failed to call get_window_position_x() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return value;
+    if (error != NULL) {
+        ERROR ("Failed to call get_window_position_x() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
+
+    return value;
 }
 
-	guint
-dbus_get_window_position_y(void)
+guint
+dbus_get_window_position_y (void)
 {
 
-	GError *error = NULL;
-	guint value;
+    GError *error = NULL;
+    guint value;
+
+    org_sflphone_SFLphone_ConfigurationManager_get_window_position_y (
+        configurationManagerProxy, &value, &error);
 
-	org_sflphone_SFLphone_ConfigurationManager_get_window_position_y(
-			configurationManagerProxy, &value, &error);
+    if (error != NULL) {
+        ERROR ("Failed to call get_window_position_y() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 
-	if (error != NULL)
-	{
-		ERROR ("Failed to call get_window_position_y() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
-	return value;
+    return value;
 }
 
-	void
-dbus_set_window_position_x(const guint posx)
+void
+dbus_set_window_position_x (const guint posx)
 {
 
-	GError *error = NULL;
+    GError *error = NULL;
 
-	org_sflphone_SFLphone_ConfigurationManager_set_window_position_x(
-			configurationManagerProxy, posx, &error);
+    org_sflphone_SFLphone_ConfigurationManager_set_window_position_x (
+        configurationManagerProxy, posx, &error);
 
-	if (error != NULL)
-	{
-		ERROR ("Failed to call set_window_position_x() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error != NULL) {
+        ERROR ("Failed to call set_window_position_x() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void
-dbus_set_window_position_y(const guint posy)
+void
+dbus_set_window_position_y (const guint posy)
 {
 
-	GError *error = NULL;
+    GError *error = NULL;
 
-	org_sflphone_SFLphone_ConfigurationManager_set_window_position_y(
-			configurationManagerProxy, posy, &error);
+    org_sflphone_SFLphone_ConfigurationManager_set_window_position_y (
+        configurationManagerProxy, posy, &error);
 
-	if (error != NULL)
-	{
-		ERROR ("Failed to call set_window_position_y() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    if (error != NULL) {
+        ERROR ("Failed to call set_window_position_y() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	GHashTable*
-dbus_get_shortcuts(void)
+GHashTable*
+dbus_get_shortcuts (void)
 {
-	GError *error = NULL;
-	GHashTable * shortcuts;
-	if (!org_sflphone_SFLphone_ConfigurationManager_get_shortcuts(
-				configurationManagerProxy, &shortcuts, &error))
-	{
-		if (error->domain == DBUS_GERROR && error->code
-				== DBUS_GERROR_REMOTE_EXCEPTION)
-		{
-			ERROR ("Caught remote method (get_shortcuts) exception  %s: %s", dbus_g_error_get_name(error), error->message);
-		}
-		else
-		{
-			ERROR("Error while calling get_shortcuts: %s", error->message);
-		}
-		g_error_free(error);
-		return NULL;
-	}
-	else
-	{
-		return shortcuts;
-	}
+    GError *error = NULL;
+    GHashTable * shortcuts;
+
+    if (!org_sflphone_SFLphone_ConfigurationManager_get_shortcuts (
+                configurationManagerProxy, &shortcuts, &error)) {
+        if (error->domain == DBUS_GERROR && error->code
+                == DBUS_GERROR_REMOTE_EXCEPTION) {
+            ERROR ("Caught remote method (get_shortcuts) exception  %s: %s", dbus_g_error_get_name (error), error->message);
+        } else {
+            ERROR ("Error while calling get_shortcuts: %s", error->message);
+        }
+
+        g_error_free (error);
+        return NULL;
+    } else {
+        return shortcuts;
+    }
 }
 
-	void
-dbus_set_shortcuts(GHashTable * shortcuts)
+void
+dbus_set_shortcuts (GHashTable * shortcuts)
 {
-	GError *error = NULL;
-	org_sflphone_SFLphone_ConfigurationManager_set_shortcuts(
-			configurationManagerProxy, shortcuts, &error);
-	if (error)
-	{
-		ERROR ("Failed to call set_shortcuts() on ConfigurationManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_ConfigurationManager_set_shortcuts (
+        configurationManagerProxy, shortcuts, &error);
+
+    if (error) {
+        ERROR ("Failed to call set_shortcuts() on ConfigurationManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
 
-	void 
+void
 dbus_send_text_message (const gchar* callID, const gchar *message)
 {
-	GError *error = NULL;
-	org_sflphone_SFLphone_CallManager_send_text_message(
-			callManagerProxy, callID, message, &error);
-	if (error)
-	{
-		ERROR ("Failed to call send_text_message() on CallManager: %s",
-				error->message);
-		g_error_free(error);
-	}
+    GError *error = NULL;
+    org_sflphone_SFLphone_CallManager_send_text_message (
+        callManagerProxy, callID, message, &error);
+
+    if (error) {
+        ERROR ("Failed to call send_text_message() on CallManager: %s",
+               error->message);
+        g_error_free (error);
+    }
 }
diff --git a/sflphone-client-gnome/src/dbus/dbus.h b/sflphone-client-gnome/src/dbus/dbus.h
index 87b0871d4870a48b7d835a36316faa48c04e3997..f9c6516009751c02f29d6ae364938aa88398dc49 100644
--- a/sflphone-client-gnome/src/dbus/dbus.h
+++ b/sflphone-client-gnome/src/dbus/dbus.h
@@ -60,19 +60,19 @@ void dbus_clean ();
  * CallManager - Hold a call
  * @param c The call to hold
  */
-void dbus_hold (const callable_obj_t * c );
+void dbus_hold (const callable_obj_t * c);
 
 /**
  * CallManager - Unhold a call
  * @param c The call to unhold
  */
-void dbus_unhold (const callable_obj_t * c );
+void dbus_unhold (const callable_obj_t * c);
 
 /**
  * CallManager - Hang up a call
  * @param c The call to hang up
  */
-void dbus_hang_up (const callable_obj_t * c );
+void dbus_hang_up (const callable_obj_t * c);
 
 /**
  * CallManager - Transfer a call
@@ -110,50 +110,50 @@ gchar ** dbus_account_list();
  * @param accountID The unique of the account
  * @return GHashTable* The details of the account
  */
-GHashTable * dbus_account_details(gchar * accountID);
+GHashTable * dbus_account_details (gchar * accountID);
 
 /**
  * ConfigurationManager - Set the details of a specific account
  * @param a The account to update
  */
-void dbus_set_account_details(account_t *a);
+void dbus_set_account_details (account_t *a);
 
 /**
- * ConfigurationManager - Set the additional credential information 
+ * ConfigurationManager - Set the additional credential information
  * of a specific account, for a specific credential index.
  * This function will add the new section on the server side
  * if it cannot be found.
  * @param a The account to update
  * @param index The index for the credential to update
  */
-void dbus_set_credential(account_t *a, int index);
+void dbus_set_credential (account_t *a, int index);
 
 /**
- * ConfigurationManager - Set the additional credential information 
+ * ConfigurationManager - Set the additional credential information
  * of a specific account, for a specific credential index.
  * This function will add the new section on the server side
  * if it cannot be found.
  * @param a The account to update
  * @return int The number of credentials specified
  */
-int dbus_get_number_of_credential(gchar * accountID);
+int dbus_get_number_of_credential (gchar * accountID);
 
 /**
  * ConfigurationManager - Delete all credentials defined for
  * a given account.
  * @param a The account id
  */
-void dbus_delete_all_credential(account_t *a);
+void dbus_delete_all_credential (account_t *a);
 
 /**
  * ConfigurationManager - Set the number of credential that
  * is being used.
  * @param a The account id
  */
-void dbus_set_number_of_credential(account_t *a, int number);
+void dbus_set_number_of_credential (account_t *a, int number);
 
 /**
- * ConfigurationManager - Set the additional credential information 
+ * ConfigurationManager - Set the additional credential information
  * of a specific account, for a specific credential index.
  * This function will add the new section on the server side
  * if it cannot be found.
@@ -161,17 +161,17 @@ void dbus_set_number_of_credential(account_t *a, int number);
  * @param index The credential index
  * @return GHashTable* The credential at index "index" for the given account
  */
-GHashTable* dbus_get_credential(gchar * accountID, int index);
+GHashTable* dbus_get_credential (gchar * accountID, int index);
 
 /**
- * ConfigurationManager - Get the details for the ip2ip profile 
+ * ConfigurationManager - Get the details for the ip2ip profile
  */
-GHashTable * dbus_get_ip2_ip_details(void);
+GHashTable * dbus_get_ip2_ip_details (void);
 
 /**
- * ConfigurationManager - Set the details for the ip2ip profile 
+ * ConfigurationManager - Set the details for the ip2ip profile
  */
-void dbus_set_ip2ip_details(GHashTable * properties);
+void dbus_set_ip2ip_details (GHashTable * properties);
 
 /**
  * ConfigurationManager - Send registration request
@@ -180,38 +180,38 @@ void dbus_set_ip2ip_details(GHashTable * properties);
  *		 0 for unregistration request
  *		 1 for registration request
  */
-void dbus_send_register( gchar* accountID , const guint enable );
+void dbus_send_register (gchar* accountID , const guint enable);
 
 /**
  * ConfigurationManager - Add an account to the list
  * @param a The account to add
  */
-gchar* dbus_add_account(account_t *a);
+gchar* dbus_add_account (account_t *a);
 
 /**
  * ConfigurationManager - Remove an account from the list
  * @param accountID The account to remove
  */
-void dbus_remove_account(gchar * accountID);
+void dbus_remove_account (gchar * accountID);
 
 /**
  * ConfigurationManager - Set volume for speaker/mic
  * @param device The speaker or the mic
  * @param value The new value
  */
-void dbus_set_volume(const gchar * device, gdouble value);
+void dbus_set_volume (const gchar * device, gdouble value);
 
 /**
  * ConfigurationManager - Get the volume of a device
  * @param device The speaker or the mic
  */
-gdouble dbus_get_volume(const gchar * device);
+gdouble dbus_get_volume (const gchar * device);
 
 /**
  * ConfigurationManager - Play DTMF
  * @param key The DTMF to send
  */
-void dbus_play_dtmf(const gchar * key);
+void dbus_play_dtmf (const gchar * key);
 
 /**
  * ConfigurationManager - Get the codecs list
@@ -224,7 +224,7 @@ gchar** dbus_codec_list();
  * @param payload The payload of the codec
  * @return gchar** The codec details
  */
-gchar** dbus_codec_details(int payload);
+gchar** dbus_codec_details (int payload);
 
 /**
  * ConfigurationManager - Get the default codec list
@@ -249,7 +249,7 @@ void dbus_set_active_codec_list (const gchar** list, const gchar*);
  * CallManager - return the codec name
  * @param callable_obj_t* current call
  */
-gchar* dbus_get_current_codec_name(const callable_obj_t * c);
+gchar* dbus_get_current_codec_name (const callable_obj_t * c);
 
 /**
  * ConfigurationManager - Get the list of available output audio plugins
@@ -261,13 +261,13 @@ gchar** dbus_get_audio_plugin_list();
  * ConfigurationManager - Select an input audio plugin
  * @param audioPlugin The string description of the plugin
  */
-void dbus_set_input_audio_plugin(gchar* audioPlugin);
+void dbus_set_input_audio_plugin (gchar* audioPlugin);
 
 /**
  * ConfigurationManager - Select an output audio plugin
  * @param audioPlugin The string description of the plugin
  */
-void dbus_set_output_audio_plugin(gchar* audioPlugin);
+void dbus_set_output_audio_plugin (gchar* audioPlugin);
 
 /**
  * ConfigurationManager - Get the list of available output audio devices
@@ -279,7 +279,7 @@ gchar** dbus_get_audio_output_device_list();
  * ConfigurationManager - Select an output audio device
  * @param index The index of the soundcard
  */
-void dbus_set_audio_output_device(const int index);
+void dbus_set_audio_output_device (const int index);
 
 /**
  * ConfigurationManager - Get the list of available input audio devices
@@ -291,7 +291,7 @@ gchar** dbus_get_audio_input_device_list();
  * ConfigurationManager - Select an input audio device
  * @param index The index of the soundcard
  */
-void dbus_set_audio_input_device(const int index);
+void dbus_set_audio_input_device (const int index);
 
 /**
  * ConfigurationManager - Get the current audio devices
@@ -304,7 +304,7 @@ gchar** dbus_get_current_audio_devices_index();
  * @param name The string description of the audio device
  * @return int The index of the device
  */
-int dbus_get_audio_device_index(const gchar* name);
+int dbus_get_audio_device_index (const gchar* name);
 
 /**
  * ConfigurationManager - Get the current output audio plugin
@@ -320,29 +320,29 @@ gchar* dbus_get_current_audio_output_plugin();
  * ConfigurationManager - Get the current state of echo canceller
  * @return gchar* The state (enabled/disabled)
  */
-gchar *dbus_get_echo_cancel_state(void);
+gchar *dbus_get_echo_cancel_state (void);
 
 /**
  * ConfigurationManager - Set the crrent state of echo canceller
  * @param gchar* The state (enabled/disabled)
  */
-void dbus_set_echo_cancel_state(gchar *state);
+void dbus_set_echo_cancel_state (gchar *state);
 
 /**
  * ConfigurationManager - Get the current noise suppressor state
  * @return gchar* The state (enabled/disabled)
  */
-gchar *dbus_get_noise_suppress_state(void);
+gchar *dbus_get_noise_suppress_state (void);
 
 /**
  * ConfigurationManager - Set the current noise suppressor state
  * @param gchar* The state (enabled/disabled)
  */
-void dbus_set_noise_suppress_state(gchar *state);
+void dbus_set_noise_suppress_state (gchar *state);
 
 
 /**
- * ConfigurationManager - Query to server to 
+ * ConfigurationManager - Query to server to
  * know if MD5 credential hashing is enabled.
  * @return True if enabled, false otherwise
  *
@@ -353,16 +353,16 @@ gboolean dbus_is_md5_credential_hashing();
  * ConfigurationManager - Set whether or not
  * the server should store credential as
  * a md5 hash.
- * @param enabled 
+ * @param enabled
  */
-void dbus_set_md5_credential_hashing(gboolean enabled);
+void dbus_set_md5_credential_hashing (gboolean enabled);
 
 /**
  * ConfigurationManager - Tells the GUI if IAX2 support is enabled
  * @return int 1 if IAX2 is enabled
  *	       0 otherwise
  */
-int dbus_is_iax2_enabled( void );
+int dbus_is_iax2_enabled (void);
 
 /**
  * ConfigurationManager - Query the server about the ringtone option.
@@ -370,25 +370,25 @@ int dbus_is_iax2_enabled( void );
  * @return int	1 if enabled
  *	        0 otherwise
  */
-int dbus_is_ringtone_enabled( void );
+int dbus_is_ringtone_enabled (void);
 
 /**
  * ConfigurationManager - Set the ringtone option
  * Inverse current value
  */
-void dbus_ringtone_enabled( void );
+void dbus_ringtone_enabled (void);
 
 /**
  * ConfigurationManager - Get the ringtone
  * @return gchar* The file name selected as a ringtone
  */
-gchar* dbus_get_ringtone_choice( void );
+gchar* dbus_get_ringtone_choice (void);
 
 /**
  * ConfigurationManager - Set a ringtone
  * @param tone The file name of the ringtone
  */
-void dbus_set_ringtone_choice( const gchar* tone );
+void dbus_set_ringtone_choice (const gchar* tone);
 
 /**
  * ConfigurationManager - Set the dialpad visible or not
@@ -400,25 +400,25 @@ void dbus_set_dialpad (gboolean display);
  * @return int 1 if dialpad has to be displayed
  *	       0 otherwise
  */
-int dbus_get_dialpad( void );
+int dbus_get_dialpad (void);
 
 /**
  * ConfigurationManager - Set the searchbar visible or not
  */
-void dbus_set_searchbar(  );
+void dbus_set_searchbar();
 
 /**
  * ConfigurationManager - Tells if the user wants to display the search bar or not
  * @return int 1 if the search bar has to be displayed
  *	       0 otherwise
  */
-int dbus_get_searchbar( void );
+int dbus_get_searchbar (void);
 
 /**
  * ConfigurationManager - Gives the maximum number of days the user wants to have in the history
  * @return double The maximum number of days
  */
-guint dbus_get_history_limit( void );
+guint dbus_get_history_limit (void);
 
 /**
  * ConfigurationManager - Gives the maximum number of days the user wants to have in the history
@@ -430,14 +430,14 @@ void dbus_set_history_limit (const guint days);
  * @return int	0	ALSA
  *		1	PULSEAUDIO
  */
-int dbus_get_audio_manager( void );
+int dbus_get_audio_manager (void);
 
 /**
  * ConfigurationManager - Set the audio manager
  * @param api	0	ALSA
  *		1	PULSEAUDIO
  */
-void dbus_set_audio_manager( int api );
+void dbus_set_audio_manager (int api);
 
 /**
  * ConfigurationManager - Start a tone when a new call is open and no numbers have been dialed
@@ -446,7 +446,7 @@ void dbus_set_audio_manager( int api );
  * @param type  TONE_WITH_MESSAGE
  *		TONE_WITHOUT_MESSAGE
  */
-void dbus_start_tone(const int start , const guint type);
+void dbus_start_tone (const int start , const guint type);
 
 /**
  * Instance - Send registration request to dbus service.
@@ -454,19 +454,19 @@ void dbus_start_tone(const int start , const guint type);
  * @param pid The pid of the processus client
  * @param name The string description of the client. Here : GTK+ Client
  */
-void dbus_register( int pid, gchar * name);
+void dbus_register (int pid, gchar * name);
 
 /**
  * Instance - Send unregistration request to dbus services
  * @param pid The pid of the processus
  */
-void dbus_unregister(int pid);
+void dbus_unregister (int pid);
 
-void dbus_set_sip_address(const gchar* address);
+void dbus_set_sip_address (const gchar* address);
 
-gint dbus_get_sip_address(void);
+gint dbus_get_sip_address (void);
 
-void dbus_add_participant(const gchar* callID, const gchar* confID);
+void dbus_add_participant (const gchar* callID, const gchar* confID);
 
 void dbus_set_record (const gchar * id);
 
@@ -492,17 +492,17 @@ void dbus_set_addressbook_list (const gchar** list);
 /**
  * Resolve the local address given an interface name
  */
-gchar * dbus_get_address_from_interface_name(gchar* interface);
+gchar * dbus_get_address_from_interface_name (gchar* interface);
 
 /**
  * Query the daemon to return a list of network interface (described as there IP address)
  */
-gchar** dbus_get_all_ip_interface(void);
+gchar** dbus_get_all_ip_interface (void);
 
 /**
  * Query the daemon to return a list of network interface (described as there name)
  */
-gchar** dbus_get_all_ip_interface_by_name(void);
+gchar** dbus_get_all_ip_interface_by_name (void);
 
 /**
  * Encapsulate all the url hook-related configuration
@@ -517,7 +517,7 @@ GHashTable* dbus_get_hook_settings (void);
 void dbus_set_hook_settings (GHashTable *);
 
 
-gboolean dbus_get_is_recording(const callable_obj_t *);
+gboolean dbus_get_is_recording (const callable_obj_t *);
 
 GHashTable* dbus_get_call_details (const gchar* callID);
 
@@ -536,21 +536,21 @@ void dbus_set_history (GHashTable* entries);
 void sflphone_display_transfer_status (const gchar* message);
 
 /**
- * CallManager - Confirm Short Authentication String 
+ * CallManager - Confirm Short Authentication String
  * for a given callId
  * @param c The call to confirm SAS
  */
 void dbus_confirm_sas (const callable_obj_t * c);
 
 /**
- * CallManager - Reset Short Authentication String 
+ * CallManager - Reset Short Authentication String
  * for a given callId
  * @param c The call to reset SAS
  */
 void dbus_reset_sas (const callable_obj_t * c);
 
 /**
- * CallManager - Request Go Clear in the ZRTP Protocol 
+ * CallManager - Request Go Clear in the ZRTP Protocol
  * for a given callId
  * @param c The call that we want to go clear
  */
@@ -565,7 +565,7 @@ void dbus_set_confirm_go_clear (const callable_obj_t * c);
 
 /**
  * CallManager - Get the list of supported TLS methods from
- * the server in textual form.  
+ * the server in textual form.
  * @return an array of string representing supported methods
  */
 gchar** dbus_get_supported_tls_method();
@@ -581,8 +581,8 @@ guint dbus_get_window_position_y (void);
 void dbus_set_window_position_x (const guint posx);
 void dbus_set_window_position_y (const guint posy);
 
-GHashTable* dbus_get_shortcuts(void);
-void dbus_set_shortcuts(GHashTable * shortcuts);
+GHashTable* dbus_get_shortcuts (void);
+void dbus_set_shortcuts (GHashTable * shortcuts);
 
 /* Instant messaging */
 void dbus_send_text_message (const gchar* callID, const gchar *message);
diff --git a/sflphone-client-gnome/src/dialpad.c b/sflphone-client-gnome/src/dialpad.c
index 31ed1374132a772d02195a4d732c7f30ca195f8b..04009dc0450c9fb1e57f407f528965269251b900 100644
--- a/sflphone-client-gnome/src/dialpad.c
+++ b/sflphone-client-gnome/src/dialpad.c
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -27,7 +27,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
- 
+
 #include <dialpad.h>
 #include <actions.h>
 
@@ -37,80 +37,80 @@
 static void
 dialpad_pressed (GtkWidget * widget UNUSED, gpointer data)
 {
-  gtk_widget_grab_focus(GTK_WIDGET(current_calls->view));
-  sflphone_keypad(0, (gchar*) data);
+    gtk_widget_grab_focus (GTK_WIDGET (current_calls->view));
+    sflphone_keypad (0, (gchar*) data);
 }
 
-GtkWidget * 
+GtkWidget *
 get_numpad_button (const gchar* number, gboolean twolines, const gchar * letters)
 {
-  GtkWidget * button;
-  GtkWidget * label;
-  gchar * markup;
-  
-  button = gtk_button_new ();
-  label = gtk_label_new ( "1" );
-  gtk_label_set_single_line_mode ( GTK_LABEL(label), FALSE );
-  gtk_label_set_justify( GTK_LABEL(label), GTK_JUSTIFY_CENTER );
-  markup = g_markup_printf_escaped("<big><b>%s</b></big>%s%s", number, (twolines == TRUE ? "\n": ""), letters);
-  gtk_label_set_markup ( GTK_LABEL(label), markup);
-  gtk_container_add (GTK_CONTAINER (button), label);
-  g_signal_connect (G_OBJECT (button), "clicked",
-                    G_CALLBACK (dialpad_pressed), (gchar*)number);
-  
-  return button;
+    GtkWidget * button;
+    GtkWidget * label;
+    gchar * markup;
+
+    button = gtk_button_new ();
+    label = gtk_label_new ("1");
+    gtk_label_set_single_line_mode (GTK_LABEL (label), FALSE);
+    gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
+    markup = g_markup_printf_escaped ("<big><b>%s</b></big>%s%s", number, (twolines == TRUE ? "\n": ""), letters);
+    gtk_label_set_markup (GTK_LABEL (label), markup);
+    gtk_container_add (GTK_CONTAINER (button), label);
+    g_signal_connect (G_OBJECT (button), "clicked",
+                      G_CALLBACK (dialpad_pressed), (gchar*) number);
+
+    return button;
 }
 
-GtkWidget * 
+GtkWidget *
 create_dialpad()
 {
-  GtkWidget * button;
-  GtkWidget * table;
-  
-  table = gtk_table_new ( 4, 3, TRUE /* homogeneous */);
-  gtk_table_set_row_spacings( GTK_TABLE(table), 5);
-  gtk_table_set_col_spacings( GTK_TABLE(table), 5);
-  gtk_container_set_border_width (GTK_CONTAINER(table), 5);
-  
-  button = get_numpad_button("1", TRUE, "");
-  gtk_table_attach ( GTK_TABLE( table ), button, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  button = get_numpad_button("2", TRUE, "a b c");
-  gtk_table_attach ( GTK_TABLE( table ), button, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  button = get_numpad_button("3", TRUE, "d e f");
-  gtk_table_attach ( GTK_TABLE( table ), button, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  
-  button = get_numpad_button("4", TRUE, "g h i");
-  gtk_table_attach ( GTK_TABLE( table ), button, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  button = get_numpad_button("5", TRUE, "j k l");
-  gtk_table_attach ( GTK_TABLE( table ), button, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  button = get_numpad_button("6", TRUE, "m n o");
-  gtk_table_attach ( GTK_TABLE( table ), button, 2, 3, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  
-  button = get_numpad_button("7", TRUE, "p q r s");
-  gtk_table_attach ( GTK_TABLE( table ), button, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  button = get_numpad_button("8", TRUE, "t u v");
-  gtk_table_attach ( GTK_TABLE( table ), button, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  button = get_numpad_button("9", TRUE, "w x y z");
-  gtk_table_attach ( GTK_TABLE( table ), button, 2, 3, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  
-  button = get_numpad_button("*", FALSE, "");
-  gtk_table_attach ( GTK_TABLE( table ), button, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  button = get_numpad_button("0", FALSE, "");
-  gtk_table_attach ( GTK_TABLE( table ), button, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  button = get_numpad_button("#", FALSE, "");
-  gtk_table_attach ( GTK_TABLE( table ), button, 2, 3, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  
-  return table;
-  
+    GtkWidget * button;
+    GtkWidget * table;
+
+    table = gtk_table_new (4, 3, TRUE /* homogeneous */);
+    gtk_table_set_row_spacings (GTK_TABLE (table), 5);
+    gtk_table_set_col_spacings (GTK_TABLE (table), 5);
+    gtk_container_set_border_width (GTK_CONTAINER (table), 5);
+
+    button = get_numpad_button ("1", TRUE, "");
+    gtk_table_attach (GTK_TABLE (table), button, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    button = get_numpad_button ("2", TRUE, "a b c");
+    gtk_table_attach (GTK_TABLE (table), button, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    button = get_numpad_button ("3", TRUE, "d e f");
+    gtk_table_attach (GTK_TABLE (table), button, 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+
+    button = get_numpad_button ("4", TRUE, "g h i");
+    gtk_table_attach (GTK_TABLE (table), button, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    button = get_numpad_button ("5", TRUE, "j k l");
+    gtk_table_attach (GTK_TABLE (table), button, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    button = get_numpad_button ("6", TRUE, "m n o");
+    gtk_table_attach (GTK_TABLE (table), button, 2, 3, 1, 2, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+
+    button = get_numpad_button ("7", TRUE, "p q r s");
+    gtk_table_attach (GTK_TABLE (table), button, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    button = get_numpad_button ("8", TRUE, "t u v");
+    gtk_table_attach (GTK_TABLE (table), button, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    button = get_numpad_button ("9", TRUE, "w x y z");
+    gtk_table_attach (GTK_TABLE (table), button, 2, 3, 2, 3, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+
+    button = get_numpad_button ("*", FALSE, "");
+    gtk_table_attach (GTK_TABLE (table), button, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    button = get_numpad_button ("0", FALSE, "");
+    gtk_table_attach (GTK_TABLE (table), button, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    button = get_numpad_button ("#", FALSE, "");
+    gtk_table_attach (GTK_TABLE (table), button, 2, 3, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
+
+    return table;
+
 }
diff --git a/sflphone-client-gnome/src/dialpad.h b/sflphone-client-gnome/src/dialpad.h
index c95f5caf55541fd8db6fe6e4152c35db652fc945..c25f2ebff216bdfa52b1a98fc3313c84ec6676d1 100644
--- a/sflphone-client-gnome/src/dialpad.h
+++ b/sflphone-client-gnome/src/dialpad.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -27,7 +27,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
- 
+
 #ifndef __DIALPAD_H__
 #define __DIALPAD_H__
 
@@ -42,4 +42,4 @@
  */
 GtkWidget * create_dialpad();
 
-#endif 
+#endif
diff --git a/sflphone-client-gnome/src/eel-gconf-extensions.c b/sflphone-client-gnome/src/eel-gconf-extensions.c
index 2bc4ab804f5d6d16e3bf586a9de8b189cba02fb0..1d912000683672b91ca43f58bc7ecbd893dc3e4c 100644
--- a/sflphone-client-gnome/src/eel-gconf-extensions.c
+++ b/sflphone-client-gnome/src/eel-gconf-extensions.c
@@ -37,280 +37,279 @@ static GConfClient *global_gconf_client = NULL;
 static void
 global_client_free (void)
 {
-        if (global_gconf_client == NULL) {
-                return;
-        }
+    if (global_gconf_client == NULL) {
+        return;
+    }
 
-        g_object_unref (G_OBJECT (global_gconf_client));
-        global_gconf_client = NULL;
+    g_object_unref (G_OBJECT (global_gconf_client));
+    global_gconf_client = NULL;
 }
 
 /* Public */
 GConfClient *
 eel_gconf_client_get_global (void)
 {
-        /* Initialize gconf if needed */
-        if (!gconf_is_initialized ()) {
-                char *argv[] = { "eel-preferences", NULL };
-                GError *error = NULL;
-                char *teststr;
-
-                if (!gconf_init (1, argv, &error)) {
-                        if (eel_gconf_handle_error (&error)) {
-                                return NULL;
-                        }
-                }
-
-                /* check if gconf schemas are working */
-                teststr = gconf_client_get_string (eel_gconf_client_get_global(),
-                                          "/apps/gpdf/gconf_test", NULL);
-                if (!teststr)
-                {
-                        GtkWidget *dialog;
-                        dialog = gtk_message_dialog_new (NULL,
-                                                         GTK_DIALOG_MODAL,
-                                                         GTK_MESSAGE_ERROR,
-                                                         GTK_BUTTONS_OK,
-                                                         _("Cannot find a schema for gpdf preferences. \n"
-                                                         "Check your gconf setup, look at gpdf FAQ for \n"
-                                                         "more info"));
-                        gtk_dialog_run (GTK_DIALOG (dialog));
-                        exit (0);
-                }
-                else
-                {
-                        g_free (teststr);
-                }
+    /* Initialize gconf if needed */
+    if (!gconf_is_initialized ()) {
+        char *argv[] = { "eel-preferences", NULL };
+        GError *error = NULL;
+        char *teststr;
 
+        if (!gconf_init (1, argv, &error)) {
+            if (eel_gconf_handle_error (&error)) {
+                return NULL;
+            }
         }
 
-        if (global_gconf_client == NULL) {
-                global_gconf_client = gconf_client_get_default ();
-                g_atexit (global_client_free);
+        /* check if gconf schemas are working */
+        teststr = gconf_client_get_string (eel_gconf_client_get_global(),
+                                           "/apps/gpdf/gconf_test", NULL);
+
+        if (!teststr) {
+            GtkWidget *dialog;
+            dialog = gtk_message_dialog_new (NULL,
+                                             GTK_DIALOG_MODAL,
+                                             GTK_MESSAGE_ERROR,
+                                             GTK_BUTTONS_OK,
+                                             _ ("Cannot find a schema for gpdf preferences. \n"
+                                                "Check your gconf setup, look at gpdf FAQ for \n"
+                                                "more info"));
+            gtk_dialog_run (GTK_DIALOG (dialog));
+            exit (0);
+        } else {
+            g_free (teststr);
         }
 
-        return global_gconf_client;
+    }
+
+    if (global_gconf_client == NULL) {
+        global_gconf_client = gconf_client_get_default ();
+        g_atexit (global_client_free);
+    }
+
+    return global_gconf_client;
 }
 
 gboolean
 eel_gconf_handle_error (GError **error)
 {
-        g_return_val_if_fail (error != NULL, FALSE);
+    g_return_val_if_fail (error != NULL, FALSE);
 
-        if (*error != NULL) {
-                g_warning (_("GConf error:\n  %s"), (*error)->message);
-                g_error_free (*error);
-                *error = NULL;
+    if (*error != NULL) {
+        g_warning (_ ("GConf error:\n  %s"), (*error)->message);
+        g_error_free (*error);
+        *error = NULL;
 
-                return TRUE;
-        }
+        return TRUE;
+    }
 
-        return FALSE;
+    return FALSE;
 }
 
 void
 eel_gconf_set_boolean (const char *key,
-                            gboolean boolean_value)
+                       gboolean boolean_value)
 {
-        GConfClient *client;
-        GError *error = NULL;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_if_fail (key != NULL);
+    g_return_if_fail (key != NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        gconf_client_set_bool (client, key, boolean_value, &error);
-        eel_gconf_handle_error (&error);
+    gconf_client_set_bool (client, key, boolean_value, &error);
+    eel_gconf_handle_error (&error);
 }
 
 gboolean
 eel_gconf_get_boolean (const char *key)
 {
-        gboolean result;
-        GConfClient *client;
-        GError *error = NULL;
+    gboolean result;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_val_if_fail (key != NULL, FALSE);
+    g_return_val_if_fail (key != NULL, FALSE);
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, FALSE);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, FALSE);
 
-        result = gconf_client_get_bool (client, key, &error);
+    result = gconf_client_get_bool (client, key, &error);
 
-        if (eel_gconf_handle_error (&error)) {
-                result = FALSE;
-        }
+    if (eel_gconf_handle_error (&error)) {
+        result = FALSE;
+    }
 
-        return result;
+    return result;
 }
 
 void
 eel_gconf_set_integer (const char *key,
-                            int int_value)
+                       int int_value)
 {
-        GConfClient *client;
-        GError *error = NULL;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_if_fail (key != NULL);
+    g_return_if_fail (key != NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        gconf_client_set_int (client, key, int_value, &error);
-        eel_gconf_handle_error (&error);
+    gconf_client_set_int (client, key, int_value, &error);
+    eel_gconf_handle_error (&error);
 }
 
 int
 eel_gconf_get_integer (const char *key)
 {
-        int result;
-        GConfClient *client;
-        GError *error = NULL;
+    int result;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_val_if_fail (key != NULL, 0);
+    g_return_val_if_fail (key != NULL, 0);
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, 0);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, 0);
 
-        result = gconf_client_get_int (client, key, &error);
+    result = gconf_client_get_int (client, key, &error);
 
-        if (eel_gconf_handle_error (&error)) {
-                result = 0;
-        }
+    if (eel_gconf_handle_error (&error)) {
+        result = 0;
+    }
 
-        return result;
+    return result;
 }
 
 void
 eel_gconf_set_float (const char *key,
-                            gfloat float_value)
+                     gfloat float_value)
 {
-        GConfClient *client;
-        GError *error = NULL;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_if_fail (key != NULL);
+    g_return_if_fail (key != NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        gconf_client_set_float (client, key, float_value, &error);
-        eel_gconf_handle_error (&error);
+    gconf_client_set_float (client, key, float_value, &error);
+    eel_gconf_handle_error (&error);
 }
 
 gfloat
 eel_gconf_get_float (const char *key)
 {
-        gfloat result;
-        GConfClient *client;
-        GError *error = NULL;
+    gfloat result;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_val_if_fail (key != NULL, 0);
+    g_return_val_if_fail (key != NULL, 0);
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, 0);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, 0);
 
-        result = gconf_client_get_float (client, key, &error);
+    result = gconf_client_get_float (client, key, &error);
 
-        if (eel_gconf_handle_error (&error)) {
-                result = 0;
-        }
+    if (eel_gconf_handle_error (&error)) {
+        result = 0;
+    }
 
-        return result;
+    return result;
 }
 
 void
 eel_gconf_set_string (const char *key,
                       const char *string_value)
 {
-        GConfClient *client;
-        GError *error = NULL;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_if_fail (key != NULL);
-        g_return_if_fail (string_value != NULL);
+    g_return_if_fail (key != NULL);
+    g_return_if_fail (string_value != NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        gconf_client_set_string (client, key, string_value, &error);
-        eel_gconf_handle_error (&error);
+    gconf_client_set_string (client, key, string_value, &error);
+    eel_gconf_handle_error (&error);
 }
 
 void
 eel_gconf_unset (const char *key)
 {
-        GConfClient *client;
-        GError *error = NULL;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_if_fail (key != NULL);
+    g_return_if_fail (key != NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        gconf_client_unset (client, key, &error);
-        eel_gconf_handle_error (&error);
+    gconf_client_unset (client, key, &error);
+    eel_gconf_handle_error (&error);
 }
 
 char *
 eel_gconf_get_string (const char *key)
 {
-        char *result;
-        GConfClient *client;
-        GError *error = NULL;
+    char *result;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_val_if_fail (key != NULL, NULL);
+    g_return_val_if_fail (key != NULL, NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, NULL);
 
-        result = gconf_client_get_string (client, key, &error);
+    result = gconf_client_get_string (client, key, &error);
 
-        if (eel_gconf_handle_error (&error)) {
-                result = g_strdup ("");
-        }
+    if (eel_gconf_handle_error (&error)) {
+        result = g_strdup ("");
+    }
 
-        return result;
+    return result;
 }
 
 void
 eel_gconf_set_string_list (const char *key,
-                                const GSList *slist)
+                           const GSList *slist)
 {
-        GConfClient *client;
-        GError *error;
+    GConfClient *client;
+    GError *error;
 
-        g_return_if_fail (key != NULL);
+    g_return_if_fail (key != NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        error = NULL;
-        gconf_client_set_list (client, key, GCONF_VALUE_STRING,
-                               /* Need cast cause of GConf api bug */
-                               (GSList *) slist,
-                               &error);
-        eel_gconf_handle_error (&error);
+    error = NULL;
+    gconf_client_set_list (client, key, GCONF_VALUE_STRING,
+                           /* Need cast cause of GConf api bug */
+                           (GSList *) slist,
+                           &error);
+    eel_gconf_handle_error (&error);
 }
 
 GSList *
 eel_gconf_get_string_list (const char *key)
 {
-        GSList *slist;
-        GConfClient *client;
-        GError *error;
+    GSList *slist;
+    GConfClient *client;
+    GError *error;
 
-        g_return_val_if_fail (key != NULL, NULL);
+    g_return_val_if_fail (key != NULL, NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, NULL);
 
-        error = NULL;
-        slist = gconf_client_get_list (client, key, GCONF_VALUE_STRING, &error);
-        if (eel_gconf_handle_error (&error)) {
-                slist = NULL;
-        }
+    error = NULL;
+    slist = gconf_client_get_list (client, key, GCONF_VALUE_STRING, &error);
 
-        return slist;
+    if (eel_gconf_handle_error (&error)) {
+        slist = NULL;
+    }
+
+    return slist;
 }
 
 /* This code wasn't part of the original eel-gconf-extensions.c */
@@ -318,209 +317,212 @@ void
 eel_gconf_set_integer_list (const char *key,
                             const GSList *slist)
 {
-        GConfClient *client;
-        GError *error;
+    GConfClient *client;
+    GError *error;
 
-        g_return_if_fail (key != NULL);
+    g_return_if_fail (key != NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        error = NULL;
-        gconf_client_set_list (client, key, GCONF_VALUE_INT,
-                               /* Need cast cause of GConf api bug */
-                               (GSList *) slist,
-                               &error);
-        eel_gconf_handle_error (&error);
+    error = NULL;
+    gconf_client_set_list (client, key, GCONF_VALUE_INT,
+                           /* Need cast cause of GConf api bug */
+                           (GSList *) slist,
+                           &error);
+    eel_gconf_handle_error (&error);
 }
 
 GSList *
 eel_gconf_get_integer_list (const char *key)
 {
-        GSList *slist;
-        GConfClient *client;
-        GError *error;
+    GSList *slist;
+    GConfClient *client;
+    GError *error;
 
-        g_return_val_if_fail (key != NULL, NULL);
+    g_return_val_if_fail (key != NULL, NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, NULL);
 
-        error = NULL;
-        slist = gconf_client_get_list (client, key, GCONF_VALUE_INT, &error);
-        if (eel_gconf_handle_error (&error)) {
-                slist = NULL;
-        }
+    error = NULL;
+    slist = gconf_client_get_list (client, key, GCONF_VALUE_INT, &error);
 
-        return slist;
+    if (eel_gconf_handle_error (&error)) {
+        slist = NULL;
+    }
+
+    return slist;
 }
 /* End of added code */
 
 gboolean
 eel_gconf_is_default (const char *key)
 {
-        gboolean result;
-        GConfValue *value;
-        GError *error = NULL;
+    gboolean result;
+    GConfValue *value;
+    GError *error = NULL;
 
-        g_return_val_if_fail (key != NULL, FALSE);
+    g_return_val_if_fail (key != NULL, FALSE);
 
-        value = gconf_client_get_without_default  (eel_gconf_client_get_global (), key, &error);
+    value = gconf_client_get_without_default (eel_gconf_client_get_global (), key, &error);
 
-        if (eel_gconf_handle_error (&error)) {
-                if (value != NULL) {
-                        gconf_value_free (value);
-                }
-                return FALSE;
+    if (eel_gconf_handle_error (&error)) {
+        if (value != NULL) {
+            gconf_value_free (value);
         }
 
-        result = (value == NULL);
+        return FALSE;
+    }
 
-        if (value != NULL) {
-                gconf_value_free (value);
-        }
+    result = (value == NULL);
+
+    if (value != NULL) {
+        gconf_value_free (value);
+    }
 
 
-        return result;
+    return result;
 }
 
 gboolean
 eel_gconf_monitor_add (const char *directory)
 {
-        GError *error = NULL;
-        GConfClient *client;
+    GError *error = NULL;
+    GConfClient *client;
 
-        g_return_val_if_fail (directory != NULL, FALSE);
+    g_return_val_if_fail (directory != NULL, FALSE);
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, FALSE);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, FALSE);
 
-        gconf_client_add_dir (client,
-                              directory,
-                              GCONF_CLIENT_PRELOAD_NONE,
-                              &error);
+    gconf_client_add_dir (client,
+                          directory,
+                          GCONF_CLIENT_PRELOAD_NONE,
+                          &error);
 
-        if (eel_gconf_handle_error (&error)) {
-                return FALSE;
-        }
+    if (eel_gconf_handle_error (&error)) {
+        return FALSE;
+    }
 
-        return TRUE;
+    return TRUE;
 }
 
 gboolean
 eel_gconf_monitor_remove (const char *directory)
 {
-        GError *error = NULL;
-        GConfClient *client;
+    GError *error = NULL;
+    GConfClient *client;
 
-        if (directory == NULL) {
-                return FALSE;
-        }
+    if (directory == NULL) {
+        return FALSE;
+    }
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, FALSE);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, FALSE);
 
-        gconf_client_remove_dir (client,
-                                 directory,
-                                 &error);
+    gconf_client_remove_dir (client,
+                             directory,
+                             &error);
 
-        if (eel_gconf_handle_error (&error)) {
-                return FALSE;
-        }
+    if (eel_gconf_handle_error (&error)) {
+        return FALSE;
+    }
 
-        return TRUE;
+    return TRUE;
 }
 
 void
 eel_gconf_suggest_sync (void)
 {
-        GConfClient *client;
-        GError *error = NULL;
+    GConfClient *client;
+    GError *error = NULL;
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        gconf_client_suggest_sync (client, &error);
-        eel_gconf_handle_error (&error);
+    gconf_client_suggest_sync (client, &error);
+    eel_gconf_handle_error (&error);
 }
 
 GConfValue*
 eel_gconf_get_value (const char *key)
 {
-        GConfValue *value = NULL;
-        GConfClient *client;
-        GError *error = NULL;
+    GConfValue *value = NULL;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_val_if_fail (key != NULL, NULL);
+    g_return_val_if_fail (key != NULL, NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, NULL);
 
-        value = gconf_client_get (client, key, &error);
+    value = gconf_client_get (client, key, &error);
 
-        if (eel_gconf_handle_error (&error)) {
-                if (value != NULL) {
-                        gconf_value_free (value);
-                        value = NULL;
-                }
+    if (eel_gconf_handle_error (&error)) {
+        if (value != NULL) {
+            gconf_value_free (value);
+            value = NULL;
         }
+    }
 
-        return value;
+    return value;
 }
 
 void
 eel_gconf_set_value (const char *key, const GConfValue *value)
 {
-        GConfClient *client;
-        GError *error = NULL;
+    GConfClient *client;
+    GError *error = NULL;
 
-        g_return_if_fail (key != NULL);
+    g_return_if_fail (key != NULL);
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        gconf_client_set (client, key, value, &error);
+    gconf_client_set (client, key, value, &error);
 
-        if (eel_gconf_handle_error (&error)) {
-                return;
-        }
+    if (eel_gconf_handle_error (&error)) {
+        return;
+    }
 }
 
 gboolean
 eel_gconf_key_exists (const char *key)
 {
-        GConfValue *value = NULL;
-        GConfClient *client;
-        GError *error = NULL;
-        gboolean error_occurred;
-        gboolean value_found;
+    GConfValue *value = NULL;
+    GConfClient *client;
+    GError *error = NULL;
+    gboolean error_occurred;
+    gboolean value_found;
 
-        g_return_val_if_fail (key != NULL, FALSE);
+    g_return_val_if_fail (key != NULL, FALSE);
 
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, FALSE);
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, FALSE);
 
-        value = gconf_client_get (client, key, &error);
+    value = gconf_client_get (client, key, &error);
 
-        value_found = (value != NULL);
-        error_occurred = (error != NULL);
+    value_found = (value != NULL);
+    error_occurred = (error != NULL);
 
-        eel_gconf_value_free (value);
-        if (error != NULL) {
-                g_error_free (error);
-        }
+    eel_gconf_value_free (value);
+
+    if (error != NULL) {
+        g_error_free (error);
+    }
 
-        return (!error_occurred && value_found);
+    return (!error_occurred && value_found);
 }
 
 void
 eel_gconf_value_free (GConfValue *value)
 {
-        if (value == NULL) {
-                return;
-        }
+    if (value == NULL) {
+        return;
+    }
 
-        gconf_value_free (value);
+    gconf_value_free (value);
 }
 
 guint
@@ -528,46 +530,46 @@ eel_gconf_notification_add (const char *key,
                             GConfClientNotifyFunc notification_callback,
                             gpointer callback_data)
 {
-        guint notification_id;
-        GConfClient *client;
-        GError *error = NULL;
-
-        g_return_val_if_fail (key != NULL, EEL_GCONF_UNDEFINED_CONNECTION);
-        g_return_val_if_fail (notification_callback != NULL, EEL_GCONF_UNDEFINED_CONNECTION);
-
-        client = eel_gconf_client_get_global ();
-        g_return_val_if_fail (client != NULL, EEL_GCONF_UNDEFINED_CONNECTION);
-
-        notification_id = gconf_client_notify_add (client,
-                                                   key,
-                                                   notification_callback,
-                                                   callback_data,
-                                                   NULL,
-                                                   &error);
-
-        if (eel_gconf_handle_error (&error)) {
-                if (notification_id != EEL_GCONF_UNDEFINED_CONNECTION) {
-                        gconf_client_notify_remove (client, notification_id);
-                        notification_id = EEL_GCONF_UNDEFINED_CONNECTION;
-                }
+    guint notification_id;
+    GConfClient *client;
+    GError *error = NULL;
+
+    g_return_val_if_fail (key != NULL, EEL_GCONF_UNDEFINED_CONNECTION);
+    g_return_val_if_fail (notification_callback != NULL, EEL_GCONF_UNDEFINED_CONNECTION);
+
+    client = eel_gconf_client_get_global ();
+    g_return_val_if_fail (client != NULL, EEL_GCONF_UNDEFINED_CONNECTION);
+
+    notification_id = gconf_client_notify_add (client,
+                      key,
+                      notification_callback,
+                      callback_data,
+                      NULL,
+                      &error);
+
+    if (eel_gconf_handle_error (&error)) {
+        if (notification_id != EEL_GCONF_UNDEFINED_CONNECTION) {
+            gconf_client_notify_remove (client, notification_id);
+            notification_id = EEL_GCONF_UNDEFINED_CONNECTION;
         }
+    }
 
-        return notification_id;
+    return notification_id;
 }
 
 void
 eel_gconf_notification_remove (guint notification_id)
 {
-        GConfClient *client;
+    GConfClient *client;
 
-        if (notification_id == EEL_GCONF_UNDEFINED_CONNECTION) {
-                return;
-        }
+    if (notification_id == EEL_GCONF_UNDEFINED_CONNECTION) {
+        return;
+    }
 
-        client = eel_gconf_client_get_global ();
-        g_return_if_fail (client != NULL);
+    client = eel_gconf_client_get_global ();
+    g_return_if_fail (client != NULL);
 
-        gconf_client_notify_remove (client, notification_id);
+    gconf_client_notify_remove (client, notification_id);
 }
 
 /* Simple wrapper for eel_gconf_notifier_add which
@@ -580,15 +582,16 @@ gpdf_notification_add (const char *key,
                        gpointer callback_data,
                        GList **notifiers)
 {
-        guint id = 0;
-
-        id = eel_gconf_notification_add(key,
-                                        notification_callback,
-                                        callback_data);
-        if (notifiers != NULL) {
-                *notifiers = g_list_append(*notifiers,
-                                           (gpointer)id);
-        }
+    guint id = 0;
+
+    id = eel_gconf_notification_add (key,
+                                     notification_callback,
+                                     callback_data);
+
+    if (notifiers != NULL) {
+        *notifiers = g_list_append (*notifiers,
+                                    (gpointer) id);
+    }
 }
 
 /* Removes all the notifiers listed in notifiers */
@@ -596,11 +599,11 @@ gpdf_notification_add (const char *key,
 void
 gpdf_notification_remove (GList **notifiers)
 {
-        g_list_foreach(*notifiers,
-                       (GFunc)eel_gconf_notification_remove,
-                       NULL);
-        g_list_free(*notifiers);
-        *notifiers = NULL;
+    g_list_foreach (*notifiers,
+                    (GFunc) eel_gconf_notification_remove,
+                    NULL);
+    g_list_free (*notifiers);
+    *notifiers = NULL;
 }
 
 
diff --git a/sflphone-client-gnome/src/eel-gconf-extensions.h b/sflphone-client-gnome/src/eel-gconf-extensions.h
index f4afab26067c4f0c2116dc2964f0cf6d3844ea19..f9e4f5c381159e79d732e5c55a687a009d7814c4 100644
--- a/sflphone-client-gnome/src/eel-gconf-extensions.h
+++ b/sflphone-client-gnome/src/eel-gconf-extensions.h
@@ -35,50 +35,50 @@ BEGIN_EXTERN_C
 
 #define EEL_GCONF_UNDEFINED_CONNECTION 0
 
-GConfClient *eel_gconf_client_get_global   (void);
-gboolean     eel_gconf_handle_error        (GError                **error);
-void         eel_gconf_set_boolean         (const char             *key,
-                                            gboolean                boolean_value);
-gboolean     eel_gconf_get_boolean         (const char             *key);
-int          eel_gconf_get_integer         (const char             *key);
-void         eel_gconf_set_integer         (const char             *key,
-                                            int                     int_value);
-gfloat       eel_gconf_get_float           (const char             *key);
-void         eel_gconf_set_float           (const char             *key,
-                                            gfloat                 float_value);
-char *       eel_gconf_get_string          (const char             *key);
-void         eel_gconf_set_string          (const char             *key,
-                                            const char             *string_value);
-GSList *     eel_gconf_get_string_list     (const char             *key);
-void         eel_gconf_set_string_list     (const char             *key,
-                                            const GSList           *string_list_value);
-gboolean     eel_gconf_is_default          (const char             *key);
-gboolean     eel_gconf_monitor_add         (const char             *directory);
-gboolean     eel_gconf_monitor_remove      (const char             *directory);
-void         eel_gconf_suggest_sync        (void);
-GConfValue*  eel_gconf_get_value           (const char             *key);
-gboolean     eel_gconf_value_is_equal      (const GConfValue       *a,
-                                            const GConfValue       *b);
-void         eel_gconf_set_value           (const char *key,
-                                            const GConfValue *value);
-gboolean     eel_gconf_key_exists          (const char *key);
-
-void         eel_gconf_value_free          (GConfValue             *value);
-void         eel_gconf_unset               (const char *key);
+GConfClient *eel_gconf_client_get_global (void);
+gboolean     eel_gconf_handle_error (GError                **error);
+void         eel_gconf_set_boolean (const char             *key,
+                                    gboolean                boolean_value);
+gboolean     eel_gconf_get_boolean (const char             *key);
+int          eel_gconf_get_integer (const char             *key);
+void         eel_gconf_set_integer (const char             *key,
+                                    int                     int_value);
+gfloat       eel_gconf_get_float (const char             *key);
+void         eel_gconf_set_float (const char             *key,
+                                  gfloat                 float_value);
+char *       eel_gconf_get_string (const char             *key);
+void         eel_gconf_set_string (const char             *key,
+                                   const char             *string_value);
+GSList *     eel_gconf_get_string_list (const char             *key);
+void         eel_gconf_set_string_list (const char             *key,
+                                        const GSList           *string_list_value);
+gboolean     eel_gconf_is_default (const char             *key);
+gboolean     eel_gconf_monitor_add (const char             *directory);
+gboolean     eel_gconf_monitor_remove (const char             *directory);
+void         eel_gconf_suggest_sync (void);
+GConfValue*  eel_gconf_get_value (const char             *key);
+gboolean     eel_gconf_value_is_equal (const GConfValue       *a,
+                                       const GConfValue       *b);
+void         eel_gconf_set_value (const char *key,
+                                  const GConfValue *value);
+gboolean     eel_gconf_key_exists (const char *key);
+
+void         eel_gconf_value_free (GConfValue             *value);
+void         eel_gconf_unset (const char *key);
 
 /* Functions which weren't part of the eel-gconf-extensions.h file from eel */
-GSList *eel_gconf_get_integer_list         (const char *key);
-void eel_gconf_set_integer_list            (const char *key,
-                                            const GSList *slist);
-void gpdf_notification_add                 (const char *key,
-                                            GConfClientNotifyFunc notification_callback,
-                                            gpointer callback_data,
-                                            GList **notifiers);
-void gpdf_notification_remove              (GList **notifiers);
-guint eel_gconf_notification_add           (const char *key,
-                                            GConfClientNotifyFunc notification_callback,
-                                            gpointer callback_data);
-void eel_gconf_notification_remove         (guint notification_id);
+GSList *eel_gconf_get_integer_list (const char *key);
+void eel_gconf_set_integer_list (const char *key,
+                                 const GSList *slist);
+void gpdf_notification_add (const char *key,
+                            GConfClientNotifyFunc notification_callback,
+                            gpointer callback_data,
+                            GList **notifiers);
+void gpdf_notification_remove (GList **notifiers);
+guint eel_gconf_notification_add (const char *key,
+                                  GConfClientNotifyFunc notification_callback,
+                                  gpointer callback_data);
+void eel_gconf_notification_remove (guint notification_id);
 
 #ifdef __cplusplus
 END_EXTERN_C
diff --git a/sflphone-client-gnome/src/errors.c b/sflphone-client-gnome/src/errors.c
index 0dbd1240014d8d810155b4484213bb4f06cfc989..87e05c83dcd48c8538c3da74092790e65feeb010 100644
--- a/sflphone-client-gnome/src/errors.c
+++ b/sflphone-client-gnome/src/errors.c
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> 
- *                                                                              
+ *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -31,21 +31,23 @@
 #include <errors.h>
 #include <sflphone_const.h>
 
-  void
-sflphone_throw_exception( int err )
+void
+sflphone_throw_exception (int err)
 {
-  gchar* markup=""; 
-  switch( err ){
-    case ALSA_PLAYBACK_DEVICE:
-      markup = g_markup_printf_escaped(_("ALSA notification\n\nError while opening playback device"));
-      break;
-    case ALSA_CAPTURE_DEVICE:
-      markup = g_markup_printf_escaped(_("ALSA notification\n\nError while opening capture device"));
-      break;
-    case PULSEAUDIO_NOT_RUNNING:
-      markup = g_markup_printf_escaped(_("Pulseaudio notification\n\nPulseaudio is not running"));
-      break;
-  }
-  main_window_error_message( markup );  
-  free( markup );
+    gchar* markup="";
+
+    switch (err) {
+        case ALSA_PLAYBACK_DEVICE:
+            markup = g_markup_printf_escaped (_ ("ALSA notification\n\nError while opening playback device"));
+            break;
+        case ALSA_CAPTURE_DEVICE:
+            markup = g_markup_printf_escaped (_ ("ALSA notification\n\nError while opening capture device"));
+            break;
+        case PULSEAUDIO_NOT_RUNNING:
+            markup = g_markup_printf_escaped (_ ("Pulseaudio notification\n\nPulseaudio is not running"));
+            break;
+    }
+
+    main_window_error_message (markup);
+    free (markup);
 }
diff --git a/sflphone-client-gnome/src/errors.h b/sflphone-client-gnome/src/errors.h
index 2c87178ff3c020408fa40a1f9ab524c1167e5a86..80d1e08da2e13d1c1fbb3a8a435434813f41d610 100644
--- a/sflphone-client-gnome/src/errors.h
+++ b/sflphone-client-gnome/src/errors.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
- *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com> 
- *                                                                              
+ *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -27,7 +27,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
- 
+
 #ifndef __ERRORS_H
 #define __ERRORS_H
 
@@ -45,6 +45,6 @@
  *	  ALSA_PLAYBACK_ERROR
  *	  ALSA_CAPTURE_ERROR
  */
-void sflphone_throw_exception( int err );
+void sflphone_throw_exception (int err);
 
 #endif
diff --git a/sflphone-client-gnome/src/icons/icon_factory.c b/sflphone-client-gnome/src/icons/icon_factory.c
index 6380aeb6792b5dde879a633d0abe0e2e15951a1a..b81365874aa4fc8e6210672c288b2dcdaa4686c5 100644
--- a/sflphone-client-gnome/src/icons/icon_factory.c
+++ b/sflphone-client-gnome/src/icons/icon_factory.c
@@ -34,58 +34,57 @@ static GtkIconFactory *icon_factory = NULL;
 
 void add_icon (GtkIconFactory *factory, const gchar *stock_id, const guint8 *icon_data, GtkIconSize size)
 {
-	GtkIconSet *icons;
-	GtkIconSource *source;
-	GdkPixbuf *pixbuf;
+    GtkIconSet *icons;
+    GtkIconSource *source;
+    GdkPixbuf *pixbuf;
 
-	icons = gtk_icon_factory_lookup (factory, stock_id);
-	if (!icons)
-	{
-		pixbuf = gdk_pixbuf_new_from_inline (-1, icon_data, FALSE, NULL);
-		source = gtk_icon_source_new ();
-		gtk_icon_source_set_pixbuf (source, pixbuf);
-		gtk_icon_source_set_size (source, size);
+    icons = gtk_icon_factory_lookup (factory, stock_id);
 
-		icons = gtk_icon_set_new ();
-		gtk_icon_set_add_source (icons, source);
+    if (!icons) {
+        pixbuf = gdk_pixbuf_new_from_inline (-1, icon_data, FALSE, NULL);
+        source = gtk_icon_source_new ();
+        gtk_icon_source_set_pixbuf (source, pixbuf);
+        gtk_icon_source_set_size (source, size);
 
-		gtk_icon_factory_add (factory, stock_id, icons);
+        icons = gtk_icon_set_new ();
+        gtk_icon_set_add_source (icons, source);
 
-		g_object_unref (G_OBJECT (pixbuf));
-		gtk_icon_source_free (source);
-		gtk_icon_set_unref (icons);
-	}
-	else
-		DEBUG ("Icon %s already exists in factory\n", stock_id);
+        gtk_icon_factory_add (factory, stock_id, icons);
+
+        g_object_unref (G_OBJECT (pixbuf));
+        gtk_icon_source_free (source);
+        gtk_icon_set_unref (icons);
+    } else
+        DEBUG ("Icon %s already exists in factory\n", stock_id);
 }
 
 void register_sflphone_stock_icons (GtkIconFactory *factory)
 {
-	add_icon (factory, GTK_STOCK_PICKUP, gnome_stock_pickup, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_HANGUP, gnome_stock_hangup, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_DIAL, gnome_stock_dial, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_TRANSFER, gnome_stock_transfer, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_ONHOLD, gnome_stock_onhold, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_OFFHOLD, gnome_stock_offhold, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_IM, gnome_stock_im, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_CALL_CURRENT, gnome_stock_call_current, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_ADDRESSBOOK, gnome_stock_addressbook, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_CALLS, gnome_stock_calls, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_SFLPHONE, gnome_stock_sflphone, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_FAIL, gnome_stock_fail, GTK_ICON_SIZE_SMALL_TOOLBAR);	
-	add_icon (factory, GTK_STOCK_USER, gnome_stock_user, GTK_ICON_SIZE_SMALL_TOOLBAR);	
+    add_icon (factory, GTK_STOCK_PICKUP, gnome_stock_pickup, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_HANGUP, gnome_stock_hangup, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_DIAL, gnome_stock_dial, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_TRANSFER, gnome_stock_transfer, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_ONHOLD, gnome_stock_onhold, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_OFFHOLD, gnome_stock_offhold, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_IM, gnome_stock_im, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_CALL_CURRENT, gnome_stock_call_current, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_ADDRESSBOOK, gnome_stock_addressbook, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_CALLS, gnome_stock_calls, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_SFLPHONE, gnome_stock_sflphone, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_FAIL, gnome_stock_fail, GTK_ICON_SIZE_SMALL_TOOLBAR);
+    add_icon (factory, GTK_STOCK_USER, gnome_stock_user, GTK_ICON_SIZE_SMALL_TOOLBAR);
 }
 
 void init_icon_factory (void)
 {
-	// Init the factory
-	icon_factory = gtk_icon_factory_new ();
+    // Init the factory
+    icon_factory = gtk_icon_factory_new ();
 
-	// Load icons
-	register_sflphone_stock_icons (icon_factory);
+    // Load icons
+    register_sflphone_stock_icons (icon_factory);
 
-	// Specify a default icon set
-	gtk_icon_factory_add_default (icon_factory);
+    // Specify a default icon set
+    gtk_icon_factory_add_default (icon_factory);
 }
 
 
diff --git a/sflphone-client-gnome/src/icons/pixmap_data.h b/sflphone-client-gnome/src/icons/pixmap_data.h
index a8e70490cdaafe10fda5e8dfe5382438a1ec712a..b38046be4d852eb15cb47ea0cc0844da244febe0 100644
--- a/sflphone-client-gnome/src/icons/pixmap_data.h
+++ b/sflphone-client-gnome/src/icons/pixmap_data.h
@@ -39,100 +39,101 @@ G_BEGIN_DECLS
 #pragma align 4 (gnome_stock_pickup)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_pickup[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_pickup[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_pickup[] = 
+static const guint8 gnome_stock_pickup[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0'\260\0\204&\260\0\222\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0'\261\0b&\260\0\357&\260\0\357'\262\0p\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\257\0F"
-  "&\260\0\342&\260\0\345&\260\0\345&\260\0\344%\256\0R\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\263\0/'\260\0\322"
-  "&\260\0\333&\260\0\333&\260\0\333&\260\0\333&\257\0\326(\256\0""9\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#\260\0\35%\260\0\277"
-  "&\261\0\320&\261\0\320&\261\0\320&\261\0\320&\261\0\320&\261\0\320&\261"
-  "\0\304\"\254\0%\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\257\0\20'\261\0"
-  "\252'\260\0\306'\260\0\306'\260\0\306'\260\0\306'\260\0\306'\260\0\306"
-  "'\260\0\306'\260\0\306'\261\0\260#\256\0\26\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\266\0"
-  "\7&\261\0\223&\260\0\274&\260\0\274&\260\0\274&\260\0\274&\260\0\274"
-  "&\260\0\274&\260\0\274&\260\0\274&\260\0\274&\260\0\274&\260\0\233.\271"
-  "\0\13\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\200\0\2'\257\0|'\260\0\262'\260\0\262'\260\0\262'\260\0\262"
-  "'\260\0\262'\260\0\262'\260\0\262'\260\0\262'\260\0\262'\260\0\262'\260"
-  "\0\262'\260\0\262'\260\0\204@\277\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'\257\0c&\260\0\250&\260\0\250&\260\0"
-  "\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250"
-  "&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\261\0l\0\0\0"
-  "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\260\0J'\260\0\236"
-  "'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260"
-  "\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0"
-  "\236'\260\0\236'\260\0\236'\260\0T\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0&\255\0""5&\261\0\223&\260\0\224&\260\0\224&\260\0\224&\260\0\224"
-  "&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260"
-  "\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0"
-  "\224&\260\0=\0\0\0\0\0\0\0\0\0\0\0\0#\261\0$(\260\0\207'\260\0\212'\260"
-  "\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0"
-  "\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212"
-  "'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\210$\260\0*\0\0\0"
-  "\0!\261\0\27&\260\0x&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257"
-  "\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0"
-  "\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200"
-  "&\257\0\200&\257\0\200&\257\0\200%\260\0{$\255\0\34""3\231\0\5\40\237"
-  "\0\10\40\237\0\10\40\237\0\10\40\237\0\10&\256\0/'\257\0v'\257\0v'\257"
-  "\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'"
-  "\257\0v&\262\0""5\40\237\0\10\40\237\0\10\40\237\0\10\40\237\0\10""3"
-  "\231\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0(\256\0&&\260\0k&\260"
-  "\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&"
-  "\260\0k&\260\0k)\256\0,\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\264\0\"%\260\0a%\260\0a%\260\0a%"
-  "\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260"
-  "\0a&\263\0(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0)\255\0\37&\260\0W&\260\0W&\260\0W&\260\0W&\260"
-  "\0W&\260\0W&\260\0W&\260\0W&\260\0W&\260\0W&\260\0W&\260\0W#\261\0$\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0&\263\0\33$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M"
-  "$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M(\257\0\40\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0+\252\0\30&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C"
-  "&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C$\255\0\34\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\263\0"
-  "\24$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256"
-  "\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9!\261\0\27\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\36\245\0\21&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/"
-  "&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/(\256\0\23\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0'\261\0\15)\263\0%)\263\0%)\263\0%)\263\0%)\263\0%)\263\0%)\263\0%"
-  ")\263\0%)\263\0%)\263\0%)\263\0%)\263\0%\"\273\0\17\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\263"
-  "\0\12&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263"
-  "\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33.\271\0\13\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0+\252\0\6-\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21-"
-  "\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21"
-  "$\266\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0'\260\0\204&\260\0\222\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0'\261\0b&\260\0\357&\260\0\357'\262\0p\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\257\0F"
+      "&\260\0\342&\260\0\345&\260\0\345&\260\0\344%\256\0R\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\263\0/'\260\0\322"
+      "&\260\0\333&\260\0\333&\260\0\333&\260\0\333&\257\0\326(\256\0""9\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#\260\0\35%\260\0\277"
+      "&\261\0\320&\261\0\320&\261\0\320&\261\0\320&\261\0\320&\261\0\320&\261"
+      "\0\304\"\254\0%\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\257\0\20'\261\0"
+      "\252'\260\0\306'\260\0\306'\260\0\306'\260\0\306'\260\0\306'\260\0\306"
+      "'\260\0\306'\260\0\306'\261\0\260#\256\0\26\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$\266\0"
+      "\7&\261\0\223&\260\0\274&\260\0\274&\260\0\274&\260\0\274&\260\0\274"
+      "&\260\0\274&\260\0\274&\260\0\274&\260\0\274&\260\0\274&\260\0\233.\271"
+      "\0\13\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\200\0\2'\257\0|'\260\0\262'\260\0\262'\260\0\262'\260\0\262"
+      "'\260\0\262'\260\0\262'\260\0\262'\260\0\262'\260\0\262'\260\0\262'\260"
+      "\0\262'\260\0\262'\260\0\204@\277\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'\257\0c&\260\0\250&\260\0\250&\260\0"
+      "\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250"
+      "&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\260\0\250&\261\0l\0\0\0"
+      "\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\260\0J'\260\0\236"
+      "'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260"
+      "\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0\236'\260\0"
+      "\236'\260\0\236'\260\0\236'\260\0T\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0&\255\0""5&\261\0\223&\260\0\224&\260\0\224&\260\0\224&\260\0\224"
+      "&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260"
+      "\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0\224&\260\0"
+      "\224&\260\0=\0\0\0\0\0\0\0\0\0\0\0\0#\261\0$(\260\0\207'\260\0\212'\260"
+      "\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0"
+      "\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\212"
+      "'\260\0\212'\260\0\212'\260\0\212'\260\0\212'\260\0\210$\260\0*\0\0\0"
+      "\0!\261\0\27&\260\0x&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257"
+      "\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0"
+      "\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200&\257\0\200"
+      "&\257\0\200&\257\0\200&\257\0\200%\260\0{$\255\0\34""3\231\0\5\40\237"
+      "\0\10\40\237\0\10\40\237\0\10\40\237\0\10&\256\0/'\257\0v'\257\0v'\257"
+      "\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'\257\0v'"
+      "\257\0v&\262\0""5\40\237\0\10\40\237\0\10\40\237\0\10\40\237\0\10""3"
+      "\231\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0(\256\0&&\260\0k&\260"
+      "\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&\260\0k&"
+      "\260\0k&\260\0k)\256\0,\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\264\0\"%\260\0a%\260\0a%\260\0a%"
+      "\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260\0a%\260"
+      "\0a&\263\0(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0)\255\0\37&\260\0W&\260\0W&\260\0W&\260\0W&\260"
+      "\0W&\260\0W&\260\0W&\260\0W&\260\0W&\260\0W&\260\0W&\260\0W#\261\0$\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0&\263\0\33$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M"
+      "$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M$\260\0M(\257\0\40\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0+\252\0\30&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C"
+      "&\257\0C&\257\0C&\257\0C&\257\0C&\257\0C$\255\0\34\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&\263\0"
+      "\24$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256"
+      "\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9$\256\0""9!\261\0\27\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\36\245\0\21&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/"
+      "&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/&\256\0/(\256\0\23\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0'\261\0\15)\263\0%)\263\0%)\263\0%)\263\0%)\263\0%)\263\0%)\263\0%"
+      ")\263\0%)\263\0%)\263\0%)\263\0%)\263\0%\"\273\0\17\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\263"
+      "\0\12&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263"
+      "\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33&\263\0\33.\271\0\13\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0+\252\0\6-\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21-"
+      "\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21-\264\0\21"
+      "$\266\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 
 /* GdkPixbuf RGBA C-Source image dump */
@@ -141,108 +142,109 @@ static const guint8 gnome_stock_pickup[] =
 #pragma align 4 (gnome_stock_hangup)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_hangup[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_hangup[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_hangup[] = 
+static const guint8 gnome_stock_hangup[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252\0\0\3\277\40\0\10\277\40"
-  "\0\10\277\40\0\10\277\40\0\10\277\40\0\10\277\40\0\10\266$\0\7\266$\0"
-  "\7\266$\0\7\266$\0\7\266$\0\7\266$\0\7\252\0\0\3\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\237\40\0"
-  "\10\256\33\0\23\256\33\0\23\252\34\0\22\252\34\0\22\252\34\0\22\252\34"
-  "\0\22\252\34\0\22\252\34\0\22\252\34\0\22\252\34\0\22\252\34\0\22\252"
-  "\34\0\22\277\40\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252\25\0\14\260\32\0\35\260\32\0\35"
-  "\260\32\0\35\260\32\0\35\260\32\0\35\260\32\0\35\260\32\0\35\260\32\0"
-  "\35\255\33\0\34\255\33\0\34\255\33\0\34\255\33\0\34\261\24\0\15\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\277\40\0\20\263\32\0(\263\32\0(\263\32\0(\263\32\0(\261\32\0'"
-  "\261\32\0'\261\32\0'\261\32\0'\261\32\0'\261\32\0'\261\32\0'\261\32\0"
-  "'\270\34\0\22\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\252\30\0\25\257\31\0""3\263\32\0""2\263\32\0"
-  "2\263\32\0""2\263\32\0""2\263\32\0""2\263\32\0""2\263\32\0""2\263\32"
-  "\0""2\263\32\0""2\261\32\0""1\261\32\0""1\261\26\0\27\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\255"
-  "\24\0\31\260\31\0=\260\31\0=\260\31\0=\260\31\0=\260\31\0=\260\31\0="
-  "\260\31\0=\256\32\0<\256\32\0<\256\32\0<\256\32\0<\256\32\0<\255\33\0"
-  "\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\263\21\0\36\261\25\0H\261\25\0H\261\25\0H\260\26\0G\260"
-  "\26\0G\260\26\0G\260\26\0G\260\26\0G\260\26\0G\260\26\0G\260\26\0G\260"
-  "\26\0G\262\27\0!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\255\27\0\"\261\26\0R\261\26\0R\261\26\0"
-  "R\261\26\0R\261\26\0R\261\26\0R\261\26\0R\261\26\0R\261\26\0R\260\26"
-  "\0Q\260\26\0Q\260\26\0Q\256\24\0&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\256\24\0&\257\23\0]\257"
-  "\23\0]\257\23\0]\257\23\0]\257\23\0]\257\26\0\\\257\26\0\\\257\26\0\\"
-  "\257\26\0\\\257\26\0\\\257\26\0\\\257\26\0\\\262\30\0+\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\262"
-  "\22\0+\261\24\0h\260\24\0g\260\24\0g\260\24\0g\260\24\0g\260\24\0g\260"
-  "\24\0g\260\24\0g\260\24\0g\260\24\0g\260\24\0g\257\24\0f\257\25\0""0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\263\20\0/\261\22\0r\261\22\0r\261\22\0r\261\22\0r\261\22"
-  "\0r\261\22\0r\261\22\0r\260\22\0q\260\22\0q\260\22\0q\260\22\0q\260\22"
-  "\0q\262\23\0""5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\257\17\0""3\257\20\0}\257\20\0}\257\20\0}"
-  "\261\20\0|\261\20\0|\261\20\0|\261\20\0|\261\20\0|\261\20\0|\261\20\0"
-  "|\261\20\0|\261\20\0|\260\22\0:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\255\22\0\34\260\21\0-\260\21\0-\260\21\0-\260\21\0-\261\20\0R\260"
-  "\17\0\207\260\17\0\207\260\17\0\207\260\17\0\207\260\17\0\207\260\17"
-  "\0\207\260\17\0\207\260\17\0\207\260\17\0\207\257\17\0\206\257\17\0\206"
-  "\257\17\0\206\260\17\0W\260\21\0-\260\21\0-\260\21\0-\260\21\0-\260\22"
-  "\0\35\261\24\0\15\256\15\0x\260\16\0\222\260\16\0\222\260\16\0\222\260"
-  "\16\0\222\260\16\0\222\260\16\0\222\260\16\0\222\260\16\0\222\260\16"
-  "\0\222\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221"
-  "\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221\257"
-  "\16\0\220\257\17\0y\257\20\0\20\0\0\0\0\263\0\0\12\256\12\0{\257\13\0"
-  "\235\257\13\0\235\257\13\0\235\257\13\0\235\257\13\0\235\261\13\0\234"
-  "\261\13\0\234\261\13\0\234\261\13\0\234\261\13\0\234\261\13\0\234\261"
-  "\13\0\234\261\13\0\234\261\13\0\234\260\14\0\233\260\14\0\233\260\14"
-  "\0\233\260\14\0\233\260\14\0~\261\24\0\15\0\0\0\0\0\0\0\0\0\0\0\0\237"
-  "\0\0\10\260\12\0~\260\13\0\247\260\13\0\247\260\13\0\247\260\13\0\247"
-  "\260\13\0\247\260\13\0\247\260\13\0\247\260\13\0\247\260\13\0\247\260"
-  "\13\0\247\261\13\0\246\261\13\0\246\261\13\0\246\261\13\0\246\261\13"
-  "\0\246\261\13\0\246\261\12\0\202\271\0\0\13\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\252\0\0\6\260\10\0~\260\11\0\262\260\11\0\262\260\11\0"
-  "\262\260\11\0\262\260\11\0\262\260\12\0\261\260\12\0\261\260\12\0\261"
-  "\260\12\0\261\260\12\0\261\260\12\0\261\260\12\0\261\260\12\0\261\260"
-  "\12\0\261\257\12\0\203\277\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\277\0\0\4\257\10\0}\260\10\0\274\260\10\0\274\260"
-  "\10\0\274\260\10\0\274\260\10\0\274\260\10\0\274\260\10\0\274\260\10"
-  "\0\274\260\10\0\274\260\10\0\274\260\10\0\273\260\10\0\273\260\10\0\204"
-  "\266\0\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\377\0\0\2\257\6\0|\260\6\0\307\260\6\0\307\260\6\0\307"
-  "\260\6\0\307\260\6\0\307\260\6\0\306\260\6\0\306\260\6\0\306\260\6\0"
-  "\306\260\6\0\306\261\6\0\202\231\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\1"
-  "\260\4\0x\260\5\0\321\260\5\0\321\260\5\0\321\260\5\0\321\260\5\0\321"
-  "\260\5\0\321\260\5\0\321\260\5\0\321\260\4\0\201\377\0\0\2\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\261\4\0r\260\3\0\334\260\3\0\334\260"
-  "\3\0\334\260\3\0\334\260\3\0\334\260\3\0\333\257\4\0}\377\0\0\1\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\257\2\0m\260\3"
-  "\0\346\260\3\0\346\260\3\0\346\260\3\0\346\260\4\0w\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\260"
-  "\0\0d\257\1\0\360\260\1\0\361\257\0\0p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\257\0\0\\\257\0\0i\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252\0\0\3\277\40\0\10\277\40"
+      "\0\10\277\40\0\10\277\40\0\10\277\40\0\10\277\40\0\10\266$\0\7\266$\0"
+      "\7\266$\0\7\266$\0\7\266$\0\7\266$\0\7\252\0\0\3\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\237\40\0"
+      "\10\256\33\0\23\256\33\0\23\252\34\0\22\252\34\0\22\252\34\0\22\252\34"
+      "\0\22\252\34\0\22\252\34\0\22\252\34\0\22\252\34\0\22\252\34\0\22\252"
+      "\34\0\22\277\40\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252\25\0\14\260\32\0\35\260\32\0\35"
+      "\260\32\0\35\260\32\0\35\260\32\0\35\260\32\0\35\260\32\0\35\260\32\0"
+      "\35\255\33\0\34\255\33\0\34\255\33\0\34\255\33\0\34\261\24\0\15\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\277\40\0\20\263\32\0(\263\32\0(\263\32\0(\263\32\0(\261\32\0'"
+      "\261\32\0'\261\32\0'\261\32\0'\261\32\0'\261\32\0'\261\32\0'\261\32\0"
+      "'\270\34\0\22\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\252\30\0\25\257\31\0""3\263\32\0""2\263\32\0"
+      "2\263\32\0""2\263\32\0""2\263\32\0""2\263\32\0""2\263\32\0""2\263\32"
+      "\0""2\263\32\0""2\261\32\0""1\261\32\0""1\261\26\0\27\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\255"
+      "\24\0\31\260\31\0=\260\31\0=\260\31\0=\260\31\0=\260\31\0=\260\31\0="
+      "\260\31\0=\256\32\0<\256\32\0<\256\32\0<\256\32\0<\256\32\0<\255\33\0"
+      "\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\263\21\0\36\261\25\0H\261\25\0H\261\25\0H\260\26\0G\260"
+      "\26\0G\260\26\0G\260\26\0G\260\26\0G\260\26\0G\260\26\0G\260\26\0G\260"
+      "\26\0G\262\27\0!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\255\27\0\"\261\26\0R\261\26\0R\261\26\0"
+      "R\261\26\0R\261\26\0R\261\26\0R\261\26\0R\261\26\0R\261\26\0R\260\26"
+      "\0Q\260\26\0Q\260\26\0Q\256\24\0&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\256\24\0&\257\23\0]\257"
+      "\23\0]\257\23\0]\257\23\0]\257\23\0]\257\26\0\\\257\26\0\\\257\26\0\\"
+      "\257\26\0\\\257\26\0\\\257\26\0\\\257\26\0\\\262\30\0+\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\262"
+      "\22\0+\261\24\0h\260\24\0g\260\24\0g\260\24\0g\260\24\0g\260\24\0g\260"
+      "\24\0g\260\24\0g\260\24\0g\260\24\0g\260\24\0g\257\24\0f\257\25\0""0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\263\20\0/\261\22\0r\261\22\0r\261\22\0r\261\22\0r\261\22"
+      "\0r\261\22\0r\261\22\0r\260\22\0q\260\22\0q\260\22\0q\260\22\0q\260\22"
+      "\0q\262\23\0""5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\257\17\0""3\257\20\0}\257\20\0}\257\20\0}"
+      "\261\20\0|\261\20\0|\261\20\0|\261\20\0|\261\20\0|\261\20\0|\261\20\0"
+      "|\261\20\0|\261\20\0|\260\22\0:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\255\22\0\34\260\21\0-\260\21\0-\260\21\0-\260\21\0-\261\20\0R\260"
+      "\17\0\207\260\17\0\207\260\17\0\207\260\17\0\207\260\17\0\207\260\17"
+      "\0\207\260\17\0\207\260\17\0\207\260\17\0\207\257\17\0\206\257\17\0\206"
+      "\257\17\0\206\260\17\0W\260\21\0-\260\21\0-\260\21\0-\260\21\0-\260\22"
+      "\0\35\261\24\0\15\256\15\0x\260\16\0\222\260\16\0\222\260\16\0\222\260"
+      "\16\0\222\260\16\0\222\260\16\0\222\260\16\0\222\260\16\0\222\260\16"
+      "\0\222\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221"
+      "\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221\260\16\0\221\257"
+      "\16\0\220\257\17\0y\257\20\0\20\0\0\0\0\263\0\0\12\256\12\0{\257\13\0"
+      "\235\257\13\0\235\257\13\0\235\257\13\0\235\257\13\0\235\261\13\0\234"
+      "\261\13\0\234\261\13\0\234\261\13\0\234\261\13\0\234\261\13\0\234\261"
+      "\13\0\234\261\13\0\234\261\13\0\234\260\14\0\233\260\14\0\233\260\14"
+      "\0\233\260\14\0\233\260\14\0~\261\24\0\15\0\0\0\0\0\0\0\0\0\0\0\0\237"
+      "\0\0\10\260\12\0~\260\13\0\247\260\13\0\247\260\13\0\247\260\13\0\247"
+      "\260\13\0\247\260\13\0\247\260\13\0\247\260\13\0\247\260\13\0\247\260"
+      "\13\0\247\261\13\0\246\261\13\0\246\261\13\0\246\261\13\0\246\261\13"
+      "\0\246\261\13\0\246\261\12\0\202\271\0\0\13\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\252\0\0\6\260\10\0~\260\11\0\262\260\11\0\262\260\11\0"
+      "\262\260\11\0\262\260\11\0\262\260\12\0\261\260\12\0\261\260\12\0\261"
+      "\260\12\0\261\260\12\0\261\260\12\0\261\260\12\0\261\260\12\0\261\260"
+      "\12\0\261\257\12\0\203\277\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\277\0\0\4\257\10\0}\260\10\0\274\260\10\0\274\260"
+      "\10\0\274\260\10\0\274\260\10\0\274\260\10\0\274\260\10\0\274\260\10"
+      "\0\274\260\10\0\274\260\10\0\274\260\10\0\273\260\10\0\273\260\10\0\204"
+      "\266\0\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\377\0\0\2\257\6\0|\260\6\0\307\260\6\0\307\260\6\0\307"
+      "\260\6\0\307\260\6\0\307\260\6\0\306\260\6\0\306\260\6\0\306\260\6\0"
+      "\306\260\6\0\306\261\6\0\202\231\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\0\0\1"
+      "\260\4\0x\260\5\0\321\260\5\0\321\260\5\0\321\260\5\0\321\260\5\0\321"
+      "\260\5\0\321\260\5\0\321\260\5\0\321\260\4\0\201\377\0\0\2\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\261\4\0r\260\3\0\334\260\3\0\334\260"
+      "\3\0\334\260\3\0\334\260\3\0\334\260\3\0\333\257\4\0}\377\0\0\1\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\257\2\0m\260\3"
+      "\0\346\260\3\0\346\260\3\0\346\260\3\0\346\260\4\0w\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\260"
+      "\0\0d\257\1\0\360\260\1\0\361\257\0\0p\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\257\0\0\\\257\0\0i\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 /* GdkPixbuf RGBA C-Source image dump */
 
@@ -250,101 +252,102 @@ static const guint8 gnome_stock_hangup[] =
 #pragma align 4 (gnome_stock_onhold)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_onhold[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_onhold[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_onhold[] = 
+static const guint8 gnome_stock_onhold[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\40jj\30\34knQ\35kp\217\33mq\330\35jo\377\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0UU\3\33mm/\35joj\34lr\254\33mq\350"
-  "\34jo\374\27sy\362\20~\207\374\13\207\217\377\35jo\377\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\""
-  "fw\17\34jnH\35lp\202\33ns\310\35kq\367\33nr\365\24z\201\364\15\206\217"
-  "\377\6\220\231\377\1\231\242\377\0\230\242\377\0\227\241\377\2\222\235"
-  "\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "$mm\16\33ls\247\33ns\337\34ko\374\30sy\361\21\201\210\371\12\215\226"
-  "\377\3\227\242\377\0\234\247\377\0\233\246\377\1\231\243\377\6\216\230"
-  "\377\15\204\213\377\24sx\374\34kp\377\2\220\233\377\35jo\377\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32fo\36\35jo\377\7\224"
-  "\236\377\1\237\252\377\0\240\252\377\0\236\251\377\2\231\244\377\11\215"
-  "\226\377\17\201\210\376\27pv\371\34jo\375\33gk\370\26TW\341\22EG\324"
-  "\35jo\377\2\216\230\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\14\13+/G\33lp\373\1\236\251\377\13\213\223\377\22"
-  "{\203\374\30mr\372\34jn\376\30af\360\23IM\330\15.1\302\4\20\22\255\0"
-  "\0\0\243\0\0\0\243\4\22\23\256\33ko\373\2\214\225\377\35jo\377\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0x\4\22\23\254\33ko\375"
-  "\3\227\241\377\35jo\377\21@D\317\12%&\272\2\6\6\247\0\0\0\243\0\0\0\233"
-  "\0\0\0\232\0\0\0\234\0\0\0\243\0\0\0\237\4\22\23\256\33ko\373\2\212\223"
-  "\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t"
-  "\4\22\23\256\33jo\375\3\225\237\377\33im\374\0\0\0\231\0\0\0\237\0\0"
-  "\0\213\0\0\0c\0\0\0;\0\0\0\30\0\0\0\0\0\0\0:\0\0\0\234\4\22\23\256\33"
-  "ko\373\2\207\220\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0t\4\22\23\256\33jo\375\3\223\235\377\34ko\371\0\0\0$\0"
-  "\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0:\0\0\0\234\4\22"
-  "\23\256\33ko\373\2\205\217\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jo\375\3\221\233\377\34lp\366"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0:\0\0\0"
-  "\234\4\22\23\256\33ko\373\2\202\214\377\35jo\377\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jo\375\3\217\230\377"
-  "\34lp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0:\0\0\0\234\4\22\23\256\33ko\373\2\200\212\377\35jo\377\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jn\375\3\215"
-  "\226\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0:\0\0\0\234\4\22\23\256\33jo\373\2~\207\377\35jo\377\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jn\375"
-  "\3\212\224\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0:\0\0\0\234\4\22\23\256\33jo\373\2|\204\377\35jo\377"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33"
-  "jn\375\3\210\221\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\30mm\25\26QT\216\25UZ\342\31bf\364\35jo\377\2z\202\377\35jo"
-  "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256"
-  "\33jn\375\3\206\220\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0UU"
-  "\3\32bf\177\35ko\371\24ms\372\13u|\377\10w~\377\12t|\377\2w\177\377\35"
-  "jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23"
-  "\256\33jn\375\3\204\215\377\34ko\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*\26"
-  "SV\325\27kq\373\5z\202\377\0|\204\377\0z\202\377\0y\201\377\0w\177\377"
-  "\5t{\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\36lp;\22EH"
-  "\264\25RV\342\35jo\377\3\202\213\377\34ko\366\0\0\0\0\0\0\0\0\0\0\0O"
-  "\15""13\275\27jp\373\1{\203\377\0z\203\377\0y\201\377\0x\200\377\0v~"
-  "\377\0u}\377\11qw\377\33kp\311\0\0\0\0\0\0\0\0\0\0\0\0\31aeG\32gn\350"
-  "\32lp\370\21tz\375\16x\200\377\20v}\377\3\200\211\377\34ko\366\0\0\0"
-  "\0\0\0\0%\0\0\0\233\26W]\347\13u{\377\0y\202\377\0x\200\377\0v~\377\0"
-  "u}\377\0t|\377\6px\377\34jp\366\35lq4\0\0\0\0\0\0\0\12\22GJ\251\33jn"
-  "\374\13}\203\377\0\206\217\377\0\205\216\377\0\204\214\377\0\202\213"
-  "\377\7{\203\377\35jo\377\0\0\0\0\0\0\0d\0\0\0\242\26SV\341\21ou\375\0"
-  "w\177\377\0v~\377\0t|\377\4rz\377\20kr\375\34jn\367\33jmT\0\0\0\0\0\0"
-  "\0\12\13$&\250\32jn\373\3\204\215\377\0\205\216\377\0\204\215\377\0\203"
-  "\213\377\0\201\212\377\0\200\210\377\11x\200\377\34lp\346\0\0\0\0\0\0"
-  "\0D\0\0\0\234\4\22\22\255\31`e\362\32gm\374\27gm\371\32hl\372\34hn\371"
-  "\34hl\245!kk\37\0\0\0\0\0\0\0\0\0\0\0h\24RX\340\14y\201\377\0\204\215"
-  "\377\0\203\214\377\0\201\212\377\0\200\211\377\0\177\207\377\3{\204\377"
-  "\32mq\364\34ipI\0\0\0\0\0\0\0\1\0\0\0G\0\0\0\202\0\0\0\222\5\25\26\225"
-  "\16""02\200\20@D@3ff\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230\26W"
-  "]\347\15w\177\377\0\202\212\377\0\201\211\377\0\177\210\377\1}\206\377"
-  "\13v|\377\33kp\370\35io\205\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0k\11\40!\261\33hm\373\25jp\372\20pv\374\23lr\372\33in\374\33"
-  "gm\341\34jnH\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\3\0\0\0A\4\21\21z\16""47\241\23FI\245\25PTy\35ch,\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\40jj\30\34knQ\35kp\217\33mq\330\35jo\377\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0UU\3\33mm/\35joj\34lr\254\33mq\350"
+      "\34jo\374\27sy\362\20~\207\374\13\207\217\377\35jo\377\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\""
+      "fw\17\34jnH\35lp\202\33ns\310\35kq\367\33nr\365\24z\201\364\15\206\217"
+      "\377\6\220\231\377\1\231\242\377\0\230\242\377\0\227\241\377\2\222\235"
+      "\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "$mm\16\33ls\247\33ns\337\34ko\374\30sy\361\21\201\210\371\12\215\226"
+      "\377\3\227\242\377\0\234\247\377\0\233\246\377\1\231\243\377\6\216\230"
+      "\377\15\204\213\377\24sx\374\34kp\377\2\220\233\377\35jo\377\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32fo\36\35jo\377\7\224"
+      "\236\377\1\237\252\377\0\240\252\377\0\236\251\377\2\231\244\377\11\215"
+      "\226\377\17\201\210\376\27pv\371\34jo\375\33gk\370\26TW\341\22EG\324"
+      "\35jo\377\2\216\230\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\14\13+/G\33lp\373\1\236\251\377\13\213\223\377\22"
+      "{\203\374\30mr\372\34jn\376\30af\360\23IM\330\15.1\302\4\20\22\255\0"
+      "\0\0\243\0\0\0\243\4\22\23\256\33ko\373\2\214\225\377\35jo\377\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0x\4\22\23\254\33ko\375"
+      "\3\227\241\377\35jo\377\21@D\317\12%&\272\2\6\6\247\0\0\0\243\0\0\0\233"
+      "\0\0\0\232\0\0\0\234\0\0\0\243\0\0\0\237\4\22\23\256\33ko\373\2\212\223"
+      "\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t"
+      "\4\22\23\256\33jo\375\3\225\237\377\33im\374\0\0\0\231\0\0\0\237\0\0"
+      "\0\213\0\0\0c\0\0\0;\0\0\0\30\0\0\0\0\0\0\0:\0\0\0\234\4\22\23\256\33"
+      "ko\373\2\207\220\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0t\4\22\23\256\33jo\375\3\223\235\377\34ko\371\0\0\0$\0"
+      "\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0:\0\0\0\234\4\22"
+      "\23\256\33ko\373\2\205\217\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jo\375\3\221\233\377\34lp\366"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0:\0\0\0"
+      "\234\4\22\23\256\33ko\373\2\202\214\377\35jo\377\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jo\375\3\217\230\377"
+      "\34lp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0:\0\0\0\234\4\22\23\256\33ko\373\2\200\212\377\35jo\377\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jn\375\3\215"
+      "\226\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0:\0\0\0\234\4\22\23\256\33jo\373\2~\207\377\35jo\377\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33jn\375"
+      "\3\212\224\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0:\0\0\0\234\4\22\23\256\33jo\373\2|\204\377\35jo\377"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256\33"
+      "jn\375\3\210\221\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\30mm\25\26QT\216\25UZ\342\31bf\364\35jo\377\2z\202\377\35jo"
+      "\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23\256"
+      "\33jn\375\3\206\220\377\34kp\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0UU"
+      "\3\32bf\177\35ko\371\24ms\372\13u|\377\10w~\377\12t|\377\2w\177\377\35"
+      "jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0t\4\22\23"
+      "\256\33jn\375\3\204\215\377\34ko\366\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*\26"
+      "SV\325\27kq\373\5z\202\377\0|\204\377\0z\202\377\0y\201\377\0w\177\377"
+      "\5t{\377\35jo\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\36lp;\22EH"
+      "\264\25RV\342\35jo\377\3\202\213\377\34ko\366\0\0\0\0\0\0\0\0\0\0\0O"
+      "\15""13\275\27jp\373\1{\203\377\0z\203\377\0y\201\377\0x\200\377\0v~"
+      "\377\0u}\377\11qw\377\33kp\311\0\0\0\0\0\0\0\0\0\0\0\0\31aeG\32gn\350"
+      "\32lp\370\21tz\375\16x\200\377\20v}\377\3\200\211\377\34ko\366\0\0\0"
+      "\0\0\0\0%\0\0\0\233\26W]\347\13u{\377\0y\202\377\0x\200\377\0v~\377\0"
+      "u}\377\0t|\377\6px\377\34jp\366\35lq4\0\0\0\0\0\0\0\12\22GJ\251\33jn"
+      "\374\13}\203\377\0\206\217\377\0\205\216\377\0\204\214\377\0\202\213"
+      "\377\7{\203\377\35jo\377\0\0\0\0\0\0\0d\0\0\0\242\26SV\341\21ou\375\0"
+      "w\177\377\0v~\377\0t|\377\4rz\377\20kr\375\34jn\367\33jmT\0\0\0\0\0\0"
+      "\0\12\13$&\250\32jn\373\3\204\215\377\0\205\216\377\0\204\215\377\0\203"
+      "\213\377\0\201\212\377\0\200\210\377\11x\200\377\34lp\346\0\0\0\0\0\0"
+      "\0D\0\0\0\234\4\22\22\255\31`e\362\32gm\374\27gm\371\32hl\372\34hn\371"
+      "\34hl\245!kk\37\0\0\0\0\0\0\0\0\0\0\0h\24RX\340\14y\201\377\0\204\215"
+      "\377\0\203\214\377\0\201\212\377\0\200\211\377\0\177\207\377\3{\204\377"
+      "\32mq\364\34ipI\0\0\0\0\0\0\0\1\0\0\0G\0\0\0\202\0\0\0\222\5\25\26\225"
+      "\16""02\200\20@D@3ff\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230\26W"
+      "]\347\15w\177\377\0\202\212\377\0\201\211\377\0\177\210\377\1}\206\377"
+      "\13v|\377\33kp\370\35io\205\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0k\11\40!\261\33hm\373\25jp\372\20pv\374\23lr\372\33in\374\33"
+      "gm\341\34jnH\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\3\0\0\0A\4\21\21z\16""47\241\23FI\245\25PTy\35ch,\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 /* GdkPixbuf RGBA C-Source image dump */
 
@@ -352,109 +355,110 @@ static const guint8 gnome_stock_onhold[] =
 #pragma align 4 (gnome_stock_dial)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_dial[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_dial[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_dial[] = 
+static const guint8 gnome_stock_dial[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377"
-  "\377\2f\231\\\31\200\257\200\20\377\377\377\2\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\5\377"
-  "\377\354)\374\374\352J\252\305\230r\316\335\271b\373\373\351G\377\377"
-  "\360#\377\377\377\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\377\377\377\11\377\377\354D\375\375\337g\375\375\332}\302\325\243"
-  "\236\334\347\271\222\375\375\332{\374\374\340b\373\373\352=\377\377\377"
-  "\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\2\210\256zk\347\355"
-  "\312t\374\374\323\222\374\373\313\257\307\330\243\262\341\351\267\253"
-  "\374\373\315\254\373\373\326\216\333\346\300r\204\255y]\0\0\0\0\0\0\0"
-  "\0\24v\0\15\27\200\0\247\30\200\0\270\30~\0\270\26~\0i\0\0\0\0$m\0\7"
-  "\26\200\0\241\30\200\0\270\30~\0\270\30~\0u\377\377\363\26\355\365\325"
-  "b\211\266o\335\231\276w\354\236\311\200\335\240\312\205\266\375\375\337"
-  "p\362\366\315\213\270\316\223\302\257\310\222\242\363\366\334X\377\377"
-  "\353\15\0\0\0\0\24z\0d\40\231\0\377!\232\0\377\40\226\0\377\30~\0\323"
-  "\0\0\0\0\24w\0M\37\225\0\375!\232\0\377\40\226\0\377\30\201\0\334\377"
-  "\377\356-\311\336\256\215\255\324\206\373\223\312q\377q\274T\377R\242"
-  ";\351\345\360\317E\365\367\331e\353\360\304\230\374\374\321\233\375\375"
-  "\337g\377\377\357\40\0\0\0\0\27|\0m\35\221\0\377\36\217\0\377\35\212"
-  "\0\377\26z\0\325\0\0\0\0\25w\0V\34\214\0\377\36\217\0\377\35\213\0\377"
-  "\27{\0\337\377\377\3545\310\336\253\225\264\326\213\373\216\306m\377"
-  "_\255E\377.\211\27\347\266\325\252*\374\374\346S\373\373\326\211\374"
-  "\372\317\243\375\375\336m\377\377\354(\0\0\0\0\25y\0c\34\206\0\377\34"
-  "\204\0\377\33\177\0\377\26v\0\321\0\0\0\0\24w\0K\33\204\0\374\34\204"
-  "\0\377\33\200\0\377\26w\0\333\377\377\356-\314\340\260\213\253\317\206"
-  "\372\203\266e\377l\254R\377P\232:\350\345\360\322D\351\356\316h\307\330"
-  "\246\244\374\374\321\233\375\375\337g\377\377\357\40\0\0\0\0\34q\0\11"
-  "\25w\0\235\25v\0\255\25t\0\255\25r\0b\0\0\0\0\0f\0\5\24v\0\227\25v\0"
-  "\255\25t\0\255\23p\0m\377\377\363\26\276\325\254r\204\260k\334\257\313"
-  "\211\346\241\306\204\327\234\300\201\266\361\366\326q\373\373\327\207"
-  "\324\341\254\270\237\275\206\252\313\334\267g\377\377\377\15\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\377\377\377\2\247\304\231Z\375\375\336m\374\374"
-  "\324\223\374\373\313\260\310\330\243\261\341\351\267\253\374\373\313"
-  "\255\373\373\324\217\370\372\333i\237\277\217P\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\26y\0""9\23|\0P\23|\0P\24z\0\31\0\0\0\0\0\0\0\0\24x\0""3\23|\0P\23"
-  "|\0P\21w\0\36\0\0\0\0\377\377\346\12\262\320\236f\263\323\230\227\305"
-  "\337\245\247\262\315\226\254\335\347\272\224\375\375\332|\374\374\340"
-  "c\373\373\357>\377\377\377\5\0\0\0\0\0\0\0\0\25w\0<\34\217\0\365\37\225"
-  "\0\377\36\222\0\377\30~\0\316\0\0\0\0\23s\0(\33\214\0\360\37\225\0\377"
-  "\36\222\0\377\30\200\0\330\0\0\0\0\24v\0\32\40\213\5\352E\250(\377`\261"
-  "E\377_\242I\355\311\332\261h\373\373\352H\377\377\361%\377\377\377\3"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\25w\0V\35\221\0\377\37\223\0\377\36\217\0\377"
-  "\30}\0\327\0\0\0\0\21s\0<\34\217\0\377\37\223\0\377\36\217\0\377\30~"
-  "\0\337\0\0\0\0\21q\0-\34\215\0\364\37\224\0\377!\220\3\377!\203\13\347"
-  "X\235N\32\377\377\377\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\25w\0"
-  "V\34\210\0\377\35\210\0\377\34\204\0\377\27y\0\327\0\0\0\0\21s\0<\33"
-  "\207\0\377\35\210\0\377\34\204\0\377\27x\0\337\0\0\0\0\21q\0-\33\206"
-  "\0\364\35\211\0\377\34\204\0\377\27y\0\345\21w\0\17\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20s\0\37\27x\0\325\26w\0\337\25u\0\337"
-  "\25t\0\251\0\0\0\0\15s\0\24\26x\0\322\26w\0\337\25v\0\337\25s\0\266\0"
-  "\0\0\0\25j\0\14\27w\0\314\26w\0\337\25v\0\337\24t\0\300\0\200\0\2\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\20x\0\40\31\204\0\316\32\210\0\322\32\206\0\322"
-  "\27\177\0\243\0\0\0\0\15s\0\24\30\204\0\313\32\210\0\322\32\206\0\322"
-  "\26}\0\257\0\0\0\0\25j\0\14\27\203\0\306\32\210\0\322\32\206\0\322\30"
-  "\200\0\266\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\27"
-  "|\0m\36\224\0\377\40\227\0\377\37\222\0\377\30\177\0\327\0\0\0\0\24t"
-  "\0K\35\222\0\377\40\227\0\377\37\223\0\377\30\200\0\337\0\0\0\0\21q\0"
-  "-\35\220\0\364\40\230\0\377\37\223\0\377\32\201\0\345\21w\0\17\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\27|\0m\35\213\0\377\36\214"
-  "\0\377\35\207\0\377\30z\0\327\0\0\0\0\24t\0K\34\212\0\377\36\214\0\377"
-  "\35\210\0\377\27z\0\337\0\0\0\0\21q\0-\33\210\0\364\36\215\0\377\35\210"
-  "\0\377\30|\0\345\21w\0\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\24w\0K\32~\0\367\32\177\0\377\32z\0\377\25u\0\315\0\0\0\0\24u\0"
-  "2\30}\0\363\32\177\0\377\32{\0\377\24u\0\327\0\0\0\0\22r\0\35\30}\0\352"
-  "\32\200\0\377\32{\0\377\26u\0\336$m\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\27v\0C\23r\0`\23r\0`\22r\0\35\0\0\0\0\0\0"
-  "\0\0\25q\0=\23r\0`\23r\0`\16q\0$\0\0\0\0\0\0\0\0\27r\0""8\23r\0`\23r"
-  "\0`\22w\0+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377"
+      "\377\2f\231\\\31\200\257\200\20\377\377\377\2\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\5\377"
+      "\377\354)\374\374\352J\252\305\230r\316\335\271b\373\373\351G\377\377"
+      "\360#\377\377\377\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\377\377\377\11\377\377\354D\375\375\337g\375\375\332}\302\325\243"
+      "\236\334\347\271\222\375\375\332{\374\374\340b\373\373\352=\377\377\377"
+      "\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\2\210\256zk\347\355"
+      "\312t\374\374\323\222\374\373\313\257\307\330\243\262\341\351\267\253"
+      "\374\373\315\254\373\373\326\216\333\346\300r\204\255y]\0\0\0\0\0\0\0"
+      "\0\24v\0\15\27\200\0\247\30\200\0\270\30~\0\270\26~\0i\0\0\0\0$m\0\7"
+      "\26\200\0\241\30\200\0\270\30~\0\270\30~\0u\377\377\363\26\355\365\325"
+      "b\211\266o\335\231\276w\354\236\311\200\335\240\312\205\266\375\375\337"
+      "p\362\366\315\213\270\316\223\302\257\310\222\242\363\366\334X\377\377"
+      "\353\15\0\0\0\0\24z\0d\40\231\0\377!\232\0\377\40\226\0\377\30~\0\323"
+      "\0\0\0\0\24w\0M\37\225\0\375!\232\0\377\40\226\0\377\30\201\0\334\377"
+      "\377\356-\311\336\256\215\255\324\206\373\223\312q\377q\274T\377R\242"
+      ";\351\345\360\317E\365\367\331e\353\360\304\230\374\374\321\233\375\375"
+      "\337g\377\377\357\40\0\0\0\0\27|\0m\35\221\0\377\36\217\0\377\35\212"
+      "\0\377\26z\0\325\0\0\0\0\25w\0V\34\214\0\377\36\217\0\377\35\213\0\377"
+      "\27{\0\337\377\377\3545\310\336\253\225\264\326\213\373\216\306m\377"
+      "_\255E\377.\211\27\347\266\325\252*\374\374\346S\373\373\326\211\374"
+      "\372\317\243\375\375\336m\377\377\354(\0\0\0\0\25y\0c\34\206\0\377\34"
+      "\204\0\377\33\177\0\377\26v\0\321\0\0\0\0\24w\0K\33\204\0\374\34\204"
+      "\0\377\33\200\0\377\26w\0\333\377\377\356-\314\340\260\213\253\317\206"
+      "\372\203\266e\377l\254R\377P\232:\350\345\360\322D\351\356\316h\307\330"
+      "\246\244\374\374\321\233\375\375\337g\377\377\357\40\0\0\0\0\34q\0\11"
+      "\25w\0\235\25v\0\255\25t\0\255\25r\0b\0\0\0\0\0f\0\5\24v\0\227\25v\0"
+      "\255\25t\0\255\23p\0m\377\377\363\26\276\325\254r\204\260k\334\257\313"
+      "\211\346\241\306\204\327\234\300\201\266\361\366\326q\373\373\327\207"
+      "\324\341\254\270\237\275\206\252\313\334\267g\377\377\377\15\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\377\377\377\2\247\304\231Z\375\375\336m\374\374"
+      "\324\223\374\373\313\260\310\330\243\261\341\351\267\253\374\373\313"
+      "\255\373\373\324\217\370\372\333i\237\277\217P\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\26y\0""9\23|\0P\23|\0P\24z\0\31\0\0\0\0\0\0\0\0\24x\0""3\23|\0P\23"
+      "|\0P\21w\0\36\0\0\0\0\377\377\346\12\262\320\236f\263\323\230\227\305"
+      "\337\245\247\262\315\226\254\335\347\272\224\375\375\332|\374\374\340"
+      "c\373\373\357>\377\377\377\5\0\0\0\0\0\0\0\0\25w\0<\34\217\0\365\37\225"
+      "\0\377\36\222\0\377\30~\0\316\0\0\0\0\23s\0(\33\214\0\360\37\225\0\377"
+      "\36\222\0\377\30\200\0\330\0\0\0\0\24v\0\32\40\213\5\352E\250(\377`\261"
+      "E\377_\242I\355\311\332\261h\373\373\352H\377\377\361%\377\377\377\3"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\25w\0V\35\221\0\377\37\223\0\377\36\217\0\377"
+      "\30}\0\327\0\0\0\0\21s\0<\34\217\0\377\37\223\0\377\36\217\0\377\30~"
+      "\0\337\0\0\0\0\21q\0-\34\215\0\364\37\224\0\377!\220\3\377!\203\13\347"
+      "X\235N\32\377\377\377\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\25w\0"
+      "V\34\210\0\377\35\210\0\377\34\204\0\377\27y\0\327\0\0\0\0\21s\0<\33"
+      "\207\0\377\35\210\0\377\34\204\0\377\27x\0\337\0\0\0\0\21q\0-\33\206"
+      "\0\364\35\211\0\377\34\204\0\377\27y\0\345\21w\0\17\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20s\0\37\27x\0\325\26w\0\337\25u\0\337"
+      "\25t\0\251\0\0\0\0\15s\0\24\26x\0\322\26w\0\337\25v\0\337\25s\0\266\0"
+      "\0\0\0\25j\0\14\27w\0\314\26w\0\337\25v\0\337\24t\0\300\0\200\0\2\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\20x\0\40\31\204\0\316\32\210\0\322\32\206\0\322"
+      "\27\177\0\243\0\0\0\0\15s\0\24\30\204\0\313\32\210\0\322\32\206\0\322"
+      "\26}\0\257\0\0\0\0\25j\0\14\27\203\0\306\32\210\0\322\32\206\0\322\30"
+      "\200\0\266\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\27"
+      "|\0m\36\224\0\377\40\227\0\377\37\222\0\377\30\177\0\327\0\0\0\0\24t"
+      "\0K\35\222\0\377\40\227\0\377\37\223\0\377\30\200\0\337\0\0\0\0\21q\0"
+      "-\35\220\0\364\40\230\0\377\37\223\0\377\32\201\0\345\21w\0\17\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\27|\0m\35\213\0\377\36\214"
+      "\0\377\35\207\0\377\30z\0\327\0\0\0\0\24t\0K\34\212\0\377\36\214\0\377"
+      "\35\210\0\377\27z\0\337\0\0\0\0\21q\0-\33\210\0\364\36\215\0\377\35\210"
+      "\0\377\30|\0\345\21w\0\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\24w\0K\32~\0\367\32\177\0\377\32z\0\377\25u\0\315\0\0\0\0\24u\0"
+      "2\30}\0\363\32\177\0\377\32{\0\377\24u\0\327\0\0\0\0\22r\0\35\30}\0\352"
+      "\32\200\0\377\32{\0\377\26u\0\336$m\0\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\27v\0C\23r\0`\23r\0`\22r\0\35\0\0\0\0\0\0"
+      "\0\0\25q\0=\23r\0`\23r\0`\16q\0$\0\0\0\0\0\0\0\0\27r\0""8\23r\0`\23r"
+      "\0`\22w\0+\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 /* GdkPixbuf RGBA C-Source image dump */
 
@@ -462,104 +466,105 @@ static const guint8 gnome_stock_dial[] =
 #pragma align 4 (gnome_stock_transfer)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_transfer[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_transfer[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_transfer[] = 
+static const guint8 gnome_stock_transfer[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\21i\377=\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\21i\377\210\24h\377@\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\21i\377\210\22h\377\232\24i\3773\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\21i\377\210\22i\377\234\23h\377\237\22k\377+\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\21i\377\210\22i\377\234\22h\377\246\21h\377\247\17d\377"
-  "!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\377\4\27]\377"
-  "\13\17i\377\21\26o\377\27\22j\377\35\16c\377$\22e\377+\25h\3771\23k\377"
-  "7\20g\377>\23i\377D\21k\377J\20i\377P\22h\377\216\22i\377\234\22h\377"
-  "\246\21h\377\261\22h\377\246\27h\377\26\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<"
-  "\22h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22"
-  "h\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22i\377\250"
-  "\17i\377\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0m\377\7\16c\377\22\22d\377"
-  "\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22"
-  "h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21h\377"
-  "\261\22h\377\273\22h\377\306\23h\377\244\34U\377\11\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22h"
-  "\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h\377"
-  "\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306\22h"
-  "\377\321\21h\377\230\0f\377\5\0\0\0\0\0\0\0\0\0m\377\7\16c\377\22\22"
-  "d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377"
-  "g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21"
-  "h\377\261\22h\377\273\22h\377\306\22h\377\321\21h\377\333\21g\377\224"
-  "\0\0\377\1\0\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21"
-  "f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377"
-  "\206\22h\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h"
-  "\377\306\22h\377\321\21h\377\333\22h\377\346\22h\377\200\0\0\0\0\0m\377"
-  "\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377"
-  "Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377"
-  "\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306\22h\377\321\21h"
-  "\377\333\22h\377\346\22h\377\361\23h\377n\0m\377\7\16c\377\22\22d\377"
-  "\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22"
-  "h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21h\377"
-  "\261\22h\377\273\22h\377\306\22h\377\321\21h\377\333\22h\377\346\22h"
-  "\377\361\21h\377v\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21"
-  "f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377"
-  "\206\22h\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h"
-  "\377\306\22h\377\321\21h\377\333\22h\377\346\22g\377\212\0\0\0\0\0m\377"
-  "\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377"
-  "Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377"
-  "\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306\22h\377\321\21h"
-  "\377\333\21g\377\224\0\0\377\1\0\0\0\0\0m\377\7\16c\377\22\22d\377\34"
-  "\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22h"
-  "\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21h\377"
-  "\261\22h\377\273\22h\377\306\22h\377\321\21h\377\242\0f\377\5\0\0\0\0"
-  "\0\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22"
-  "h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h"
-  "\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306"
-  "\23h\377\245\24b\377\15\0\0\0\0\0\0\0\0\0\0\0\0\0m\377\7\16c\377\22\22"
-  "d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377"
-  "g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21"
-  "h\377\261\22h\377\273\22i\377\252\17i\377\21\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\200\377\4\27]\377\13\17i\377\21\26o\377\27\22j\377\35\16c"
-  "\377$\22e\377+\25h\3771\23k\3777\20g\377>\23i\377D\21k\377J\20i\377P"
-  "\22h\377\216\22i\377\234\22h\377\246\21h\377\261\22h\377\254\22d\377"
-  "\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\21i\377\210\22i\377\234\22h\377\246\21h\377\247\17i\377\""
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\21i\377\210\22i\377\234\23h\377\242\21i\377.\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\21i\377\210\22h\377\232\22j\377:\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\21i\377\210\24h\377@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\23i\377D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\21i\377=\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\21i\377\210\24h\377@\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\21i\377\210\22h\377\232\24i\3773\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\21i\377\210\22i\377\234\23h\377\237\22k\377+\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\21i\377\210\22i\377\234\22h\377\246\21h\377\247\17d\377"
+      "!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\377\4\27]\377"
+      "\13\17i\377\21\26o\377\27\22j\377\35\16c\377$\22e\377+\25h\3771\23k\377"
+      "7\20g\377>\23i\377D\21k\377J\20i\377P\22h\377\216\22i\377\234\22h\377"
+      "\246\21h\377\261\22h\377\246\27h\377\26\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<"
+      "\22h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22"
+      "h\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22i\377\250"
+      "\17i\377\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0m\377\7\16c\377\22\22d\377"
+      "\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22"
+      "h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21h\377"
+      "\261\22h\377\273\22h\377\306\23h\377\244\34U\377\11\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22h"
+      "\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h\377"
+      "\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306\22h"
+      "\377\321\21h\377\230\0f\377\5\0\0\0\0\0\0\0\0\0m\377\7\16c\377\22\22"
+      "d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377"
+      "g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21"
+      "h\377\261\22h\377\273\22h\377\306\22h\377\321\21h\377\333\21g\377\224"
+      "\0\0\377\1\0\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21"
+      "f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377"
+      "\206\22h\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h"
+      "\377\306\22h\377\321\21h\377\333\22h\377\346\22h\377\200\0\0\0\0\0m\377"
+      "\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377"
+      "Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377"
+      "\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306\22h\377\321\21h"
+      "\377\333\22h\377\346\22h\377\361\23h\377n\0m\377\7\16c\377\22\22d\377"
+      "\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22"
+      "h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21h\377"
+      "\261\22h\377\273\22h\377\306\22h\377\321\21h\377\333\22h\377\346\22h"
+      "\377\361\21h\377v\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21"
+      "f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377"
+      "\206\22h\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h"
+      "\377\306\22h\377\321\21h\377\333\22h\377\346\22g\377\212\0\0\0\0\0m\377"
+      "\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377"
+      "Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377"
+      "\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306\22h\377\321\21h"
+      "\377\333\21g\377\224\0\0\377\1\0\0\0\0\0m\377\7\16c\377\22\22d\377\34"
+      "\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377g\22h"
+      "\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21h\377"
+      "\261\22h\377\273\22h\377\306\22h\377\321\21h\377\242\0f\377\5\0\0\0\0"
+      "\0\0\0\0\0m\377\7\16c\377\22\22d\377\34\24i\377'\20h\3771\21f\377<\22"
+      "h\377G\23h\377Q\21i\377\\\21h\377g\22h\377q\23i\377|\21i\377\206\22h"
+      "\377\221\22i\377\234\22h\377\246\21h\377\261\22h\377\273\22h\377\306"
+      "\23h\377\245\24b\377\15\0\0\0\0\0\0\0\0\0\0\0\0\0m\377\7\16c\377\22\22"
+      "d\377\34\24i\377'\20h\3771\21f\377<\22h\377G\23h\377Q\21i\377\\\21h\377"
+      "g\22h\377q\23i\377|\21i\377\206\22h\377\221\22i\377\234\22h\377\246\21"
+      "h\377\261\22h\377\273\22i\377\252\17i\377\21\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\200\377\4\27]\377\13\17i\377\21\26o\377\27\22j\377\35\16c"
+      "\377$\22e\377+\25h\3771\23k\3777\20g\377>\23i\377D\21k\377J\20i\377P"
+      "\22h\377\216\22i\377\234\22h\377\246\21h\377\261\22h\377\254\22d\377"
+      "\34\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\21i\377\210\22i\377\234\22h\377\246\21h\377\247\17i\377\""
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\21i\377\210\22i\377\234\23h\377\242\21i\377.\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\21i\377\210\22h\377\232\22j\377:\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\21i\377\210\24h\377@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\23i\377D\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 
 /* GdkPixbuf RGBA C-Source image dump */
@@ -568,96 +573,97 @@ static const guint8 gnome_stock_transfer[] =
 #pragma align 4 (gnome_stock_offhold)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_offhold[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_offhold[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_offhold[] = 
+static const guint8 gnome_stock_offhold[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0ix\21\0mss\0mr\210\0lt@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "3ff\5\14kqV\14lr\250\0lr}\0mv\34\0\0\0\0\0ht\26\0ls\343\0ls\377\0ls\377"
-  "\0ls\377\0ms\242\0\200\200\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\34qq\11\33mm/\32kqX\33ms\205\26lq\320\17ou\377\22kp"
-  "\377\0ls\377\0ls\364\0lq-\0ks\212\0ls\377\0ls\377\0ls\377\0ls\377\0l"
-  "s\377\0ks\253\0ff\5\0\0\0\0\0\0\0\0\40`p\20\34mm6\35nta\33ms\214\34k"
-  "p\235\26tz\230\16\202\212\237\5\206\216\324\1\207\217\377\1\205\216\377"
-  "\21lq\377\0ls\377\0ls\377\0ks\262\0lr\256\0ls\377\0ls\377\0ls\377\0l"
-  "s\377\0ls\377\3lr\377\11lr\300\32mtn\34ns\222\34lq\234\26y\200\230\15"
-  "\207\217\240\6\222\233\241\0\233\245\241\0\232\245\241\0\216\226\324"
-  "\4\201\211\377\10z\200\377\2\203\213\377\21lq\377\0ls\377\0ls\377\0l"
-  "t\326\0lsv\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\22lq\377\16sy\377"
-  "\11\202\212\341\5\226\241\243\0\236\251\241\0\236\250\241\2\232\245\241"
-  "\6\217\230\241\16\202\212\237\20qy\321\21lq\377\17ls\377\22kp\377\2\201"
-  "\211\377\21kq\377\0ls\377\0ls\377\0ks\235\0\200\200\6\0ls\377\0ls\377"
-  "\0ls\377\0ls\377\0ls\377\17ls\377\3\210\220\377\1\212\223\377\6\205\215"
-  "\342\16\201\211\240\27rw\230\35ko\236\33lt\206\15lq\266\6ls\377\1ls\377"
-  "\0ls\377\21lq\377\2\177\207\377\21kq\377\0ls\377\0lr\341\0ju\30\0\0\0"
-  "\0\0pp\20\0ms\312\0ls\377\0ls\377\0ls\377\17ls\377\3\207\216\377\22k"
-  "p\377\15ms\377\13mr\314\26ot.$mm\7\0lr\223\0ls\377\0ls\377\0ls\377\0"
-  "ls\377\21lq\377\2~\206\377\21kq\377\0ls\340\0lt!\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0fw\17\0ls\307\0ls\377\0ls\377\17ls\377\3\205\216\377\22kp\377\0"
-  "ls\377\0ls\377\0ls\266\0kr\230\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377"
-  "\21lq\377\2}\204\377\22kq\362\0pp\40\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0fw\17\0ks\305\0ls\377\17ls\377\3\204\214\377\22kp\377\0ls\377"
-  "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\21l"
-  "q\377\2|\204\362\32ko\247\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0mm\16\0lr\304\17ls\377\3\202\213\377\22kp\377\0ls\377\0"
-  "ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\22lp\361"
-  "\3~\210\254\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0vv\15\21ls\345\3\201\211\377\22kp\377\0ls\377\0ls\377"
-  "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\332\32lo\247\3\177"
-  "\210\241\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\32mr\224\3\201\211\351\22kp\377\0ls\377\0ls\377"
-  "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0mt\332\0hq\33\34lo\234\3}\205"
-  "\241\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\33lq\220\3\201\211\335\22kp\377\0ls\377\0ls\377\0ls"
-  "\377\0ls\377\0ls\377\0ls\377\0ls\377\0ms\305\0f\200\12\34lo\234\3z\203"
-  "\241\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0UU\3\22lr\326\3}\205\377\22kp\377\0ls\377\0ls\377\0ls\377\0"
-  "ls\377\0ls\377\0ls\377\4ls\377\12lr\377\17mq\337\34ko\245\3x\200\241"
-  "\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U"
-  "U\3\0ks\244\17lr\377\3|\204\377\22kp\377\0ls\377\0ls\377\0ls\377\0ls"
-  "\377\3ls\377\16lq\377\17lr\377\11rx\377\5sz\377\7rx\351\3w\177\245\35"
-  "ko\236\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0UU\3\0ls\246"
-  "\0ls\377\17kr\377\3{\202\377\22kp\377\0ls\377\0ls\377\0ls\377\2ls\377"
-  "\20lq\377\10rx\377\0v}\377\0u}\377\0t{\377\0sz\377\3rx\351\34jo\246\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\200\4\3ls\257\10lr\377\13"
-  "lr\377\22kp\377\3y\201\377\22kp\377\0ls\377\0ls\377\0ls\324\16lr\333"
-  "\10ry\377\0v}\377\0t|\377\0t{\377\0sz\377\0ry\377\6nv\377\16kr\337\0"
-  "fw\17\0\0\0\0\0\0\0\0\0\0\0\0\22mm\16\16lr\315\21lr\377\13qx\377\6v}"
-  "\377\10u{\377\2y\201\377\22kp\377\0ls\377\0ls\317\0ht\26\35kp\240\1u"
-  "|\344\0t{\377\0sz\377\0ry\377\0qx\377\4ov\377\20kq\377\3ls\377\0ls\307"
-  "\0fw\17\0\0\0\0\40\200\200\10\22lr\331\13qy\377\1}\204\377\0|\204\377"
-  "\0{\202\377\0z\202\377\1x\177\377\22kp\377\0ls\316\0ky\23\0\0\0\0\35"
-  "kp\217\13sy\242\1t|\343\0qx\377\4pv\377\13mt\377\20kp\377\4kr\377\0l"
-  "s\377\0ls\377\0ls\377\0\200\200\6\17mr\233\12ry\377\0}\204\377\0{\203"
-  "\377\0{\202\377\0y\201\377\0y\200\377\4u|\377\17lq\347\0qq\22\0\0\0\0"
-  "\0\0\0\0\34hq\33\32lp\200\34kp\235\23kp\341\17lq\377\11lr\377\1ks\377"
-  "\0ls\377\0ls\377\0ls\377\0ls\377\0lt\213\23kr\333\3y\201\377\0{\202\377"
-  "\0z\201\377\0y\200\377\0x\177\377\3v|\377\21jr\353\23mv6\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\200\6\0mr\260\0ls\377\0ls"
-  "\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\322\22lr\313\10s{\377\0y\200"
-  "\377\0x\200\377\2v}\377\11qw\377\21kq\353\27koL\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\200\6\0ls\255\0ls\377"
-  "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\273\14jnA\17lq\370\21kq\377\20k"
-  "r\377\20lq\377\15kr\335\24bo'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ff\5\0lt\252\0ls\377\0ls\377"
-  "\0ls\377\0ls\374\0ksE\0\0\0\0\0lq-\2ms\242\1ls\275\0lrt\0tt\13\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0lrU\0mt\267\0lt\254\0js<\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0ix\21\0mss\0mr\210\0lt@\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "3ff\5\14kqV\14lr\250\0lr}\0mv\34\0\0\0\0\0ht\26\0ls\343\0ls\377\0ls\377"
+      "\0ls\377\0ms\242\0\200\200\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\34qq\11\33mm/\32kqX\33ms\205\26lq\320\17ou\377\22kp"
+      "\377\0ls\377\0ls\364\0lq-\0ks\212\0ls\377\0ls\377\0ls\377\0ls\377\0l"
+      "s\377\0ks\253\0ff\5\0\0\0\0\0\0\0\0\40`p\20\34mm6\35nta\33ms\214\34k"
+      "p\235\26tz\230\16\202\212\237\5\206\216\324\1\207\217\377\1\205\216\377"
+      "\21lq\377\0ls\377\0ls\377\0ks\262\0lr\256\0ls\377\0ls\377\0ls\377\0l"
+      "s\377\0ls\377\3lr\377\11lr\300\32mtn\34ns\222\34lq\234\26y\200\230\15"
+      "\207\217\240\6\222\233\241\0\233\245\241\0\232\245\241\0\216\226\324"
+      "\4\201\211\377\10z\200\377\2\203\213\377\21lq\377\0ls\377\0ls\377\0l"
+      "t\326\0lsv\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\22lq\377\16sy\377"
+      "\11\202\212\341\5\226\241\243\0\236\251\241\0\236\250\241\2\232\245\241"
+      "\6\217\230\241\16\202\212\237\20qy\321\21lq\377\17ls\377\22kp\377\2\201"
+      "\211\377\21kq\377\0ls\377\0ls\377\0ks\235\0\200\200\6\0ls\377\0ls\377"
+      "\0ls\377\0ls\377\0ls\377\17ls\377\3\210\220\377\1\212\223\377\6\205\215"
+      "\342\16\201\211\240\27rw\230\35ko\236\33lt\206\15lq\266\6ls\377\1ls\377"
+      "\0ls\377\21lq\377\2\177\207\377\21kq\377\0ls\377\0lr\341\0ju\30\0\0\0"
+      "\0\0pp\20\0ms\312\0ls\377\0ls\377\0ls\377\17ls\377\3\207\216\377\22k"
+      "p\377\15ms\377\13mr\314\26ot.$mm\7\0lr\223\0ls\377\0ls\377\0ls\377\0"
+      "ls\377\21lq\377\2~\206\377\21kq\377\0ls\340\0lt!\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0fw\17\0ls\307\0ls\377\0ls\377\17ls\377\3\205\216\377\22kp\377\0"
+      "ls\377\0ls\377\0ls\266\0kr\230\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377"
+      "\21lq\377\2}\204\377\22kq\362\0pp\40\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0fw\17\0ks\305\0ls\377\17ls\377\3\204\214\377\22kp\377\0ls\377"
+      "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\21l"
+      "q\377\2|\204\362\32ko\247\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0mm\16\0lr\304\17ls\377\3\202\213\377\22kp\377\0ls\377\0"
+      "ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\22lp\361"
+      "\3~\210\254\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0vv\15\21ls\345\3\201\211\377\22kp\377\0ls\377\0ls\377"
+      "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\332\32lo\247\3\177"
+      "\210\241\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\32mr\224\3\201\211\351\22kp\377\0ls\377\0ls\377"
+      "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\377\0mt\332\0hq\33\34lo\234\3}\205"
+      "\241\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\33lq\220\3\201\211\335\22kp\377\0ls\377\0ls\377\0ls"
+      "\377\0ls\377\0ls\377\0ls\377\0ls\377\0ms\305\0f\200\12\34lo\234\3z\203"
+      "\241\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0UU\3\22lr\326\3}\205\377\22kp\377\0ls\377\0ls\377\0ls\377\0"
+      "ls\377\0ls\377\0ls\377\4ls\377\12lr\377\17mq\337\34ko\245\3x\200\241"
+      "\34kp\233\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U"
+      "U\3\0ks\244\17lr\377\3|\204\377\22kp\377\0ls\377\0ls\377\0ls\377\0ls"
+      "\377\3ls\377\16lq\377\17lr\377\11rx\377\5sz\377\7rx\351\3w\177\245\35"
+      "ko\236\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0UU\3\0ls\246"
+      "\0ls\377\17kr\377\3{\202\377\22kp\377\0ls\377\0ls\377\0ls\377\2ls\377"
+      "\20lq\377\10rx\377\0v}\377\0u}\377\0t{\377\0sz\377\3rx\351\34jo\246\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\200\4\3ls\257\10lr\377\13"
+      "lr\377\22kp\377\3y\201\377\22kp\377\0ls\377\0ls\377\0ls\324\16lr\333"
+      "\10ry\377\0v}\377\0t|\377\0t{\377\0sz\377\0ry\377\6nv\377\16kr\337\0"
+      "fw\17\0\0\0\0\0\0\0\0\0\0\0\0\22mm\16\16lr\315\21lr\377\13qx\377\6v}"
+      "\377\10u{\377\2y\201\377\22kp\377\0ls\377\0ls\317\0ht\26\35kp\240\1u"
+      "|\344\0t{\377\0sz\377\0ry\377\0qx\377\4ov\377\20kq\377\3ls\377\0ls\307"
+      "\0fw\17\0\0\0\0\40\200\200\10\22lr\331\13qy\377\1}\204\377\0|\204\377"
+      "\0{\202\377\0z\202\377\1x\177\377\22kp\377\0ls\316\0ky\23\0\0\0\0\35"
+      "kp\217\13sy\242\1t|\343\0qx\377\4pv\377\13mt\377\20kp\377\4kr\377\0l"
+      "s\377\0ls\377\0ls\377\0\200\200\6\17mr\233\12ry\377\0}\204\377\0{\203"
+      "\377\0{\202\377\0y\201\377\0y\200\377\4u|\377\17lq\347\0qq\22\0\0\0\0"
+      "\0\0\0\0\34hq\33\32lp\200\34kp\235\23kp\341\17lq\377\11lr\377\1ks\377"
+      "\0ls\377\0ls\377\0ls\377\0ls\377\0lt\213\23kr\333\3y\201\377\0{\202\377"
+      "\0z\201\377\0y\200\377\0x\177\377\3v|\377\21jr\353\23mv6\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\200\6\0mr\260\0ls\377\0ls"
+      "\377\0ls\377\0ls\377\0ls\377\0ls\377\0ls\322\22lr\313\10s{\377\0y\200"
+      "\377\0x\200\377\2v}\377\11qw\377\21kq\353\27koL\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\200\6\0ls\255\0ls\377"
+      "\0ls\377\0ls\377\0ls\377\0ls\377\0ls\273\14jnA\17lq\370\21kq\377\20k"
+      "r\377\20lq\377\15kr\335\24bo'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ff\5\0lt\252\0ls\377\0ls\377"
+      "\0ls\377\0ls\374\0ksE\0\0\0\0\0lq-\2ms\242\1ls\275\0lrt\0tt\13\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0lrU\0mt\267\0lt\254\0js<\0\0\0\0"
+    };
 
 
 /* GdkPixbuf RGBA C-Source image dump */
@@ -666,206 +672,208 @@ static const guint8 gnome_stock_offhold[] =
 #pragma align 4 (gnome_stock_im)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_im[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_im[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_im[] = 
+static const guint8 gnome_stock_im[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\4\0\200\0&\0\201\0K\0\200\0"
-  "^\0\201\0i\0\200\0l\0~\0a\0\200\0P\0\200\0,\0\200\0\10\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\200\0\4\0\200\0N\0\200\0\226\0\177\0\323\0\200\0\334\0\200\0"
-  "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
-  "\0\334\0\177\0\327\0\200\0\241\0\201\0[\0\216\0\11\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\201\0K\0\200\0\301\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
-  "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
-  "\0\334\0\200\0\334\0\200\0\314\0\201\0c\0\200\0\2\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0U\0\3\0\177\0\207\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
-  "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
-  "\0\334\0\200\0\334\0\200\0\334\0\200\0\243\0q\0\11\0\0\0\0\0\0\0\0\0"
-  "\201\0u\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
-  "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
-  "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\232\0\0\0\0\0\205\0"
-  "\27\0\177\0\327\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
-  "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
-  "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
-  "6\0\200\0D\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
-  "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
-  "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
-  "\201\0i\0}\0""9\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
-  "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
-  "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
-  "\334\0\201\0]\0q\0\11\0\200\0\304\0\200\0\334\0\200\0\334\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
-  "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
-  "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
-  "\200\0\325\0\200\0\34\0\0\0\0\0~\0A\0\177\0\327\0\200\0\334\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
-  "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
-  "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
-  "\200\0`\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0B\0\177\0\313\0\200\0\334\0\200"
-  "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
-  "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\324\0~\0[\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0y\0\23\0\200\0|\0\177\0\323\0\200\0\334\0"
-  "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
-  "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
-  "\330\0\177\0\215\0\200\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\200\0\16\0~\0M\0\200\0\215\0\200\0\271\0\177"
-  "\0\331\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\333\0"
-  "\177\0\277\0\200\0\225\0\200\0X\0y\0\25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\26"
-  "\0\200\0,\0\203\0#\0\237\0\10\0\200\0\26\0|\0#\0\203\0%\0\200\0\30\0"
-  "\200\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\22\0\201\0\236\0"
-  "\200\0\315\0\200\0\315\0\200\0\315\0\200\0\277\0\201\0E\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0(\0\200"
-  "\0\307\0\200\0\315\0\200\0\315\0\200\0\315\0\200\0\315\0\200\0v\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0{\0\33\0\201\0Y\0\201\0q\0\201\0g\0\202\0""7\0\0\0\1\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\4\0~\0{\0\200\0\254"
-  "\0\200\0\250\0\200\0d\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\3\0\201\0k\0\200\0\236\0\177"
-  "\0\231\0\200\0T\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\4\0\200\0&\0\201\0K\0\200\0"
+      "^\0\201\0i\0\200\0l\0~\0a\0\200\0P\0\200\0,\0\200\0\10\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\200\0\4\0\200\0N\0\200\0\226\0\177\0\323\0\200\0\334\0\200\0"
+      "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
+      "\0\334\0\177\0\327\0\200\0\241\0\201\0[\0\216\0\11\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\201\0K\0\200\0\301\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
+      "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
+      "\0\334\0\200\0\334\0\200\0\314\0\201\0c\0\200\0\2\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0U\0\3\0\177\0\207\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
+      "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
+      "\0\334\0\200\0\334\0\200\0\334\0\200\0\243\0q\0\11\0\0\0\0\0\0\0\0\0"
+      "\201\0u\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
+      "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
+      "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\232\0\0\0\0\0\205\0"
+      "\27\0\177\0\327\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
+      "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
+      "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
+      "6\0\200\0D\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
+      "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
+      "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
+      "\201\0i\0}\0""9\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
+      "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
+      "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
+      "\334\0\201\0]\0q\0\11\0\200\0\304\0\200\0\334\0\200\0\334\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
+      "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
+      "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
+      "\200\0\325\0\200\0\34\0\0\0\0\0~\0A\0\177\0\327\0\200\0\334\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
+      "\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200"
+      "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
+      "\200\0`\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0B\0\177\0\313\0\200\0\334\0\200"
+      "\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0"
+      "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\324\0~\0[\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0y\0\23\0\200\0|\0\177\0\323\0\200\0\334\0"
+      "\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334"
+      "\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0"
+      "\330\0\177\0\215\0\200\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\200\0\16\0~\0M\0\200\0\215\0\200\0\271\0\177"
+      "\0\331\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\334\0\200\0\333\0"
+      "\177\0\277\0\200\0\225\0\200\0X\0y\0\25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\26"
+      "\0\200\0,\0\203\0#\0\237\0\10\0\200\0\26\0|\0#\0\203\0%\0\200\0\30\0"
+      "\200\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\22\0\201\0\236\0"
+      "\200\0\315\0\200\0\315\0\200\0\315\0\200\0\277\0\201\0E\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0(\0\200"
+      "\0\307\0\200\0\315\0\200\0\315\0\200\0\315\0\200\0\315\0\200\0v\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0{\0\33\0\201\0Y\0\201\0q\0\201\0g\0\202\0""7\0\0\0\1\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\0\4\0~\0{\0\200\0\254"
+      "\0\200\0\250\0\200\0d\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\0\3\0\201\0k\0\200\0\236\0\177"
+      "\0\231\0\200\0T\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
+
 
- 
 /* GdkPixbuf RGBA C-Source image dump */
 
 #ifdef __SUNPRO_C
 #pragma align 4 (gnome_stock_call_current)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_call_current[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_call_current[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_call_current[] = 
+static const guint8 gnome_stock_call_current[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0-\0\0\0"
-  "/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\12""8\0\205\21c\0\324\22f\0\326\12"
-  "-\0k\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\2\0\11\0:\20U\0\262\26\205\0\362\23r\0\364\24}\0\364\20e\0"
-  "\334\3\30\0J\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0%\20^\0\316\33\241\0\376\32\241\0\377\30\224\0\377\21g\0\364"
-  "\23w\0\375\17S\0\277\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0=\214U*\0\377\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\20\20^\0\301\30\231\0\377\30\231\0\377\27\216\0\377"
-  "\24z\0\377\21b\0\363\17_\0\335\0\13\0-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0<\214Ux:\217U0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15L\0\236\27\220\0\377\27\220\0\377\26\211"
-  "\0\377\23{\0\377\17]\0\356\17_\0\352\3\32\0M\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0""3\231M\12=\215S\\\0\0\0\0<\215Q/<\214Ux\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7+\0j\25\204\0\363\30\224\0\377"
-  "\26\211\0\377\24|\0\377\20Y\0\362\16M\0\265\0\5\0""2\0\0\0\0\0\0\0\0"
-  ":\216TF\0\377\0\1\0\0\0\0<\214T\203\0\0\0\0\0\377\0\1<\215S\245\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0""6\22o\0\332"
-  "\30\227\0\377\26\215\0\377\21h\0\355\12*\0\206\0\0\0\25\0\0\0\0\0\0\0"
-  "\0\0\0\0\0;\215R8>\213UB\0\0\0\0;\214S\201\0\0\0\0\0\0\0\0=\215T\244"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\20"
-  "`\0\305\31\233\0\377\27\220\0\377\24~\0\377\16I\0\250\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0<\216Ts\0\0\0\0;\215TyI\222I\7\0\0\0\0;\215T"
-  "\243\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\13A\0\212\27\214\0\370\30\224\0\377\26\211\0\377\17\\\0\326\0\0\0\26"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0;\215Tt\0\0\0\0;\216Sh;\211X\32\0\0\0"
-  "\0=\215T\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\11\0""9\22n\0\332\30\227\0\377\26\214\0\377\23s\0\363\12;"
-  "\0\201\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0;\215Tt\0\0\0\0<\216Ts3\231M\12"
-  "\0\0\0\0=\215T\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\11\17W\0\270\30\225\0\377\27\220\0\377\25\204\0"
-  "\377\16[\0\330\0\0\0\24\0\0\0\0\0\0\0\0""9\216U\11<\215Sn\0\0\0\0;\214"
-  "S\201\0\0\0\0\0\0\0\0=\215T\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\33\0T\24t\0\343\30\224\0\377\26"
-  "\211\0\377\22s\0\364\13=\0\215\0\0\0\0\0\0\0\0<\214SY>\213U!\0\0\0\0"
-  ";\216T\205\0\0\0\0""9\216U\11<\214T\236\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\16\17Z\0\273\27\221"
-  "\0\377\26\214\0\377\25\202\0\377\20^\0\337\5\35\0""5\0\0\0\0>\213U!\0"
-  "\0\0\0+\200U\6<\215U{\0\0\0\0=\214SG;\216S_\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\31\0R\22o\0"
-  "\341\27\220\0\377\25\205\0\377\23w\0\377\15Q\0\304\0\0\0\12\0\0\0\0\0"
-  "\0\0\0\0\0\0\0@\200@\4\0\0\0\0;\216T\205;\211X\32\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10"
-  "\15H\0\233\25\202\0\364\26\211\0\377\24~\0\377\21g\0\357\12@\0\224\0"
-  "\0\0\5\0\0\0\7\3\25\0J\0\0\0\35\0\0\0\0\0\377\0\1\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\40\20]\0\313\26\211\0\377\25\201\0\377\23w\0\377\20_\0"
-  "\345\11""1\0\210\16U\0\326\23l\0\346\20`\0\315\4\27\0C\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\27\0N\20d\0\334\25\204\0\377\23z\0\377"
-  "\21o\0\377\20a\0\357\21k\0\375\23g\0\366\24|\0\375\17Z\0\313\0\7\0#\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\11(\0l\21j\0\342\24~\0\377"
-  "\22s\0\377\20h\0\377\20b\0\377\20f\0\377\21b\0\365\21m\0\370\13:\0\210"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\11\11<\0\210\22i\0"
-  "\346\23w\0\377\21k\0\377\17a\0\377\17_\0\377\17[\0\373\20d\0\371\16S"
-  "\0\304\0\0\0\14\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15\12"
-  ";\0\206\21f\0\346\21o\0\377\17d\0\377\17_\0\377\17_\0\377\20Z\0\362\17"
-  "U\0\316\0\0\0\32\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\15\12""7\0\202\20`\0\340\20h\0\377\17_\0\377\17\\\0\366\20V\0"
-  "\363\10,\0y\0\0\0\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\12\7)\0k\17Z\0\336\16U\0\324\13""9\0\212\0\6\0(\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\4\3\15\0P\0\0\0+\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0-\0\0\0"
+      "/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\20\12""8\0\205\21c\0\324\22f\0\326\12"
+      "-\0k\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\2\0\11\0:\20U\0\262\26\205\0\362\23r\0\364\24}\0\364\20e\0"
+      "\334\3\30\0J\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0%\20^\0\316\33\241\0\376\32\241\0\377\30\224\0\377\21g\0\364"
+      "\23w\0\375\17S\0\277\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0=\214U*\0\377\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\20\20^\0\301\30\231\0\377\30\231\0\377\27\216\0\377"
+      "\24z\0\377\21b\0\363\17_\0\335\0\13\0-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0<\214Ux:\217U0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15L\0\236\27\220\0\377\27\220\0\377\26\211"
+      "\0\377\23{\0\377\17]\0\356\17_\0\352\3\32\0M\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0""3\231M\12=\215S\\\0\0\0\0<\215Q/<\214Ux\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7+\0j\25\204\0\363\30\224\0\377"
+      "\26\211\0\377\24|\0\377\20Y\0\362\16M\0\265\0\5\0""2\0\0\0\0\0\0\0\0"
+      ":\216TF\0\377\0\1\0\0\0\0<\214T\203\0\0\0\0\0\377\0\1<\215S\245\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0""6\22o\0\332"
+      "\30\227\0\377\26\215\0\377\21h\0\355\12*\0\206\0\0\0\25\0\0\0\0\0\0\0"
+      "\0\0\0\0\0;\215R8>\213UB\0\0\0\0;\214S\201\0\0\0\0\0\0\0\0=\215T\244"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\24\20"
+      "`\0\305\31\233\0\377\27\220\0\377\24~\0\377\16I\0\250\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0<\216Ts\0\0\0\0;\215TyI\222I\7\0\0\0\0;\215T"
+      "\243\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\13A\0\212\27\214\0\370\30\224\0\377\26\211\0\377\17\\\0\326\0\0\0\26"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0;\215Tt\0\0\0\0;\216Sh;\211X\32\0\0\0"
+      "\0=\215T\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\11\0""9\22n\0\332\30\227\0\377\26\214\0\377\23s\0\363\12;"
+      "\0\201\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0;\215Tt\0\0\0\0<\216Ts3\231M\12"
+      "\0\0\0\0=\215T\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\11\17W\0\270\30\225\0\377\27\220\0\377\25\204\0"
+      "\377\16[\0\330\0\0\0\24\0\0\0\0\0\0\0\0""9\216U\11<\215Sn\0\0\0\0;\214"
+      "S\201\0\0\0\0\0\0\0\0=\215T\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\33\0T\24t\0\343\30\224\0\377\26"
+      "\211\0\377\22s\0\364\13=\0\215\0\0\0\0\0\0\0\0<\214SY>\213U!\0\0\0\0"
+      ";\216T\205\0\0\0\0""9\216U\11<\214T\236\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\16\17Z\0\273\27\221"
+      "\0\377\26\214\0\377\25\202\0\377\20^\0\337\5\35\0""5\0\0\0\0>\213U!\0"
+      "\0\0\0+\200U\6<\215U{\0\0\0\0=\214SG;\216S_\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\31\0R\22o\0"
+      "\341\27\220\0\377\25\205\0\377\23w\0\377\15Q\0\304\0\0\0\12\0\0\0\0\0"
+      "\0\0\0\0\0\0\0@\200@\4\0\0\0\0;\216T\205;\211X\32\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10"
+      "\15H\0\233\25\202\0\364\26\211\0\377\24~\0\377\21g\0\357\12@\0\224\0"
+      "\0\0\5\0\0\0\7\3\25\0J\0\0\0\35\0\0\0\0\0\377\0\1\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\40\20]\0\313\26\211\0\377\25\201\0\377\23w\0\377\20_\0"
+      "\345\11""1\0\210\16U\0\326\23l\0\346\20`\0\315\4\27\0C\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\27\0N\20d\0\334\25\204\0\377\23z\0\377"
+      "\21o\0\377\20a\0\357\21k\0\375\23g\0\366\24|\0\375\17Z\0\313\0\7\0#\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\11(\0l\21j\0\342\24~\0\377"
+      "\22s\0\377\20h\0\377\20b\0\377\20f\0\377\21b\0\365\21m\0\370\13:\0\210"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\11\11<\0\210\22i\0"
+      "\346\23w\0\377\21k\0\377\17a\0\377\17_\0\377\17[\0\373\20d\0\371\16S"
+      "\0\304\0\0\0\14\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\15\12"
+      ";\0\206\21f\0\346\21o\0\377\17d\0\377\17_\0\377\17_\0\377\20Z\0\362\17"
+      "U\0\316\0\0\0\32\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\15\12""7\0\202\20`\0\340\20h\0\377\17_\0\377\17\\\0\366\20V\0"
+      "\363\10,\0y\0\0\0\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\12\7)\0k\17Z\0\336\16U\0\324\13""9\0\212\0\6\0(\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\4\3\15\0P\0\0\0+\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 /* GdkPixbuf RGBA C-Source image dump */
 
@@ -873,134 +881,135 @@ static const guint8 gnome_stock_call_current[] =
 #pragma align 4 (gnome_stock_addressbook)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_addressbook[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_addressbook[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_addressbook[] = 
+static const guint8 gnome_stock_addressbook[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0#Q\220n3[\226\3105]\231\3125]\231\3125]\231\312"
-  "5]\231\3125]\231\3125]\231\3125]\231\3125]\231\3125]\231\3125]\231\312"
-  "5]\231\3125]\231\3125]\231\3121[\227\306&Q\213X\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\200\200\200\2\227\241\244bGl\237\367\\\202\263\377"
-  "~\234\301\377~\234\301\377~\234\301\377~\234\301\377~\234\301\377~\234"
-  "\301\377~\234\301\377~\234\301\377~\234\301\377~\234\301\377~\234\301"
-  "\377~\234\301\377~\234\301\377r\223\274\3778a\232\332\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\304\304\261\15\307\312\304\312\276\304\310\377Os\246"
-  "\376\237\263\313\377\334\343\352\377\334\343\352\377\334\343\352\377"
-  "\334\343\352\377\334\343\352\377\334\343\352\377\334\343\352\377\334"
-  "\343\352\377\334\343\352\377\334\343\352\377\334\343\352\377\334\343"
-  "\352\377\333\342\350\377\310\321\332\377=d\234\341\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\331\335\326\301\350\350\345\377f\201\242\264e\211\266"
-  "\375}\235\304\377\202\241\305\377\202\241\305\377\202\241\305\377\202"
-  "\241\305\377\202\241\305\377\202\241\305\377\201\240\305\377\201\240"
-  "\305\377\201\240\305\377\201\240\305\377\201\240\305\377\200\237\304"
-  "\377\177\236\304\377~\235\303\377Z~\257\374(U\2179\1\0\0\0\0\0\0\0\0"
-  "\0\0\0\326\330\324\376\326\330\322\373Dj\237\314\221\265\331\377a\215"
-  "\300\377q\236\316\377r\237\317\377r\237\317\377r\237\317\377r\237\317"
-  "\377r\237\317\377r\237\317\377r\237\317\377r\237\317\377p\235\315\377"
-  "o\234\315\377n\233\314\377l\232\313\377k\231\312\377\217\260\326\377"
-  "7gs\347a\253\32\261Z\251\13D\0\0\0\0\300\303\274\342\323\324\320\377"
-  "\223\241\255\377\247\257\264\377\257\267\272\377Lv\254\377r\237\317\377"
-  "r\237\317\377r\237\317\377r\237\317\377r\237\317\377r\237\317\377q\236"
-  "\316\377o\234\315\377n\233\314\377m\232\313\377k\231\312\377j\230\311"
-  "\377i\227\311\377\216\260\326\377Gw\200\377\257\347w\377q\267.\306\0"
-  "\0\0\0\310\313\305\257\275\277\271\377\305\306\303\377\274\276\274\377"
-  "|\216\237\377_\213\276\377r\237\317\377r\237\317\377r\237\317\377r\237"
-  "\317\377q\236\316\377p\235\315\377o\234\314\377m\232\313\377l\231\313"
-  "\377k\230\312\377j\227\311\377h\226\310\377g\225\307\377\213\255\324"
-  "\377Aut\377\232\342S\377v\2744\306\0\0\0\0\333\335\327\376\333\335\331"
-  "\374Hm\240\313\216\262\331\377n\233\314\377r\237\317\377r\237\317\377"
-  "r\237\317\377r\237\317\377\206\254\325\377\304\326\352\377\350\357\367"
-  "\377\362\366\372\377\344\354\365\377\273\320\346\377x\241\316\377g\225"
-  "\307\377f\224\307\377e\223\306\377\210\253\323\377Buv\377\237\343\\\377"
-  "t\2721\305\0\0\0\0\304\306\300\360\320\321\315\377\202\225\251\376\226"
-  "\247\262\377\230\245\262\377R~\262\377r\237\317\377q\236\316\377\250"
-  "\303\341\377\373\374\376\377\322\340\357\377\242\276\335\377\221\263"
-  "\327\377\237\274\334\377\324\341\357\377\367\371\374\377\217\260\325"
-  "\377d\222\305\377c\221\304\377\206\251\321\377Cux\377\242\343a\377r\271"
-  "-\305\0\0\0\0\274\277\271\234\276\301\273\377\313\314\310\377\307\310"
-  "\305\377\231\242\251\377W\203\267\377p\235\315\377\225\266\332\377\372"
-  "\373\375\377\227\270\332\377k\230\312\377o\232\313\377o\233\312\377g"
-  "\225\307\377f\223\306\377\244\277\335\377\370\372\374\377p\232\311\377"
-  "a\217\303\377\202\247\317\377Dlu\376\241\306A\376{\253\26\305\0\0\0\0"
-  "\337\342\334\375\337\340\333\375Xt\234\331\214\254\315\377p\235\316\377"
-  "o\234\315\377n\233\314\377\343\354\365\377\264\313\344\377j\227\311\377"
-  "\251\303\340\377\374\375\376\377\374\375\376\377\332\345\361\377\366"
-  "\371\374\377b\220\304\377\323\340\356\377\265\312\343\377_\215\301\377"
-  "\200\245\316\377Sn~\377\352\332l\377\347\322[\366\312\244\10C\311\314"
-  "\305\365\320\321\314\376r\213\247\372\214\241\267\377y\220\250\377W\202"
-  "\266\377}\245\320\377\377\377\377\377v\240\316\377z\241\316\377\375\375"
-  "\376\377\260\310\342\377s\234\312\377\340\351\363\377\366\370\373\377"
-  "`\216\303\377\246\300\335\377\323\337\356\377\\\213\300\377}\242\314"
-  "\377Tpw\377\364\342S\377\363\342o\377\311\246\10d\262\264\255\234\306"
-  "\310\302\377\314\315\311\377\314\315\311\377\257\263\263\377Mx\256\377"
-  "\214\257\325\377\367\372\374\377g\225\307\377\222\263\327\377\377\377"
-  "\377\377x\240\315\377b\220\304\377\260\307\341\377\366\370\373\377^\214"
-  "\301\377\245\277\334\377\317\335\354\377Z\211\277\377{\240\313\377To"
-  "z\377\364\345d\377\363\342r\377\311\246\10d\337\341\335\371\333\334\327"
-  "\376h}\231\352\207\242\275\377d\217\300\377i\226\310\377\201\246\321"
-  "\377\375\376\376\377j\227\310\377\203\250\321\377\377\377\377\377\217"
-  "\260\324\377`\216\302\377\310\330\352\377\365\370\373\377b\220\302\377"
-  "\337\350\363\377\246\277\334\377X\207\275\377w\235\311\377To{\377\364"
-  "\346q\377\362\342q\377\311\246\10d\316\320\312\371\316\321\313\376[z"
-  "\241\356\200\236\276\377]}\246\377Y\205\272\377f\224\306\377\361\365"
-  "\372\377\231\267\330\377b\220\303\377\321\337\356\377\366\371\374\377"
-  "\335\347\362\377\363\367\373\377\374\375\376\377\356\363\370\377\317"
-  "\335\354\377_\213\300\377V\205\274\377u\233\310\377Tp\200\377\365\350"
-  "|\377\360\336j\375\311\245\6U\263\266\256\261\314\316\311\377\313\314"
-  "\311\377\316\320\314\377\272\274\270\377Cm\245\377c\221\305\377\250\301"
-  "\336\377\356\363\371\377r\233\311\377a\217\302\377\220\257\324\377\221"
-  "\260\324\377{\241\314\377\230\265\327\377{\240\313\377W\205\274\377U"
-  "\204\273\377T\203\272\377r\231\306\377Xez\375\343\235N\367\347\240R\364"
-  "\333z\36\254\336\341\334\362\320\323\316\377z\213\235\366\206\233\260"
-  "\377[\201\254\377`\216\303\377a\217\303\377a\217\302\377\311\331\352"
-  "\377\360\364\371\377\233\270\330\377i\223\305\377^\213\300\377w\235\311"
-  "\377\271\315\343\377\305\325\350\377U\204\273\377S\202\272\377R\201\271"
-  "\377p\226\305\377_jw\377\371\260C\377\374\272Y\377\345\224E\326\320\322"
-  "\315\372\317\320\313\374Jn\235\340t\232\306\377Jr\243\377Z\207\274\377"
-  "_\215\302\377^\214\301\377^\213\300\377\235\271\331\377\347\356\366\377"
-  "\377\377\377\377\377\377\377\377\375\376\376\377\324\340\356\377~\242"
-  "\313\377S\202\271\377Q\200\270\377P\177\267\377l\223\302\377^iv\377\371"
-  "\261G\377\374\267S\377\344\221@\326\267\273\263\306\322\323\317\377\275"
-  "\300\277\377\306\310\304\377\300\300\275\377\77j\241\377]\213\300\377"
-  "\\\212\277\377Z\211\277\377Y\210\276\377X\207\275\377g\220\302\377p\227"
-  "\306\377_\213\276\377S\202\271\377R\201\270\377P\177\267\377O~\267\377"
-  "N}\266\377j\221\301\377^jy\377\372\271Y\377\374\273\\\377\343\216=\325"
-  "\333\335\331\336\306\307\304\377\231\243\251\375\226\243\256\377Zz\236"
-  "\377[\211\275\377`\216\302\377_\215\302\377_\214\301\377]\213\300\377"
-  "\\\212\277\377[\212\277\377Z\210\276\377Y\207\276\377X\206\275\377W\206"
-  "\274\377V\205\273\377U\203\272\377T\202\272\377m\225\304\377^l}\377\372"
-  "\276g\377\374\300f\377\342\2147\324\323\326\321\375\322\324\317\373="
-  "g\235\303w\237\314\377N{\261\377a\220\303\377d\222\305\377c\221\305\377"
-  "b\221\304\377b\220\304\377a\217\303\377a\217\303\377_\216\302\377_\215"
-  "\302\377^\215\301\377]\214\301\377]\214\301\377\\\212\300\377[\212\277"
-  "\377s\233\311\377P]u\361\341\2105\314\342\2101\314\331r\23\206\273\275"
-  "\270\326\323\325\321\377\247\260\265\374\266\272\270\377\272\276\274"
-  "\377Fp\247\377i\227\311\377i\226\311\377h\226\311\377h\225\310\377h\225"
-  "\310\377g\225\310\377g\224\310\377f\224\307\377f\223\307\377e\223\307"
-  "\377e\223\306\377e\222\306\377d\222\306\377z\241\316\377%O\210\273\0"
-  "\0\0\3\0\0\0\0\0\0\0\0\221\230\221%\251\254\246\343\266\270\270\377\255"
-  "\263\264\377l\203\234\377c\221\303\377q\236\317\377q\236\317\377q\236"
-  "\316\377q\236\316\377q\236\316\377p\236\316\377p\236\316\377p\236\316"
-  "\377p\235\316\377p\235\316\377p\235\316\377p\235\316\377o\235\316\377"
-  "\177\247\322\377\"H\177\273\0\0\0\36\0\0\0\1\0\0\0\0\0\0\0\1\0\0\0\34"
-  "\30""0R`Qy\253\351e\214\273\364e\214\272\364e\213\272\364e\213\272\364"
-  "e\213\272\364d\213\272\364d\213\272\364c\212\271\364c\212\271\364b\212"
-  "\271\364b\212\271\364a\211\271\364a\211\270\364a\210\270\364`\210\270"
-  "\364Fo\242\344\21\37;J\0\0\0\32\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0#Q\220n3[\226\3105]\231\3125]\231\3125]\231\312"
+      "5]\231\3125]\231\3125]\231\3125]\231\3125]\231\3125]\231\3125]\231\312"
+      "5]\231\3125]\231\3125]\231\3121[\227\306&Q\213X\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\200\200\200\2\227\241\244bGl\237\367\\\202\263\377"
+      "~\234\301\377~\234\301\377~\234\301\377~\234\301\377~\234\301\377~\234"
+      "\301\377~\234\301\377~\234\301\377~\234\301\377~\234\301\377~\234\301"
+      "\377~\234\301\377~\234\301\377r\223\274\3778a\232\332\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\304\304\261\15\307\312\304\312\276\304\310\377Os\246"
+      "\376\237\263\313\377\334\343\352\377\334\343\352\377\334\343\352\377"
+      "\334\343\352\377\334\343\352\377\334\343\352\377\334\343\352\377\334"
+      "\343\352\377\334\343\352\377\334\343\352\377\334\343\352\377\334\343"
+      "\352\377\333\342\350\377\310\321\332\377=d\234\341\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\331\335\326\301\350\350\345\377f\201\242\264e\211\266"
+      "\375}\235\304\377\202\241\305\377\202\241\305\377\202\241\305\377\202"
+      "\241\305\377\202\241\305\377\202\241\305\377\201\240\305\377\201\240"
+      "\305\377\201\240\305\377\201\240\305\377\201\240\305\377\200\237\304"
+      "\377\177\236\304\377~\235\303\377Z~\257\374(U\2179\1\0\0\0\0\0\0\0\0"
+      "\0\0\0\326\330\324\376\326\330\322\373Dj\237\314\221\265\331\377a\215"
+      "\300\377q\236\316\377r\237\317\377r\237\317\377r\237\317\377r\237\317"
+      "\377r\237\317\377r\237\317\377r\237\317\377r\237\317\377p\235\315\377"
+      "o\234\315\377n\233\314\377l\232\313\377k\231\312\377\217\260\326\377"
+      "7gs\347a\253\32\261Z\251\13D\0\0\0\0\300\303\274\342\323\324\320\377"
+      "\223\241\255\377\247\257\264\377\257\267\272\377Lv\254\377r\237\317\377"
+      "r\237\317\377r\237\317\377r\237\317\377r\237\317\377r\237\317\377q\236"
+      "\316\377o\234\315\377n\233\314\377m\232\313\377k\231\312\377j\230\311"
+      "\377i\227\311\377\216\260\326\377Gw\200\377\257\347w\377q\267.\306\0"
+      "\0\0\0\310\313\305\257\275\277\271\377\305\306\303\377\274\276\274\377"
+      "|\216\237\377_\213\276\377r\237\317\377r\237\317\377r\237\317\377r\237"
+      "\317\377q\236\316\377p\235\315\377o\234\314\377m\232\313\377l\231\313"
+      "\377k\230\312\377j\227\311\377h\226\310\377g\225\307\377\213\255\324"
+      "\377Aut\377\232\342S\377v\2744\306\0\0\0\0\333\335\327\376\333\335\331"
+      "\374Hm\240\313\216\262\331\377n\233\314\377r\237\317\377r\237\317\377"
+      "r\237\317\377r\237\317\377\206\254\325\377\304\326\352\377\350\357\367"
+      "\377\362\366\372\377\344\354\365\377\273\320\346\377x\241\316\377g\225"
+      "\307\377f\224\307\377e\223\306\377\210\253\323\377Buv\377\237\343\\\377"
+      "t\2721\305\0\0\0\0\304\306\300\360\320\321\315\377\202\225\251\376\226"
+      "\247\262\377\230\245\262\377R~\262\377r\237\317\377q\236\316\377\250"
+      "\303\341\377\373\374\376\377\322\340\357\377\242\276\335\377\221\263"
+      "\327\377\237\274\334\377\324\341\357\377\367\371\374\377\217\260\325"
+      "\377d\222\305\377c\221\304\377\206\251\321\377Cux\377\242\343a\377r\271"
+      "-\305\0\0\0\0\274\277\271\234\276\301\273\377\313\314\310\377\307\310"
+      "\305\377\231\242\251\377W\203\267\377p\235\315\377\225\266\332\377\372"
+      "\373\375\377\227\270\332\377k\230\312\377o\232\313\377o\233\312\377g"
+      "\225\307\377f\223\306\377\244\277\335\377\370\372\374\377p\232\311\377"
+      "a\217\303\377\202\247\317\377Dlu\376\241\306A\376{\253\26\305\0\0\0\0"
+      "\337\342\334\375\337\340\333\375Xt\234\331\214\254\315\377p\235\316\377"
+      "o\234\315\377n\233\314\377\343\354\365\377\264\313\344\377j\227\311\377"
+      "\251\303\340\377\374\375\376\377\374\375\376\377\332\345\361\377\366"
+      "\371\374\377b\220\304\377\323\340\356\377\265\312\343\377_\215\301\377"
+      "\200\245\316\377Sn~\377\352\332l\377\347\322[\366\312\244\10C\311\314"
+      "\305\365\320\321\314\376r\213\247\372\214\241\267\377y\220\250\377W\202"
+      "\266\377}\245\320\377\377\377\377\377v\240\316\377z\241\316\377\375\375"
+      "\376\377\260\310\342\377s\234\312\377\340\351\363\377\366\370\373\377"
+      "`\216\303\377\246\300\335\377\323\337\356\377\\\213\300\377}\242\314"
+      "\377Tpw\377\364\342S\377\363\342o\377\311\246\10d\262\264\255\234\306"
+      "\310\302\377\314\315\311\377\314\315\311\377\257\263\263\377Mx\256\377"
+      "\214\257\325\377\367\372\374\377g\225\307\377\222\263\327\377\377\377"
+      "\377\377x\240\315\377b\220\304\377\260\307\341\377\366\370\373\377^\214"
+      "\301\377\245\277\334\377\317\335\354\377Z\211\277\377{\240\313\377To"
+      "z\377\364\345d\377\363\342r\377\311\246\10d\337\341\335\371\333\334\327"
+      "\376h}\231\352\207\242\275\377d\217\300\377i\226\310\377\201\246\321"
+      "\377\375\376\376\377j\227\310\377\203\250\321\377\377\377\377\377\217"
+      "\260\324\377`\216\302\377\310\330\352\377\365\370\373\377b\220\302\377"
+      "\337\350\363\377\246\277\334\377X\207\275\377w\235\311\377To{\377\364"
+      "\346q\377\362\342q\377\311\246\10d\316\320\312\371\316\321\313\376[z"
+      "\241\356\200\236\276\377]}\246\377Y\205\272\377f\224\306\377\361\365"
+      "\372\377\231\267\330\377b\220\303\377\321\337\356\377\366\371\374\377"
+      "\335\347\362\377\363\367\373\377\374\375\376\377\356\363\370\377\317"
+      "\335\354\377_\213\300\377V\205\274\377u\233\310\377Tp\200\377\365\350"
+      "|\377\360\336j\375\311\245\6U\263\266\256\261\314\316\311\377\313\314"
+      "\311\377\316\320\314\377\272\274\270\377Cm\245\377c\221\305\377\250\301"
+      "\336\377\356\363\371\377r\233\311\377a\217\302\377\220\257\324\377\221"
+      "\260\324\377{\241\314\377\230\265\327\377{\240\313\377W\205\274\377U"
+      "\204\273\377T\203\272\377r\231\306\377Xez\375\343\235N\367\347\240R\364"
+      "\333z\36\254\336\341\334\362\320\323\316\377z\213\235\366\206\233\260"
+      "\377[\201\254\377`\216\303\377a\217\303\377a\217\302\377\311\331\352"
+      "\377\360\364\371\377\233\270\330\377i\223\305\377^\213\300\377w\235\311"
+      "\377\271\315\343\377\305\325\350\377U\204\273\377S\202\272\377R\201\271"
+      "\377p\226\305\377_jw\377\371\260C\377\374\272Y\377\345\224E\326\320\322"
+      "\315\372\317\320\313\374Jn\235\340t\232\306\377Jr\243\377Z\207\274\377"
+      "_\215\302\377^\214\301\377^\213\300\377\235\271\331\377\347\356\366\377"
+      "\377\377\377\377\377\377\377\377\375\376\376\377\324\340\356\377~\242"
+      "\313\377S\202\271\377Q\200\270\377P\177\267\377l\223\302\377^iv\377\371"
+      "\261G\377\374\267S\377\344\221@\326\267\273\263\306\322\323\317\377\275"
+      "\300\277\377\306\310\304\377\300\300\275\377\77j\241\377]\213\300\377"
+      "\\\212\277\377Z\211\277\377Y\210\276\377X\207\275\377g\220\302\377p\227"
+      "\306\377_\213\276\377S\202\271\377R\201\270\377P\177\267\377O~\267\377"
+      "N}\266\377j\221\301\377^jy\377\372\271Y\377\374\273\\\377\343\216=\325"
+      "\333\335\331\336\306\307\304\377\231\243\251\375\226\243\256\377Zz\236"
+      "\377[\211\275\377`\216\302\377_\215\302\377_\214\301\377]\213\300\377"
+      "\\\212\277\377[\212\277\377Z\210\276\377Y\207\276\377X\206\275\377W\206"
+      "\274\377V\205\273\377U\203\272\377T\202\272\377m\225\304\377^l}\377\372"
+      "\276g\377\374\300f\377\342\2147\324\323\326\321\375\322\324\317\373="
+      "g\235\303w\237\314\377N{\261\377a\220\303\377d\222\305\377c\221\305\377"
+      "b\221\304\377b\220\304\377a\217\303\377a\217\303\377_\216\302\377_\215"
+      "\302\377^\215\301\377]\214\301\377]\214\301\377\\\212\300\377[\212\277"
+      "\377s\233\311\377P]u\361\341\2105\314\342\2101\314\331r\23\206\273\275"
+      "\270\326\323\325\321\377\247\260\265\374\266\272\270\377\272\276\274"
+      "\377Fp\247\377i\227\311\377i\226\311\377h\226\311\377h\225\310\377h\225"
+      "\310\377g\225\310\377g\224\310\377f\224\307\377f\223\307\377e\223\307"
+      "\377e\223\306\377e\222\306\377d\222\306\377z\241\316\377%O\210\273\0"
+      "\0\0\3\0\0\0\0\0\0\0\0\221\230\221%\251\254\246\343\266\270\270\377\255"
+      "\263\264\377l\203\234\377c\221\303\377q\236\317\377q\236\317\377q\236"
+      "\316\377q\236\316\377q\236\316\377p\236\316\377p\236\316\377p\236\316"
+      "\377p\235\316\377p\235\316\377p\235\316\377p\235\316\377o\235\316\377"
+      "\177\247\322\377\"H\177\273\0\0\0\36\0\0\0\1\0\0\0\0\0\0\0\1\0\0\0\34"
+      "\30""0R`Qy\253\351e\214\273\364e\214\272\364e\213\272\364e\213\272\364"
+      "e\213\272\364d\213\272\364d\213\272\364c\212\271\364c\212\271\364b\212"
+      "\271\364b\212\271\364a\211\271\364a\211\270\364a\210\270\364`\210\270"
+      "\364Fo\242\344\21\37;J\0\0\0\32\0\0\0\0\0\0\0\0"
+    };
 
 /* GdkPixbuf RGBA C-Source image dump */
 
@@ -1008,109 +1017,110 @@ static const guint8 gnome_stock_addressbook[] =
 #pragma align 4 (gnome_stock_calls)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_calls[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_calls[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_calls[] = 
+static const guint8 gnome_stock_calls[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\0\2\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\22\11.\0p\20^\0\311\12\77\0\202\0\0\0\13\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34q\34\11\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3"
-  "\4\14\0>\15Z\0\275\23p\0\365\24w\0\361\24v\0\353\11<\0\210\0\0\0\4\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\377\377\377\3\377\377\370#\377\377\370H\224\267"
-  "\207\206\377\377\366U\377\377\3655\377\377\355\16\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\31\0e\22s\0\344\32\241\0\376\31\234\0"
-  "\377\24y\0\367\22p\0\364\21c\0\335\4\21\0;\0\0\0\0\0\0\0\0\377\377\346"
-  "\12\377\377\365P\377\377\360{\375\375\360\225\261\312\242\272\375\375"
-  "\357\234\375\375\360\211\377\377\365h\377\377\370&\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\5\36\0]\24}\0\352\31\234\0\377\31\227\0\377\26"
-  "\210\0\377\21c\0\363\22o\0\375\14E\0\233\0\0\0\0t\242t\13\275\323\263"
-  "h\375\375\360\212\376\376\353\267\376\376\350\326\301\325\254\352\376"
-  "\376\347\340\376\376\352\307\375\375\355\240\360\364\345t\206\260}7\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\21o\0\333\30\225\0\377\27\221"
-  "\0\377\24\203\0\377\22i\0\375\20d\0\364\15Q\0\300\0\0\0\2\377\377\370"
-  "&\277\324\261\223\262\313\243\313\357\365\331\335\376\376\354\262\346"
-  "\356\330\244\375\375\354\245\374\374\351\306\314\335\272\331\256\311"
-  "\240\263\344\354\327_\377\377\377\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!\20"
-  "g\0\313\31\230\0\377\27\216\0\377\25\203\0\377\22o\0\377\17W\0\365\13"
-  "A\0\244\0\0\0\4\377\377\365N\375\375\360\227\372\373\343\332\315\335"
-  "\276\275\377\377\362z\377\377\366Y\377\377\365f\336\347\321\240\346\356"
-  "\322\326\376\376\353\264\377\377\362r\377\377\377\22\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\5\16U\0\261\30\226\0\377\27\221\0\377\25\205\0\377\17"
-  "Y\0\347\7(\0r\0\0\0\26\377\377\377\1\377\377\364_\375\375\354\243\376"
-  "\376\347\337\375\375\356\232\377\377\366V\377\377\377\30\377\377\372"
-  "8\377\377\360{\376\376\352\300\376\376\352\303\377\377\361}\377\377\366"
-  "\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7-\0l\25\203\0\361\30\225\0\377\26"
-  "\212\0\377\21^\0\330\0\0\0!\0\0\0\0\377\377\377\1\377\377\364[\375\375"
-  "\355\240\376\376\350\344\347\356\326\250\377\377\364a\377\377\3724\377"
-  "\377\370I\351\360\335\211\367\372\345\306\376\376\352\276\377\377\362"
-  "z\377\377\377\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0""3\23m\0\330\31"
-  "\230\0\377\27\216\0\377\22q\0\361\7""1\0n\0\0\0\0\0\0\0\0\377\377\367"
-  "=\347\356\333\223\270\320\246\331\321\340\277\314\375\375\357\222\377"
-  "\377\362x\375\375\361\202\356\363\335\257\276\323\253\351\311\333\272"
-  "\270\377\377\363i\377\377\377\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\11\17W\0\265\30\226\0\377\27\221\0\377\25\204\0\377\17V\0\314\0\0"
-  "\0\11\0\0\0\0\272\316\261\32\246\303\234\215\371\372\350\245\376\376"
-  "\350\324\376\376\351\315\270\317\247\316\376\376\352\303\376\376\347"
-  "\340\376\376\353\273\324\342\306\224\236\277\224_\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\36\0\\\25{\0\351\30\225\0\377\26\212\0"
-  "\377\21k\0\354\10/\0b\0\0\0\0\0\0\0\0\377\377\364.\377\377\362s\375\375"
-  "\357\234\376\376\352\271\273\320\251\325\376\376\352\301\376\376\355"
-  "\253\375\375\360\207\377\377\366U\377\377\377\7\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\20a\0\313\30\226\0\377\27\215\0\377"
-  "\24\202\0\377\17V\0\317\0\0\0\13\0\0\0\0\0\0\0\0\377\377\370#\377\377"
-  "\364^\377\377\362w\245\302\231\242\377\377\361}\377\377\363k\377\377"
-  "\367@\377\377\377\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\7,\0m\25|\0\354\27\221\0\377\25\206\0\377\21l\0\360\13"
-  "=\0\206\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\4\377\377\363\26\230\274"
-  "\2179\377\377\366\35\377\377\377\13\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\31\20_\0\312\30"
-  "\221\0\377\26\212\0\377\24\177\0\377\17\\\0\336\5\31\0""3\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\40"
-  "\0Y\22n\0\341\27\215\0\377\25\203\0\377\23s\0\376\15P\0\305\0\0\0\21"
-  "\0\0\0\0\0\0\0\7\0\0\0\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\10\15G\0\232\24\177\0\363\25\206\0\377\23{\0\377\22i\0\364\15"
-  "H\0\256\7\25\0I\16U\0\267\21b\0\323\12""1\0i\0\0\0\3\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\40\17[\0\310\26\204\0\376\24\177\0\377\22"
-  "t\0\377\17`\0\357\20`\0\352\23m\0\367\26\202\0\364\22k\0\337\6#\0X\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\14\0>\20`\0\324\25\177\0"
-  "\377\23w\0\377\21m\0\377\21j\0\377\24w\0\377\23t\0\370\24\201\0\374\17"
-  "]\0\311\0\0\0\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\35\0Y"
-  "\20c\0\334\22z\0\377\22p\0\377\20e\0\377\21j\0\377\24y\0\377\21g\0\364"
-  "\22l\0\347\6\34\0R\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\3\5$\0b\20`\0\334\22s\0\377\20i\0\377\17_\0\377\22l\0\377\22i\0\363"
-  "\22q\0\377\12;\0z\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\3\5\40\0a\17^\0\331\21j\0\377\17b\0\377\17_\0\377\22b\0\365\17"
-  "Z\0\336\3\30\0V\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\3\3\26\0R\17X\0\320\20_\0\366\16W\0\327\13C\0\235\0\6\0"
-  "+\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\11\0<\13""5\0\213\0\5\0""0\0\0\0\2\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34\0\0\0\2\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\22\11.\0p\20^\0\311\12\77\0\202\0\0\0\13\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34q\34\11\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3"
+      "\4\14\0>\15Z\0\275\23p\0\365\24w\0\361\24v\0\353\11<\0\210\0\0\0\4\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\377\377\377\3\377\377\370#\377\377\370H\224\267"
+      "\207\206\377\377\366U\377\377\3655\377\377\355\16\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\31\0e\22s\0\344\32\241\0\376\31\234\0"
+      "\377\24y\0\367\22p\0\364\21c\0\335\4\21\0;\0\0\0\0\0\0\0\0\377\377\346"
+      "\12\377\377\365P\377\377\360{\375\375\360\225\261\312\242\272\375\375"
+      "\357\234\375\375\360\211\377\377\365h\377\377\370&\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\5\36\0]\24}\0\352\31\234\0\377\31\227\0\377\26"
+      "\210\0\377\21c\0\363\22o\0\375\14E\0\233\0\0\0\0t\242t\13\275\323\263"
+      "h\375\375\360\212\376\376\353\267\376\376\350\326\301\325\254\352\376"
+      "\376\347\340\376\376\352\307\375\375\355\240\360\364\345t\206\260}7\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\21o\0\333\30\225\0\377\27\221"
+      "\0\377\24\203\0\377\22i\0\375\20d\0\364\15Q\0\300\0\0\0\2\377\377\370"
+      "&\277\324\261\223\262\313\243\313\357\365\331\335\376\376\354\262\346"
+      "\356\330\244\375\375\354\245\374\374\351\306\314\335\272\331\256\311"
+      "\240\263\344\354\327_\377\377\377\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!\20"
+      "g\0\313\31\230\0\377\27\216\0\377\25\203\0\377\22o\0\377\17W\0\365\13"
+      "A\0\244\0\0\0\4\377\377\365N\375\375\360\227\372\373\343\332\315\335"
+      "\276\275\377\377\362z\377\377\366Y\377\377\365f\336\347\321\240\346\356"
+      "\322\326\376\376\353\264\377\377\362r\377\377\377\22\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\5\16U\0\261\30\226\0\377\27\221\0\377\25\205\0\377\17"
+      "Y\0\347\7(\0r\0\0\0\26\377\377\377\1\377\377\364_\375\375\354\243\376"
+      "\376\347\337\375\375\356\232\377\377\366V\377\377\377\30\377\377\372"
+      "8\377\377\360{\376\376\352\300\376\376\352\303\377\377\361}\377\377\366"
+      "\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7-\0l\25\203\0\361\30\225\0\377\26"
+      "\212\0\377\21^\0\330\0\0\0!\0\0\0\0\377\377\377\1\377\377\364[\375\375"
+      "\355\240\376\376\350\344\347\356\326\250\377\377\364a\377\377\3724\377"
+      "\377\370I\351\360\335\211\367\372\345\306\376\376\352\276\377\377\362"
+      "z\377\377\377\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0""3\23m\0\330\31"
+      "\230\0\377\27\216\0\377\22q\0\361\7""1\0n\0\0\0\0\0\0\0\0\377\377\367"
+      "=\347\356\333\223\270\320\246\331\321\340\277\314\375\375\357\222\377"
+      "\377\362x\375\375\361\202\356\363\335\257\276\323\253\351\311\333\272"
+      "\270\377\377\363i\377\377\377\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\11\17W\0\265\30\226\0\377\27\221\0\377\25\204\0\377\17V\0\314\0\0"
+      "\0\11\0\0\0\0\272\316\261\32\246\303\234\215\371\372\350\245\376\376"
+      "\350\324\376\376\351\315\270\317\247\316\376\376\352\303\376\376\347"
+      "\340\376\376\353\273\324\342\306\224\236\277\224_\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\36\0\\\25{\0\351\30\225\0\377\26\212\0"
+      "\377\21k\0\354\10/\0b\0\0\0\0\0\0\0\0\377\377\364.\377\377\362s\375\375"
+      "\357\234\376\376\352\271\273\320\251\325\376\376\352\301\376\376\355"
+      "\253\375\375\360\207\377\377\366U\377\377\377\7\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\32\20a\0\313\30\226\0\377\27\215\0\377"
+      "\24\202\0\377\17V\0\317\0\0\0\13\0\0\0\0\0\0\0\0\377\377\370#\377\377"
+      "\364^\377\377\362w\245\302\231\242\377\377\361}\377\377\363k\377\377"
+      "\367@\377\377\377\7\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\7,\0m\25|\0\354\27\221\0\377\25\206\0\377\21l\0\360\13"
+      "=\0\206\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\4\377\377\363\26\230\274"
+      "\2179\377\377\366\35\377\377\377\13\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\31\20_\0\312\30"
+      "\221\0\377\26\212\0\377\24\177\0\377\17\\\0\336\5\31\0""3\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\40"
+      "\0Y\22n\0\341\27\215\0\377\25\203\0\377\23s\0\376\15P\0\305\0\0\0\21"
+      "\0\0\0\0\0\0\0\7\0\0\0\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\10\15G\0\232\24\177\0\363\25\206\0\377\23{\0\377\22i\0\364\15"
+      "H\0\256\7\25\0I\16U\0\267\21b\0\323\12""1\0i\0\0\0\3\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\40\17[\0\310\26\204\0\376\24\177\0\377\22"
+      "t\0\377\17`\0\357\20`\0\352\23m\0\367\26\202\0\364\22k\0\337\6#\0X\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\14\0>\20`\0\324\25\177\0"
+      "\377\23w\0\377\21m\0\377\21j\0\377\24w\0\377\23t\0\370\24\201\0\374\17"
+      "]\0\311\0\0\0\27\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\35\0Y"
+      "\20c\0\334\22z\0\377\22p\0\377\20e\0\377\21j\0\377\24y\0\377\21g\0\364"
+      "\22l\0\347\6\34\0R\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\3\5$\0b\20`\0\334\22s\0\377\20i\0\377\17_\0\377\22l\0\377\22i\0\363"
+      "\22q\0\377\12;\0z\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\3\5\40\0a\17^\0\331\21j\0\377\17b\0\377\17_\0\377\22b\0\365\17"
+      "Z\0\336\3\30\0V\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\3\3\26\0R\17X\0\320\20_\0\366\16W\0\327\13C\0\235\0\6\0"
+      "+\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\11\0<\13""5\0\213\0\5\0""0\0\0\0\2\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 
 
@@ -1120,528 +1130,529 @@ static const guint8 gnome_stock_calls[] =
 #pragma align 4 (gnome_stock_sflphone)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_sflphone[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_sflphone[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_sflphone[] = 
+static const guint8 gnome_stock_sflphone[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (14400) */
-  "\0\0""8X"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (240) */
-  "\0\0\0\360"
-  /* width (60) */
-  "\0\0\0<"
-  /* height (60) */
-  "\0\0\0<"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0++\6\0&+5\0$*[\0%+"
-  "\203\0%+\240\0%+\254\0%,\273\0%,\273\0%+\263\0$+\250\0%,\222\0%,n\0$"
-  "+G\0''\32\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0$,#\0$+x\0%,\273\0%+\365\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
-  "\377\0%+\330\0%*\227\0%,K\0""33\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0++\6\0%*a\0%,\301\0"
-  "%+\376\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377\26""8=\377+JO\3774QV\377"
-  ">Z_\377>Z_\3778UZ\3771OT\377\40@F\377\12.3\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\351\0%+\217\0$,#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\34""9\11\0%*m\0%+\342\0%+\377\0%+\377\0%+\377"
-  "\6*0\377.LQ\377Unr\377|\217\222\377\226\245\250\377\221\241\244\377~"
-  "\221\224\377r\206\211\377k\200\203\377g}\200\377q\205\210\377x\213\216"
-  "\377\206\230\232\377\231\250\252\377\213\234\237\377g}\201\377@\\`\377"
-  "\25""7<\377\0%+\377\0%+\377\0%+\377\0%+\374\0%+\245\0%,)\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0&*I\0%+\333\0%+\377\0%+\377\0%+\377$DI\377]ux\377\217"
-  "\237\242\377y\214\220\377Rko\377.MQ\377\25""7<\377\7+1\377\10,2\377\10"
-  ",2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\14/5\377!BG\377A"
-  "]a\377g}\200\377\217\237\242\377w\213\216\377\77[_\377\7+1\377\0%+\377"
-  "\0%+\377\0%+\373\0%+\217\0''\15\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40""0\20\0&*\251\0%+\377\0%+\377\0%+\377"
-  ",KP\377u\211\214\377\207\230\233\377Lfj\377\33<A\377\11-2\377\11-2\377"
-  "\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2"
-  "\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377\12-3\3776TX\377"
-  "k\200\203\377\215\236\240\377Mgk\377\14/5\377\0%+\377\0%+\377\0%+\346"
-  "\0$,F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',4\0%+\336\0%"
-  "+\377\0%+\377\26""8=\377o\204\207\377\203\225\230\377<Y]\377\13/4\377"
-  "\11-2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2"
-  "\377\10,2\377\10,2\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377"
-  "\7+1\377\7+1\377\7+1\377\7+1\377\6*0\377\37\77D\377cz}\377\214\235\237"
-  "\377=Y^\377\1&,\377\0%+\377\0%+\375\0&+\210\0@@\4\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0&,W\0%+\371\0%+\377\1&,\377Fae\377\215\236\240\377Hcg\377\13/4"
-  "\377\11-2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10"
-  ",2\377\10,2\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1"
-  "\377\7+1\377\7+1\377\7+1\377\7+1\377\6*0\377\6*0\377\6*0\377\6*0\377"
-  "\6*0\377#CI\377z\214\220\377u\211\214\377\23""5;\377\0%+\377\0%+\377"
-  "\0%+\271\0++\14\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0&+k\0%+\375\0%+\377\14/5\377j\200\203\377t\210"
-  "\213\377\31:@\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377"
-  "\10,2\377\10,2\377\10,2\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377"
-  "\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377\6*0\377\6*0\377\6*0\377\6*0"
-  "\377\6*0\377\6*0\377\6*0\377\6*0\377\6*0\377\7+1\377Gbf\377\212\233\236"
-  "\377/MR\377\0%+\377\0%+\377\0%+\312\0$1\25\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$,i\0%+\377\0%+\377\22""4:\377~\221"
-  "\224\377Tmq\377\12.3\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377"
-  "\10,2\377\10,2\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377\7"
-  "+1\377\6*0\377\6*0\377\6*0\377\5)/\377\5)/\377\5)/\377\6*0\377\6*0\377"
-  "\6*0\377\6*0\377\6*0\377\6*0\377\6*0\377\5)/\377\5)/\377\5)/\377\5)/"
-  "\377%DI\377\204\226\231\377@\\`\377\0%+\377\0%+\377\0$+\322\0\"3\17\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%+Z\0%+\374\0%+\377\27""9"
-  ">\377\203\225\230\377@[`\377\10,2\377\10,2\377\10,2\377\10,2\377\10,"
-  "2\377\10,2\377\31:\77\377\12.4\377\7+1\377\7+1\377\7+1\377\7+1\377\5"
-  ")/\377\3(-\377\2'-\377\1&,\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\2'-\377\3(-\377\4(.\377\5)/\377\5)/\377\5)/"
-  "\377\5)/\377\5)/\377\5)/\377\5)/\377\25""7<\377|\217\222\377Jdi\377\0"
-  "%+\377\0%+\377\0&+\276\0\32""3\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&+5\0%"
-  "+\371\0%+\377\20""38\377\201\223\226\3775RV\377\10,2\377\10,2\377\10"
-  ",2\377\10,2\377\10,2\377\12.4\377\203\224\226\377\351\353\353\377\225"
-  "\242\245\377\7+1\377\5)/\377\2'-\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
-  "\377\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377\4(.\377\5)/\377\5)/\377"
-  "\5)/\377\5)/\377\4(.\377\15""05\377t\210\213\377D_d\377\0%+\377\0%+\377"
-  "\0%,\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40""0\20\0%+\337\0%+\377\10,2\377x\214"
-  "\217\377>Y^\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377'FK\377\312"
-  "\317\321\377\360\360\360\377\360\360\360\377\355\355\356\377Ump\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%,\377\0KX\377\0FR\377"
-  "\0%+\377\0FQ\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
-  "\377\0%+\377\0%+\377\0%+\377\1&,\377\3(-\377\4(.\377\4(.\377\4(.\377"
-  "\4(.\377\17""17\377}\220\223\3773QU\377\0%+\377\0%+\377\0&+d\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0&,\252\0%+\377\0%+\377`w{\377Hcg\377\7+1\377\10,2\377\10,2\377"
-  "\7+1\377\7+1\377\32;@\377\341\343\343\377\360\360\360\377\357\357\357"
-  "\377\357\357\357\377\356\356\356\377\341\343\344\377#BG\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0""19\377\0o\202\377\0o\202\377\0%+\377"
-  "\0o\202\377\0Ve\377\0:D\377\0%+\377\0""6>\377\0&,\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\1&,\377\3(-\377\4(.\377\4(."
-  "\377\4(.\377\30""9>\377\200\222\225\377\26""8=\377\0%+\377\0%+\365\0"
-  "&-(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "&*I\0%+\377\0%+\3779VZ\377j\200\203\377\10,2\377\10,2\377\7+1\377\7+"
-  "1\377\7+1\377fz}\377fvy\377\244\254\255\377\357\357\357\377\356\356\356"
-  "\377\356\356\356\377\355\355\355\377\354\354\354\377\305\313\314\377"
-  "\6*0\377\0;D\377\0.6\377\0%+\377\0gy\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0%+\377\0o\202\377\0fx\377\0o\202\377\0%+\377\0o\202\377\0Ra\377"
-  "\0\77J\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
-  "%+\377\2'-\377\4(.\377\3(-\377\3(-\377+JO\377v\212\215\377\4(.\377\0"
-  "%+\377\0$+\275\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\40\40\10\0%+\333\0%+\377\15""06\377|\217\222\377\21""39\377\7+1"
-  "\377\7+1\377\7+1\377\7+1\377Jch\377\352\353\353\377\347\350\350\3779"
-  "LP\377\314\317\320\377\355\355\355\377\355\355\355\377\354\354\354\377"
-  "\354\354\354\377\353\353\353\377\225\243\245\377\0Yi\377\0\77J\377\0"
-  "2:\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0%+\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0%+\377\0o\202\377\0Yi\377\0o\202\377\0]m\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\1&,"
-  "\377\3(-\377\3(-\377\3(-\377Qjo\377E`d\377\0%+\377\0%+\377\0%+Y\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%*m\0%+\377\0%+\377[sw\377"
-  "7TY\377\7+1\377\7+1\377\7+1\377\7+1\377\6',\377\317\324\324\377\357\357"
-  "\357\377\356\356\356\377\322\325\325\3774HK\377\342\343\343\377\354\354"
-  "\354\377\353\353\353\377\353\353\353\377\352\352\352\377\351\351\351"
-  "\377V\223\236\377\0DP\377\0n\200\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0o\202\377\0%+\377\0n\200\377\0o\202\377\0o\202\377\0%+\377\0o\202\377"
-  "\0Ve\377\0o\202\377\0o\202\377\0)0\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\3(-\377\3(-\377\11-3\377y\214"
-  "\220\377\21""49\377\0%+\377\0%+\335\0@@\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0++\6\0%+\342\0%+\377\27""9>\377m\202\206\377\6*0\377\7+1\377\7"
-  "+1\377\7+1\377\7).\377I[^\377\356\356\356\377\356\356\356\377\355\355"
-  "\355\377\354\354\354\377\254\263\264\377[jl\377\352\352\352\377\352\352"
-  "\352\377\352\352\352\377\351\351\351\377\350\350\350\377\321\330\331"
-  "\377\33mz\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0%+\377\0j{\377\0o\202\377\0o\202\377\0%+\377\0o\202\377\0Uc\377\0o"
-  "\202\377\0o\202\377\0bs\377\0+2\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377\2'-\377/MR\377Wos\377"
-  "\0%+\377\0%+\377\0$,]\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%*a\0%+\377\0"
-  "%+\377[sw\377'FK\377\7+1\377\7+1\377\7+1\377\6*0\377\5\40%\377\221\232"
-  "\233\377\355\355\355\377\355\355\355\377\354\354\354\377\354\354\354"
-  "\377\353\353\353\377w\203\205\377\223\234\236\377\351\351\351\377\351"
-  "\351\351\377\350\350\350\377\342\342\342\377\337\337\337\377\255\302"
-  "\306\377\4q\203\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0%+\377"
-  "\0fw\377\0o\202\377\0o\202\377\0%+\377\0o\202\377\0Uc\377\0o\202\377"
-  "\0o\202\377\0i{\377\0j}\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377\2'-\377o\204\207\377\20"
-  "38\377\0%+\377\0%+\325\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%+\302\0%+\377"
-  "\21""49\377l\201\205\377\5)/\377\7+1\377\6*0\377\6*0\377\6).\377\4\34"
-  "!\377\255\264\265\377\354\354\354\377\354\354\354\377\353\353\353\377"
-  "\353\353\353\377\352\352\352\377\346\346\347\377FWZ\377\277\304\304\377"
-  "\350\350\350\377\344\344\344\377\337\337\337\377\337\337\337\377\337"
-  "\337\337\377r\250\262\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0%+\377\0aq\377\0o\202\377\0o\202\377\0%+\377\0o\202\377\0Xh\377\0o"
-  "\202\377\0o\202\377\0n\201\377\0o\202\377\0""2:\377\0%+\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377"
-  "/MR\377Pin\377\0%+\377\0%+\377\0$-9\0\0\0\0\0\0\0\0\0&-\"\0%+\376\0%"
-  "+\377E`d\3776SX\377\6*0\377\6*0\377\6*0\377\6*0\377\5%+\377\1\32\37\377"
-  "\271\276\277\377\353\353\353\377\353\353\353\377\352\352\352\377\352"
-  "\352\352\377\351\351\351\377\350\350\350\377\325\327\327\3778KN\377\330"
-  "\332\332\377\340\340\340\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\326\332\333\377\16v\210\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0'.\377\0\\l\377\0o\202\377\0o\202\377\0&-\377\0o\202\377\0Yi\377\0"
-  "o\202\377\0o\202\377\0n\201\377\0o\202\377\0LY\377\0-4\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\1&,\377"
-  "\3(.\377u\211\214\377\3(-\377\0%+\377\0&+\225\0\0\0\0\0\0\0\0\0&*y\0"
-  "%+\377\1&,\377s\207\213\377\12-3\377\6*0\377\6*0\377\6*0\377\6*0\377"
-  "\3\"'\377\0\31\35\377\252\261\261\377\352\352\352\377\352\352\352\377"
-  "\351\351\351\377\351\351\351\377\350\350\350\377\350\350\350\377\347"
-  "\347\347\377\265\272\273\377FWZ\377\336\336\336\377\337\337\337\377\337"
-  "\337\337\377\334\335\336\377N\226\243\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0o\202\377\0*0\377\0Tc\377\0o\202\377\0m\177\377\0+2\377\0o\202"
-  "\377\0Yi\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0n\201\377\0"
-  "BM\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\1&,\377Nhl\377,KP\377\0%+\377\0%+\352\0\0\0\2\0\0\0"
-  "\0\0%+\272\0%+\377\32;A\377_vz\377\5)/\377\6*0\377\6*0\377\6*0\377\5"
-  ")/\377\0\37$\377\0\31\35\377\226\237\240\377\351\351\351\377\351\351"
-  "\351\377\350\350\350\377\350\350\350\377\347\347\347\377\347\347\347"
-  "\377\346\346\346\377\345\345\345\377z\205\206\377x\204\205\377\337\337"
-  "\337\377\312\321\322\3779\206\224\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0,4\377\0P]\377\0o\202\377\0i{\377\0""08\377\0"
-  "o\202\377\0Yi\377\0o\202\377\0o\202\377\0o\201\377\0o\202\377\0n\201"
-  "\377\0\77J\377\0O]\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\40@F\377Zrv\377\0%+\377\0%+\377\0&+"
-  "/\0++\6\0%+\365\0%+\377>Z_\377<X]\377\6*0\377\6*0\377\5)/\377\5)/\377"
-  "\2'-\377\0\40&\377\0\40%\377{\213\215\377\350\350\350\377\350\350\350"
-  "\377\347\347\347\377\347\347\347\377\346\346\346\377\346\346\346\377"
-  "\345\345\345\377\342\342\342\377\336\336\336\377J[]\377o\202\205\377"
-  "\25n}\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0""07\377\0JW\377\0o\202\377\0fw\377\0""4=\377\0o\202\377\0Yi\377"
-  "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0AL\377\0o\202"
-  "\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\2'-\377v\212\215\377\0%+\377\0%+\377\0&+r\0&+5\0%+\377"
-  "\0%+\377`w{\377\31;@\377\5)/\377\5)/\377\5)/\377\4(.\377\0%+\377\0^m"
-  "\377\0KX\377=fn\377\350\350\350\377\347\347\347\377\346\346\346\377\346"
-  "\346\346\377\345\345\345\377\345\345\345\377\344\344\344\377\340\340"
-  "\340\377\337\337\337\377Xhk\377\0""6>\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0j}\377\0Tb\377\0o\202"
-  "\377\0fw\377\0""9B\377\0o\202\377\0[j\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0o\202\377\0o\202\377\0DP\377\0o\202\377\0Xg\377\0)0\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377by|\377"
-  "\26""8=\377\0%+\377\0&,\252\0$*[\0%+\377\0%+\377u\211\214\377\5*/\377"
-  "\5)/\377\5)/\377\5)/\377\2'-\377\0%+\377\0fx\377\0KX\377\4AL\377\332"
-  "\334\334\377\346\346\346\377\345\345\345\377\345\345\345\377\344\344"
-  "\344\377\344\344\344\377\343\343\343\377\337\337\337\377\337\337\337"
-  "\377\34;A\377\0;D\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o"
-  "\202\377\0o\202\377\0o\202\377\0o\202\377\0du\377\0o\202\377\0fw\377"
-  "\0>H\377\0o\202\377\0^m\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0o\202\377\0KW\377\0o\202\377\0o\202\377\0ar\377\0""08\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377Hcg\377/MR\377"
-  "\0%+\377\0%+\321\0%+\204\0%+\377\6*0\377q\206\211\377\4(.\377\5)/\377"
-  "\5)/\377\5.4\377\0%,\377\0AL\377\0n\201\377\0MZ\377\0DO\377\244\263\266"
-  "\377\345\345\345\377\344\344\344\377\344\344\344\377\343\343\343\377"
-  "\343\343\343\377\341\341\341\377\337\337\337\377\337\337\337\377B\\`"
-  "\377\0;D\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0"
-  "o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0fw\377\0BN\377"
-  "\0o\202\377\0^m\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0P\\\377\0m\177\377\0o\202\377\0o\202\377\0N\\\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\3774QV\377C^c\377\0%+\377"
-  "\0%+\367\0$+\241\0%+\377\26""8=\377_vz\377\4(.\377\5)/\377\5)/\377\3"
-  "hy\377\0""2:\377\0dv\377\0o\202\377\0Ud\377\0KX\377Ku|\377\344\344\344"
-  "\377\344\344\344\377\343\343\343\377\342\342\342\377\342\342\342\377"
-  "\340\340\340\377\337\337\337\377\337\337\337\377\203\235\241\377\0;D"
-  "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0fw\377\0GS\377\0o\202\377"
-  "\0^m\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0Xh\377"
-  "\0h{\377\0o\202\377\0o\202\377\0o\202\377\0""5>\377\0%+\377\0%+\377\0"
-  "%+\377\0EQ\377\0%+\377\0%+\377\0%+\377\"BG\377Unr\377\0%+\377\0%+\377"
-  "\0%+\255\0%+\377\40@F\377Vor\377\4(.\377\4(.\377\4_n\377\1p\202\377\0"
-  "MZ\377\0fx\377\0o\202\377\0_p\377\0KX\377\2LY\377\307\321\322\377\343"
-  "\343\343\377\342\342\342\377\341\341\341\377\341\341\341\377\337\337"
-  "\337\377\337\337\337\377\337\337\337\377\331\334\335\377\40U^\377\0o"
-  "\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0o\202\377\0o\202\377\0o\202\377\0hz\377\0LY\377\0o\202\377\0^m"
-  "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0`p\377\0"
-  "du\377\0o\202\377\0o\202\377\0o\202\377\0fx\377\0DP\377\0DP\377\0%+\377"
-  "\0o\202\377\0%+\377\0%+\377\0%+\377\27""9>\377]ux\377\0%+\377\0%+\377"
-  "\0%+\272\0%+\377&EK\377Nhl\377\4(.\377\4""07\377\4q\204\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0o\202\377\0l\177\377\0MZ\377\0KX\377f\217\226"
-  "\377\342\342\342\377\341\341\341\377\341\341\341\377\340\340\340\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\242"
-  "\300\306\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0"
-  "o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0l~\377\0P^\377"
-  "\0o\202\377\0^n\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0hz\377\0]m\377\0o\202\377\0o\202\377\0o\202\377\0m\200\377\0Wf"
-  "\377\0o\202\377\0Xh\377\0o\202\377\0%+\377\0%+\377\0%+\377\21""49\377"
-  "dz~\377\0%+\377\0%+\377\0%,\301\0%+\377'FK\377Lfj\377\4""6>\377\4q\204"
-  "\377\3q\203\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0Yi\377\0KX\377\13R_\377\316\324\326\377\340\340\340\377\340\340\340"
-  "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377Y\234\247\377\0o\202\377\0o\202\377\0"
-  "o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0o\202\377\0P^\377\0o\202\377\0bs\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0o\202\377\0o\202\377\0o\201\377\0]m\377\0o\202\377\0o\202\377\0"
-  "n\201\377\0o\202\377\0Zj\377\0o\202\377\0o\202\377\0o\202\377\0[j\377"
-  "\0_o\377\0%,\377\20""38\377e{\177\377\0%+\377\0%+\377\0%+\264\0%+\377"
-  "\"BG\377Qjn\377\4+2\377\4q\204\377\2p\203\377\0o\202\377\0o\202\377\0"
-  "o\202\377\0o\202\377\0o\202\377\0i{\377\0KX\377\0KX\377Y\206\216\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\326\332"
-  "\333\377%\202\222\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o"
-  "\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0Tc\377\0o\202\377"
-  "\0bs\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
-  "\377\0]l\377\0o\202\377\0o\202\377\0j}\377\0o\202\377\0Yi\377\0j|\377"
-  "\0fw\377\0o\202\377\0o\202\377\0P]\377\0.6\377\25""7<\377_vz\377\0%+"
-  "\377\0%+\377\0%+\245\0%+\377\33<A\377Wos\377\3(-\377\3""4<\377\1o\201"
-  "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0We\377\0KX\377\3MZ\377\266\304\306\377\337\337\337\377\337\337\337"
-  "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\270\307\311\377\10s\205\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0"
-  "o\202\377\0Tc\377\0o\202\377\0bs\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0o\202\377\0^m\377\0o\202\377\0o\202\377\0j}\377"
-  "\0o\202\377\0KX\377\0j}\377\0ev\377\0o\202\377\0HT\377\0%+\377\0%+\377"
-  "\33<A\377Wos\377\0%+\377\0%+\377\0$+\224\0%+\377\16""17\377e{\177\377"
-  "\2'-\377\3(-\377\1+3\377\0o\202\377\0^m\377\0o\202\377\0o\202\377\0o"
-  "\202\377\0o\202\377\0j|\377\0LY\377\0KX\3779q{\377\337\337\337\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\210\264\273"
-  "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0Xh\377\0o\202\377\0du\377\0o\202\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0^n\377\0o\202\377\0o\202"
-  "\377\0`q\377\0o\202\377\0""7A\377\0n\201\377\0o\202\377\0<F\377\0""0"
-  "8\377\0%+\377\0%+\377(GL\377Jdi\377\0%+\377\0%+\377\0%*m\0%+\377\0%+"
-  "\377q\206\211\377\2'-\377\3(-\377\1&,\377\0KX\377\0N[\377\0&,\377\0o"
-  "\202\377\0o\202\377\0o\202\377\0o\202\377\0[k\377\0KX\377\0KX\377\213"
-  "\247\254\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
-  "\377\337\337\337\377[\235\250\377\0o\202\377\0o\202\377\0o\202\377\0"
-  "o\202\377\0o\202\377\0o\202\377\0o\202\377\0Yh\377\0o\202\377\0gy\377"
-  "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0"
-  "bs\377\0o\202\377\0o\202\377\0Tc\377\0o\202\377\0.5\377\0HT\377\0]m\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377=Y^\3775RW\377\0%+\377\0%+\342\0#+H\0"
-  "%+\377\0%+\377g}\201\377\13/4\377\3(-\377\1&,\377\0*0\377\0*0\377\0%"
-  "+\377\0o\202\377\0o\202\377\0o\202\377\0""7@\377\0Ra\377\0N\\\377\0K"
-  "X\377\13R_\377\303\314\316\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
-  "\377\337\337\337\377\332\335\335\3774\211\227\377\0o\202\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0]m\377\0n\200\377\0l\177"
-  "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0du\377\0""9C\377\0"
-  "^o\377\0o\202\377\0o\202\377\0""6\77\377\0o\202\377\0/7\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377Pin\377!AF\377\0%+\377\0$+\275"
-  "\0))\31\0%+\377\0%+\377Hcg\377(GL\377\2'-\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0.6\377\0o\202\377\0o\202\377\0%+\377\0%+\377\0du\377\0KX\377"
-  "\0KX\3774nx\377\333\334\335\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
-  "\377\337\337\337\377\313\325\327\377\32|\215\377\0o\202\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0o\202\377\0[j\377\0m\200\3770\207\226\377\255"
-  "\306\312\377v\252\263\377\0o\202\377\0o\202\377\0%+\377\0%+\377\0^m\377"
-  "\0o\202\377\0o\202\377\0%+\377\0'-\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377j\200\203\377\6*0\377\0%+\377\0%+\217\0\0\0\0"
-  "\0%+\330\0%+\377'FK\377Hcg\377\2'-\377\1&,\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0o\202\377\0o\202\377\0%+\377\0%+\377\0o\202\377\0Yh\377\0K"
-  "X\377\0KX\377c\215\224\377\337\337\337\377\337\337\337\377\337\337\337"
-  "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\300\320\322\377\27{\214\377\0o\202\377"
-  "\0o\202\377\0o\202\377\0o\202\377\1[i\377k\245\256\377\334\335\336\377"
-  "\337\337\337\377\337\337\337\377U\232\246\377\0o\202\377\0%+\377\0%+"
-  "\377\0\\k\377\0o\202\377\0""3<\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\16""17\377ax|\377\0%+\377\0%+\377\0$+"
-  "M\0\0\0\0\0%*\227\0%+\377\7+1\377h~\201\377\1&,\377\1&,\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0EQ\377\0_n\377\0%+\377\0%+\377\0FS\377\0m\177"
-  "\377\0Q^\377\0KX\377\1LY\377\225\250\253\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
-  "\377\337\337\337\377\337\337\337\377\337\337\337\377\272\314\317\377"
-  "!\177\220\377\0o\202\377\0o\202\377\0o\202\377\212\250\255\377\337\337"
-  "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\327\333\334"
-  "\377,\205\225\377\0%+\377\0%+\377\0]l\377\0j|\377\0/6\377\0%+\377\0%"
-  "+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\3773QU\377=Y^\377\0"
-  "%+\377\0%+\374\0\"3\17\0\0\0\0\0%,K\0%+\377\0%+\377Rko\377\34=B\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0Zh\377\0i{\377\0MZ\377\0KX\377\13#'\377\270\274\275\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
-  "\377\332\335\335\377|\255\266\377L\225\241\377N\213\225\377p\215\222"
-  "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\303\321\323\377\21""39\377\0%+\377\0LY\377\0""8A\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
-  "\377^uy\377\17""27\377\0%+\377\0%+\277\0\0\0\0\0\0\0\0\0@@\4\0%+\351"
-  "\0%+\377%EJ\377Ich\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0o\202\377\0bs\377\0KX\377\0"
-  "\31\35\377\33""15\377\315\317\320\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377Ty\200\377\241\266\272\377\337\337\337\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\241\253"
-  "\255\377\2'-\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
-  "\377\0%+\377\0%+\377\0%+\377\21""49\377]ux\377\0%+\377\0%+\377\0$,c\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0%+\217\0%+\377\1&,\377dz~\377\12.3\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
-  "\377\0""7@\377\0Yh\377\1IV\377\5\35!\377\7\37#\3776IL\377\331\332\332"
-  "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\326\331\331\3777oy\377\305"
-  "\316\317\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377i}\200\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377Hcg\377&EK\377\0%+\377"
-  "\0%+\366\0$$\16\0\0\0\0\0\0\0\0\0\0\0\0\0#+$\0%+\373\0%+\377/MR\377A"
-  "]a\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\1&,\377\4(.\377\6>G\377\5R`\377\13&+\377\14#'\377\16%)\377O"
-  "_a\377\334\334\335\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\275\310"
-  "\312\377<s|\377\332\334\334\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377\333\334\334\377/LQ\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\15""06\377ax|\377\1&,\377\0"
-  "%+\377\0%+\226\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%+\245\0%+\377"
-  "\2'-\377f|\200\377\21""49\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\3(-\377\7+1\377\14/5\377\17""27\377\22""4:\377\26""7"
-  "<\377\22+.\377\22),\377\24*-\377^kn\377\336\336\336\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377\225\256\262\377_\212\221\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\301"
-  "\306\306\377\15""06\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377Pin\377)HM\377\0%+\377\0%+\372\0!)\37\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0$+*\0%+\373\0%+\377%EJ\377Vor\377\0%+\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\1&,\377\5)/\377\12.3\377\16""17\377\22""4:\377"
-  "\26""8=\377\31:@\377\34=B\377\37>D\377\31""04\377\31/2\377\32/3\377^"
-  "ln\377\332\332\332\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377_\212\221"
-  "\377\224\255\262\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\221\236\240\377\2'-\377\0%+\377\0%+"
-  "\377\0%+\377\0%+\377\0%+\377\37@E\377[sw\377\1&,\377\0%+\377\0%+\231"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%+\217\0%+"
-  "\377\0%+\377Tmq\3770NS\377\0%+\377\0%+\377\0%+\377\2'-\377\7+1\377\14"
-  "/5\377\20""38\377\25""7<\377\31:@\377\34=B\377\40@F\377$DI\377'FK\377"
-  "(FK\377\37""69\377\40""48\377!58\377P_b\377\322\324\324\377\337\337\337"
-  "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
-  "\337\337\377\332\334\334\3777oy\377\276\305\307\377\337\337\337\377\337"
-  "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377A[_\377\4"
-  "(.\377\0%+\377\0%+\377\0%+\377\10,2\377g}\201\377\24""6<\377\0%+\377"
-  "\0%+\355\0$1\25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0$$\16\0%+\344\0%+\377\13.4\377i\177\202\377\26""8=\377\0%+\377\2"
-  "'-\377\7+1\377\14/5\377\21""49\377\26""8=\377\33<A\377\37@E\377#CH\377"
-  "'FK\377*IN\377.LQ\3771OT\3772NS\377(=A\377&:=\377':=\377>PR\377\265\274"
-  "\275\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
-  "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\302\311\312\377HXZ\377\327\330\330\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\241\254\255\377\22""4"
-  "9\377\12.3\377\5)/\377\0%+\377\1&,\377Tmq\3776SX\377\0%+\377\0%+\377"
-  "\0$,i\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0#+H\0%+\376\0%+\377\37@E\377h~\201\377\20""38\377\7+1\377\15"
-  "06\377\22""4:\377\27""9>\377\34=B\377!AF\377%EJ\377*IN\377.LQ\3771OT"
-  "\3774QV\3778UZ\377;W\\\377=X]\3770FI\377,\77B\377-@C\377/BE\377u\227"
-  "\234\377\332\334\334\377\337\337\337\377\337\337\337\377\337\337\337"
-  "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\234\243\245\377cps\377\337\337\337\377"
-  "\337\337\337\377\227\241\243\377\40@F\377\25""7<\377\20""38\377\12.3"
-  "\377\5)/\377\77[_\377Tmq\377\1&,\377\0%+\377\0%+\270\0\0\0\2\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0$,\206\0%+\377\0%+\3771OT\377e{\177\377\23""5;\377\22""4:\377\30"
-  ":\77\377\35>C\377\"BG\377'FK\377,KP\3770NS\3774QV\3779VZ\377<X]\377\77"
-  "[_\377B]b\377D_d\377Gbf\377=SW\3772DH\3773EG\3773EI\377\40`k\377\237"
-  "\264\270\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
-  "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
-  "\377\337\337\337\377my{\377\207\221\222\377l{}\377%DI\377\40@F\377\33"
-  "<A\377\26""8=\377\20""38\3779VZ\377cz}\377\7+1\377\0%+\377\0%+\345\0"
-  "#.\26\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\3\0$+\275\0%+\377\0%+\377<X]\377g}\201"
-  "\377\"BG\377\36\77D\377#CH\377(GL\377-KP\3772PU\3777TY\377;W\\\377\77"
-  "[_\377C^c\377Fae\377Ich\377Lfj\377Nhl\377Pin\377Kbf\377<NQ\3778IL\377"
-  "4IM\377\0KX\377Xfh\377\216\251\256\377\327\330\330\377\337\337\337\377"
-  "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
-  "\337\337\377\234\243\244\377*AE\377/LQ\377*IN\377%EJ\377\40@F\377\33"
-  "<A\377D_d\377g}\201\377\12.3\377\0%+\377\0%+\365\0%*7\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\32""3\12\0%+\310\0%+\377\0%+\3779VZ\377p\205\210"
-  "\3772PU\377)HM\377.LQ\3773QU\3778UZ\377=Y^\377A]a\377Fae\377Ich\377M"
-  "gk\377Pin\377Slp\377Vor\377Wos\377Yqu\377Zrv\377Ocg\377ART\3770MS\377"
-  "=MP\377<LO\377\77PR\377fsu\377\204\215\217\377\227\236\237\377\222\232"
-  "\233\377\200\214\216\377Rhk\3778QU\377:W[\3775RW\3770NS\377+JO\377'F"
-  "K\377Vor\377e{\177\377\14/5\377\0%+\377\0%+\374\0$+N\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$1\25\0%+\321\0%+\377\0%+\377-"
-  "KP\377w\213\216\377Nhl\3774QV\3779VZ\377>Z_\377C^c\377Gbf\377Lfj\377"
-  "Pin\377Tmq\377Wos\377[sw\377]ux\377_vz\377`w{\377by|\377by|\377ax{\377"
-  "Vjl\377I[^\377BQT\377@OR\377>NQ\377<MO\377:KM\3778IL\377\77TW\377Ich"
-  "\377E`d\377@\\`\377;W\\\3776SX\3779VZ\377k\200\204\377[sw\377\7+1\377"
-  "\0%+\377\0%+\374\0$,b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\40""0\20\0%+\300\0%+\377\0%+\377\27""9>\377l\201"
-  "\205\377k\200\204\377Fae\377C^c\377Ich\377Mgk\377Rko\377Vor\377[sw\377"
-  "^uy\377ax|\377dz~\377f|\200\377h~\201\377j\200\203\377j\200\203\377j"
-  "\200\203\377j\200\203\377i\177\202\377e{~\377\\pt\377Wkn\377Thl\377S"
-  "il\377Wnr\377Tmq\377Pin\377Kei\377Fae\377B]b\377Yqu\377y\214\220\377"
-  "<X]\377\2'-\377\0%+\377\0%+\366\0$*O\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\10\0%,\244"
-  "\0%+\377\0%+\377\7+1\377E`d\377~\221\224\377j\200\203\377Qjn\377Tmq\377"
-  "Xpt\377]ux\377ax|\377e{\177\377i\177\202\377k\200\204\377n\203\206\377"
-  "o\204\207\377q\206\211\377r\206\212\377r\206\212\377q\206\211\377p\205"
-  "\210\377o\204\207\377m\202\206\377j\200\203\377f|\200\377cz}\377_vz\377"
-  "[sw\377Vor\377Qjn\377[sw\377y\214\220\377i\177\202\377\34=B\377\0%+\377"
-  "\0%+\377\0%+\344\0#,:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&+e\0%"
-  "+\365\0%+\377\0%+\377\26""8=\377]ux\377\203\225\230\377v\212\215\377"
-  "dz~\377cz}\377h~\201\377l\201\205\377o\204\207\377s\207\213\377u\211"
-  "\214\377w\213\216\377y\214\220\377y\214\220\377y\214\220\377y\214\220"
-  "\377x\214\217\377v\212\215\377t\210\213\377q\206\211\377n\203\206\377"
-  "j\200\203\377e{\177\377ax|\377k\200\204\377\177\222\225\377y\214\220"
-  "\3774QV\377\2'-\377\0%+\377\0%+\377\0%+\271\0$1\25\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&-(\0$+\275\0%+\377\0%+\377\0"
-  "%+\377\31:@\377Vor\377\205\227\232\377\210\231\234\377\200\222\225\377"
-  "w\213\216\377v\212\215\377y\214\220\377}\220\223\377~\221\224\377\200"
-  "\222\225\377\201\223\226\377\201\223\226\377\201\223\226\377\177\222"
-  "\225\377~\221\224\377{\216\221\377x\214\217\377u\211\214\377|\217\222"
-  "\377\206\230\232\377\210\231\234\377q\206\211\3773QU\377\5)/\377\0%+"
-  "\377\0%+\377\0&+\356\0%,h\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&+X\0%+\336\0%+\377\0%"
-  "+\377\0%+\377\12.3\3771OT\377cz}\377\210\231\234\377\217\237\242\377"
-  "\225\244\247\377\230\247\251\377\225\244\247\377\223\243\245\377\222"
-  "\242\244\377\221\241\244\377\223\243\245\377\224\244\246\377\226\245"
-  "\250\377\227\246\251\377\221\241\244\377\216\236\241\377v\212\215\377"
-  "Gbf\377\32;A\377\1&,\377\0%+\377\0%+\377\0%+\372\0$+\233\0&&\24\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@@\4\0$,]\0%+\324\0%+\377\0%+\377\0%"
-  "+\377\0%+\377\4(.\377\35>C\3772PU\377Hcg\377ax|\377o\204\207\377y\214"
-  "\220\377{\216\221\377r\206\212\377j\200\203\377Vor\377:W[\377(GL\377"
-  "\16""17\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\366\0%+\226\0((\40\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0$-9\0$+\224\0%+\352\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
-  "\0%+\377\0%+\377\0%+\374\0%+\300\0$,b\0\"3\17\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\2\0&+/\0$+q\0%+\253\0%+\321\0%+\367\0%+\377\0"
-  "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\343\0%+\274\0%+\217"
-  "\0$+M\0\"3\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (14400) */
+      "\0\0""8X"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (240) */
+      "\0\0\0\360"
+      /* width (60) */
+      "\0\0\0<"
+      /* height (60) */
+      "\0\0\0<"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0++\6\0&+5\0$*[\0%+"
+      "\203\0%+\240\0%+\254\0%,\273\0%,\273\0%+\263\0$+\250\0%,\222\0%,n\0$"
+      "+G\0''\32\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0$,#\0$+x\0%,\273\0%+\365\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
+      "\377\0%+\330\0%*\227\0%,K\0""33\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0++\6\0%*a\0%,\301\0"
+      "%+\376\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377\26""8=\377+JO\3774QV\377"
+      ">Z_\377>Z_\3778UZ\3771OT\377\40@F\377\12.3\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\351\0%+\217\0$,#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\34""9\11\0%*m\0%+\342\0%+\377\0%+\377\0%+\377"
+      "\6*0\377.LQ\377Unr\377|\217\222\377\226\245\250\377\221\241\244\377~"
+      "\221\224\377r\206\211\377k\200\203\377g}\200\377q\205\210\377x\213\216"
+      "\377\206\230\232\377\231\250\252\377\213\234\237\377g}\201\377@\\`\377"
+      "\25""7<\377\0%+\377\0%+\377\0%+\377\0%+\374\0%+\245\0%,)\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0&*I\0%+\333\0%+\377\0%+\377\0%+\377$DI\377]ux\377\217"
+      "\237\242\377y\214\220\377Rko\377.MQ\377\25""7<\377\7+1\377\10,2\377\10"
+      ",2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\14/5\377!BG\377A"
+      "]a\377g}\200\377\217\237\242\377w\213\216\377\77[_\377\7+1\377\0%+\377"
+      "\0%+\377\0%+\373\0%+\217\0''\15\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40""0\20\0&*\251\0%+\377\0%+\377\0%+\377"
+      ",KP\377u\211\214\377\207\230\233\377Lfj\377\33<A\377\11-2\377\11-2\377"
+      "\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2"
+      "\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377\12-3\3776TX\377"
+      "k\200\203\377\215\236\240\377Mgk\377\14/5\377\0%+\377\0%+\377\0%+\346"
+      "\0$,F\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',4\0%+\336\0%"
+      "+\377\0%+\377\26""8=\377o\204\207\377\203\225\230\377<Y]\377\13/4\377"
+      "\11-2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2"
+      "\377\10,2\377\10,2\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377"
+      "\7+1\377\7+1\377\7+1\377\7+1\377\6*0\377\37\77D\377cz}\377\214\235\237"
+      "\377=Y^\377\1&,\377\0%+\377\0%+\375\0&+\210\0@@\4\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0&,W\0%+\371\0%+\377\1&,\377Fae\377\215\236\240\377Hcg\377\13/4"
+      "\377\11-2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10"
+      ",2\377\10,2\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1"
+      "\377\7+1\377\7+1\377\7+1\377\7+1\377\6*0\377\6*0\377\6*0\377\6*0\377"
+      "\6*0\377#CI\377z\214\220\377u\211\214\377\23""5;\377\0%+\377\0%+\377"
+      "\0%+\271\0++\14\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0&+k\0%+\375\0%+\377\14/5\377j\200\203\377t\210"
+      "\213\377\31:@\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377"
+      "\10,2\377\10,2\377\10,2\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377"
+      "\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377\6*0\377\6*0\377\6*0\377\6*0"
+      "\377\6*0\377\6*0\377\6*0\377\6*0\377\6*0\377\7+1\377Gbf\377\212\233\236"
+      "\377/MR\377\0%+\377\0%+\377\0%+\312\0$1\25\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$,i\0%+\377\0%+\377\22""4:\377~\221"
+      "\224\377Tmq\377\12.3\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377"
+      "\10,2\377\10,2\377\10,2\377\7+1\377\7+1\377\7+1\377\7+1\377\7+1\377\7"
+      "+1\377\6*0\377\6*0\377\6*0\377\5)/\377\5)/\377\5)/\377\6*0\377\6*0\377"
+      "\6*0\377\6*0\377\6*0\377\6*0\377\6*0\377\5)/\377\5)/\377\5)/\377\5)/"
+      "\377%DI\377\204\226\231\377@\\`\377\0%+\377\0%+\377\0$+\322\0\"3\17\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%+Z\0%+\374\0%+\377\27""9"
+      ">\377\203\225\230\377@[`\377\10,2\377\10,2\377\10,2\377\10,2\377\10,"
+      "2\377\10,2\377\31:\77\377\12.4\377\7+1\377\7+1\377\7+1\377\7+1\377\5"
+      ")/\377\3(-\377\2'-\377\1&,\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\2'-\377\3(-\377\4(.\377\5)/\377\5)/\377\5)/"
+      "\377\5)/\377\5)/\377\5)/\377\5)/\377\25""7<\377|\217\222\377Jdi\377\0"
+      "%+\377\0%+\377\0&+\276\0\32""3\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&+5\0%"
+      "+\371\0%+\377\20""38\377\201\223\226\3775RV\377\10,2\377\10,2\377\10"
+      ",2\377\10,2\377\10,2\377\12.4\377\203\224\226\377\351\353\353\377\225"
+      "\242\245\377\7+1\377\5)/\377\2'-\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
+      "\377\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377\4(.\377\5)/\377\5)/\377"
+      "\5)/\377\5)/\377\4(.\377\15""05\377t\210\213\377D_d\377\0%+\377\0%+\377"
+      "\0%,\244\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40""0\20\0%+\337\0%+\377\10,2\377x\214"
+      "\217\377>Y^\377\10,2\377\10,2\377\10,2\377\10,2\377\10,2\377'FK\377\312"
+      "\317\321\377\360\360\360\377\360\360\360\377\355\355\356\377Ump\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%,\377\0KX\377\0FR\377"
+      "\0%+\377\0FQ\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
+      "\377\0%+\377\0%+\377\0%+\377\1&,\377\3(-\377\4(.\377\4(.\377\4(.\377"
+      "\4(.\377\17""17\377}\220\223\3773QU\377\0%+\377\0%+\377\0&+d\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0&,\252\0%+\377\0%+\377`w{\377Hcg\377\7+1\377\10,2\377\10,2\377"
+      "\7+1\377\7+1\377\32;@\377\341\343\343\377\360\360\360\377\357\357\357"
+      "\377\357\357\357\377\356\356\356\377\341\343\344\377#BG\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0""19\377\0o\202\377\0o\202\377\0%+\377"
+      "\0o\202\377\0Ve\377\0:D\377\0%+\377\0""6>\377\0&,\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\1&,\377\3(-\377\4(.\377\4(."
+      "\377\4(.\377\30""9>\377\200\222\225\377\26""8=\377\0%+\377\0%+\365\0"
+      "&-(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "&*I\0%+\377\0%+\3779VZ\377j\200\203\377\10,2\377\10,2\377\7+1\377\7+"
+      "1\377\7+1\377fz}\377fvy\377\244\254\255\377\357\357\357\377\356\356\356"
+      "\377\356\356\356\377\355\355\355\377\354\354\354\377\305\313\314\377"
+      "\6*0\377\0;D\377\0.6\377\0%+\377\0gy\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0%+\377\0o\202\377\0fx\377\0o\202\377\0%+\377\0o\202\377\0Ra\377"
+      "\0\77J\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
+      "%+\377\2'-\377\4(.\377\3(-\377\3(-\377+JO\377v\212\215\377\4(.\377\0"
+      "%+\377\0$+\275\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\40\40\10\0%+\333\0%+\377\15""06\377|\217\222\377\21""39\377\7+1"
+      "\377\7+1\377\7+1\377\7+1\377Jch\377\352\353\353\377\347\350\350\3779"
+      "LP\377\314\317\320\377\355\355\355\377\355\355\355\377\354\354\354\377"
+      "\354\354\354\377\353\353\353\377\225\243\245\377\0Yi\377\0\77J\377\0"
+      "2:\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0%+\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0%+\377\0o\202\377\0Yi\377\0o\202\377\0]m\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\1&,"
+      "\377\3(-\377\3(-\377\3(-\377Qjo\377E`d\377\0%+\377\0%+\377\0%+Y\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%*m\0%+\377\0%+\377[sw\377"
+      "7TY\377\7+1\377\7+1\377\7+1\377\7+1\377\6',\377\317\324\324\377\357\357"
+      "\357\377\356\356\356\377\322\325\325\3774HK\377\342\343\343\377\354\354"
+      "\354\377\353\353\353\377\353\353\353\377\352\352\352\377\351\351\351"
+      "\377V\223\236\377\0DP\377\0n\200\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0o\202\377\0%+\377\0n\200\377\0o\202\377\0o\202\377\0%+\377\0o\202\377"
+      "\0Ve\377\0o\202\377\0o\202\377\0)0\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\3(-\377\3(-\377\11-3\377y\214"
+      "\220\377\21""49\377\0%+\377\0%+\335\0@@\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0++\6\0%+\342\0%+\377\27""9>\377m\202\206\377\6*0\377\7+1\377\7"
+      "+1\377\7+1\377\7).\377I[^\377\356\356\356\377\356\356\356\377\355\355"
+      "\355\377\354\354\354\377\254\263\264\377[jl\377\352\352\352\377\352\352"
+      "\352\377\352\352\352\377\351\351\351\377\350\350\350\377\321\330\331"
+      "\377\33mz\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0%+\377\0j{\377\0o\202\377\0o\202\377\0%+\377\0o\202\377\0Uc\377\0o"
+      "\202\377\0o\202\377\0bs\377\0+2\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377\2'-\377/MR\377Wos\377"
+      "\0%+\377\0%+\377\0$,]\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%*a\0%+\377\0"
+      "%+\377[sw\377'FK\377\7+1\377\7+1\377\7+1\377\6*0\377\5\40%\377\221\232"
+      "\233\377\355\355\355\377\355\355\355\377\354\354\354\377\354\354\354"
+      "\377\353\353\353\377w\203\205\377\223\234\236\377\351\351\351\377\351"
+      "\351\351\377\350\350\350\377\342\342\342\377\337\337\337\377\255\302"
+      "\306\377\4q\203\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0%+\377"
+      "\0fw\377\0o\202\377\0o\202\377\0%+\377\0o\202\377\0Uc\377\0o\202\377"
+      "\0o\202\377\0i{\377\0j}\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377\2'-\377o\204\207\377\20"
+      "38\377\0%+\377\0%+\325\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%+\302\0%+\377"
+      "\21""49\377l\201\205\377\5)/\377\7+1\377\6*0\377\6*0\377\6).\377\4\34"
+      "!\377\255\264\265\377\354\354\354\377\354\354\354\377\353\353\353\377"
+      "\353\353\353\377\352\352\352\377\346\346\347\377FWZ\377\277\304\304\377"
+      "\350\350\350\377\344\344\344\377\337\337\337\377\337\337\337\377\337"
+      "\337\337\377r\250\262\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0%+\377\0aq\377\0o\202\377\0o\202\377\0%+\377\0o\202\377\0Xh\377\0o"
+      "\202\377\0o\202\377\0n\201\377\0o\202\377\0""2:\377\0%+\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\2'-\377"
+      "/MR\377Pin\377\0%+\377\0%+\377\0$-9\0\0\0\0\0\0\0\0\0&-\"\0%+\376\0%"
+      "+\377E`d\3776SX\377\6*0\377\6*0\377\6*0\377\6*0\377\5%+\377\1\32\37\377"
+      "\271\276\277\377\353\353\353\377\353\353\353\377\352\352\352\377\352"
+      "\352\352\377\351\351\351\377\350\350\350\377\325\327\327\3778KN\377\330"
+      "\332\332\377\340\340\340\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\326\332\333\377\16v\210\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0'.\377\0\\l\377\0o\202\377\0o\202\377\0&-\377\0o\202\377\0Yi\377\0"
+      "o\202\377\0o\202\377\0n\201\377\0o\202\377\0LY\377\0-4\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\1&,\377"
+      "\3(.\377u\211\214\377\3(-\377\0%+\377\0&+\225\0\0\0\0\0\0\0\0\0&*y\0"
+      "%+\377\1&,\377s\207\213\377\12-3\377\6*0\377\6*0\377\6*0\377\6*0\377"
+      "\3\"'\377\0\31\35\377\252\261\261\377\352\352\352\377\352\352\352\377"
+      "\351\351\351\377\351\351\351\377\350\350\350\377\350\350\350\377\347"
+      "\347\347\377\265\272\273\377FWZ\377\336\336\336\377\337\337\337\377\337"
+      "\337\337\377\334\335\336\377N\226\243\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0o\202\377\0*0\377\0Tc\377\0o\202\377\0m\177\377\0+2\377\0o\202"
+      "\377\0Yi\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0n\201\377\0"
+      "BM\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\1&,\377Nhl\377,KP\377\0%+\377\0%+\352\0\0\0\2\0\0\0"
+      "\0\0%+\272\0%+\377\32;A\377_vz\377\5)/\377\6*0\377\6*0\377\6*0\377\5"
+      ")/\377\0\37$\377\0\31\35\377\226\237\240\377\351\351\351\377\351\351"
+      "\351\377\350\350\350\377\350\350\350\377\347\347\347\377\347\347\347"
+      "\377\346\346\346\377\345\345\345\377z\205\206\377x\204\205\377\337\337"
+      "\337\377\312\321\322\3779\206\224\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0,4\377\0P]\377\0o\202\377\0i{\377\0""08\377\0"
+      "o\202\377\0Yi\377\0o\202\377\0o\202\377\0o\201\377\0o\202\377\0n\201"
+      "\377\0\77J\377\0O]\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\40@F\377Zrv\377\0%+\377\0%+\377\0&+"
+      "/\0++\6\0%+\365\0%+\377>Z_\377<X]\377\6*0\377\6*0\377\5)/\377\5)/\377"
+      "\2'-\377\0\40&\377\0\40%\377{\213\215\377\350\350\350\377\350\350\350"
+      "\377\347\347\347\377\347\347\347\377\346\346\346\377\346\346\346\377"
+      "\345\345\345\377\342\342\342\377\336\336\336\377J[]\377o\202\205\377"
+      "\25n}\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0""07\377\0JW\377\0o\202\377\0fw\377\0""4=\377\0o\202\377\0Yi\377"
+      "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0AL\377\0o\202"
+      "\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\2'-\377v\212\215\377\0%+\377\0%+\377\0&+r\0&+5\0%+\377"
+      "\0%+\377`w{\377\31;@\377\5)/\377\5)/\377\5)/\377\4(.\377\0%+\377\0^m"
+      "\377\0KX\377=fn\377\350\350\350\377\347\347\347\377\346\346\346\377\346"
+      "\346\346\377\345\345\345\377\345\345\345\377\344\344\344\377\340\340"
+      "\340\377\337\337\337\377Xhk\377\0""6>\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0j}\377\0Tb\377\0o\202"
+      "\377\0fw\377\0""9B\377\0o\202\377\0[j\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0o\202\377\0o\202\377\0DP\377\0o\202\377\0Xg\377\0)0\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377by|\377"
+      "\26""8=\377\0%+\377\0&,\252\0$*[\0%+\377\0%+\377u\211\214\377\5*/\377"
+      "\5)/\377\5)/\377\5)/\377\2'-\377\0%+\377\0fx\377\0KX\377\4AL\377\332"
+      "\334\334\377\346\346\346\377\345\345\345\377\345\345\345\377\344\344"
+      "\344\377\344\344\344\377\343\343\343\377\337\337\337\377\337\337\337"
+      "\377\34;A\377\0;D\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o"
+      "\202\377\0o\202\377\0o\202\377\0o\202\377\0du\377\0o\202\377\0fw\377"
+      "\0>H\377\0o\202\377\0^m\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0o\202\377\0KW\377\0o\202\377\0o\202\377\0ar\377\0""08\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377Hcg\377/MR\377"
+      "\0%+\377\0%+\321\0%+\204\0%+\377\6*0\377q\206\211\377\4(.\377\5)/\377"
+      "\5)/\377\5.4\377\0%,\377\0AL\377\0n\201\377\0MZ\377\0DO\377\244\263\266"
+      "\377\345\345\345\377\344\344\344\377\344\344\344\377\343\343\343\377"
+      "\343\343\343\377\341\341\341\377\337\337\337\377\337\337\337\377B\\`"
+      "\377\0;D\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0"
+      "o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0fw\377\0BN\377"
+      "\0o\202\377\0^m\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0P\\\377\0m\177\377\0o\202\377\0o\202\377\0N\\\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\3774QV\377C^c\377\0%+\377"
+      "\0%+\367\0$+\241\0%+\377\26""8=\377_vz\377\4(.\377\5)/\377\5)/\377\3"
+      "hy\377\0""2:\377\0dv\377\0o\202\377\0Ud\377\0KX\377Ku|\377\344\344\344"
+      "\377\344\344\344\377\343\343\343\377\342\342\342\377\342\342\342\377"
+      "\340\340\340\377\337\337\337\377\337\337\337\377\203\235\241\377\0;D"
+      "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0fw\377\0GS\377\0o\202\377"
+      "\0^m\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0Xh\377"
+      "\0h{\377\0o\202\377\0o\202\377\0o\202\377\0""5>\377\0%+\377\0%+\377\0"
+      "%+\377\0EQ\377\0%+\377\0%+\377\0%+\377\"BG\377Unr\377\0%+\377\0%+\377"
+      "\0%+\255\0%+\377\40@F\377Vor\377\4(.\377\4(.\377\4_n\377\1p\202\377\0"
+      "MZ\377\0fx\377\0o\202\377\0_p\377\0KX\377\2LY\377\307\321\322\377\343"
+      "\343\343\377\342\342\342\377\341\341\341\377\341\341\341\377\337\337"
+      "\337\377\337\337\337\377\337\337\337\377\331\334\335\377\40U^\377\0o"
+      "\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0o\202\377\0o\202\377\0o\202\377\0hz\377\0LY\377\0o\202\377\0^m"
+      "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0`p\377\0"
+      "du\377\0o\202\377\0o\202\377\0o\202\377\0fx\377\0DP\377\0DP\377\0%+\377"
+      "\0o\202\377\0%+\377\0%+\377\0%+\377\27""9>\377]ux\377\0%+\377\0%+\377"
+      "\0%+\272\0%+\377&EK\377Nhl\377\4(.\377\4""07\377\4q\204\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0o\202\377\0l\177\377\0MZ\377\0KX\377f\217\226"
+      "\377\342\342\342\377\341\341\341\377\341\341\341\377\340\340\340\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\242"
+      "\300\306\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0"
+      "o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0l~\377\0P^\377"
+      "\0o\202\377\0^n\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0hz\377\0]m\377\0o\202\377\0o\202\377\0o\202\377\0m\200\377\0Wf"
+      "\377\0o\202\377\0Xh\377\0o\202\377\0%+\377\0%+\377\0%+\377\21""49\377"
+      "dz~\377\0%+\377\0%+\377\0%,\301\0%+\377'FK\377Lfj\377\4""6>\377\4q\204"
+      "\377\3q\203\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0Yi\377\0KX\377\13R_\377\316\324\326\377\340\340\340\377\340\340\340"
+      "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377Y\234\247\377\0o\202\377\0o\202\377\0"
+      "o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0o\202\377\0P^\377\0o\202\377\0bs\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0o\202\377\0o\202\377\0o\201\377\0]m\377\0o\202\377\0o\202\377\0"
+      "n\201\377\0o\202\377\0Zj\377\0o\202\377\0o\202\377\0o\202\377\0[j\377"
+      "\0_o\377\0%,\377\20""38\377e{\177\377\0%+\377\0%+\377\0%+\264\0%+\377"
+      "\"BG\377Qjn\377\4+2\377\4q\204\377\2p\203\377\0o\202\377\0o\202\377\0"
+      "o\202\377\0o\202\377\0o\202\377\0i{\377\0KX\377\0KX\377Y\206\216\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\326\332"
+      "\333\377%\202\222\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o"
+      "\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0Tc\377\0o\202\377"
+      "\0bs\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202"
+      "\377\0]l\377\0o\202\377\0o\202\377\0j}\377\0o\202\377\0Yi\377\0j|\377"
+      "\0fw\377\0o\202\377\0o\202\377\0P]\377\0.6\377\25""7<\377_vz\377\0%+"
+      "\377\0%+\377\0%+\245\0%+\377\33<A\377Wos\377\3(-\377\3""4<\377\1o\201"
+      "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0We\377\0KX\377\3MZ\377\266\304\306\377\337\337\337\377\337\337\337"
+      "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\270\307\311\377\10s\205\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0"
+      "o\202\377\0Tc\377\0o\202\377\0bs\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0o\202\377\0^m\377\0o\202\377\0o\202\377\0j}\377"
+      "\0o\202\377\0KX\377\0j}\377\0ev\377\0o\202\377\0HT\377\0%+\377\0%+\377"
+      "\33<A\377Wos\377\0%+\377\0%+\377\0$+\224\0%+\377\16""17\377e{\177\377"
+      "\2'-\377\3(-\377\1+3\377\0o\202\377\0^m\377\0o\202\377\0o\202\377\0o"
+      "\202\377\0o\202\377\0j|\377\0LY\377\0KX\3779q{\377\337\337\337\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\210\264\273"
+      "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0Xh\377\0o\202\377\0du\377\0o\202\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0^n\377\0o\202\377\0o\202"
+      "\377\0`q\377\0o\202\377\0""7A\377\0n\201\377\0o\202\377\0<F\377\0""0"
+      "8\377\0%+\377\0%+\377(GL\377Jdi\377\0%+\377\0%+\377\0%*m\0%+\377\0%+"
+      "\377q\206\211\377\2'-\377\3(-\377\1&,\377\0KX\377\0N[\377\0&,\377\0o"
+      "\202\377\0o\202\377\0o\202\377\0o\202\377\0[k\377\0KX\377\0KX\377\213"
+      "\247\254\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
+      "\377\337\337\337\377[\235\250\377\0o\202\377\0o\202\377\0o\202\377\0"
+      "o\202\377\0o\202\377\0o\202\377\0o\202\377\0Yh\377\0o\202\377\0gy\377"
+      "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0"
+      "bs\377\0o\202\377\0o\202\377\0Tc\377\0o\202\377\0.5\377\0HT\377\0]m\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377=Y^\3775RW\377\0%+\377\0%+\342\0#+H\0"
+      "%+\377\0%+\377g}\201\377\13/4\377\3(-\377\1&,\377\0*0\377\0*0\377\0%"
+      "+\377\0o\202\377\0o\202\377\0o\202\377\0""7@\377\0Ra\377\0N\\\377\0K"
+      "X\377\13R_\377\303\314\316\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
+      "\377\337\337\337\377\332\335\335\3774\211\227\377\0o\202\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0]m\377\0n\200\377\0l\177"
+      "\377\0o\202\377\0o\202\377\0o\202\377\0o\202\377\0du\377\0""9C\377\0"
+      "^o\377\0o\202\377\0o\202\377\0""6\77\377\0o\202\377\0/7\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377Pin\377!AF\377\0%+\377\0$+\275"
+      "\0))\31\0%+\377\0%+\377Hcg\377(GL\377\2'-\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0.6\377\0o\202\377\0o\202\377\0%+\377\0%+\377\0du\377\0KX\377"
+      "\0KX\3774nx\377\333\334\335\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
+      "\377\337\337\337\377\313\325\327\377\32|\215\377\0o\202\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0o\202\377\0[j\377\0m\200\3770\207\226\377\255"
+      "\306\312\377v\252\263\377\0o\202\377\0o\202\377\0%+\377\0%+\377\0^m\377"
+      "\0o\202\377\0o\202\377\0%+\377\0'-\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377j\200\203\377\6*0\377\0%+\377\0%+\217\0\0\0\0"
+      "\0%+\330\0%+\377'FK\377Hcg\377\2'-\377\1&,\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0o\202\377\0o\202\377\0%+\377\0%+\377\0o\202\377\0Yh\377\0K"
+      "X\377\0KX\377c\215\224\377\337\337\337\377\337\337\337\377\337\337\337"
+      "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\300\320\322\377\27{\214\377\0o\202\377"
+      "\0o\202\377\0o\202\377\0o\202\377\1[i\377k\245\256\377\334\335\336\377"
+      "\337\337\337\377\337\337\337\377U\232\246\377\0o\202\377\0%+\377\0%+"
+      "\377\0\\k\377\0o\202\377\0""3<\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\16""17\377ax|\377\0%+\377\0%+\377\0$+"
+      "M\0\0\0\0\0%*\227\0%+\377\7+1\377h~\201\377\1&,\377\1&,\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0EQ\377\0_n\377\0%+\377\0%+\377\0FS\377\0m\177"
+      "\377\0Q^\377\0KX\377\1LY\377\225\250\253\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
+      "\377\337\337\337\377\337\337\337\377\337\337\337\377\272\314\317\377"
+      "!\177\220\377\0o\202\377\0o\202\377\0o\202\377\212\250\255\377\337\337"
+      "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\327\333\334"
+      "\377,\205\225\377\0%+\377\0%+\377\0]l\377\0j|\377\0/6\377\0%+\377\0%"
+      "+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\3773QU\377=Y^\377\0"
+      "%+\377\0%+\374\0\"3\17\0\0\0\0\0%,K\0%+\377\0%+\377Rko\377\34=B\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0Zh\377\0i{\377\0MZ\377\0KX\377\13#'\377\270\274\275\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
+      "\377\332\335\335\377|\255\266\377L\225\241\377N\213\225\377p\215\222"
+      "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\303\321\323\377\21""39\377\0%+\377\0LY\377\0""8A\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
+      "\377^uy\377\17""27\377\0%+\377\0%+\277\0\0\0\0\0\0\0\0\0@@\4\0%+\351"
+      "\0%+\377%EJ\377Ich\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0o\202\377\0bs\377\0KX\377\0"
+      "\31\35\377\33""15\377\315\317\320\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377Ty\200\377\241\266\272\377\337\337\337\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\241\253"
+      "\255\377\2'-\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
+      "\377\0%+\377\0%+\377\0%+\377\21""49\377]ux\377\0%+\377\0%+\377\0$,c\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0%+\217\0%+\377\1&,\377dz~\377\12.3\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+"
+      "\377\0""7@\377\0Yh\377\1IV\377\5\35!\377\7\37#\3776IL\377\331\332\332"
+      "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\326\331\331\3777oy\377\305"
+      "\316\317\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377i}\200\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377Hcg\377&EK\377\0%+\377"
+      "\0%+\366\0$$\16\0\0\0\0\0\0\0\0\0\0\0\0\0#+$\0%+\373\0%+\377/MR\377A"
+      "]a\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\1&,\377\4(.\377\6>G\377\5R`\377\13&+\377\14#'\377\16%)\377O"
+      "_a\377\334\334\335\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\275\310"
+      "\312\377<s|\377\332\334\334\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377\333\334\334\377/LQ\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\15""06\377ax|\377\1&,\377\0"
+      "%+\377\0%+\226\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%+\245\0%+\377"
+      "\2'-\377f|\200\377\21""49\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\3(-\377\7+1\377\14/5\377\17""27\377\22""4:\377\26""7"
+      "<\377\22+.\377\22),\377\24*-\377^kn\377\336\336\336\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377\225\256\262\377_\212\221\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\301"
+      "\306\306\377\15""06\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377Pin\377)HM\377\0%+\377\0%+\372\0!)\37\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0$+*\0%+\373\0%+\377%EJ\377Vor\377\0%+\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\1&,\377\5)/\377\12.3\377\16""17\377\22""4:\377"
+      "\26""8=\377\31:@\377\34=B\377\37>D\377\31""04\377\31/2\377\32/3\377^"
+      "ln\377\332\332\332\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377_\212\221"
+      "\377\224\255\262\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\221\236\240\377\2'-\377\0%+\377\0%+"
+      "\377\0%+\377\0%+\377\0%+\377\37@E\377[sw\377\1&,\377\0%+\377\0%+\231"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0%+\217\0%+"
+      "\377\0%+\377Tmq\3770NS\377\0%+\377\0%+\377\0%+\377\2'-\377\7+1\377\14"
+      "/5\377\20""38\377\25""7<\377\31:@\377\34=B\377\40@F\377$DI\377'FK\377"
+      "(FK\377\37""69\377\40""48\377!58\377P_b\377\322\324\324\377\337\337\337"
+      "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
+      "\337\337\377\332\334\334\3777oy\377\276\305\307\377\337\337\337\377\337"
+      "\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377A[_\377\4"
+      "(.\377\0%+\377\0%+\377\0%+\377\10,2\377g}\201\377\24""6<\377\0%+\377"
+      "\0%+\355\0$1\25\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0$$\16\0%+\344\0%+\377\13.4\377i\177\202\377\26""8=\377\0%+\377\2"
+      "'-\377\7+1\377\14/5\377\21""49\377\26""8=\377\33<A\377\37@E\377#CH\377"
+      "'FK\377*IN\377.LQ\3771OT\3772NS\377(=A\377&:=\377':=\377>PR\377\265\274"
+      "\275\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
+      "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\302\311\312\377HXZ\377\327\330\330\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\241\254\255\377\22""4"
+      "9\377\12.3\377\5)/\377\0%+\377\1&,\377Tmq\3776SX\377\0%+\377\0%+\377"
+      "\0$,i\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0#+H\0%+\376\0%+\377\37@E\377h~\201\377\20""38\377\7+1\377\15"
+      "06\377\22""4:\377\27""9>\377\34=B\377!AF\377%EJ\377*IN\377.LQ\3771OT"
+      "\3774QV\3778UZ\377;W\\\377=X]\3770FI\377,\77B\377-@C\377/BE\377u\227"
+      "\234\377\332\334\334\377\337\337\337\377\337\337\337\377\337\337\337"
+      "\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\234\243\245\377cps\377\337\337\337\377"
+      "\337\337\337\377\227\241\243\377\40@F\377\25""7<\377\20""38\377\12.3"
+      "\377\5)/\377\77[_\377Tmq\377\1&,\377\0%+\377\0%+\270\0\0\0\2\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0$,\206\0%+\377\0%+\3771OT\377e{\177\377\23""5;\377\22""4:\377\30"
+      ":\77\377\35>C\377\"BG\377'FK\377,KP\3770NS\3774QV\3779VZ\377<X]\377\77"
+      "[_\377B]b\377D_d\377Gbf\377=SW\3772DH\3773EG\3773EI\377\40`k\377\237"
+      "\264\270\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337"
+      "\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337"
+      "\377\337\337\337\377my{\377\207\221\222\377l{}\377%DI\377\40@F\377\33"
+      "<A\377\26""8=\377\20""38\3779VZ\377cz}\377\7+1\377\0%+\377\0%+\345\0"
+      "#.\26\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0U\3\0$+\275\0%+\377\0%+\377<X]\377g}\201"
+      "\377\"BG\377\36\77D\377#CH\377(GL\377-KP\3772PU\3777TY\377;W\\\377\77"
+      "[_\377C^c\377Fae\377Ich\377Lfj\377Nhl\377Pin\377Kbf\377<NQ\3778IL\377"
+      "4IM\377\0KX\377Xfh\377\216\251\256\377\327\330\330\377\337\337\337\377"
+      "\337\337\337\377\337\337\337\377\337\337\337\377\337\337\337\377\337"
+      "\337\337\377\234\243\244\377*AE\377/LQ\377*IN\377%EJ\377\40@F\377\33"
+      "<A\377D_d\377g}\201\377\12.3\377\0%+\377\0%+\365\0%*7\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\32""3\12\0%+\310\0%+\377\0%+\3779VZ\377p\205\210"
+      "\3772PU\377)HM\377.LQ\3773QU\3778UZ\377=Y^\377A]a\377Fae\377Ich\377M"
+      "gk\377Pin\377Slp\377Vor\377Wos\377Yqu\377Zrv\377Ocg\377ART\3770MS\377"
+      "=MP\377<LO\377\77PR\377fsu\377\204\215\217\377\227\236\237\377\222\232"
+      "\233\377\200\214\216\377Rhk\3778QU\377:W[\3775RW\3770NS\377+JO\377'F"
+      "K\377Vor\377e{\177\377\14/5\377\0%+\377\0%+\374\0$+N\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0$1\25\0%+\321\0%+\377\0%+\377-"
+      "KP\377w\213\216\377Nhl\3774QV\3779VZ\377>Z_\377C^c\377Gbf\377Lfj\377"
+      "Pin\377Tmq\377Wos\377[sw\377]ux\377_vz\377`w{\377by|\377by|\377ax{\377"
+      "Vjl\377I[^\377BQT\377@OR\377>NQ\377<MO\377:KM\3778IL\377\77TW\377Ich"
+      "\377E`d\377@\\`\377;W\\\3776SX\3779VZ\377k\200\204\377[sw\377\7+1\377"
+      "\0%+\377\0%+\374\0$,b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\40""0\20\0%+\300\0%+\377\0%+\377\27""9>\377l\201"
+      "\205\377k\200\204\377Fae\377C^c\377Ich\377Mgk\377Rko\377Vor\377[sw\377"
+      "^uy\377ax|\377dz~\377f|\200\377h~\201\377j\200\203\377j\200\203\377j"
+      "\200\203\377j\200\203\377i\177\202\377e{~\377\\pt\377Wkn\377Thl\377S"
+      "il\377Wnr\377Tmq\377Pin\377Kei\377Fae\377B]b\377Yqu\377y\214\220\377"
+      "<X]\377\2'-\377\0%+\377\0%+\366\0$*O\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\10\0%,\244"
+      "\0%+\377\0%+\377\7+1\377E`d\377~\221\224\377j\200\203\377Qjn\377Tmq\377"
+      "Xpt\377]ux\377ax|\377e{\177\377i\177\202\377k\200\204\377n\203\206\377"
+      "o\204\207\377q\206\211\377r\206\212\377r\206\212\377q\206\211\377p\205"
+      "\210\377o\204\207\377m\202\206\377j\200\203\377f|\200\377cz}\377_vz\377"
+      "[sw\377Vor\377Qjn\377[sw\377y\214\220\377i\177\202\377\34=B\377\0%+\377"
+      "\0%+\377\0%+\344\0#,:\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&+e\0%"
+      "+\365\0%+\377\0%+\377\26""8=\377]ux\377\203\225\230\377v\212\215\377"
+      "dz~\377cz}\377h~\201\377l\201\205\377o\204\207\377s\207\213\377u\211"
+      "\214\377w\213\216\377y\214\220\377y\214\220\377y\214\220\377y\214\220"
+      "\377x\214\217\377v\212\215\377t\210\213\377q\206\211\377n\203\206\377"
+      "j\200\203\377e{\177\377ax|\377k\200\204\377\177\222\225\377y\214\220"
+      "\3774QV\377\2'-\377\0%+\377\0%+\377\0%+\271\0$1\25\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&-(\0$+\275\0%+\377\0%+\377\0"
+      "%+\377\31:@\377Vor\377\205\227\232\377\210\231\234\377\200\222\225\377"
+      "w\213\216\377v\212\215\377y\214\220\377}\220\223\377~\221\224\377\200"
+      "\222\225\377\201\223\226\377\201\223\226\377\201\223\226\377\177\222"
+      "\225\377~\221\224\377{\216\221\377x\214\217\377u\211\214\377|\217\222"
+      "\377\206\230\232\377\210\231\234\377q\206\211\3773QU\377\5)/\377\0%+"
+      "\377\0%+\377\0&+\356\0%,h\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&+X\0%+\336\0%+\377\0%"
+      "+\377\0%+\377\12.3\3771OT\377cz}\377\210\231\234\377\217\237\242\377"
+      "\225\244\247\377\230\247\251\377\225\244\247\377\223\243\245\377\222"
+      "\242\244\377\221\241\244\377\223\243\245\377\224\244\246\377\226\245"
+      "\250\377\227\246\251\377\221\241\244\377\216\236\241\377v\212\215\377"
+      "Gbf\377\32;A\377\1&,\377\0%+\377\0%+\377\0%+\372\0$+\233\0&&\24\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@@\4\0$,]\0%+\324\0%+\377\0%+\377\0%"
+      "+\377\0%+\377\4(.\377\35>C\3772PU\377Hcg\377ax|\377o\204\207\377y\214"
+      "\220\377{\216\221\377r\206\212\377j\200\203\377Vor\377:W[\377(GL\377"
+      "\16""17\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\366\0%+\226\0((\40\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0$-9\0$+\224\0%+\352\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377"
+      "\0%+\377\0%+\377\0%+\374\0%+\300\0$,b\0\"3\17\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\2\0&+/\0$+q\0%+\253\0%+\321\0%+\367\0%+\377\0"
+      "%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\377\0%+\343\0%+\274\0%+\217"
+      "\0$+M\0\"3\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 
 /* GdkPixbuf RGBA C-Source image dump */
@@ -1650,99 +1661,100 @@ static const guint8 gnome_stock_sflphone[] =
 #pragma align 4 (gnome_stock_fail)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_fail[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_fail[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_fail[] = 
+static const guint8 gnome_stock_fail[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (2304) */
-  "\0\0\11\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (96) */
-  "\0\0\0`"
-  /* width (24) */
-  "\0\0\0\30"
-  /* height (24) */
-  "\0\0\0\30"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0>\0\7%;\0\11""8;\0\24\15\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\4=\0\13"
-  ".9\0\13-U\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1=\0\13"
-  "\\N\0\17\321V\0\20\341E\0\16\251>\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12C\0\15\211R\0\20\334R\0"
-  "\20\333A\0\15\2059\0\0\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0=\0\13\\R\0"
-  "\20\335v\0\30\377}\0\32\377d\0\24\372F\0\15\256>\0\11\35\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356{\0"
-  "\31\377{\0\32\377Z\0\21\355A\0\15\206I\0\0\7\0\0\0\0\0\0\0\0""8\0\14"
-  ")O\0\17\323u\0\30\377~\0\32\377~\0\32\377~\0\32\377d\0\24\372F\0\15\256"
-  ">\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356"
-  "{\0\31\377~\0\32\377~\0\32\377{\0\31\377X\0\21\352<\0\11Q\0\0\0\0\0\0"
-  "\0\0""9\0\13CZ\0\22\350~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32"
-  "\377d\0\24\372F\0\15\256>\0\11\35\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213"
-  "[\0\22\356{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377g\0\24\376"
-  "A\0\13r\0\0\0\0\0\0\0\0""9\0\16\22H\0\15\265i\0\25\375~\0\32\377~\0\32"
-  "\377~\0\32\377~\0\32\377~\0\32\377d\0\24\372F\0\15\256>\0\11\35""3\0"
-  "\0\12B\0\15\213[\0\22\356{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0"
-  "\32\377r\0\30\377N\0\17\3209\0\12""1\0\0\0\0\0\0\0\0\0\0\0\0;\0\15'I"
-  "\0\16\272i\0\25\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377"
-  "d\0\24\372G\0\15\264A\0\13\244[\0\22\356{\0\31\377~\0\32\377~\0\32\377"
-  "~\0\32\377~\0\32\377r\0\30\377N\0\16\3249\0\13H\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0;\0\15'H\0\16\273j\0\25\375~\0\32\377~\0\32\377~\0"
-  "\32\377~\0\32\377~\0\32\377e\0\24\372Y\0\21\361{\0\31\377~\0\32\377~"
-  "\0\32\377~\0\32\377~\0\32\377r\0\30\377O\0\20\3259\0\13H\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""9\0\15(J\0\16\273j\0\25"
-  "\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32"
-  "\377~\0\32\377~\0\32\377~\0\32\377s\0\30\377O\0\20\325;\0\12J\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0"
-  "\14)I\0\16\274j\0\25\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32"
-  "\377~\0\32\377~\0\32\377~\0\32\377s\0\30\377O\0\20\325:\0\12K\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0=\0\14*H\0\15\300g\0\24\376~\0\32\377~\0\32\377~\0\32\377"
-  "~\0\32\377~\0\32\377~\0\32\377s\0\30\377N\0\16\3309\0\12L\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0""3\0\0\12\77\0\13\246Z\0\22\364~\0\32\377~\0\32\377"
-  "~\0\32\377~\0\32\377~\0\32\377~\0\32\377g\0\24\376F\0\15\267>\0\11\35"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356{\0\31\377~\0\32\377"
-  "~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377d\0\24\372"
-  "F\0\15\256>\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356{\0\31\377~\0\32"
-  "\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32"
-  "\377~\0\32\377d\0\24\372F\0\15\256>\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356{\0\31\377"
-  "~\0\32\377~\0\32\377~\0\32\377~\0\32\377s\0\30\377o\0\26\377~\0\32\377"
-  "~\0\32\377~\0\32\377~\0\32\377~\0\32\377d\0\24\372F\0\15\256>\0\11\35"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356"
-  "{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377q\0\27\377N\0\16\325"
-  "G\0\15\276i\0\25\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377"
-  "d\0\24\372F\0\15\256>\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\4C\0\15\212"
-  "[\0\22\356{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377q\0\27\377"
-  "O\0\17\3239\0\13H<\0\15&I\0\16\272i\0\25\375~\0\32\377~\0\32\377~\0\32"
-  "\377~\0\32\377~\0\32\377d\0\24\372F\0\15\256:\0\14\26\0\0\0\0\0\0\0\0"
-  ";\0\11""8U\0\20\337{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377"
-  "q\0\27\377O\0\17\3239\0\13H\0\0\0\0\0\0\0\0<\0\15&I\0\16\272i\0\25\375"
-  "~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377`\0\23\366@\0\15d\0"
-  "\0\0\0\0\0\0\0""9\0\11:V\0\20\341}\0\31\377~\0\32\377~\0\32\377~\0\32"
-  "\377q\0\27\377O\0\17\3239\0\13H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<\0\15"
-  "&I\0\16\272i\0\25\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377c\0\24\370"
-  "=\0\14h\0\0\0\0\0\0\0\0+\0\0\6D\0\14\223^\0\23\362}\0\31\377~\0\32\377"
-  "q\0\27\377O\0\17\3239\0\13H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0<\0\15&I\0\16\272i\0\25\375~\0\32\377~\0\32\377g\0\24\374H\0\16"
-  "\2659\0\11\33\0\0\0\0\0\0\0\0\0\0\0\0""7\0\22\16C\0\14\224\\\0\22\357"
-  "h\0\25\377N\0\17\3219\0\13H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0<\0\15&I\0\16\272d\0\23\372b\0\23\371H\0\15\265"
-  ":\0\7#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0;\0\0\15<\0\13]C\0\13s"
-  ":\0\12""5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0:\0\10\37@\0\14k\77\0\14j>\0\11\35\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (2304) */
+      "\0\0\11\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (96) */
+      "\0\0\0`"
+      /* width (24) */
+      "\0\0\0\30"
+      /* height (24) */
+      "\0\0\0\30"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0>\0\7%;\0\11""8;\0\24\15\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\4=\0\13"
+      ".9\0\13-U\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1=\0\13"
+      "\\N\0\17\321V\0\20\341E\0\16\251>\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12C\0\15\211R\0\20\334R\0"
+      "\20\333A\0\15\2059\0\0\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0=\0\13\\R\0"
+      "\20\335v\0\30\377}\0\32\377d\0\24\372F\0\15\256>\0\11\35\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356{\0"
+      "\31\377{\0\32\377Z\0\21\355A\0\15\206I\0\0\7\0\0\0\0\0\0\0\0""8\0\14"
+      ")O\0\17\323u\0\30\377~\0\32\377~\0\32\377~\0\32\377d\0\24\372F\0\15\256"
+      ">\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356"
+      "{\0\31\377~\0\32\377~\0\32\377{\0\31\377X\0\21\352<\0\11Q\0\0\0\0\0\0"
+      "\0\0""9\0\13CZ\0\22\350~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32"
+      "\377d\0\24\372F\0\15\256>\0\11\35\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213"
+      "[\0\22\356{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377g\0\24\376"
+      "A\0\13r\0\0\0\0\0\0\0\0""9\0\16\22H\0\15\265i\0\25\375~\0\32\377~\0\32"
+      "\377~\0\32\377~\0\32\377~\0\32\377d\0\24\372F\0\15\256>\0\11\35""3\0"
+      "\0\12B\0\15\213[\0\22\356{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0"
+      "\32\377r\0\30\377N\0\17\3209\0\12""1\0\0\0\0\0\0\0\0\0\0\0\0;\0\15'I"
+      "\0\16\272i\0\25\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377"
+      "d\0\24\372G\0\15\264A\0\13\244[\0\22\356{\0\31\377~\0\32\377~\0\32\377"
+      "~\0\32\377~\0\32\377r\0\30\377N\0\16\3249\0\13H\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0;\0\15'H\0\16\273j\0\25\375~\0\32\377~\0\32\377~\0"
+      "\32\377~\0\32\377~\0\32\377e\0\24\372Y\0\21\361{\0\31\377~\0\32\377~"
+      "\0\32\377~\0\32\377~\0\32\377r\0\30\377O\0\20\3259\0\13H\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""9\0\15(J\0\16\273j\0\25"
+      "\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32"
+      "\377~\0\32\377~\0\32\377~\0\32\377s\0\30\377O\0\20\325;\0\12J\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""8\0"
+      "\14)I\0\16\274j\0\25\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32"
+      "\377~\0\32\377~\0\32\377~\0\32\377s\0\30\377O\0\20\325:\0\12K\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0=\0\14*H\0\15\300g\0\24\376~\0\32\377~\0\32\377~\0\32\377"
+      "~\0\32\377~\0\32\377~\0\32\377s\0\30\377N\0\16\3309\0\12L\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0""3\0\0\12\77\0\13\246Z\0\22\364~\0\32\377~\0\32\377"
+      "~\0\32\377~\0\32\377~\0\32\377~\0\32\377g\0\24\376F\0\15\267>\0\11\35"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356{\0\31\377~\0\32\377"
+      "~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377d\0\24\372"
+      "F\0\15\256>\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356{\0\31\377~\0\32"
+      "\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32"
+      "\377~\0\32\377d\0\24\372F\0\15\256>\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356{\0\31\377"
+      "~\0\32\377~\0\32\377~\0\32\377~\0\32\377s\0\30\377o\0\26\377~\0\32\377"
+      "~\0\32\377~\0\32\377~\0\32\377~\0\32\377d\0\24\372F\0\15\256>\0\11\35"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0""3\0\0\12B\0\15\213[\0\22\356"
+      "{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377q\0\27\377N\0\16\325"
+      "G\0\15\276i\0\25\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377"
+      "d\0\24\372F\0\15\256>\0\11\35\0\0\0\0\0\0\0\0\0\0\0\0@\0\0\4C\0\15\212"
+      "[\0\22\356{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377q\0\27\377"
+      "O\0\17\3239\0\13H<\0\15&I\0\16\272i\0\25\375~\0\32\377~\0\32\377~\0\32"
+      "\377~\0\32\377~\0\32\377d\0\24\372F\0\15\256:\0\14\26\0\0\0\0\0\0\0\0"
+      ";\0\11""8U\0\20\337{\0\31\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377"
+      "q\0\27\377O\0\17\3239\0\13H\0\0\0\0\0\0\0\0<\0\15&I\0\16\272i\0\25\375"
+      "~\0\32\377~\0\32\377~\0\32\377~\0\32\377~\0\32\377`\0\23\366@\0\15d\0"
+      "\0\0\0\0\0\0\0""9\0\11:V\0\20\341}\0\31\377~\0\32\377~\0\32\377~\0\32"
+      "\377q\0\27\377O\0\17\3239\0\13H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0<\0\15"
+      "&I\0\16\272i\0\25\375~\0\32\377~\0\32\377~\0\32\377~\0\32\377c\0\24\370"
+      "=\0\14h\0\0\0\0\0\0\0\0+\0\0\6D\0\14\223^\0\23\362}\0\31\377~\0\32\377"
+      "q\0\27\377O\0\17\3239\0\13H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0<\0\15&I\0\16\272i\0\25\375~\0\32\377~\0\32\377g\0\24\374H\0\16"
+      "\2659\0\11\33\0\0\0\0\0\0\0\0\0\0\0\0""7\0\22\16C\0\14\224\\\0\22\357"
+      "h\0\25\377N\0\17\3219\0\13H\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0<\0\15&I\0\16\272d\0\23\372b\0\23\371H\0\15\265"
+      ":\0\7#\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0;\0\0\15<\0\13]C\0\13s"
+      ":\0\12""5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0:\0\10\37@\0\14k\77\0\14j>\0\11\35\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 
 /* GdkPixbuf RGBA C-Source image dump */
@@ -1751,420 +1763,421 @@ static const guint8 gnome_stock_fail[] =
 #pragma align 4 (gnome_stock_user)
 #endif
 #ifdef __GNUC__
-static const guint8 gnome_stock_user[] __attribute__ ((__aligned__ (4))) = 
+static const guint8 gnome_stock_user[] __attribute__ ( (__aligned__ (4))) =
 #else
-static const guint8 gnome_stock_user[] = 
+static const guint8 gnome_stock_user[] =
 #endif
-{ ""
-  /* Pixbuf magic (0x47646b50) */
-  "GdkP"
-  /* length: header (24) + pixel_data (9216) */
-  "\0\0$\30"
-  /* pixdata_type (0x1010002) */
-  "\1\1\0\2"
-  /* rowstride (192) */
-  "\0\0\0\300"
-  /* width (48) */
-  "\0\0\0""0"
-  /* height (48) */
-  "\0\0\0""0"
-  /* pixel_data: */
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252\252\252\3\205"
-  "\211\201E\217\220\215\217\214\217\212\272\211\213\206\306\213\215\207"
-  "\302\217\220\214\261\215\217\210r\211\211\203'\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\212\217\2052\214\216\211\264\255\256\253\300\333\333\331\311"
-  "\360\360\357\311\367\367\367\311\365\365\364\311\353\354\353\311\320"
-  "\320\315\307\226\226\223\302\215\217\213\213\222\222\200\16\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216"
-  "\216\213M\223\224\220\301\337\341\336\311\365\365\364\311\364\364\362"
-  "\311\365\365\364\311\366\366\365\311\366\366\366\311\366\366\365\311"
-  "\366\366\365\311\365\365\364\311\307\307\303\305\213\216\212\265\213"
-  "\213\213\26\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\212\217\2052\225\227\222\300\353\353\351\311\360\360\357\311\357\357"
-  "\355\311\362\362\361\311\366\366\365\311\372\372\371\311\373\373\372"
-  "\311\367\367\367\311\365\365\364\311\362\362\360\311\364\364\364\311"
-  "\325\326\324\310\215\220\213\256\222\222\222\7\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\200\200\200\4\216\220\213\265\342\342\341\311"
-  "\354\354\351\311\353\353\351\311\357\357\355\311\364\364\362\311\367"
-  "\367\366\311\373\373\373\311\376\376\374\311\372\372\371\311\365\365"
-  "\364\311\361\361\360\311\355\355\353\311\362\362\361\311\277\300\274"
-  "\303\215\217\212k\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\214"
-  "\206T\266\270\264\301\355\355\353\311\346\346\344\311\351\351\350\311"
-  "\357\357\355\311\362\362\361\311\366\366\365\311\371\371\371\311\372"
-  "\372\372\311\367\367\367\311\364\364\364\311\360\360\357\311\354\354"
-  "\353\311\351\351\350\311\355\355\354\311\220\222\216\274\207\207\207"
-  "\21\377\377\377\1\207\207\207\21\200\200\200\4\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\217\220\212"
-  "\250\336\336\333\311\346\346\343\311\346\346\343\311\351\351\347\311"
-  "\355\355\353\311\360\360\357\311\364\364\362\311\365\365\364\311\366"
-  "\366\365\311\365\365\364\311\362\362\361\311\357\357\355\311\353\353"
-  "\351\311\347\347\346\311\337\337\336\317\235\236\233\343\216\220\213"
-  "\351\212\214\207\374\220\222\215\370\211\213\206\375\215\217\213\351"
-  "\216\220\211\232\212\212\2050\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\222\222\222\7\214\216\211\305\355\355\353\311\341\341\335\311"
-  "\343\343\341\311\347\347\346\311\351\351\350\311\355\355\354\311\360"
-  "\360\357\311\362\362\360\311\362\362\361\311\361\361\360\311\357\357"
-  "\355\311\354\354\351\311\351\351\347\311\263\264\261\344\221\223\216"
-  "\375\306\307\304\376\351\352\350\377\367\367\367\377\371\371\370\377"
-  "\371\371\371\377\357\357\356\377\320\321\317\376\224\226\221\366\215"
-  "\220\212\250\200\200\200\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\211\211"
-  "\34\227\232\225\300\353\353\351\311\336\336\333\311\341\341\336\311\346"
-  "\346\342\311\350\350\346\311\351\351\350\311\354\354\351\311\357\357"
-  "\354\311\357\357\354\311\355\355\353\311\353\353\351\311\351\351\347"
-  "\311\245\246\243\356\252\253\250\375\357\357\356\377\364\364\363\377"
-  "\364\364\362\377\365\365\364\377\367\367\366\377\367\367\366\377\366"
-  "\366\365\377\366\366\365\377\364\364\363\377\274\275\272\371\215\220"
-  "\213\327\210\210\210\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\211\211\34\227\232"
-  "\225\300\351\351\347\311\333\333\330\311\337\337\333\311\342\342\337"
-  "\311\344\344\342\311\347\347\344\311\350\350\346\311\351\351\347\311"
-  "\351\351\350\311\351\351\347\311\350\350\346\311\260\261\256\346\257"
-  "\260\254\375\361\361\360\377\356\356\354\377\357\357\356\377\363\363"
-  "\362\377\367\367\366\377\372\372\372\377\373\373\372\377\370\370\367"
-  "\377\364\364\363\377\361\361\360\377\364\364\363\377\306\306\304\372"
-  "\217\221\213\302\377\377\377\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\222\222\222\7\214\216"
-  "\211\305\351\351\350\311\331\331\325\311\333\333\331\311\337\337\333"
-  "\311\341\341\336\311\343\343\341\311\346\346\342\311\346\346\343\311"
-  "\346\346\343\311\346\346\343\311\323\324\317\321\231\233\227\374\356"
-  "\356\355\377\352\352\350\377\354\354\352\377\360\360\356\377\364\364"
-  "\363\377\370\370\367\377\374\374\374\377\375\375\374\377\371\371\370"
-  "\377\364\364\363\377\360\360\357\377\355\355\353\377\362\362\361\377"
-  "\254\255\251\362\212\214\207Y\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\216\211\251"
-  "\332\332\330\311\333\333\331\311\331\331\325\311\333\333\330\311\336"
-  "\336\332\311\337\337\333\311\341\341\336\311\341\341\336\311\341\341"
-  "\337\311\341\341\336\311\242\243\236\360\323\324\321\377\352\352\347"
-  "\377\347\347\345\377\353\353\351\377\357\357\355\377\363\363\362\377"
-  "\366\366\366\377\371\371\371\377\371\371\371\377\367\367\366\377\363"
-  "\363\362\377\357\357\356\377\354\354\352\377\352\352\350\377\346\346"
-  "\345\377\215\216\212\347\200\200\200\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0}\200z\\\263\263"
-  "\257\302\346\346\343\311\326\326\323\311\330\330\324\311\332\332\326"
-  "\311\333\333\330\311\335\335\331\311\335\335\332\311\335\335\332\311"
-  "\327\327\325\314\217\221\215\375\354\354\353\377\343\343\340\377\346"
-  "\346\343\377\352\352\347\377\355\355\354\377\361\361\357\377\363\363"
-  "\362\377\365\365\364\377\366\366\365\377\364\364\363\377\361\361\360"
-  "\377\356\356\354\377\352\352\350\377\346\346\344\377\357\357\355\377"
-  "\240\242\236\360\206\213\2067\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\20\213\215\210"
-  "\271\333\333\331\311\341\341\335\311\326\326\323\311\326\326\323\311"
-  "\326\326\324\311\330\330\325\311\331\331\325\311\331\331\326\311\300"
-  "\301\275\327\250\251\246\374\353\353\350\377\340\340\335\377\344\344"
-  "\341\377\350\350\345\377\353\353\351\377\356\356\354\377\360\360\357"
-  "\377\361\361\360\377\361\361\360\377\360\360\357\377\356\356\354\377"
-  "\353\353\351\377\350\350\346\377\345\345\342\377\352\352\350\377\302"
-  "\303\277\373\207\211\205u\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\203|L\200\201~\303\224\227"
-  "\221\311\342\342\341\311\341\341\336\311\326\326\323\311\326\326\323"
-  "\311\326\326\323\311\326\326\323\311\326\326\323\311\266\267\263\334"
-  "\263\264\261\375\347\347\345\377\336\336\333\377\342\342\337\377\345"
-  "\345\343\377\350\350\346\377\352\352\350\377\354\354\352\377\355\355"
-  "\354\377\355\355\354\377\354\354\353\377\353\353\351\377\350\350\346"
-  "\377\345\345\343\377\342\342\337\377\346\346\344\377\314\315\311\377"
-  "\213\215\212\226\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\377\377\377\2\215\217\211\200\247\250\244\302\330\330"
-  "\326\311\256\257\255\311\222\223\217\311\326\326\324\311\350\350\346"
-  "\311\337\337\333\311\331\331\325\311\326\326\323\311\326\326\324\311"
-  "\273\273\267\333\261\262\256\375\346\346\344\377\334\334\331\377\337"
-  "\337\334\377\342\342\337\377\345\345\342\377\347\347\344\377\350\350"
-  "\346\377\351\351\347\377\351\351\347\377\350\350\346\377\347\347\345"
-  "\377\345\345\342\377\342\342\340\377\340\340\335\377\344\344\342\377"
-  "\311\312\307\377\212\214\207\220\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\2\217\217\211\210\270\270\263\302"
-  "\366\366\365\311\347\347\346\311\316\316\314\311\256\257\253\311\221"
-  "\221\214\311\247\247\244\311\320\320\316\311\343\343\341\311\351\351"
-  "\347\311\350\350\346\311\310\310\304\325\241\243\240\374\347\347\345"
-  "\377\331\331\326\377\334\334\331\377\337\337\334\377\341\341\336\377"
-  "\343\343\340\377\344\344\342\377\345\345\343\377\345\345\343\377\344"
-  "\344\342\377\343\343\341\377\341\341\337\377\337\337\334\377\335\335"
-  "\331\377\346\346\343\377\272\273\270\371\211\211\204l\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\217\221\213r\270\270\264"
-  "\302\364\364\364\311\357\357\354\311\357\357\355\311\337\337\336\311"
-  "\316\316\314\311\274\274\274\311\242\242\241\311\224\224\222\311\216"
-  "\221\212\311\212\214\206\311\214\215\210\311\221\222\214\312\213\215"
-  "\210\375\346\346\344\377\330\330\324\377\331\331\325\377\333\333\330"
-  "\377\336\336\332\377\337\337\334\377\340\340\335\377\341\341\336\377"
-  "\341\341\336\377\340\340\335\377\337\337\334\377\336\336\333\377\334"
-  "\334\330\377\331\331\326\377\352\352\347\377\227\230\225\363\206\214"
-  "\206(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\213\213\206"
-  "7\237\241\233\300\364\364\362\311\354\354\351\311\354\354\353\311\357"
-  "\357\355\311\361\361\357\311\343\343\342\311\324\324\323\311\310\310"
-  "\310\311\300\300\300\311\271\271\271\311\270\270\270\311\272\272\272"
-  "\311\275\275\274\311\230\231\226\354\306\306\303\376\342\342\337\377"
-  "\326\326\322\377\330\330\324\377\332\332\326\377\333\333\330\377\334"
-  "\334\331\377\335\335\332\377\335\335\332\377\334\334\331\377\333\333"
-  "\330\377\332\332\326\377\330\330\324\377\336\336\333\377\330\330\325"
-  "\377\213\215\210\331\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\200\200\200\2\216\220\212\265\351\351\350\311\355\355\353\311\351"
-  "\351\350\311\354\354\353\311\357\357\355\311\361\361\357\311\364\364"
-  "\362\311\355\355\354\311\342\342\342\311\332\332\332\311\326\326\326"
-  "\311\324\324\324\311\325\325\325\311\331\331\330\311\303\303\302\321"
-  "\220\222\216\375\343\343\341\377\335\335\332\377\326\326\322\377\326"
-  "\326\322\377\327\327\323\377\330\330\324\377\331\331\325\377\331\331"
-  "\325\377\330\330\325\377\327\327\324\377\326\326\322\377\332\332\326"
-  "\377\347\347\345\377\231\232\226\367knkJ\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\211\214\205E\265\265\262\300\362\362\360\311"
-  "\350\350\346\311\351\351\350\311\354\354\351\311\357\357\355\311\360"
-  "\360\357\311\362\362\361\311\365\365\364\311\367\367\366\311\366\366"
-  "\365\311\362\362\362\311\360\360\360\311\362\362\362\311\360\360\357"
-  "\313\245\246\243\354\213\213\207\376\234\236\231\377\345\345\343\377"
-  "\340\340\335\377\326\326\322\377\326\326\322\377\326\326\322\377\326"
-  "\326\322\377\326\326\322\377\326\326\322\377\326\326\322\377\335\335"
-  "\331\377\351\351\346\377\255\257\253\377\207\211\205\374\200\202\177"
-  "\215\252\252\252\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\221"
-  "\214\236\341\342\341\311\351\351\351\311\347\347\346\311\351\351\347"
-  "\311\351\351\347\311\357\357\354\311\360\360\357\311\362\362\360\311"
-  "\364\364\364\311\366\366\365\311\367\367\366\311\367\367\367\311\371"
-  "\371\371\311\354\354\353\316\230\231\225\370\306\310\304\376\330\330"
-  "\327\377\246\247\245\377\226\227\224\377\332\333\327\377\350\350\346"
-  "\377\337\337\334\377\333\333\327\377\331\331\325\377\332\332\326\377"
-  "\336\336\333\377\346\346\344\377\341\341\336\377\242\244\240\377\236"
-  "\237\233\377\330\330\327\377\256\261\254\367\216\217\212\302\200\200"
-  "\200\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0fff\5\214\217\211\303\364\364\362\311"
-  "\346\346\343\311\347\347\344\311\336\336\333\311\351\351\350\311\355"
-  "\355\353\311\357\357\355\311\361\361\357\311\362\362\361\311\364\364"
-  "\364\311\365\365\364\311\366\366\366\311\350\351\346\317\230\231\224"
-  "\371\331\332\330\376\365\365\364\377\341\341\340\377\313\313\312\377"
-  "\252\253\251\377\217\221\213\377\245\247\243\377\314\315\312\377\336"
-  "\336\333\377\344\344\341\377\340\340\335\377\322\322\320\377\260\261"
-  "\256\377\216\220\212\377\245\245\242\377\315\315\313\377\346\346\344"
-  "\377\367\367\366\377\300\301\275\370\216\217\212\304\216\216\216\11\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\211\211\200\32\227\232\226\300\362\362\361\311\344"
-  "\344\341\311\344\344\342\311\310\310\307\311\351\351\350\311\354\354"
-  "\351\311\357\357\354\311\357\357\357\311\361\361\360\311\362\362\361"
-  "\311\364\364\362\311\360\360\360\312\232\234\230\367\332\332\330\376"
-  "\363\363\363\377\355\355\353\377\357\357\355\377\336\336\335\377\314"
-  "\314\313\377\273\273\273\377\243\243\242\377\225\227\223\377\220\222"
-  "\215\377\215\217\213\377\217\221\215\377\225\226\222\377\240\241\237"
-  "\377\273\273\272\377\315\315\314\377\337\337\336\377\357\357\356\377"
-  "\357\357\355\377\366\366\365\377\276\300\275\370\216\217\213\262\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\207\207\200\"\234\237\233\277\361\361\360\311\343\343"
-  "\341\311\306\306\305\311\333\333\331\311\351\351\347\311\351\351\351"
-  "\311\354\354\351\311\357\357\354\311\357\357\357\311\360\360\357\311"
-  "\361\361\360\311\264\265\261\350\303\303\301\375\364\364\362\377\353"
-  "\353\351\377\355\355\353\377\357\357\356\377\361\361\360\377\341\341"
-  "\340\377\324\324\323\377\310\310\310\377\300\300\277\377\274\274\274"
-  "\377\273\273\273\377\274\274\274\377\301\301\301\377\311\311\311\377"
-  "\325\325\324\377\343\343\342\377\362\362\360\377\357\357\356\377\355"
-  "\355\354\377\355\355\353\377\365\365\364\377\250\250\244\364\210\213"
-  "\206e\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\211\211\211\15\220\221\214\303\364\364\362\311\333\333"
-  "\331\311\270\270\265\311\346\346\343\311\347\347\346\311\351\351\347"
-  "\311\353\353\351\311\354\354\351\311\355\355\354\311\357\357\355\311"
-  "\336\336\336\320\233\234\227\374\362\362\361\377\352\352\350\377\353"
-  "\353\351\377\355\355\353\377\357\357\356\377\361\361\360\377\363\363"
-  "\362\377\355\355\354\377\343\343\342\377\334\334\333\377\330\330\330"
-  "\377\327\327\327\377\330\330\330\377\334\334\334\377\344\344\343\377"
-  "\357\357\356\377\364\364\363\377\362\362\360\377\357\357\356\377\355"
-  "\355\354\377\353\353\351\377\355\355\353\377\357\357\355\377\217\221"
-  "\214\357\217\217\200\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\213\216\212\267\347\347\346\311\313"
-  "\313\312\311\312\312\310\311\344\344\342\311\346\346\343\311\347\347"
-  "\346\311\351\351\347\311\351\351\350\311\353\353\351\311\354\354\353"
-  "\311\254\255\247\354\325\326\324\376\356\356\354\377\350\350\346\377"
-  "\352\352\351\377\355\355\353\377\357\357\355\377\361\361\360\377\363"
-  "\363\362\377\365\365\364\377\367\367\366\377\367\367\366\377\364\364"
-  "\364\377\364\364\364\377\364\364\364\377\370\370\370\377\367\367\367"
-  "\377\365\365\364\377\363\363\362\377\361\361\360\377\357\357\356\377"
-  "\355\355\353\377\353\353\351\377\351\351\347\377\360\360\356\377\313"
-  "\314\311\371\214\216\213\212\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\214\207j\276\276\272\304"
-  "\330\330\326\311\341\341\335\311\343\343\341\311\344\344\342\311\346"
-  "\346\343\311\347\347\346\311\350\350\346\311\351\351\347\311\347\347"
-  "\346\312\215\217\213\375\361\362\360\377\347\347\345\377\350\350\346"
-  "\377\352\352\350\377\352\352\350\377\356\356\354\377\360\360\357\377"
-  "\362\362\361\377\364\364\363\377\366\366\365\377\367\367\367\377\370"
-  "\370\370\377\371\371\370\377\371\371\370\377\367\367\367\377\366\366"
-  "\365\377\364\364\363\377\362\362\361\377\361\361\357\377\356\356\355"
-  "\377\353\353\352\377\352\352\350\377\350\350\346\377\350\350\346\377"
-  "\361\361\357\377\214\216\211\362\231\231\231\5\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0NNC\27\212\213\207"
-  "\277\325\325\324\311\351\351\350\311\341\341\336\311\343\343\341\311"
-  "\344\344\341\311\346\346\343\311\346\346\344\311\347\347\346\311\316"
-  "\317\315\325\252\253\246\374\361\361\360\377\345\345\343\377\347\347"
-  "\345\377\326\326\324\377\353\353\351\377\355\355\354\377\357\357\356"
-  "\377\361\361\360\377\363\363\361\377\364\364\363\377\365\365\364\377"
-  "\366\366\365\377\367\367\366\377\366\366\366\377\366\366\365\377\364"
-  "\364\363\377\363\363\362\377\361\361\360\377\357\357\356\377\356\356"
-  "\354\377\354\354\352\377\352\352\350\377\350\350\345\377\346\346\343"
-  "\377\361\361\360\377\253\256\251\361\211\211\205C\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\16^^[L\220"
-  "\220\214\303\344\344\342\311\357\357\355\311\347\347\346\311\344\344"
-  "\342\311\344\344\342\311\344\344\342\311\346\346\343\311\300\301\277"
-  "\333\271\271\266\375\356\356\355\377\344\344\342\377\332\332\330\377"
-  "\326\326\324\377\352\352\350\377\354\354\352\377\356\356\354\377\357"
-  "\357\356\377\361\361\360\377\362\362\361\377\363\363\362\377\364\364"
-  "\363\377\364\364\363\377\364\364\363\377\364\364\363\377\362\362\361"
-  "\377\361\361\360\377\360\360\356\377\356\356\355\377\354\354\353\377"
-  "\352\352\351\377\332\332\331\377\347\347\344\377\345\345\342\377\355"
-  "\355\353\377\310\310\306\374\210\212\206v\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\13\0\0\0\34UURT\211"
-  "\213\207\300\266\267\265\304\336\336\333\311\354\354\351\311\360\360"
-  "\357\311\364\364\364\311\365\365\364\311\306\306\303\336\274\276\272"
-  "\375\355\355\354\377\343\343\341\377\276\276\275\377\347\347\345\377"
-  "\351\351\347\377\353\353\351\377\354\354\353\377\356\356\354\377\357"
-  "\357\356\377\360\360\357\377\361\361\360\377\362\362\361\377\362\362"
-  "\361\377\362\362\361\377\361\361\360\377\361\361\357\377\357\357\356"
-  "\377\356\356\355\377\355\355\353\377\353\353\351\377\351\351\347\377"
-  "\336\336\333\377\317\317\315\377\344\344\341\377\352\352\350\377\325"
-  "\325\322\377\213\216\211\232\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\21\0\0\0\34\34\34\34-"
-  "ilgf\205\207\200\237\212\214\210\272\212\213\206\302\207\212\205\310"
-  "\210\212\205\311\210\212\205\327\251\253\247\374\360\360\356\377\315"
-  "\315\313\377\303\303\300\377\346\346\343\377\350\350\345\377\351\351"
-  "\347\377\353\353\351\377\354\354\352\377\355\355\354\377\356\356\355"
-  "\377\357\357\356\377\360\360\356\377\360\360\357\377\360\360\356\377"
-  "\357\357\356\377\356\356\355\377\356\356\354\377\354\354\353\377\353"
-  "\353\351\377\352\352\347\377\350\350\346\377\346\346\344\377\266\266"
-  "\264\377\327\327\324\377\352\352\350\377\320\320\316\377\214\216\210"
-  "\220\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\13\0\0\0\21\0\0\0\24\0\0\0\26\0\0\0\26"
-  "\0\0\0\26\0\0\0\26\0\0\0\26<<<&\213\215\211\370\360\360\357\377\272\272"
-  "\267\377\331\331\326\377\345\345\342\377\346\346\344\377\350\350\345"
-  "\377\351\351\347\377\352\352\350\377\353\353\352\377\354\354\353\377"
-  "\355\355\353\377\356\356\354\377\356\356\354\377\356\356\354\377\355"
-  "\355\353\377\354\354\353\377\354\354\352\377\352\352\351\377\351\351"
-  "\347\377\350\350\346\377\346\346\344\377\345\345\342\377\270\270\266"
-  "\377\265\265\263\377\355\355\353\377\273\274\267\366\210\213\206e\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\2\0\0\0\2\0\0"
-  "\0\2\0\0\0\2\0\0\0\2\214\215\211\272\316\317\314\376\323\323\321\377"
-  "\341\341\337\377\343\343\340\377\345\345\342\377\346\346\344\377\347"
-  "\347\345\377\350\350\346\377\351\351\347\377\352\352\350\377\353\353"
-  "\351\377\353\353\351\377\353\353\352\377\353\353\351\377\353\353\351"
-  "\377\352\352\350\377\352\352\347\377\351\351\346\377\347\347\345\377"
-  "\346\346\344\377\345\345\342\377\343\343\341\377\307\307\304\377\254"
-  "\254\252\377\350\350\346\377\217\221\215\366||u#\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0`d`8\207\210\205\367\342\342\341\377\350\350\346\377\341\341\337"
-  "\377\343\343\340\377\344\344\341\377\345\345\343\377\346\346\344\377"
-  "\347\347\345\377\350\350\346\377\351\351\347\377\351\351\347\377\351"
-  "\351\347\377\351\351\347\377\351\351\347\377\350\350\346\377\350\350"
-  "\345\377\347\347\344\377\346\346\343\377\344\344\342\377\343\343\340"
-  "\377\342\342\337\377\325\325\324\377\327\327\326\377\263\264\261\371"
-  "\202\203\177\261\0\0\0\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\26mmkz\227\231"
-  "\225\370\350\350\346\377\356\356\355\377\350\350\346\377\346\346\344"
-  "\377\346\346\344\377\345\345\344\377\346\346\344\377\347\347\345\377"
-  "\350\350\346\377\351\351\346\377\351\351\347\377\351\351\346\377\350"
-  "\350\346\377\350\350\346\377\347\347\345\377\347\347\345\377\347\347"
-  "\344\377\346\346\345\377\351\351\347\377\356\356\355\377\354\354\352"
-  "\377\257\260\256\373\207\210\203\341\36\36\36""3\0\0\0\24\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\22\0\0\0&_a]y\213\216\207\365\265\267\264\370\332"
-  "\332\330\377\346\346\345\377\354\354\352\377\362\362\361\377\361\361"
-  "\360\377\362\362\361\377\361\361\360\377\361\361\357\377\361\361\357"
-  "\377\361\361\357\377\360\360\357\377\360\360\357\377\360\360\357\377"
-  "\357\357\357\377\356\356\355\377\347\347\346\377\334\334\333\377\273"
-  "\274\272\374\216\220\212\370|}y\300\33\33\33A\0\0\0$\0\0\0\20\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\26\0\0\0%\34\34\34""7hhf}\203\204\177"
-  "\275\211\214\206\337\212\213\207\352\212\214\207\364\211\213\206\367"
-  "\211\213\206\367\211\213\206\367\211\213\206\367\211\213\206\367\211"
-  "\213\206\367\211\213\206\367\211\213\206\367\211\213\206\367\211\213"
-  "\206\367\212\214\207\362\212\213\206\342\205\210\203\315qro\223<<<L\0"
-  "\0\0-\0\0\0$\0\0\0\25\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2"
-  "\0\0\0\16\0\0\0\24\0\0\0\30\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0"
-  "\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0"
-  "\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\30\0\0\0\24"
-  "\0\0\0\15\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1"
-  "\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0"
-  "\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
-  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"};
+    { ""
+      /* Pixbuf magic (0x47646b50) */
+      "GdkP"
+      /* length: header (24) + pixel_data (9216) */
+      "\0\0$\30"
+      /* pixdata_type (0x1010002) */
+      "\1\1\0\2"
+      /* rowstride (192) */
+      "\0\0\0\300"
+      /* width (48) */
+      "\0\0\0""0"
+      /* height (48) */
+      "\0\0\0""0"
+      /* pixel_data: */
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\252\252\252\3\205"
+      "\211\201E\217\220\215\217\214\217\212\272\211\213\206\306\213\215\207"
+      "\302\217\220\214\261\215\217\210r\211\211\203'\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\212\217\2052\214\216\211\264\255\256\253\300\333\333\331\311"
+      "\360\360\357\311\367\367\367\311\365\365\364\311\353\354\353\311\320"
+      "\320\315\307\226\226\223\302\215\217\213\213\222\222\200\16\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\216"
+      "\216\213M\223\224\220\301\337\341\336\311\365\365\364\311\364\364\362"
+      "\311\365\365\364\311\366\366\365\311\366\366\366\311\366\366\365\311"
+      "\366\366\365\311\365\365\364\311\307\307\303\305\213\216\212\265\213"
+      "\213\213\26\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\212\217\2052\225\227\222\300\353\353\351\311\360\360\357\311\357\357"
+      "\355\311\362\362\361\311\366\366\365\311\372\372\371\311\373\373\372"
+      "\311\367\367\367\311\365\365\364\311\362\362\360\311\364\364\364\311"
+      "\325\326\324\310\215\220\213\256\222\222\222\7\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\200\200\200\4\216\220\213\265\342\342\341\311"
+      "\354\354\351\311\353\353\351\311\357\357\355\311\364\364\362\311\367"
+      "\367\366\311\373\373\373\311\376\376\374\311\372\372\371\311\365\365"
+      "\364\311\361\361\360\311\355\355\353\311\362\362\361\311\277\300\274"
+      "\303\215\217\212k\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\214"
+      "\206T\266\270\264\301\355\355\353\311\346\346\344\311\351\351\350\311"
+      "\357\357\355\311\362\362\361\311\366\366\365\311\371\371\371\311\372"
+      "\372\372\311\367\367\367\311\364\364\364\311\360\360\357\311\354\354"
+      "\353\311\351\351\350\311\355\355\354\311\220\222\216\274\207\207\207"
+      "\21\377\377\377\1\207\207\207\21\200\200\200\4\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\217\220\212"
+      "\250\336\336\333\311\346\346\343\311\346\346\343\311\351\351\347\311"
+      "\355\355\353\311\360\360\357\311\364\364\362\311\365\365\364\311\366"
+      "\366\365\311\365\365\364\311\362\362\361\311\357\357\355\311\353\353"
+      "\351\311\347\347\346\311\337\337\336\317\235\236\233\343\216\220\213"
+      "\351\212\214\207\374\220\222\215\370\211\213\206\375\215\217\213\351"
+      "\216\220\211\232\212\212\2050\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\222\222\222\7\214\216\211\305\355\355\353\311\341\341\335\311"
+      "\343\343\341\311\347\347\346\311\351\351\350\311\355\355\354\311\360"
+      "\360\357\311\362\362\360\311\362\362\361\311\361\361\360\311\357\357"
+      "\355\311\354\354\351\311\351\351\347\311\263\264\261\344\221\223\216"
+      "\375\306\307\304\376\351\352\350\377\367\367\367\377\371\371\370\377"
+      "\371\371\371\377\357\357\356\377\320\321\317\376\224\226\221\366\215"
+      "\220\212\250\200\200\200\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\211\211"
+      "\34\227\232\225\300\353\353\351\311\336\336\333\311\341\341\336\311\346"
+      "\346\342\311\350\350\346\311\351\351\350\311\354\354\351\311\357\357"
+      "\354\311\357\357\354\311\355\355\353\311\353\353\351\311\351\351\347"
+      "\311\245\246\243\356\252\253\250\375\357\357\356\377\364\364\363\377"
+      "\364\364\362\377\365\365\364\377\367\367\366\377\367\367\366\377\366"
+      "\366\365\377\366\366\365\377\364\364\363\377\274\275\272\371\215\220"
+      "\213\327\210\210\210\17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\211\211\211\34\227\232"
+      "\225\300\351\351\347\311\333\333\330\311\337\337\333\311\342\342\337"
+      "\311\344\344\342\311\347\347\344\311\350\350\346\311\351\351\347\311"
+      "\351\351\350\311\351\351\347\311\350\350\346\311\260\261\256\346\257"
+      "\260\254\375\361\361\360\377\356\356\354\377\357\357\356\377\363\363"
+      "\362\377\367\367\366\377\372\372\372\377\373\373\372\377\370\370\367"
+      "\377\364\364\363\377\361\361\360\377\364\364\363\377\306\306\304\372"
+      "\217\221\213\302\377\377\377\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\222\222\222\7\214\216"
+      "\211\305\351\351\350\311\331\331\325\311\333\333\331\311\337\337\333"
+      "\311\341\341\336\311\343\343\341\311\346\346\342\311\346\346\343\311"
+      "\346\346\343\311\346\346\343\311\323\324\317\321\231\233\227\374\356"
+      "\356\355\377\352\352\350\377\354\354\352\377\360\360\356\377\364\364"
+      "\363\377\370\370\367\377\374\374\374\377\375\375\374\377\371\371\370"
+      "\377\364\364\363\377\360\360\357\377\355\355\353\377\362\362\361\377"
+      "\254\255\251\362\212\214\207Y\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\216\211\251"
+      "\332\332\330\311\333\333\331\311\331\331\325\311\333\333\330\311\336"
+      "\336\332\311\337\337\333\311\341\341\336\311\341\341\336\311\341\341"
+      "\337\311\341\341\336\311\242\243\236\360\323\324\321\377\352\352\347"
+      "\377\347\347\345\377\353\353\351\377\357\357\355\377\363\363\362\377"
+      "\366\366\366\377\371\371\371\377\371\371\371\377\367\367\366\377\363"
+      "\363\362\377\357\357\356\377\354\354\352\377\352\352\350\377\346\346"
+      "\345\377\215\216\212\347\200\200\200\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0}\200z\\\263\263"
+      "\257\302\346\346\343\311\326\326\323\311\330\330\324\311\332\332\326"
+      "\311\333\333\330\311\335\335\331\311\335\335\332\311\335\335\332\311"
+      "\327\327\325\314\217\221\215\375\354\354\353\377\343\343\340\377\346"
+      "\346\343\377\352\352\347\377\355\355\354\377\361\361\357\377\363\363"
+      "\362\377\365\365\364\377\366\366\365\377\364\364\363\377\361\361\360"
+      "\377\356\356\354\377\352\352\350\377\346\346\344\377\357\357\355\377"
+      "\240\242\236\360\206\213\2067\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\40\40\40\20\213\215\210"
+      "\271\333\333\331\311\341\341\335\311\326\326\323\311\326\326\323\311"
+      "\326\326\324\311\330\330\325\311\331\331\325\311\331\331\326\311\300"
+      "\301\275\327\250\251\246\374\353\353\350\377\340\340\335\377\344\344"
+      "\341\377\350\350\345\377\353\353\351\377\356\356\354\377\360\360\357"
+      "\377\361\361\360\377\361\361\360\377\360\360\357\377\356\356\354\377"
+      "\353\353\351\377\350\350\346\377\345\345\342\377\352\352\350\377\302"
+      "\303\277\373\207\211\205u\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\200\203|L\200\201~\303\224\227"
+      "\221\311\342\342\341\311\341\341\336\311\326\326\323\311\326\326\323"
+      "\311\326\326\323\311\326\326\323\311\326\326\323\311\266\267\263\334"
+      "\263\264\261\375\347\347\345\377\336\336\333\377\342\342\337\377\345"
+      "\345\343\377\350\350\346\377\352\352\350\377\354\354\352\377\355\355"
+      "\354\377\355\355\354\377\354\354\353\377\353\353\351\377\350\350\346"
+      "\377\345\345\343\377\342\342\337\377\346\346\344\377\314\315\311\377"
+      "\213\215\212\226\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\377\377\377\2\215\217\211\200\247\250\244\302\330\330"
+      "\326\311\256\257\255\311\222\223\217\311\326\326\324\311\350\350\346"
+      "\311\337\337\333\311\331\331\325\311\326\326\323\311\326\326\324\311"
+      "\273\273\267\333\261\262\256\375\346\346\344\377\334\334\331\377\337"
+      "\337\334\377\342\342\337\377\345\345\342\377\347\347\344\377\350\350"
+      "\346\377\351\351\347\377\351\351\347\377\350\350\346\377\347\347\345"
+      "\377\345\345\342\377\342\342\340\377\340\340\335\377\344\344\342\377"
+      "\311\312\307\377\212\214\207\220\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\377\377\377\2\217\217\211\210\270\270\263\302"
+      "\366\366\365\311\347\347\346\311\316\316\314\311\256\257\253\311\221"
+      "\221\214\311\247\247\244\311\320\320\316\311\343\343\341\311\351\351"
+      "\347\311\350\350\346\311\310\310\304\325\241\243\240\374\347\347\345"
+      "\377\331\331\326\377\334\334\331\377\337\337\334\377\341\341\336\377"
+      "\343\343\340\377\344\344\342\377\345\345\343\377\345\345\343\377\344"
+      "\344\342\377\343\343\341\377\341\341\337\377\337\337\334\377\335\335"
+      "\331\377\346\346\343\377\272\273\270\371\211\211\204l\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\217\221\213r\270\270\264"
+      "\302\364\364\364\311\357\357\354\311\357\357\355\311\337\337\336\311"
+      "\316\316\314\311\274\274\274\311\242\242\241\311\224\224\222\311\216"
+      "\221\212\311\212\214\206\311\214\215\210\311\221\222\214\312\213\215"
+      "\210\375\346\346\344\377\330\330\324\377\331\331\325\377\333\333\330"
+      "\377\336\336\332\377\337\337\334\377\340\340\335\377\341\341\336\377"
+      "\341\341\336\377\340\340\335\377\337\337\334\377\336\336\333\377\334"
+      "\334\330\377\331\331\326\377\352\352\347\377\227\230\225\363\206\214"
+      "\206(\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\213\213\206"
+      "7\237\241\233\300\364\364\362\311\354\354\351\311\354\354\353\311\357"
+      "\357\355\311\361\361\357\311\343\343\342\311\324\324\323\311\310\310"
+      "\310\311\300\300\300\311\271\271\271\311\270\270\270\311\272\272\272"
+      "\311\275\275\274\311\230\231\226\354\306\306\303\376\342\342\337\377"
+      "\326\326\322\377\330\330\324\377\332\332\326\377\333\333\330\377\334"
+      "\334\331\377\335\335\332\377\335\335\332\377\334\334\331\377\333\333"
+      "\330\377\332\332\326\377\330\330\324\377\336\336\333\377\330\330\325"
+      "\377\213\215\210\331\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\200\200\200\2\216\220\212\265\351\351\350\311\355\355\353\311\351"
+      "\351\350\311\354\354\353\311\357\357\355\311\361\361\357\311\364\364"
+      "\362\311\355\355\354\311\342\342\342\311\332\332\332\311\326\326\326"
+      "\311\324\324\324\311\325\325\325\311\331\331\330\311\303\303\302\321"
+      "\220\222\216\375\343\343\341\377\335\335\332\377\326\326\322\377\326"
+      "\326\322\377\327\327\323\377\330\330\324\377\331\331\325\377\331\331"
+      "\325\377\330\330\325\377\327\327\324\377\326\326\322\377\332\332\326"
+      "\377\347\347\345\377\231\232\226\367knkJ\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\211\214\205E\265\265\262\300\362\362\360\311"
+      "\350\350\346\311\351\351\350\311\354\354\351\311\357\357\355\311\360"
+      "\360\357\311\362\362\361\311\365\365\364\311\367\367\366\311\366\366"
+      "\365\311\362\362\362\311\360\360\360\311\362\362\362\311\360\360\357"
+      "\313\245\246\243\354\213\213\207\376\234\236\231\377\345\345\343\377"
+      "\340\340\335\377\326\326\322\377\326\326\322\377\326\326\322\377\326"
+      "\326\322\377\326\326\322\377\326\326\322\377\326\326\322\377\335\335"
+      "\331\377\351\351\346\377\255\257\253\377\207\211\205\374\200\202\177"
+      "\215\252\252\252\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\220\221"
+      "\214\236\341\342\341\311\351\351\351\311\347\347\346\311\351\351\347"
+      "\311\351\351\347\311\357\357\354\311\360\360\357\311\362\362\360\311"
+      "\364\364\364\311\366\366\365\311\367\367\366\311\367\367\367\311\371"
+      "\371\371\311\354\354\353\316\230\231\225\370\306\310\304\376\330\330"
+      "\327\377\246\247\245\377\226\227\224\377\332\333\327\377\350\350\346"
+      "\377\337\337\334\377\333\333\327\377\331\331\325\377\332\332\326\377"
+      "\336\336\333\377\346\346\344\377\341\341\336\377\242\244\240\377\236"
+      "\237\233\377\330\330\327\377\256\261\254\367\216\217\212\302\200\200"
+      "\200\12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0fff\5\214\217\211\303\364\364\362\311"
+      "\346\346\343\311\347\347\344\311\336\336\333\311\351\351\350\311\355"
+      "\355\353\311\357\357\355\311\361\361\357\311\362\362\361\311\364\364"
+      "\364\311\365\365\364\311\366\366\366\311\350\351\346\317\230\231\224"
+      "\371\331\332\330\376\365\365\364\377\341\341\340\377\313\313\312\377"
+      "\252\253\251\377\217\221\213\377\245\247\243\377\314\315\312\377\336"
+      "\336\333\377\344\344\341\377\340\340\335\377\322\322\320\377\260\261"
+      "\256\377\216\220\212\377\245\245\242\377\315\315\313\377\346\346\344"
+      "\377\367\367\366\377\300\301\275\370\216\217\212\304\216\216\216\11\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\211\211\200\32\227\232\226\300\362\362\361\311\344"
+      "\344\341\311\344\344\342\311\310\310\307\311\351\351\350\311\354\354"
+      "\351\311\357\357\354\311\357\357\357\311\361\361\360\311\362\362\361"
+      "\311\364\364\362\311\360\360\360\312\232\234\230\367\332\332\330\376"
+      "\363\363\363\377\355\355\353\377\357\357\355\377\336\336\335\377\314"
+      "\314\313\377\273\273\273\377\243\243\242\377\225\227\223\377\220\222"
+      "\215\377\215\217\213\377\217\221\215\377\225\226\222\377\240\241\237"
+      "\377\273\273\272\377\315\315\314\377\337\337\336\377\357\357\356\377"
+      "\357\357\355\377\366\366\365\377\276\300\275\370\216\217\213\262\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\207\207\200\"\234\237\233\277\361\361\360\311\343\343"
+      "\341\311\306\306\305\311\333\333\331\311\351\351\347\311\351\351\351"
+      "\311\354\354\351\311\357\357\354\311\357\357\357\311\360\360\357\311"
+      "\361\361\360\311\264\265\261\350\303\303\301\375\364\364\362\377\353"
+      "\353\351\377\355\355\353\377\357\357\356\377\361\361\360\377\341\341"
+      "\340\377\324\324\323\377\310\310\310\377\300\300\277\377\274\274\274"
+      "\377\273\273\273\377\274\274\274\377\301\301\301\377\311\311\311\377"
+      "\325\325\324\377\343\343\342\377\362\362\360\377\357\357\356\377\355"
+      "\355\354\377\355\355\353\377\365\365\364\377\250\250\244\364\210\213"
+      "\206e\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\211\211\211\15\220\221\214\303\364\364\362\311\333\333"
+      "\331\311\270\270\265\311\346\346\343\311\347\347\346\311\351\351\347"
+      "\311\353\353\351\311\354\354\351\311\355\355\354\311\357\357\355\311"
+      "\336\336\336\320\233\234\227\374\362\362\361\377\352\352\350\377\353"
+      "\353\351\377\355\355\353\377\357\357\356\377\361\361\360\377\363\363"
+      "\362\377\355\355\354\377\343\343\342\377\334\334\333\377\330\330\330"
+      "\377\327\327\327\377\330\330\330\377\334\334\334\377\344\344\343\377"
+      "\357\357\356\377\364\364\363\377\362\362\360\377\357\357\356\377\355"
+      "\355\354\377\353\353\351\377\355\355\353\377\357\357\355\377\217\221"
+      "\214\357\217\217\200\20\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\213\216\212\267\347\347\346\311\313"
+      "\313\312\311\312\312\310\311\344\344\342\311\346\346\343\311\347\347"
+      "\346\311\351\351\347\311\351\351\350\311\353\353\351\311\354\354\353"
+      "\311\254\255\247\354\325\326\324\376\356\356\354\377\350\350\346\377"
+      "\352\352\351\377\355\355\353\377\357\357\355\377\361\361\360\377\363"
+      "\363\362\377\365\365\364\377\367\367\366\377\367\367\366\377\364\364"
+      "\364\377\364\364\364\377\364\364\364\377\370\370\370\377\367\367\367"
+      "\377\365\365\364\377\363\363\362\377\361\361\360\377\357\357\356\377"
+      "\355\355\353\377\353\353\351\377\351\351\347\377\360\360\356\377\313"
+      "\314\311\371\214\216\213\212\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\214\214\207j\276\276\272\304"
+      "\330\330\326\311\341\341\335\311\343\343\341\311\344\344\342\311\346"
+      "\346\343\311\347\347\346\311\350\350\346\311\351\351\347\311\347\347"
+      "\346\312\215\217\213\375\361\362\360\377\347\347\345\377\350\350\346"
+      "\377\352\352\350\377\352\352\350\377\356\356\354\377\360\360\357\377"
+      "\362\362\361\377\364\364\363\377\366\366\365\377\367\367\367\377\370"
+      "\370\370\377\371\371\370\377\371\371\370\377\367\367\367\377\366\366"
+      "\365\377\364\364\363\377\362\362\361\377\361\361\357\377\356\356\355"
+      "\377\353\353\352\377\352\352\350\377\350\350\346\377\350\350\346\377"
+      "\361\361\357\377\214\216\211\362\231\231\231\5\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0NNC\27\212\213\207"
+      "\277\325\325\324\311\351\351\350\311\341\341\336\311\343\343\341\311"
+      "\344\344\341\311\346\346\343\311\346\346\344\311\347\347\346\311\316"
+      "\317\315\325\252\253\246\374\361\361\360\377\345\345\343\377\347\347"
+      "\345\377\326\326\324\377\353\353\351\377\355\355\354\377\357\357\356"
+      "\377\361\361\360\377\363\363\361\377\364\364\363\377\365\365\364\377"
+      "\366\366\365\377\367\367\366\377\366\366\366\377\366\366\365\377\364"
+      "\364\363\377\363\363\362\377\361\361\360\377\357\357\356\377\356\356"
+      "\354\377\354\354\352\377\352\352\350\377\350\350\345\377\346\346\343"
+      "\377\361\361\360\377\253\256\251\361\211\211\205C\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\16^^[L\220"
+      "\220\214\303\344\344\342\311\357\357\355\311\347\347\346\311\344\344"
+      "\342\311\344\344\342\311\344\344\342\311\346\346\343\311\300\301\277"
+      "\333\271\271\266\375\356\356\355\377\344\344\342\377\332\332\330\377"
+      "\326\326\324\377\352\352\350\377\354\354\352\377\356\356\354\377\357"
+      "\357\356\377\361\361\360\377\362\362\361\377\363\363\362\377\364\364"
+      "\363\377\364\364\363\377\364\364\363\377\364\364\363\377\362\362\361"
+      "\377\361\361\360\377\360\360\356\377\356\356\355\377\354\354\353\377"
+      "\352\352\351\377\332\332\331\377\347\347\344\377\345\345\342\377\355"
+      "\355\353\377\310\310\306\374\210\212\206v\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\13\0\0\0\34UURT\211"
+      "\213\207\300\266\267\265\304\336\336\333\311\354\354\351\311\360\360"
+      "\357\311\364\364\364\311\365\365\364\311\306\306\303\336\274\276\272"
+      "\375\355\355\354\377\343\343\341\377\276\276\275\377\347\347\345\377"
+      "\351\351\347\377\353\353\351\377\354\354\353\377\356\356\354\377\357"
+      "\357\356\377\360\360\357\377\361\361\360\377\362\362\361\377\362\362"
+      "\361\377\362\362\361\377\361\361\360\377\361\361\357\377\357\357\356"
+      "\377\356\356\355\377\355\355\353\377\353\353\351\377\351\351\347\377"
+      "\336\336\333\377\317\317\315\377\344\344\341\377\352\352\350\377\325"
+      "\325\322\377\213\216\211\232\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\21\0\0\0\34\34\34\34-"
+      "ilgf\205\207\200\237\212\214\210\272\212\213\206\302\207\212\205\310"
+      "\210\212\205\311\210\212\205\327\251\253\247\374\360\360\356\377\315"
+      "\315\313\377\303\303\300\377\346\346\343\377\350\350\345\377\351\351"
+      "\347\377\353\353\351\377\354\354\352\377\355\355\354\377\356\356\355"
+      "\377\357\357\356\377\360\360\356\377\360\360\357\377\360\360\356\377"
+      "\357\357\356\377\356\356\355\377\356\356\354\377\354\354\353\377\353"
+      "\353\351\377\352\352\347\377\350\350\346\377\346\346\344\377\266\266"
+      "\264\377\327\327\324\377\352\352\350\377\320\320\316\377\214\216\210"
+      "\220\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\13\0\0\0\21\0\0\0\24\0\0\0\26\0\0\0\26"
+      "\0\0\0\26\0\0\0\26\0\0\0\26<<<&\213\215\211\370\360\360\357\377\272\272"
+      "\267\377\331\331\326\377\345\345\342\377\346\346\344\377\350\350\345"
+      "\377\351\351\347\377\352\352\350\377\353\353\352\377\354\354\353\377"
+      "\355\355\353\377\356\356\354\377\356\356\354\377\356\356\354\377\355"
+      "\355\353\377\354\354\353\377\354\354\352\377\352\352\351\377\351\351"
+      "\347\377\350\350\346\377\346\346\344\377\345\345\342\377\270\270\266"
+      "\377\265\265\263\377\355\355\353\377\273\274\267\366\210\213\206e\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\2\0\0\0\2\0\0"
+      "\0\2\0\0\0\2\0\0\0\2\214\215\211\272\316\317\314\376\323\323\321\377"
+      "\341\341\337\377\343\343\340\377\345\345\342\377\346\346\344\377\347"
+      "\347\345\377\350\350\346\377\351\351\347\377\352\352\350\377\353\353"
+      "\351\377\353\353\351\377\353\353\352\377\353\353\351\377\353\353\351"
+      "\377\352\352\350\377\352\352\347\377\351\351\346\377\347\347\345\377"
+      "\346\346\344\377\345\345\342\377\343\343\341\377\307\307\304\377\254"
+      "\254\252\377\350\350\346\377\217\221\215\366||u#\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0`d`8\207\210\205\367\342\342\341\377\350\350\346\377\341\341\337"
+      "\377\343\343\340\377\344\344\341\377\345\345\343\377\346\346\344\377"
+      "\347\347\345\377\350\350\346\377\351\351\347\377\351\351\347\377\351"
+      "\351\347\377\351\351\347\377\351\351\347\377\350\350\346\377\350\350"
+      "\345\377\347\347\344\377\346\346\343\377\344\344\342\377\343\343\340"
+      "\377\342\342\337\377\325\325\324\377\327\327\326\377\263\264\261\371"
+      "\202\203\177\261\0\0\0\21\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\26mmkz\227\231"
+      "\225\370\350\350\346\377\356\356\355\377\350\350\346\377\346\346\344"
+      "\377\346\346\344\377\345\345\344\377\346\346\344\377\347\347\345\377"
+      "\350\350\346\377\351\351\346\377\351\351\347\377\351\351\346\377\350"
+      "\350\346\377\350\350\346\377\347\347\345\377\347\347\345\377\347\347"
+      "\344\377\346\346\345\377\351\351\347\377\356\356\355\377\354\354\352"
+      "\377\257\260\256\373\207\210\203\341\36\36\36""3\0\0\0\24\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\22\0\0\0&_a]y\213\216\207\365\265\267\264\370\332"
+      "\332\330\377\346\346\345\377\354\354\352\377\362\362\361\377\361\361"
+      "\360\377\362\362\361\377\361\361\360\377\361\361\357\377\361\361\357"
+      "\377\361\361\357\377\360\360\357\377\360\360\357\377\360\360\357\377"
+      "\357\357\357\377\356\356\355\377\347\347\346\377\334\334\333\377\273"
+      "\274\272\374\216\220\212\370|}y\300\33\33\33A\0\0\0$\0\0\0\20\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\26\0\0\0%\34\34\34""7hhf}\203\204\177"
+      "\275\211\214\206\337\212\213\207\352\212\214\207\364\211\213\206\367"
+      "\211\213\206\367\211\213\206\367\211\213\206\367\211\213\206\367\211"
+      "\213\206\367\211\213\206\367\211\213\206\367\211\213\206\367\211\213"
+      "\206\367\212\214\207\362\212\213\206\342\205\210\203\315qro\223<<<L\0"
+      "\0\0-\0\0\0$\0\0\0\25\0\0\0\3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2"
+      "\0\0\0\16\0\0\0\24\0\0\0\30\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0"
+      "\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0"
+      "\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\32\0\0\0\30\0\0\0\24"
+      "\0\0\0\15\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1"
+      "\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0"
+      "\0\1\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+      "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
+    };
 
 
 
diff --git a/sflphone-client-gnome/src/imwindow.c b/sflphone-client-gnome/src/imwindow.c
index 60d99aed98bc2a12302b51535e23131a315f6948..44f9be1b2ba3ca2d0f113011340e195945ddf948 100644
--- a/sflphone-client-gnome/src/imwindow.c
+++ b/sflphone-client-gnome/src/imwindow.c
@@ -42,184 +42,189 @@
 GtkWidget *im_window = NULL;
 GtkWidget *im_notebook = NULL;
 
-static gboolean window_configure_cb (GtkWidget *win, GdkEventConfigure *event) {
-	int pos_x, pos_y;
+static gboolean window_configure_cb (GtkWidget *win, GdkEventConfigure *event)
+{
+    int pos_x, pos_y;
 
-	eel_gconf_set_integer (CONF_IM_WINDOW_WIDTH, event->width);
-	eel_gconf_set_integer (CONF_IM_WINDOW_HEIGHT, event->height);
+    eel_gconf_set_integer (CONF_IM_WINDOW_WIDTH, event->width);
+    eel_gconf_set_integer (CONF_IM_WINDOW_HEIGHT, event->height);
 
-	gtk_window_get_position (GTK_WINDOW (im_window_get()), &pos_x, &pos_y);
-	eel_gconf_set_integer (CONF_IM_WINDOW_POSITION_X, pos_x);
-	eel_gconf_set_integer (CONF_IM_WINDOW_POSITION_Y, pos_y);
+    gtk_window_get_position (GTK_WINDOW (im_window_get()), &pos_x, &pos_y);
+    eel_gconf_set_integer (CONF_IM_WINDOW_POSITION_X, pos_x);
+    eel_gconf_set_integer (CONF_IM_WINDOW_POSITION_Y, pos_y);
 
-	return FALSE;
+    return FALSE;
 }
 
 /**
  * Minimize the main window.
  */
-	static gboolean
-on_delete(GtkWidget * widget UNUSED, gpointer data UNUSED)
+static gboolean
+on_delete (GtkWidget * widget UNUSED, gpointer data UNUSED)
 {
-	/* Only hide the main window that contains all the instant messaging instances */
-	gtk_widget_hide (GTK_WIDGET(im_window_get()));
-	return TRUE;
+    /* Only hide the main window that contains all the instant messaging instances */
+    gtk_widget_hide (GTK_WIDGET (im_window_get()));
+    return TRUE;
 }
 
-	static void
+static void
 on_switch_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer userdata)
 {
-	guint index = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
-	g_print ("switch to %i-  current = %i\n", page_num, index);
+    guint index = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
+    g_print ("switch to %i-  current = %i\n", page_num, index);
 }
 
-	static void
+static void
 im_window_init()
 {
-	const char *window_title = "SFLphone IM Client";
-	gchar *path;
-	GError *error = NULL;
-	gboolean ret;
-	int width, height, position_x, position_y;
-
-	// Get configuration stored in gconf
-	width = eel_gconf_get_integer(CONF_IM_WINDOW_WIDTH);
-	if (width <= 0)
-		width = 400;
-	height = eel_gconf_get_integer(CONF_IM_WINDOW_HEIGHT);
-	if (height <= 0)
-		height = 500;
-	position_x = eel_gconf_get_integer(CONF_IM_WINDOW_POSITION_X);
-	position_y = eel_gconf_get_integer(CONF_IM_WINDOW_POSITION_Y);
-
-	im_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-	gtk_container_set_border_width(GTK_CONTAINER(im_window), 0);
-	gtk_window_set_title(GTK_WINDOW(im_window), window_title);
-	gtk_window_set_default_size(GTK_WINDOW (im_window), width, height);
-	gtk_window_set_default_icon_from_file(LOGO, NULL);
-	gtk_window_set_position(GTK_WINDOW(im_window), GTK_WIN_POS_MOUSE);
-
-	gtk_widget_set_name(im_window, "imwindow");
-
-	GtkWidget *im_vbox = gtk_vbox_new (FALSE /*homogeneous*/, 0 /*spacing*/);
-	im_notebook = gtk_notebook_new ();
-
-	gtk_container_add (GTK_CONTAINER (im_window), im_vbox);
-	gtk_box_pack_start (GTK_BOX (im_vbox), im_notebook, TRUE, TRUE, 0);
-	gtk_widget_show (im_notebook);
-
-	g_signal_connect (G_OBJECT (im_window), "delete-event", G_CALLBACK (on_delete), NULL);
-	g_signal_connect_object (G_OBJECT (im_window), "configure-event", G_CALLBACK (window_configure_cb), NULL, 0);
-	g_signal_connect (G_OBJECT (im_notebook), "switch-page", G_CALLBACK (on_switch_page), NULL);
-
-	/* make sure that everything is visible */
-	gtk_widget_show_all (im_window);
-
-	// Restore position according to the configuration stored in gconf
-	gtk_window_move (GTK_WINDOW (im_window), position_x, position_y);
+    const char *window_title = "SFLphone IM Client";
+    gchar *path;
+    GError *error = NULL;
+    gboolean ret;
+    int width, height, position_x, position_y;
+
+    // Get configuration stored in gconf
+    width = eel_gconf_get_integer (CONF_IM_WINDOW_WIDTH);
+
+    if (width <= 0)
+        width = 400;
+
+    height = eel_gconf_get_integer (CONF_IM_WINDOW_HEIGHT);
+
+    if (height <= 0)
+        height = 500;
+
+    position_x = eel_gconf_get_integer (CONF_IM_WINDOW_POSITION_X);
+    position_y = eel_gconf_get_integer (CONF_IM_WINDOW_POSITION_Y);
+
+    im_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+    gtk_container_set_border_width (GTK_CONTAINER (im_window), 0);
+    gtk_window_set_title (GTK_WINDOW (im_window), window_title);
+    gtk_window_set_default_size (GTK_WINDOW (im_window), width, height);
+    gtk_window_set_default_icon_from_file (LOGO, NULL);
+    gtk_window_set_position (GTK_WINDOW (im_window), GTK_WIN_POS_MOUSE);
+    // gtk_window_set_resizable (GTK_WINDOW(im_window), FALSE);
+    gtk_widget_set_name (im_window, "imwindow");
+
+    GtkWidget *im_vbox = gtk_vbox_new (FALSE /*homogeneous*/, 0 /*spacing*/);
+    im_notebook = gtk_notebook_new ();
+
+    gtk_container_add (GTK_CONTAINER (im_window), im_vbox);
+    gtk_box_pack_start (GTK_BOX (im_vbox), im_notebook, TRUE, TRUE, 0);
+    gtk_widget_show (im_notebook);
+
+    g_signal_connect (G_OBJECT (im_window), "delete-event", G_CALLBACK (on_delete), NULL);
+    g_signal_connect_object (G_OBJECT (im_window), "configure-event", G_CALLBACK (window_configure_cb), NULL, 0);
+    g_signal_connect (G_OBJECT (im_notebook), "switch-page", G_CALLBACK (on_switch_page), NULL);
+
+    /* make sure that everything is visible */
+    gtk_widget_show_all (im_window);
+
+    // Restore position according to the configuration stored in gconf
+    gtk_window_move (GTK_WINDOW (im_window), position_x, position_y);
 }
 
-	GtkWidget *
+GtkWidget *
 im_window_get()
 {
-	if (im_window == NULL)
-		im_window_init();
-	return im_window;
+    if (im_window == NULL)
+        im_window_init();
+
+    return im_window;
 }
 
-	void
+void
 im_window_show ()
 {
-	gtk_widget_show (im_window_get ());
+    gtk_widget_show (im_window_get ());
 }
 
-	void
+void
 im_window_add (GtkWidget *widget)
 {
-	if (im_window_get()) {
-		/* Add the new tab to the notebook */
-		im_window_add_tab (widget);
-
-		/* Show it all */
-		gtk_widget_show_all (im_window);
-	}
-	else
-		error ("Could not create the main instant messaging window");
+    if (im_window_get()) {
+        /* Add the new tab to the notebook */
+        im_window_add_tab (widget);
+
+        /* Show it all */
+        gtk_widget_show_all (im_window);
+    } else
+        error ("Could not create the main instant messaging window");
 }
 
-	static void
+static void
 close_tab_cb (GtkButton *button, gpointer userdata)
 {
-	/* We want here to close the current tab */
-	im_window_remove_tab (GTK_WIDGET (userdata));
+    /* We want here to close the current tab */
+    im_window_remove_tab (GTK_WIDGET (userdata));
 
-	/* If no tabs are opened anymore, close the IM window */
-	// gtk_widget_destroy (im_window);
+    /* If no tabs are opened anymore, close the IM window */
+    // gtk_widget_destroy (im_window);
 }
 
-	void
+void
 im_window_add_tab (GtkWidget *widget)
-{	
-	/* Cast the paramater */
-	IMWidget *im = IM_WIDGET(widget);
-
-	/* Fetch the call */
-	callable_obj_t *im_widget_call = calllist_get (current_calls, im->call_id);
-
-	/* A container to include the tab label and the close button */
-	GtkWidget *tab_Container = gtk_hbox_new (FALSE, 3);
-	GtkWidget *tab_Label = gtk_label_new (get_peer_information (im_widget_call));
-	GtkWidget *tab_CloseButton = gtk_button_new ();
-
-	/* Pack it all */
-	gtk_button_set_relief (GTK_BUTTON(tab_CloseButton), GTK_RELIEF_NONE);
-	gtk_box_pack_start (GTK_BOX (tab_Container), tab_Label, TRUE, TRUE, 0);
-	gtk_box_pack_start (GTK_BOX (tab_Container), tab_CloseButton, FALSE, FALSE, 0);
-	gtk_container_add(GTK_CONTAINER (tab_CloseButton), gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU));
-	
-	/* Connect a signal to the close button on each tab, to be able to close the tabs individually */
-	g_signal_connect (tab_CloseButton, "clicked", G_CALLBACK (close_tab_cb), widget);
-
-	/* Show it */
-	gtk_widget_show_all (tab_Container);
-
-	/* Add the page to the notebook */
-	gtk_notebook_append_page (GTK_NOTEBOOK (im_notebook), widget, tab_Container);
-
-	/* TODO Switch to the newly opened tab. Still not working */
-	guint tabIndex = gtk_notebook_page_num (GTK_NOTEBOOK (im_notebook), widget);
-	gtk_notebook_set_current_page (GTK_NOTEBOOK (im_notebook), tabIndex);
-
-	/* Decide whether or not displaying the tabs of the notebook */
-	im_window_hide_show_tabs ();
+{
+    /* Cast the paramater */
+    IMWidget *im = IM_WIDGET (widget);
+
+    /* Fetch the call */
+    callable_obj_t *im_widget_call = calllist_get (current_calls, im->call_id);
+
+    /* A container to include the tab label and the close button */
+    GtkWidget *tab_Container = gtk_hbox_new (FALSE, 3);
+    GtkWidget *tab_Label = gtk_label_new (get_peer_information (im_widget_call));
+    GtkWidget *tab_CloseButton = gtk_button_new ();
+
+    /* Pack it all */
+    gtk_button_set_relief (GTK_BUTTON (tab_CloseButton), GTK_RELIEF_NONE);
+    gtk_box_pack_start (GTK_BOX (tab_Container), tab_Label, TRUE, TRUE, 0);
+    gtk_box_pack_start (GTK_BOX (tab_Container), tab_CloseButton, FALSE, FALSE, 0);
+    gtk_container_add (GTK_CONTAINER (tab_CloseButton), gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU));
+
+    /* Connect a signal to the close button on each tab, to be able to close the tabs individually */
+    g_signal_connect (tab_CloseButton, "clicked", G_CALLBACK (close_tab_cb), widget);
+
+    /* Show it */
+    gtk_widget_show_all (tab_Container);
+
+    /* Add the page to the notebook */
+    gtk_notebook_append_page (GTK_NOTEBOOK (im_notebook), widget, tab_Container);
+
+    /* TODO Switch to the newly opened tab. Still not working */
+    guint tabIndex = gtk_notebook_page_num (GTK_NOTEBOOK (im_notebook), widget);
+    gtk_notebook_set_current_page (GTK_NOTEBOOK (im_notebook), tabIndex);
+
+    /* Decide whether or not displaying the tabs of the notebook */
+    im_window_hide_show_tabs ();
 }
 
-	void
+void
 im_window_hide_show_tabs ()
 {
-	/* If only one tab is open, do not display the tab, only the content */
-	if (gtk_notebook_get_n_pages (GTK_NOTEBOOK (im_notebook)) == 1) {
-		gtk_notebook_set_show_tabs (GTK_NOTEBOOK (im_notebook), FALSE);
-	}
-	else
-		gtk_notebook_set_show_tabs (GTK_NOTEBOOK (im_notebook), TRUE);
+    /* If only one tab is open, do not display the tab, only the content */
+    if (gtk_notebook_get_n_pages (GTK_NOTEBOOK (im_notebook)) == 1) {
+        gtk_notebook_set_show_tabs (GTK_NOTEBOOK (im_notebook), FALSE);
+    } else
+        gtk_notebook_set_show_tabs (GTK_NOTEBOOK (im_notebook), TRUE);
 }
 
-	void
+void
 im_window_remove_tab (GtkWidget *widget)
 {
-	// Remove the widget from the window
-	
-	/* We want here to close the current tab */
+    // Remove the widget from the window
+
+    /* We want here to close the current tab */
     guint index = gtk_notebook_page_num (GTK_NOTEBOOK (im_notebook), GTK_WIDGET (widget));
     gtk_notebook_remove_page (GTK_NOTEBOOK (im_notebook), index);
 
-	/* Need to do some memory clean up, so that we could re-open an Im widget for this call later. */
-	IMWidget *im = IM_WIDGET(widget);
-	callable_obj_t *call = calllist_get (current_calls, im->call_id);
-	if (call)
-		call->_im_widget = NULL;
+    /* Need to do some memory clean up, so that we could re-open an Im widget for this call later. */
+    IMWidget *im = IM_WIDGET (widget);
+    callable_obj_t *call = calllist_get (current_calls, im->call_id);
+
+    if (call)
+        call->_im_widget = NULL;
 
-	/* Decide whether or not displaying the tabs of the notebook */
-	im_window_hide_show_tabs ();
+    /* Decide whether or not displaying the tabs of the notebook */
+    im_window_hide_show_tabs ();
 }
diff --git a/sflphone-client-gnome/src/imwindow.h b/sflphone-client-gnome/src/imwindow.h
index c97ee2f14303da056a277900a179d9e6322eaf3e..028efc677a74d280d057d9c7ec4aac3c80d63107 100644
--- a/sflphone-client-gnome/src/imwindow.h
+++ b/sflphone-client-gnome/src/imwindow.h
@@ -51,7 +51,7 @@ GtkWidget *im_window_get();
 /*!	@function
 @abstract	Add IM widget to the IM window
  */
-void im_window_add(GtkWidget *widget);
+void im_window_add (GtkWidget *widget);
 
 /*! @function
  @abstract	Remove IM widget from the IM window
diff --git a/sflphone-client-gnome/src/main.c b/sflphone-client-gnome/src/main.c
index 38cb5cd3f7a05b423116e4727294c168277a414d..b4cdb9a06eafbc52e23654431ac4ab911707b421 100644
--- a/sflphone-client-gnome/src/main.c
+++ b/sflphone-client-gnome/src/main.c
@@ -48,9 +48,8 @@
 static void
 shutdown_logging ()
 {
-  if (log4c_fini ())
-    {
-      ERROR("log4c_fini() failed");
+    if (log4c_fini ()) {
+        ERROR ("log4c_fini() failed");
     }
 }
 
@@ -60,98 +59,97 @@ shutdown_logging ()
 static void
 startup_logging ()
 {
-  log4c_init ();
-  if (log4c_load (DATA_DIR "/log4crc") == -1)
-    g_warning ("Cannot load log4j configuration file : %s", DATA_DIR "/log4crc");
+    log4c_init ();
 
-  log4c_sfl_gtk_category = log4c_category_get ("org.sflphone.gtk");
+    if (log4c_load (DATA_DIR "/log4crc") == -1)
+        g_warning ("Cannot load log4j configuration file : %s", DATA_DIR "/log4crc");
+
+    log4c_sfl_gtk_category = log4c_category_get ("org.sflphone.gtk");
 }
 
 int
 main (int argc, char *argv[])
 {
-  // Handle logging
-  int i;
+    // Handle logging
+    int i;
 
-  // Startup logging
-  startup_logging ();
+    // Startup logging
+    startup_logging ();
 
-  // Check arguments if debug mode is activated
-  for (i = 0; i < argc; i++)
-    if (g_strcmp0 (argv[i], "--debug") == 0)
-      log4c_category_set_priority (log4c_sfl_gtk_category, LOG4C_PRIORITY_DEBUG);
+    // Check arguments if debug mode is activated
+    for (i = 0; i < argc; i++)
+        if (g_strcmp0 (argv[i], "--debug") == 0)
+            log4c_category_set_priority (log4c_sfl_gtk_category, LOG4C_PRIORITY_DEBUG);
 
-  // Start GTK application
+    // Start GTK application
 
-  gtk_init (&argc, &argv);
+    gtk_init (&argc, &argv);
 
-  g_print ("%s %s\n", PACKAGE, VERSION);
-  g_print ("\nCopyright (c) 2005 2006 2007 2008 2009 2010 Savoir-faire Linux Inc.\n\n");
-  g_print ("This is free software.  You may redistribute copies of it under the terms of\n" \
-           "the GNU General Public License Version 3 <http://www.gnu.org/licenses/gpl.html>.\n" \
-           "There is NO WARRANTY, to the extent permitted by law.\n\n" \
-           "Additional permission under GNU GPL version 3 section 7:\n\n" \
-           "If you modify this program, or any covered work, by linking or\n" \
-           "combining it with the OpenSSL project's OpenSSL library (or a\n" \
-           "modified version of that library), containing parts covered by the\n" \
-           "terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.\n" \
-           "grants you additional permission to convey the resulting work.\n" \
-           "Corresponding Source for a non-source form of such a combination\n" \
-           "shall include the source code for the parts of OpenSSL used as well\n" \
-           "as that of the covered work.\n\n");
+    g_print ("%s %s\n", PACKAGE, VERSION);
+    g_print ("\nCopyright (c) 2005 2006 2007 2008 2009 2010 Savoir-faire Linux Inc.\n\n");
+    g_print ("This is free software.  You may redistribute copies of it under the terms of\n" \
+             "the GNU General Public License Version 3 <http://www.gnu.org/licenses/gpl.html>.\n" \
+             "There is NO WARRANTY, to the extent permitted by law.\n\n" \
+             "Additional permission under GNU GPL version 3 section 7:\n\n" \
+             "If you modify this program, or any covered work, by linking or\n" \
+             "combining it with the OpenSSL project's OpenSSL library (or a\n" \
+             "modified version of that library), containing parts covered by the\n" \
+             "terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.\n" \
+             "grants you additional permission to convey the resulting work.\n" \
+             "Corresponding Source for a non-source form of such a combination\n" \
+             "shall include the source code for the parts of OpenSSL used as well\n" \
+             "as that of the covered work.\n\n");
 
-  DEBUG("Logging Started");
+    DEBUG ("Logging Started");
 
-  srand (time (NULL));
+    srand (time (NULL));
 
-  // Internationalization
-  bindtextdomain ("sflphone-client-gnome", LOCALEDIR);
-  textdomain ("sflphone-client-gnome");
+    // Internationalization
+    bindtextdomain ("sflphone-client-gnome", LOCALEDIR);
+    textdomain ("sflphone-client-gnome");
 
-  // Initialises the GNOME libraries
-  gnome_program_init ("sflphone", VERSION, LIBGNOMEUI_MODULE, argc, argv,
-      GNOME_PROGRAM_STANDARD_PROPERTIES,
-						NULL) ;
+    // Initialises the GNOME libraries
+    gnome_program_init ("sflphone", VERSION, LIBGNOMEUI_MODULE, argc, argv,
+                        GNOME_PROGRAM_STANDARD_PROPERTIES,
+                        NULL) ;
 
-  if (sflphone_init ())
-    {
+    if (sflphone_init ()) {
 
-      if (eel_gconf_get_integer (SHOW_STATUSICON))
-		  show_status_icon ();
+        if (eel_gconf_get_integer (SHOW_STATUSICON))
+            show_status_icon ();
 
-      create_main_window ();
+        create_main_window ();
 
-      if (eel_gconf_get_integer (SHOW_STATUSICON) && eel_gconf_get_integer (START_HIDDEN))
-        {
-          gtk_widget_hide (GTK_WIDGET( get_main_window() ));
-          set_minimized (TRUE);
+        if (eel_gconf_get_integer (SHOW_STATUSICON) && eel_gconf_get_integer (START_HIDDEN)) {
+            gtk_widget_hide (GTK_WIDGET (get_main_window()));
+            set_minimized (TRUE);
         }
 
 
-      status_bar_display_account ();
+        status_bar_display_account ();
 
-      // Load the history
-      sflphone_fill_history ();
+        // Load the history
+        sflphone_fill_history ();
 
-      // Get the active calls and conferences at startup
-      sflphone_fill_call_list ();
-      sflphone_fill_conference_list ();
+        // Get the active calls and conferences at startup
+        sflphone_fill_call_list ();
+        sflphone_fill_conference_list ();
 
-      // Update the GUI
-      update_actions ();
+        // Update the GUI
+        update_actions ();
 
-      shortcuts_initialize_bindings();
+        shortcuts_initialize_bindings();
 
-      /* start the main loop */
-      gtk_main ();
+        /* start the main loop */
+        gtk_main ();
     }
 
-  // Cleanly stop logging
-  shutdown_logging ();
+    // Cleanly stop logging
+    shutdown_logging ();
 
-  shortcuts_destroy_bindings();
+    shortcuts_destroy_bindings();
 
-  return 0;
+    return 0;
 }
 
 /** @mainpage SFLphone GTK+ Client Documentation
diff --git a/sflphone-client-gnome/src/mainwindow.c b/sflphone-client-gnome/src/mainwindow.c
index cf3ca817572c8c3fb16dfeaa2846c31a24459755..fab4abc95b8be025e16b099b65d1a3a45c4e103b 100644
--- a/sflphone-client-gnome/src/mainwindow.c
+++ b/sflphone-client-gnome/src/mainwindow.c
@@ -62,461 +62,447 @@ PidginScrollBook *embedded_error_notebook;
 /**
  * Handle main window resizing
  */
-static gboolean window_configure_cb (GtkWidget *win, GdkEventConfigure *event) {
+static gboolean window_configure_cb (GtkWidget *win, GdkEventConfigure *event)
+{
 
-	int pos_x, pos_y;
+    int pos_x, pos_y;
 
-	eel_gconf_set_integer (CONF_MAIN_WINDOW_WIDTH, event->width);
-	eel_gconf_set_integer (CONF_MAIN_WINDOW_HEIGHT, event->height);
+    eel_gconf_set_integer (CONF_MAIN_WINDOW_WIDTH, event->width);
+    eel_gconf_set_integer (CONF_MAIN_WINDOW_HEIGHT, event->height);
 
-	gtk_window_get_position (GTK_WINDOW (window), &pos_x, &pos_y);
-	eel_gconf_set_integer (CONF_MAIN_WINDOW_POSITION_X, pos_x);
-	eel_gconf_set_integer (CONF_MAIN_WINDOW_POSITION_Y, pos_y);
+    gtk_window_get_position (GTK_WINDOW (window), &pos_x, &pos_y);
+    eel_gconf_set_integer (CONF_MAIN_WINDOW_POSITION_X, pos_x);
+    eel_gconf_set_integer (CONF_MAIN_WINDOW_POSITION_Y, pos_y);
 
-	return FALSE;
+    return FALSE;
 }
 
 
 /**
  * Minimize the main window.
  */
-	static gboolean
+static gboolean
 on_delete (GtkWidget * widget UNUSED, gpointer data UNUSED)
 {
 
-	if (eel_gconf_get_integer (SHOW_STATUSICON)) {
-		gtk_widget_hide (GTK_WIDGET( get_main_window() ));
-		set_minimized (TRUE);
-	}
-	else {
-		sflphone_quit ();
-	}
-	return TRUE;
+    if (eel_gconf_get_integer (SHOW_STATUSICON)) {
+        gtk_widget_hide (GTK_WIDGET (get_main_window()));
+        set_minimized (TRUE);
+    } else {
+        sflphone_quit ();
+    }
+
+    return TRUE;
 }
 
 /** Ask the user if he wants to hangup current calls */
-	gboolean
+gboolean
 main_window_ask_quit ()
 {
-	guint count = calllist_get_size (current_calls);
-	GtkWidget * dialog;
-	gint response;
-	gchar * question;
+    guint count = calllist_get_size (current_calls);
+    GtkWidget * dialog;
+    gint response;
+    gchar * question;
 
-	if (count == 1)
-	{
-		question = _("There is one call in progress.");
-	}
-	else
-	{
-		question = _("There are calls in progress.");
-	}
+    if (count == 1) {
+        question = _ ("There is one call in progress.");
+    } else {
+        question = _ ("There are calls in progress.");
+    }
 
-	dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW(window),
-			GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s\n%s",
-			question, _("Do you still want to quit?") );
+    dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (window),
+             GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s\n%s",
+             question, _ ("Do you still want to quit?"));
 
-	response = gtk_dialog_run (GTK_DIALOG (dialog));
+    response = gtk_dialog_run (GTK_DIALOG (dialog));
 
-	gtk_widget_destroy (dialog);
+    gtk_widget_destroy (dialog);
 
-	return (response == GTK_RESPONSE_NO)? FALSE : TRUE ;
+    return (response == GTK_RESPONSE_NO) ? FALSE : TRUE ;
 
 
 }
 
-	static gboolean
+static gboolean
 on_key_released (GtkWidget *widget, GdkEventKey *event, gpointer user_data UNUSED)
 {
-	DEBUG("On key released from Main Window : %s", gtk_widget_get_name(widget));
-
-	if (focus_is_on_searchbar == FALSE)
-	{
-		// If a modifier key is pressed, it's a shortcut, pass along
-		if (event->state & GDK_CONTROL_MASK || event->state & GDK_MOD1_MASK
-				|| event->keyval == 60 || // <
-				event->keyval == 62 || // >
-				event->keyval == 34 || // "
-				event->keyval == 65289 || // tab
-				event->keyval == 65361 || // left arrow
-				event->keyval == 65363 || // right arrow
-				event->keyval >= 65470 || // F-keys
-				event->keyval == 32 // space
-		   )
-			return FALSE;
-		else
-			sflphone_keypad (event->keyval, event->string);
-	}
-
-	return TRUE;
+    DEBUG ("On key released from Main Window : %s", gtk_widget_get_name (widget));
+
+    if (focus_is_on_searchbar == FALSE) {
+        // If a modifier key is pressed, it's a shortcut, pass along
+        if (event->state & GDK_CONTROL_MASK || event->state & GDK_MOD1_MASK
+                || event->keyval == 60 || // <
+                event->keyval == 62 || // >
+                event->keyval == 34 || // "
+                event->keyval == 65289 || // tab
+                event->keyval == 65361 || // left arrow
+                event->keyval == 65363 || // right arrow
+                event->keyval >= 65470 || // F-keys
+                event->keyval == 32 // space
+           )
+            return FALSE;
+        else
+            sflphone_keypad (event->keyval, event->string);
+    }
+
+    return TRUE;
 }
 
-	void
+void
 focus_on_mainwindow_out ()
 {
-	//  gtk_widget_grab_focus(GTK_WIDGET(window));
+    //  gtk_widget_grab_focus(GTK_WIDGET(window));
 
 }
 
-	void
+void
 focus_on_mainwindow_in ()
 {
-	//  gtk_widget_grab_focus(GTK_WIDGET(window));
+    //  gtk_widget_grab_focus(GTK_WIDGET(window));
 }
 
-	void
+void
 create_main_window ()
 {
-	GtkWidget *widget;
-	gchar *path;
-	GError *error = NULL;
-	gboolean ret;
-	const char *window_title = "SFLphone VoIP Client";
-	int width, height, position_x, position_y;
-
-	focus_is_on_calltree = FALSE;
-	focus_is_on_searchbar = FALSE;
-
-	// Get configuration stored in gconf
-	width =  eel_gconf_get_integer (CONF_MAIN_WINDOW_WIDTH);
-	height =  eel_gconf_get_integer (CONF_MAIN_WINDOW_HEIGHT);
-	position_x =  eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_X);
-	position_y =  eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_Y);
-
-	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-	gtk_container_set_border_width (GTK_CONTAINER (window), 0);
-	gtk_window_set_title (GTK_WINDOW (window), window_title);
-	gtk_window_set_default_size (GTK_WINDOW (window), width, height);
-	gtk_window_set_default_icon_from_file (LOGO,
-			NULL);
-	gtk_window_set_position (GTK_WINDOW(window) , GTK_WIN_POS_MOUSE);
-
-	/* Connect the destroy event of the window with our on_destroy function
-	 * When the window is about to be destroyed we get a notificaiton and
-	 * stop the main GTK loop
-	 */
-	g_signal_connect (G_OBJECT (window), "delete-event",
-			G_CALLBACK (on_delete), NULL);
-
-	g_signal_connect (G_OBJECT (window), "key-release-event",
-			G_CALLBACK (on_key_released), NULL);
+    GtkWidget *widget;
+    gchar *path;
+    GError *error = NULL;
+    gboolean ret;
+    const char *window_title = "SFLphone VoIP Client";
+    int width, height, position_x, position_y;
+
+    focus_is_on_calltree = FALSE;
+    focus_is_on_searchbar = FALSE;
+
+    // Get configuration stored in gconf
+    width =  eel_gconf_get_integer (CONF_MAIN_WINDOW_WIDTH);
+    height =  eel_gconf_get_integer (CONF_MAIN_WINDOW_HEIGHT);
+    position_x =  eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_X);
+    position_y =  eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_Y);
+
+    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+    gtk_container_set_border_width (GTK_CONTAINER (window), 0);
+    gtk_window_set_title (GTK_WINDOW (window), window_title);
+    gtk_window_set_default_size (GTK_WINDOW (window), width, height);
+    gtk_window_set_default_icon_from_file (LOGO,
+                                           NULL);
+    gtk_window_set_position (GTK_WINDOW (window) , GTK_WIN_POS_MOUSE);
+
+    /* Connect the destroy event of the window with our on_destroy function
+     * When the window is about to be destroyed we get a notificaiton and
+     * stop the main GTK loop
+     */
+    g_signal_connect (G_OBJECT (window), "delete-event",
+                      G_CALLBACK (on_delete), NULL);
+
+    g_signal_connect (G_OBJECT (window), "key-release-event",
+                      G_CALLBACK (on_key_released), NULL);
 
     g_signal_connect_after (G_OBJECT (window), "focus-in-event",
-			G_CALLBACK (focus_on_mainwindow_in), NULL);
-
-	g_signal_connect_after (G_OBJECT (window), "focus-out-event",
-			G_CALLBACK (focus_on_mainwindow_out), NULL);
-
-	g_signal_connect_object (G_OBJECT (window), "configure-event",
-			G_CALLBACK (window_configure_cb), NULL, 0);
-
-	gtk_widget_set_name (window, "mainwindow");
-
-	ret = uimanager_new (&ui_manager);
-	if (!ret)
-	{
-		ERROR ("Could not load xml GUI\n");
-		g_error_free (error);
-		exit (1);
-	}
-
-	/* Create an accel group for window's shortcuts */
-	gtk_window_add_accel_group (GTK_WINDOW(window),
-			gtk_ui_manager_get_accel_group (ui_manager));
-
-	vbox = gtk_vbox_new (FALSE /*homogeneous*/, 0 /*spacing*/);
-	subvbox = gtk_vbox_new (FALSE /*homogeneous*/, 5 /*spacing*/);
-
-	create_menus (ui_manager, &widget);
-	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE /*expand*/, TRUE /*fill*/,
-			0 /*padding*/);
-
-	create_toolbar_actions (ui_manager, &widget);
-	// Do not override GNOME user settings
-	gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE /*expand*/, TRUE /*fill*/,
-			0 /*padding*/);
-
-	gtk_box_pack_start (GTK_BOX (vbox), current_calls->tree, TRUE /*expand*/,
-			TRUE /*fill*/, 0 /*padding*/);
-	gtk_box_pack_start (GTK_BOX (vbox), history->tree, TRUE /*expand*/,
-			TRUE /*fill*/, 0 /*padding*/);
-	gtk_box_pack_start (GTK_BOX (vbox), contacts->tree, TRUE /*expand*/,
-			TRUE /*fill*/, 0 /*padding*/);
-
-	g_signal_connect_object (G_OBJECT (window), "configure-event",
-			G_CALLBACK (window_configure_cb), NULL, 0);
-	gtk_box_pack_start (GTK_BOX (vbox), subvbox, FALSE /*expand*/,
-	  FALSE /*fill*/, 0 /*padding*/);
-
-	embedded_error_notebook = PIDGIN_SCROLL_BOOK(pidgin_scroll_book_new());
-	gtk_box_pack_start (GTK_BOX(subvbox), GTK_WIDGET(embedded_error_notebook),
-			FALSE, FALSE, 0);
-
-	if (SHOW_VOLUME)
-	{
-		speaker_control = create_slider ("speaker");
-		gtk_box_pack_end (GTK_BOX (subvbox), speaker_control, FALSE /*expand*/,
-				TRUE /*fill*/, 0 /*padding*/);
-		gtk_widget_show_all (speaker_control);
-		mic_control = create_slider ("mic");
-		gtk_box_pack_end (GTK_BOX (subvbox), mic_control, FALSE /*expand*/,
-				TRUE /*fill*/, 0 /*padding*/);
-		gtk_widget_show_all (mic_control);
-	}
-
-
-	if (eel_gconf_get_boolean (CONF_SHOW_DIALPAD)){
-		dialpad = create_dialpad();
-		gtk_box_pack_end (GTK_BOX (subvbox), dialpad, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
-		gtk_widget_show_all (dialpad);
-	}
-
-	/* Status bar */
-	statusBar = gtk_statusbar_new ();
-	gtk_box_pack_start (GTK_BOX (vbox), statusBar, FALSE /*expand*/,
-			TRUE /*fill*/, 0 /*padding*/);
-	gtk_container_add (GTK_CONTAINER (window), vbox);
-
-	/* make sure that everything, window and label, are visible */
-	gtk_widget_show_all (window);
-
-	/* dont't show the history */
-	gtk_widget_hide (history->tree);
-
-	/* dont't show the contact list */
-	gtk_widget_hide (contacts->tree);
-
-	searchbar_init (history);
-	searchbar_init (contacts);
-
-	/* don't show waiting layer */
-	gtk_widget_hide (waitingLayer);
-
-	// Configuration wizard
-	if (account_list_get_size () == 1)
-	{
+                            G_CALLBACK (focus_on_mainwindow_in), NULL);
+
+    g_signal_connect_after (G_OBJECT (window), "focus-out-event",
+                            G_CALLBACK (focus_on_mainwindow_out), NULL);
+
+    g_signal_connect_object (G_OBJECT (window), "configure-event",
+                             G_CALLBACK (window_configure_cb), NULL, 0);
+
+    gtk_widget_set_name (window, "mainwindow");
+
+    ret = uimanager_new (&ui_manager);
+
+    if (!ret) {
+        ERROR ("Could not load xml GUI\n");
+        g_error_free (error);
+        exit (1);
+    }
+
+    /* Create an accel group for window's shortcuts */
+    gtk_window_add_accel_group (GTK_WINDOW (window),
+                                gtk_ui_manager_get_accel_group (ui_manager));
+
+    vbox = gtk_vbox_new (FALSE /*homogeneous*/, 0 /*spacing*/);
+    subvbox = gtk_vbox_new (FALSE /*homogeneous*/, 5 /*spacing*/);
+
+    create_menus (ui_manager, &widget);
+    gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE /*expand*/, TRUE /*fill*/,
+                        0 /*padding*/);
+
+    create_toolbar_actions (ui_manager, &widget);
+    // Do not override GNOME user settings
+    gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE /*expand*/, TRUE /*fill*/,
+                        0 /*padding*/);
+
+    gtk_box_pack_start (GTK_BOX (vbox), current_calls->tree, TRUE /*expand*/,
+                        TRUE /*fill*/, 0 /*padding*/);
+    gtk_box_pack_start (GTK_BOX (vbox), history->tree, TRUE /*expand*/,
+                        TRUE /*fill*/, 0 /*padding*/);
+    gtk_box_pack_start (GTK_BOX (vbox), contacts->tree, TRUE /*expand*/,
+                        TRUE /*fill*/, 0 /*padding*/);
+
+    g_signal_connect_object (G_OBJECT (window), "configure-event",
+                             G_CALLBACK (window_configure_cb), NULL, 0);
+    gtk_box_pack_start (GTK_BOX (vbox), subvbox, FALSE /*expand*/,
+                        FALSE /*fill*/, 0 /*padding*/);
+
+    embedded_error_notebook = PIDGIN_SCROLL_BOOK (pidgin_scroll_book_new());
+    gtk_box_pack_start (GTK_BOX (subvbox), GTK_WIDGET (embedded_error_notebook),
+                        FALSE, FALSE, 0);
+
+    if (SHOW_VOLUME) {
+        speaker_control = create_slider ("speaker");
+        gtk_box_pack_end (GTK_BOX (subvbox), speaker_control, FALSE /*expand*/,
+                          TRUE /*fill*/, 0 /*padding*/);
+        gtk_widget_show_all (speaker_control);
+        mic_control = create_slider ("mic");
+        gtk_box_pack_end (GTK_BOX (subvbox), mic_control, FALSE /*expand*/,
+                          TRUE /*fill*/, 0 /*padding*/);
+        gtk_widget_show_all (mic_control);
+    }
+
+
+    if (eel_gconf_get_boolean (CONF_SHOW_DIALPAD)) {
+        dialpad = create_dialpad();
+        gtk_box_pack_end (GTK_BOX (subvbox), dialpad, FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
+        gtk_widget_show_all (dialpad);
+    }
+
+    /* Status bar */
+    statusBar = gtk_statusbar_new ();
+    gtk_box_pack_start (GTK_BOX (vbox), statusBar, FALSE /*expand*/,
+                        TRUE /*fill*/, 0 /*padding*/);
+    gtk_container_add (GTK_CONTAINER (window), vbox);
+
+    /* make sure that everything, window and label, are visible */
+    gtk_widget_show_all (window);
+
+    /* dont't show the history */
+    gtk_widget_hide (history->tree);
+
+    /* dont't show the contact list */
+    gtk_widget_hide (contacts->tree);
+
+    searchbar_init (history);
+    searchbar_init (contacts);
+
+    /* don't show waiting layer */
+    gtk_widget_hide (waitingLayer);
+
+    // Configuration wizard
+    if (account_list_get_size () == 1) {
 #if GTK_CHECK_VERSION(2,10,0)
-		build_wizard ();
+        build_wizard ();
 #else
-		GtkWidget * dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW(window),
-				GTK_DIALOG_DESTROY_WITH_PARENT,
-				GTK_MESSAGE_INFO,
-				GTK_BUTTONS_YES_NO,
-				"<b><big>Welcome to SFLphone!</big></b>\n\nThere are no VoIP accounts configured, would you like to edit the preferences now?");
+        GtkWidget * dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (window),
+                             GTK_DIALOG_DESTROY_WITH_PARENT,
+                             GTK_MESSAGE_INFO,
+                             GTK_BUTTONS_YES_NO,
+                             "<b><big>Welcome to SFLphone!</big></b>\n\nThere are no VoIP accounts configured, would you like to edit the preferences now?");
+
+        int response = gtk_dialog_run (GTK_DIALOG (dialog));
 
-		int response = gtk_dialog_run (GTK_DIALOG(dialog));
+        gtk_widget_destroy (GTK_WIDGET (dialog));
 
-		gtk_widget_destroy (GTK_WIDGET(dialog));
+        if (response == GTK_RESPONSE_YES) {
+            show_preferences_dialog();
+        }
 
-		if (response == GTK_RESPONSE_YES)
-		{
-			show_preferences_dialog();
-		}
 #endif
-	}
+    }
 
-	// Restore position according to the configuration stored in gconf
-	gtk_window_move (GTK_WINDOW (window), position_x, position_y);
+    // Restore position according to the configuration stored in gconf
+    gtk_window_move (GTK_WINDOW (window), position_x, position_y);
 }
 
-	GtkAccelGroup *
+GtkAccelGroup *
 get_accel_group ()
 {
-	return accelGroup;
+    return accelGroup;
 }
 
-	GtkWidget *
+GtkWidget *
 get_main_window ()
 {
-	return window;
+    return window;
 }
 
-	void
+void
 main_window_message (GtkMessageType type, gchar * markup)
 {
 
-	GtkWidget * dialog = gtk_message_dialog_new_with_markup (
-			GTK_WINDOW(get_main_window()), GTK_DIALOG_MODAL
-			| GTK_DIALOG_DESTROY_WITH_PARENT, type, GTK_BUTTONS_CLOSE, NULL);
+    GtkWidget * dialog = gtk_message_dialog_new_with_markup (
+                             GTK_WINDOW (get_main_window()), GTK_DIALOG_MODAL
+                             | GTK_DIALOG_DESTROY_WITH_PARENT, type, GTK_BUTTONS_CLOSE, NULL);
 
-	gtk_window_set_title (GTK_WINDOW(dialog), _("SFLphone Error"));
-	gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG(dialog), markup);
+    gtk_window_set_title (GTK_WINDOW (dialog), _ ("SFLphone Error"));
+    gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), markup);
 
-	gtk_dialog_run (GTK_DIALOG(dialog));
-	gtk_widget_destroy (GTK_WIDGET(dialog));
+    gtk_dialog_run (GTK_DIALOG (dialog));
+    gtk_widget_destroy (GTK_WIDGET (dialog));
 }
 
-	void
+void
 main_window_error_message (gchar * markup)
 {
-	main_window_message (GTK_MESSAGE_ERROR, markup);
+    main_window_message (GTK_MESSAGE_ERROR, markup);
 }
 
-	void
+void
 main_window_warning_message (gchar * markup)
 {
-	main_window_message (GTK_MESSAGE_WARNING, markup);
+    main_window_message (GTK_MESSAGE_WARNING, markup);
 }
 
-	void
+void
 main_window_info_message (gchar * markup)
 {
-	main_window_message (GTK_MESSAGE_INFO, markup);
+    main_window_message (GTK_MESSAGE_INFO, markup);
 }
 
-	void
+void
 main_window_dialpad (gboolean state)
 {
 
-	g_print ("main_window_dialpad\n");
-
-	if (state)
-	{
-		dialpad = create_dialpad ();
-		gtk_box_pack_end (GTK_BOX (subvbox), dialpad, FALSE /*expand*/,
-				TRUE /*fill*/, 0 /*padding*/);
-		gtk_widget_show_all (dialpad);
-	}
-	else
-	{
-		gtk_container_remove (GTK_CONTAINER (subvbox), dialpad);
-	}
+    g_print ("main_window_dialpad\n");
+
+    if (state) {
+        dialpad = create_dialpad ();
+        gtk_box_pack_end (GTK_BOX (subvbox), dialpad, FALSE /*expand*/,
+                          TRUE /*fill*/, 0 /*padding*/);
+        gtk_widget_show_all (dialpad);
+    } else {
+        gtk_container_remove (GTK_CONTAINER (subvbox), dialpad);
+    }
 }
 
-	void
+void
 main_window_volume_controls (gboolean state)
 {
-	if (state)
-	{
-		speaker_control = create_slider ("speaker");
-		gtk_box_pack_end (GTK_BOX (subvbox), speaker_control, FALSE /*expand*/,
-				TRUE /*fill*/, 0 /*padding*/);
-		gtk_widget_show_all (speaker_control);
-		mic_control = create_slider ("mic");
-		gtk_box_pack_end (GTK_BOX (subvbox), mic_control, FALSE /*expand*/,
-				TRUE /*fill*/, 0 /*padding*/);
-		gtk_widget_show_all (mic_control);
-	}
-	else
-	{
-		gtk_container_remove (GTK_CONTAINER(subvbox), speaker_control);
-		gtk_container_remove (GTK_CONTAINER(subvbox), mic_control);
-	}
+    if (state) {
+        speaker_control = create_slider ("speaker");
+        gtk_box_pack_end (GTK_BOX (subvbox), speaker_control, FALSE /*expand*/,
+                          TRUE /*fill*/, 0 /*padding*/);
+        gtk_widget_show_all (speaker_control);
+        mic_control = create_slider ("mic");
+        gtk_box_pack_end (GTK_BOX (subvbox), mic_control, FALSE /*expand*/,
+                          TRUE /*fill*/, 0 /*padding*/);
+        gtk_widget_show_all (mic_control);
+    } else {
+        gtk_container_remove (GTK_CONTAINER (subvbox), speaker_control);
+        gtk_container_remove (GTK_CONTAINER (subvbox), mic_control);
+    }
 }
 
-	void
+void
 statusbar_push_message (const gchar * message, guint id)
 {
-	gtk_statusbar_push (GTK_STATUSBAR(statusBar), id, message);
+    gtk_statusbar_push (GTK_STATUSBAR (statusBar), id, message);
 }
 
-	void
+void
 statusbar_pop_message (guint id)
 {
-	gtk_statusbar_pop (GTK_STATUSBAR(statusBar), id);
+    gtk_statusbar_pop (GTK_STATUSBAR (statusBar), id);
 }
 
-	static void
+static void
 add_error_dialog (GtkWidget *dialog, callable_obj_t * call)
 {
-	gtk_container_add (GTK_CONTAINER(embedded_error_notebook), dialog);
-	call_add_error (call, dialog);
+    gtk_container_add (GTK_CONTAINER (embedded_error_notebook), dialog);
+    call_add_error (call, dialog);
 }
 
-	static void
+static void
 destroy_error_dialog_cb (GtkObject *dialog, callable_obj_t * call)
 {
-	call_remove_error (call, dialog);
+    call_remove_error (call, dialog);
 }
 
-	void
+void
 main_window_zrtp_not_supported (callable_obj_t * c)
 {
-	account_t* account_details = NULL;
-	gchar* warning_enabled = "";
-
-	account_details = account_list_get_by_id (c->_accountID);
-	if (account_details != NULL)
-	{
-		warning_enabled = g_hash_table_lookup (account_details->properties,
-				ACCOUNT_ZRTP_NOT_SUPP_WARNING);
-		DEBUG("Warning Enabled %s", warning_enabled);
-	}
-	else
-	{
-		DEBUG("Account is null callID %s", c->_callID);
-		GHashTable * properties = NULL;
-		sflphone_get_ip2ip_properties (&properties);
-		if (properties != NULL)
-		{
-			warning_enabled = g_hash_table_lookup (properties,
-					ACCOUNT_ZRTP_NOT_SUPP_WARNING);
-		}
-	}
-
-	if (g_strcasecmp (warning_enabled, "true") == 0)
-	{
-		PidginMiniDialog *mini_dialog;
-		gchar *desc = g_markup_printf_escaped (
-				_("ZRTP is not supported by peer %s\n"), c->_peer_number);
-		mini_dialog = pidgin_mini_dialog_new (
-				_("Secure Communication Unavailable"), desc,
-				GTK_STOCK_DIALOG_WARNING);
-		pidgin_mini_dialog_add_button (mini_dialog, _("Continue"), NULL, NULL);
-		pidgin_mini_dialog_add_button (mini_dialog, _("Stop Call"),
-				sflphone_hang_up, NULL);
-
-		g_signal_connect_after(mini_dialog, "destroy", (GCallback) destroy_error_dialog_cb, c);
-
-		add_error_dialog (GTK_WIDGET(mini_dialog), c);
-	}
+    account_t* account_details = NULL;
+    gchar* warning_enabled = "";
+
+    account_details = account_list_get_by_id (c->_accountID);
+
+    if (account_details != NULL) {
+        warning_enabled = g_hash_table_lookup (account_details->properties,
+                                               ACCOUNT_ZRTP_NOT_SUPP_WARNING);
+        DEBUG ("Warning Enabled %s", warning_enabled);
+    } else {
+        DEBUG ("Account is null callID %s", c->_callID);
+        GHashTable * properties = NULL;
+        sflphone_get_ip2ip_properties (&properties);
+
+        if (properties != NULL) {
+            warning_enabled = g_hash_table_lookup (properties,
+                                                   ACCOUNT_ZRTP_NOT_SUPP_WARNING);
+        }
+    }
+
+    if (g_strcasecmp (warning_enabled, "true") == 0) {
+        PidginMiniDialog *mini_dialog;
+        gchar *desc = g_markup_printf_escaped (
+                          _ ("ZRTP is not supported by peer %s\n"), c->_peer_number);
+        mini_dialog = pidgin_mini_dialog_new (
+                          _ ("Secure Communication Unavailable"), desc,
+                          GTK_STOCK_DIALOG_WARNING);
+        pidgin_mini_dialog_add_button (mini_dialog, _ ("Continue"), NULL, NULL);
+        pidgin_mini_dialog_add_button (mini_dialog, _ ("Stop Call"),
+                                       sflphone_hang_up, NULL);
+
+        g_signal_connect_after (mini_dialog, "destroy", (GCallback) destroy_error_dialog_cb, c);
+
+        add_error_dialog (GTK_WIDGET (mini_dialog), c);
+    }
 }
 
-	void
+void
 main_window_zrtp_negotiation_failed (const gchar* callID, const gchar* reason,
-		const gchar* severity)
+                                     const gchar* severity)
 {
-	gchar* peer_number = "(number unknown)";
-	callable_obj_t * c = NULL;
-	c = calllist_get (current_calls, callID);
-	if (c != NULL)
-	{
-		peer_number = c->_peer_number;
-	}
-
-	PidginMiniDialog *mini_dialog;
-	gchar
-		*desc =
-		g_markup_printf_escaped (
-				_("A %s error forced the call with %s to fall under unencrypted mode.\nExact reason: %s\n"),
-				severity, peer_number, reason);
-	mini_dialog = pidgin_mini_dialog_new (_("ZRTP negotiation failed"), desc,
-			GTK_STOCK_DIALOG_WARNING);
-	pidgin_mini_dialog_add_button (mini_dialog, _("Continue"), NULL, NULL);
-	pidgin_mini_dialog_add_button (mini_dialog, _("Stop Call"), sflphone_hang_up,
-			NULL);
-
-	g_signal_connect_after(mini_dialog, "destroy", (GCallback) destroy_error_dialog_cb, c);
-
-	add_error_dialog (GTK_WIDGET(mini_dialog), c);
+    gchar* peer_number = "(number unknown)";
+    callable_obj_t * c = NULL;
+    c = calllist_get (current_calls, callID);
+
+    if (c != NULL) {
+        peer_number = c->_peer_number;
+    }
+
+    PidginMiniDialog *mini_dialog;
+    gchar
+    *desc =
+        g_markup_printf_escaped (
+            _ ("A %s error forced the call with %s to fall under unencrypted mode.\nExact reason: %s\n"),
+            severity, peer_number, reason);
+    mini_dialog = pidgin_mini_dialog_new (_ ("ZRTP negotiation failed"), desc,
+                                          GTK_STOCK_DIALOG_WARNING);
+    pidgin_mini_dialog_add_button (mini_dialog, _ ("Continue"), NULL, NULL);
+    pidgin_mini_dialog_add_button (mini_dialog, _ ("Stop Call"), sflphone_hang_up,
+                                   NULL);
+
+    g_signal_connect_after (mini_dialog, "destroy", (GCallback) destroy_error_dialog_cb, c);
+
+    add_error_dialog (GTK_WIDGET (mini_dialog), c);
 }
 
-	void
+void
 main_window_confirm_go_clear (callable_obj_t * c)
 {
-	PidginMiniDialog *mini_dialog;
-	gchar
-		*desc =
-		g_markup_printf_escaped (
-				_("%s wants to stop using secure communication. Confirm will resume conversation without SRTP.\n"),
-				c->_peer_number);
-	mini_dialog = pidgin_mini_dialog_new (_("Confirm Go Clear"), desc,
-			GTK_STOCK_STOP);
-	pidgin_mini_dialog_add_button (mini_dialog, _("Confirm"),
-			(PidginMiniDialogCallback) sflphone_set_confirm_go_clear, NULL);
-	pidgin_mini_dialog_add_button (mini_dialog, _("Stop Call"), sflphone_hang_up,
-			NULL);
-
-	add_error_dialog (GTK_WIDGET(mini_dialog), c);
+    PidginMiniDialog *mini_dialog;
+    gchar
+    *desc =
+        g_markup_printf_escaped (
+            _ ("%s wants to stop using secure communication. Confirm will resume conversation without SRTP.\n"),
+            c->_peer_number);
+    mini_dialog = pidgin_mini_dialog_new (_ ("Confirm Go Clear"), desc,
+                                          GTK_STOCK_STOP);
+    pidgin_mini_dialog_add_button (mini_dialog, _ ("Confirm"),
+                                   (PidginMiniDialogCallback) sflphone_set_confirm_go_clear, NULL);
+    pidgin_mini_dialog_add_button (mini_dialog, _ ("Stop Call"), sflphone_hang_up,
+                                   NULL);
+
+    add_error_dialog (GTK_WIDGET (mini_dialog), c);
 }
 
diff --git a/sflphone-client-gnome/src/mainwindow.h b/sflphone-client-gnome/src/mainwindow.h
index db7007cd3c315733710fa8c4ab9c2ebf00ee8887..c54b9d95ea6dc7296091103821b99b5dfde7ac27 100644
--- a/sflphone-client-gnome/src/mainwindow.h
+++ b/sflphone-client-gnome/src/mainwindow.h
@@ -54,7 +54,7 @@ GtkWidget *waitingLayer;
 /**
  * Build the main window
  */
-void create_main_window ( );
+void create_main_window ();
 
 /**
  * Display a dialog window
@@ -67,43 +67,43 @@ gboolean main_window_ask_quit() ;
 /**
   * Shows/Hides the dialpad on the mainwindow
   */
-void main_window_dialpad( gboolean state );
+void main_window_dialpad (gboolean state);
 
 /**
   * Shows/Hides the dialpad on the mainwindow
   */
-void main_window_volume_controls( gboolean state );
+void main_window_volume_controls (gboolean state);
 
 /**
  * Display an error message
  * @param markup  The error message
  */
-void main_window_error_message(gchar * markup);
+void main_window_error_message (gchar * markup);
 
 /**
  * Display a warning message
  * @param markup  The warning message
  */
-void main_window_warning_message(gchar * markup);
+void main_window_warning_message (gchar * markup);
 
 /**
  * Display an info message
  * @param markup  The info message
  */
-void main_window_info_message(gchar * markup);
+void main_window_info_message (gchar * markup);
 
 /**
  * Push a message on the statusbar stack
  * @param message The message to display
  * @param id  The identifier of the message
  */
-void statusbar_push_message( const gchar* message , guint id );
+void statusbar_push_message (const gchar* message , guint id);
 
 /**
  * Pop a message from the statusbar stack
  * @param id  The identifier of the message
  */
-void statusbar_pop_message( guint id );
+void statusbar_pop_message (guint id);
 
 //static gboolean
 //on_key_released (GtkWidget *widget, GdkEventKey *event,
@@ -114,10 +114,10 @@ gboolean focus_is_on_calltree;
 
 gboolean focus_is_on_searchbar;
 
-void main_window_zrtp_not_supported(callable_obj_t * c);
+void main_window_zrtp_not_supported (callable_obj_t * c);
 
-void main_window_zrtp_negotiation_failed(const gchar* callID, const gchar* reason, const gchar* severity);
+void main_window_zrtp_negotiation_failed (const gchar* callID, const gchar* reason, const gchar* severity);
 
-void main_window_confirm_go_clear(callable_obj_t * c);
+void main_window_confirm_go_clear (callable_obj_t * c);
 
 #endif
diff --git a/sflphone-client-gnome/src/reqaccount.c b/sflphone-client-gnome/src/reqaccount.c
index dda30b8dc6b2e549bd081e1b3340d291ddc822e0..463298d563168494c6fc9904c155220abcd8bc9e 100644
--- a/sflphone-client-gnome/src/reqaccount.c
+++ b/sflphone-client-gnome/src/reqaccount.c
@@ -50,96 +50,108 @@
 
 #include "reqaccount.h"
 
-int req(char *host, int port, char *req, char *ret) {
-
-  int s;
-  struct sockaddr_in servSockAddr;
-  struct hostent *servHostEnt;
-  long int length=0;
-  long int status=0;
-  int i=0;
-  FILE *f;
-  char buf[1024];
-
-  bzero(&servSockAddr, sizeof(servSockAddr));
-  servHostEnt = gethostbyname(host);
-  if (servHostEnt == NULL) {
-      strcpy(ret, "gethostbyname");
-      return -1;
-  }
-  bcopy((char *)servHostEnt->h_addr, (char *)&servSockAddr.sin_addr, servHostEnt->h_length);
-  servSockAddr.sin_port = htons(port);
-  servSockAddr.sin_family = AF_INET;
-
-  if ((s = socket(AF_INET,SOCK_STREAM,0)) < 0) {
-    strcpy(ret, "socket");
-    return -1;
-  }
-
-  if(connect(s, (const struct sockaddr *) &servSockAddr, (socklen_t) sizeof(servSockAddr)) < 0 ) {
-    perror("foo");
-    strcpy(ret, "connect");
-    return -1;
-  }
-
-  f = fdopen(s, "r+");
-
-  fprintf(f, "%s HTTP/1.1\r\n", req);
-  fprintf(f, "Host: %s\r\n", host);
-  fputs("User-Agent: SFLphone\r\n", f);
-  fputs("\r\n", f);
-
-  while (strncmp(fgets(buf, sizeof(buf), f), "\r\n", 2)) {
-    const char *len_h = "content-length";
-    const char *status_h = "HTTP/1.1";
-    if (strncasecmp(buf, len_h, strlen(len_h)) == 0)
-      length = atoi(buf + strlen(len_h) + 1);
-    if (strncasecmp(buf, status_h, strlen(status_h)) == 0)
-      status = atoi(buf + strlen(status_h) + 1);
-  }
-  for (i = 0; i < length; i++)
-    ret[i] = fgetc(f);
-
-  if (status != 200) {
-    sprintf(ret, "http error: %ld", status);
-    return -1;
-  }
-
-  fclose(f);
-  shutdown(s, 2);
-  close(s);
-  return 0;
+int req (char *host, int port, char *req, char *ret)
+{
+
+    int s;
+    struct sockaddr_in servSockAddr;
+    struct hostent *servHostEnt;
+    long int length=0;
+    long int status=0;
+    int i=0;
+    FILE *f;
+    char buf[1024];
+
+    bzero (&servSockAddr, sizeof (servSockAddr));
+    servHostEnt = gethostbyname (host);
+
+    if (servHostEnt == NULL) {
+        strcpy (ret, "gethostbyname");
+        return -1;
+    }
+
+    bcopy ( (char *) servHostEnt->h_addr, (char *) &servSockAddr.sin_addr, servHostEnt->h_length);
+    servSockAddr.sin_port = htons (port);
+    servSockAddr.sin_family = AF_INET;
+
+    if ( (s = socket (AF_INET,SOCK_STREAM,0)) < 0) {
+        strcpy (ret, "socket");
+        return -1;
+    }
+
+    if (connect (s, (const struct sockaddr *) &servSockAddr, (socklen_t) sizeof (servSockAddr)) < 0) {
+        perror ("foo");
+        strcpy (ret, "connect");
+        return -1;
+    }
+
+    f = fdopen (s, "r+");
+
+    fprintf (f, "%s HTTP/1.1\r\n", req);
+    fprintf (f, "Host: %s\r\n", host);
+    fputs ("User-Agent: SFLphone\r\n", f);
+    fputs ("\r\n", f);
+
+    while (strncmp (fgets (buf, sizeof (buf), f), "\r\n", 2)) {
+        const char *len_h = "content-length";
+        const char *status_h = "HTTP/1.1";
+
+        if (strncasecmp (buf, len_h, strlen (len_h)) == 0)
+            length = atoi (buf + strlen (len_h) + 1);
+
+        if (strncasecmp (buf, status_h, strlen (status_h)) == 0)
+            status = atoi (buf + strlen (status_h) + 1);
+    }
+
+    for (i = 0; i < length; i++)
+        ret[i] = fgetc (f);
+
+    if (status != 200) {
+        sprintf (ret, "http error: %ld", status);
+        return -1;
+    }
+
+    fclose (f);
+    shutdown (s, 2);
+    close (s);
+    return 0;
 }
 
-rest_account get_rest_account(char *host,char *email) {
-  char ret[4096];
-  rest_account ra;
-  bzero(ret, sizeof(ret));
-	DEBUG("HOST: %s", host);
-	strcpy(ret,"GET /rest/accountcreator?email=");
-	strcat(ret, email);
-  if (req(host, 80, ret, ret) != -1) {
-    strcpy(ra.user, strtok(ret, "\n"));
-    strcpy(ra.passwd, strtok(NULL, "\n"));\
-    ra.success = 1;
-  } else {
-    ra.success = 0;
-    strcpy(ra.reason, ret);
-  }
-  puts(ret);
-  return ra;
+rest_account get_rest_account (char *host,char *email)
+{
+    char ret[4096];
+    rest_account ra;
+    bzero (ret, sizeof (ret));
+    DEBUG ("HOST: %s", host);
+    strcpy (ret,"GET /rest/accountcreator?email=");
+    strcat (ret, email);
+
+    if (req (host, 80, ret, ret) != -1) {
+        strcpy (ra.user, strtok (ret, "\n"));
+        strcpy (ra.passwd, strtok (NULL, "\n"));
+        \
+        ra.success = 1;
+    } else {
+        ra.success = 0;
+        strcpy (ra.reason, ret);
+    }
+
+    puts (ret);
+    return ra;
 }
 
 
 #ifdef BUILD_EXAMPLE
 
-int main (void) {
-  rest_account acc = get_rest_account("sip.sflphone.org","email@email.com");
-  if (acc.success) {
-    puts(acc.user);
-    puts(acc.passwd);
-  } else {
-    ERROR("FAILED: %s", acc.reason);
-  }
+int main (void)
+{
+    rest_account acc = get_rest_account ("sip.sflphone.org","email@email.com");
+
+    if (acc.success) {
+        puts (acc.user);
+        puts (acc.passwd);
+    } else {
+        ERROR ("FAILED: %s", acc.reason);
+    }
 }
 #endif
diff --git a/sflphone-client-gnome/src/reqaccount.h b/sflphone-client-gnome/src/reqaccount.h
index 3a17154a4b07c7885f268dc56bf88604e39f4c0c..4bd9366eabb1d886ddd3025218ef464eda4fb363 100644
--- a/sflphone-client-gnome/src/reqaccount.h
+++ b/sflphone-client-gnome/src/reqaccount.h
@@ -29,10 +29,10 @@
  */
 
 typedef struct {
-  char success;
-  char reason[200];
-  char user[200];
-  char passwd[200];
+    char success;
+    char reason[200];
+    char user[200];
+    char passwd[200];
 } rest_account;
 
-rest_account get_rest_account(char *host, char *email);
+rest_account get_rest_account (char *host, char *email);
diff --git a/sflphone-client-gnome/src/sflnotify.c b/sflphone-client-gnome/src/sflnotify.c
index e728e5ab56c1bdf6d3da4b3613ffa2ae5c3c458e..fbbc5baa2405132ee1560dfc4df4a49f8cac970f 100644
--- a/sflphone-client-gnome/src/sflnotify.c
+++ b/sflphone-client-gnome/src/sflnotify.c
@@ -36,7 +36,7 @@ void create_new_gnome_notification (gchar *title, gchar *body, NotifyUrgency urg
 {
     GnomeNotification *_notif;
 
-	if (eel_gconf_get_integer (NOTIFY_ALL)){
+    if (eel_gconf_get_integer (NOTIFY_ALL)) {
 
         _notif = g_new0 (GnomeNotification, 1);
 
@@ -47,11 +47,11 @@ void create_new_gnome_notification (gchar *title, gchar *body, NotifyUrgency urg
         //_notif->icon = gdk_pixbuf_new_from_file_at_size (LOGO, 120, 120, NULL);
         _notif->icon = gdk_pixbuf_new_from_file (LOGO_SMALL, NULL);
 #if GTK_CHECK_VERSION(2,10,0)
-        notify_notification_attach_to_status_icon (_notif->notification , get_status_icon() );
+        notify_notification_attach_to_status_icon (_notif->notification , get_status_icon());
 #endif
 
         notify_notification_set_urgency (_notif->notification, urgency);
-        
+
         if (_notif->icon != NULL)
             notify_notification_set_icon_from_pixbuf (_notif->notification, _notif->icon);
         else
@@ -60,130 +60,130 @@ void create_new_gnome_notification (gchar *title, gchar *body, NotifyUrgency urg
         notify_notification_set_timeout (_notif->notification, timeout);
 
         if (!notify_notification_show (_notif->notification, NULL)) {
-            ERROR("notify(), failed to send notification");
+            ERROR ("notify(), failed to send notification");
         }
 
         *notif = _notif;
     }
 }
 
-    void
+void
 notify_incoming_message (const gchar *callID, const gchar *msg)
 {
 
-        gchar* text;
-        gchar* title;
+    gchar* text;
+    gchar* title;
 
-        title = g_markup_printf_escaped(_("%s says:"), callID);
+    title = g_markup_printf_escaped (_ ("%s says:"), callID);
 
-        create_new_gnome_notification (title,
-										msg,
-                                        NOTIFY_URGENCY_CRITICAL, 
-                                        (g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
-                                        &_gnome_notification); 
+    create_new_gnome_notification (title,
+                                   msg,
+                                   NOTIFY_URGENCY_CRITICAL,
+                                   (g_strcasecmp (__TIMEOUT_MODE, "default") == 0) ? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
+                                   &_gnome_notification);
 }
 
 
 
-    void
+void
 notify_incoming_call (callable_obj_t* c)
 {
 
-        gchar* callerid;
-        gchar* title;
+    gchar* callerid;
+    gchar* title;
 
-        if (g_strcasecmp (c->_accountID,"") == 0) {
-            title = g_markup_printf_escaped ("IP-to-IP call");
-        }
-        else {
-            title = g_markup_printf_escaped(_("%s account : %s") ,
-                    (gchar*)g_hash_table_lookup(account_list_get_by_id(c->_accountID)->properties , ACCOUNT_TYPE) ,
-                    (gchar*)g_hash_table_lookup(account_list_get_by_id(c->_accountID)->properties , ACCOUNT_ALIAS) ) ;
-        }
-        callerid = g_markup_printf_escaped(_("<i>From</i> %s"), c->_peer_number);
+    if (g_strcasecmp (c->_accountID,"") == 0) {
+        title = g_markup_printf_escaped ("IP-to-IP call");
+    } else {
+        title = g_markup_printf_escaped (_ ("%s account : %s") ,
+                                         (gchar*) g_hash_table_lookup (account_list_get_by_id (c->_accountID)->properties , ACCOUNT_TYPE) ,
+                                         (gchar*) g_hash_table_lookup (account_list_get_by_id (c->_accountID)->properties , ACCOUNT_ALIAS)) ;
+    }
+
+    callerid = g_markup_printf_escaped (_ ("<i>From</i> %s"), c->_peer_number);
 
-        create_new_gnome_notification (title,
-                                        callerid, 
-                                        NOTIFY_URGENCY_CRITICAL, 
-                                        (g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
-                                        &_gnome_notification); 
+    create_new_gnome_notification (title,
+                                   callerid,
+                                   NOTIFY_URGENCY_CRITICAL,
+                                   (g_strcasecmp (__TIMEOUT_MODE, "default") == 0) ? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
+                                   &_gnome_notification);
 }
 
-    void
+void
 notify_voice_mails (guint count, account_t* acc)
 {
-        // the account is different from NULL
-        gchar* title;
-        gchar* body;
-
-        title = g_markup_printf_escaped(_("%s account : %s") ,
-                (gchar*)g_hash_table_lookup(acc->properties , ACCOUNT_TYPE) ,
-                (gchar*) g_hash_table_lookup(acc->properties , ACCOUNT_ALIAS) ) ;
-        body = g_markup_printf_escaped(n_("%d voice mail", "%d voice mails", count), count);
-
-        create_new_gnome_notification (title,
-                                        body, 
-                                        NOTIFY_URGENCY_LOW, 
-                                        NOTIFY_EXPIRES_DEFAULT,
-                                        &_gnome_notification); 
+    // the account is different from NULL
+    gchar* title;
+    gchar* body;
+
+    title = g_markup_printf_escaped (_ ("%s account : %s") ,
+                                     (gchar*) g_hash_table_lookup (acc->properties , ACCOUNT_TYPE) ,
+                                     (gchar*) g_hash_table_lookup (acc->properties , ACCOUNT_ALIAS)) ;
+    body = g_markup_printf_escaped (n_ ("%d voice mail", "%d voice mails", count), count);
+
+    create_new_gnome_notification (title,
+                                   body,
+                                   NOTIFY_URGENCY_LOW,
+                                   NOTIFY_EXPIRES_DEFAULT,
+                                   &_gnome_notification);
 }
 
-    void
+void
 notify_current_account (account_t* acc)
 {
 
-        // the account is different from NULL
-        gchar* title;
-        gchar* body="";
+    // the account is different from NULL
+    gchar* title;
+    gchar* body="";
 
-        body = g_markup_printf_escaped(_("Calling with %s account <i>%s</i>") ,
-                (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE) ,
-                (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_ALIAS));
+    body = g_markup_printf_escaped (_ ("Calling with %s account <i>%s</i>") ,
+                                    (gchar*) g_hash_table_lookup (acc->properties , ACCOUNT_TYPE) ,
+                                    (gchar*) g_hash_table_lookup (acc->properties , ACCOUNT_ALIAS));
 
-        title = g_markup_printf_escaped(_("Current account"));
+    title = g_markup_printf_escaped (_ ("Current account"));
 
-        create_new_gnome_notification (title,
-                                        body, 
-                                        NOTIFY_URGENCY_NORMAL, 
-                                        NOTIFY_EXPIRES_DEFAULT,
-                                        &_gnome_notification); 
+    create_new_gnome_notification (title,
+                                   body,
+                                   NOTIFY_URGENCY_NORMAL,
+                                   NOTIFY_EXPIRES_DEFAULT,
+                                   &_gnome_notification);
 }
 
-    void
+void
 notify_no_accounts ()
 {
     gchar* title;
     gchar* body="";
 
-    body = g_markup_printf_escaped(_("You have no accounts set up"));
-    title = g_markup_printf_escaped(_("Error"));
+    body = g_markup_printf_escaped (_ ("You have no accounts set up"));
+    title = g_markup_printf_escaped (_ ("Error"));
 
     create_new_gnome_notification (title,
-                                    body, 
-                                    NOTIFY_URGENCY_CRITICAL, 
-                                    NOTIFY_EXPIRES_DEFAULT,
-                                    &_gnome_notification); 
+                                   body,
+                                   NOTIFY_URGENCY_CRITICAL,
+                                   NOTIFY_EXPIRES_DEFAULT,
+                                   &_gnome_notification);
 }
 
 
-    void
+void
 notify_no_registered_accounts ()
 {
     gchar* title;
     gchar* body="";
 
-    body = g_markup_printf_escaped(_("You have no registered accounts"));
-    title = g_markup_printf_escaped(_("Error"));
+    body = g_markup_printf_escaped (_ ("You have no registered accounts"));
+    title = g_markup_printf_escaped (_ ("Error"));
 
     create_new_gnome_notification (title,
-                                    body, 
-                                    NOTIFY_URGENCY_CRITICAL, 
-                                    NOTIFY_EXPIRES_DEFAULT,
-                                    &_gnome_notification); 
+                                   body,
+                                   NOTIFY_URGENCY_CRITICAL,
+                                   NOTIFY_EXPIRES_DEFAULT,
+                                   &_gnome_notification);
 }
 
-    void
-stop_notification( void )
+void
+stop_notification (void)
 {
     /*
     if( _gnome_notification != NULL )
@@ -203,67 +203,67 @@ stop_notification( void )
  */
 void free_notification (GnomeNotification *g)
 {
-  g_free(g->title);
-  g_free(g->body);
-  g_free(g);
+    g_free (g->title);
+    g_free (g->body);
+    g_free (g);
 }
 
-    void
+void
 notify_secure_on (callable_obj_t* c)
 {
 
-        gchar* callerid;
-        gchar* title;
-        title = g_markup_printf_escaped ("Secure mode on.");
-        callerid = g_markup_printf_escaped(_("<i>With:</i> %s \nusing %s") , c->_peer_number, c->_srtp_cipher);
-        create_new_gnome_notification (title,
-                                        callerid, 
-                                        NOTIFY_URGENCY_CRITICAL, 
-                                        (g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
-                                        &_gnome_notification); 
+    gchar* callerid;
+    gchar* title;
+    title = g_markup_printf_escaped ("Secure mode on.");
+    callerid = g_markup_printf_escaped (_ ("<i>With:</i> %s \nusing %s") , c->_peer_number, c->_srtp_cipher);
+    create_new_gnome_notification (title,
+                                   callerid,
+                                   NOTIFY_URGENCY_CRITICAL,
+                                   (g_strcasecmp (__TIMEOUT_MODE, "default") == 0) ? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
+                                   &_gnome_notification);
 }
 
-    void
+void
 notify_zrtp_not_supported (callable_obj_t* c)
 {
 
-        gchar* callerid;
-        gchar* title;
-        title = g_markup_printf_escaped ("ZRTP Error.");
-        callerid = g_markup_printf_escaped(_("%s does not support ZRTP.") , c->_peer_number);
-        create_new_gnome_notification (title,
-                                        callerid, 
-                                        NOTIFY_URGENCY_CRITICAL, 
-                                        (g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
-                                        &_gnome_notification); 
+    gchar* callerid;
+    gchar* title;
+    title = g_markup_printf_escaped ("ZRTP Error.");
+    callerid = g_markup_printf_escaped (_ ("%s does not support ZRTP.") , c->_peer_number);
+    create_new_gnome_notification (title,
+                                   callerid,
+                                   NOTIFY_URGENCY_CRITICAL,
+                                   (g_strcasecmp (__TIMEOUT_MODE, "default") == 0) ? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
+                                   &_gnome_notification);
 }
 
-    void
+void
 notify_zrtp_negotiation_failed (callable_obj_t* c)
 {
 
-        gchar* callerid;
-        gchar* title;
-        title = g_markup_printf_escaped ("ZRTP Error.");
-        callerid = g_markup_printf_escaped(_("ZRTP negotiation failed with %s") , c->_peer_number);
-        create_new_gnome_notification (title,
-                                        callerid, 
-                                        NOTIFY_URGENCY_CRITICAL, 
-                                        (g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
-                                        &_gnome_notification); 
+    gchar* callerid;
+    gchar* title;
+    title = g_markup_printf_escaped ("ZRTP Error.");
+    callerid = g_markup_printf_escaped (_ ("ZRTP negotiation failed with %s") , c->_peer_number);
+    create_new_gnome_notification (title,
+                                   callerid,
+                                   NOTIFY_URGENCY_CRITICAL,
+                                   (g_strcasecmp (__TIMEOUT_MODE, "default") == 0) ? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
+                                   &_gnome_notification);
 }
 
-    void
+void
 notify_secure_off (callable_obj_t* c)
 {
 
-        gchar* callerid;
-        gchar* title;
-        title = g_markup_printf_escaped ("Secure mode is off.");
-        callerid = g_markup_printf_escaped(_("<i>With:</i> %s") , c->_peer_number);
-        create_new_gnome_notification (title,
-                                        callerid, 
-                                        NOTIFY_URGENCY_CRITICAL, 
-                                        (g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
-                                        &_gnome_notification); 
+    gchar* callerid;
+    gchar* title;
+    title = g_markup_printf_escaped ("Secure mode is off.");
+    callerid = g_markup_printf_escaped (_ ("<i>With:</i> %s") , c->_peer_number);
+    create_new_gnome_notification (title,
+                                   callerid,
+                                   NOTIFY_URGENCY_CRITICAL,
+                                   (g_strcasecmp (__TIMEOUT_MODE, "default") == 0) ? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER,
+                                   &_gnome_notification);
 }
diff --git a/sflphone-client-gnome/src/sflnotify.h b/sflphone-client-gnome/src/sflnotify.h
index 8734abec03cd3ba19748ad9ff760697e102e2c4b..41fd603b50f14cb8f4a9e2b319dfbe7e96d83637 100644
--- a/sflphone-client-gnome/src/sflnotify.h
+++ b/sflphone-client-gnome/src/sflnotify.h
@@ -60,7 +60,7 @@ void free_notification (GnomeNotification *g);
  * A dialog box is attached to the status icon
  * @param c The incoming call
  */
-void notify_incoming_call( callable_obj_t* c);
+void notify_incoming_call (callable_obj_t* c);
 
 /**
  * Notify an incoming text message
@@ -75,28 +75,28 @@ void notify_incoming_message (const gchar *callID, const gchar *msg);
  * @param count The number of voice mails
  * @param acc The account that received the notification
  */
-void notify_voice_mails( guint count , account_t* acc );
+void notify_voice_mails (guint count , account_t* acc);
 
 /**
  * Notify the current account used to make calls with
  * @param acc The current account
  */
-void notify_current_account( account_t* acc );
+void notify_current_account (account_t* acc);
 
 /**
  * Notify that no accounts have been setup
  */
-void notify_no_accounts( );
+void notify_no_accounts();
 
 /**
  * Notify that there is no registered account
  */
-void notify_no_registered_accounts(  );
+void notify_no_registered_accounts();
 
 /**
  * Stop and close the current notification if an action occured before the timeout
  */
-void stop_notification( void );
+void stop_notification (void);
 
 /**
  * Notify that the RTP session is secured
@@ -111,7 +111,7 @@ void notify_secure_off (callable_obj_t* c);
 /**
  * Notify that the ZRTP negotiation failed
  */
- 
+
 void notify_zrtp_negotiation_failed (callable_obj_t* c);
 
 /**
diff --git a/sflphone-client-gnome/src/sflphone_const.h b/sflphone-client-gnome/src/sflphone_const.h
index 6f27125dc05cfb2c2700ff6befe9b500ac8b0ab3..bf613935076a3b5d5bad1f54116d9f4b6d0a6ee0 100644
--- a/sflphone-client-gnome/src/sflphone_const.h
+++ b/sflphone-client-gnome/src/sflphone_const.h
@@ -51,7 +51,7 @@
 /** Locale */
 #define _(STRING)             gettext( STRING )
 #define N_(STRING)			  (STRING)
-#define c_(COMMENT,STRING)    gettext(STRING) 
+#define c_(COMMENT,STRING)    gettext(STRING)
 #define n_(SING,PLUR,COUNT)   ngettext(SING,PLUR,COUNT)
 
 #define IP2IP	"IP2IP"
@@ -103,7 +103,7 @@
 #define TLS_SERVER_NAME                     "TLS.serverName"
 #define TLS_VERIFY_SERVER                   "TLS.verifyServer"
 #define TLS_VERIFY_CLIENT                   "TLS.verifyClient"
-#define TLS_REQUIRE_CLIENT_CERTIFICATE      "TLS.requireClientCertificate"  
+#define TLS_REQUIRE_CLIENT_CERTIFICATE      "TLS.requireClientCertificate"
 #define TLS_NEGOTIATION_TIMEOUT_SEC         "TLS.negotiationTimeoutSec"
 #define TLS_NEGOTIATION_TIMEOUT_MSEC        "TLS.negotiationTimemoutMsec"
 
@@ -114,7 +114,7 @@
 #define PUBLISHED_ADDRESS                   "Account.publishedAddress"
 
 #define REGISTRATION_STATUS                 "Status"
-#define REGISTRATION_STATE_CODE             "Registration.code" 
+#define REGISTRATION_STATE_CODE             "Registration.code"
 #define REGISTRATION_STATE_DESCRIPTION      "Registration.description"
 
 /**
@@ -146,7 +146,7 @@ log4c_category_t* log4c_sfl_gtk_category;
 #define ALSA	      0
 #define PULSEAUDIO    1
 
- /** DTMF type */
+/** DTMF type */
 #define OVERRTP "overrtp"
 #define SIPINFO "sipinfo"
 
@@ -190,9 +190,9 @@ log4c_category_t* log4c_sfl_gtk_category;
 #define CONF_IM_WINDOW_POSITION_X		CONF_PREFIX "/state/im_position_x"
 #define CONF_IM_WINDOW_POSITION_Y		CONF_PREFIX "/state/im_position_y"
 /** Show/Hide the dialpad */
-#define CONF_SHOW_DIALPAD			CONF_PREFIX "/state/dialpad"	
-#define SHOW_VOLUME_CONTROLS		CONF_PREFIX "/state/volume_controls"	
-#define SHOW_STATUSICON				CONF_PREFIX "/state/statusicon"	
+#define CONF_SHOW_DIALPAD			CONF_PREFIX "/state/dialpad"
+#define SHOW_VOLUME_CONTROLS		CONF_PREFIX "/state/volume_controls"
+#define SHOW_STATUSICON				CONF_PREFIX "/state/statusicon"
 #define NOTIFY_ALL					CONF_PREFIX "/state/notify_all"
 #define START_HIDDEN				CONF_PREFIX "/state/start_hidden"
 #define POPUP_ON_CALL				CONF_PREFIX "/state/popup"
diff --git a/sflphone-client-gnome/src/shortcuts.c b/sflphone-client-gnome/src/shortcuts.c
index 4ecb7cd47bde7bb23f2f793d999e7f2eea9a04c2..11e3889463a0356bad6556359b21ad37e9e2354e 100644
--- a/sflphone-client-gnome/src/shortcuts.c
+++ b/sflphone-client-gnome/src/shortcuts.c
@@ -56,88 +56,80 @@ static GHashTable* shortcutsMap;
 static void
 toggle_pick_up_hang_up_callback ()
 {
-  callable_obj_t * selectedCall = calltab_get_selected_call (active_calltree);
-  conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
-
-  g_print("toggle_pick_up_hang_up_callback\n");
-
-  if (selectedCall)
-    {
-      switch (selectedCall->_state)
-        {
-      case CALL_STATE_INCOMING:
-      case CALL_STATE_TRANSFERT:
-        sflphone_pick_up ();
-        break;
-      case CALL_STATE_DIALING:
-      case CALL_STATE_HOLD:
-      case CALL_STATE_CURRENT:
-      case CALL_STATE_RECORD:
-      case CALL_STATE_RINGING:
-        sflphone_hang_up ();
-        break;
+    callable_obj_t * selectedCall = calltab_get_selected_call (active_calltree);
+    conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
+
+    g_print ("toggle_pick_up_hang_up_callback\n");
+
+    if (selectedCall) {
+        switch (selectedCall->_state) {
+            case CALL_STATE_INCOMING:
+            case CALL_STATE_TRANSFERT:
+                sflphone_pick_up ();
+                break;
+            case CALL_STATE_DIALING:
+            case CALL_STATE_HOLD:
+            case CALL_STATE_CURRENT:
+            case CALL_STATE_RECORD:
+            case CALL_STATE_RINGING:
+                sflphone_hang_up ();
+                break;
         }
-    }
-  else if (selectedConf)
-    {
-      dbus_hang_up_conference (selectedConf);
-    }
-  else
-    sflphone_pick_up ();
+    } else if (selectedConf) {
+        dbus_hang_up_conference (selectedConf);
+    } else
+        sflphone_pick_up ();
 }
 
 static void
 pick_up_callback ()
 {
-  sflphone_pick_up ();
+    sflphone_pick_up ();
 }
 
 static void
 hang_up_callback ()
 {
-  sflphone_hang_up ();
+    sflphone_hang_up ();
 }
 
 static void
 toggle_hold_callback ()
 {
-  callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
-  conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
-
-  if (selectedCall)
-    {
-      switch (selectedCall->_state)
-        {
-      case CALL_STATE_CURRENT:
-      case CALL_STATE_RECORD:
-        g_print("on hold\n");
-        sflphone_on_hold();
-        break;
-      case CALL_STATE_HOLD:
-        g_print("off hold\n");
-        sflphone_off_hold();
-        break;
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+    conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
+
+    if (selectedCall) {
+        switch (selectedCall->_state) {
+            case CALL_STATE_CURRENT:
+            case CALL_STATE_RECORD:
+                g_print ("on hold\n");
+                sflphone_on_hold();
+                break;
+            case CALL_STATE_HOLD:
+                g_print ("off hold\n");
+                sflphone_off_hold();
+                break;
         }
-    }
-  else if (selectedConf)
-    dbus_hold_conference (selectedConf);
-  else
-    ERROR("Should not happen");
+    } else if (selectedConf)
+        dbus_hold_conference (selectedConf);
+    else
+        ERROR ("Should not happen");
 }
 
 static void
 popup_window_callback ()
 {
-  gtk_widget_hide (GTK_WIDGET(get_main_window()));
-  gtk_widget_show (GTK_WIDGET(get_main_window()));
-  gtk_window_move (GTK_WINDOW (get_main_window ()),
-      dbus_get_window_position_x (), dbus_get_window_position_y ());
+    gtk_widget_hide (GTK_WIDGET (get_main_window()));
+    gtk_widget_show (GTK_WIDGET (get_main_window()));
+    gtk_window_move (GTK_WINDOW (get_main_window ()),
+                     dbus_get_window_position_x (), dbus_get_window_position_y ());
 }
 
 static void
 default_callback ()
 {
-  ERROR("Missing shortcut callback");
+    ERROR ("Missing shortcut callback");
 }
 
 /*
@@ -146,22 +138,22 @@ default_callback ()
 static void*
 get_action_callback (const gchar* action)
 {
-  if (strcmp (action, "pick_up") == 0)
-    return pick_up_callback;
+    if (strcmp (action, "pick_up") == 0)
+        return pick_up_callback;
 
-  if (strcmp (action, "hang_up") == 0)
-    return hang_up_callback;
+    if (strcmp (action, "hang_up") == 0)
+        return hang_up_callback;
 
-  if (strcmp (action, "popup_window") == 0)
-    return popup_window_callback;
+    if (strcmp (action, "popup_window") == 0)
+        return popup_window_callback;
 
-  if (strcmp (action, "toggle_pick_up_hang_up") == 0)
-    return toggle_pick_up_hang_up_callback;
+    if (strcmp (action, "toggle_pick_up_hang_up") == 0)
+        return toggle_pick_up_hang_up_callback;
 
-  if (strcmp (action, "toggle_hold") == 0)
-    return toggle_hold_callback;
+    if (strcmp (action, "toggle_hold") == 0)
+        return toggle_hold_callback;
 
-  return default_callback;
+    return default_callback;
 }
 
 /*
@@ -174,32 +166,29 @@ get_action_callback (const gchar* action)
 static void
 remove_bindings ()
 {
-  GdkDisplay *display;
-  GdkScreen *screen;
-  GdkWindow *root;
-
-  display = gdk_display_get_default ();
-
-  int i = 0;
-  int j = 0;
-  while (accelerators_list[i].action != NULL)
-    {
-      if (accelerators_list[i].value != 0)
-        {
-          for (j = 0; j < gdk_display_get_n_screens (display); j++)
-            {
-              screen = gdk_display_get_screen (display, j);
-
-              if (screen != NULL)
-                {
-                  root = gdk_screen_get_root_window (screen);
-                  ungrab_key (accelerators_list[i].value, root);
-                  gdk_window_remove_filter (root, filter_keys, NULL);
+    GdkDisplay *display;
+    GdkScreen *screen;
+    GdkWindow *root;
+
+    display = gdk_display_get_default ();
+
+    int i = 0;
+    int j = 0;
+
+    while (accelerators_list[i].action != NULL) {
+        if (accelerators_list[i].value != 0) {
+            for (j = 0; j < gdk_display_get_n_screens (display); j++) {
+                screen = gdk_display_get_screen (display, j);
+
+                if (screen != NULL) {
+                    root = gdk_screen_get_root_window (screen);
+                    ungrab_key (accelerators_list[i].value, root);
+                    gdk_window_remove_filter (root, filter_keys, NULL);
                 }
             }
         }
 
-      i++;
+        i++;
     }
 }
 
@@ -209,33 +198,30 @@ remove_bindings ()
 static void
 create_bindings ()
 {
-  GdkDisplay *display;
-  GdkScreen *screen;
-  GdkWindow *root;
-
-  display = gdk_display_get_default ();
-
-  int i = 0;
-  int j = 0;
-  while (accelerators_list[i].action != NULL)
-    {
-      if (accelerators_list[i].value != 0)
-        {
-          // updated GDK bindings
-          for (j = 0; j < gdk_display_get_n_screens (display); j++)
-            {
-              screen = gdk_display_get_screen (display, j);
-
-              if (screen != NULL)
-                {
-                  root = gdk_screen_get_root_window (screen);
-                  grab_key (accelerators_list[i].value, root);
-                  gdk_window_add_filter (root, filter_keys, NULL);
+    GdkDisplay *display;
+    GdkScreen *screen;
+    GdkWindow *root;
+
+    display = gdk_display_get_default ();
+
+    int i = 0;
+    int j = 0;
+
+    while (accelerators_list[i].action != NULL) {
+        if (accelerators_list[i].value != 0) {
+            // updated GDK bindings
+            for (j = 0; j < gdk_display_get_n_screens (display); j++) {
+                screen = gdk_display_get_screen (display, j);
+
+                if (screen != NULL) {
+                    root = gdk_screen_get_root_window (screen);
+                    grab_key (accelerators_list[i].value, root);
+                    gdk_window_add_filter (root, filter_keys, NULL);
                 }
             }
         }
 
-      i++;
+        i++;
     }
 }
 
@@ -245,28 +231,27 @@ create_bindings ()
 static void
 initialize_binding (const gchar* action, const guint code)
 {
-  //initialize_shortcuts_keys();
-  int index = 0;
-  while (accelerators_list[index].action != NULL)
-    {
-      if (strcmp (action, accelerators_list[index].action) == 0)
-        {
-          break;
+    //initialize_shortcuts_keys();
+    int index = 0;
+
+    while (accelerators_list[index].action != NULL) {
+        if (strcmp (action, accelerators_list[index].action) == 0) {
+            break;
         }
-      index++;
+
+        index++;
     }
 
-  if (accelerators_list[index].action == NULL)
-    {
-      ERROR("Should not happen: cannot find corresponding action");
-      return;
+    if (accelerators_list[index].action == NULL) {
+        ERROR ("Should not happen: cannot find corresponding action");
+        return;
     }
 
-  // update config value
-  accelerators_list[index].value = code;
+    // update config value
+    accelerators_list[index].value = code;
 
-  // update bindings
-  create_bindings ();
+    // update bindings
+    create_bindings ();
 }
 
 /*
@@ -275,60 +260,60 @@ initialize_binding (const gchar* action, const guint code)
 static void
 initialize_accelerators_list ()
 {
-  GList* shortcutsKeys = g_hash_table_get_keys (shortcutsMap);
+    GList* shortcutsKeys = g_hash_table_get_keys (shortcutsMap);
+
+    accelerators_list = (Accelerator*) malloc (
+                            (g_list_length (shortcutsKeys) + 1) * sizeof (Accelerator));
 
-  accelerators_list = (Accelerator*) malloc (
-      (g_list_length (shortcutsKeys) + 1) * sizeof(Accelerator));
+    GList* shortcutsKeysElement;
+    int index = 0;
 
-  GList* shortcutsKeysElement;
-  int index = 0;
-  for (shortcutsKeysElement = shortcutsKeys; shortcutsKeysElement; shortcutsKeysElement
-      = shortcutsKeysElement->next)
-    {
-      gchar* action = shortcutsKeysElement->data;
+    for (shortcutsKeysElement = shortcutsKeys; shortcutsKeysElement; shortcutsKeysElement
+            = shortcutsKeysElement->next) {
+        gchar* action = shortcutsKeysElement->data;
 
-      accelerators_list[index].action = g_strdup (action);
-      accelerators_list[index].callback = get_action_callback (action);
-      accelerators_list[index].mask = 0;
-      accelerators_list[index].value = 0;
+        accelerators_list[index].action = g_strdup (action);
+        accelerators_list[index].callback = get_action_callback (action);
+        accelerators_list[index].mask = 0;
+        accelerators_list[index].value = 0;
 
-      index++;
+        index++;
     }
 
-  // last element must be null
-  accelerators_list[index].action = 0;
-  accelerators_list[index].callback = 0;
-  accelerators_list[index].mask = 0;
-  accelerators_list[index].value = 0;
+    // last element must be null
+    accelerators_list[index].action = 0;
+    accelerators_list[index].callback = 0;
+    accelerators_list[index].mask = 0;
+    accelerators_list[index].value = 0;
 }
 
 static void
 update_bindings_data (const guint index, const guint code)
 {
-  // we need to be sure this code is not already affected
-  // to another action
-  int i = 0;
-  while (accelerators_list[i].action != NULL)
-    {
-      if (accelerators_list[i].value == code)
-        {
-          // disable old binding
-          accelerators_list[i].value = 0;
-
-          // update config table
-          g_hash_table_replace (shortcutsMap, g_strdup (
-              accelerators_list[i].action), GINT_TO_POINTER (0));
+    // we need to be sure this code is not already affected
+    // to another action
+    int i = 0;
+
+    while (accelerators_list[i].action != NULL) {
+        if (accelerators_list[i].value == code) {
+            // disable old binding
+            accelerators_list[i].value = 0;
+
+            // update config table
+            g_hash_table_replace (shortcutsMap, g_strdup (
+                                      accelerators_list[i].action), GINT_TO_POINTER (0));
         }
-      i++;
+
+        i++;
     }
 
-  // store new value
-  accelerators_list[index].value = code;
+    // store new value
+    accelerators_list[index].value = code;
 
-  // update value in hashtable (used for dbus calls)
-  g_hash_table_replace (shortcutsMap,
-      g_strdup (accelerators_list[index].action), GINT_TO_POINTER (
-          accelerators_list[index].value));
+    // update value in hashtable (used for dbus calls)
+    g_hash_table_replace (shortcutsMap,
+                          g_strdup (accelerators_list[index].action), GINT_TO_POINTER (
+                              accelerators_list[index].value));
 }
 
 /*
@@ -341,17 +326,17 @@ update_bindings_data (const guint index, const guint code)
 void
 shortcuts_update_bindings (const guint index, const guint code)
 {
-  // first remove all existing bindings
-  remove_bindings ();
+    // first remove all existing bindings
+    remove_bindings ();
 
-  // update data
-  update_bindings_data (index, code);
+    // update data
+    update_bindings_data (index, code);
 
-  // recreate all bindings
-  create_bindings ();
+    // recreate all bindings
+    create_bindings ();
 
-  // update configuration
-  dbus_set_shortcuts (shortcutsMap);
+    // update configuration
+    dbus_set_shortcuts (shortcutsMap);
 }
 
 /*
@@ -360,22 +345,23 @@ shortcuts_update_bindings (const guint index, const guint code)
 void
 shortcuts_initialize_bindings ()
 {
-  // get shortcuts stored in config through dbus
-  shortcutsMap = dbus_get_shortcuts ();
-
-  // initialize list of keys
-  initialize_accelerators_list ();
-
-  // iterate through keys to initialize bindings
-  GList* shortcutsKeys = g_hash_table_get_keys (shortcutsMap);
-  GList* shortcutsKeysElement;
-  for (shortcutsKeysElement = shortcutsKeys; shortcutsKeysElement; shortcutsKeysElement
-      = shortcutsKeysElement->next)
-    {
-      gchar* key = shortcutsKeysElement->data;
-      int shortcut = (size_t) g_hash_table_lookup (shortcutsMap, key);
-      if (shortcut != 0)
-        initialize_binding (key, shortcut);
+    // get shortcuts stored in config through dbus
+    shortcutsMap = dbus_get_shortcuts ();
+
+    // initialize list of keys
+    initialize_accelerators_list ();
+
+    // iterate through keys to initialize bindings
+    GList* shortcutsKeys = g_hash_table_get_keys (shortcutsMap);
+    GList* shortcutsKeysElement;
+
+    for (shortcutsKeysElement = shortcutsKeys; shortcutsKeysElement; shortcutsKeysElement
+            = shortcutsKeysElement->next) {
+        gchar* key = shortcutsKeysElement->data;
+        int shortcut = (size_t) g_hash_table_lookup (shortcutsMap, key);
+
+        if (shortcut != 0)
+            initialize_binding (key, shortcut);
     }
 }
 
@@ -385,23 +371,24 @@ shortcuts_initialize_bindings ()
 void
 shortcuts_destroy_bindings ()
 {
-  // remove bindings
-  remove_bindings ();
-
-  // free pointers
-  int index = 0;
-  while (accelerators_list[index].action != NULL)
-    {
-      g_free (accelerators_list[index].action);
-      index++;
+    // remove bindings
+    remove_bindings ();
+
+    // free pointers
+    int index = 0;
+
+    while (accelerators_list[index].action != NULL) {
+        g_free (accelerators_list[index].action);
+        index++;
     }
-  free (accelerators_list);
+
+    free (accelerators_list);
 }
 
 Accelerator*
 shortcuts_get_list ()
 {
-  return accelerators_list;
+    return accelerators_list;
 }
 
 /*
@@ -414,36 +401,36 @@ shortcuts_get_list ()
 static GdkFilterReturn
 filter_keys (GdkXEvent *xevent, GdkEvent *event, gpointer data)
 {
-  XEvent *xev;
-  XKeyEvent *key;
+    XEvent *xev;
+    XKeyEvent *key;
 
-  xev = (XEvent *) xevent;
-  if (xev->type != KeyPress)
-    {
-      return GDK_FILTER_CONTINUE;
+    xev = (XEvent *) xevent;
+
+    if (xev->type != KeyPress) {
+        return GDK_FILTER_CONTINUE;
     }
 
-  key = (XKeyEvent *) xevent;
+    key = (XKeyEvent *) xevent;
+
+    // try to find corresponding action
+    int i = 0;
 
-  // try to find corresponding action
-  int i = 0;
-  while (accelerators_list[i].action != NULL)
-    {
-      if (accelerators_list[i].value == key->keycode)
-        {
-          DEBUG("catched key for action: %s (%d)", accelerators_list[i].action,
-              accelerators_list[i].value);
+    while (accelerators_list[i].action != NULL) {
+        if (accelerators_list[i].value == key->keycode) {
+            DEBUG ("catched key for action: %s (%d)", accelerators_list[i].action,
+                   accelerators_list[i].value);
 
-          // call associated callback function
-          accelerators_list[i].callback ();
+            // call associated callback function
+            accelerators_list[i].callback ();
 
-          return GDK_FILTER_REMOVE;
+            return GDK_FILTER_REMOVE;
         }
-      i++;
+
+        i++;
     }
 
-  DEBUG("Should not be reached :(\n");
-  return GDK_FILTER_CONTINUE;
+    DEBUG ("Should not be reached :(\n");
+    return GDK_FILTER_CONTINUE;
 }
 
 /*
@@ -452,25 +439,25 @@ filter_keys (GdkXEvent *xevent, GdkEvent *event, gpointer data)
 static void
 ungrab_key (int key_code, GdkWindow *root)
 {
-  gdk_error_trap_push ();
-
-  XUngrabKey (GDK_DISPLAY(), key_code, 0, GDK_WINDOW_XID(root));
-  XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask, GDK_WINDOW_XID(root));
-  XUngrabKey (GDK_DISPLAY(), key_code, Mod5Mask, GDK_WINDOW_XID(root));
-  XUngrabKey (GDK_DISPLAY(), key_code, LockMask, GDK_WINDOW_XID(root));
-  XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask,
-      GDK_WINDOW_XID(root));
-  XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask | LockMask,
-      GDK_WINDOW_XID(root));
-  XUngrabKey (GDK_DISPLAY(), key_code, Mod5Mask | LockMask,
-      GDK_WINDOW_XID(root));
-  XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask | LockMask,
-      GDK_WINDOW_XID(root));
-
-  gdk_flush ();
-  if (gdk_error_trap_pop ())
-    {
-      ERROR("Error ungrabbing key");
+    gdk_error_trap_push ();
+
+    XUngrabKey (GDK_DISPLAY(), key_code, 0, GDK_WINDOW_XID (root));
+    XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask, GDK_WINDOW_XID (root));
+    XUngrabKey (GDK_DISPLAY(), key_code, Mod5Mask, GDK_WINDOW_XID (root));
+    XUngrabKey (GDK_DISPLAY(), key_code, LockMask, GDK_WINDOW_XID (root));
+    XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask,
+                GDK_WINDOW_XID (root));
+    XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask | LockMask,
+                GDK_WINDOW_XID (root));
+    XUngrabKey (GDK_DISPLAY(), key_code, Mod5Mask | LockMask,
+                GDK_WINDOW_XID (root));
+    XUngrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask | LockMask,
+                GDK_WINDOW_XID (root));
+
+    gdk_flush ();
+
+    if (gdk_error_trap_pop ()) {
+        ERROR ("Error ungrabbing key");
     }
 }
 
@@ -481,28 +468,28 @@ static void
 grab_key (int key_code, GdkWindow *root)
 {
 
-  gdk_error_trap_push ();
-
-  XGrabKey (GDK_DISPLAY(), key_code, 0, GDK_WINDOW_XID(root), True,
-      GrabModeAsync, GrabModeAsync);
-  XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask, GDK_WINDOW_XID(root), True,
-      GrabModeAsync, GrabModeAsync);
-  XGrabKey (GDK_DISPLAY(), key_code, Mod5Mask, GDK_WINDOW_XID(root), True,
-      GrabModeAsync, GrabModeAsync);
-  XGrabKey (GDK_DISPLAY(), key_code, LockMask, GDK_WINDOW_XID(root), True,
-      GrabModeAsync, GrabModeAsync);
-  XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask, GDK_WINDOW_XID(root),
-      True, GrabModeAsync, GrabModeAsync);
-  XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask | LockMask, GDK_WINDOW_XID(root),
-      True, GrabModeAsync, GrabModeAsync);
-  XGrabKey (GDK_DISPLAY(), key_code, Mod5Mask | LockMask, GDK_WINDOW_XID(root),
-      True, GrabModeAsync, GrabModeAsync);
-  XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask | LockMask,
-      GDK_WINDOW_XID(root), True, GrabModeAsync, GrabModeAsync);
-
-  gdk_flush ();
-  if (gdk_error_trap_pop ())
-    {
-      ERROR("Error grabbing key");
+    gdk_error_trap_push ();
+
+    XGrabKey (GDK_DISPLAY(), key_code, 0, GDK_WINDOW_XID (root), True,
+              GrabModeAsync, GrabModeAsync);
+    XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask, GDK_WINDOW_XID (root), True,
+              GrabModeAsync, GrabModeAsync);
+    XGrabKey (GDK_DISPLAY(), key_code, Mod5Mask, GDK_WINDOW_XID (root), True,
+              GrabModeAsync, GrabModeAsync);
+    XGrabKey (GDK_DISPLAY(), key_code, LockMask, GDK_WINDOW_XID (root), True,
+              GrabModeAsync, GrabModeAsync);
+    XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask, GDK_WINDOW_XID (root),
+              True, GrabModeAsync, GrabModeAsync);
+    XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask | LockMask, GDK_WINDOW_XID (root),
+              True, GrabModeAsync, GrabModeAsync);
+    XGrabKey (GDK_DISPLAY(), key_code, Mod5Mask | LockMask, GDK_WINDOW_XID (root),
+              True, GrabModeAsync, GrabModeAsync);
+    XGrabKey (GDK_DISPLAY(), key_code, Mod2Mask | Mod5Mask | LockMask,
+              GDK_WINDOW_XID (root), True, GrabModeAsync, GrabModeAsync);
+
+    gdk_flush ();
+
+    if (gdk_error_trap_pop ()) {
+        ERROR ("Error grabbing key");
     }
 }
diff --git a/sflphone-client-gnome/src/shortcuts.h b/sflphone-client-gnome/src/shortcuts.h
index 47f8fec550dc48ba8ad083994b1e17c78f9810a2..fda7f8940a23749bdbe94ef4b393556a4e2cef85 100644
--- a/sflphone-client-gnome/src/shortcuts.h
+++ b/sflphone-client-gnome/src/shortcuts.h
@@ -31,13 +31,12 @@
 #ifndef SHORTCUTS_H_
 #define SHORTCUTS_H_
 
-typedef struct
-{
-  gchar *action;
-  GdkModifierType mask;
-  guint value;
-  void
-  (*callback) (void);
+typedef struct {
+    gchar *action;
+    GdkModifierType mask;
+    guint value;
+    void
+    (*callback) (void);
 } Accelerator;
 
 static void
diff --git a/sflphone-client-gnome/src/sliders.c b/sflphone-client-gnome/src/sliders.c
index 65e393c8e787ed1ccb7a22d4377d41d9fd730da3..45ac5645790a7865587ad244b0203bfd6d0fdb75 100644
--- a/sflphone-client-gnome/src/sliders.c
+++ b/sflphone-client-gnome/src/sliders.c
@@ -40,16 +40,16 @@ GtkWidget * button[2];
 // icons
 GtkWidget * images[2][4];
 enum device_t {
-  SPEAKER = 0,
-  MIKE,
-  DEVICE_COUNT
+    SPEAKER = 0,
+    MIKE,
+    DEVICE_COUNT
 } ;
 
 enum volume_t {
-  MUTED = 0,
-  VOL25,
-  VOL50,
-  VOL75
+    MUTED = 0,
+    VOL25,
+    VOL50,
+    VOL75
 } ;
 
 guint toggledConnId[2]; // The button toggled signal connection ID
@@ -58,137 +58,139 @@ guint movedConnId[2];   // The slider_moved signal connection ID
 void
 update_icons (int dev)
 {
-  float val = gtk_range_get_value(GTK_RANGE(slider[dev]));
-  if(button[dev])
-  {
-    int icon = MUTED;
-    if(val == 0)
-      icon = MUTED;
-    else if( val < 0.33)
-      icon = VOL25;
-    else if( val < 0.66)
-      icon = VOL50;
-    else if( val <= 1)
-      icon = VOL75;
-    gtk_button_set_image(GTK_BUTTON(button[dev]), GTK_WIDGET(images[dev][icon]));
-  }
+    float val = gtk_range_get_value (GTK_RANGE (slider[dev]));
+
+    if (button[dev]) {
+        int icon = MUTED;
+
+        if (val == 0)
+            icon = MUTED;
+        else if (val < 0.33)
+            icon = VOL25;
+        else if (val < 0.66)
+            icon = VOL50;
+        else if (val <= 1)
+            icon = VOL75;
+
+        gtk_button_set_image (GTK_BUTTON (button[dev]), GTK_WIDGET (images[dev][icon]));
+    }
 }
 
 void
-slider_moved(GtkRange* range, gchar* device)
+slider_moved (GtkRange* range, gchar* device)
 {
-  gdouble value = gtk_range_get_value(range);
-  DEBUG("Volume changed for %s: %f ", device, value);
-  dbus_set_volume(device, value);
-  if(strcmp(device, "speaker") == 0)
-    update_icons(SPEAKER);
-  else
-    update_icons(MIKE);
+    gdouble value = gtk_range_get_value (range);
+    DEBUG ("Volume changed for %s: %f ", device, value);
+    dbus_set_volume (device, value);
+
+    if (strcmp (device, "speaker") == 0)
+        update_icons (SPEAKER);
+    else
+        update_icons (MIKE);
 }
 
 static void
-mute_cb( GtkWidget *widget, gchar*  device )
+mute_cb (GtkWidget *widget, gchar*  device)
 {
-  int dev;
-  if(strcmp(device, "speaker") == 0)
-    dev = SPEAKER;
-  else
-    dev = MIKE;
-
-  if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
-  { // Save value
-    DEBUG("Save");
-    value[dev] = gtk_range_get_value(GTK_RANGE(slider[dev]));
-    dbus_set_volume(device, 0);
-  }
-  else
-  { //Restore value
-    DEBUG("Restore");
-    dbus_set_volume(device, value[dev]);
-  }
-  update_icons (dev);
+    int dev;
+
+    if (strcmp (device, "speaker") == 0)
+        dev = SPEAKER;
+    else
+        dev = MIKE;
+
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) { // Save value
+        DEBUG ("Save");
+        value[dev] = gtk_range_get_value (GTK_RANGE (slider[dev]));
+        dbus_set_volume (device, 0);
+    } else { //Restore value
+        DEBUG ("Restore");
+        dbus_set_volume (device, value[dev]);
+    }
+
+    update_icons (dev);
 }
 
 void
-set_slider(const gchar * device, gdouble newval)
+set_slider (const gchar * device, gdouble newval)
 {
-  int dev;
-  if(strcmp(device, "speaker") == 0)
-    dev = SPEAKER;
-  else
-    dev = MIKE;
+    int dev;
 
-  gtk_signal_handler_block(GTK_OBJECT(slider[dev]), movedConnId[dev]);
-  gtk_range_set_value(GTK_RANGE(slider[dev]), newval);
-  gtk_signal_handler_unblock(slider[dev], movedConnId[dev]);
+    if (strcmp (device, "speaker") == 0)
+        dev = SPEAKER;
+    else
+        dev = MIKE;
 
-  gtk_signal_handler_block(GTK_OBJECT(button[dev]),toggledConnId[dev]);
-  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button[dev]), (newval == 0 ? TRUE: FALSE));
-  gtk_signal_handler_unblock(button[dev], toggledConnId[dev]);
+    gtk_signal_handler_block (GTK_OBJECT (slider[dev]), movedConnId[dev]);
+    gtk_range_set_value (GTK_RANGE (slider[dev]), newval);
+    gtk_signal_handler_unblock (slider[dev], movedConnId[dev]);
 
-  update_icons (dev);
+    gtk_signal_handler_block (GTK_OBJECT (button[dev]),toggledConnId[dev]);
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button[dev]), (newval == 0 ? TRUE: FALSE));
+    gtk_signal_handler_unblock (button[dev], toggledConnId[dev]);
+
+    update_icons (dev);
 }
 
 /** Generates the speaker slider and mute button */
 GtkWidget *
-create_slider(const gchar * device)
+create_slider (const gchar * device)
 {
-  // Increment the references count for the images
-  // When the image is removed from a button, if the ref count = 0, then it is destroyed
-  // which we don't want ;)
-
-  GtkWidget * ret;
-  int dev=0;
-
-  if(strcmp(device, "speaker") == 0)
-  {
-    dev = SPEAKER;
-    images[SPEAKER][MUTED] = gtk_image_new_from_file( ICONS_DIR "/speaker.svg");
-    images[SPEAKER][VOL25] = gtk_image_new_from_file( ICONS_DIR "/speaker_25.svg");
-    images[SPEAKER][VOL50] = gtk_image_new_from_file( ICONS_DIR "/speaker_50.svg");
-    images[SPEAKER][VOL75] = gtk_image_new_from_file( ICONS_DIR "/speaker_75.svg");
-	  g_object_ref(images[SPEAKER][MUTED]);
-	  g_object_ref(images[SPEAKER][VOL25]);
-	  g_object_ref(images[SPEAKER][VOL50]);
-	  g_object_ref(images[SPEAKER][VOL75]);
-  }
-  else if (strcmp(device, "mic") == 0)
-  {
-    dev = MIKE;
-    images[MIKE][MUTED] = gtk_image_new_from_file( ICONS_DIR "/mic.svg");
-    images[MIKE][VOL25] = gtk_image_new_from_file( ICONS_DIR "/mic_25.svg");
-    images[MIKE][VOL50] = gtk_image_new_from_file( ICONS_DIR "/mic_50.svg");
-    images[MIKE][VOL75] = gtk_image_new_from_file( ICONS_DIR "/mic_75.svg");
-	  g_object_ref(images[MIKE][MUTED]);
-	  g_object_ref(images[MIKE][VOL25]);
-	  g_object_ref(images[MIKE][VOL50]);
-	  g_object_ref(images[MIKE][VOL75]);
-  }
-
-  ret = gtk_hbox_new ( FALSE /*homogeneous*/, 5 /*spacing*/);
-  gtk_container_set_border_width (GTK_CONTAINER(ret), 5);
-  
+    // Increment the references count for the images
+    // When the image is removed from a button, if the ref count = 0, then it is destroyed
+    // which we don't want ;)
+
+    GtkWidget * ret;
+    int dev=0;
+
+    if (strcmp (device, "speaker") == 0) {
+        dev = SPEAKER;
+        images[SPEAKER][MUTED] = gtk_image_new_from_file (ICONS_DIR "/speaker.svg");
+        images[SPEAKER][VOL25] = gtk_image_new_from_file (ICONS_DIR "/speaker_25.svg");
+        images[SPEAKER][VOL50] = gtk_image_new_from_file (ICONS_DIR "/speaker_50.svg");
+        images[SPEAKER][VOL75] = gtk_image_new_from_file (ICONS_DIR "/speaker_75.svg");
+        g_object_ref (images[SPEAKER][MUTED]);
+        g_object_ref (images[SPEAKER][VOL25]);
+        g_object_ref (images[SPEAKER][VOL50]);
+        g_object_ref (images[SPEAKER][VOL75]);
+    } else if (strcmp (device, "mic") == 0) {
+        dev = MIKE;
+        images[MIKE][MUTED] = gtk_image_new_from_file (ICONS_DIR "/mic.svg");
+        images[MIKE][VOL25] = gtk_image_new_from_file (ICONS_DIR "/mic_25.svg");
+        images[MIKE][VOL50] = gtk_image_new_from_file (ICONS_DIR "/mic_50.svg");
+        images[MIKE][VOL75] = gtk_image_new_from_file (ICONS_DIR "/mic_75.svg");
+        g_object_ref (images[MIKE][MUTED]);
+        g_object_ref (images[MIKE][VOL25]);
+        g_object_ref (images[MIKE][VOL50]);
+        g_object_ref (images[MIKE][VOL75]);
+    }
+
+    ret = gtk_hbox_new (FALSE /*homogeneous*/, 5 /*spacing*/);
+    gtk_container_set_border_width (GTK_CONTAINER (ret), 5);
+
 #if GTK_CHECK_VERSION(2,12,0)
-  if( strcmp( device , "speaker") == 0 )
-    gtk_widget_set_tooltip_text( GTK_WIDGET( ret ), _("Speakers volume"));
-  else
-    gtk_widget_set_tooltip_text( GTK_WIDGET( ret ), _("Mic volume"));
+
+    if (strcmp (device , "speaker") == 0)
+        gtk_widget_set_tooltip_text (GTK_WIDGET (ret), _ ("Speakers volume"));
+    else
+        gtk_widget_set_tooltip_text (GTK_WIDGET (ret), _ ("Mic volume"));
+
 #endif
 
-  button[dev] = gtk_toggle_button_new();
-  gtk_box_pack_start (GTK_BOX (ret), button[dev], FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
-  toggledConnId[dev] = g_signal_connect (G_OBJECT (button[dev]), "toggled",
-                    G_CALLBACK (mute_cb), (gpointer)device);
+    button[dev] = gtk_toggle_button_new();
+    gtk_box_pack_start (GTK_BOX (ret), button[dev], FALSE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
+    toggledConnId[dev] = g_signal_connect (G_OBJECT (button[dev]), "toggled",
+                                           G_CALLBACK (mute_cb), (gpointer) device);
 
-  slider[dev] = gtk_hscale_new_with_range(0, 1, 0.05);
-  gtk_scale_set_draw_value(GTK_SCALE(slider[dev]), FALSE);
-  //gtk_range_set_update_policy(GTK_RANGE(slider), GTK_UPDATE_DELAYED);
-  movedConnId[dev] = g_signal_connect (G_OBJECT (slider[dev]), "value_changed",
-                    G_CALLBACK (slider_moved), (gpointer)device);
-  gtk_box_pack_start (GTK_BOX (ret), slider[dev], TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
+    slider[dev] = gtk_hscale_new_with_range (0, 1, 0.05);
+    gtk_scale_set_draw_value (GTK_SCALE (slider[dev]), FALSE);
+    //gtk_range_set_update_policy(GTK_RANGE(slider), GTK_UPDATE_DELAYED);
+    movedConnId[dev] = g_signal_connect (G_OBJECT (slider[dev]), "value_changed",
+                                         G_CALLBACK (slider_moved), (gpointer) device);
+    gtk_box_pack_start (GTK_BOX (ret), slider[dev], TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
 
-  set_slider(device, dbus_get_volume(device));
+    set_slider (device, dbus_get_volume (device));
 
-  return ret;
+    return ret;
 }
 
diff --git a/sflphone-client-gnome/src/sliders.h b/sflphone-client-gnome/src/sliders.h
index 531a1b22bd9a435e967c270efb39704fd02c7c15..574af9104d14befe50634bc620c39a0aff3fff31 100644
--- a/sflphone-client-gnome/src/sliders.h
+++ b/sflphone-client-gnome/src/sliders.h
@@ -1,17 +1,17 @@
 /*
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -27,7 +27,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
- 
+
 #ifndef __SLIDERS_H__
 #define __SLIDERS_H__
 
@@ -41,16 +41,16 @@
  * @param device  Mic or speaker
  * @return GtkWidget* The slider
  */
-GtkWidget * create_slider(const gchar * device);
+GtkWidget * create_slider (const gchar * device);
 
 
-/** 
+/**
  * This function updates the sliders without sending the value to the server.
  * This behavior prevents an infinite loop when receiving an updated volume from
  * the server.
  * @param device The device slider to update {speaker, mic}
  * @param value The value to set [0, 1.0]
  */
-void set_slider(const gchar * device, gdouble value);
+void set_slider (const gchar * device, gdouble value);
 
-#endif 
+#endif
diff --git a/sflphone-client-gnome/src/statusicon.c b/sflphone-client-gnome/src/statusicon.c
index 72511091f05e8591ce022a2b64984329715c2dd3..93348e1e5d068c101da36cef8280f5d6f2b09942 100644
--- a/sflphone-client-gnome/src/statusicon.c
+++ b/sflphone-client-gnome/src/statusicon.c
@@ -2,17 +2,17 @@
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -41,147 +41,143 @@ GtkWidget *show_menu_item, *hangup_menu_item;
 gboolean __minimized = MINIMIZED;
 
 void
-popup_main_window(void)
-{
-  if (__POPUP_WINDOW)
-    {
-      gtk_widget_show(get_main_window());
-      gtk_window_move(GTK_WINDOW (get_main_window ()),
-          dbus_get_window_position_x(), dbus_get_window_position_y());
-      set_minimized(FALSE);
+popup_main_window (void)
+{
+    if (__POPUP_WINDOW) {
+        gtk_widget_show (get_main_window());
+        gtk_window_move (GTK_WINDOW (get_main_window ()),
+                         dbus_get_window_position_x(), dbus_get_window_position_y());
+        set_minimized (FALSE);
     }
 }
 
 void
 show_status_hangup_icon()
 {
-	if (__POPUP_WINDOW)
-	{
-		gtk_widget_show (get_main_window ());
-		gtk_window_move (GTK_WINDOW (get_main_window ()), eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_X), eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_Y));
-		set_minimized (FALSE);
-	}
+    if (__POPUP_WINDOW) {
+        gtk_widget_show (get_main_window ());
+        gtk_window_move (GTK_WINDOW (get_main_window ()), eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_X), eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_Y));
+        set_minimized (FALSE);
+    }
 }
 
 void
 hide_status_hangup_icon()
 {
-  if (status) {
-    DEBUG("Hide Hangup in Systray");
-    gtk_widget_hide(GTK_WIDGET(hangup_menu_item));
-  }
+    if (status) {
+        DEBUG ("Hide Hangup in Systray");
+        gtk_widget_hide (GTK_WIDGET (hangup_menu_item));
+    }
 }
 
 void
-status_quit(void * foo UNUSED)
+status_quit (void * foo UNUSED)
 {
-  sflphone_quit();
+    sflphone_quit();
 }
 
 void
 status_hangup()
 {
-  sflphone_hang_up();
+    sflphone_hang_up();
 }
 
 void
 status_icon_unminimize()
 {
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(show_menu_item), TRUE);
+    gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (show_menu_item), TRUE);
 }
 
 gboolean
 main_widget_minimized()
 {
-  return __minimized;
+    return __minimized;
 }
 
 void
-show_hide(void)
-{
-	if(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(show_menu_item)))
-	{
-		gtk_widget_show(GTK_WIDGET(get_main_window()));
-		gtk_window_move (GTK_WINDOW (get_main_window ()), eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_X), eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_Y));
-		set_minimized( !MINIMIZED );
-	}   
-	else
-	{
-		gtk_widget_hide(GTK_WIDGET(get_main_window()));
-		set_minimized( MINIMIZED );
-	}
+show_hide (void)
+{
+    if (gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (show_menu_item))) {
+        gtk_widget_show (GTK_WIDGET (get_main_window()));
+        gtk_window_move (GTK_WINDOW (get_main_window ()), eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_X), eel_gconf_get_integer (CONF_MAIN_WINDOW_POSITION_Y));
+        set_minimized (!MINIMIZED);
+    } else {
+        gtk_widget_hide (GTK_WIDGET (get_main_window()));
+        set_minimized (MINIMIZED);
+    }
 }
 
 void
-status_click(GtkStatusIcon *status_icon UNUSED, void * foo UNUSED)
+status_click (GtkStatusIcon *status_icon UNUSED, void * foo UNUSED)
 {
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(show_menu_item),
-      !gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(show_menu_item)));
+    gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (show_menu_item),
+                                    !gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (show_menu_item)));
 }
 
 void
-menu(GtkStatusIcon *status_icon, guint button, guint activate_time,
-    GtkWidget * menu)
+menu (GtkStatusIcon *status_icon, guint button, guint activate_time,
+      GtkWidget * menu)
 {
-  gtk_menu_popup(GTK_MENU(menu), NULL, NULL, gtk_status_icon_position_menu,
-      status_icon, button, activate_time);
+    gtk_menu_popup (GTK_MENU (menu), NULL, NULL, gtk_status_icon_position_menu,
+                    status_icon, button, activate_time);
 }
 
 GtkWidget*
 create_menu()
 {
-  GtkWidget * menu;
-  GtkWidget * menu_items;
-  GtkWidget * image;
+    GtkWidget * menu;
+    GtkWidget * menu_items;
+    GtkWidget * image;
 
-  menu = gtk_menu_new();
+    menu = gtk_menu_new();
 
-  show_menu_item
-      = gtk_check_menu_item_new_with_mnemonic(_("_Show main window"));
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(show_menu_item), TRUE);
-  gtk_menu_shell_append(GTK_MENU_SHELL (menu), show_menu_item);
-  g_signal_connect(G_OBJECT (show_menu_item), "toggled",
-      G_CALLBACK (show_hide),
-      NULL);
+    show_menu_item
+    = gtk_check_menu_item_new_with_mnemonic (_ ("_Show main window"));
+    gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (show_menu_item), TRUE);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), show_menu_item);
+    g_signal_connect (G_OBJECT (show_menu_item), "toggled",
+                      G_CALLBACK (show_hide),
+                      NULL);
 
-  hangup_menu_item = gtk_image_menu_item_new_with_mnemonic(_("_Hang up"));
-  image = gtk_image_new_from_file(ICONS_DIR "/icon_hangup.svg");
-  gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(hangup_menu_item), image);
-  gtk_menu_shell_append(GTK_MENU_SHELL(menu), hangup_menu_item);
-  g_signal_connect(G_OBJECT (hangup_menu_item), "activate",
-      G_CALLBACK (status_hangup),
-      NULL);
+    hangup_menu_item = gtk_image_menu_item_new_with_mnemonic (_ ("_Hang up"));
+    image = gtk_image_new_from_file (ICONS_DIR "/icon_hangup.svg");
+    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (hangup_menu_item), image);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), hangup_menu_item);
+    g_signal_connect (G_OBJECT (hangup_menu_item), "activate",
+                      G_CALLBACK (status_hangup),
+                      NULL);
 
-  menu_items = gtk_separator_menu_item_new();
-  gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
+    menu_items = gtk_separator_menu_item_new();
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
 
-  menu_items = gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT,
-      get_accel_group());
-  g_signal_connect_swapped (G_OBJECT (menu_items), "activate",
-      G_CALLBACK (status_quit),
-      NULL);
-  gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
+    menu_items = gtk_image_menu_item_new_from_stock (GTK_STOCK_QUIT,
+                 get_accel_group());
+    g_signal_connect_swapped (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (status_quit),
+                              NULL);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
 
-  gtk_widget_show_all(menu);
+    gtk_widget_show_all (menu);
 
-  return menu;
+    return menu;
 }
 
 void
 show_status_icon()
 {
-  status = gtk_status_icon_new_from_file(LOGO);
-  g_signal_connect (G_OBJECT (status), "activate",
-      G_CALLBACK (status_click),
-      NULL);
-  g_signal_connect (G_OBJECT (status), "popup-menu",
-      G_CALLBACK (menu),
-      create_menu());
+    status = gtk_status_icon_new_from_file (LOGO);
+    g_signal_connect (G_OBJECT (status), "activate",
+                      G_CALLBACK (status_click),
+                      NULL);
+    g_signal_connect (G_OBJECT (status), "popup-menu",
+                      G_CALLBACK (menu),
+                      create_menu());
 
-  statusicon_set_tooltip();
+    statusicon_set_tooltip();
 }
 
-void hide_status_icon (void) {
+void hide_status_icon (void)
+{
 
     g_object_unref (status);
     status = NULL;
@@ -191,52 +187,52 @@ void hide_status_icon (void) {
 void
 statusicon_set_tooltip()
 {
-  int count;
-  gchar *tip;
+    int count;
+    gchar *tip;
 
-  if(status) {
+    if (status) {
 
-    // Add a tooltip to the system tray icon
-    count = account_list_get_registered_accounts();
-    tip = g_markup_printf_escaped("%s - %s", _("SFLphone"),
-        g_markup_printf_escaped(n_("%i active account", "%i active accounts", count), count));
-    gtk_status_icon_set_tooltip(status, tip);
-    g_free(tip);
+        // Add a tooltip to the system tray icon
+        count = account_list_get_registered_accounts();
+        tip = g_markup_printf_escaped ("%s - %s", _ ("SFLphone"),
+                                       g_markup_printf_escaped (n_ ("%i active account", "%i active accounts", count), count));
+        gtk_status_icon_set_tooltip (status, tip);
+        g_free (tip);
 
-  }
+    }
 }
 
 void
-status_tray_icon_blink(gboolean active)
+status_tray_icon_blink (gboolean active)
 {
-  if (status) {
-  // Set a different icon to notify of an event
-  active ? gtk_status_icon_set_from_file(status, LOGO_NOTIF)
-      : gtk_status_icon_set_from_file(status, LOGO);
-  }
+    if (status) {
+        // Set a different icon to notify of an event
+        active ? gtk_status_icon_set_from_file (status, LOGO_NOTIF)
+        : gtk_status_icon_set_from_file (status, LOGO);
+    }
 }
 
 void
-status_tray_icon_online(gboolean online)
+status_tray_icon_online (gboolean online)
 {
-  if (status) {
-  // Set a different icon to notify of an event
-  online ? gtk_status_icon_set_from_file(status, LOGO)
-      : gtk_status_icon_set_from_file(status, LOGO_OFFLINE);
-  }
+    if (status) {
+        // Set a different icon to notify of an event
+        online ? gtk_status_icon_set_from_file (status, LOGO)
+        : gtk_status_icon_set_from_file (status, LOGO_OFFLINE);
+    }
 }
 
 GtkStatusIcon*
-get_status_icon(void)
+get_status_icon (void)
 {
-  return status;
+    return status;
 }
 
 void
-set_minimized(gboolean state)
+set_minimized (gboolean state)
 {
-  __minimized = state;
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(show_menu_item), !state);
+    __minimized = state;
+    gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (show_menu_item), !state);
 }
 
 #endif
diff --git a/sflphone-client-gnome/src/statusicon.h b/sflphone-client-gnome/src/statusicon.h
index ad9303d360ade39150b5b4dcbccc34ecdcb2c714..1245ced88e335f9ed4414056a417e7c7cf5268c4 100644
--- a/sflphone-client-gnome/src/statusicon.h
+++ b/sflphone-client-gnome/src/statusicon.h
@@ -2,17 +2,17 @@
  *  Copyright (C) 2004, 2005, 2006, 2009, 2008, 2009, 2010 Savoir-Faire Linux Inc.
  *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
  *  Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
- *                                                                              
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
  *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
- *                                                                                
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
- *                                                                              
+ *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -28,7 +28,7 @@
  *  shall include the source code for the parts of OpenSSL used as well
  *  as that of the covered work.
  */
- 
+
 #ifndef __STATUSICON_H__
 #define __STATUSICON_H__
 
@@ -36,7 +36,7 @@
 
 #include <gtk/gtk.h>
 #include <sflphone_const.h>
-/** 
+/**
  * @file statusicon.h
  * @brief The status icon in the system tray.
  */
@@ -58,18 +58,18 @@ void show_status_icon ();
 void hide_status_icon ();
 
 /**
- * Set the menu active 
- */  
+ * Set the menu active
+ */
 void status_icon_unminimize();
 
 /**
- * Show hangup icon 
+ * Show hangup icon
  */
 void show_status_hangup_icon();
 
 
 /**
- * Show hangup icon 
+ * Show hangup icon
  */
 void hide_status_hangup_icon();
 
@@ -87,20 +87,20 @@ gboolean main_widget_minimized();
  * @param state	TRUE if the  main window is minimized
  *               FALSE otherwise
  */
-void set_minimized( gboolean state );
+void set_minimized (gboolean state);
 
 /**
  * Make the system tray icon blink on incoming call
  * @return active TRUE to make it blink
  *		  FALSE to make it stop
  */
-void status_tray_icon_blink( gboolean active );
+void status_tray_icon_blink (gboolean active);
 
 /**
  * Accessor
  * @return GtkStatusIcon* The status icon
  */
-GtkStatusIcon* get_status_icon( void );
+GtkStatusIcon* get_status_icon (void);
 
 /**
  * Attach a tooltip to the status icon
diff --git a/sflphone-client-gnome/src/toolbar.c b/sflphone-client-gnome/src/toolbar.c
index 1a26642eb7e44af5eda079ce1503252462b36c89..af5966c063ca1d6bcb8a148e30494405c24e2548 100644
--- a/sflphone-client-gnome/src/toolbar.c
+++ b/sflphone-client-gnome/src/toolbar.c
@@ -32,64 +32,60 @@
 #include <contacts/addressbook.h>
 
 
-    static void
-call_mailbox( GtkWidget* widget UNUSED, gpointer data UNUSED)
+static void
+call_mailbox (GtkWidget* widget UNUSED, gpointer data UNUSED)
 {
     account_t* current;
     callable_obj_t *mailbox_call;
     gchar *to, *from, *account_id;
 
     current = account_list_get_current ();
-    if( current == NULL ) // Should not happens
+
+    if (current == NULL)  // Should not happens
         return;
 
-    to = g_strdup(g_hash_table_lookup(current->properties, ACCOUNT_MAILBOX));
+    to = g_strdup (g_hash_table_lookup (current->properties, ACCOUNT_MAILBOX));
     account_id = g_strdup (current->accountID);
 
-    create_new_call (CALL, CALL_STATE_DIALING, "", account_id, _("Voicemail"), to, &mailbox_call);
-    DEBUG("TO : %s" , mailbox_call->_peer_number);
-    calllist_add( current_calls , mailbox_call );
-    calltree_add_call( current_calls, mailbox_call, NULL);
+    create_new_call (CALL, CALL_STATE_DIALING, "", account_id, _ ("Voicemail"), to, &mailbox_call);
+    DEBUG ("TO : %s" , mailbox_call->_peer_number);
+    calllist_add (current_calls , mailbox_call);
+    calltree_add_call (current_calls, mailbox_call, NULL);
     update_actions();
-    sflphone_place_call( mailbox_call );
-    calltree_display(current_calls);
+    sflphone_place_call (mailbox_call);
+    calltree_display (current_calls);
 }
 
 /**
  * Make a call
  */
-    static void
-call_button( GtkWidget *widget UNUSED, gpointer   data UNUSED)
+static void
+call_button (GtkWidget *widget UNUSED, gpointer   data UNUSED)
 {
-    DEBUG("------ call_button -----");
+    DEBUG ("------ call_button -----");
     callable_obj_t * selectedCall;
     callable_obj_t* new_call;
 
-    selectedCall = calltab_get_selected_call(active_calltree);
+    selectedCall = calltab_get_selected_call (active_calltree);
 
-    if(calllist_get_size(current_calls)>0)
+    if (calllist_get_size (current_calls) >0)
         sflphone_pick_up();
 
-    else if(calllist_get_size(active_calltree) > 0){
-        if( selectedCall)
-        {
+    else if (calllist_get_size (active_calltree) > 0) {
+        if (selectedCall) {
             create_new_call (CALL, CALL_STATE_DIALING, "", "", "", selectedCall->_peer_number, &new_call);
 
-            calllist_add(current_calls, new_call);
-            calltree_add_call(current_calls, new_call, NULL);
-            sflphone_place_call(new_call);
+            calllist_add (current_calls, new_call);
+            calltree_add_call (current_calls, new_call, NULL);
+            sflphone_place_call (new_call);
             calltree_display (current_calls);
-        }
-        else
-        {
+        } else {
             sflphone_new_call();
-            calltree_display(current_calls);
+            calltree_display (current_calls);
         }
-    }
-    else
-    {
+    } else {
         sflphone_new_call();
-        calltree_display(current_calls);
+        calltree_display (current_calls);
     }
 }
 
diff --git a/sflphone-client-gnome/src/uimanager.c b/sflphone-client-gnome/src/uimanager.c
index cda32a7df8ba028d0ec32aea34ed56ba73bd0dc7..35c9628bc831440c4e660d2b84c5dedd285cbeef 100644
--- a/sflphone-client-gnome/src/uimanager.c
+++ b/sflphone-client-gnome/src/uimanager.c
@@ -69,1516 +69,1450 @@ GtkAction * imAction;
 GtkWidget * editable_num;
 GtkDialog * edit_dialog;
 
-enum
-{
-	CALLTREE_CALLS, CALLTREE_HISTORY, CALLTREE_CONTACTS
+enum {
+    CALLTREE_CALLS, CALLTREE_HISTORY, CALLTREE_CONTACTS
 };
 
-	static gboolean
-is_inserted(GtkWidget* button, GtkWidget *current_toolbar)
+static gboolean
+is_inserted (GtkWidget* button, GtkWidget *current_toolbar)
 {
-	return (GTK_WIDGET (button)->parent == GTK_WIDGET (current_toolbar));
+    return (GTK_WIDGET (button)->parent == GTK_WIDGET (current_toolbar));
 }
 
-	void
+void
 update_actions()
 {
 
-	DEBUG("Update action");
-
-	gtk_action_set_sensitive(GTK_ACTION (newCallAction), TRUE);
-	gtk_action_set_sensitive(GTK_ACTION (pickUpAction), FALSE);
-	gtk_action_set_sensitive(GTK_ACTION (hangUpAction), FALSE);
-	gtk_action_set_sensitive(GTK_ACTION (imAction), FALSE);
-
-	g_object_ref(hangUpWidget);
-	g_object_ref(recordWidget);
-	g_object_ref(holdToolbar);
-	g_object_ref(offHoldToolbar);
-	g_object_ref(contactButton);
-	g_object_ref(historyButton);
-	g_object_ref(transferToolbar);
-	g_object_ref(voicemailToolbar);
-	g_object_ref(imToolbar);
-
-	if (is_inserted(GTK_WIDGET(hangUpWidget), GTK_WIDGET (toolbar)))
-	{
-		gtk_container_remove(GTK_CONTAINER (toolbar), GTK_WIDGET (hangUpWidget));
-	}
-
-	if (is_inserted(GTK_WIDGET(recordWidget), GTK_WIDGET (toolbar)))
-	{
-		gtk_container_remove(GTK_CONTAINER (toolbar), GTK_WIDGET (recordWidget));
-	}
-
-	if (is_inserted(GTK_WIDGET(transferToolbar), GTK_WIDGET (toolbar)))
-	{
-		gtk_container_remove(GTK_CONTAINER (toolbar),
-				GTK_WIDGET (transferToolbar));
-	}
-
-	if (is_inserted(GTK_WIDGET(historyButton), GTK_WIDGET (toolbar)))
-	{
-		gtk_container_remove(GTK_CONTAINER (toolbar), GTK_WIDGET (historyButton));
-	}
-
-	if (is_inserted(GTK_WIDGET(contactButton), GTK_WIDGET (toolbar)))
-	{
-		gtk_container_remove(GTK_CONTAINER (toolbar), GTK_WIDGET (contactButton));
-	}
-
-	if (is_inserted(GTK_WIDGET (voicemailToolbar), GTK_WIDGET (toolbar)))
-	{
-		gtk_container_remove(GTK_CONTAINER (toolbar),
-				GTK_WIDGET (voicemailToolbar));
-	}
-
-	if (is_inserted(GTK_WIDGET (imToolbar), GTK_WIDGET (toolbar)))
-	{
-		gtk_container_remove(GTK_CONTAINER (toolbar),
-				GTK_WIDGET (imToolbar));
-	}
-
-	gtk_widget_set_sensitive(GTK_WIDGET (holdMenu), FALSE);
-	gtk_widget_set_sensitive(GTK_WIDGET (holdToolbar), FALSE);
-	gtk_widget_set_sensitive(GTK_WIDGET (offHoldToolbar), FALSE);
-	gtk_action_set_sensitive(GTK_ACTION (recordAction), FALSE);
-	gtk_widget_set_sensitive(GTK_WIDGET (recordWidget), FALSE);
-	gtk_action_set_sensitive(GTK_ACTION (copyAction), FALSE);
-	gtk_widget_set_sensitive(GTK_WIDGET(contactButton), FALSE);
-	gtk_widget_set_sensitive(GTK_WIDGET(historyButton), FALSE);
-	gtk_widget_set_tooltip_text(GTK_WIDGET (contactButton),
-			_("No address book selected"));
-
-	if (is_inserted(GTK_WIDGET (holdToolbar), GTK_WIDGET (toolbar)))
-		gtk_container_remove(GTK_CONTAINER (toolbar), GTK_WIDGET (holdToolbar));
-	if (is_inserted(GTK_WIDGET (offHoldToolbar), GTK_WIDGET (toolbar)))
-		gtk_container_remove(GTK_CONTAINER (toolbar), GTK_WIDGET (offHoldToolbar));
-
-	if (is_inserted(GTK_WIDGET (newCallWidget), GTK_WIDGET (toolbar)))
-		gtk_container_remove(GTK_CONTAINER (toolbar), GTK_WIDGET (newCallWidget));
-	if (is_inserted(GTK_WIDGET (pickUpWidget), GTK_WIDGET (toolbar)))
-		gtk_container_remove(GTK_CONTAINER (toolbar), GTK_WIDGET (pickUpWidget));
-	gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (newCallWidget), 0);
-
-
-	if (eel_gconf_get_integer (HISTORY_ENABLED)) {
-		gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (historyButton), -1);
-		gtk_widget_set_sensitive(GTK_WIDGET(historyButton), TRUE);
-	}
-	// If addressbook support has been enabled and all addressbooks are loaded, display the icon
-	if (addressbook_is_enabled() && addressbook_is_ready())
-	{
-		gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (contactButton),
-				-1);
-		// Make the icon clickable only if at least one address book is active
-		if (addressbook_is_active())
-		{
-			gtk_widget_set_sensitive(GTK_WIDGET(contactButton), TRUE);
-			gtk_widget_set_tooltip_text(GTK_WIDGET (contactButton),
-					_("Address book"));
-		}
-	}
-
-	callable_obj_t * selectedCall = calltab_get_selected_call(active_calltree);
-	conference_obj_t * selectedConf = calltab_get_selected_conf(active_calltree);
-
-	if (selectedCall)
-	{
-		// update icon in systray
-		show_status_hangup_icon();
-
-		gtk_action_set_sensitive(GTK_ACTION (copyAction), TRUE);
-
-		switch (selectedCall->_state)
-		{
-			case CALL_STATE_INCOMING:
-				// Make the button toolbar clickable
-				gtk_action_set_sensitive(GTK_ACTION (pickUpAction), TRUE);
-				gtk_action_set_sensitive(GTK_ACTION (hangUpAction), TRUE);
-				// Replace the dial button with the hangup button
-				g_object_ref(newCallWidget);
-				gtk_container_remove(GTK_CONTAINER (toolbar), GTK_WIDGET(newCallWidget));
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (pickUpWidget),
-						0);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				break;
-			case CALL_STATE_HOLD:
-				gtk_action_set_sensitive(GTK_ACTION (hangUpAction), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (holdMenu), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (offHoldToolbar), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (newCallWidget), TRUE);
-				// Replace the hold button with the off-hold button
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				gtk_toolbar_insert(GTK_TOOLBAR(toolbar),
-						GTK_TOOL_ITEM (offHoldToolbar), 2);
-				break;
-			case CALL_STATE_RINGING:
-				gtk_action_set_sensitive(GTK_ACTION (pickUpAction), TRUE);
-				gtk_action_set_sensitive(GTK_ACTION (hangUpAction), TRUE);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				break;
-			case CALL_STATE_DIALING:
-				gtk_action_set_sensitive(GTK_ACTION(pickUpAction), TRUE);
-				if (active_calltree == current_calls)
-					gtk_action_set_sensitive(GTK_ACTION(hangUpAction), TRUE);
-				//gtk_action_set_sensitive( GTK_ACTION(newCallMenu),TRUE);
-				g_object_ref(newCallWidget);
-				gtk_container_remove(GTK_CONTAINER (toolbar),
-						GTK_WIDGET (newCallWidget));
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (pickUpWidget),
-						0);
-				if (active_calltree == current_calls)
-					gtk_toolbar_insert(GTK_TOOLBAR (toolbar),
-							GTK_TOOL_ITEM (hangUpWidget), 1);
-				break;
-			case CALL_STATE_CURRENT:
-			case CALL_STATE_RECORD:
-				gtk_action_set_sensitive(GTK_ACTION (hangUpAction), TRUE);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				gtk_widget_set_sensitive(GTK_WIDGET (holdMenu), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (holdToolbar), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (transferToolbar), TRUE);
-				gtk_action_set_sensitive(GTK_ACTION (recordAction), TRUE);
-				gtk_action_set_sensitive(GTK_ACTION (imAction), TRUE);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (holdToolbar),
-						2);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar),
-						GTK_TOOL_ITEM (transferToolbar), 3);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (recordWidget),
-						4);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (imToolbar),
-						5);
-				gtk_signal_handler_block (GTK_OBJECT (transferToolbar), transfertButtonConnId);
-				gtk_toggle_tool_button_set_active(
-						GTK_TOGGLE_TOOL_BUTTON (transferToolbar), FALSE);
-				gtk_signal_handler_unblock (transferToolbar, transfertButtonConnId);
-
-				break;
-			case CALL_STATE_BUSY:
-			case CALL_STATE_FAILURE:
-				gtk_action_set_sensitive(GTK_ACTION(hangUpAction), TRUE);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				break;
-			case CALL_STATE_TRANSFERT:
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar),
-						GTK_TOOL_ITEM (transferToolbar), 2);
-				gtk_signal_handler_block (GTK_OBJECT (transferToolbar), transfertButtonConnId);
-				gtk_toggle_tool_button_set_active(
-						GTK_TOGGLE_TOOL_BUTTON (transferToolbar), TRUE);
-				gtk_signal_handler_unblock (transferToolbar, transfertButtonConnId);
-				gtk_action_set_sensitive(GTK_ACTION (hangUpAction), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (holdMenu), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (holdToolbar), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (transferToolbar), TRUE);
-				break;
-			default:
-				WARN("Should not happen in update_actions()!")
-					;
-				break;
-		}
-	}
-	else if (selectedConf)
-	{
-
-		// update icon in systray
-		show_status_hangup_icon();
-
-		switch (selectedConf->_state)
-		{
-
-			case CONFERENCE_STATE_ACTIVE_ATACHED:
-				gtk_action_set_sensitive(GTK_ACTION (hangUpAction), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (holdToolbar), TRUE);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (holdToolbar),
-						2);
-				break;
-
-			case CONFERENCE_STATE_ACTIVE_DETACHED:
-				gtk_action_set_sensitive(GTK_ACTION (hangUpAction), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (holdToolbar), TRUE);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (holdToolbar),
-						2);
-				break;
-
-			case CONFERENCE_STATE_RECORD:
-				gtk_action_set_sensitive(GTK_ACTION (hangUpAction), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (holdToolbar), TRUE);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (holdToolbar),
-						2);
-				break;
-
-			case CONFERENCE_STATE_HOLD:
-				gtk_action_set_sensitive(GTK_ACTION (hangUpAction), TRUE);
-				gtk_widget_set_sensitive(GTK_WIDGET (offHoldToolbar), TRUE);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
-						1);
-				gtk_toolbar_insert(GTK_TOOLBAR (toolbar),
-						GTK_TOOL_ITEM (offHoldToolbar), 2);
-				break;
-
-			default:
-				WARN("Should not happen in update_action()!")
-					;
-				break;
-
-		}
-	}
-
-	else
-	{
-
-		// update icon in systray
-		hide_status_hangup_icon();
-
-		if (account_list_get_size() > 0 && current_account_has_mailbox())
-		{
-			gtk_toolbar_insert(GTK_TOOLBAR (toolbar),
-					GTK_TOOL_ITEM (voicemailToolbar), -2);
-			update_voicemail_status();
-		}
-	}
+    DEBUG ("Update action");
+
+    gtk_action_set_sensitive (GTK_ACTION (newCallAction), TRUE);
+    gtk_action_set_sensitive (GTK_ACTION (pickUpAction), FALSE);
+    gtk_action_set_sensitive (GTK_ACTION (hangUpAction), FALSE);
+    gtk_action_set_sensitive (GTK_ACTION (imAction), FALSE);
+
+    g_object_ref (hangUpWidget);
+    g_object_ref (recordWidget);
+    g_object_ref (holdToolbar);
+    g_object_ref (offHoldToolbar);
+    g_object_ref (contactButton);
+    g_object_ref (historyButton);
+    g_object_ref (transferToolbar);
+    g_object_ref (voicemailToolbar);
+    g_object_ref (imToolbar);
+
+    if (is_inserted (GTK_WIDGET (hangUpWidget), GTK_WIDGET (toolbar))) {
+        gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (hangUpWidget));
+    }
+
+    if (is_inserted (GTK_WIDGET (recordWidget), GTK_WIDGET (toolbar))) {
+        gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (recordWidget));
+    }
+
+    if (is_inserted (GTK_WIDGET (transferToolbar), GTK_WIDGET (toolbar))) {
+        gtk_container_remove (GTK_CONTAINER (toolbar),
+                              GTK_WIDGET (transferToolbar));
+    }
+
+    if (is_inserted (GTK_WIDGET (historyButton), GTK_WIDGET (toolbar))) {
+        gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (historyButton));
+    }
+
+    if (is_inserted (GTK_WIDGET (contactButton), GTK_WIDGET (toolbar))) {
+        gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (contactButton));
+    }
+
+    if (is_inserted (GTK_WIDGET (voicemailToolbar), GTK_WIDGET (toolbar))) {
+        gtk_container_remove (GTK_CONTAINER (toolbar),
+                              GTK_WIDGET (voicemailToolbar));
+    }
+
+    if (is_inserted (GTK_WIDGET (imToolbar), GTK_WIDGET (toolbar))) {
+        gtk_container_remove (GTK_CONTAINER (toolbar),
+                              GTK_WIDGET (imToolbar));
+    }
+
+    gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), FALSE);
+    gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), FALSE);
+    gtk_widget_set_sensitive (GTK_WIDGET (offHoldToolbar), FALSE);
+    gtk_action_set_sensitive (GTK_ACTION (recordAction), FALSE);
+    gtk_widget_set_sensitive (GTK_WIDGET (recordWidget), FALSE);
+    gtk_action_set_sensitive (GTK_ACTION (copyAction), FALSE);
+    gtk_widget_set_sensitive (GTK_WIDGET (contactButton), FALSE);
+    gtk_widget_set_sensitive (GTK_WIDGET (historyButton), FALSE);
+    gtk_widget_set_tooltip_text (GTK_WIDGET (contactButton),
+                                 _ ("No address book selected"));
+
+    if (is_inserted (GTK_WIDGET (holdToolbar), GTK_WIDGET (toolbar)))
+        gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (holdToolbar));
+
+    if (is_inserted (GTK_WIDGET (offHoldToolbar), GTK_WIDGET (toolbar)))
+        gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (offHoldToolbar));
+
+    if (is_inserted (GTK_WIDGET (newCallWidget), GTK_WIDGET (toolbar)))
+        gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (newCallWidget));
+
+    if (is_inserted (GTK_WIDGET (pickUpWidget), GTK_WIDGET (toolbar)))
+        gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (pickUpWidget));
+
+    gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (newCallWidget), 0);
+
+
+    if (eel_gconf_get_integer (HISTORY_ENABLED)) {
+        gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (historyButton), -1);
+        gtk_widget_set_sensitive (GTK_WIDGET (historyButton), TRUE);
+    }
+
+    // If addressbook support has been enabled and all addressbooks are loaded, display the icon
+    if (addressbook_is_enabled() && addressbook_is_ready()) {
+        gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (contactButton),
+                            -1);
+
+        // Make the icon clickable only if at least one address book is active
+        if (addressbook_is_active()) {
+            gtk_widget_set_sensitive (GTK_WIDGET (contactButton), TRUE);
+            gtk_widget_set_tooltip_text (GTK_WIDGET (contactButton),
+                                         _ ("Address book"));
+        }
+    }
+
+    callable_obj_t * selectedCall = calltab_get_selected_call (active_calltree);
+    conference_obj_t * selectedConf = calltab_get_selected_conf (active_calltree);
+
+    if (selectedCall) {
+        // update icon in systray
+        show_status_hangup_icon();
+
+        gtk_action_set_sensitive (GTK_ACTION (copyAction), TRUE);
+
+        switch (selectedCall->_state) {
+            case CALL_STATE_INCOMING:
+                // Make the button toolbar clickable
+                gtk_action_set_sensitive (GTK_ACTION (pickUpAction), TRUE);
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                // Replace the dial button with the hangup button
+                g_object_ref (newCallWidget);
+                gtk_container_remove (GTK_CONTAINER (toolbar), GTK_WIDGET (newCallWidget));
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (pickUpWidget),
+                                    0);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                break;
+            case CALL_STATE_HOLD:
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (offHoldToolbar), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (newCallWidget), TRUE);
+                // Replace the hold button with the off-hold button
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
+                                    GTK_TOOL_ITEM (offHoldToolbar), 2);
+                break;
+            case CALL_STATE_RINGING:
+                gtk_action_set_sensitive (GTK_ACTION (pickUpAction), TRUE);
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                break;
+            case CALL_STATE_DIALING:
+                gtk_action_set_sensitive (GTK_ACTION (pickUpAction), TRUE);
+
+                if (active_calltree == current_calls)
+                    gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+
+                //gtk_action_set_sensitive( GTK_ACTION(newCallMenu),TRUE);
+                g_object_ref (newCallWidget);
+                gtk_container_remove (GTK_CONTAINER (toolbar),
+                                      GTK_WIDGET (newCallWidget));
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (pickUpWidget),
+                                    0);
+
+                if (active_calltree == current_calls)
+                    gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
+                                        GTK_TOOL_ITEM (hangUpWidget), 1);
+
+                break;
+            case CALL_STATE_CURRENT:
+            case CALL_STATE_RECORD:
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (transferToolbar), TRUE);
+                gtk_action_set_sensitive (GTK_ACTION (recordAction), TRUE);
+                gtk_action_set_sensitive (GTK_ACTION (imAction), TRUE);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (holdToolbar),
+                                    2);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
+                                    GTK_TOOL_ITEM (transferToolbar), 3);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (recordWidget),
+                                    4);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (imToolbar),
+                                    5);
+                gtk_signal_handler_block (GTK_OBJECT (transferToolbar), transfertButtonConnId);
+                gtk_toggle_tool_button_set_active (
+                    GTK_TOGGLE_TOOL_BUTTON (transferToolbar), FALSE);
+                gtk_signal_handler_unblock (transferToolbar, transfertButtonConnId);
+
+                break;
+            case CALL_STATE_BUSY:
+            case CALL_STATE_FAILURE:
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                break;
+            case CALL_STATE_TRANSFERT:
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
+                                    GTK_TOOL_ITEM (transferToolbar), 2);
+                gtk_signal_handler_block (GTK_OBJECT (transferToolbar), transfertButtonConnId);
+                gtk_toggle_tool_button_set_active (
+                    GTK_TOGGLE_TOOL_BUTTON (transferToolbar), TRUE);
+                gtk_signal_handler_unblock (transferToolbar, transfertButtonConnId);
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (holdMenu), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (transferToolbar), TRUE);
+                break;
+            default:
+                WARN ("Should not happen in update_actions()!")
+                ;
+                break;
+        }
+    } else if (selectedConf) {
+
+        // update icon in systray
+        show_status_hangup_icon();
+
+        switch (selectedConf->_state) {
+
+            case CONFERENCE_STATE_ACTIVE_ATACHED:
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), TRUE);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (holdToolbar),
+                                    2);
+                break;
+
+            case CONFERENCE_STATE_ACTIVE_DETACHED:
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), TRUE);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (holdToolbar),
+                                    2);
+                break;
+
+            case CONFERENCE_STATE_RECORD:
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (holdToolbar), TRUE);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (holdToolbar),
+                                    2);
+                break;
+
+            case CONFERENCE_STATE_HOLD:
+                gtk_action_set_sensitive (GTK_ACTION (hangUpAction), TRUE);
+                gtk_widget_set_sensitive (GTK_WIDGET (offHoldToolbar), TRUE);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (hangUpWidget),
+                                    1);
+                gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
+                                    GTK_TOOL_ITEM (offHoldToolbar), 2);
+                break;
+
+            default:
+                WARN ("Should not happen in update_action()!")
+                ;
+                break;
+
+        }
+    }
+
+    else {
+
+        // update icon in systray
+        hide_status_hangup_icon();
+
+        if (account_list_get_size() > 0 && current_account_has_mailbox()) {
+            gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
+                                GTK_TOOL_ITEM (voicemailToolbar), -2);
+            update_voicemail_status();
+        }
+    }
 }
 
-	void
-update_voicemail_status(void)
+void
+update_voicemail_status (void)
 {
-	gchar *messages = "";
-	messages = g_markup_printf_escaped(_("Voicemail (%i)"),
-			current_account_get_message_number());
-	(current_account_has_new_message()) ? gtk_tool_button_set_icon_name(
-			GTK_TOOL_BUTTON (voicemailToolbar), "mail-message-new")
-		: gtk_tool_button_set_icon_name(GTK_TOOL_BUTTON (voicemailToolbar),
-				"mail-read");
-	gtk_tool_button_set_label(GTK_TOOL_BUTTON (voicemailToolbar), messages);
-	g_free(messages);
+    gchar *messages = "";
+    messages = g_markup_printf_escaped (_ ("Voicemail (%i)"),
+                                        current_account_get_message_number());
+    (current_account_has_new_message()) ? gtk_tool_button_set_icon_name (
+        GTK_TOOL_BUTTON (voicemailToolbar), "mail-message-new")
+    : gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (voicemailToolbar),
+                                     "mail-read");
+    gtk_tool_button_set_label (GTK_TOOL_BUTTON (voicemailToolbar), messages);
+    g_free (messages);
 }
 
-	static void
-volume_bar_cb(GtkToggleAction *togglemenuitem, gpointer user_data)
+static void
+volume_bar_cb (GtkToggleAction *togglemenuitem, gpointer user_data)
 {
-	gboolean toggled = gtk_toggle_action_get_active(togglemenuitem);
-	if (toggled == SHOW_VOLUME)
-		return;
-	main_window_volume_controls(toggled);
-	if (toggled || SHOW_VOLUME)
-		eel_gconf_set_integer (SHOW_VOLUME_CONTROLS, toggled);
+    gboolean toggled = gtk_toggle_action_get_active (togglemenuitem);
+
+    if (toggled == SHOW_VOLUME)
+        return;
+
+    main_window_volume_controls (toggled);
+
+    if (toggled || SHOW_VOLUME)
+        eel_gconf_set_integer (SHOW_VOLUME_CONTROLS, toggled);
 }
 
-	static void
-dialpad_bar_cb(GtkToggleAction *togglemenuitem, gpointer user_data)
+static void
+dialpad_bar_cb (GtkToggleAction *togglemenuitem, gpointer user_data)
 {
-	gboolean toggled = gtk_toggle_action_get_active (togglemenuitem);
-	gboolean conf_dialpad = eel_gconf_get_boolean (CONF_SHOW_DIALPAD);
-	if (toggled == conf_dialpad)
-		return;
-	main_window_dialpad (toggled);
-	if (toggled || conf_dialpad)
-		eel_gconf_set_boolean (CONF_SHOW_DIALPAD, toggled); //dbus_set_dialpad (toggled);
+    gboolean toggled = gtk_toggle_action_get_active (togglemenuitem);
+    gboolean conf_dialpad = eel_gconf_get_boolean (CONF_SHOW_DIALPAD);
+
+    if (toggled == conf_dialpad)
+        return;
+
+    main_window_dialpad (toggled);
+
+    if (toggled || conf_dialpad)
+        eel_gconf_set_boolean (CONF_SHOW_DIALPAD, toggled); //dbus_set_dialpad (toggled);
 
 }
 
-	static void
-help_contents_cb(GtkAction *action)
+static void
+help_contents_cb (GtkAction *action)
 {
-	GError *error = NULL;
+    GError *error = NULL;
 
-	gnome_help_display("sflphone.xml", NULL, &error);
-	if (error != NULL) {
-		g_warning("%s", error->message);
-		g_error_free(error);
-	}
+    gnome_help_display ("sflphone.xml", NULL, &error);
+
+    if (error != NULL) {
+        g_warning ("%s", error->message);
+        g_error_free (error);
+    }
 }
 
-	static void
-help_about(void * foo UNUSED)
+static void
+help_about (void * foo UNUSED)
 {
-	gchar
-		*authors[] =
-		{
-			"Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>",
-			"Jean-Philippe Barrette-LaPierre",
-			"Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>",
-			"Julien Bonjean <julien.bonjean@savoirfairelinux.com>",
-			"Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>",
-			"Laurielle Lea",
-			"Yun Liu <yun.liu@savoirfairelinux.com>",
-			"Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>",
-			"Yan Morin <yan.morin@savoirfairelinux.com>",
-			"Jérôme Oufella <jerome.oufella@savoirfairelinux.com>",
-			"Julien Plissonneau Duquene <julien.plissonneau.duquene@savoirfairelinux.com>",
-			"Alexandre Savard <alexandre.savard@savoirfairelinux.com>", NULL };
-			gchar *artists[] =
-			{ "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>",
-				"Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>", NULL };
-
-			gtk_show_about_dialog(GTK_WINDOW(get_main_window()), "artists", artists,
-					"authors", authors, "comments",
-					_("SFLphone is a VoIP client compatible with SIP and IAX2 protocols."),
-					"copyright", "Copyright © 2004-2009 Savoir-faire Linux Inc.", "name",
-					PACKAGE, "title", _("About SFLphone"), "version", VERSION, "website",
-					"http://www.sflphone.org", NULL);
+    gchar
+    *authors[] = {
+        "Pierre-Luc Bacon <pierre-luc.bacon@savoirfairelinux.com>",
+        "Jean-Philippe Barrette-LaPierre",
+        "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>",
+        "Julien Bonjean <julien.bonjean@savoirfairelinux.com>",
+        "Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>",
+        "Laurielle Lea",
+        "Yun Liu <yun.liu@savoirfairelinux.com>",
+        "Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>",
+        "Yan Morin <yan.morin@savoirfairelinux.com>",
+        "Jérôme Oufella <jerome.oufella@savoirfairelinux.com>",
+        "Julien Plissonneau Duquene <julien.plissonneau.duquene@savoirfairelinux.com>",
+        "Alexandre Savard <alexandre.savard@savoirfairelinux.com>", NULL
+    };
+    gchar *artists[] = { "Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>",
+                         "Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>", NULL
+                       };
+
+    gtk_show_about_dialog (GTK_WINDOW (get_main_window()), "artists", artists,
+                           "authors", authors, "comments",
+                           _ ("SFLphone is a VoIP client compatible with SIP and IAX2 protocols."),
+                           "copyright", "Copyright © 2004-2009 Savoir-faire Linux Inc.", "name",
+                           PACKAGE, "title", _ ("About SFLphone"), "version", VERSION, "website",
+                           "http://www.sflphone.org", NULL);
 
 }
 
 /* ----------------------------------------------------------------- */
 
-	static void
-call_new_call(void * foo UNUSED)
+static void
+call_new_call (void * foo UNUSED)
 {
-	sflphone_new_call();
+    sflphone_new_call();
 }
 
-	static void
-call_quit(void * foo UNUSED)
+static void
+call_quit (void * foo UNUSED)
 {
-	sflphone_quit();
+    sflphone_quit();
 }
 
-	static void
-call_minimize(void * foo UNUSED)
+static void
+call_minimize (void * foo UNUSED)
 {
 
-	if (eel_gconf_get_integer (SHOW_STATUSICON)) {
-		gtk_widget_hide(GTK_WIDGET( get_main_window() ));
-		set_minimized(TRUE);
-	}
-	else {
-		sflphone_quit ();
-	}
+    if (eel_gconf_get_integer (SHOW_STATUSICON)) {
+        gtk_widget_hide (GTK_WIDGET (get_main_window()));
+        set_minimized (TRUE);
+    } else {
+        sflphone_quit ();
+    }
 }
 
-	static void
-switch_account(GtkWidget* item, gpointer data UNUSED)
+static void
+switch_account (GtkWidget* item, gpointer data UNUSED)
 {
-	account_t* acc = g_object_get_data(G_OBJECT(item), "account");
-	DEBUG("%s" , acc->accountID);
-	account_list_set_current(acc);
-	status_bar_display_account();
+    account_t* acc = g_object_get_data (G_OBJECT (item), "account");
+    DEBUG ("%s" , acc->accountID);
+    account_list_set_current (acc);
+    status_bar_display_account();
 }
 
-	static void
-call_hold(void* foo UNUSED)
+static void
+call_hold (void* foo UNUSED)
 {
-	callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-	conference_obj_t * selectedConf = calltab_get_selected_conf();
-
-	if (selectedCall)
-	{
-		if (selectedCall->_state == CALL_STATE_HOLD)
-		{
-			sflphone_off_hold();
-		}
-		else
-		{
-			sflphone_on_hold();
-		}
-	}
-	else if (selectedConf)
-	{
-
-		switch (selectedConf->_state)
-		{
-
-			case CONFERENCE_STATE_HOLD:
-				{
-					selectedConf->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
-					sflphone_conference_off_hold(selectedConf);
-				}
-				break;
-
-			case CONFERENCE_STATE_ACTIVE_ATACHED:
-			case CONFERENCE_STATE_ACTIVE_DETACHED:
-				{
-					selectedConf->_state = CONFERENCE_STATE_HOLD;
-					sflphone_conference_on_hold(selectedConf);
-				}
-				break;
-			default:
-				break;
-		}
-
-	}
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+    conference_obj_t * selectedConf = calltab_get_selected_conf();
+
+    if (selectedCall) {
+        if (selectedCall->_state == CALL_STATE_HOLD) {
+            sflphone_off_hold();
+        } else {
+            sflphone_on_hold();
+        }
+    } else if (selectedConf) {
+
+        switch (selectedConf->_state) {
+
+            case CONFERENCE_STATE_HOLD: {
+                selectedConf->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
+                sflphone_conference_off_hold (selectedConf);
+            }
+            break;
+
+            case CONFERENCE_STATE_ACTIVE_ATACHED:
+            case CONFERENCE_STATE_ACTIVE_DETACHED: {
+                selectedConf->_state = CONFERENCE_STATE_HOLD;
+                sflphone_conference_on_hold (selectedConf);
+            }
+            break;
+            default:
+                break;
+        }
+
+    }
 }
 
-	static void
+static void
 call_im (void* foo UNUSED)
 {
-	callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-	
-	if (selectedCall) {
-		im_widget_display (&selectedCall);
-	}
-	else {
-		warn ("Sorry. Instant messaging is not allowed outside a call\n");
-	}
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+
+    if (selectedCall) {
+        im_widget_display (&selectedCall);
+    } else {
+        warn ("Sorry. Instant messaging is not allowed outside a call\n");
+    }
 }
 
-	static void
-conference_hold(void* foo UNUSED)
+static void
+conference_hold (void* foo UNUSED)
 {
-	conference_obj_t * selectedConf = calltab_get_selected_conf();
-
-	switch (selectedConf->_state)
-	{
-		case CONFERENCE_STATE_HOLD:
-			{
-				selectedConf->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
-				sflphone_conference_off_hold(selectedConf);
-			}
-			break;
-
-		case CONFERENCE_STATE_ACTIVE_ATACHED:
-		case CONFERENCE_STATE_ACTIVE_DETACHED:
-			{
-				selectedConf->_state = CONFERENCE_STATE_HOLD;
-				sflphone_conference_on_hold(selectedConf);
-			}
-			break;
-		default:
-			break;
-	}
+    conference_obj_t * selectedConf = calltab_get_selected_conf();
+
+    switch (selectedConf->_state) {
+        case CONFERENCE_STATE_HOLD: {
+            selectedConf->_state = CONFERENCE_STATE_ACTIVE_ATACHED;
+            sflphone_conference_off_hold (selectedConf);
+        }
+        break;
+
+        case CONFERENCE_STATE_ACTIVE_ATACHED:
+        case CONFERENCE_STATE_ACTIVE_DETACHED: {
+            selectedConf->_state = CONFERENCE_STATE_HOLD;
+            sflphone_conference_on_hold (selectedConf);
+        }
+        break;
+        default:
+            break;
+    }
 }
 
-	static void
-call_pick_up(void * foo UNUSED)
+static void
+call_pick_up (void * foo UNUSED)
 {
-	DEBUG("------ call_button -----");
-	callable_obj_t * selectedCall;
-	callable_obj_t* new_call;
-
-	selectedCall = calltab_get_selected_call(active_calltree);
-
-	if (calllist_get_size(current_calls) > 0)
-		sflphone_pick_up();
-
-	else if (calllist_get_size(active_calltree) > 0)
-	{
-		if (selectedCall)
-		{
-			create_new_call(CALL, CALL_STATE_DIALING, "", "", "",
-					selectedCall->_peer_number, &new_call);
-
-			calllist_add(current_calls, new_call);
-			calltree_add_call(current_calls, new_call, NULL);
-			sflphone_place_call(new_call);
-			calltree_display(current_calls);
-		}
-		else
-		{
-			sflphone_new_call();
-			calltree_display(current_calls);
-		}
-	}
-	else
-	{
-		sflphone_new_call();
-		calltree_display(current_calls);
-	}
+    DEBUG ("------ call_button -----");
+    callable_obj_t * selectedCall;
+    callable_obj_t* new_call;
+
+    selectedCall = calltab_get_selected_call (active_calltree);
+
+    if (calllist_get_size (current_calls) > 0)
+        sflphone_pick_up();
+
+    else if (calllist_get_size (active_calltree) > 0) {
+        if (selectedCall) {
+            create_new_call (CALL, CALL_STATE_DIALING, "", "", "",
+                             selectedCall->_peer_number, &new_call);
+
+            calllist_add (current_calls, new_call);
+            calltree_add_call (current_calls, new_call, NULL);
+            sflphone_place_call (new_call);
+            calltree_display (current_calls);
+        } else {
+            sflphone_new_call();
+            calltree_display (current_calls);
+        }
+    } else {
+        sflphone_new_call();
+        calltree_display (current_calls);
+    }
 }
 
-	static void
-call_hang_up(void)
+static void
+call_hang_up (void)
 {
-	/* 
-	 * [#3020]	Restore the record toggle button 
-	 *			We set it to FALSE, as when we hang up a call, the recording is stopped.
-	 */
-	gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (recordWidget), FALSE);
+    /*
+     * [#3020]	Restore the record toggle button
+     *			We set it to FALSE, as when we hang up a call, the recording is stopped.
+     */
+    gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (recordWidget), FALSE);
 
-	sflphone_hang_up();
+    sflphone_hang_up();
 
 }
 
-	static void
-conference_hang_up(void)
+static void
+conference_hang_up (void)
 {
-	sflphone_conference_hang_up();
+    sflphone_conference_hang_up();
 }
 
-	static void
-call_record(void)
+static void
+call_record (void)
 {
-	sflphone_rec_call();
+    sflphone_rec_call();
 }
 
-	static void
-call_configuration_assistant(void * foo UNUSED)
+static void
+call_configuration_assistant (void * foo UNUSED)
 {
 #if GTK_CHECK_VERSION(2,10,0)
-	build_wizard();
+    build_wizard();
 #endif
 }
 
-	static void
-remove_from_history(void * foo UNUSED)
+static void
+remove_from_history (void * foo UNUSED)
 {
-	callable_obj_t* c = calltab_get_selected_call(history);
-	if (c)
-	{
-		DEBUG("Remove the call from the history");
-		calllist_remove_from_history(c);
-	}
+    callable_obj_t* c = calltab_get_selected_call (history);
+
+    if (c) {
+        DEBUG ("Remove the call from the history");
+        calllist_remove_from_history (c);
+    }
 }
 
-	static void
-call_back(void * foo UNUSED)
+static void
+call_back (void * foo UNUSED)
 {
-	callable_obj_t *selected_call, *new_call;
+    callable_obj_t *selected_call, *new_call;
 
-	selected_call = calltab_get_selected_call(active_calltree);
+    selected_call = calltab_get_selected_call (active_calltree);
 
-	if (selected_call)
-	{
-		create_new_call(CALL, CALL_STATE_DIALING, "", "",
-				selected_call->_peer_name, selected_call->_peer_number, &new_call);
+    if (selected_call) {
+        create_new_call (CALL, CALL_STATE_DIALING, "", "",
+                         selected_call->_peer_name, selected_call->_peer_number, &new_call);
 
-		calllist_add(current_calls, new_call);
-		calltree_add_call(current_calls, new_call, NULL);
-		sflphone_place_call(new_call);
-		calltree_display(current_calls);
-	}
+        calllist_add (current_calls, new_call);
+        calltree_add_call (current_calls, new_call, NULL);
+        sflphone_place_call (new_call);
+        calltree_display (current_calls);
+    }
 }
 
-	static void
-edit_preferences(void * foo UNUSED)
+static void
+edit_preferences (void * foo UNUSED)
 {
-	show_preferences_dialog();
+    show_preferences_dialog();
 }
 
-	static void
-edit_accounts(void * foo UNUSED)
+static void
+edit_accounts (void * foo UNUSED)
 {
-	show_account_list_config_dialog();
+    show_account_list_config_dialog();
 }
 
 // The menu Edit/Copy should copy the current selected call's number
-	static void
-edit_copy(void * foo UNUSED)
+static void
+edit_copy (void * foo UNUSED)
 {
-	GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
-	callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-	gchar * no = NULL;
-
-	if (selectedCall)
-	{
-		switch (selectedCall->_state)
-		{
-			case CALL_STATE_TRANSFERT:
-			case CALL_STATE_DIALING:
-			case CALL_STATE_RINGING:
-				no = selectedCall->_peer_number;
-				break;
-			case CALL_STATE_CURRENT:
-			case CALL_STATE_HOLD:
-			case CALL_STATE_BUSY:
-			case CALL_STATE_FAILURE:
-			case CALL_STATE_INCOMING:
-			default:
-				no = selectedCall->_peer_number;
-				break;
-		}
-		DEBUG("Clipboard number: %s\n", no);
-		gtk_clipboard_set_text(clip, no, strlen(no));
-	}
+    GtkClipboard* clip = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+    gchar * no = NULL;
+
+    if (selectedCall) {
+        switch (selectedCall->_state) {
+            case CALL_STATE_TRANSFERT:
+            case CALL_STATE_DIALING:
+            case CALL_STATE_RINGING:
+                no = selectedCall->_peer_number;
+                break;
+            case CALL_STATE_CURRENT:
+            case CALL_STATE_HOLD:
+            case CALL_STATE_BUSY:
+            case CALL_STATE_FAILURE:
+            case CALL_STATE_INCOMING:
+            default:
+                no = selectedCall->_peer_number;
+                break;
+        }
+
+        DEBUG ("Clipboard number: %s\n", no);
+        gtk_clipboard_set_text (clip, no, strlen (no));
+    }
 
 }
 
 // The menu Edit/Paste should paste the clipboard into the current selected call
-	static void
-edit_paste(void * foo UNUSED)
+static void
+edit_paste (void * foo UNUSED)
 {
 
-	GtkClipboard* clip = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
-	callable_obj_t * selectedCall = calltab_get_selected_call(current_calls);
-	gchar * no = gtk_clipboard_wait_for_text(clip);
-
-	if (no && selectedCall)
-	{
-		switch (selectedCall->_state)
-		{
-			case CALL_STATE_TRANSFERT:
-			case CALL_STATE_DIALING:
-				// Add the text to the number
-				{
-					gchar * before;
-					before = selectedCall->_peer_number;
-					DEBUG("TO: %s\n", before);
-					selectedCall->_peer_number = g_strconcat(before, no, NULL);
-
-					if (selectedCall->_state == CALL_STATE_DIALING)
-					{
-						selectedCall->_peer_info = g_strconcat("\"\" <",
-								selectedCall->_peer_number, ">", NULL);
-					}
-					calltree_update_call(current_calls, selectedCall, NULL);
-				}
-				break;
-			case CALL_STATE_RINGING:
-			case CALL_STATE_INCOMING:
-			case CALL_STATE_BUSY:
-			case CALL_STATE_FAILURE:
-			case CALL_STATE_HOLD:
-				{ // Create a new call to hold the new text
-					selectedCall = sflphone_new_call();
-
-					gchar * before = selectedCall->_peer_number;
-					selectedCall->_peer_number = g_strconcat(selectedCall->_peer_number,
-							no, NULL);
-					DEBUG("TO: %s", selectedCall->_peer_number);
-
-					selectedCall->_peer_info = g_strconcat("\"\" <",
-							selectedCall->_peer_number, ">", NULL);
-
-					calltree_update_call(current_calls, selectedCall, NULL);
-				}
-				break;
-			case CALL_STATE_CURRENT:
-			default:
-				{
-					unsigned int i;
-					for (i = 0; i < strlen(no); i++)
-					{
-						gchar * oneNo = g_strndup(&no[i], 1);
-						DEBUG("<%s>", oneNo);
-						dbus_play_dtmf(oneNo);
-
-						gchar * temp = g_strconcat(selectedCall->_peer_number, oneNo,
-								NULL);
-						selectedCall->_peer_info = get_peer_info(temp,
-								selectedCall->_peer_name);
-						// g_free(temp);
-						calltree_update_call(current_calls, selectedCall, NULL);
-
-					}
-				}
-				break;
-		}
-
-	}
-	else // There is no current call, create one
-	{
-		selectedCall = sflphone_new_call();
-
-		gchar * before = selectedCall->_peer_number;
-		selectedCall->_peer_number = g_strconcat(selectedCall->_peer_number, no,
-				NULL);
-		g_free(before);
-		DEBUG("TO: %s", selectedCall->_peer_number);
-
-		g_free(selectedCall->_peer_info);
-		selectedCall->_peer_info = g_strconcat("\"\" <",
-				selectedCall->_peer_number, ">", NULL);
-		calltree_update_call(current_calls, selectedCall, NULL);
-	}
+    GtkClipboard* clip = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
+    callable_obj_t * selectedCall = calltab_get_selected_call (current_calls);
+    gchar * no = gtk_clipboard_wait_for_text (clip);
+
+    if (no && selectedCall) {
+        switch (selectedCall->_state) {
+            case CALL_STATE_TRANSFERT:
+            case CALL_STATE_DIALING:
+                // Add the text to the number
+            {
+                gchar * before;
+                before = selectedCall->_peer_number;
+                DEBUG ("TO: %s\n", before);
+                selectedCall->_peer_number = g_strconcat (before, no, NULL);
+
+                if (selectedCall->_state == CALL_STATE_DIALING) {
+                    selectedCall->_peer_info = g_strconcat ("\"\" <",
+                                                            selectedCall->_peer_number, ">", NULL);
+                }
+
+                calltree_update_call (current_calls, selectedCall, NULL);
+            }
+            break;
+            case CALL_STATE_RINGING:
+            case CALL_STATE_INCOMING:
+            case CALL_STATE_BUSY:
+            case CALL_STATE_FAILURE:
+            case CALL_STATE_HOLD: { // Create a new call to hold the new text
+                selectedCall = sflphone_new_call();
+
+                gchar * before = selectedCall->_peer_number;
+                selectedCall->_peer_number = g_strconcat (selectedCall->_peer_number,
+                                             no, NULL);
+                DEBUG ("TO: %s", selectedCall->_peer_number);
+
+                selectedCall->_peer_info = g_strconcat ("\"\" <",
+                                                        selectedCall->_peer_number, ">", NULL);
+
+                calltree_update_call (current_calls, selectedCall, NULL);
+            }
+            break;
+            case CALL_STATE_CURRENT:
+            default: {
+                unsigned int i;
+
+                for (i = 0; i < strlen (no); i++) {
+                    gchar * oneNo = g_strndup (&no[i], 1);
+                    DEBUG ("<%s>", oneNo);
+                    dbus_play_dtmf (oneNo);
+
+                    gchar * temp = g_strconcat (selectedCall->_peer_number, oneNo,
+                                                NULL);
+                    selectedCall->_peer_info = get_peer_info (temp,
+                                               selectedCall->_peer_name);
+                    // g_free(temp);
+                    calltree_update_call (current_calls, selectedCall, NULL);
+
+                }
+            }
+            break;
+        }
+
+    } else { // There is no current call, create one
+        selectedCall = sflphone_new_call();
+
+        gchar * before = selectedCall->_peer_number;
+        selectedCall->_peer_number = g_strconcat (selectedCall->_peer_number, no,
+                                     NULL);
+        g_free (before);
+        DEBUG ("TO: %s", selectedCall->_peer_number);
+
+        g_free (selectedCall->_peer_info);
+        selectedCall->_peer_info = g_strconcat ("\"\" <",
+                                                selectedCall->_peer_number, ">", NULL);
+        calltree_update_call (current_calls, selectedCall, NULL);
+    }
 
 }
 
-	static void
-clear_history(void)
+static void
+clear_history (void)
 {
-	if (calllist_get_size(history) != 0)
-	{
-		calllist_clean_history();
-	}
+    if (calllist_get_size (history) != 0) {
+        calllist_clean_history();
+    }
 }
 
 /**
  * Transfert the line
  */
-	static void
+static void
 call_transfer_cb()
 {
-	gboolean active = gtk_toggle_tool_button_get_active(
-			GTK_TOGGLE_TOOL_BUTTON (transferToolbar));
-	active ? sflphone_set_transfert() : sflphone_unset_transfert();
+    gboolean active = gtk_toggle_tool_button_get_active (
+                          GTK_TOGGLE_TOOL_BUTTON (transferToolbar));
+    active ? sflphone_set_transfert() : sflphone_unset_transfert();
 }
 
-	static void
-call_mailbox_cb(void)
+static void
+call_mailbox_cb (void)
 {
-	account_t* current;
-	callable_obj_t *mailbox_call;
-	gchar *to, *from, *account_id;
-
-	current = account_list_get_current();
-	if (current == NULL) // Should not happens
-		return;
-
-	to = g_strdup(g_hash_table_lookup(current->properties, ACCOUNT_MAILBOX));
-	account_id = g_strdup(current->accountID);
-
-	create_new_call(CALL, CALL_STATE_DIALING, "", account_id, _("Voicemail"), to,
-			&mailbox_call);
-	DEBUG("TO : %s" , mailbox_call->_peer_number);
-	calllist_add(current_calls, mailbox_call);
-	calltree_add_call(current_calls, mailbox_call, NULL);
-	update_actions();
-	sflphone_place_call(mailbox_call);
-	calltree_display(current_calls);
+    account_t* current;
+    callable_obj_t *mailbox_call;
+    gchar *to, *from, *account_id;
+
+    current = account_list_get_current();
+
+    if (current == NULL) // Should not happens
+        return;
+
+    to = g_strdup (g_hash_table_lookup (current->properties, ACCOUNT_MAILBOX));
+    account_id = g_strdup (current->accountID);
+
+    create_new_call (CALL, CALL_STATE_DIALING, "", account_id, _ ("Voicemail"), to,
+                     &mailbox_call);
+    DEBUG ("TO : %s" , mailbox_call->_peer_number);
+    calllist_add (current_calls, mailbox_call);
+    calltree_add_call (current_calls, mailbox_call, NULL);
+    update_actions();
+    sflphone_place_call (mailbox_call);
+    calltree_display (current_calls);
 }
 
-	static void
-toggle_history_cb(GtkToggleAction *action, gpointer user_data)
+static void
+toggle_history_cb (GtkToggleAction *action, gpointer user_data)
 {
-	gboolean toggle;
-	toggle = gtk_toggle_action_get_active(action);
-	(toggle) ? calltree_display(history) : calltree_display(current_calls);
+    gboolean toggle;
+    toggle = gtk_toggle_action_get_active (action);
+    (toggle) ? calltree_display (history) : calltree_display (current_calls);
 }
 
-	static void
-toggle_addressbook_cb(GtkToggleAction *action, gpointer user_data)
+static void
+toggle_addressbook_cb (GtkToggleAction *action, gpointer user_data)
 {
-	gboolean toggle;
-	toggle = gtk_toggle_action_get_active(action);
-	(toggle) ? calltree_display(contacts) : calltree_display(current_calls);
+    gboolean toggle;
+    toggle = gtk_toggle_action_get_active (action);
+    (toggle) ? calltree_display (contacts) : calltree_display (current_calls);
 }
 
-static const GtkActionEntry menu_entries[] =
-{
+static const GtkActionEntry menu_entries[] = {
+
+    // Call Menu
+    { "Call", NULL, N_ ("Call") },
+    { "NewCall", GTK_STOCK_DIAL, N_ ("_New call"), "<control>N",
+      N_ ("Place a new call"), G_CALLBACK (call_new_call) },
+    { "PickUp", GTK_STOCK_PICKUP, N_ ("_Pick up"), NULL,
+      N_ ("Answer the call"), G_CALLBACK (call_pick_up) },
+    { "HangUp", GTK_STOCK_HANGUP, N_ ("_Hang up"), "<control>S",
+      N_ ("Finish the call"), G_CALLBACK (call_hang_up) },
+    { "OnHold", GTK_STOCK_ONHOLD, N_ ("O_n hold"), "<control>P",
+      N_ ("Place the call on hold"), G_CALLBACK (call_hold) },
+    { "OffHold", GTK_STOCK_OFFHOLD, N_ ("O_ff hold"), "<control>P",
+      N_ ("Place the call off hold"), G_CALLBACK (call_hold) },
+    { "InstantMessaging", GTK_STOCK_IM, N_ ("Send _message"), "<control>M",
+      N_ ("Send message"), G_CALLBACK (call_im) },
+    { "AccountAssistant", NULL, N_ ("Configuration _Assistant"), NULL,
+      N_ ("Run the configuration assistant"),
+      G_CALLBACK (call_configuration_assistant) },
+    { "Voicemail", "mail-read", N_ ("Voicemail"), NULL,
+      N_ ("Call your voicemail"), G_CALLBACK (call_mailbox_cb) },
+    { "Close", GTK_STOCK_CLOSE, N_ ("_Close"), "<control>W",
+      N_ ("Minimize to system tray"), G_CALLBACK (call_minimize) },
+    { "Quit", GTK_STOCK_CLOSE, N_ ("_Quit"), "<control>Q",
+      N_ ("Quit the program"), G_CALLBACK (call_quit) },
+
+    // Edit Menu
+    { "Edit", NULL, N_ ("_Edit") },
+    { "Copy", GTK_STOCK_COPY, N_ ("_Copy"), "<control>C",
+      N_ ("Copy the selection"), G_CALLBACK (edit_copy) },
+    { "Paste", GTK_STOCK_PASTE, N_ ("_Paste"), "<control>V",
+      N_ ("Paste the clipboard"), G_CALLBACK (edit_paste) },
+    { "ClearHistory", GTK_STOCK_CLEAR, N_ ("Clear _history"), NULL,
+      N_ ("Clear the call history"), G_CALLBACK (clear_history) },
+    { "Accounts", NULL, N_ ("_Accounts"), NULL, N_ ("Edit your accounts"),
+      G_CALLBACK (edit_accounts) },
+    { "Preferences", GTK_STOCK_PREFERENCES, N_ ("_Preferences"), NULL,
+      N_ ("Change your preferences"), G_CALLBACK (edit_preferences) },
+
+    // View Menu
+    { "View", NULL, N_ ("_View") },
+
+    // Help menu
+    { "Help", NULL, N_ ("_Help") },
+    { "HelpContents", GTK_STOCK_HELP, N_ ("Contents"), "F1",
+      N_ ("Open the manual"), G_CALLBACK (help_contents_cb) },
+    { "About", GTK_STOCK_ABOUT, NULL, NULL, N_ ("About this application"),
+      G_CALLBACK (help_about) }
+
+};
 
-	// Call Menu
-	{ "Call", NULL, N_("Call") },
-	{ "NewCall", GTK_STOCK_DIAL, N_("_New call"), "<control>N",
-		N_("Place a new call"), G_CALLBACK (call_new_call) },
-	{ "PickUp", GTK_STOCK_PICKUP, N_("_Pick up"), NULL,
-		N_("Answer the call"), G_CALLBACK (call_pick_up) },
-	{ "HangUp", GTK_STOCK_HANGUP, N_("_Hang up"), "<control>S",
-		N_("Finish the call"), G_CALLBACK (call_hang_up) },
-	{ "OnHold", GTK_STOCK_ONHOLD, N_("O_n hold"), "<control>P",
-		N_("Place the call on hold"), G_CALLBACK (call_hold) },
-	{ "OffHold", GTK_STOCK_OFFHOLD, N_("O_ff hold"), "<control>P",
-		N_("Place the call off hold"), G_CALLBACK (call_hold) },
-	{ "InstantMessaging", GTK_STOCK_IM, N_("Send _message"), "<control>M",
-		N_("Send message"), G_CALLBACK (call_im) },
-	{ "AccountAssistant", NULL, N_("Configuration _Assistant"), NULL,
-		N_("Run the configuration assistant"),
-		G_CALLBACK (call_configuration_assistant) },
-	{ "Voicemail", "mail-read", N_("Voicemail"), NULL,
-		N_("Call your voicemail"), G_CALLBACK (call_mailbox_cb) },
-	{ "Close", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
-		N_("Minimize to system tray"), G_CALLBACK (call_minimize) },
-	{ "Quit", GTK_STOCK_CLOSE, N_("_Quit"), "<control>Q",
-		N_("Quit the program"), G_CALLBACK (call_quit) },
-
-	// Edit Menu
-	{ "Edit", NULL, N_("_Edit") },
-	{ "Copy", GTK_STOCK_COPY, N_("_Copy"), "<control>C",
-		N_("Copy the selection"), G_CALLBACK (edit_copy) },
-	{ "Paste", GTK_STOCK_PASTE, N_("_Paste"), "<control>V",
-		N_("Paste the clipboard"), G_CALLBACK (edit_paste) },
-	{ "ClearHistory", GTK_STOCK_CLEAR, N_("Clear _history"), NULL,
-		N_("Clear the call history"), G_CALLBACK (clear_history) },
-	{ "Accounts", NULL, N_("_Accounts"), NULL, N_("Edit your accounts"),
-		G_CALLBACK (edit_accounts) },
-	{ "Preferences", GTK_STOCK_PREFERENCES, N_("_Preferences"), NULL,
-		N_("Change your preferences"), G_CALLBACK (edit_preferences) },
-
-	// View Menu
-	{ "View", NULL, N_("_View") },
-
-	// Help menu
-	{ "Help", NULL, N_("_Help") },
-	{ "HelpContents", GTK_STOCK_HELP, N_("Contents"), "F1",
-		N_("Open the manual"), G_CALLBACK (help_contents_cb) },
-	{ "About", GTK_STOCK_ABOUT, NULL, NULL, N_("About this application"),
-		G_CALLBACK (help_about) }
+static const GtkToggleActionEntry toggle_menu_entries[] = {
+
+    { "Transfer", GTK_STOCK_TRANSFER, N_ ("_Transfer"), "<control>T",
+        N_ ("Transfer the call"), NULL }, //G_CALLBACK (call_transfer_cb) },
+    { "Record", GTK_STOCK_MEDIA_RECORD, N_ ("_Record"), "<control>R",
+      N_ ("Record the current conversation"), NULL }, // G_CALLBACK (call_record) },
+    { "Toolbar", NULL, N_ ("_Show toolbar"), "<control>T",
+      N_ ("Show the toolbar"), NULL },
+    { "Dialpad", NULL, N_ ("_Dialpad"), "<control>D",
+      N_ ("Show the dialpad"), G_CALLBACK (dialpad_bar_cb) },
+    { "VolumeControls", NULL, N_ ("_Volume controls"), "<control>V",
+      N_ ("Show the volume controls"), G_CALLBACK (volume_bar_cb) },
+    { "History", "appointment-soon", N_ ("_History"), NULL,
+      N_ ("Calls history"), G_CALLBACK (toggle_history_cb), FALSE },
+    { "Addressbook", GTK_STOCK_ADDRESSBOOK, N_ ("_Address book"), NULL,
+      N_ ("Address book"), G_CALLBACK (toggle_addressbook_cb), FALSE }
 
 };
 
-static const GtkToggleActionEntry toggle_menu_entries[] =
+gboolean
+uimanager_new (GtkUIManager **_ui_manager)
 {
 
-	{ "Transfer", GTK_STOCK_TRANSFER, N_("_Transfer"), "<control>T",
-		N_("Transfer the call"), NULL }, //G_CALLBACK (call_transfer_cb) },
-{ "Record", GTK_STOCK_MEDIA_RECORD, N_("_Record"), "<control>R",
-	N_("Record the current conversation"), NULL }, // G_CALLBACK (call_record) },
-{ "Toolbar", NULL, N_("_Show toolbar"), "<control>T",
-	N_("Show the toolbar"), NULL },
-{ "Dialpad", NULL, N_("_Dialpad"), "<control>D",
-	N_("Show the dialpad"), G_CALLBACK (dialpad_bar_cb) },
-{ "VolumeControls", NULL, N_("_Volume controls"), "<control>V",
-	N_("Show the volume controls"), G_CALLBACK (volume_bar_cb) },
-{ "History", "appointment-soon", N_("_History"), NULL,
-	N_("Calls history"), G_CALLBACK (toggle_history_cb), FALSE },
-{ "Addressbook", GTK_STOCK_ADDRESSBOOK, N_("_Address book"), NULL,
-	N_("Address book"), G_CALLBACK (toggle_addressbook_cb), FALSE }
-
-	};
-
-	gboolean
-uimanager_new(GtkUIManager **_ui_manager)
-{
+    GtkUIManager *ui_manager;
+    GtkActionGroup *action_group;
+    GtkWidget *window;
+    gchar *path;
+    GError *error = NULL;
+
+    window = get_main_window();
+    ui_manager = gtk_ui_manager_new();
+
+    /* Create an accel group for window's shortcuts */
+    path = g_build_filename (SFLPHONE_UIDIR_UNINSTALLED, "./ui.xml", NULL);
+
+    if (g_file_test (path, G_FILE_TEST_EXISTS)) {
+        gtk_ui_manager_add_ui_from_file (ui_manager, path, &error);
+
+        if (error != NULL) {
+            g_error_free (error);
+            return FALSE;
+        }
+
+        g_free (path);
+    } else {
+        path = g_build_filename (SFLPHONE_UIDIR, "./ui.xml", NULL);
 
-	GtkUIManager *ui_manager;
-	GtkActionGroup *action_group;
-	GtkWidget *window;
-	gchar *path;
-	GError *error = NULL;
-
-	window = get_main_window();
-	ui_manager = gtk_ui_manager_new();
-
-	/* Create an accel group for window's shortcuts */
-	path = g_build_filename(SFLPHONE_UIDIR_UNINSTALLED, "./ui.xml", NULL);
-	if (g_file_test(path, G_FILE_TEST_EXISTS))
-	{
-		gtk_ui_manager_add_ui_from_file(ui_manager, path, &error);
-
-		if (error != NULL)
-		{
-			g_error_free(error);
-			return FALSE;
-		}
-		g_free(path);
-	}
-	else
-	{
-		path = g_build_filename(SFLPHONE_UIDIR, "./ui.xml", NULL);
-		if (g_file_test(path, G_FILE_TEST_EXISTS))
-		{
-			gtk_ui_manager_add_ui_from_file(ui_manager, path, &error);
-
-			if (error != NULL)
-			{
-				g_error_free(error);
-				return FALSE;
-			}
-			g_free(path);
-		}
-		else
-			return FALSE;
-	}
-	action_group = gtk_action_group_new("SFLphoneWindowActions");
-	// To translate label and tooltip entries
-	gtk_action_group_set_translation_domain(action_group, "sflphone-client-gnome");
-	gtk_action_group_add_actions(action_group, menu_entries,
-			G_N_ELEMENTS (menu_entries), window);
-	gtk_action_group_add_toggle_actions(action_group, toggle_menu_entries,
-			G_N_ELEMENTS (toggle_menu_entries), window);
-	//gtk_action_group_add_radio_actions (action_group, radio_menu_entries, G_N_ELEMENTS (radio_menu_entries), CALLTREE_CALLS, G_CALLBACK (calltree_switch_cb), window);
-	gtk_ui_manager_insert_action_group(ui_manager, action_group, 0);
-
-	*_ui_manager = ui_manager;
-
-	return TRUE;
+        if (g_file_test (path, G_FILE_TEST_EXISTS)) {
+            gtk_ui_manager_add_ui_from_file (ui_manager, path, &error);
+
+            if (error != NULL) {
+                g_error_free (error);
+                return FALSE;
+            }
+
+            g_free (path);
+        } else
+            return FALSE;
+    }
+
+    action_group = gtk_action_group_new ("SFLphoneWindowActions");
+    // To translate label and tooltip entries
+    gtk_action_group_set_translation_domain (action_group, "sflphone-client-gnome");
+    gtk_action_group_add_actions (action_group, menu_entries,
+                                  G_N_ELEMENTS (menu_entries), window);
+    gtk_action_group_add_toggle_actions (action_group, toggle_menu_entries,
+                                         G_N_ELEMENTS (toggle_menu_entries), window);
+    //gtk_action_group_add_radio_actions (action_group, radio_menu_entries, G_N_ELEMENTS (radio_menu_entries), CALLTREE_CALLS, G_CALLBACK (calltree_switch_cb), window);
+    gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+
+    *_ui_manager = ui_manager;
+
+    return TRUE;
 }
 
-	static void
-edit_number_cb(GtkWidget *widget UNUSED, gpointer user_data)
+static void
+edit_number_cb (GtkWidget *widget UNUSED, gpointer user_data)
 {
 
-	show_edit_number((callable_obj_t*) user_data);
+    show_edit_number ( (callable_obj_t*) user_data);
 }
 
-	void
-add_registered_accounts_to_menu(GtkWidget *menu)
+void
+add_registered_accounts_to_menu (GtkWidget *menu)
 {
 
-	GtkWidget *menu_items;
-	unsigned int i;
-	account_t* acc, *current;
-	gchar* alias;
-
-	menu_items = gtk_separator_menu_item_new();
-	gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-	gtk_widget_show(menu_items);
-
-	for (i = 0; i < account_list_get_size(); i++)
-	{
-		acc = account_list_get_nth(i);
-		// Display only the registered accounts
-		if (g_strcasecmp(account_state_name(acc->state), account_state_name(
-						ACCOUNT_STATE_REGISTERED)) == 0)
-		{
-			alias = g_strconcat(g_hash_table_lookup(acc->properties,
-						ACCOUNT_ALIAS), " - ", g_hash_table_lookup(acc->properties,
-							ACCOUNT_TYPE), NULL);
-			menu_items = gtk_check_menu_item_new_with_mnemonic(alias);
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			g_object_set_data(G_OBJECT( menu_items ), "account", acc);
-			g_free(alias);
-			current = account_list_get_current();
-			if (current)
-			{
-				gtk_check_menu_item_set_active(
-						GTK_CHECK_MENU_ITEM(menu_items),
-						(g_strcasecmp(acc->accountID, current->accountID) == 0) ? TRUE
-						: FALSE);
-			}
-			g_signal_connect (G_OBJECT (menu_items), "activate",
-					G_CALLBACK (switch_account),
-					NULL);
-			gtk_widget_show(menu_items);
-		} // fi
-	}
+    GtkWidget *menu_items;
+    unsigned int i;
+    account_t* acc, *current;
+    gchar* alias;
+
+    menu_items = gtk_separator_menu_item_new();
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+    gtk_widget_show (menu_items);
+
+    for (i = 0; i < account_list_get_size(); i++) {
+        acc = account_list_get_nth (i);
+
+        // Display only the registered accounts
+        if (g_strcasecmp (account_state_name (acc->state), account_state_name (
+                              ACCOUNT_STATE_REGISTERED)) == 0) {
+            alias = g_strconcat (g_hash_table_lookup (acc->properties,
+                                 ACCOUNT_ALIAS), " - ", g_hash_table_lookup (acc->properties,
+                                         ACCOUNT_TYPE), NULL);
+            menu_items = gtk_check_menu_item_new_with_mnemonic (alias);
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            g_object_set_data (G_OBJECT (menu_items), "account", acc);
+            g_free (alias);
+            current = account_list_get_current();
+
+            if (current) {
+                gtk_check_menu_item_set_active (
+                    GTK_CHECK_MENU_ITEM (menu_items),
+                    (g_strcasecmp (acc->accountID, current->accountID) == 0) ? TRUE
+                    : FALSE);
+            }
+
+            g_signal_connect (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (switch_account),
+                              NULL);
+            gtk_widget_show (menu_items);
+        } // fi
+    }
 
 }
 
-	void
-show_popup_menu(GtkWidget *my_widget, GdkEventButton *event)
+void
+show_popup_menu (GtkWidget *my_widget, GdkEventButton *event)
 {
-	// TODO update the selection to make sure the call under the mouse is the call selected
-
-	// call type boolean
-	gboolean pickup = FALSE, hangup = FALSE, hold = FALSE, copy = FALSE, record =
-		FALSE, detach = FALSE;
-	gboolean accounts = FALSE;
-	gboolean im = FALSE;
-
-	// conference type boolean
-	gboolean hangup_conf = FALSE, hold_conf = FALSE;
-
-	callable_obj_t * selectedCall;
-	conference_obj_t * selectedConf;
-
-	if (calltab_get_selected_type(current_calls) == A_CALL)
-	{
-		DEBUG("MENUS: SELECTED A CALL");
-		selectedCall = calltab_get_selected_call(current_calls);
-
-		if (selectedCall)
-		{
-			copy = TRUE;
-			switch (selectedCall->_state)
-			{
-				case CALL_STATE_INCOMING:
-					pickup = TRUE;
-					hangup = TRUE;
-					detach = TRUE;
-					break;
-				case CALL_STATE_HOLD:
-					hangup = TRUE;
-					hold = TRUE;
-					detach = TRUE;
-					break;
-				case CALL_STATE_RINGING:
-					hangup = TRUE;
-					detach = TRUE;
-					break;
-				case CALL_STATE_DIALING:
-					pickup = TRUE;
-					hangup = TRUE;
-					accounts = TRUE;
-					break;
-				case CALL_STATE_RECORD:
-				case CALL_STATE_CURRENT:
-					hangup = TRUE;
-					hold = TRUE;
-					record = TRUE;
-					detach = TRUE;
-					im = TRUE;
-					break;
-				case CALL_STATE_BUSY:
-				case CALL_STATE_FAILURE:
-					hangup = TRUE;
-					break;
-				default:
-					WARN("Should not happen in show_popup_menu for calls!")
-						;
-					break;
-			}
-		}
-	}
-	else
-	{
-		DEBUG("MENUS: SELECTED A CONF");
-		selectedConf = calltab_get_selected_conf();
-
-		if (selectedConf)
-		{
-			switch (selectedConf->_state)
-			{
-				case CONFERENCE_STATE_ACTIVE_ATACHED:
-					hangup_conf = TRUE;
-					hold_conf = TRUE;
-					break;
-				case CONFERENCE_STATE_ACTIVE_DETACHED:
-					break;
-				case CONFERENCE_STATE_HOLD:
-					hangup_conf = TRUE;
-					hold_conf = TRUE;
-					break;
-				default:
-					WARN("Should not happen in show_popup_menu for conferences!")
-						;
-					break;
-			}
-		}
-
-	}
-
-	GtkWidget *menu;
-	GtkWidget *image;
-	int button, event_time;
-	GtkWidget * menu_items;
-
-	menu = gtk_menu_new();
-	//g_signal_connect (menu, "deactivate",
-	//       G_CALLBACK (gtk_widget_destroy), NULL);
-	if (calltab_get_selected_type(current_calls) == A_CALL)
-	{
-		DEBUG("BUILD CALL MENU");
-
-		if (copy)
-		{
-			menu_items = gtk_image_menu_item_new_from_stock(GTK_STOCK_COPY,
-					get_accel_group());
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			g_signal_connect (G_OBJECT (menu_items), "activate",
-					G_CALLBACK (edit_copy),
-					NULL);
-			gtk_widget_show(menu_items);
-		}
-
-		menu_items = gtk_image_menu_item_new_from_stock(GTK_STOCK_PASTE,
-				get_accel_group());
-		gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-		g_signal_connect (G_OBJECT (menu_items), "activate",
-				G_CALLBACK (edit_paste),
-				NULL);
-		gtk_widget_show(menu_items);
-
-		if (pickup || hangup || hold)
-		{
-			menu_items = gtk_separator_menu_item_new();
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			gtk_widget_show(menu_items);
-		}
-
-		if (pickup)
-		{
-
-			menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Pick up"));
-			image = gtk_image_new_from_file(ICONS_DIR "/icon_accept.svg");
-			gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image);
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			g_signal_connect (G_OBJECT (menu_items), "activate",
-					G_CALLBACK (call_pick_up),
-					NULL);
-			gtk_widget_show(menu_items);
-		}
-
-		if (hangup)
-		{
-			menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Hang up"));
-			image = gtk_image_new_from_file(ICONS_DIR "/icon_hangup.svg");
-			gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image);
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			g_signal_connect (G_OBJECT (menu_items), "activate",
-					G_CALLBACK (call_hang_up),
-					NULL);
-			gtk_widget_show(menu_items);
-		}
-
-		if (hold)
-		{
-			menu_items = gtk_check_menu_item_new_with_mnemonic(_("On _Hold"));
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items),
-					(selectedCall->_state == CALL_STATE_HOLD ? TRUE : FALSE));
-			g_signal_connect(G_OBJECT (menu_items), "activate",
-					G_CALLBACK (call_hold),
-					NULL);
-			gtk_widget_show(menu_items);
-		}
-
-		if (record)
-		{
-			menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Record"));
-			image = gtk_image_new_from_stock(GTK_STOCK_MEDIA_RECORD,
-					GTK_ICON_SIZE_MENU);
-			gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image);
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			g_signal_connect (G_OBJECT (menu_items), "activate",
-					G_CALLBACK (call_record),
-					NULL);
-			gtk_widget_show(menu_items);
-		}
-
-		if (im)
-		{
-			menu_items = gtk_separator_menu_item_new();
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			gtk_widget_show(menu_items);
-
-			menu_items = gtk_image_menu_item_new_with_mnemonic(_("Send _message"));
-			image = gtk_image_new_from_stock(GTK_STOCK_IM, GTK_ICON_SIZE_MENU);
-			gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image);
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			g_signal_connect (G_OBJECT (menu_items), "activate",
-					G_CALLBACK (call_im),
-					NULL);
-			gtk_widget_show(menu_items);
-		}
-
-	}
-	else
-	{
-		DEBUG("BUILD CONFERENCE MENU");
-
-		if (hangup_conf)
-		{
-			menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Hang up"));
-			image = gtk_image_new_from_file(ICONS_DIR "/icon_hangup.svg");
-			gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_items), image);
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			g_signal_connect (G_OBJECT (menu_items), "activate",
-					G_CALLBACK (conference_hang_up),
-					NULL);
-			gtk_widget_show(menu_items);
-		}
-
-		if (hold_conf)
-		{
-			menu_items = gtk_check_menu_item_new_with_mnemonic(_("On _Hold"));
-			gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-			gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menu_items),
-					(selectedCall->_state == CALL_STATE_HOLD ? TRUE : FALSE));
-			g_signal_connect(G_OBJECT (menu_items), "activate",
-					G_CALLBACK (conference_hold),
-					NULL);
-			gtk_widget_show(menu_items);
-		}
-	}
-
-	if (accounts)
-	{
-		add_registered_accounts_to_menu(menu);
-	}
-
-	if (event)
-	{
-		button = event->button;
-		event_time = event->time;
-	}
-	else
-	{
-		button = 0;
-		event_time = gtk_get_current_event_time();
-	}
-
-	gtk_menu_attach_to_widget(GTK_MENU (menu), my_widget, NULL);
-	gtk_menu_popup(GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time);
+    // TODO update the selection to make sure the call under the mouse is the call selected
+
+    // call type boolean
+    gboolean pickup = FALSE, hangup = FALSE, hold = FALSE, copy = FALSE, record =
+                                          FALSE, detach = FALSE;
+    gboolean accounts = FALSE;
+    gboolean im = FALSE;
+
+    // conference type boolean
+    gboolean hangup_conf = FALSE, hold_conf = FALSE;
+
+    callable_obj_t * selectedCall;
+    conference_obj_t * selectedConf;
+
+    if (calltab_get_selected_type (current_calls) == A_CALL) {
+        DEBUG ("MENUS: SELECTED A CALL");
+        selectedCall = calltab_get_selected_call (current_calls);
+
+        if (selectedCall) {
+            copy = TRUE;
+
+            switch (selectedCall->_state) {
+                case CALL_STATE_INCOMING:
+                    pickup = TRUE;
+                    hangup = TRUE;
+                    detach = TRUE;
+                    break;
+                case CALL_STATE_HOLD:
+                    hangup = TRUE;
+                    hold = TRUE;
+                    detach = TRUE;
+                    break;
+                case CALL_STATE_RINGING:
+                    hangup = TRUE;
+                    detach = TRUE;
+                    break;
+                case CALL_STATE_DIALING:
+                    pickup = TRUE;
+                    hangup = TRUE;
+                    accounts = TRUE;
+                    break;
+                case CALL_STATE_RECORD:
+                case CALL_STATE_CURRENT:
+                    hangup = TRUE;
+                    hold = TRUE;
+                    record = TRUE;
+                    detach = TRUE;
+                    im = TRUE;
+                    break;
+                case CALL_STATE_BUSY:
+                case CALL_STATE_FAILURE:
+                    hangup = TRUE;
+                    break;
+                default:
+                    WARN ("Should not happen in show_popup_menu for calls!")
+                    ;
+                    break;
+            }
+        }
+    } else {
+        DEBUG ("MENUS: SELECTED A CONF");
+        selectedConf = calltab_get_selected_conf();
+
+        if (selectedConf) {
+            switch (selectedConf->_state) {
+                case CONFERENCE_STATE_ACTIVE_ATACHED:
+                    hangup_conf = TRUE;
+                    hold_conf = TRUE;
+                    break;
+                case CONFERENCE_STATE_ACTIVE_DETACHED:
+                    break;
+                case CONFERENCE_STATE_HOLD:
+                    hangup_conf = TRUE;
+                    hold_conf = TRUE;
+                    break;
+                default:
+                    WARN ("Should not happen in show_popup_menu for conferences!")
+                    ;
+                    break;
+            }
+        }
+
+    }
+
+    GtkWidget *menu;
+    GtkWidget *image;
+    int button, event_time;
+    GtkWidget * menu_items;
+
+    menu = gtk_menu_new();
+
+    //g_signal_connect (menu, "deactivate",
+    //       G_CALLBACK (gtk_widget_destroy), NULL);
+    if (calltab_get_selected_type (current_calls) == A_CALL) {
+        DEBUG ("BUILD CALL MENU");
+
+        if (copy) {
+            menu_items = gtk_image_menu_item_new_from_stock (GTK_STOCK_COPY,
+                         get_accel_group());
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            g_signal_connect (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (edit_copy),
+                              NULL);
+            gtk_widget_show (menu_items);
+        }
+
+        menu_items = gtk_image_menu_item_new_from_stock (GTK_STOCK_PASTE,
+                     get_accel_group());
+        gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+        g_signal_connect (G_OBJECT (menu_items), "activate",
+                          G_CALLBACK (edit_paste),
+                          NULL);
+        gtk_widget_show (menu_items);
+
+        if (pickup || hangup || hold) {
+            menu_items = gtk_separator_menu_item_new();
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            gtk_widget_show (menu_items);
+        }
+
+        if (pickup) {
+
+            menu_items = gtk_image_menu_item_new_with_mnemonic (_ ("_Pick up"));
+            image = gtk_image_new_from_file (ICONS_DIR "/icon_accept.svg");
+            gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_items), image);
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            g_signal_connect (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (call_pick_up),
+                              NULL);
+            gtk_widget_show (menu_items);
+        }
+
+        if (hangup) {
+            menu_items = gtk_image_menu_item_new_with_mnemonic (_ ("_Hang up"));
+            image = gtk_image_new_from_file (ICONS_DIR "/icon_hangup.svg");
+            gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_items), image);
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            g_signal_connect (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (call_hang_up),
+                              NULL);
+            gtk_widget_show (menu_items);
+        }
+
+        if (hold) {
+            menu_items = gtk_check_menu_item_new_with_mnemonic (_ ("On _Hold"));
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_items),
+                                            (selectedCall->_state == CALL_STATE_HOLD ? TRUE : FALSE));
+            g_signal_connect (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (call_hold),
+                              NULL);
+            gtk_widget_show (menu_items);
+        }
+
+        if (record) {
+            menu_items = gtk_image_menu_item_new_with_mnemonic (_ ("_Record"));
+            image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_RECORD,
+                                              GTK_ICON_SIZE_MENU);
+            gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_items), image);
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            g_signal_connect (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (call_record),
+                              NULL);
+            gtk_widget_show (menu_items);
+        }
+
+        if (im) {
+            menu_items = gtk_separator_menu_item_new();
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            gtk_widget_show (menu_items);
+
+            menu_items = gtk_image_menu_item_new_with_mnemonic (_ ("Send _message"));
+            image = gtk_image_new_from_stock (GTK_STOCK_IM, GTK_ICON_SIZE_MENU);
+            gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_items), image);
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            g_signal_connect (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (call_im),
+                              NULL);
+            gtk_widget_show (menu_items);
+        }
+
+    } else {
+        DEBUG ("BUILD CONFERENCE MENU");
+
+        if (hangup_conf) {
+            menu_items = gtk_image_menu_item_new_with_mnemonic (_ ("_Hang up"));
+            image = gtk_image_new_from_file (ICONS_DIR "/icon_hangup.svg");
+            gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_items), image);
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            g_signal_connect (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (conference_hang_up),
+                              NULL);
+            gtk_widget_show (menu_items);
+        }
+
+        if (hold_conf) {
+            menu_items = gtk_check_menu_item_new_with_mnemonic (_ ("On _Hold"));
+            gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+            gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_items),
+                                            (selectedCall->_state == CALL_STATE_HOLD ? TRUE : FALSE));
+            g_signal_connect (G_OBJECT (menu_items), "activate",
+                              G_CALLBACK (conference_hold),
+                              NULL);
+            gtk_widget_show (menu_items);
+        }
+    }
+
+    if (accounts) {
+        add_registered_accounts_to_menu (menu);
+    }
+
+    if (event) {
+        button = event->button;
+        event_time = event->time;
+    } else {
+        button = 0;
+        event_time = gtk_get_current_event_time();
+    }
+
+    gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL);
+    gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time);
 }
 
-	void
-show_popup_menu_history(GtkWidget *my_widget, GdkEventButton *event)
+void
+show_popup_menu_history (GtkWidget *my_widget, GdkEventButton *event)
 {
 
-	gboolean pickup = FALSE;
-	gboolean remove = FALSE;
-	gboolean edit = FALSE;
-	gboolean accounts = FALSE;
-
-	callable_obj_t * selectedCall = calltab_get_selected_call(history);
-	if (selectedCall)
-	{
-		remove = TRUE;
-		pickup = TRUE;
-		edit = TRUE;
-		accounts = TRUE;
-	}
-
-	GtkWidget *menu;
-	GtkWidget *image;
-	int button, event_time;
-	GtkWidget * menu_items;
-
-	menu = gtk_menu_new();
-	//g_signal_connect (menu, "deactivate",
-	//       G_CALLBACK (gtk_widget_destroy), NULL);
-
-	if (pickup)
-	{
-
-		menu_items = gtk_image_menu_item_new_with_mnemonic(_("_Call back"));
-		image = gtk_image_new_from_file(ICONS_DIR "/icon_accept.svg");
-		gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM ( menu_items ), image);
-		gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-		g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (call_back), NULL);
-		gtk_widget_show(menu_items);
-	}
-
-	menu_items = gtk_separator_menu_item_new();
-	gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-	gtk_widget_show(menu_items);
-
-	if (edit)
-	{
-		menu_items = gtk_image_menu_item_new_from_stock(GTK_STOCK_EDIT,
-				get_accel_group());
-		gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-		g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (edit_number_cb), selectedCall);
-		gtk_widget_show(menu_items);
-	}
-
-	if (remove)
-	{
-		menu_items = gtk_image_menu_item_new_from_stock(GTK_STOCK_DELETE,
-				get_accel_group());
-		gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-		g_signal_connect (G_OBJECT (menu_items), "activate", G_CALLBACK (remove_from_history), NULL);
-		gtk_widget_show(menu_items);
-	}
-
-	if (accounts)
-	{
-		add_registered_accounts_to_menu(menu);
-	}
-
-	if (event)
-	{
-		button = event->button;
-		event_time = event->time;
-	}
-	else
-	{
-		button = 0;
-		event_time = gtk_get_current_event_time();
-	}
-
-	gtk_menu_attach_to_widget(GTK_MENU (menu), my_widget, NULL);
-	gtk_menu_popup(GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time);
+    gboolean pickup = FALSE;
+    gboolean remove = FALSE;
+    gboolean edit = FALSE;
+    gboolean accounts = FALSE;
+
+    callable_obj_t * selectedCall = calltab_get_selected_call (history);
+
+    if (selectedCall) {
+        remove = TRUE;
+        pickup = TRUE;
+        edit = TRUE;
+        accounts = TRUE;
+    }
+
+    GtkWidget *menu;
+    GtkWidget *image;
+    int button, event_time;
+    GtkWidget * menu_items;
+
+    menu = gtk_menu_new();
+    //g_signal_connect (menu, "deactivate",
+    //       G_CALLBACK (gtk_widget_destroy), NULL);
+
+    if (pickup) {
+
+        menu_items = gtk_image_menu_item_new_with_mnemonic (_ ("_Call back"));
+        image = gtk_image_new_from_file (ICONS_DIR "/icon_accept.svg");
+        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_items), image);
+        gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+        g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (call_back), NULL);
+        gtk_widget_show (menu_items);
+    }
+
+    menu_items = gtk_separator_menu_item_new();
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+    gtk_widget_show (menu_items);
+
+    if (edit) {
+        menu_items = gtk_image_menu_item_new_from_stock (GTK_STOCK_EDIT,
+                     get_accel_group());
+        gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+        g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (edit_number_cb), selectedCall);
+        gtk_widget_show (menu_items);
+    }
+
+    if (remove) {
+        menu_items = gtk_image_menu_item_new_from_stock (GTK_STOCK_DELETE,
+                     get_accel_group());
+        gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+        g_signal_connect (G_OBJECT (menu_items), "activate", G_CALLBACK (remove_from_history), NULL);
+        gtk_widget_show (menu_items);
+    }
+
+    if (accounts) {
+        add_registered_accounts_to_menu (menu);
+    }
+
+    if (event) {
+        button = event->button;
+        event_time = event->time;
+    } else {
+        button = 0;
+        event_time = gtk_get_current_event_time();
+    }
+
+    gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL);
+    gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time);
 }
-	void
-show_popup_menu_contacts(GtkWidget *my_widget, GdkEventButton *event)
+void
+show_popup_menu_contacts (GtkWidget *my_widget, GdkEventButton *event)
 {
 
-	gboolean pickup = FALSE;
-	gboolean accounts = FALSE;
-	gboolean edit = FALSE;
-
-	callable_obj_t * selectedCall = calltab_get_selected_call(contacts);
-	if (selectedCall)
-	{
-		pickup = TRUE;
-		accounts = TRUE;
-		edit = TRUE;
-	}
-
-	GtkWidget *menu;
-	GtkWidget *image;
-	int button, event_time;
-	GtkWidget * menu_items;
-
-	menu = gtk_menu_new();
-	//g_signal_connect (menu, "deactivate",
-	//       G_CALLBACK (gtk_widget_destroy), NULL);
-
-	if (pickup)
-	{
-
-		menu_items = gtk_image_menu_item_new_with_mnemonic(_("_New call"));
-		image = gtk_image_new_from_file(ICONS_DIR "/icon_accept.svg");
-		gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM ( menu_items ), image);
-		gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-		g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (call_back), NULL);
-		gtk_widget_show(menu_items);
-	}
-
-	if (edit)
-	{
-		menu_items = gtk_image_menu_item_new_from_stock(GTK_STOCK_EDIT,
-				get_accel_group());
-		gtk_menu_shell_append(GTK_MENU_SHELL (menu), menu_items);
-		g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (edit_number_cb), selectedCall);
-		gtk_widget_show(menu_items);
-	}
-
-	if (accounts)
-	{
-		add_registered_accounts_to_menu(menu);
-	}
-
-	if (event)
-	{
-		button = event->button;
-		event_time = event->time;
-	}
-	else
-	{
-		button = 0;
-		event_time = gtk_get_current_event_time();
-	}
-
-	gtk_menu_attach_to_widget(GTK_MENU (menu), my_widget, NULL);
-	gtk_menu_popup(GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time);
+    gboolean pickup = FALSE;
+    gboolean accounts = FALSE;
+    gboolean edit = FALSE;
+
+    callable_obj_t * selectedCall = calltab_get_selected_call (contacts);
+
+    if (selectedCall) {
+        pickup = TRUE;
+        accounts = TRUE;
+        edit = TRUE;
+    }
+
+    GtkWidget *menu;
+    GtkWidget *image;
+    int button, event_time;
+    GtkWidget * menu_items;
+
+    menu = gtk_menu_new();
+    //g_signal_connect (menu, "deactivate",
+    //       G_CALLBACK (gtk_widget_destroy), NULL);
+
+    if (pickup) {
+
+        menu_items = gtk_image_menu_item_new_with_mnemonic (_ ("_New call"));
+        image = gtk_image_new_from_file (ICONS_DIR "/icon_accept.svg");
+        gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_items), image);
+        gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+        g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (call_back), NULL);
+        gtk_widget_show (menu_items);
+    }
+
+    if (edit) {
+        menu_items = gtk_image_menu_item_new_from_stock (GTK_STOCK_EDIT,
+                     get_accel_group());
+        gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_items);
+        g_signal_connect (G_OBJECT (menu_items), "activate",G_CALLBACK (edit_number_cb), selectedCall);
+        gtk_widget_show (menu_items);
+    }
+
+    if (accounts) {
+        add_registered_accounts_to_menu (menu);
+    }
+
+    if (event) {
+        button = event->button;
+        event_time = event->time;
+    } else {
+        button = 0;
+        event_time = gtk_get_current_event_time();
+    }
+
+    gtk_menu_attach_to_widget (GTK_MENU (menu), my_widget, NULL);
+    gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, button, event_time);
 }
 
-	static void
-ok_cb(GtkWidget *widget UNUSED, gpointer userdata)
+static void
+ok_cb (GtkWidget *widget UNUSED, gpointer userdata)
 {
 
-	gchar *new_number;
-	callable_obj_t *modified_call, *original;
+    gchar *new_number;
+    callable_obj_t *modified_call, *original;
 
-	// Change the number of the selected call before calling
-	new_number = (gchar*) gtk_entry_get_text(GTK_ENTRY (editable_num));
-	original = (callable_obj_t*) userdata;
+    // Change the number of the selected call before calling
+    new_number = (gchar*) gtk_entry_get_text (GTK_ENTRY (editable_num));
+    original = (callable_obj_t*) userdata;
 
-	// Create the new call
-	create_new_call(CALL, CALL_STATE_DIALING, "", g_strdup(original->_accountID),
-			original->_peer_name, g_strdup(new_number), &modified_call);
+    // Create the new call
+    create_new_call (CALL, CALL_STATE_DIALING, "", g_strdup (original->_accountID),
+                     original->_peer_name, g_strdup (new_number), &modified_call);
 
-	// Update the internal data structure and the GUI
-	calllist_add(current_calls, modified_call);
-	calltree_add_call(current_calls, modified_call, NULL);
-	sflphone_place_call(modified_call);
-	calltree_display(current_calls);
+    // Update the internal data structure and the GUI
+    calllist_add (current_calls, modified_call);
+    calltree_add_call (current_calls, modified_call, NULL);
+    sflphone_place_call (modified_call);
+    calltree_display (current_calls);
 
-	// Close the contextual menu
-	gtk_widget_destroy(GTK_WIDGET (edit_dialog));
+    // Close the contextual menu
+    gtk_widget_destroy (GTK_WIDGET (edit_dialog));
 }
 
-	static void
-on_delete(GtkWidget * widget)
+static void
+on_delete (GtkWidget * widget)
 {
-	gtk_widget_destroy(widget);
+    gtk_widget_destroy (widget);
 }
 
-	void
-show_edit_number(callable_obj_t *call)
+void
+show_edit_number (callable_obj_t *call)
 {
 
-	GtkWidget *ok, *hbox, *image;
-	GdkPixbuf *pixbuf;
+    GtkWidget *ok, *hbox, *image;
+    GdkPixbuf *pixbuf;
 
-	edit_dialog = GTK_DIALOG (gtk_dialog_new());
+    edit_dialog = GTK_DIALOG (gtk_dialog_new());
 
-	// Set window properties
-	gtk_window_set_default_size(GTK_WINDOW(edit_dialog), 300, 20);
-	gtk_window_set_title(GTK_WINDOW(edit_dialog), _("Edit phone number"));
-	gtk_window_set_resizable(GTK_WINDOW (edit_dialog), FALSE);
+    // Set window properties
+    gtk_window_set_default_size (GTK_WINDOW (edit_dialog), 300, 20);
+    gtk_window_set_title (GTK_WINDOW (edit_dialog), _ ("Edit phone number"));
+    gtk_window_set_resizable (GTK_WINDOW (edit_dialog), FALSE);
 
-	g_signal_connect (G_OBJECT (edit_dialog), "delete-event", G_CALLBACK (on_delete), NULL);
+    g_signal_connect (G_OBJECT (edit_dialog), "delete-event", G_CALLBACK (on_delete), NULL);
 
-	hbox = gtk_hbox_new(FALSE, 0);
-	gtk_box_pack_start(GTK_BOX (edit_dialog->vbox), hbox, TRUE, TRUE, 0);
+    hbox = gtk_hbox_new (FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (edit_dialog->vbox), hbox, TRUE, TRUE, 0);
 
-	// Set the number to be edited
-	editable_num = gtk_entry_new();
+    // Set the number to be edited
+    editable_num = gtk_entry_new();
 #if GTK_CHECK_VERSION(2,12,0)
-	gtk_widget_set_tooltip_text(GTK_WIDGET(editable_num),
-			_("Edit the phone number before making a call"));
+    gtk_widget_set_tooltip_text (GTK_WIDGET (editable_num),
+                                 _ ("Edit the phone number before making a call"));
 #endif
-	if (call)
-		gtk_entry_set_text(GTK_ENTRY(editable_num), g_strdup(call->_peer_number));
-	else
-		ERROR ("This a bug, the call should be defined. menus.c line 1051");
 
-	gtk_box_pack_start(GTK_BOX (hbox), editable_num, TRUE, TRUE, 0);
+    if (call)
+        gtk_entry_set_text (GTK_ENTRY (editable_num), g_strdup (call->_peer_number));
+    else
+        ERROR ("This a bug, the call should be defined. menus.c line 1051");
+
+    gtk_box_pack_start (GTK_BOX (hbox), editable_num, TRUE, TRUE, 0);
 
-	// Set a custom image for the button
-	pixbuf = gdk_pixbuf_new_from_file_at_scale(ICONS_DIR "/outgoing.svg", 32, 32,
-			TRUE, NULL);
-	image = gtk_image_new_from_pixbuf(pixbuf);
-	ok = gtk_button_new();
-	gtk_button_set_image(GTK_BUTTON (ok), image);
-	gtk_box_pack_start(GTK_BOX (hbox), ok, TRUE, TRUE, 0);
-	g_signal_connect(G_OBJECT (ok), "clicked", G_CALLBACK (ok_cb), call);
+    // Set a custom image for the button
+    pixbuf = gdk_pixbuf_new_from_file_at_scale (ICONS_DIR "/outgoing.svg", 32, 32,
+             TRUE, NULL);
+    image = gtk_image_new_from_pixbuf (pixbuf);
+    ok = gtk_button_new();
+    gtk_button_set_image (GTK_BUTTON (ok), image);
+    gtk_box_pack_start (GTK_BOX (hbox), ok, TRUE, TRUE, 0);
+    g_signal_connect (G_OBJECT (ok), "clicked", G_CALLBACK (ok_cb), call);
 
-	gtk_widget_show_all(edit_dialog->vbox);
+    gtk_widget_show_all (edit_dialog->vbox);
 
-	gtk_dialog_run(edit_dialog);
+    gtk_dialog_run (edit_dialog);
 
 }
 
-	GtkWidget*
+GtkWidget*
 create_waiting_icon()
 {
-	GtkWidget * waiting_icon;
-	waiting_icon = gtk_image_menu_item_new_with_label("");
-	gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(waiting_icon),
-			gtk_image_new_from_animation(gdk_pixbuf_animation_new_from_file(
-					ICONS_DIR "/wait-on.gif", NULL)));
-	gtk_menu_item_set_right_justified(GTK_MENU_ITEM(waiting_icon), TRUE);
-
-	return waiting_icon;
+    GtkWidget * waiting_icon;
+    waiting_icon = gtk_image_menu_item_new_with_label ("");
+    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (waiting_icon),
+                                   gtk_image_new_from_animation (gdk_pixbuf_animation_new_from_file (
+                                                                     ICONS_DIR "/wait-on.gif", NULL)));
+    gtk_menu_item_set_right_justified (GTK_MENU_ITEM (waiting_icon), TRUE);
+
+    return waiting_icon;
 }
 
-	void
-create_menus(GtkUIManager *ui_manager, GtkWidget **widget)
+void
+create_menus (GtkUIManager *ui_manager, GtkWidget **widget)
 {
 
-	GtkWidget * menu_bar;
+    GtkWidget * menu_bar;
 
-	menu_bar = gtk_ui_manager_get_widget (ui_manager, "/MenuBar");
-	pickUpAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/PickUp");
-	newCallAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/NewCall");
-	hangUpAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/HangUp");
-	holdMenu = gtk_ui_manager_get_widget (ui_manager, "/MenuBar/CallMenu/OnHoldMenu");
-	recordAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/Record");
-	imAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/InstantMessaging");
-	copyAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/EditMenu/Copy");
-	pasteAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/EditMenu/Paste");
-	volumeToggle = gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/VolumeControls");
+    menu_bar = gtk_ui_manager_get_widget (ui_manager, "/MenuBar");
+    pickUpAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/PickUp");
+    newCallAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/NewCall");
+    hangUpAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/HangUp");
+    holdMenu = gtk_ui_manager_get_widget (ui_manager, "/MenuBar/CallMenu/OnHoldMenu");
+    recordAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/Record");
+    imAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/InstantMessaging");
+    copyAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/EditMenu/Copy");
+    pasteAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/EditMenu/Paste");
+    volumeToggle = gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/VolumeControls");
 
-	// Set the toggle buttons
-	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/Dialpad")), eel_gconf_get_boolean (CONF_SHOW_DIALPAD));
-	gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (volumeToggle), (gboolean) SHOW_VOLUME);
+    // Set the toggle buttons
+    gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/Dialpad")), eel_gconf_get_boolean (CONF_SHOW_DIALPAD));
+    gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (volumeToggle), (gboolean) SHOW_VOLUME);
 
-	gtk_action_set_sensitive (GTK_ACTION (volumeToggle), SHOW_ALSA_CONF);
+    gtk_action_set_sensitive (GTK_ACTION (volumeToggle), SHOW_ALSA_CONF);
 
-	// Disable it right now
-	gtk_action_set_sensitive (GTK_ACTION (gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/Toolbar")), FALSE);
+    // Disable it right now
+    gtk_action_set_sensitive (GTK_ACTION (gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/Toolbar")), FALSE);
 
-	/* Add the loading icon at the right of the toolbar. It is used for addressbook searches. */
-	waitingLayer = create_waiting_icon ();
-	gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), waitingLayer);
+    /* Add the loading icon at the right of the toolbar. It is used for addressbook searches. */
+    waitingLayer = create_waiting_icon ();
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), waitingLayer);
 
-	*widget = menu_bar;
+    *widget = menu_bar;
 }
 
-	void
-create_toolbar_actions(GtkUIManager *ui_manager, GtkWidget **widget)
+void
+create_toolbar_actions (GtkUIManager *ui_manager, GtkWidget **widget)
 {
-	toolbar = gtk_ui_manager_get_widget(ui_manager, "/ToolbarActions");
-
-	holdToolbar = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/OnHoldToolbar");
-	offHoldToolbar = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/OffHoldToolbar");
-	transferToolbar = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/TransferToolbar");
-	voicemailAction = gtk_ui_manager_get_action(ui_manager,
-			"/ToolbarActions/Voicemail");
-	voicemailToolbar = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/VoicemailToolbar");
-	newCallWidget = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/NewCallToolbar");
-	pickUpWidget = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/PickUpToolbar");
-	hangUpWidget = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/HangUpToolbar");
-	recordWidget = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/RecordToolbar");
-	imToolbar = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/InstantMessagingToolbar");
-	historyButton = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/HistoryToolbar");
-	contactButton = gtk_ui_manager_get_widget(ui_manager,
-			"/ToolbarActions/AddressbookToolbar");
-
-	// Set the handler ID for the transfer
-	transfertButtonConnId
-		= g_signal_connect (G_OBJECT (transferToolbar), "toggled", G_CALLBACK (call_transfer_cb), NULL);
-	recordButtonConnId
-		= g_signal_connect (G_OBJECT (recordWidget), "toggled", G_CALLBACK (call_record), NULL);
-	active_calltree = current_calls;
-
-	*widget = toolbar;
+    toolbar = gtk_ui_manager_get_widget (ui_manager, "/ToolbarActions");
+
+    holdToolbar = gtk_ui_manager_get_widget (ui_manager,
+                  "/ToolbarActions/OnHoldToolbar");
+    offHoldToolbar = gtk_ui_manager_get_widget (ui_manager,
+                     "/ToolbarActions/OffHoldToolbar");
+    transferToolbar = gtk_ui_manager_get_widget (ui_manager,
+                      "/ToolbarActions/TransferToolbar");
+    voicemailAction = gtk_ui_manager_get_action (ui_manager,
+                      "/ToolbarActions/Voicemail");
+    voicemailToolbar = gtk_ui_manager_get_widget (ui_manager,
+                       "/ToolbarActions/VoicemailToolbar");
+    newCallWidget = gtk_ui_manager_get_widget (ui_manager,
+                    "/ToolbarActions/NewCallToolbar");
+    pickUpWidget = gtk_ui_manager_get_widget (ui_manager,
+                   "/ToolbarActions/PickUpToolbar");
+    hangUpWidget = gtk_ui_manager_get_widget (ui_manager,
+                   "/ToolbarActions/HangUpToolbar");
+    recordWidget = gtk_ui_manager_get_widget (ui_manager,
+                   "/ToolbarActions/RecordToolbar");
+    imToolbar = gtk_ui_manager_get_widget (ui_manager,
+                                           "/ToolbarActions/InstantMessagingToolbar");
+    historyButton = gtk_ui_manager_get_widget (ui_manager,
+                    "/ToolbarActions/HistoryToolbar");
+    contactButton = gtk_ui_manager_get_widget (ui_manager,
+                    "/ToolbarActions/AddressbookToolbar");
+
+    // Set the handler ID for the transfer
+    transfertButtonConnId
+    = g_signal_connect (G_OBJECT (transferToolbar), "toggled", G_CALLBACK (call_transfer_cb), NULL);
+    recordButtonConnId
+    = g_signal_connect (G_OBJECT (recordWidget), "toggled", G_CALLBACK (call_record), NULL);
+    active_calltree = current_calls;
+
+    *widget = toolbar;
 }
diff --git a/sflphone-client-gnome/src/widget/gtkscrollbook.c b/sflphone-client-gnome/src/widget/gtkscrollbook.c
index 9e9a9f12fd814720012728bed3a0730cb10e8c6f..18023bb6e1350d1e1379cb560a97f044696a5ddf 100644
--- a/sflphone-client-gnome/src/widget/gtkscrollbook.c
+++ b/sflphone-client-gnome/src/widget/gtkscrollbook.c
@@ -30,287 +30,293 @@
 static void pidgin_scroll_book_init (PidginScrollBook *scroll_book);
 static void pidgin_scroll_book_class_init (PidginScrollBookClass *klass);
 static void pidgin_scroll_book_forall (GtkContainer *c,
-					 gboolean include_internals,
-					 GtkCallback callback,
-					 gpointer user_data);
+                                       gboolean include_internals,
+                                       GtkCallback callback,
+                                       gpointer user_data);
 
 GType
 pidgin_scroll_book_get_type (void)
 {
-	static GType scroll_book_type = 0;
-
-	if (!scroll_book_type)
-	{
-		static const GTypeInfo scroll_book_info =
-		{
-			sizeof (PidginScrollBookClass),
-			NULL, /* base_init */
-			NULL, /* base_finalize */
-			(GClassInitFunc) pidgin_scroll_book_class_init,
-			NULL, /* class_finalize */
-			NULL, /* class_data */
-			sizeof (PidginScrollBook),
-			0,
-			(GInstanceInitFunc) pidgin_scroll_book_init,
-			NULL  /* value_table */
-		};
-
-		scroll_book_type = g_type_register_static(GTK_TYPE_VBOX,
-							 "PidginScrollBook",
-							 &scroll_book_info,
-							 0);
-	}
-
-	return scroll_book_type;
+    static GType scroll_book_type = 0;
+
+    if (!scroll_book_type) {
+        static const GTypeInfo scroll_book_info = {
+            sizeof (PidginScrollBookClass),
+            NULL, /* base_init */
+            NULL, /* base_finalize */
+            (GClassInitFunc) pidgin_scroll_book_class_init,
+            NULL, /* class_finalize */
+            NULL, /* class_data */
+            sizeof (PidginScrollBook),
+            0,
+            (GInstanceInitFunc) pidgin_scroll_book_init,
+            NULL  /* value_table */
+        };
+
+        scroll_book_type = g_type_register_static (GTK_TYPE_VBOX,
+                           "PidginScrollBook",
+                           &scroll_book_info,
+                           0);
+    }
+
+    return scroll_book_type;
 }
 
 static gboolean
-scroll_left_cb(PidginScrollBook *scroll_book)
+scroll_left_cb (PidginScrollBook *scroll_book)
 {
-	int index;
-	index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook));
+    int index;
+    index = gtk_notebook_get_current_page (GTK_NOTEBOOK (scroll_book->notebook));
 
-	if (index > 0)
-		gtk_notebook_set_current_page(GTK_NOTEBOOK(scroll_book->notebook), index - 1);
-	return TRUE;
+    if (index > 0)
+        gtk_notebook_set_current_page (GTK_NOTEBOOK (scroll_book->notebook), index - 1);
+
+    return TRUE;
 }
 
 static gboolean
-scroll_right_cb(PidginScrollBook *scroll_book)
+scroll_right_cb (PidginScrollBook *scroll_book)
 {
-	int index, count;
-	index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook));
+    int index, count;
+    index = gtk_notebook_get_current_page (GTK_NOTEBOOK (scroll_book->notebook));
 #if GTK_CHECK_VERSION(2,2,0)
-	count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook));
+    count = gtk_notebook_get_n_pages (GTK_NOTEBOOK (scroll_book->notebook));
 #else
-	count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children);
+    count = g_list_length (GTK_NOTEBOOK (scroll_book->notebook)->children);
 #endif
 
-	if (index + 1 < count)
-		gtk_notebook_set_current_page(GTK_NOTEBOOK(scroll_book->notebook), index + 1);
-	return TRUE;
+    if (index + 1 < count)
+        gtk_notebook_set_current_page (GTK_NOTEBOOK (scroll_book->notebook), index + 1);
+
+    return TRUE;
 }
 
 static void
-refresh_scroll_box(PidginScrollBook *scroll_book, int index, int count)
+refresh_scroll_box (PidginScrollBook *scroll_book, int index, int count)
 {
-	char *label;
-
-	gtk_widget_show_all(GTK_WIDGET(scroll_book));
-	if (count < 1)
-		gtk_widget_hide_all(scroll_book->hbox);
-	else {
-		gtk_widget_show_all(scroll_book->hbox);
-		if (count == 1) {
-			gtk_widget_hide(scroll_book->label);
-			gtk_widget_hide(scroll_book->left_arrow);
-			gtk_widget_hide(scroll_book->right_arrow);
-		}
-	}
-
-	label = g_strdup_printf("<span size='smaller' weight='bold'>(%d/%d)</span>", index+1, count);
-	gtk_label_set_markup(GTK_LABEL(scroll_book->label), label);
-	g_free(label);
-
-	if (index == 0)
-		gtk_widget_set_sensitive(scroll_book->left_arrow, FALSE);
-	else
-		gtk_widget_set_sensitive(scroll_book->left_arrow, TRUE);
-
-
-	if (index + 1 == count)
-		gtk_widget_set_sensitive(scroll_book->right_arrow, FALSE);
-	else
-		gtk_widget_set_sensitive(scroll_book->right_arrow, TRUE);
+    char *label;
+
+    gtk_widget_show_all (GTK_WIDGET (scroll_book));
+
+    if (count < 1)
+        gtk_widget_hide_all (scroll_book->hbox);
+    else {
+        gtk_widget_show_all (scroll_book->hbox);
+
+        if (count == 1) {
+            gtk_widget_hide (scroll_book->label);
+            gtk_widget_hide (scroll_book->left_arrow);
+            gtk_widget_hide (scroll_book->right_arrow);
+        }
+    }
+
+    label = g_strdup_printf ("<span size='smaller' weight='bold'>(%d/%d)</span>", index+1, count);
+    gtk_label_set_markup (GTK_LABEL (scroll_book->label), label);
+    g_free (label);
+
+    if (index == 0)
+        gtk_widget_set_sensitive (scroll_book->left_arrow, FALSE);
+    else
+        gtk_widget_set_sensitive (scroll_book->left_arrow, TRUE);
+
+
+    if (index + 1 == count)
+        gtk_widget_set_sensitive (scroll_book->right_arrow, FALSE);
+    else
+        gtk_widget_set_sensitive (scroll_book->right_arrow, TRUE);
 }
 
 
 static void
-page_count_change_cb(PidginScrollBook *scroll_book)
+page_count_change_cb (PidginScrollBook *scroll_book)
 {
-	int count;
-	int index = gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook));
+    int count;
+    int index = gtk_notebook_get_current_page (GTK_NOTEBOOK (scroll_book->notebook));
 #if GTK_CHECK_VERSION(2,2,0)
-	count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook));
+    count = gtk_notebook_get_n_pages (GTK_NOTEBOOK (scroll_book->notebook));
 #else
-	count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children);
+    count = g_list_length (GTK_NOTEBOOK (scroll_book->notebook)->children);
 #endif
-	refresh_scroll_box(scroll_book, index, count);
+    refresh_scroll_box (scroll_book, index, count);
 }
 
 static gboolean
-scroll_close_cb(PidginScrollBook *scroll_book)
+scroll_close_cb (PidginScrollBook *scroll_book)
 {
-	gtk_widget_destroy(gtk_notebook_get_nth_page(GTK_NOTEBOOK(scroll_book->notebook), gtk_notebook_get_current_page(GTK_NOTEBOOK(scroll_book->notebook))));
-	return FALSE;
+    gtk_widget_destroy (gtk_notebook_get_nth_page (GTK_NOTEBOOK (scroll_book->notebook), gtk_notebook_get_current_page (GTK_NOTEBOOK (scroll_book->notebook))));
+    return FALSE;
 }
 
 static void
-switch_page_cb(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, PidginScrollBook *scroll_book)
+switch_page_cb (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, PidginScrollBook *scroll_book)
 {
-	int count;
+    int count;
 #if GTK_CHECK_VERSION(2,2,0)
-	count = gtk_notebook_get_n_pages(GTK_NOTEBOOK(scroll_book->notebook));
+    count = gtk_notebook_get_n_pages (GTK_NOTEBOOK (scroll_book->notebook));
 #else
-	count = g_list_length(GTK_NOTEBOOK(scroll_book->notebook)->children);
+    count = g_list_length (GTK_NOTEBOOK (scroll_book->notebook)->children);
 #endif
-	refresh_scroll_box(scroll_book, page_num, count);
+    refresh_scroll_box (scroll_book, page_num, count);
 }
 
 static void
-pidgin_scroll_book_add(GtkContainer *container, GtkWidget *widget)
+pidgin_scroll_book_add (GtkContainer *container, GtkWidget *widget)
 {
-	PidginScrollBook *scroll_book;
+    PidginScrollBook *scroll_book;
 
-	g_return_if_fail(GTK_IS_WIDGET (widget));
-	g_return_if_fail (widget->parent == NULL);
+    g_return_if_fail (GTK_IS_WIDGET (widget));
+    g_return_if_fail (widget->parent == NULL);
 
-	scroll_book = PIDGIN_SCROLL_BOOK(container);
-	scroll_book->children = g_list_append(scroll_book->children, widget);
-	gtk_widget_show(widget);
-	gtk_notebook_append_page(GTK_NOTEBOOK(scroll_book->notebook), widget, NULL);
-	page_count_change_cb(PIDGIN_SCROLL_BOOK(container));
+    scroll_book = PIDGIN_SCROLL_BOOK (container);
+    scroll_book->children = g_list_append (scroll_book->children, widget);
+    gtk_widget_show (widget);
+    gtk_notebook_append_page (GTK_NOTEBOOK (scroll_book->notebook), widget, NULL);
+    page_count_change_cb (PIDGIN_SCROLL_BOOK (container));
 }
 
 static void
-pidgin_scroll_book_remove(GtkContainer *container, GtkWidget *widget)
+pidgin_scroll_book_remove (GtkContainer *container, GtkWidget *widget)
 {
-	int page;
-	PidginScrollBook *scroll_book;
-	g_return_if_fail(GTK_IS_WIDGET(widget));
-
-	scroll_book = PIDGIN_SCROLL_BOOK(container);
-	scroll_book->children = g_list_remove(scroll_book->children, widget);
-	/* gtk_widget_unparent(widget); */
-
-	page = gtk_notebook_page_num(GTK_NOTEBOOK(PIDGIN_SCROLL_BOOK(container)->notebook), widget);
-	if (page >= 0) {
-		gtk_notebook_remove_page(GTK_NOTEBOOK(PIDGIN_SCROLL_BOOK(container)->notebook), page);
-	}
+    int page;
+    PidginScrollBook *scroll_book;
+    g_return_if_fail (GTK_IS_WIDGET (widget));
+
+    scroll_book = PIDGIN_SCROLL_BOOK (container);
+    scroll_book->children = g_list_remove (scroll_book->children, widget);
+    /* gtk_widget_unparent(widget); */
+
+    page = gtk_notebook_page_num (GTK_NOTEBOOK (PIDGIN_SCROLL_BOOK (container)->notebook), widget);
+
+    if (page >= 0) {
+        gtk_notebook_remove_page (GTK_NOTEBOOK (PIDGIN_SCROLL_BOOK (container)->notebook), page);
+    }
 }
 
 static void
-pidgin_scroll_book_forall(GtkContainer *container,
-			   gboolean include_internals,
-			   GtkCallback callback,
-			   gpointer callback_data)
+pidgin_scroll_book_forall (GtkContainer *container,
+                           gboolean include_internals,
+                           GtkCallback callback,
+                           gpointer callback_data)
 {
 #if 0
-	GList *children;
+    GList *children;
 #endif
-	PidginScrollBook *scroll_book;
+    PidginScrollBook *scroll_book;
 
-	g_return_if_fail(GTK_IS_CONTAINER(container));
+    g_return_if_fail (GTK_IS_CONTAINER (container));
 
-	scroll_book = PIDGIN_SCROLL_BOOK(container);
+    scroll_book = PIDGIN_SCROLL_BOOK (container);
 
-	if (include_internals) {
-		(*callback)(scroll_book->hbox, callback_data);
-		(*callback)(scroll_book->notebook, callback_data);
-	}
+    if (include_internals) {
+        (*callback) (scroll_book->hbox, callback_data);
+        (*callback) (scroll_book->notebook, callback_data);
+    }
 
 #if 0
-	children = scroll_book->children;
-
-	while (children) {
-		GtkWidget *child;
-		child = children->data;
-		children = children->next;
-		(*callback)(child, callback_data);
-	}
+    children = scroll_book->children;
+
+    while (children) {
+        GtkWidget *child;
+        child = children->data;
+        children = children->next;
+        (*callback) (child, callback_data);
+    }
+
 #endif
 }
 
 static void
 pidgin_scroll_book_class_init (PidginScrollBookClass *klass)
 {
-	GtkContainerClass *container_class = (GtkContainerClass*)klass;
+    GtkContainerClass *container_class = (GtkContainerClass*) klass;
 
-	container_class->add = pidgin_scroll_book_add;
-	container_class->remove = pidgin_scroll_book_remove;
-	container_class->forall = pidgin_scroll_book_forall;
+    container_class->add = pidgin_scroll_book_add;
+    container_class->remove = pidgin_scroll_book_remove;
+    container_class->forall = pidgin_scroll_book_forall;
 }
 
 static gboolean
-close_button_left_cb(GtkWidget *widget, GdkEventCrossing *event, GtkLabel *label)
+close_button_left_cb (GtkWidget *widget, GdkEventCrossing *event, GtkLabel *label)
 {
-	static GdkCursor *ptr = NULL;
-	if (ptr == NULL) {
-		ptr = gdk_cursor_new(GDK_LEFT_PTR);
-	}
-
-	gtk_label_set_markup(label, "×");
-	gdk_window_set_cursor(event->window, ptr);
-	return FALSE;
+    static GdkCursor *ptr = NULL;
+
+    if (ptr == NULL) {
+        ptr = gdk_cursor_new (GDK_LEFT_PTR);
+    }
+
+    gtk_label_set_markup (label, "×");
+    gdk_window_set_cursor (event->window, ptr);
+    return FALSE;
 }
 
 static gboolean
-close_button_entered_cb(GtkWidget *widget, GdkEventCrossing *event, GtkLabel *label)
+close_button_entered_cb (GtkWidget *widget, GdkEventCrossing *event, GtkLabel *label)
 {
-	static GdkCursor *hand = NULL;
-	if (hand == NULL) {
-		hand = gdk_cursor_new(GDK_HAND2);
-	}
-
-	gtk_label_set_markup(label, "<u>×</u>");
-	gdk_window_set_cursor(event->window, hand);
-	return FALSE;
+    static GdkCursor *hand = NULL;
+
+    if (hand == NULL) {
+        hand = gdk_cursor_new (GDK_HAND2);
+    }
+
+    gtk_label_set_markup (label, "<u>×</u>");
+    gdk_window_set_cursor (event->window, hand);
+    return FALSE;
 }
 
 static void
 pidgin_scroll_book_init (PidginScrollBook *scroll_book)
 {
-	GtkWidget *eb;
-	GtkWidget *close_button;
+    GtkWidget *eb;
+    GtkWidget *close_button;
 
-	scroll_book->hbox = gtk_hbox_new(FALSE, 0);
+    scroll_book->hbox = gtk_hbox_new (FALSE, 0);
 
-	/* Close */
-	eb = gtk_event_box_new();
-	gtk_box_pack_end(GTK_BOX(scroll_book->hbox), eb, FALSE, FALSE, 0);
+    /* Close */
+    eb = gtk_event_box_new();
+    gtk_box_pack_end (GTK_BOX (scroll_book->hbox), eb, FALSE, FALSE, 0);
 #if GTK_CHECK_VERSION(2,4,0)
-	gtk_event_box_set_visible_window(GTK_EVENT_BOX(eb), FALSE);
+    gtk_event_box_set_visible_window (GTK_EVENT_BOX (eb), FALSE);
 #endif
-	gtk_widget_set_events(eb, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
-	close_button = gtk_label_new("×");
-	g_signal_connect(G_OBJECT(eb), "enter-notify-event", G_CALLBACK(close_button_entered_cb), close_button);
-	g_signal_connect(G_OBJECT(eb), "leave-notify-event", G_CALLBACK(close_button_left_cb), close_button);
-	gtk_container_add(GTK_CONTAINER(eb), close_button);
-	g_signal_connect_swapped(G_OBJECT(eb), "button-press-event", G_CALLBACK(scroll_close_cb), scroll_book);
-
-	/* Right arrow */
-	eb = gtk_event_box_new();
-	gtk_box_pack_end(GTK_BOX(scroll_book->hbox), eb, FALSE, FALSE, 0);
-	scroll_book->right_arrow = gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
-	gtk_container_add(GTK_CONTAINER(eb), scroll_book->right_arrow);
-	g_signal_connect_swapped(G_OBJECT(eb), "button-press-event", G_CALLBACK(scroll_right_cb), scroll_book);
-
-	/* Count */
-	scroll_book->label = gtk_label_new(NULL);
-	gtk_box_pack_end(GTK_BOX(scroll_book->hbox), scroll_book->label, FALSE, FALSE, 0);
-
-	/* Left arrow */
-	eb = gtk_event_box_new();
-	gtk_box_pack_end(GTK_BOX(scroll_book->hbox), eb, FALSE, FALSE, 0);
-	scroll_book->left_arrow = gtk_arrow_new(GTK_ARROW_LEFT, GTK_SHADOW_NONE);
-	gtk_container_add(GTK_CONTAINER(eb), scroll_book->left_arrow);
-	g_signal_connect_swapped(G_OBJECT(eb), "button-press-event", G_CALLBACK(scroll_left_cb), scroll_book);
-
-	gtk_box_pack_start(GTK_BOX(scroll_book), scroll_book->hbox, FALSE, FALSE, 0);
-
-	scroll_book->notebook = gtk_notebook_new();
-	gtk_notebook_set_show_tabs(GTK_NOTEBOOK(scroll_book->notebook), FALSE);
-	gtk_notebook_set_show_border(GTK_NOTEBOOK(scroll_book->notebook), FALSE);
-
-	gtk_box_pack_start(GTK_BOX(scroll_book), scroll_book->notebook, TRUE, TRUE, 0);
-
-	g_signal_connect_swapped(G_OBJECT(scroll_book->notebook), "remove", G_CALLBACK(page_count_change_cb), scroll_book);
-	g_signal_connect(G_OBJECT(scroll_book->notebook), "switch-page", G_CALLBACK(switch_page_cb), scroll_book);
-	gtk_widget_show_all(scroll_book->notebook);
+    gtk_widget_set_events (eb, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
+    close_button = gtk_label_new ("×");
+    g_signal_connect (G_OBJECT (eb), "enter-notify-event", G_CALLBACK (close_button_entered_cb), close_button);
+    g_signal_connect (G_OBJECT (eb), "leave-notify-event", G_CALLBACK (close_button_left_cb), close_button);
+    gtk_container_add (GTK_CONTAINER (eb), close_button);
+    g_signal_connect_swapped (G_OBJECT (eb), "button-press-event", G_CALLBACK (scroll_close_cb), scroll_book);
+
+    /* Right arrow */
+    eb = gtk_event_box_new();
+    gtk_box_pack_end (GTK_BOX (scroll_book->hbox), eb, FALSE, FALSE, 0);
+    scroll_book->right_arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
+    gtk_container_add (GTK_CONTAINER (eb), scroll_book->right_arrow);
+    g_signal_connect_swapped (G_OBJECT (eb), "button-press-event", G_CALLBACK (scroll_right_cb), scroll_book);
+
+    /* Count */
+    scroll_book->label = gtk_label_new (NULL);
+    gtk_box_pack_end (GTK_BOX (scroll_book->hbox), scroll_book->label, FALSE, FALSE, 0);
+
+    /* Left arrow */
+    eb = gtk_event_box_new();
+    gtk_box_pack_end (GTK_BOX (scroll_book->hbox), eb, FALSE, FALSE, 0);
+    scroll_book->left_arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
+    gtk_container_add (GTK_CONTAINER (eb), scroll_book->left_arrow);
+    g_signal_connect_swapped (G_OBJECT (eb), "button-press-event", G_CALLBACK (scroll_left_cb), scroll_book);
+
+    gtk_box_pack_start (GTK_BOX (scroll_book), scroll_book->hbox, FALSE, FALSE, 0);
+
+    scroll_book->notebook = gtk_notebook_new();
+    gtk_notebook_set_show_tabs (GTK_NOTEBOOK (scroll_book->notebook), FALSE);
+    gtk_notebook_set_show_border (GTK_NOTEBOOK (scroll_book->notebook), FALSE);
+
+    gtk_box_pack_start (GTK_BOX (scroll_book), scroll_book->notebook, TRUE, TRUE, 0);
+
+    g_signal_connect_swapped (G_OBJECT (scroll_book->notebook), "remove", G_CALLBACK (page_count_change_cb), scroll_book);
+    g_signal_connect (G_OBJECT (scroll_book->notebook), "switch-page", G_CALLBACK (switch_page_cb), scroll_book);
+    gtk_widget_show_all (scroll_book->notebook);
 }
 
 GtkWidget *
 pidgin_scroll_book_new()
 {
-	return g_object_new(PIDGIN_TYPE_SCROLL_BOOK, NULL);
+    return g_object_new (PIDGIN_TYPE_SCROLL_BOOK, NULL);
 }
diff --git a/sflphone-client-gnome/src/widget/gtkscrollbook.h b/sflphone-client-gnome/src/widget/gtkscrollbook.h
index 859488c14510f4487fe64296ce5301b516cf9536..a012f7825923bb04a5ccf5a8e39eebfac2729627 100644
--- a/sflphone-client-gnome/src/widget/gtkscrollbook.h
+++ b/sflphone-client-gnome/src/widget/gtkscrollbook.h
@@ -41,39 +41,37 @@ G_BEGIN_DECLS
 typedef struct _PidginScrollBook      PidginScrollBook;
 typedef struct _PidginScrollBookClass PidginScrollBookClass;
 
-struct _PidginScrollBook
-{
-	GtkVBox parent_instance;
-
-	GtkWidget *notebook;
-	GtkWidget *hbox;
-	GtkWidget *label;
-	GtkWidget *left_arrow;
-	GtkWidget *right_arrow;
-	GList *children;
-	
-	/* Padding for future expansion */
-	void (*_gtk_reserved1) (void);
-	void (*_gtk_reserved2) (void);
-	void (*_gtk_reserved3) (void);
+struct _PidginScrollBook {
+    GtkVBox parent_instance;
+
+    GtkWidget *notebook;
+    GtkWidget *hbox;
+    GtkWidget *label;
+    GtkWidget *left_arrow;
+    GtkWidget *right_arrow;
+    GList *children;
+
+    /* Padding for future expansion */
+    void (*_gtk_reserved1) (void);
+    void (*_gtk_reserved2) (void);
+    void (*_gtk_reserved3) (void);
 
 };
 
 
-struct _PidginScrollBookClass
-{
-	GtkContainerClass parent_class;
+struct _PidginScrollBookClass {
+    GtkContainerClass parent_class;
 
-	/* Padding for future expansion */
-	void (*_gtk_reserved0) (void);
-	void (*_gtk_reserved1) (void);
-	void (*_gtk_reserved2) (void);
-	void (*_gtk_reserved3) (void);
+    /* Padding for future expansion */
+    void (*_gtk_reserved0) (void);
+    void (*_gtk_reserved1) (void);
+    void (*_gtk_reserved2) (void);
+    void (*_gtk_reserved3) (void);
 };
 
 
-GType         pidgin_scroll_book_get_type         (void) G_GNUC_CONST;
-GtkWidget    *pidgin_scroll_book_new              (void);
+GType         pidgin_scroll_book_get_type (void) G_GNUC_CONST;
+GtkWidget    *pidgin_scroll_book_new (void);
 
 G_END_DECLS
 
diff --git a/sflphone-client-gnome/src/widget/imwidget.c b/sflphone-client-gnome/src/widget/imwidget.c
index 1d39a4d46e39d10570ed8b3b59fe6bb139432b38..49041dbb8c9197a80c4b0a8819ac226648f10fb5 100644
--- a/sflphone-client-gnome/src/widget/imwidget.c
+++ b/sflphone-client-gnome/src/widget/imwidget.c
@@ -35,321 +35,319 @@
 
 #define WEBKIT_DIR "file://" DATA_DIR "/webkit/"
 
-	void
+void
 im_widget_add_message (IMWidget *im, const gchar *from, const gchar *message, gint level)
 {
-	if (im) {
+    if (im) {
 
-		/* Compute the date the message was sent */
-		gchar *msgtime = im_widget_add_message_time ();
+        /* Compute the date the message was sent */
+        gchar *msgtime = im_widget_add_message_time ();
 
-		/* Check for the message level */
-		gchar *css_class = (level == MESSAGE_LEVEL_ERROR ) ? "error" : "";
+        /* Check for the message level */
+        gchar *css_class = (level == MESSAGE_LEVEL_ERROR) ? "error" : "";
 
-		/* Prepare and execute the Javascript code */
-		gchar *script = g_strdup_printf("add_message('%s', '%s', '%s', '%s');", message, from, css_class, msgtime);
-		webkit_web_view_execute_script (WEBKIT_WEB_VIEW(im->web_view), script);
+        /* Prepare and execute the Javascript code */
+        gchar *script = g_strdup_printf ("add_message('%s', '%s', '%s', '%s');", message, from, css_class, msgtime);
+        webkit_web_view_execute_script (WEBKIT_WEB_VIEW (im->web_view), script);
 
-		/* Cleanup */
-		g_free(script);
+        /* Cleanup */
+        g_free (script);
 
-	}
+    }
 }
 
 static gboolean
-web_view_nav_requested_cb(
-		WebKitWebView             *web_view,
-		WebKitWebFrame            *frame,
-		WebKitNetworkRequest      *request,
-		WebKitWebNavigationAction *navigation_action,
-		WebKitWebPolicyDecision   *policy_decision,
-		gpointer                   user_data)
+web_view_nav_requested_cb (
+    WebKitWebView             *web_view,
+    WebKitWebFrame            *frame,
+    WebKitNetworkRequest      *request,
+    WebKitWebNavigationAction *navigation_action,
+    WebKitWebPolicyDecision   *policy_decision,
+    gpointer                   user_data)
 {
-	const gchar *uri = webkit_network_request_get_uri(request);
-
-	/* Always allow files we are serving ourselves. */
-	if (!strncmp(uri, WEBKIT_DIR, sizeof(WEBKIT_DIR) - 1)) {
-		webkit_web_policy_decision_use (policy_decision);
-	} else {
-		/* Running a system command to open the URL in the user's default browser */
-		gchar *cmd = g_strdup_printf("x-www-browser %s", uri); 
-		system (cmd);
-		webkit_web_policy_decision_ignore (policy_decision);
-		g_free (cmd);
-	}
-	return TRUE;
+    const gchar *uri = webkit_network_request_get_uri (request);
+
+    /* Always allow files we are serving ourselves. */
+    if (!strncmp (uri, WEBKIT_DIR, sizeof (WEBKIT_DIR) - 1)) {
+        webkit_web_policy_decision_use (policy_decision);
+    } else {
+        /* Running a system command to open the URL in the user's default browser */
+        gchar *cmd = g_strdup_printf ("x-www-browser %s", uri);
+        system (cmd);
+        webkit_web_policy_decision_ignore (policy_decision);
+        g_free (cmd);
+    }
+
+    return TRUE;
 }
 
-	static gboolean 
+static gboolean
 on_Textview_changed (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
 {
 
-	GtkTextIter start, end;
-	/* Get all the text in the buffer */
-	IMWidget *im =  user_data;
-	callable_obj_t *im_widget_call = calllist_get (current_calls, im->call_id);
+    GtkTextIter start, end;
+    /* Get all the text in the buffer */
+    IMWidget *im =  user_data;
+    callable_obj_t *im_widget_call = calllist_get (current_calls, im->call_id);
+
+    /* If the call has been hungup, it is not anymore in the current_calls calltab */
+    if (!im_widget_call) {
+        /* So try the history tab */
+        im_widget_call = calllist_get (history, im->call_id);
+    }
 
-	/* If the call has been hungup, it is not anymore in the current_calls calltab */
-	if (!im_widget_call) 
-	{
-		/* So try the history tab */
-		im_widget_call = calllist_get (history, im->call_id);
-	}
+    /* Fetch the text entered in the GtkTextView */
+    GtkTextBuffer *buffer =  gtk_text_view_get_buffer (GTK_TEXT_VIEW (im->textarea));
 
-	/* Fetch the text entered in the GtkTextView */	
-	GtkTextBuffer *buffer =  gtk_text_view_get_buffer (GTK_TEXT_VIEW (im->textarea));
+    /* Catch the keyboard events */
+    if (event->type == GDK_KEY_PRESS) {
 
-	/* Catch the keyboard events */
-	if (event->type == GDK_KEY_PRESS){
+        switch (event->keyval) {
+            case GDK_Return:
+            case GDK_KP_Enter:
 
-		switch (event->keyval)
-		{
-			case GDK_Return:
-			case GDK_KP_Enter:
+                /* We want to send the message on pressing ENTER */
+                if (gtk_text_buffer_get_char_count (buffer) != 0) {
+                    /* Fetch the string text */
+                    gtk_text_buffer_get_bounds (GTK_TEXT_BUFFER (buffer), &start, &end);
+                    gchar *message = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
 
-				/* We want to send the message on pressing ENTER */
-				if (gtk_text_buffer_get_char_count (buffer) != 0 )
-				{
-					/* Fetch the string text */
-					gtk_text_buffer_get_bounds (GTK_TEXT_BUFFER (buffer), &start, &end);
-					gchar *message = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
+                    /* Display our own message in the chat window */
+                    im_widget_add_message (im, "Me", message, MESSAGE_LEVEL_NORMAL);
 
-					/* Display our own message in the chat window */
-					im_widget_add_message (im, "Me", message, MESSAGE_LEVEL_NORMAL);
+                    /* Send the message to the peer */
+                    im_widget_send_message (im_widget_call, message);
 
-					/* Send the message to the peer */
-					im_widget_send_message (im_widget_call, message);
+                    /* Empty the buffer */
+                    gtk_text_buffer_delete (GTK_TEXT_BUFFER (buffer), &start, &end);
 
-					/* Empty the buffer */
-					gtk_text_buffer_delete (GTK_TEXT_BUFFER (buffer), &start, &end);	
+                }
 
-				}
-				return TRUE;
-		}
-	}
+                return TRUE;
+        }
+    }
 
-	return FALSE;
+    return FALSE;
 }
 
-	gchar* 
-im_widget_add_message_time () 
+gchar*
+im_widget_add_message_time ()
 {
 
-	time_t now;
-	unsigned char str[100];
+    time_t now;
+    unsigned char str[100];
 
-	/* Compute the current time */
-	(void) time (&now);
-	struct tm* ptr;
-	ptr = localtime (&now);
+    /* Compute the current time */
+    (void) time (&now);
+    struct tm* ptr;
+    ptr = localtime (&now);
 
-	/* Get the time of the message. Format: HH:MM::SS */
-	strftime ((char *)str, 100, "%R", (const struct tm *)ptr);
-	gchar *res = g_strdup (str);
+    /* Get the time of the message. Format: HH:MM::SS */
+    strftime ( (char *) str, 100, "%R", (const struct tm *) ptr);
+    gchar *res = g_strdup (str);
 
-	/* Return the new value */
-	return res;
+    /* Return the new value */
+    return res;
 }
 
-	void 
+void
 im_widget_send_message (callable_obj_t *call, const gchar *message)
 {
 
-	/* First check if the call is in CURRENT state, otherwise it could not be sent */
-	if (call) {
-		if (call->_type == CALL && (call->_state == CALL_STATE_CURRENT || call->_state == CALL_STATE_HOLD))		
-		{
-			/* Ship the message through D-Bus */
-			dbus_send_text_message (call->_callID, message);
-		}
-		else {
-			/* Display an error message */
-			im_widget_add_message (IM_WIDGET (call->_im_widget), "sflphoned", "Oups, something went wrong! Unable to send text messages outside a call.", MESSAGE_LEVEL_ERROR);	
-		}
-	}
+    /* First check if the call is in CURRENT state, otherwise it could not be sent */
+    if (call) {
+        if (call->_type == CALL && (call->_state == CALL_STATE_CURRENT || call->_state == CALL_STATE_HOLD)) {
+            /* Ship the message through D-Bus */
+            dbus_send_text_message (call->_callID, message);
+        } else {
+            /* Display an error message */
+            im_widget_add_message (IM_WIDGET (call->_im_widget), "sflphoned", "Oups, something went wrong! Unable to send text messages outside a call.", MESSAGE_LEVEL_ERROR);
+        }
+    }
 }
 
 
-	static void
-im_widget_class_init(IMWidgetClass *klass)
+static void
+im_widget_class_init (IMWidgetClass *klass)
 {
 }
 
-	static void
+static void
 im_widget_init (IMWidget *im)
 {
 
-	/* A text view to enable users to enter text */
-	im->textarea = gtk_text_view_new ();
-
-	/* The webkit widget to display the message */
-	im->web_view = webkit_web_view_new();
-	GtkWidget *textscrollwin = gtk_scrolled_window_new (NULL, NULL);
-	GtkWidget *webscrollwin = gtk_scrolled_window_new (NULL, NULL);
-	im->info_bar = gtk_info_bar_new ();
-
-	/* A bar with the entry text and the button to send the message */
-	GtkWidget *hbox = gtk_hbox_new (FALSE, 10);
-	gtk_text_view_set_editable(GTK_TEXT_VIEW(im->textarea), TRUE);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(textscrollwin), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(webscrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-	gtk_widget_set_size_request(GTK_WIDGET (textscrollwin), -1, 20);
-	gtk_widget_set_size_request(GTK_WIDGET (im->textarea), -1, 20);
-	gtk_text_view_set_wrap_mode(GTK_WIDGET (im->textarea), GTK_WRAP_WORD);
-	// gtk_container_set_resize_mode(GTK_CONTAINER(im->textarea), GTK_RESIZE_PARENT);
-
-	gtk_container_add (GTK_CONTAINER (textscrollwin), im->textarea);
-	gtk_container_add (GTK_CONTAINER (webscrollwin), im->web_view);
-	gtk_container_add (GTK_CONTAINER (hbox), textscrollwin);
-	gtk_box_pack_start (GTK_BOX(im), im->info_bar, FALSE, FALSE, 2);
-	gtk_box_pack_start (GTK_BOX(im), webscrollwin, TRUE, TRUE, 5);
-	gtk_box_pack_end (GTK_BOX(im), hbox, FALSE, FALSE, 2);
-	g_signal_connect (im->web_view, "navigation-policy-decision-requested", G_CALLBACK (web_view_nav_requested_cb), NULL);
-	g_signal_connect(im->textarea, "key-press-event", G_CALLBACK (on_Textview_changed), im);
-
-	im->web_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW(im->web_view));
-	im->js_context = webkit_web_frame_get_global_context (im->web_frame);
-	im->js_global = JSContextGetGlobalObject (im->js_context);
-	webkit_web_view_load_uri (WEBKIT_WEB_VIEW(im->web_view), "file://" DATA_DIR "/webkit/im/im.html");
+    /* A text view to enable users to enter text */
+    im->textarea = gtk_text_view_new ();
+
+    /* The webkit widget to display the message */
+    im->web_view = webkit_web_view_new();
+    GtkWidget *textscrollwin = gtk_scrolled_window_new (NULL, NULL);
+    GtkWidget *webscrollwin = gtk_scrolled_window_new (NULL, NULL);
+    im->info_bar = gtk_info_bar_new ();
+
+    /* A bar with the entry text and the button to send the message */
+    GtkWidget *hbox = gtk_hbox_new (FALSE, 10);
+    gtk_text_view_set_editable (GTK_TEXT_VIEW (im->textarea), TRUE);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (textscrollwin), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
+    gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (webscrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+    gtk_widget_set_size_request (GTK_WIDGET (textscrollwin), -1, 20);
+    gtk_widget_set_size_request (GTK_WIDGET (im->textarea), -1, 20);
+    gtk_text_view_set_wrap_mode (GTK_WIDGET (im->textarea), GTK_WRAP_WORD);
+    // gtk_container_set_resize_mode(GTK_CONTAINER(im->textarea), GTK_RESIZE_PARENT);
+
+    gtk_container_add (GTK_CONTAINER (textscrollwin), im->textarea);
+    gtk_container_add (GTK_CONTAINER (webscrollwin), im->web_view);
+    gtk_container_add (GTK_CONTAINER (hbox), textscrollwin);
+    gtk_box_pack_start (GTK_BOX (im), im->info_bar, FALSE, FALSE, 2);
+    gtk_box_pack_start (GTK_BOX (im), webscrollwin, TRUE, TRUE, 5);
+    gtk_box_pack_end (GTK_BOX (im), hbox, FALSE, FALSE, 2);
+    g_signal_connect (im->web_view, "navigation-policy-decision-requested", G_CALLBACK (web_view_nav_requested_cb), NULL);
+    g_signal_connect (im->textarea, "key-press-event", G_CALLBACK (on_Textview_changed), im);
+
+    im->web_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (im->web_view));
+    im->js_context = webkit_web_frame_get_global_context (im->web_frame);
+    im->js_global = JSContextGetGlobalObject (im->js_context);
+    webkit_web_view_load_uri (WEBKIT_WEB_VIEW (im->web_view), "file://" DATA_DIR "/webkit/im/im.html");
 }
 
-	GtkWidget *
+GtkWidget *
 im_widget_new()
 {
-	return GTK_WIDGET (g_object_new (IM_WIDGET_TYPE, NULL));
+    return GTK_WIDGET (g_object_new (IM_WIDGET_TYPE, NULL));
 }
 
-	GType
-im_widget_get_type(void)
+GType
+im_widget_get_type (void)
 {
-	static GType im_widget_type = 0;
-
-	if (!im_widget_type) {
-		static const GTypeInfo im_widget_info = {
-			sizeof (IMWidgetClass),
-			NULL, /* base_init */
-			NULL, /* base_finalize */
-			(GClassInitFunc) im_widget_class_init,
-			NULL, /* class_finalize */
-			NULL, /* class_data */
-			sizeof (IMWidget),
-			0,
-			(GInstanceInitFunc) im_widget_init,
-			NULL  /* value_table */
-		};
-
-		im_widget_type = g_type_register_static(
-				GTK_TYPE_VBOX,
-				"IMWidget",
-				&im_widget_info,
-				0);
-	}
-
-	return im_widget_type;
+    static GType im_widget_type = 0;
+
+    if (!im_widget_type) {
+        static const GTypeInfo im_widget_info = {
+            sizeof (IMWidgetClass),
+            NULL, /* base_init */
+            NULL, /* base_finalize */
+            (GClassInitFunc) im_widget_class_init,
+            NULL, /* class_finalize */
+            NULL, /* class_data */
+            sizeof (IMWidget),
+            0,
+            (GInstanceInitFunc) im_widget_init,
+            NULL  /* value_table */
+        };
+
+        im_widget_type = g_type_register_static (
+                             GTK_TYPE_VBOX,
+                             "IMWidget",
+                             &im_widget_info,
+                             0);
+    }
+
+    return im_widget_type;
 }
 
-	void 
-im_widget_display (callable_obj_t **call) 
+void
+im_widget_display (callable_obj_t **call)
 {
 
-	/* Work with a copy of the object */
-	callable_obj_t *tmp = *call;
+    /* Work with a copy of the object */
+    callable_obj_t *tmp = *call;
 
-	/* Use the widget for this specific call, if exists */
-	if (tmp) {
-		IMWidget *im = IM_WIDGET (tmp->_im_widget);
+    /* Use the widget for this specific call, if exists */
+    if (tmp) {
+        IMWidget *im = IM_WIDGET (tmp->_im_widget);
 
-		if (!im) {
-			DEBUG ("creating the im widget for this call\n");
-			/* Create the im object */
-			im = IM_WIDGET (im_widget_new ());
+        if (!im) {
+            DEBUG ("creating the im widget for this call\n");
+            /* Create the im object */
+            im = IM_WIDGET (im_widget_new ());
 
-			/* Keep a reference on this object in the call struct */
-			tmp->_im_widget = im;
-			*call = tmp;	
+            /* Keep a reference on this object in the call struct */
+            tmp->_im_widget = im;
+            *call = tmp;
 
-			/* Update the widget with some useful call information: ie the call ID */
-			im->call_id = tmp->_callID;
+            /* Update the widget with some useful call information: ie the call ID */
+            im->call_id = tmp->_callID;
 
-			/* Create the GtkInfoBar, used to display call information, and status of the IM widget */
-			im_widget_infobar (im);
+            /* Create the GtkInfoBar, used to display call information, and status of the IM widget */
+            im_widget_infobar (im);
 
-			/* Add it to the main instant messaging window */
-			im_window_add (im);
-		}
-		else {
-			DEBUG ("im widget exists for this call\n");
-			im_window_show ();
-		}
-	}
+            /* Add it to the main instant messaging window */
+            im_window_add (im);
+        } else {
+            DEBUG ("im widget exists for this call\n");
+            im_window_show ();
+        }
+    }
 }
 
-	void
-im_widget_infobar (IMWidget *im) 
+void
+im_widget_infobar (IMWidget *im)
 {
 
-	/* Fetch the GTKInfoBar of this very IM Widget */
-	GtkWidget *infobar = im->info_bar;
-	GtkWidget *content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar));
+    /* Fetch the GTKInfoBar of this very IM Widget */
+    GtkWidget *infobar = im->info_bar;
+    GtkWidget *content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar));
 
-	/* Fetch call information */
-	callable_obj_t *im_widget_call = calllist_get (current_calls, im->call_id);
+    /* Fetch call information */
+    callable_obj_t *im_widget_call = calllist_get (current_calls, im->call_id);
 
-	/* Create the label widgets with the call information saved in the IM Widget struct */
-	gchar *msg1 = g_strdup_printf ("Calling %s  %s", im_widget_call->_peer_number, im_widget_call->_peer_name);
-	GtkWidget *call_label = gtk_label_new (msg1);
-	im->info_state = call_state_image_widget (im_widget_call->_state);
-	/* Add a nice icon from our own icon factory */
-	GtkWidget *logoUser = gtk_image_new_from_stock (GTK_STOCK_USER, GTK_ICON_SIZE_LARGE_TOOLBAR);
+    /* Create the label widgets with the call information saved in the IM Widget struct */
+    gchar *msg1 = g_strdup_printf ("Calling %s  %s", im_widget_call->_peer_number, im_widget_call->_peer_name);
+    GtkWidget *call_label = gtk_label_new (msg1);
+    im->info_state = call_state_image_widget (im_widget_call->_state);
+    /* Add a nice icon from our own icon factory */
+    GtkWidget *logoUser = gtk_image_new_from_stock (GTK_STOCK_USER, GTK_ICON_SIZE_LARGE_TOOLBAR);
 
-	/* Pack it all */
-	gtk_container_add (GTK_CONTAINER (content_area), logoUser);
-	gtk_container_add (GTK_CONTAINER (content_area), call_label);
-	gtk_container_add (GTK_CONTAINER (content_area), im->info_state);
+    /* Pack it all */
+    gtk_container_add (GTK_CONTAINER (content_area), logoUser);
+    gtk_container_add (GTK_CONTAINER (content_area), call_label);
+    gtk_container_add (GTK_CONTAINER (content_area), im->info_state);
 
-	/* Message level by default: INFO */
-	gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), GTK_MESSAGE_INFO);
+    /* Message level by default: INFO */
+    gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), GTK_MESSAGE_INFO);
 
-	/* Show the info bar */
-	gtk_widget_show (infobar);
+    /* Show the info bar */
+    gtk_widget_show (infobar);
 
-	/* Clean up */
-	free (msg1);
+    /* Clean up */
+    free (msg1);
 }
 
 GtkWidget*
-call_state_image_widget (call_state_t state) {
+call_state_image_widget (call_state_t state)
+{
+
+    GtkWidget *image;
 
-	GtkWidget *image;
+    switch (state) {
+        case CALL_STATE_CURRENT:
+            image = gtk_image_new_from_stock (GTK_STOCK_IM, GTK_ICON_SIZE_LARGE_TOOLBAR);
+            break;
+        default:
+            image = gtk_image_new_from_stock (GTK_STOCK_FAIL, GTK_ICON_SIZE_LARGE_TOOLBAR);
+            break;
 
-	switch (state) {
-		case CALL_STATE_CURRENT:
-			image = gtk_image_new_from_stock (GTK_STOCK_IM, GTK_ICON_SIZE_LARGE_TOOLBAR);
-			break;
-		default:
-			image = gtk_image_new_from_stock (GTK_STOCK_FAIL, GTK_ICON_SIZE_LARGE_TOOLBAR);
-			break;
+    }
 
-	}
-	return image;
+    return image;
 }
 
-	void
-im_widget_update_state (IMWidget *im, gboolean active) 
+void
+im_widget_update_state (IMWidget *im, gboolean active)
 {
-	/* if active = true, it means that we are the call is in current state, so sflphone can send text messages */
-	if (active) {
-		gtk_widget_set_sensitive (im->info_state, TRUE); 
-		gtk_info_bar_set_message_type (GTK_INFO_BAR (im->info_bar),
-				GTK_MESSAGE_INFO);
-	}
-	/* if active = false, the call is over, we can't send text messages anymore */
-	else {
-		gtk_widget_set_sensitive (im->info_state, FALSE);
-		gtk_info_bar_set_message_type (GTK_INFO_BAR (im->info_bar),
-				GTK_MESSAGE_WARNING);
-		gtk_widget_set_tooltip_text (im->info_state, "Call has terminated");
-	}
+    /* if active = true, it means that we are the call is in current state, so sflphone can send text messages */
+    if (active) {
+        gtk_widget_set_sensitive (im->info_state, TRUE);
+        gtk_info_bar_set_message_type (GTK_INFO_BAR (im->info_bar),
+                                       GTK_MESSAGE_INFO);
+    }
+    /* if active = false, the call is over, we can't send text messages anymore */
+    else {
+        gtk_widget_set_sensitive (im->info_state, FALSE);
+        gtk_info_bar_set_message_type (GTK_INFO_BAR (im->info_bar),
+                                       GTK_MESSAGE_WARNING);
+        gtk_widget_set_tooltip_text (im->info_state, "Call has terminated");
+    }
 }
 
 
diff --git a/sflphone-client-gnome/src/widget/imwidget.h b/sflphone-client-gnome/src/widget/imwidget.h
index f8c1660ffecb653f7375a15021df2da9d732071f..c260190c9201717d58f174a683367c438a748932 100644
--- a/sflphone-client-gnome/src/widget/imwidget.h
+++ b/sflphone-client-gnome/src/widget/imwidget.h
@@ -46,27 +46,27 @@ G_BEGIN_DECLS
 
 #define MESSAGE_LEVEL_NORMAL		0
 #define MESSAGE_LEVEL_WARNING		1
-#define MESSAGE_LEVEL_ERROR			2			
+#define MESSAGE_LEVEL_ERROR			2
 
 typedef struct _IMWidget      IMWidget;
 typedef struct _IMWidgetClass IMWidgetClass;
 
 struct _IMWidget {
-	GtkVBox parent_instance;
-
-	/* Private */
-	GtkWidget *textarea;
-	GtkWidget *web_view;
-	GtkWidget *info_bar;
-	GtkWidget *info_state;
-	gchar *call_id;
-	WebKitWebFrame *web_frame;      // Our web frame
-	JSGlobalContextRef js_context;  // The frame's global JS context
-	JSObjectRef js_global;          // The frame's global context JS object
+    GtkVBox parent_instance;
+
+    /* Private */
+    GtkWidget *textarea;
+    GtkWidget *web_view;
+    GtkWidget *info_bar;
+    GtkWidget *info_state;
+    gchar *call_id;
+    WebKitWebFrame *web_frame;      // Our web frame
+    JSGlobalContextRef js_context;  // The frame's global JS context
+    JSObjectRef js_global;          // The frame's global context JS object
 };
 
 struct _IMWidgetClass {
-	GtkContainerClass parent_class;
+    GtkContainerClass parent_class;
 };
 
 
@@ -76,11 +76,11 @@ struct _IMWidgetClass {
  */
 void im_widget_display (callable_obj_t**);
 
-GType im_widget_get_type(void) G_GNUC_CONST;
-GtkWidget *im_widget_new(void);
+GType im_widget_get_type (void) G_GNUC_CONST;
+GtkWidget *im_widget_new (void);
 
 /*! @function
-@abstract	Add a new message in the webkit view 
+@abstract	Add a new message in the webkit view
 @param		The IMWidget
 @param		The sender of the message
 @param		The message to be send
@@ -94,7 +94,7 @@ gchar* im_widget_add_message_time ();
 
 /*! @function
 @abstract 	Build the GtkInfoBar used to display call information and IM Widget status
-@param		The IM Widget 
+@param		The IM Widget
 */
 void im_widget_infobar (IMWidget *im);
 
diff --git a/sflphone-client-gnome/src/widget/minidialog.c b/sflphone-client-gnome/src/widget/minidialog.c
index 2d2a8d05600229319a74ef9a0421d426cdbe98d1..ad003a5a9a00abef22f03d2b1ba2807cc6d5d2b7 100644
--- a/sflphone-client-gnome/src/widget/minidialog.c
+++ b/sflphone-client-gnome/src/widget/minidialog.c
@@ -32,7 +32,7 @@
 #define HIG_BOX_SPACE 6
 #define LABEL_WIDTH 200
 
-static void     pidgin_mini_dialog_init       (PidginMiniDialog      *self);
+static void     pidgin_mini_dialog_init (PidginMiniDialog      *self);
 static void     pidgin_mini_dialog_class_init (PidginMiniDialogClass *klass);
 
 static gpointer pidgin_mini_dialog_parent_class = NULL;
@@ -40,318 +40,313 @@ static gpointer pidgin_mini_dialog_parent_class = NULL;
 static void
 pidgin_mini_dialog_class_intern_init (gpointer klass)
 {
-	pidgin_mini_dialog_parent_class = g_type_class_peek_parent (klass);
-	pidgin_mini_dialog_class_init ((PidginMiniDialogClass*) klass);
+    pidgin_mini_dialog_parent_class = g_type_class_peek_parent (klass);
+    pidgin_mini_dialog_class_init ( (PidginMiniDialogClass*) klass);
 }
 
 GType
 pidgin_mini_dialog_get_type (void)
 {
-	static GType g_define_type_id = 0;
-	if (g_define_type_id == 0)
-	{
-		static const GTypeInfo g_define_type_info = {
-			sizeof (PidginMiniDialogClass),
-			(GBaseInitFunc) NULL,
-			(GBaseFinalizeFunc) NULL,
-			(GClassInitFunc) pidgin_mini_dialog_class_intern_init,
-			(GClassFinalizeFunc) NULL,
-			NULL,   /* class_data */
-			sizeof (PidginMiniDialog),
-			0,      /* n_preallocs */
-			(GInstanceInitFunc) pidgin_mini_dialog_init,
-			NULL,
-		};
-		g_define_type_id = g_type_register_static (GTK_TYPE_VBOX,
-			"PidginMiniDialog", &g_define_type_info, 0);
-	}
-	return g_define_type_id;
+    static GType g_define_type_id = 0;
+
+    if (g_define_type_id == 0) {
+        static const GTypeInfo g_define_type_info = {
+            sizeof (PidginMiniDialogClass),
+            (GBaseInitFunc) NULL,
+            (GBaseFinalizeFunc) NULL,
+            (GClassInitFunc) pidgin_mini_dialog_class_intern_init,
+            (GClassFinalizeFunc) NULL,
+            NULL,   /* class_data */
+            sizeof (PidginMiniDialog),
+            0,      /* n_preallocs */
+            (GInstanceInitFunc) pidgin_mini_dialog_init,
+            NULL,
+        };
+        g_define_type_id = g_type_register_static (GTK_TYPE_VBOX,
+                           "PidginMiniDialog", &g_define_type_info, 0);
+    }
+
+    return g_define_type_id;
 }
 
-enum
-{
-	PROP_TITLE = 1,
-	PROP_DESCRIPTION,
-	PROP_ICON_NAME,
+enum {
+    PROP_TITLE = 1,
+    PROP_DESCRIPTION,
+    PROP_ICON_NAME,
 
-	LAST_PROPERTY
+    LAST_PROPERTY
 } HazeConnectionProperties;
 
-typedef struct _PidginMiniDialogPrivate
-{
-	GtkImage *icon;
-	GtkBox *title_box;
-	GtkLabel *title;
-	GtkLabel *desc;
-	GtkBox *buttons;
+typedef struct _PidginMiniDialogPrivate {
+    GtkImage *icon;
+    GtkBox *title_box;
+    GtkLabel *title;
+    GtkLabel *desc;
+    GtkBox *buttons;
 
-	guint idle_destroy_cb_id;
+    guint idle_destroy_cb_id;
 } PidginMiniDialogPrivate;
 
 #define PIDGIN_MINI_DIALOG_GET_PRIVATE(dialog) \
 	((PidginMiniDialogPrivate *) ((dialog)->priv))
 
 PidginMiniDialog *
-pidgin_mini_dialog_new(const gchar *title,
-                       const gchar *description,
-                       const gchar *icon_name)
+pidgin_mini_dialog_new (const gchar *title,
+                        const gchar *description,
+                        const gchar *icon_name)
 {
-	PidginMiniDialog *mini_dialog = g_object_new(PIDGIN_TYPE_MINI_DIALOG,
-		"title", title,
-		"description", description,
-		"icon-name", icon_name,
-		NULL);
+    PidginMiniDialog *mini_dialog = g_object_new (PIDGIN_TYPE_MINI_DIALOG,
+                                    "title", title,
+                                    "description", description,
+                                    "icon-name", icon_name,
+                                    NULL);
 
-	return mini_dialog;
+    return mini_dialog;
 }
 
 void
-pidgin_mini_dialog_set_title(PidginMiniDialog *mini_dialog,
-                             const char *title)
+pidgin_mini_dialog_set_title (PidginMiniDialog *mini_dialog,
+                              const char *title)
 {
-	g_object_set(G_OBJECT(mini_dialog), "title", title, NULL);
+    g_object_set (G_OBJECT (mini_dialog), "title", title, NULL);
 }
 
 void
-pidgin_mini_dialog_set_description(PidginMiniDialog *mini_dialog,
-                                   const char *description)
+pidgin_mini_dialog_set_description (PidginMiniDialog *mini_dialog,
+                                    const char *description)
 {
-	g_object_set(G_OBJECT(mini_dialog), "description", description, NULL);
+    g_object_set (G_OBJECT (mini_dialog), "description", description, NULL);
 }
 
 void
-pidgin_mini_dialog_set_icon_name(PidginMiniDialog *mini_dialog,
-                                 const char *icon_name)
+pidgin_mini_dialog_set_icon_name (PidginMiniDialog *mini_dialog,
+                                  const char *icon_name)
 {
-	g_object_set(G_OBJECT(mini_dialog), "icon_name", icon_name, NULL);
+    g_object_set (G_OBJECT (mini_dialog), "icon_name", icon_name, NULL);
 }
 
-struct _mini_dialog_button_clicked_cb_data
-{
-	PidginMiniDialog *mini_dialog;
-	PidginMiniDialogCallback callback;
-	gpointer user_data;
+struct _mini_dialog_button_clicked_cb_data {
+    PidginMiniDialog *mini_dialog;
+    PidginMiniDialogCallback callback;
+    gpointer user_data;
 };
 
 guint
-pidgin_mini_dialog_get_num_children(PidginMiniDialog *mini_dialog)
+pidgin_mini_dialog_get_num_children (PidginMiniDialog *mini_dialog)
 {
-	return g_list_length(mini_dialog->contents->children);
+    return g_list_length (mini_dialog->contents->children);
 }
 
 static gboolean
-idle_destroy_cb(GtkWidget *mini_dialog)
+idle_destroy_cb (GtkWidget *mini_dialog)
 {
-	gtk_widget_destroy(mini_dialog);
-	return FALSE;
+    gtk_widget_destroy (mini_dialog);
+    return FALSE;
 }
 
 static void
-mini_dialog_button_clicked_cb(GtkButton *button,
-                              gpointer user_data)
+mini_dialog_button_clicked_cb (GtkButton *button,
+                               gpointer user_data)
 {
-	struct _mini_dialog_button_clicked_cb_data *data = user_data;
-	PidginMiniDialogPrivate *priv =
-		PIDGIN_MINI_DIALOG_GET_PRIVATE(data->mini_dialog);
+    struct _mini_dialog_button_clicked_cb_data *data = user_data;
+    PidginMiniDialogPrivate *priv =
+        PIDGIN_MINI_DIALOG_GET_PRIVATE (data->mini_dialog);
 
-	/* Set up the destruction callback before calling the clicked callback,
-	 * so that if the mini-dialog gets destroyed during the clicked callback
-	 * the idle_destroy_cb is correctly removed by _finalize.
-	 */
-	priv->idle_destroy_cb_id =
-		g_idle_add((GSourceFunc) idle_destroy_cb, data->mini_dialog);
+    /* Set up the destruction callback before calling the clicked callback,
+     * so that if the mini-dialog gets destroyed during the clicked callback
+     * the idle_destroy_cb is correctly removed by _finalize.
+     */
+    priv->idle_destroy_cb_id =
+        g_idle_add ( (GSourceFunc) idle_destroy_cb, data->mini_dialog);
 
-	if (data->callback != NULL)
-		data->callback(data->mini_dialog, button, data->user_data);
+    if (data->callback != NULL)
+        data->callback (data->mini_dialog, button, data->user_data);
 
 }
 
 static void
-mini_dialog_button_destroy_cb(GtkButton *button,
-                              gpointer user_data)
+mini_dialog_button_destroy_cb (GtkButton *button,
+                               gpointer user_data)
 {
-	struct _mini_dialog_button_clicked_cb_data *data = user_data;
-	g_free(data);
+    struct _mini_dialog_button_clicked_cb_data *data = user_data;
+    g_free (data);
 }
 
 void
-pidgin_mini_dialog_add_button(PidginMiniDialog *self,
-                              const char *text,
-                              PidginMiniDialogCallback clicked_cb,
-                              gpointer user_data)
+pidgin_mini_dialog_add_button (PidginMiniDialog *self,
+                               const char *text,
+                               PidginMiniDialogCallback clicked_cb,
+                               gpointer user_data)
 {
-	PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE(self);
-	struct _mini_dialog_button_clicked_cb_data *callback_data
-		= g_new0(struct _mini_dialog_button_clicked_cb_data, 1);
-	GtkWidget *button = gtk_button_new();
-	GtkWidget *label = gtk_label_new(NULL);
-	char *button_text =
-		g_strdup_printf("<span size=\"smaller\">%s</span>", text);
-
-	gtk_label_set_markup_with_mnemonic(GTK_LABEL(label), button_text);
-	g_free(button_text);
-
-	callback_data->mini_dialog = self;
-	callback_data->callback = clicked_cb;
-	callback_data->user_data = user_data;
-	g_signal_connect(G_OBJECT(button), "clicked",
-		(GCallback) mini_dialog_button_clicked_cb, callback_data);
-	g_signal_connect(G_OBJECT(button), "destroy",
-		(GCallback) mini_dialog_button_destroy_cb, callback_data);
-
-	gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5);
-	gtk_container_add(GTK_CONTAINER(button), label);
-
-	gtk_box_pack_end(GTK_BOX(priv->buttons), button, FALSE, FALSE,
-		0);
-	gtk_widget_show_all(GTK_WIDGET(button));
+    PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE (self);
+    struct _mini_dialog_button_clicked_cb_data *callback_data
+    = g_new0 (struct _mini_dialog_button_clicked_cb_data, 1);
+    GtkWidget *button = gtk_button_new();
+    GtkWidget *label = gtk_label_new (NULL);
+    char *button_text =
+        g_strdup_printf ("<span size=\"smaller\">%s</span>", text);
+
+    gtk_label_set_markup_with_mnemonic (GTK_LABEL (label), button_text);
+    g_free (button_text);
+
+    callback_data->mini_dialog = self;
+    callback_data->callback = clicked_cb;
+    callback_data->user_data = user_data;
+    g_signal_connect (G_OBJECT (button), "clicked",
+                      (GCallback) mini_dialog_button_clicked_cb, callback_data);
+    g_signal_connect (G_OBJECT (button), "destroy",
+                      (GCallback) mini_dialog_button_destroy_cb, callback_data);
+
+    gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
+    gtk_container_add (GTK_CONTAINER (button), label);
+
+    gtk_box_pack_end (GTK_BOX (priv->buttons), button, FALSE, FALSE,
+                      0);
+    gtk_widget_show_all (GTK_WIDGET (button));
 }
 
 static void
-pidgin_mini_dialog_get_property(GObject *object,
-                                guint property_id,
-                                GValue *value,
-                                GParamSpec *pspec)
+pidgin_mini_dialog_get_property (GObject *object,
+                                 guint property_id,
+                                 GValue *value,
+                                 GParamSpec *pspec)
 {
-	PidginMiniDialog *self = PIDGIN_MINI_DIALOG(object);
-	PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE(self);
-
-	switch (property_id) {
-		case PROP_TITLE:
-			g_value_set_string(value, gtk_label_get_text(priv->title));
-			break;
-		case PROP_DESCRIPTION:
-			g_value_set_string(value, gtk_label_get_text(priv->desc));
-			break;
-		case PROP_ICON_NAME:
-		{
-			gchar *icon_name = NULL;
-			GtkIconSize size;
-			gtk_image_get_stock(priv->icon, &icon_name, &size);
-			g_value_set_string(value, icon_name);
-			break;
-		}
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-	}
+    PidginMiniDialog *self = PIDGIN_MINI_DIALOG (object);
+    PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE (self);
+
+    switch (property_id) {
+        case PROP_TITLE:
+            g_value_set_string (value, gtk_label_get_text (priv->title));
+            break;
+        case PROP_DESCRIPTION:
+            g_value_set_string (value, gtk_label_get_text (priv->desc));
+            break;
+        case PROP_ICON_NAME: {
+            gchar *icon_name = NULL;
+            GtkIconSize size;
+            gtk_image_get_stock (priv->icon, &icon_name, &size);
+            g_value_set_string (value, icon_name);
+            break;
+        }
+        default:
+            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
 }
 
 static void
-mini_dialog_set_title(PidginMiniDialog *self,
-                      const char *title)
+mini_dialog_set_title (PidginMiniDialog *self,
+                       const char *title)
 {
-	PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE(self);
+    PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE (self);
 
-	char *title_esc = g_markup_escape_text(title, -1);
-	char *title_markup = g_strdup_printf(
-		"<span weight=\"bold\" size=\"smaller\">%s</span>",
-		title_esc ? title_esc : "");
+    char *title_esc = g_markup_escape_text (title, -1);
+    char *title_markup = g_strdup_printf (
+                             "<span weight=\"bold\" size=\"smaller\">%s</span>",
+                             title_esc ? title_esc : "");
 
-	gtk_label_set_markup(priv->title, title_markup);
+    gtk_label_set_markup (priv->title, title_markup);
 
-	g_free(title_esc);
-	g_free(title_markup);
+    g_free (title_esc);
+    g_free (title_markup);
 }
 
 static void
-mini_dialog_set_description(PidginMiniDialog *self,
-                            const char *description)
+mini_dialog_set_description (PidginMiniDialog *self,
+                             const char *description)
 {
-	PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE(self);
-	if(description)
-	{
-		char *desc_esc = g_markup_escape_text(description, -1);
-		char *desc_markup = g_strdup_printf(
-			"<span size=\"smaller\">%s</span>", desc_esc);
-
-		gtk_label_set_markup(priv->desc, desc_markup);
-
-		g_free(desc_esc);
-		g_free(desc_markup);
-
-		gtk_widget_show(GTK_WIDGET(priv->desc));
-		g_object_set(G_OBJECT(priv->desc), "no-show-all", FALSE, NULL);
-	}
-	else
-	{
-		gtk_label_set_text(priv->desc, NULL);
-		gtk_widget_hide(GTK_WIDGET(priv->desc));
-		/* make calling show_all() on the minidialog not affect desc
-		 * even though it's packed inside it.
-	 	 */
-		g_object_set(G_OBJECT(priv->desc), "no-show-all", TRUE, NULL);
-	}
+    PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE (self);
+
+    if (description) {
+        char *desc_esc = g_markup_escape_text (description, -1);
+        char *desc_markup = g_strdup_printf (
+                                "<span size=\"smaller\">%s</span>", desc_esc);
+
+        gtk_label_set_markup (priv->desc, desc_markup);
+
+        g_free (desc_esc);
+        g_free (desc_markup);
+
+        gtk_widget_show (GTK_WIDGET (priv->desc));
+        g_object_set (G_OBJECT (priv->desc), "no-show-all", FALSE, NULL);
+    } else {
+        gtk_label_set_text (priv->desc, NULL);
+        gtk_widget_hide (GTK_WIDGET (priv->desc));
+        /* make calling show_all() on the minidialog not affect desc
+         * even though it's packed inside it.
+          */
+        g_object_set (G_OBJECT (priv->desc), "no-show-all", TRUE, NULL);
+    }
 }
 
 static void
-pidgin_mini_dialog_set_property(GObject *object,
-                                guint property_id,
-                                const GValue *value,
-                                GParamSpec *pspec)
+pidgin_mini_dialog_set_property (GObject *object,
+                                 guint property_id,
+                                 const GValue *value,
+                                 GParamSpec *pspec)
 {
-	PidginMiniDialog *self = PIDGIN_MINI_DIALOG(object);
-	PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE(self);
-
-	switch (property_id) {
-		case PROP_TITLE:
-			mini_dialog_set_title(self, g_value_get_string(value));
-			break;
-		case PROP_DESCRIPTION:
-			mini_dialog_set_description(self, g_value_get_string(value));
-			break;
-		case PROP_ICON_NAME:
-			gtk_image_set_from_stock(priv->icon, g_value_get_string(value),
-				GTK_ICON_SIZE_BUTTON);
-			break;
-		default:
-			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-	}
+    PidginMiniDialog *self = PIDGIN_MINI_DIALOG (object);
+    PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE (self);
+
+    switch (property_id) {
+        case PROP_TITLE:
+            mini_dialog_set_title (self, g_value_get_string (value));
+            break;
+        case PROP_DESCRIPTION:
+            mini_dialog_set_description (self, g_value_get_string (value));
+            break;
+        case PROP_ICON_NAME:
+            gtk_image_set_from_stock (priv->icon, g_value_get_string (value),
+                                      GTK_ICON_SIZE_BUTTON);
+            break;
+        default:
+            G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+    }
 }
 
 static void
-pidgin_mini_dialog_finalize(GObject *object)
+pidgin_mini_dialog_finalize (GObject *object)
 {
-	PidginMiniDialog *self = PIDGIN_MINI_DIALOG(object);
-	PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE(self);
+    PidginMiniDialog *self = PIDGIN_MINI_DIALOG (object);
+    PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE (self);
 
-	if (priv->idle_destroy_cb_id)
-		g_source_remove(priv->idle_destroy_cb_id);
+    if (priv->idle_destroy_cb_id)
+        g_source_remove (priv->idle_destroy_cb_id);
 
-	g_free(priv);
-	self->priv = NULL;
+    g_free (priv);
+    self->priv = NULL;
 
 
-	G_OBJECT_CLASS (pidgin_mini_dialog_parent_class)->finalize (object);
+    G_OBJECT_CLASS (pidgin_mini_dialog_parent_class)->finalize (object);
 }
 
 static void
-pidgin_mini_dialog_class_init(PidginMiniDialogClass *klass)
+pidgin_mini_dialog_class_init (PidginMiniDialogClass *klass)
 {
-	GObjectClass *object_class = G_OBJECT_CLASS(klass);
-	GParamSpec *param_spec;
-
-	object_class->get_property = pidgin_mini_dialog_get_property;
-	object_class->set_property = pidgin_mini_dialog_set_property;
-	object_class->finalize = pidgin_mini_dialog_finalize;
-
-	param_spec = g_param_spec_string("title", "title",
-		"String specifying the mini-dialog's title", NULL,
-		G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
-		G_PARAM_READWRITE);
-	g_object_class_install_property (object_class, PROP_TITLE, param_spec);
-
-	param_spec = g_param_spec_string("description", "description",
-		"Description text for the mini-dialog, if desired", NULL,
-		G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
-		G_PARAM_READWRITE);
-	g_object_class_install_property (object_class, PROP_DESCRIPTION, param_spec);
-
-	param_spec = g_param_spec_string("icon-name", "icon-name",
-		"String specifying the Gtk stock name of the dialog's icon",
-		NULL,
-		G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
-		G_PARAM_READWRITE);
-	g_object_class_install_property (object_class, PROP_ICON_NAME, param_spec);
+    GObjectClass *object_class = G_OBJECT_CLASS (klass);
+    GParamSpec *param_spec;
+
+    object_class->get_property = pidgin_mini_dialog_get_property;
+    object_class->set_property = pidgin_mini_dialog_set_property;
+    object_class->finalize = pidgin_mini_dialog_finalize;
+
+    param_spec = g_param_spec_string ("title", "title",
+                                      "String specifying the mini-dialog's title", NULL,
+                                      G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
+                                      G_PARAM_READWRITE);
+    g_object_class_install_property (object_class, PROP_TITLE, param_spec);
+
+    param_spec = g_param_spec_string ("description", "description",
+                                      "Description text for the mini-dialog, if desired", NULL,
+                                      G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
+                                      G_PARAM_READWRITE);
+    g_object_class_install_property (object_class, PROP_DESCRIPTION, param_spec);
+
+    param_spec = g_param_spec_string ("icon-name", "icon-name",
+                                      "String specifying the Gtk stock name of the dialog's icon",
+                                      NULL,
+                                      G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB |
+                                      G_PARAM_READWRITE);
+    g_object_class_install_property (object_class, PROP_ICON_NAME, param_spec);
 }
 
 /* 16 is the width of the icon, due to PIDGIN_ICON_SIZE_TANGO_EXTRA_SMALL */
@@ -362,62 +357,62 @@ pidgin_mini_dialog_class_init(PidginMiniDialogClass *klass)
 	(PIDGIN_PREFS_ROOT "/blist/width")
 
 static void
-blist_width_changed_cb(const char *name,
-                       gconstpointer val,
-                       gpointer data)
+blist_width_changed_cb (const char *name,
+                        gconstpointer val,
+                        gpointer data)
 {
-	PidginMiniDialog *self = PIDGIN_MINI_DIALOG(data);
-	PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE(self);
-	guint blist_width = GPOINTER_TO_INT(val);
-	guint label_width = LABEL_WIDTH;
+    PidginMiniDialog *self = PIDGIN_MINI_DIALOG (data);
+    PidginMiniDialogPrivate *priv = PIDGIN_MINI_DIALOG_GET_PRIVATE (self);
+    guint blist_width = GPOINTER_TO_INT (val);
+    guint label_width = LABEL_WIDTH;
 
-	gtk_widget_set_size_request(GTK_WIDGET(priv->title), label_width, -1);
-	gtk_widget_set_size_request(GTK_WIDGET(priv->desc), label_width, -1);
+    gtk_widget_set_size_request (GTK_WIDGET (priv->title), label_width, -1);
+    gtk_widget_set_size_request (GTK_WIDGET (priv->desc), label_width, -1);
 }
 
 static void
-pidgin_mini_dialog_init(PidginMiniDialog *self)
+pidgin_mini_dialog_init (PidginMiniDialog *self)
 {
-	GtkBox *self_box = GTK_BOX(self);
-	guint label_width = LABEL_WIDTH;
+    GtkBox *self_box = GTK_BOX (self);
+    guint label_width = LABEL_WIDTH;
 
-	PidginMiniDialogPrivate *priv = g_new0(PidginMiniDialogPrivate, 1);
-	self->priv = priv;
+    PidginMiniDialogPrivate *priv = g_new0 (PidginMiniDialogPrivate, 1);
+    self->priv = priv;
 
-	gtk_container_set_border_width(GTK_CONTAINER(self), HIG_BOX_SPACE);
+    gtk_container_set_border_width (GTK_CONTAINER (self), HIG_BOX_SPACE);
 
-	priv->title_box = GTK_BOX(gtk_hbox_new(FALSE, HIG_BOX_SPACE));
+    priv->title_box = GTK_BOX (gtk_hbox_new (FALSE, HIG_BOX_SPACE));
 
-	priv->icon = GTK_IMAGE(gtk_image_new());
-	gtk_misc_set_alignment(GTK_MISC(priv->icon), 0, 0);
+    priv->icon = GTK_IMAGE (gtk_image_new());
+    gtk_misc_set_alignment (GTK_MISC (priv->icon), 0, 0);
 
-	priv->title = GTK_LABEL(gtk_label_new(NULL));
-	gtk_widget_set_size_request(GTK_WIDGET(priv->title), label_width, -1);
-	gtk_label_set_line_wrap(priv->title, TRUE);
-	gtk_label_set_selectable(priv->title, TRUE);
-	gtk_misc_set_alignment(GTK_MISC(priv->title), 0, 0);
+    priv->title = GTK_LABEL (gtk_label_new (NULL));
+    gtk_widget_set_size_request (GTK_WIDGET (priv->title), label_width, -1);
+    gtk_label_set_line_wrap (priv->title, TRUE);
+    gtk_label_set_selectable (priv->title, TRUE);
+    gtk_misc_set_alignment (GTK_MISC (priv->title), 0, 0);
 
-	gtk_box_pack_start(priv->title_box, GTK_WIDGET(priv->icon), FALSE, FALSE, 0);
-	gtk_box_pack_start(priv->title_box, GTK_WIDGET(priv->title), TRUE, TRUE, 0);
+    gtk_box_pack_start (priv->title_box, GTK_WIDGET (priv->icon), FALSE, FALSE, 0);
+    gtk_box_pack_start (priv->title_box, GTK_WIDGET (priv->title), TRUE, TRUE, 0);
 
-	priv->desc = GTK_LABEL(gtk_label_new(NULL));
-	gtk_widget_set_size_request(GTK_WIDGET(priv->desc), label_width, -1);
-	gtk_label_set_line_wrap(priv->desc, TRUE);
-	gtk_misc_set_alignment(GTK_MISC(priv->desc), 0, 0);
-	gtk_label_set_selectable(priv->desc, TRUE);
-	/* make calling show_all() on the minidialog not affect desc even though
-	 * it's packed inside it.
-	 */
-	g_object_set(G_OBJECT(priv->desc), "no-show-all", TRUE, NULL);
+    priv->desc = GTK_LABEL (gtk_label_new (NULL));
+    gtk_widget_set_size_request (GTK_WIDGET (priv->desc), label_width, -1);
+    gtk_label_set_line_wrap (priv->desc, TRUE);
+    gtk_misc_set_alignment (GTK_MISC (priv->desc), 0, 0);
+    gtk_label_set_selectable (priv->desc, TRUE);
+    /* make calling show_all() on the minidialog not affect desc even though
+     * it's packed inside it.
+     */
+    g_object_set (G_OBJECT (priv->desc), "no-show-all", TRUE, NULL);
 
-	self->contents = GTK_BOX(gtk_vbox_new(FALSE, 0));
+    self->contents = GTK_BOX (gtk_vbox_new (FALSE, 0));
 
-	priv->buttons = GTK_BOX(gtk_hbox_new(FALSE, 0));
+    priv->buttons = GTK_BOX (gtk_hbox_new (FALSE, 0));
 
-	gtk_box_pack_start(self_box, GTK_WIDGET(priv->title_box), FALSE, FALSE, 0);
-	gtk_box_pack_start(self_box, GTK_WIDGET(priv->desc), FALSE, FALSE, 0);
-	gtk_box_pack_start(self_box, GTK_WIDGET(self->contents), TRUE, TRUE, 0);
-	gtk_box_pack_start(self_box, GTK_WIDGET(priv->buttons), FALSE, FALSE, 0);
+    gtk_box_pack_start (self_box, GTK_WIDGET (priv->title_box), FALSE, FALSE, 0);
+    gtk_box_pack_start (self_box, GTK_WIDGET (priv->desc), FALSE, FALSE, 0);
+    gtk_box_pack_start (self_box, GTK_WIDGET (self->contents), TRUE, TRUE, 0);
+    gtk_box_pack_start (self_box, GTK_WIDGET (priv->buttons), FALSE, FALSE, 0);
 
-	gtk_widget_show_all(GTK_WIDGET(self));
+    gtk_widget_show_all (GTK_WIDGET (self));
 }
diff --git a/sflphone-client-gnome/src/widget/minidialog.h b/sflphone-client-gnome/src/widget/minidialog.h
index 2b5e6a4d1c57b53e7561bd9d00fa19ee8569e3bc..55d83d9c0c93547bd8349b07b1d73f36c7e96ce2 100644
--- a/sflphone-client-gnome/src/widget/minidialog.h
+++ b/sflphone-client-gnome/src/widget/minidialog.h
@@ -77,23 +77,23 @@ G_BEGIN_DECLS
  * </dl>
  */
 typedef struct {
-	GtkVBox parent;
+    GtkVBox parent;
 
-	/** A GtkVBox into which extra widgets for the dialog should be packed.
-	 */
-	GtkBox *contents;
+    /** A GtkVBox into which extra widgets for the dialog should be packed.
+     */
+    GtkBox *contents;
 
-	gpointer priv;
+    gpointer priv;
 } PidginMiniDialog;
 
 /** The class of #PidginMiniDialog objects. */
 typedef struct {
-	GtkBoxClass parent_class;
+    GtkBoxClass parent_class;
 
-	void (*_purple_reserved1) (void);
-	void (*_purple_reserved2) (void);
-	void (*_purple_reserved3) (void);
-	void (*_purple_reserved4) (void);
+    void (*_purple_reserved1) (void);
+    void (*_purple_reserved2) (void);
+    void (*_purple_reserved3) (void);
+    void (*_purple_reserved4) (void);
 } PidginMiniDialogClass;
 
 /** The type of a callback triggered by a button in a mini-dialog being pressed.
@@ -103,8 +103,8 @@ typedef struct {
  *                    pidgin_mini_dialog_add_button() when the button was
  *                    created.
  */
-typedef void (*PidginMiniDialogCallback)(PidginMiniDialog *mini_dialog,
-	GtkButton *button, gpointer user_data);
+typedef void (*PidginMiniDialogCallback) (PidginMiniDialog *mini_dialog,
+        GtkButton *button, gpointer user_data);
 
 /** Get the GType of #PidginMiniDialog. */
 GType pidgin_mini_dialog_get_type (void);
@@ -113,30 +113,30 @@ GType pidgin_mini_dialog_get_type (void);
  *  with @c g_object_new() then setting each property yourself.
  *  @return a new #PidginMiniDialog.
  */
-PidginMiniDialog *pidgin_mini_dialog_new(const gchar *title,
-	const gchar *description, const gchar *icon_name);
+PidginMiniDialog *pidgin_mini_dialog_new (const gchar *title,
+        const gchar *description, const gchar *icon_name);
 
 /** Shortcut for setting a mini-dialog's title via GObject properties.
  *  @param mini_dialog a mini-dialog
  *  @param title       the new title for @a mini_dialog
  */
-void pidgin_mini_dialog_set_title(PidginMiniDialog *mini_dialog,
-	const char *title);
+void pidgin_mini_dialog_set_title (PidginMiniDialog *mini_dialog,
+                                   const char *title);
 
 /** Shortcut for setting a mini-dialog's description via GObject properties.
  *  @param mini_dialog a mini-dialog
  *  @param description the new description for @a mini_dialog, or @c NULL to
  *                     hide the description widget.
  */
-void pidgin_mini_dialog_set_description(PidginMiniDialog *mini_dialog,
-	const char *description);
+void pidgin_mini_dialog_set_description (PidginMiniDialog *mini_dialog,
+        const char *description);
 
 /** Shortcut for setting a mini-dialog's icon via GObject properties.
  *  @param mini_dialog a mini-dialog
  *  @param icon_name   the Gtk stock ID of an icon, or @c NULL for no icon.
  */
-void pidgin_mini_dialog_set_icon_name(PidginMiniDialog *mini_dialog,
-	const char *icon_name);
+void pidgin_mini_dialog_set_icon_name (PidginMiniDialog *mini_dialog,
+                                       const char *icon_name);
 
 /** Adds a new button to a mini-dialog, and attaches the supplied callback to
  *  its <tt>clicked</tt> signal.  After a button is clicked, the dialog is
@@ -147,15 +147,15 @@ void pidgin_mini_dialog_set_icon_name(PidginMiniDialog *mini_dialog,
  *  @param user_data   arbitrary data to pass to @a clicked_cb when it is
  *                     called.
  */
-void pidgin_mini_dialog_add_button(PidginMiniDialog *mini_dialog,
-	const char *text, PidginMiniDialogCallback clicked_cb,
-	gpointer user_data);
+void pidgin_mini_dialog_add_button (PidginMiniDialog *mini_dialog,
+                                    const char *text, PidginMiniDialogCallback clicked_cb,
+                                    gpointer user_data);
 
 /** Gets the number of widgets packed into PidginMiniDialog.contents.
  *  @param mini_dialog a mini-dialog
  *  @return the number of widgets in @a mini_dialog->contents.
  */
-guint pidgin_mini_dialog_get_num_children(PidginMiniDialog *mini_dialog);
+guint pidgin_mini_dialog_get_num_children (PidginMiniDialog *mini_dialog);
 
 G_END_DECLS
 
diff --git a/sflphone-client-gnome/src/widget/webwidget.c b/sflphone-client-gnome/src/widget/webwidget.c
index ae6dbf5fe2a019d02ce64f6b5a84badcebb27b69..e07d2b2f4a02f913c094861833329349ddae7846 100644
--- a/sflphone-client-gnome/src/widget/webwidget.c
+++ b/sflphone-client-gnome/src/widget/webwidget.c
@@ -31,36 +31,36 @@
 #include <JavaScriptCore/JavaScript.h>
 
 
-static void im_widget_init(IMWidget *im);
-static void im_widget_class_init(IMWidgetClass *klass);
+static void im_widget_init (IMWidget *im);
+static void im_widget_class_init (IMWidgetClass *klass);
 
 GType
 im_widget_get_type (void)
 {
-	static GType im_widget_type = 0;
+    static GType im_widget_type = 0;
 
-	if (!im_widget_type) {
-		static const GTypeInfo im_widget_info = {
-			sizeof (IMWidgetClass),
-			NULL, /* base_init */
-			NULL, /* base_finalize */
-			(GClassInitFunc) im_widget_class_init,
-			NULL, /* class_finalize */
-			NULL, /* class_data */
-			sizeof (IMWidget),
-			0,
-			(GInstanceInitFunc) im_widget_init,
-			NULL  /* value_table */
-		};
+    if (!im_widget_type) {
+        static const GTypeInfo im_widget_info = {
+            sizeof (IMWidgetClass),
+            NULL, /* base_init */
+            NULL, /* base_finalize */
+            (GClassInitFunc) im_widget_class_init,
+            NULL, /* class_finalize */
+            NULL, /* class_data */
+            sizeof (IMWidget),
+            0,
+            (GInstanceInitFunc) im_widget_init,
+            NULL  /* value_table */
+        };
 
-		im_widget_type = g_type_register_static(
-			WEBKIT_TYPE_WEB_VIEW,
-			"IMWidget",
-			&im_widget_info,
-			0);
-	}
+        im_widget_type = g_type_register_static (
+                             WEBKIT_TYPE_WEB_VIEW,
+                             "IMWidget",
+                             &im_widget_info,
+                             0);
+    }
 
-	return im_widget_type;
+    return im_widget_type;
 }
 
 static void
@@ -71,17 +71,17 @@ im_widget_class_init (IMWidgetClass *klass)
 static void
 im_widget_init (IMWidget *im)
 {
-	/* Load our initial webpage on startup */
-	webkit_web_view_open(WEBKIT_WEB_VIEW(im), "file://" DATA_DIR "/webkit/im.html");
+    /* Load our initial webpage on startup */
+    webkit_web_view_open (WEBKIT_WEB_VIEW (im), "file://" DATA_DIR "/webkit/im.html");
 
-	/* Instantiate our local webkit related variables */
-	im->web_frame = webkit_web_view_get_main_frame(WEBKIT_WEB_VIEW(im));
-	im->js_context = webkit_web_frame_get_global_context(im->web_frame);
-	im->js_global = JSContextGetGlobalObject(im->js_context);
+    /* Instantiate our local webkit related variables */
+    im->web_frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (im));
+    im->js_context = webkit_web_frame_get_global_context (im->web_frame);
+    im->js_global = JSContextGetGlobalObject (im->js_context);
 }
 
 GtkWidget *
 im_widget_new()
 {
-	return GTK_WIDGET(g_object_new(IM_WIDGET_TYPE, NULL));
+    return GTK_WIDGET (g_object_new (IM_WIDGET_TYPE, NULL));
 }
diff --git a/sflphone-client-gnome/src/widget/webwidget.h b/sflphone-client-gnome/src/widget/webwidget.h
index d6fbb0987c1db5eadf52eaad10c22db4a88058b0..88def03efda834e998b414a2249723f99646f298 100644
--- a/sflphone-client-gnome/src/widget/webwidget.h
+++ b/sflphone-client-gnome/src/widget/webwidget.h
@@ -47,21 +47,21 @@ typedef struct _WebWidget      WebWidget;
 typedef struct _WebWidgetClass WebWidgetClass;
 
 struct _WebWidget {
-	WebKitWebView parent_instance;
+    WebKitWebView parent_instance;
 
-	/* Private */
-	WebKitWebFrame *web_frame;      // Our web frame
-	JSGlobalContextRef js_context;  // The frame's global JS context
-	JSObjectRef js_global;          // The frame's global context JS object
+    /* Private */
+    WebKitWebFrame *web_frame;      // Our web frame
+    JSGlobalContextRef js_context;  // The frame's global JS context
+    JSObjectRef js_global;          // The frame's global context JS object
 };
 
 struct _WebWidgetClass {
-	WebKitWebViewClass parent_class;
+    WebKitWebViewClass parent_class;
 };
 
 
-GType         im_widget_get_type         (void) G_GNUC_CONST;
-GtkWidget    *im_widget_new              (void);
+GType         im_widget_get_type (void) G_GNUC_CONST;
+GtkWidget    *im_widget_new (void);
 
 G_END_DECLS
 
diff --git a/sflphone-common/libs/dbus-c++/src/error.cpp b/sflphone-common/libs/dbus-c++/src/error.cpp
index 89d91d1f39d2d604f6de6313788530b2e5176ca7..5b95d58fa8aa00d37acce238384824b90e052f7b 100644
--- a/sflphone-common/libs/dbus-c++/src/error.cpp
+++ b/sflphone-common/libs/dbus-c++/src/error.cpp
@@ -39,12 +39,10 @@ using namespace DBus;
 */
 
 Error::Error()
-        : _int (new InternalError)
-{}
+        : _int (new InternalError) {}
 
 Error::Error (InternalError &i)
-        : _int (new InternalError (i))
-{}
+        : _int (new InternalError (i)) {}
 
 Error::Error (const char *name, const char *message)
         : _int (new InternalError)
diff --git a/sflphone-common/libs/dbus-c++/src/interface.cpp b/sflphone-common/libs/dbus-c++/src/interface.cpp
index aefcd1dea91bde9fe54765990b219d4e1cde01cd..ca5202f2ffafeb95e07af424b6d984c9ba25278b 100644
--- a/sflphone-common/libs/dbus-c++/src/interface.cpp
+++ b/sflphone-common/libs/dbus-c++/src/interface.cpp
@@ -33,11 +33,9 @@
 using namespace DBus;
 
 Interface::Interface (const std::string &name)
-        : _name (name)
-{}
+        : _name (name) {}
 
-Interface::~Interface()
-{}
+Interface::~Interface() {}
 
 InterfaceAdaptor *AdaptorBase::find_interface (const std::string &name)
 {
diff --git a/sflphone-common/libs/dbus-c++/src/introspection.cpp b/sflphone-common/libs/dbus-c++/src/introspection.cpp
index 41f6439f4aad8eae013e776a3909c96ad95b1c37..666c6e5cc5f0d2891dd4555008547e1f51950429 100644
--- a/sflphone-common/libs/dbus-c++/src/introspection.cpp
+++ b/sflphone-common/libs/dbus-c++/src/introspection.cpp
@@ -169,8 +169,7 @@ IntrospectedInterface *const IntrospectableAdaptor::introspect() const
 }
 
 IntrospectableProxy::IntrospectableProxy()
-        : InterfaceProxy (introspectable_name)
-{}
+        : InterfaceProxy (introspectable_name) {}
 
 std::string IntrospectableProxy::Introspect()
 {
diff --git a/sflphone-common/libs/dbus-c++/src/message.cpp b/sflphone-common/libs/dbus-c++/src/message.cpp
index 4f3425e08dc23c67edac9d849f717d5a2d29ef11..4c1c5e2a7160c85bac2a082b31b2a503b40850f4 100644
--- a/sflphone-common/libs/dbus-c++/src/message.cpp
+++ b/sflphone-common/libs/dbus-c++/src/message.cpp
@@ -538,11 +538,13 @@ bool SignalMessage::operator == (const SignalMessage &m) const
     return dbus_message_is_signal (_pvt->msg, m.interface(), m.member());
 }
 
-const char *SignalMessage::interface() const {
-        return dbus_message_get_interface (_pvt->msg);
-    }
+const char *SignalMessage::interface() const
+{
+    return dbus_message_get_interface (_pvt->msg);
+}
 
-bool SignalMessage::interface (const char *i) {
+bool SignalMessage::interface (const char *i)
+{
     return dbus_message_set_interface (_pvt->msg, i);
 }
 
@@ -591,11 +593,13 @@ bool CallMessage::operator == (const CallMessage &m) const
     return dbus_message_is_method_call (_pvt->msg, m.interface(), m.member());
 }
 
-const char *CallMessage::interface() const {
-        return dbus_message_get_interface (_pvt->msg);
-    }
+const char *CallMessage::interface() const
+{
+    return dbus_message_get_interface (_pvt->msg);
+}
 
-bool CallMessage::interface (const char *i) {
+bool CallMessage::interface (const char *i)
+{
     return dbus_message_set_interface (_pvt->msg, i);
 }
 
diff --git a/sflphone-common/libs/dbus-c++/src/types.cpp b/sflphone-common/libs/dbus-c++/src/types.cpp
index d8100258e69f5251b46f9df4164ff7aaa248f038..e38d01cdb4740f72796e6c61144be7ab3e2094af 100644
--- a/sflphone-common/libs/dbus-c++/src/types.cpp
+++ b/sflphone-common/libs/dbus-c++/src/types.cpp
@@ -37,7 +37,7 @@
 using namespace DBus;
 
 Variant::Variant()
-        : _msg (CallMessage()) // dummy message used as temporary storage for variant data
+        : _msg (CallMessage())   // dummy message used as temporary storage for variant data
 {
 }
 
diff --git a/sflphone-common/libs/dbus-c++/tools/xml2cpp.cpp b/sflphone-common/libs/dbus-c++/tools/xml2cpp.cpp
index 3284d766753fdeb3baa39de951c56df43a88cea4..ecc249c67fb9a052e499b4a8e52c73176242e256 100644
--- a/sflphone-common/libs/dbus-c++/tools/xml2cpp.cpp
+++ b/sflphone-common/libs/dbus-c++/tools/xml2cpp.cpp
@@ -82,11 +82,10 @@ int main (int argc, char ** argv)
         if (!strncmp (argv[a], "--proxy=", 8)) {
             proxy_mode = true;
             proxy = argv[a] +8;
-        } else
-            if (!strncmp (argv[a], "--adaptor=", 10)) {
-                adaptor_mode = true;
-                adaptor = argv[a] +10;
-            }
+        } else if (!strncmp (argv[a], "--adaptor=", 10)) {
+            adaptor_mode = true;
+            adaptor = argv[a] +10;
+        }
     }
 
     if (!proxy_mode && !adaptor_mode) usage (argv[0]);
diff --git a/sflphone-common/libs/pjproject/pjlib-util/include/pjlib-util/config.h b/sflphone-common/libs/pjproject/pjlib-util/include/pjlib-util/config.h
index 7b09e23d4e61573727e72bfcd51748a3ccac2013..cb0f9e7cc309a82018f420ef589fd6ca2026da72 100644
--- a/sflphone-common/libs/pjproject/pjlib-util/include/pjlib-util/config.h
+++ b/sflphone-common/libs/pjproject/pjlib-util/include/pjlib-util/config.h
@@ -1,5 +1,5 @@
 /* $Id: config.h 2394 2008-12-23 17:27:53Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -70,7 +70,7 @@
  * (the #pj_dns_packet_dup() function).
  *
  * Generally name compression is desired, since it saves some memory (see
- * PJ_DNS_RESOLVER_RES_BUF_SIZE setting). However it comes at the expense of 
+ * PJ_DNS_RESOLVER_RES_BUF_SIZE setting). However it comes at the expense of
  * a little processing overhead to perform name scanning and also a little
  * bit more stack usage (8 bytes per entry on 32bit platform).
  *
@@ -95,7 +95,7 @@
 
 
 /**
- * Default retransmission delay, in miliseconds. The combination of 
+ * Default retransmission delay, in miliseconds. The combination of
  * retransmission delay and count determines the query timeout.
  *
  * Default: 2000 (2 seconds, according to RFC 1035)
@@ -117,8 +117,8 @@
 
 
 /**
- * Maximum life-time of DNS response in the resolver response cache, 
- * in seconds. If the value is zero, then DNS response caching will be 
+ * Maximum life-time of DNS response in the resolver response cache,
+ * in seconds. If the value is zero, then DNS response caching will be
  * disabled.
  *
  * Default is 300 seconds (5 minutes).
@@ -131,8 +131,8 @@
 
 /**
  * The life-time of invalid DNS response in the resolver response cache.
- * An invalid DNS response is a response which RCODE is non-zero and 
- * response without any answer section. These responses can be put in 
+ * An invalid DNS response is a response which RCODE is non-zero and
+ * response without any answer section. These responses can be put in
  * the cache too to minimize message round-trip.
  *
  * Default: 60 (one minute).
@@ -144,7 +144,7 @@
 #endif
 
 /**
- * The interval on which nameservers which are known to be good to be 
+ * The interval on which nameservers which are known to be good to be
  * probed again to determine whether they are still good. Note that
  * this applies to both active nameserver (the one currently being used)
  * and idle nameservers (good nameservers that are not currently selected).
diff --git a/sflphone-common/libs/pjproject/pjlib-util/src/pjlib-util/resolver_wrap.cpp b/sflphone-common/libs/pjproject/pjlib-util/src/pjlib-util/resolver_wrap.cpp
index 07fb4468feb6954ec35315577cb42e710a94a303..c09787ab510c25a2b01799a47cd8999f232ccee8 100644
--- a/sflphone-common/libs/pjproject/pjlib-util/src/pjlib-util/resolver_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjlib-util/src/pjlib-util/resolver_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: resolver_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjlib-util/src/pjlib-util/xml_wrap.cpp b/sflphone-common/libs/pjproject/pjlib-util/src/pjlib-util/xml_wrap.cpp
index aa80d827b5d50544f3f4ba622cddd5b76b847d69..556e7dcaf644df504a8a37e0676c50f58e5c5b64 100644
--- a/sflphone-common/libs/pjproject/pjlib-util/src/pjlib-util/xml_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjlib-util/src/pjlib-util/xml_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: xml_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjlib/include/pj/config.h b/sflphone-common/libs/pjproject/pjlib/include/pj/config.h
index ce7a97cc1a6bb99fbc9589a85a8776468967d2f9..09dd3121778438f528b94e77115b7f1f18010c52 100644
--- a/sflphone-common/libs/pjproject/pjlib/include/pj/config.h
+++ b/sflphone-common/libs/pjproject/pjlib/include/pj/config.h
@@ -1,5 +1,5 @@
 /* $Id: config.h 2970 2009-10-26 15:47:52Z nanang $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -60,78 +60,78 @@
  * Include target OS specific configuration.
  */
 #if defined(PJ_AUTOCONF)
-    /*
-     * Autoconf
-     */
+/*
+ * Autoconf
+ */
 #   include <pj/compat/os_auto.h>
 
 #elif defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0
-    /*
-     * SymbianOS
-     */
+/*
+ * SymbianOS
+ */
 #  include <pj/compat/os_symbian.h>
 
 #elif defined(PJ_WIN32_WINCE) || defined(_WIN32_WCE) || defined(UNDER_CE)
-    /*
-     * Windows CE
-     */
+/*
+ * Windows CE
+ */
 #   undef PJ_WIN32_WINCE
 #   define PJ_WIN32_WINCE   1
 #   include <pj/compat/os_win32_wince.h>
 
-    /* Also define Win32 */
+/* Also define Win32 */
 #   define PJ_WIN32 1
 
 #elif defined(PJ_WIN32) || defined(_WIN32) || defined(__WIN32__) || \
 	defined(_WIN64) || defined(WIN32) || defined(__TOS_WIN__)
-    /*
-     * Win32
-     */
+/*
+ * Win32
+ */
 #   undef PJ_WIN32
 #   define PJ_WIN32 1
 #   include <pj/compat/os_win32.h>
 
 #elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL!=0
-    /*
-     * Linux kernel
-     */
+/*
+ * Linux kernel
+ */
 #  include <pj/compat/os_linux_kernel.h>
 
 #elif defined(PJ_LINUX) || defined(linux) || defined(__linux)
-    /*
-     * Linux
-     */
+/*
+ * Linux
+ */
 #   undef PJ_LINUX
 #   define PJ_LINUX	    1
 #   include <pj/compat/os_linux.h>
 
 #elif defined(PJ_PALMOS) && PJ_PALMOS!=0
-    /*
-     * Palm
-     */
+/*
+ * Palm
+ */
 #  include <pj/compat/os_palmos.h>
 
 #elif defined(PJ_SUNOS) || defined(sun) || defined(__sun)
-    /*
-     * SunOS
-     */
+/*
+ * SunOS
+ */
 #   undef PJ_SUNOS
 #   define PJ_SUNOS	    1
 #   include <pj/compat/os_sunos.h>
 
 #elif defined(PJ_DARWINOS) || defined(__MACOSX__) || \
       defined (__APPLE__) || defined (__MACH__)
-    /*
-     * MacOS X
-     */
+/*
+ * MacOS X
+ */
 #   undef PJ_DARWINOS
 #   define PJ_DARWINOS	    1
 #   include <pj/compat/os_darwinos.h>
 
 #elif defined(PJ_RTEMS) && PJ_RTEMS!=0
-    /*
-     * RTEMS
-     */
+/*
+ * RTEMS
+ */
 #  include <pj/compat/os_rtems.h>
 #else
 #   error "Please specify target os."
@@ -142,17 +142,17 @@
  * Target machine specific configuration.
  */
 #if defined(PJ_AUTOCONF)
-    /*
-     * Autoconf configured
-     */
+/*
+ * Autoconf configured
+ */
 #include <pj/compat/m_auto.h>
 
 #elif defined (PJ_M_I386) || defined(_i386_) || defined(i_386_) || \
 	defined(_X86_) || defined(x86) || defined(__i386__) || \
 	defined(__i386) || defined(_M_IX86) || defined(__I86__)
-    /*
-     * Generic i386 processor family, little-endian
-     */
+/*
+ * Generic i386 processor family, little-endian
+ */
 #   undef PJ_M_I386
 #   define PJ_M_I386		1
 #   define PJ_M_NAME		"i386"
@@ -163,9 +163,9 @@
 
 #elif defined (PJ_M_X86_64) || defined(__amd64__) || defined(__amd64) || \
 	defined(__x86_64__) || defined(__x86_64)
-    /*
-     * AMD 64bit processor, little endian
-     */
+/*
+ * AMD 64bit processor, little endian
+ */
 #   undef PJ_M_X86_64
 #   define PJ_M_X86_64		1
 #   define PJ_M_NAME		"x86_64"
@@ -175,9 +175,9 @@
 
 #elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
 	defined(__IA64__) || defined( 	_M_IA64)
-    /*
-     * Intel IA64 processor, little endian
-     */
+/*
+ * Intel IA64 processor, little endian
+ */
 #   undef PJ_M_IA64
 #   define PJ_M_IA64		1
 #   define PJ_M_NAME		"ia64"
@@ -187,9 +187,9 @@
 
 #elif defined (PJ_M_M68K) && PJ_M_M68K != 0
 
-    /*
-     * Motorola m64k processor, little endian
-     */
+/*
+ * Motorola m64k processor, little endian
+ */
 #   undef PJ_M_M68K
 #   define PJ_M_M68K		1
 #   define PJ_M_NAME		"m68k"
@@ -200,9 +200,9 @@
 
 #elif defined (PJ_M_ALPHA) || defined (__alpha__) || defined (__alpha) || \
 	defined (_M_ALPHA)
-    /*
-     * DEC Alpha processor, little endian
-     */
+/*
+ * DEC Alpha processor, little endian
+ */
 #   undef PJ_M_ALPHA
 #   define PJ_M_ALPHA		1
 #   define PJ_M_NAME		"alpha"
@@ -213,9 +213,9 @@
 
 #elif defined(PJ_M_MIPS) || defined(__mips__) || defined(__mips) || \
 	defined(__MIPS__) || defined(MIPS) || defined(_MIPS_)
-    /*
-     * MIPS, default to little endian
-     */
+/*
+ * MIPS, default to little endian
+ */
 #   undef PJ_M_MIPS
 #   define PJ_M_MIPS		1
 #   define PJ_M_NAME		"mips"
@@ -227,9 +227,9 @@
 
 
 #elif defined (PJ_M_SPARC) || defined( 	__sparc__) || defined(__sparc)
-    /*
-     * Sun Sparc, big endian
-     */
+/*
+ * Sun Sparc, big endian
+ */
 #   undef PJ_M_SPARC
 #   define PJ_M_SPARC		1
 #   define PJ_M_NAME		"sparc"
@@ -239,9 +239,9 @@
 
 #elif defined (PJ_M_ARMV4) || defined(ARM) || defined(_ARM_) ||  \
 	defined(ARMV4) || defined(__arm__)
-    /*
-     * ARM, default to little endian
-     */
+/*
+ * ARM, default to little endian
+ */
 #   undef PJ_M_ARMV4
 #   define PJ_M_ARMV4		1
 #   define PJ_M_NAME		"armv4"
@@ -254,9 +254,9 @@
 #elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \
 	defined(__POWERPC__) || defined(__ppc__) || defined(_M_PPC) || \
 	defined(_ARCH_PPC)
-    /*
-     * PowerPC, big endian
-     */
+/*
+ * PowerPC, big endian
+ */
 #   undef PJ_M_POWERPC
 #   define PJ_M_POWERPC		1
 #   define PJ_M_NAME		"powerpc"
@@ -266,9 +266,9 @@
 
 #elif defined (PJ_M_NIOS2) || defined(__nios2) || defined(__nios2__) || \
       defined(__NIOS2__) || defined(__M_NIOS2) || defined(_ARCH_NIOS2)
-    /*
-     * Nios2, little endian
-     */
+/*
+ * Nios2, little endian
+ */
 #   undef PJ_M_NIOS2
 #   define PJ_M_NIOS2		1
 #   define PJ_M_NAME		"nios2"
@@ -278,9 +278,9 @@
 
 #elif defined (PJ_M_SH) || defined(__sh) || defined(__sh__) || \
       defined(__SH__) || defined(__M_SH) || defined(_ARCH_SH)
-    /*
-     * Renesas SH, little endian and big endian
-     */
+/*
+ * Renesas SH, little endian and big endian
+ */
 #   undef PJ_M_SH
 #   define PJ_M_SH              1
 #   define PJ_M_NAME            "sh"
@@ -295,9 +295,9 @@
 
 #elif defined (PJ_M_HPPA) || defined(__hppa) || defined(__hppa__) || \
       defined(__HPPA__) || defined(__M_HPPA) || defined(_ARCH_HPPA)
-    /*
-     * HP/PA, big endian
-     */
+/*
+ * HP/PA, big endian
+ */
 #   undef PJ_M_HPPA
 #   define PJ_M_HPPA            1
 #   define PJ_M_NAME            "hppa"
@@ -307,9 +307,9 @@
 
 #elif defined (PJ_M_S390) || defined(__s390) || defined(__s390__) || defined(__s390x) || \
       defined(__s390x__) || defined(__M_s390) || defined(_ARCH_s390)
-    /*
-     * System 390, big endian
-     */
+/*
+ * System 390, big endian
+ */
 #   undef PJ_M_S390
 #   define PJ_M_S390            1
 #   define PJ_M_NAME            "s390"
@@ -317,7 +317,7 @@
 #   define PJ_IS_LITTLE_ENDIAN  0
 #   define PJ_IS_BIG_ENDIAN     1
 
-		
+
 #else
 #   error "Please specify target machine."
 #endif
@@ -473,7 +473,7 @@
  * in the application.
  *
  * This will slow down pool creation and destruction and will add
- * few bytes of overhead, so application would normally want to 
+ * few bytes of overhead, so application would normally want to
  * disable this feature on release build.
  *
  * Default: 0
@@ -502,14 +502,14 @@
  *
  * Default: 8192
  */
-#ifndef PJ_THREAD_DEFAULT_STACK_SIZE 
+#ifndef PJ_THREAD_DEFAULT_STACK_SIZE
 #  define PJ_THREAD_DEFAULT_STACK_SIZE    8192
 #endif
 
 
 /**
- * Specify if PJ_CHECK_STACK() macro is enabled to check the sanity of 
- * the stack. The OS implementation may check that no stack overflow 
+ * Specify if PJ_CHECK_STACK() macro is enabled to check the sanity of
+ * the stack. The OS implementation may check that no stack overflow
  * occurs, and it also may collect statistic about stack usage. Note
  * that this will increase the footprint of the libraries since it
  * tracks the filename and line number of each functions.
@@ -539,7 +539,7 @@
 #endif
 
 /**
- * Support IPv6 in the library. If this support is disabled, some IPv6 
+ * Support IPv6 in the library. If this support is disabled, some IPv6
  * related functions will return PJ_EIPV6NOTSUP.
  *
  * Default: 0 (disabled, for now)
@@ -548,21 +548,21 @@
 #  define PJ_HAS_IPV6		    0
 #endif
 
- /**
- * Maximum hostname length.
- * Libraries sometimes needs to make copy of an address to stack buffer;
- * the value here affects the stack usage.
- *
- * Default: 128
- */
+/**
+* Maximum hostname length.
+* Libraries sometimes needs to make copy of an address to stack buffer;
+* the value here affects the stack usage.
+*
+* Default: 128
+*/
 #ifndef PJ_MAX_HOSTNAME
 #  define PJ_MAX_HOSTNAME	    (128)
 #endif
 
 /**
  * Constants for declaring the maximum handles that can be supported by
- * a single IOQ framework. This constant might not be relevant to the 
- * underlying I/O queue impelementation, but still, developers should be 
+ * a single IOQ framework. This constant might not be relevant to the
+ * underlying I/O queue impelementation, but still, developers should be
  * aware of this constant, to make sure that the program will not break when
  * the underlying implementation changes.
  */
@@ -576,8 +576,8 @@
  * things to ensure thread safety of handle unregistration operation by
  * employing reference counter to each handle.
  *
- * In addition, the ioqueue will preallocate memory for the handles, 
- * according to the maximum number of handles that is specified during 
+ * In addition, the ioqueue will preallocate memory for the handles,
+ * according to the maximum number of handles that is specified during
  * ioqueue creation.
  *
  * All applications would normally want this enabled, but you may disable
@@ -598,7 +598,7 @@
  * concurrently/in parallel. The default is yes, which means that if there
  * are more than one pending operations complete simultaneously, more
  * than one threads may call the key's callback at the same time. This
- * generally would promote good scalability for application, at the 
+ * generally would promote good scalability for application, at the
  * expense of more complexity to manage the concurrent accesses.
  *
  * Please see the ioqueue documentation for more info.
@@ -653,14 +653,14 @@
  * set to value lower than FD_SETSIZE.
  */
 #if PJ_FD_SETSIZE_SETABLE
-    /* Only override FD_SETSIZE if the value has not been set */
+/* Only override FD_SETSIZE if the value has not been set */
 #   ifndef FD_SETSIZE
 #	define FD_SETSIZE		PJ_IOQUEUE_MAX_HANDLES
 #   endif
 #else
-    /* When FD_SETSIZE is not changeable, check if PJ_IOQUEUE_MAX_HANDLES
-     * is lower than FD_SETSIZE value.
-     */
+/* When FD_SETSIZE is not changeable, check if PJ_IOQUEUE_MAX_HANDLES
+ * is lower than FD_SETSIZE value.
+ */
 #   ifdef FD_SETSIZE
 #	if PJ_IOQUEUE_MAX_HANDLES > FD_SETSIZE
 #	    error "PJ_IOQUEUE_MAX_HANDLES is greater than FD_SETSIZE"
@@ -777,7 +777,7 @@
 #ifndef PJ_NATIVE_ERR_POSITIVE
 #   define PJ_NATIVE_ERR_POSITIVE   1
 #endif
- 
+
 /**
  * Include error message string in the library (pj_strerror()).
  * This is very much desirable!
@@ -794,7 +794,7 @@
  * functions to compare alnum strings. On some systems, they're faster
  * then stricmp/strcasecmp, but they can be slower on other systems.
  * When disabled, pjlib will fallback to stricmp/strnicmp.
- * 
+ *
  * Default: 0
  */
 #ifndef PJ_HAS_STRICMP_ALNUM
@@ -806,7 +806,7 @@
  * Types of QoS backend implementation.
  */
 
-/** 
+/**
  * Dummy QoS backend implementation, will always return error on all
  * the APIs.
  */
@@ -826,7 +826,7 @@
  */
 #ifndef PJ_QOS_IMPLEMENTATION
 #   if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE && _WIN32_WCE >= 0x502
-	/* Windows Mobile 6 or later */
+/* Windows Mobile 6 or later */
 #	define PJ_QOS_IMPLEMENTATION    PJ_QOS_WM
 #   endif
 #endif
@@ -857,7 +857,7 @@
  *
  * The libraries support generation of dynamic link libraries for
  * Symbian ABIv2 target (.dso/Dynamic Shared Object files, in Symbian
- * terms). Similar procedures may be applied for Win32 DLL with some 
+ * terms). Similar procedures may be applied for Win32 DLL with some
  * modification.
  *
  * Depending on the platforms, these steps may be necessary in order to
@@ -865,7 +865,7 @@
  *  - Create the (Visual Studio) projects to produce DLL output. PJLIB
  *    does not provide ready to use project files to produce DLL, so
  *    you need to create these projects yourself. For Symbian, the MMP
- *    files have been setup to produce DSO files for targets that 
+ *    files have been setup to produce DSO files for targets that
  *    require them.
  *  - In the (Visual Studio) projects, some macros need to be declared
  *    so that appropriate modifiers are added to symbol declarations
@@ -874,49 +874,49 @@
  *    MMP files.
  *  - Some build systems require .DEF file to be specified when creating
  *    the DLL. For Symbian, .DEF files are included in pjlib distribution,
- *    in <tt>pjlib/build.symbian</tt> directory. These DEF files are 
+ *    in <tt>pjlib/build.symbian</tt> directory. These DEF files are
  *    created by running <tt>./makedef.sh all</tt> from this directory,
  *    inside Mingw.
  *
  * Macros related for building DLL/DSO files:
  *  - For platforms that supports dynamic link libraries generation,
  *    it must declare <tt>PJ_EXPORT_SPECIFIER</tt> macro which value contains
- *    the prefix to be added to symbol definition, to export this 
+ *    the prefix to be added to symbol definition, to export this
  *    symbol in the DLL/DSO. For example, on Win32/Visual Studio, the
- *    value of this macro is \a __declspec(dllexport), and for ARM 
- *    ABIv2/Symbian, the value is \a EXPORT_C. 
+ *    value of this macro is \a __declspec(dllexport), and for ARM
+ *    ABIv2/Symbian, the value is \a EXPORT_C.
  *  - For platforms that supports linking with dynamic link libraries,
  *    it must declare <tt>PJ_IMPORT_SPECIFIER</tt> macro which value contains
- *    the prefix to be added to symbol declaration, to import this 
+ *    the prefix to be added to symbol declaration, to import this
  *    symbol from a DLL/DSO. For example, on Win32/Visual Studio, the
- *    value of this macro is \a __declspec(dllimport), and for ARM 
- *    ABIv2/Symbian, the value is \a IMPORT_C. 
- *  - Both <tt>PJ_EXPORT_SPECIFIER</tt> and <tt>PJ_IMPORT_SPECIFIER</tt> 
+ *    value of this macro is \a __declspec(dllimport), and for ARM
+ *    ABIv2/Symbian, the value is \a IMPORT_C.
+ *  - Both <tt>PJ_EXPORT_SPECIFIER</tt> and <tt>PJ_IMPORT_SPECIFIER</tt>
  *    macros above can be declared in your \a config_site.h if they are not
  *    declared by pjlib.
- *  - When PJLIB is built as DLL/DSO, both <tt>PJ_DLL</tt> and 
- *    <tt>PJ_EXPORTING</tt> macros must be declared, so that 
+ *  - When PJLIB is built as DLL/DSO, both <tt>PJ_DLL</tt> and
+ *    <tt>PJ_EXPORTING</tt> macros must be declared, so that
  *     <tt>PJ_EXPORT_SPECIFIER</tt> modifier will be added into function
  *    definition.
  *  - When application wants to link dynamically with PJLIB, then it
  *    must declare <tt>PJ_DLL</tt> macro when using/including PJLIB header,
- *    so that <tt>PJ_IMPORT_SPECIFIER</tt> modifier is properly added into 
+ *    so that <tt>PJ_IMPORT_SPECIFIER</tt> modifier is properly added into
  *    symbol declarations.
  *
  * When <b>PJ_DLL</b> macro is not declared, static linking is assumed.
  *
  * For example, here are some settings to produce DLLs with Visual Studio
  * on Windows/Win32:
- *  - Create Visual Studio projects to produce DLL. Add the appropriate 
+ *  - Create Visual Studio projects to produce DLL. Add the appropriate
  *    project dependencies to avoid link errors.
- *  - In the projects, declare <tt>PJ_DLL</tt> and <tt>PJ_EXPORTING</tt> 
+ *  - In the projects, declare <tt>PJ_DLL</tt> and <tt>PJ_EXPORTING</tt>
  *    macros.
  *  - Declare these macros in your <tt>config_site.h</tt>:
  \verbatim
 	#define PJ_EXPORT_SPECIFIER  __declspec(dllexport)
 	#define PJ_IMPORT_SPECIFIER  __declspec(dllimport)
  \endverbatim
- *  - And in the application (that links with the DLL) project, add 
+ *  - And in the application (that links with the DLL) project, add
  *    <tt>PJ_DLL</tt> in the macro declarations.
  */
 
@@ -940,7 +940,7 @@
  * is built as dynamic library.
  *
  * This macro should have been added by platform specific headers,
- * if the platform supports building dynamic library target. 
+ * if the platform supports building dynamic library target.
  */
 #ifndef PJ_EXPORT_DECL_SPECIFIER
 #   define PJ_EXPORT_DECL_SPECIFIER
@@ -953,7 +953,7 @@
  * is built as dynamic library.
  *
  * This macro should have been added by platform specific headers,
- * if the platform supports building dynamic library target. 
+ * if the platform supports building dynamic library target.
  */
 #ifndef PJ_EXPORT_DEF_SPECIFIER
 #   define PJ_EXPORT_DEF_SPECIFIER
@@ -1048,7 +1048,7 @@
  * @def PJ_DECL_DATA(type)
  * @param type The data type.
  * Declare a global data.
- */ 
+ */
 #if defined(PJ_DLL)
 #   if defined(PJ_EXPORTING)
 #	define PJ_DECL_DATA(type)   PJ_EXPORT_DECL_SPECIFIER extern type
@@ -1064,7 +1064,7 @@
  * @def PJ_DEF_DATA(type)
  * @param type The data type.
  * Define a global data.
- */ 
+ */
 #if defined(PJ_DLL) && defined(PJ_EXPORTING)
 #   define PJ_DEF_DATA(type)	    PJ_EXPORT_DEF_SPECIFIER type
 #elif !defined(PJ_DEF_DATA)
@@ -1154,19 +1154,19 @@ PJ_BEGIN_DECL
 /**
  * PJLIB version string constant. @see pj_get_version()
  */
-PJ_DECL_DATA(const char*) PJ_VERSION;
+PJ_DECL_DATA (const char*) PJ_VERSION;
 
 /**
  * Get PJLIB version string.
  *
  * @return #PJ_VERSION constant.
  */
-PJ_DECL(const char*) pj_get_version(void);
+PJ_DECL (const char*) pj_get_version (void);
 
 /**
  * Dump configuration to log with verbosity equal to info(3).
  */
-PJ_DECL(void) pj_dump_config(void);
+PJ_DECL (void) pj_dump_config (void);
 
 PJ_END_DECL
 
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/addr_resolv_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/addr_resolv_symbian.cpp
index d53bd764252ddf2345a63b36470da437e1b29f28..fd393532edfea4d37e10d96788603066e59e021a 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/addr_resolv_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/addr_resolv_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: addr_resolv_symbian.cpp 2888 2009-08-17 11:29:39Z nanang $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -38,130 +38,137 @@
 #include <pj/unicode.h>
 
 #include "os_symbian.h"
- 
+
 #define THIS_FILE 	"addr_resolv_symbian.cpp"
 #define TRACE_ME	0
 
 
 // PJLIB API: resolve hostname
-PJ_DEF(pj_status_t) pj_gethostbyname(const pj_str_t *name, pj_hostent *he)
+PJ_DEF (pj_status_t) pj_gethostbyname (const pj_str_t *name, pj_hostent *he)
 {
     static pj_addrinfo ai;
     static char *aliases[2];
     static char *addrlist[2];
     unsigned count = 1;
     pj_status_t status;
-    
-    status = pj_getaddrinfo(PJ_AF_INET, name, &count, &ai);
+
+    status = pj_getaddrinfo (PJ_AF_INET, name, &count, &ai);
+
     if (status != PJ_SUCCESS)
-    	return status;
-    
+        return status;
+
     aliases[0] = ai.ai_canonname;
     aliases[1] = NULL;
-    
+
     addrlist[0] = (char*) &ai.ai_addr.ipv4.sin_addr;
     addrlist[1] = NULL;
-    
-    pj_bzero(he, sizeof(*he));
+
+    pj_bzero (he, sizeof (*he));
     he->h_name = aliases[0];
     he->h_aliases = aliases;
     he->h_addrtype = PJ_AF_INET;
     he->h_length = 4;
     he->h_addr_list = addrlist;
-    
+
     return PJ_SUCCESS;
 }
 
 
 // Resolve for specific address family
-static pj_status_t getaddrinfo_by_af(int af, const pj_str_t *name,
-				     unsigned *count, pj_addrinfo ai[]) 
+static pj_status_t getaddrinfo_by_af (int af, const pj_str_t *name,
+                                      unsigned *count, pj_addrinfo ai[])
 {
     unsigned i;
     pj_status_t status;
-    
-    PJ_ASSERT_RETURN(name && count && ai, PJ_EINVAL);
+
+    PJ_ASSERT_RETURN (name && count && ai, PJ_EINVAL);
 
 #if !defined(PJ_HAS_IPV6) || !PJ_HAS_IPV6
+
     if (af == PJ_AF_INET6)
-    	return PJ_EIPV6NOTSUP;
+        return PJ_EIPV6NOTSUP;
+
 #endif
-	
+
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
 
     // Get resolver for the specified address family
-    RHostResolver &resv = PjSymbianOS::Instance()->GetResolver(af);
+    RHostResolver &resv = PjSymbianOS::Instance()->GetResolver (af);
 
     // Convert name to Unicode
     wchar_t name16[PJ_MAX_HOSTNAME];
-    pj_ansi_to_unicode(name->ptr, name->slen, name16, PJ_ARRAY_SIZE(name16));
-    TPtrC16 data((const TUint16*)name16);
+    pj_ansi_to_unicode (name->ptr, name->slen, name16, PJ_ARRAY_SIZE (name16));
+    TPtrC16 data ( (const TUint16*) name16);
 
     // Resolve!
     TNameEntry nameEntry;
     TRequestStatus reqStatus;
-    
-    resv.GetByName(data, nameEntry, reqStatus);
-    User::WaitForRequest(reqStatus);
-    
+
+    resv.GetByName (data, nameEntry, reqStatus);
+    User::WaitForRequest (reqStatus);
+
     // Iterate each result
     i = 0;
+
     while (reqStatus == KErrNone && i < *count) {
-    	
-		// Get the resolved TInetAddr
-		TInetAddr inetAddr(nameEntry().iAddr);
-		int addrlen;
+
+        // Get the resolved TInetAddr
+        TInetAddr inetAddr (nameEntry().iAddr);
+        int addrlen;
 
 #if TRACE_ME
-		if (1) {
-			pj_sockaddr a;
-			char ipaddr[PJ_INET6_ADDRSTRLEN+2];
-			int namelen;
-			
-			namelen = sizeof(pj_sockaddr);
-			if (PjSymbianOS::Addr2pj(inetAddr, a, &namelen, 
-									 PJ_FALSE) == PJ_SUCCESS) 
-			{
-				PJ_LOG(5,(THIS_FILE, "resolve %.*s: %s", 
-						(int)name->slen, name->ptr,
-						pj_sockaddr_print(&a, ipaddr, sizeof(ipaddr), 2)));
-			}
-		}
+
+        if (1) {
+            pj_sockaddr a;
+            char ipaddr[PJ_INET6_ADDRSTRLEN+2];
+            int namelen;
+
+            namelen = sizeof (pj_sockaddr);
+
+            if (PjSymbianOS::Addr2pj (inetAddr, a, &namelen,
+                                      PJ_FALSE) == PJ_SUCCESS) {
+                PJ_LOG (5, (THIS_FILE, "resolve %.*s: %s",
+                            (int) name->slen, name->ptr,
+                            pj_sockaddr_print (&a, ipaddr, sizeof (ipaddr), 2)));
+            }
+        }
+
 #endif
-		
-		// Ignore if this is not the same address family
-		// Not a good idea, as Symbian mapps IPv4 to IPv6.
-		//fam = inetAddr.Family();
-		//if (fam != af) {
-		//    resv.Next(nameEntry, reqStatus);
-		//    User::WaitForRequest(reqStatus);
-		//    continue;
-		//}
-		
-		// Convert IP address first to get IPv4 mapped address
-		addrlen = sizeof(ai[i].ai_addr);
-		status = PjSymbianOS::Addr2pj(inetAddr, ai[i].ai_addr, 
-									  &addrlen, PJ_TRUE);
-		if (status != PJ_SUCCESS)
-		    return status;
-		
-		// Ignore if address family doesn't match
-		if (ai[i].ai_addr.addr.sa_family != af) {
-		    resv.Next(nameEntry, reqStatus);
-		    User::WaitForRequest(reqStatus);
-		    continue;
-		}
-
-		// Convert the official address to ANSI.
-		pj_unicode_to_ansi((const wchar_t*)nameEntry().iName.Ptr(), 
-				   nameEntry().iName.Length(),
-			       	   ai[i].ai_canonname, sizeof(ai[i].ai_canonname));
-	
-		// Next
-		++i;
-		resv.Next(nameEntry, reqStatus);
-		User::WaitForRequest(reqStatus);
+
+        // Ignore if this is not the same address family
+        // Not a good idea, as Symbian mapps IPv4 to IPv6.
+        //fam = inetAddr.Family();
+        //if (fam != af) {
+        //    resv.Next(nameEntry, reqStatus);
+        //    User::WaitForRequest(reqStatus);
+        //    continue;
+        //}
+
+        // Convert IP address first to get IPv4 mapped address
+        addrlen = sizeof (ai[i].ai_addr);
+        status = PjSymbianOS::Addr2pj (inetAddr, ai[i].ai_addr,
+                                       &addrlen, PJ_TRUE);
+
+        if (status != PJ_SUCCESS)
+            return status;
+
+        // Ignore if address family doesn't match
+        if (ai[i].ai_addr.addr.sa_family != af) {
+            resv.Next (nameEntry, reqStatus);
+            User::WaitForRequest (reqStatus);
+            continue;
+        }
+
+        // Convert the official address to ANSI.
+        pj_unicode_to_ansi ( (const wchar_t*) nameEntry().iName.Ptr(),
+                             nameEntry().iName.Length(),
+                             ai[i].ai_canonname, sizeof (ai[i].ai_canonname));
+
+        // Next
+        ++i;
+        resv.Next (nameEntry, reqStatus);
+        User::WaitForRequest (reqStatus);
     }
 
     *count = i;
@@ -169,44 +176,46 @@ static pj_status_t getaddrinfo_by_af(int af, const pj_str_t *name,
 }
 
 /* Resolve IPv4/IPv6 address */
-PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename,
-				   unsigned *count, pj_addrinfo ai[]) 
+PJ_DEF (pj_status_t) pj_getaddrinfo (int af, const pj_str_t *nodename,
+                                     unsigned *count, pj_addrinfo ai[])
 {
     unsigned start;
     pj_status_t status = PJ_EAFNOTSUP;
-    
-    PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6 || af==PJ_AF_UNSPEC,
-    		     PJ_EAFNOTSUP);
-    PJ_ASSERT_RETURN(nodename && count && *count && ai, PJ_EINVAL);
-    
+
+    PJ_ASSERT_RETURN (af==PJ_AF_INET || af==PJ_AF_INET6 || af==PJ_AF_UNSPEC,
+                      PJ_EAFNOTSUP);
+    PJ_ASSERT_RETURN (nodename && count && *count && ai, PJ_EINVAL);
+
     start = 0;
-    
+
     if (af==PJ_AF_INET6 || af==PJ_AF_UNSPEC) {
         unsigned max = *count;
-    	status = getaddrinfo_by_af(PJ_AF_INET6, nodename, 
-    				   &max, &ai[start]);
-    	if (status == PJ_SUCCESS) {
-    	    (*count) -= max;
-    	    start += max;
-    	}
+        status = getaddrinfo_by_af (PJ_AF_INET6, nodename,
+                                    &max, &ai[start]);
+
+        if (status == PJ_SUCCESS) {
+            (*count) -= max;
+            start += max;
+        }
     }
-    
+
     if (af==PJ_AF_INET || af==PJ_AF_UNSPEC) {
         unsigned max = *count;
-    	status = getaddrinfo_by_af(PJ_AF_INET, nodename, 
-    				   &max, &ai[start]);
-    	if (status == PJ_SUCCESS) {
-    	    (*count) -= max;
-    	    start += max;
-    	}
+        status = getaddrinfo_by_af (PJ_AF_INET, nodename,
+                                    &max, &ai[start]);
+
+        if (status == PJ_SUCCESS) {
+            (*count) -= max;
+            start += max;
+        }
     }
-    
+
     *count = start;
-    
+
     if (*count) {
-    	return PJ_SUCCESS;
+        return PJ_SUCCESS;
     } else {
-    	return status!=PJ_SUCCESS ? status : PJ_ENOTFOUND;
+        return status!=PJ_SUCCESS ? status : PJ_ENOTFOUND;
     }
 }
 
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/exception_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/exception_symbian.cpp
index f4bc5908d876ba7ed1d88c7bf1e940217dd53fde..0315a8dee22751080ab5a49199f53075394a1d65 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/exception_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/exception_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: exception_symbian.cpp 2394 2008-12-23 17:27:53Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -36,19 +36,19 @@
 
 
 #if defined(PJ_HAS_EXCEPTION_NAMES) && PJ_HAS_EXCEPTION_NAMES != 0
-    static const char *exception_id_names[PJ_MAX_EXCEPTION_ID];
+static const char *exception_id_names[PJ_MAX_EXCEPTION_ID];
 #else
-    /*
-     * Start from 1 (not 0)!!!
-     * Exception 0 is reserved for normal path of setjmp()!!!
-     */
-    static int last_exception_id = 1;
+/*
+ * Start from 1 (not 0)!!!
+ * Exception 0 is reserved for normal path of setjmp()!!!
+ */
+static int last_exception_id = 1;
 #endif  /* PJ_HAS_EXCEPTION_NAMES */
 
 
 #if defined(PJ_HAS_EXCEPTION_NAMES) && PJ_HAS_EXCEPTION_NAMES != 0
-PJ_DEF(pj_status_t) pj_exception_id_alloc( const char *name,
-                                           pj_exception_id_t *id)
+PJ_DEF (pj_status_t) pj_exception_id_alloc (const char *name,
+        pj_exception_id_t *id)
 {
     unsigned i;
 
@@ -71,14 +71,14 @@ PJ_DEF(pj_status_t) pj_exception_id_alloc( const char *name,
     return PJ_ETOOMANY;
 }
 
-PJ_DEF(pj_status_t) pj_exception_id_free( pj_exception_id_t id )
+PJ_DEF (pj_status_t) pj_exception_id_free (pj_exception_id_t id)
 {
     /*
      * Start from 1 (not 0)!!!
      * Exception 0 is reserved for normal path of setjmp()!!!
      */
-    PJ_ASSERT_RETURN(id>0 && id<PJ_MAX_EXCEPTION_ID, PJ_EINVAL);
-    
+    PJ_ASSERT_RETURN (id>0 && id<PJ_MAX_EXCEPTION_ID, PJ_EINVAL);
+
     pj_enter_critical_section();
     exception_id_names[id] = NULL;
     pj_leave_critical_section();
@@ -87,13 +87,13 @@ PJ_DEF(pj_status_t) pj_exception_id_free( pj_exception_id_t id )
 
 }
 
-PJ_DEF(const char*) pj_exception_id_name(pj_exception_id_t id)
+PJ_DEF (const char*) pj_exception_id_name (pj_exception_id_t id)
 {
     /*
      * Start from 1 (not 0)!!!
      * Exception 0 is reserved for normal path of setjmp()!!!
      */
-    PJ_ASSERT_RETURN(id>0 && id<PJ_MAX_EXCEPTION_ID, "<Invalid ID>");
+    PJ_ASSERT_RETURN (id>0 && id<PJ_MAX_EXCEPTION_ID, "<Invalid ID>");
 
     if (exception_id_names[id] == NULL)
         return "<Unallocated ID>";
@@ -102,21 +102,21 @@ PJ_DEF(const char*) pj_exception_id_name(pj_exception_id_t id)
 }
 
 #else   /* PJ_HAS_EXCEPTION_NAMES */
-PJ_DEF(pj_status_t) pj_exception_id_alloc( const char *name,
-                                           pj_exception_id_t *id)
+PJ_DEF (pj_status_t) pj_exception_id_alloc (const char *name,
+        pj_exception_id_t *id)
 {
-    PJ_ASSERT_RETURN(last_exception_id < PJ_MAX_EXCEPTION_ID-1, PJ_ETOOMANY);
+    PJ_ASSERT_RETURN (last_exception_id < PJ_MAX_EXCEPTION_ID-1, PJ_ETOOMANY);
 
     *id = last_exception_id++;
     return PJ_SUCCESS;
 }
 
-PJ_DEF(pj_status_t) pj_exception_id_free( pj_exception_id_t id )
+PJ_DEF (pj_status_t) pj_exception_id_free (pj_exception_id_t id)
 {
     return PJ_SUCCESS;
 }
 
-PJ_DEF(const char*) pj_exception_id_name(pj_exception_id_t id)
+PJ_DEF (const char*) pj_exception_id_name (pj_exception_id_t id)
 {
     return "";
 }
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/ioqueue_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/ioqueue_symbian.cpp
index e52c64091ac56440861431bfcd22b46231985991..ee67280fda718fead924815777652d67f14b34b0 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/ioqueue_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/ioqueue_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: ioqueue_symbian.cpp 2771 2009-06-17 13:31:13Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -43,8 +43,7 @@ class CIoqueueCallback;
 /*
  * IO Queue structure.
  */
-struct pj_ioqueue_t
-{
+struct pj_ioqueue_t {
     int		     eventCount;
 };
 
@@ -54,146 +53,136 @@ struct pj_ioqueue_t
 //
 class CIoqueueCallback : public CActive
 {
-public:
-    static CIoqueueCallback* NewL(pj_ioqueue_t *ioqueue,
-				  pj_ioqueue_key_t *key, 
-				  pj_sock_t sock, 
-				  const pj_ioqueue_callback *cb, 
-				  void *user_data);
-
-    //
-    // Start asynchronous recv() operation
-    //
-    pj_status_t StartRead(pj_ioqueue_op_key_t *op_key, 
-			  void *buf, pj_ssize_t *size, unsigned flags,
-			  pj_sockaddr_t *addr, int *addrlen);
-
-    //
-    // Start asynchronous accept() operation.
-    //
-    pj_status_t StartAccept(pj_ioqueue_op_key_t *op_key,
-			    pj_sock_t *new_sock,
-			    pj_sockaddr_t *local,
-			    pj_sockaddr_t *remote,
-			    int *addrlen );
-
-    //
-    // Completion callback.
-    //
-    void RunL();
-
-    //
-    // CActive's DoCancel()
-    //
-    void DoCancel();
-
-    //
-    // Cancel operation and call callback.
-    //
-    void CancelOperation(pj_ioqueue_op_key_t *op_key, 
-			 pj_ssize_t bytes_status);
-
-    //
-    // Accessors
-    //
-    void* get_user_data() const
-    {
-	return user_data_;
-    }
-    void set_user_data(void *user_data)
-    {
-	user_data_ = user_data;
-    }
-    pj_ioqueue_op_key_t *get_op_key() const
-    {
-	return pending_data_.common_.op_key_;
-    }
-    CPjSocket* get_pj_socket()
-    {
-	return sock_;
-    }
-
-private:
-    // Type of pending operation.
-    enum Type {
-	TYPE_NONE,
-	TYPE_READ,
-	TYPE_ACCEPT,
-    };
-
-    // Static data.
-    pj_ioqueue_t		*ioqueue_;
-    pj_ioqueue_key_t		*key_;
-    CPjSocket			*sock_;
-    pj_ioqueue_callback		 cb_;
-    void			*user_data_;
-
-    // Symbian data.
-    TPtr8			 aBufferPtr_;
-    TInetAddr			 aAddress_;
-
-    // Application data.
-    Type			 type_;
-
-    union Pending_Data
-    {
-	struct Common
-	{
-	    pj_ioqueue_op_key_t	*op_key_;
-	} common_;
-
-	struct Pending_Read
-	{
-	    pj_ioqueue_op_key_t	*op_key_;
-	    pj_sockaddr_t	*addr_;
-	    int			*addrlen_;
-	} read_;
-
-	struct Pending_Accept
-	{
-	    pj_ioqueue_op_key_t *op_key_;
-	    pj_sock_t		*new_sock_;
-	    pj_sockaddr_t	*local_;
-	    pj_sockaddr_t	*remote_;
-	    int			*addrlen_;
-	} accept_;
-    };
-
-    union Pending_Data		 pending_data_;
-    RSocket			blank_sock_;
-
-    CIoqueueCallback(pj_ioqueue_t *ioqueue,
-		     pj_ioqueue_key_t *key, pj_sock_t sock, 
-		     const pj_ioqueue_callback *cb, void *user_data)
-    : CActive(CActive::EPriorityStandard),
-	  ioqueue_(ioqueue), key_(key), sock_((CPjSocket*)sock), 
-	  user_data_(user_data), aBufferPtr_(NULL, 0), type_(TYPE_NONE)
-    {
-    	pj_memcpy(&cb_, cb, sizeof(*cb));
-    }
-
-
-    void ConstructL()
-    {
-	CActiveScheduler::Add(this);
-    }
-    
-    void HandleReadCompletion();
-    CPjSocket *HandleAcceptCompletion();
+    public:
+        static CIoqueueCallback* NewL (pj_ioqueue_t *ioqueue,
+                                       pj_ioqueue_key_t *key,
+                                       pj_sock_t sock,
+                                       const pj_ioqueue_callback *cb,
+                                       void *user_data);
+
+        //
+        // Start asynchronous recv() operation
+        //
+        pj_status_t StartRead (pj_ioqueue_op_key_t *op_key,
+                               void *buf, pj_ssize_t *size, unsigned flags,
+                               pj_sockaddr_t *addr, int *addrlen);
+
+        //
+        // Start asynchronous accept() operation.
+        //
+        pj_status_t StartAccept (pj_ioqueue_op_key_t *op_key,
+                                 pj_sock_t *new_sock,
+                                 pj_sockaddr_t *local,
+                                 pj_sockaddr_t *remote,
+                                 int *addrlen);
+
+        //
+        // Completion callback.
+        //
+        void RunL();
+
+        //
+        // CActive's DoCancel()
+        //
+        void DoCancel();
+
+        //
+        // Cancel operation and call callback.
+        //
+        void CancelOperation (pj_ioqueue_op_key_t *op_key,
+                              pj_ssize_t bytes_status);
+
+        //
+        // Accessors
+        //
+        void* get_user_data() const {
+            return user_data_;
+        }
+        void set_user_data (void *user_data) {
+            user_data_ = user_data;
+        }
+        pj_ioqueue_op_key_t *get_op_key() const {
+            return pending_data_.common_.op_key_;
+        }
+        CPjSocket* get_pj_socket() {
+            return sock_;
+        }
+
+    private:
+        // Type of pending operation.
+        enum Type {
+            TYPE_NONE,
+            TYPE_READ,
+            TYPE_ACCEPT,
+        };
+
+        // Static data.
+        pj_ioqueue_t		*ioqueue_;
+        pj_ioqueue_key_t		*key_;
+        CPjSocket			*sock_;
+        pj_ioqueue_callback		 cb_;
+        void			*user_data_;
+
+        // Symbian data.
+        TPtr8			 aBufferPtr_;
+        TInetAddr			 aAddress_;
+
+        // Application data.
+        Type			 type_;
+
+        union Pending_Data {
+            struct Common {
+                pj_ioqueue_op_key_t	*op_key_;
+            } common_;
+
+            struct Pending_Read {
+                pj_ioqueue_op_key_t	*op_key_;
+                pj_sockaddr_t	*addr_;
+                int			*addrlen_;
+            } read_;
+
+            struct Pending_Accept {
+                pj_ioqueue_op_key_t *op_key_;
+                pj_sock_t		*new_sock_;
+                pj_sockaddr_t	*local_;
+                pj_sockaddr_t	*remote_;
+                int			*addrlen_;
+            } accept_;
+        };
+
+        union Pending_Data		 pending_data_;
+        RSocket			blank_sock_;
+
+        CIoqueueCallback (pj_ioqueue_t *ioqueue,
+                          pj_ioqueue_key_t *key, pj_sock_t sock,
+                          const pj_ioqueue_callback *cb, void *user_data)
+                : CActive (CActive::EPriorityStandard),
+                ioqueue_ (ioqueue), key_ (key), sock_ ( (CPjSocket*) sock),
+                user_data_ (user_data), aBufferPtr_ (NULL, 0), type_ (TYPE_NONE) {
+            pj_memcpy (&cb_, cb, sizeof (*cb));
+        }
+
+
+        void ConstructL() {
+            CActiveScheduler::Add (this);
+        }
+
+        void HandleReadCompletion();
+        CPjSocket *HandleAcceptCompletion();
 };
 
 
-CIoqueueCallback* CIoqueueCallback::NewL(pj_ioqueue_t *ioqueue,
-					 pj_ioqueue_key_t *key, 
-					 pj_sock_t sock, 
-					 const pj_ioqueue_callback *cb, 
-					 void *user_data)
+CIoqueueCallback* CIoqueueCallback::NewL (pj_ioqueue_t *ioqueue,
+        pj_ioqueue_key_t *key,
+        pj_sock_t sock,
+        const pj_ioqueue_callback *cb,
+        void *user_data)
 {
-    CIoqueueCallback *self = new CIoqueueCallback(ioqueue, key, sock, 
-						  cb, user_data);
-    CleanupStack::PushL(self);
+    CIoqueueCallback *self = new CIoqueueCallback (ioqueue, key, sock,
+            cb, user_data);
+    CleanupStack::PushL (self);
     self->ConstructL();
-    CleanupStack::Pop(self);
+    CleanupStack::Pop (self);
 
     return self;
 }
@@ -202,13 +191,13 @@ CIoqueueCallback* CIoqueueCallback::NewL(pj_ioqueue_t *ioqueue,
 //
 // Start asynchronous recv() operation
 //
-pj_status_t CIoqueueCallback::StartRead(pj_ioqueue_op_key_t *op_key, 
-					void *buf, pj_ssize_t *size, 
-					unsigned flags,
-					pj_sockaddr_t *addr, int *addrlen)
+pj_status_t CIoqueueCallback::StartRead (pj_ioqueue_op_key_t *op_key,
+        void *buf, pj_ssize_t *size,
+        unsigned flags,
+        pj_sockaddr_t *addr, int *addrlen)
 {
-    PJ_ASSERT_RETURN(IsActive()==false, PJ_EBUSY);
-    PJ_ASSERT_RETURN(pending_data_.common_.op_key_==NULL, PJ_EBUSY);
+    PJ_ASSERT_RETURN (IsActive() ==false, PJ_EBUSY);
+    PJ_ASSERT_RETURN (pending_data_.common_.op_key_==NULL, PJ_EBUSY);
 
     flags &= ~PJ_IOQUEUE_ALWAYS_ASYNC;
 
@@ -216,24 +205,25 @@ pj_status_t CIoqueueCallback::StartRead(pj_ioqueue_op_key_t *op_key,
     pending_data_.read_.addr_ = addr;
     pending_data_.read_.addrlen_ = addrlen;
 
-    aBufferPtr_.Set((TUint8*)buf, 0, (TInt)*size);
+    aBufferPtr_.Set ( (TUint8*) buf, 0, (TInt) *size);
 
     type_ = TYPE_READ;
+
     if (addr && addrlen) {
-	sock_->Socket().RecvFrom(aBufferPtr_, aAddress_, flags, iStatus);
+        sock_->Socket().RecvFrom (aBufferPtr_, aAddress_, flags, iStatus);
     } else {
-	aAddress_.SetAddress(0);
-	aAddress_.SetPort(0);
-
-	if (sock_->IsDatagram()) {
-	    sock_->Socket().Recv(aBufferPtr_, flags, iStatus);
-	} else {
-	    // Using static like this is not pretty, but we don't need to use
-	    // the value anyway, hence doing it like this is probably most
-	    // optimal.
-	    static TSockXfrLength len;
-	    sock_->Socket().RecvOneOrMore(aBufferPtr_, flags, iStatus, len);
-	}
+        aAddress_.SetAddress (0);
+        aAddress_.SetPort (0);
+
+        if (sock_->IsDatagram()) {
+            sock_->Socket().Recv (aBufferPtr_, flags, iStatus);
+        } else {
+            // Using static like this is not pretty, but we don't need to use
+            // the value anyway, hence doing it like this is probably most
+            // optimal.
+            static TSockXfrLength len;
+            sock_->Socket().RecvOneOrMore (aBufferPtr_, flags, iStatus, len);
+        }
     }
 
     SetActive();
@@ -244,19 +234,19 @@ pj_status_t CIoqueueCallback::StartRead(pj_ioqueue_op_key_t *op_key,
 //
 // Start asynchronous accept() operation.
 //
-pj_status_t CIoqueueCallback::StartAccept(pj_ioqueue_op_key_t *op_key,
-					  pj_sock_t *new_sock,
-					  pj_sockaddr_t *local,
-					  pj_sockaddr_t *remote,
-					  int *addrlen )
+pj_status_t CIoqueueCallback::StartAccept (pj_ioqueue_op_key_t *op_key,
+        pj_sock_t *new_sock,
+        pj_sockaddr_t *local,
+        pj_sockaddr_t *remote,
+        int *addrlen)
 {
-    PJ_ASSERT_RETURN(IsActive()==false, PJ_EBUSY);
-    PJ_ASSERT_RETURN(pending_data_.common_.op_key_==NULL, PJ_EBUSY);
+    PJ_ASSERT_RETURN (IsActive() ==false, PJ_EBUSY);
+    PJ_ASSERT_RETURN (pending_data_.common_.op_key_==NULL, PJ_EBUSY);
 
     // addrlen must be specified if local or remote is specified
-    PJ_ASSERT_RETURN((!local && !remote) ||
-    		     (addrlen && *addrlen), PJ_EINVAL);
-    
+    PJ_ASSERT_RETURN ( (!local && !remote) ||
+                       (addrlen && *addrlen), PJ_EINVAL);
+
     pending_data_.accept_.op_key_ = op_key;
     pending_data_.accept_.new_sock_ = new_sock;
     pending_data_.accept_.local_ = local;
@@ -264,10 +254,10 @@ pj_status_t CIoqueueCallback::StartAccept(pj_ioqueue_op_key_t *op_key,
     pending_data_.accept_.addrlen_ = addrlen;
 
     // Create blank socket
-    blank_sock_.Open(PjSymbianOS::Instance()->SocketServ());
+    blank_sock_.Open (PjSymbianOS::Instance()->SocketServ());
 
     type_ = TYPE_ACCEPT;
-    sock_->Socket().Accept(blank_sock_, iStatus);
+    sock_->Socket().Accept (blank_sock_, iStatus);
 
     SetActive();
     return PJ_EPENDING;
@@ -277,16 +267,16 @@ pj_status_t CIoqueueCallback::StartAccept(pj_ioqueue_op_key_t *op_key,
 //
 // Handle asynchronous RecvFrom() completion
 //
-void CIoqueueCallback::HandleReadCompletion() 
+void CIoqueueCallback::HandleReadCompletion()
 {
     if (pending_data_.read_.addr_ && pending_data_.read_.addrlen_) {
-	PjSymbianOS::Addr2pj(aAddress_, 
-			     *(pj_sockaddr*)pending_data_.read_.addr_,
-			     pending_data_.read_.addrlen_);
-	pending_data_.read_.addr_ = NULL;
-	pending_data_.read_.addrlen_ = NULL;
+        PjSymbianOS::Addr2pj (aAddress_,
+                              * (pj_sockaddr*) pending_data_.read_.addr_,
+                              pending_data_.read_.addrlen_);
+        pending_data_.read_.addr_ = NULL;
+        pending_data_.read_.addrlen_ = NULL;
     }
-	
+
     pending_data_.read_.op_key_ = NULL;
 }
 
@@ -294,55 +284,56 @@ void CIoqueueCallback::HandleReadCompletion()
 //
 // Handle asynchronous Accept() completion.
 //
-CPjSocket *CIoqueueCallback::HandleAcceptCompletion() 
+CPjSocket *CIoqueueCallback::HandleAcceptCompletion()
 {
-	CPjSocket *pjNewSock = new CPjSocket(get_pj_socket()->GetAf(), 
-					     get_pj_socket()->GetSockType(),
-					     blank_sock_);
-	int addrlen = 0;
-	
-	if (pending_data_.accept_.new_sock_) {
-	    *pending_data_.accept_.new_sock_ = (pj_sock_t)pjNewSock;
-	    pending_data_.accept_.new_sock_ = NULL;
-	}
-
-	if (pending_data_.accept_.local_) {
-	    TInetAddr aAddr;
-	    pj_sockaddr *ptr_sockaddr;
-	    
-	    blank_sock_.LocalName(aAddr);
-	    ptr_sockaddr = (pj_sockaddr*)pending_data_.accept_.local_;
-	    addrlen = *pending_data_.accept_.addrlen_;
-	    PjSymbianOS::Addr2pj(aAddr, *ptr_sockaddr, &addrlen);
-	    pending_data_.accept_.local_ = NULL;
-	}
-
-	if (pending_data_.accept_.remote_) {
-	    TInetAddr aAddr;
-	    pj_sockaddr *ptr_sockaddr;
-
-	    blank_sock_.RemoteName(aAddr);
-	    ptr_sockaddr = (pj_sockaddr*)pending_data_.accept_.remote_;
-	    addrlen = *pending_data_.accept_.addrlen_;
-	    PjSymbianOS::Addr2pj(aAddr, *ptr_sockaddr, &addrlen);
-	    pending_data_.accept_.remote_ = NULL;
-	}
-
-	if (pending_data_.accept_.addrlen_) {
-	    if (addrlen == 0) {
-	    	if (pjNewSock->GetAf() == PJ_AF_INET)
-	    	    addrlen = sizeof(pj_sockaddr_in);
-	    	else if (pjNewSock->GetAf() == PJ_AF_INET6)
-	    	    addrlen = sizeof(pj_sockaddr_in6);
-	    	else {
-	    	    pj_assert(!"Unsupported address family");
-	    	}
-	    }
-	    *pending_data_.accept_.addrlen_ = addrlen;
-	    pending_data_.accept_.addrlen_ = NULL;
-	}
-	
-	return pjNewSock;
+    CPjSocket *pjNewSock = new CPjSocket (get_pj_socket()->GetAf(),
+                                          get_pj_socket()->GetSockType(),
+                                          blank_sock_);
+    int addrlen = 0;
+
+    if (pending_data_.accept_.new_sock_) {
+        *pending_data_.accept_.new_sock_ = (pj_sock_t) pjNewSock;
+        pending_data_.accept_.new_sock_ = NULL;
+    }
+
+    if (pending_data_.accept_.local_) {
+        TInetAddr aAddr;
+        pj_sockaddr *ptr_sockaddr;
+
+        blank_sock_.LocalName (aAddr);
+        ptr_sockaddr = (pj_sockaddr*) pending_data_.accept_.local_;
+        addrlen = *pending_data_.accept_.addrlen_;
+        PjSymbianOS::Addr2pj (aAddr, *ptr_sockaddr, &addrlen);
+        pending_data_.accept_.local_ = NULL;
+    }
+
+    if (pending_data_.accept_.remote_) {
+        TInetAddr aAddr;
+        pj_sockaddr *ptr_sockaddr;
+
+        blank_sock_.RemoteName (aAddr);
+        ptr_sockaddr = (pj_sockaddr*) pending_data_.accept_.remote_;
+        addrlen = *pending_data_.accept_.addrlen_;
+        PjSymbianOS::Addr2pj (aAddr, *ptr_sockaddr, &addrlen);
+        pending_data_.accept_.remote_ = NULL;
+    }
+
+    if (pending_data_.accept_.addrlen_) {
+        if (addrlen == 0) {
+            if (pjNewSock->GetAf() == PJ_AF_INET)
+                addrlen = sizeof (pj_sockaddr_in);
+            else if (pjNewSock->GetAf() == PJ_AF_INET6)
+                addrlen = sizeof (pj_sockaddr_in6);
+            else {
+                pj_assert (!"Unsupported address family");
+            }
+        }
+
+        *pending_data_.accept_.addrlen_ = addrlen;
+        pending_data_.accept_.addrlen_ = NULL;
+    }
+
+    return pjNewSock;
 }
 
 
@@ -356,58 +347,60 @@ void CIoqueueCallback::RunL()
     type_ = TYPE_NONE;
 
     if (cur_type == TYPE_READ) {
-	//
-	// Completion of asynchronous RecvFrom()
-	//
-
-	/* Clear op_key (save it to temp variable first!) */
-	pj_ioqueue_op_key_t	*op_key = pending_data_.read_.op_key_;
-	pending_data_.read_.op_key_ = NULL;
-
-	// Handle failure condition
-	if (iStatus != KErrNone) {
-	    if (cb_.on_read_complete) {
-	    	cb_.on_read_complete( key_, op_key, 
-				      -PJ_RETURN_OS_ERROR(iStatus.Int()));
-	    }
-	    return;
-	}
-
-	HandleReadCompletion();
-
-	/* Call callback */
-	if (cb_.on_read_complete) {
-	    cb_.on_read_complete(key_, op_key, aBufferPtr_.Length());
-	}
+        //
+        // Completion of asynchronous RecvFrom()
+        //
+
+        /* Clear op_key (save it to temp variable first!) */
+        pj_ioqueue_op_key_t	*op_key = pending_data_.read_.op_key_;
+        pending_data_.read_.op_key_ = NULL;
+
+        // Handle failure condition
+        if (iStatus != KErrNone) {
+            if (cb_.on_read_complete) {
+                cb_.on_read_complete (key_, op_key,
+                                      -PJ_RETURN_OS_ERROR (iStatus.Int()));
+            }
+
+            return;
+        }
+
+        HandleReadCompletion();
+
+        /* Call callback */
+        if (cb_.on_read_complete) {
+            cb_.on_read_complete (key_, op_key, aBufferPtr_.Length());
+        }
 
     } else if (cur_type == TYPE_ACCEPT) {
-	//
-	// Completion of asynchronous Accept()
-	//
-	
-	/* Clear op_key (save it to temp variable first!) */
-	pj_ioqueue_op_key_t	*op_key = pending_data_.read_.op_key_;
-	pending_data_.read_.op_key_ = NULL;
-
-	// Handle failure condition
-	if (iStatus != KErrNone) {
-	    if (pending_data_.accept_.new_sock_)
-		*pending_data_.accept_.new_sock_ = PJ_INVALID_SOCKET;
-	    
-	    if (cb_.on_accept_complete) {
-	    	cb_.on_accept_complete( key_, op_key, PJ_INVALID_SOCKET,
-				        -PJ_RETURN_OS_ERROR(iStatus.Int()));
-	    }
-	    return;
-	}
-
-	CPjSocket *pjNewSock = HandleAcceptCompletion();
-	
-	// Call callback.
-	if (cb_.on_accept_complete) {
-	    cb_.on_accept_complete( key_, op_key, (pj_sock_t)pjNewSock, 
-				    PJ_SUCCESS);
-	}
+        //
+        // Completion of asynchronous Accept()
+        //
+
+        /* Clear op_key (save it to temp variable first!) */
+        pj_ioqueue_op_key_t	*op_key = pending_data_.read_.op_key_;
+        pending_data_.read_.op_key_ = NULL;
+
+        // Handle failure condition
+        if (iStatus != KErrNone) {
+            if (pending_data_.accept_.new_sock_)
+                *pending_data_.accept_.new_sock_ = PJ_INVALID_SOCKET;
+
+            if (cb_.on_accept_complete) {
+                cb_.on_accept_complete (key_, op_key, PJ_INVALID_SOCKET,
+                                        -PJ_RETURN_OS_ERROR (iStatus.Int()));
+            }
+
+            return;
+        }
+
+        CPjSocket *pjNewSock = HandleAcceptCompletion();
+
+        // Call callback.
+        if (cb_.on_accept_complete) {
+            cb_.on_accept_complete (key_, op_key, (pj_sock_t) pjNewSock,
+                                    PJ_SUCCESS);
+        }
     }
 
     ioqueue_->eventCount++;
@@ -419,9 +412,9 @@ void CIoqueueCallback::RunL()
 void CIoqueueCallback::DoCancel()
 {
     if (type_ == TYPE_READ)
-	sock_->Socket().CancelRecv();
+        sock_->Socket().CancelRecv();
     else if (type_ == TYPE_ACCEPT)
-	sock_->Socket().CancelAccept();
+        sock_->Socket().CancelAccept();
 
     type_ = TYPE_NONE;
     pending_data_.common_.op_key_ = NULL;
@@ -430,20 +423,20 @@ void CIoqueueCallback::DoCancel()
 //
 // Cancel operation and call callback.
 //
-void CIoqueueCallback::CancelOperation(pj_ioqueue_op_key_t *op_key, 
-				       pj_ssize_t bytes_status)
+void CIoqueueCallback::CancelOperation (pj_ioqueue_op_key_t *op_key,
+                                        pj_ssize_t bytes_status)
 {
     Type cur_type = type_;
 
-    pj_assert(op_key == pending_data_.common_.op_key_);
+    pj_assert (op_key == pending_data_.common_.op_key_);
 
     Cancel();
 
     if (cur_type == TYPE_READ) {
-    	if (cb_.on_read_complete)
-    	    cb_.on_read_complete(key_, op_key, bytes_status);
+        if (cb_.on_read_complete)
+            cb_.on_read_complete (key_, op_key, bytes_status);
     } else if (cur_type == TYPE_ACCEPT)
-	;    
+        ;
 }
 
 
@@ -451,8 +444,7 @@ void CIoqueueCallback::CancelOperation(pj_ioqueue_op_key_t *op_key,
 /*
  * IO Queue key structure.
  */
-struct pj_ioqueue_key_t
-{
+struct pj_ioqueue_key_t {
     CIoqueueCallback	*cbObj;
 };
 
@@ -460,7 +452,7 @@ struct pj_ioqueue_key_t
 /*
  * Return the name of the ioqueue implementation.
  */
-PJ_DEF(const char*) pj_ioqueue_name(void)
+PJ_DEF (const char*) pj_ioqueue_name (void)
 {
     return "ioqueue-symbian";
 }
@@ -469,15 +461,15 @@ PJ_DEF(const char*) pj_ioqueue_name(void)
 /*
  * Create a new I/O Queue framework.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_create(	pj_pool_t *pool, 
-					pj_size_t max_fd,
-					pj_ioqueue_t **p_ioqueue)
+PJ_DEF (pj_status_t) pj_ioqueue_create (pj_pool_t *pool,
+                                        pj_size_t max_fd,
+                                        pj_ioqueue_t **p_ioqueue)
 {
     pj_ioqueue_t *ioq;
 
-    PJ_UNUSED_ARG(max_fd);
+    PJ_UNUSED_ARG (max_fd);
 
-    ioq = PJ_POOL_ZALLOC_T(pool, pj_ioqueue_t);
+    ioq = PJ_POOL_ZALLOC_T (pool, pj_ioqueue_t);
     *p_ioqueue = ioq;
     return PJ_SUCCESS;
 }
@@ -486,69 +478,69 @@ PJ_DEF(pj_status_t) pj_ioqueue_create(	pj_pool_t *pool,
 /*
  * Destroy the I/O queue.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_destroy( pj_ioqueue_t *ioq )
+PJ_DEF (pj_status_t) pj_ioqueue_destroy (pj_ioqueue_t *ioq)
 {
-    PJ_UNUSED_ARG(ioq);
+    PJ_UNUSED_ARG (ioq);
     return PJ_SUCCESS;
 }
 
 
 /*
- * Set the lock object to be used by the I/O Queue. 
+ * Set the lock object to be used by the I/O Queue.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_set_lock( pj_ioqueue_t *ioq, 
-					 pj_lock_t *lock,
-					 pj_bool_t auto_delete )
+PJ_DEF (pj_status_t) pj_ioqueue_set_lock (pj_ioqueue_t *ioq,
+        pj_lock_t *lock,
+        pj_bool_t auto_delete)
 {
     /* Don't really need lock for now */
-    PJ_UNUSED_ARG(ioq);
-    
+    PJ_UNUSED_ARG (ioq);
+
     if (auto_delete) {
-	pj_lock_destroy(lock);
+        pj_lock_destroy (lock);
     }
 
     return PJ_SUCCESS;
 }
 
-PJ_DEF(pj_status_t) pj_ioqueue_set_default_concurrency(pj_ioqueue_t *ioqueue,
-													   pj_bool_t allow)
+PJ_DEF (pj_status_t) pj_ioqueue_set_default_concurrency (pj_ioqueue_t *ioqueue,
+        pj_bool_t allow)
 {
-	/* Not supported, just return PJ_SUCCESS silently */
-	PJ_UNUSED_ARG(ioqueue);
-	PJ_UNUSED_ARG(allow);
-	return PJ_SUCCESS;
+    /* Not supported, just return PJ_SUCCESS silently */
+    PJ_UNUSED_ARG (ioqueue);
+    PJ_UNUSED_ARG (allow);
+    return PJ_SUCCESS;
 }
 
 /*
- * Register a socket to the I/O queue framework. 
+ * Register a socket to the I/O queue framework.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_register_sock( pj_pool_t *pool,
-					      pj_ioqueue_t *ioq,
-					      pj_sock_t sock,
-					      void *user_data,
-					      const pj_ioqueue_callback *cb,
-                                              pj_ioqueue_key_t **p_key )
+PJ_DEF (pj_status_t) pj_ioqueue_register_sock (pj_pool_t *pool,
+        pj_ioqueue_t *ioq,
+        pj_sock_t sock,
+        void *user_data,
+        const pj_ioqueue_callback *cb,
+        pj_ioqueue_key_t **p_key)
 {
     pj_ioqueue_key_t *key;
 
-    key = PJ_POOL_ZALLOC_T(pool, pj_ioqueue_key_t);
-    key->cbObj = CIoqueueCallback::NewL(ioq, key, sock, cb, user_data);
+    key = PJ_POOL_ZALLOC_T (pool, pj_ioqueue_key_t);
+    key->cbObj = CIoqueueCallback::NewL (ioq, key, sock, cb, user_data);
 
     *p_key = key;
     return PJ_SUCCESS;
 }
 
 /*
- * Unregister from the I/O Queue framework. 
+ * Unregister from the I/O Queue framework.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key )
+PJ_DEF (pj_status_t) pj_ioqueue_unregister (pj_ioqueue_key_t *key)
 {
     if (key == NULL || key->cbObj == NULL)
-	return PJ_SUCCESS;
+        return PJ_SUCCESS;
 
     // Cancel pending async object
     if (key->cbObj) {
-	key->cbObj->Cancel();
+        key->cbObj->Cancel();
     }
 
     // Close socket.
@@ -557,8 +549,8 @@ PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key )
 
     // Delete async object.
     if (key->cbObj) {
-	delete key->cbObj;
-	key->cbObj = NULL;
+        delete key->cbObj;
+        key->cbObj = NULL;
     }
 
     return PJ_SUCCESS;
@@ -568,7 +560,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key )
 /*
  * Get user data associated with an ioqueue key.
  */
-PJ_DEF(void*) pj_ioqueue_get_user_data( pj_ioqueue_key_t *key )
+PJ_DEF (void*) pj_ioqueue_get_user_data (pj_ioqueue_key_t *key)
 {
     return key->cbObj->get_user_data();
 }
@@ -578,13 +570,14 @@ PJ_DEF(void*) pj_ioqueue_get_user_data( pj_ioqueue_key_t *key )
  * Set or change the user data to be associated with the file descriptor or
  * handle or socket descriptor.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_set_user_data( pj_ioqueue_key_t *key,
-                                              void *user_data,
-                                              void **old_data)
+PJ_DEF (pj_status_t) pj_ioqueue_set_user_data (pj_ioqueue_key_t *key,
+        void *user_data,
+        void **old_data)
 {
     if (old_data)
-	*old_data = key->cbObj->get_user_data();
-    key->cbObj->set_user_data(user_data);
+        *old_data = key->cbObj->get_user_data();
+
+    key->cbObj->set_user_data (user_data);
 
     return PJ_SUCCESS;
 }
@@ -593,88 +586,90 @@ PJ_DEF(pj_status_t) pj_ioqueue_set_user_data( pj_ioqueue_key_t *key,
 /*
  * Initialize operation key.
  */
-PJ_DEF(void) pj_ioqueue_op_key_init( pj_ioqueue_op_key_t *op_key,
-				     pj_size_t size )
+PJ_DEF (void) pj_ioqueue_op_key_init (pj_ioqueue_op_key_t *op_key,
+                                      pj_size_t size)
 {
-    pj_bzero(op_key, size);
+    pj_bzero (op_key, size);
 }
 
 
 /*
  * Check if operation is pending on the specified operation key.
  */
-PJ_DEF(pj_bool_t) pj_ioqueue_is_pending( pj_ioqueue_key_t *key,
-                                         pj_ioqueue_op_key_t *op_key )
+PJ_DEF (pj_bool_t) pj_ioqueue_is_pending (pj_ioqueue_key_t *key,
+        pj_ioqueue_op_key_t *op_key)
 {
-    return key->cbObj->get_op_key()==op_key &&
-	   key->cbObj->IsActive();
+    return key->cbObj->get_op_key() ==op_key &&
+           key->cbObj->IsActive();
 }
 
 
 /*
  * Post completion status to the specified operation key and call the
- * appropriate callback. 
+ * appropriate callback.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_post_completion( pj_ioqueue_key_t *key,
-                                                pj_ioqueue_op_key_t *op_key,
-                                                pj_ssize_t bytes_status )
+PJ_DEF (pj_status_t) pj_ioqueue_post_completion (pj_ioqueue_key_t *key,
+        pj_ioqueue_op_key_t *op_key,
+        pj_ssize_t bytes_status)
 {
-    if (pj_ioqueue_is_pending(key, op_key)) {
-	key->cbObj->CancelOperation(op_key, bytes_status);
+    if (pj_ioqueue_is_pending (key, op_key)) {
+        key->cbObj->CancelOperation (op_key, bytes_status);
     }
+
     return PJ_SUCCESS;
 }
 
 
 #if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
 /**
- * Instruct I/O Queue to accept incoming connection on the specified 
+ * Instruct I/O Queue to accept incoming connection on the specified
  * listening socket.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_accept( pj_ioqueue_key_t *key,
-                                       pj_ioqueue_op_key_t *op_key,
-				       pj_sock_t *new_sock,
-				       pj_sockaddr_t *local,
-				       pj_sockaddr_t *remote,
-				       int *addrlen )
+PJ_DEF (pj_status_t) pj_ioqueue_accept (pj_ioqueue_key_t *key,
+                                        pj_ioqueue_op_key_t *op_key,
+                                        pj_sock_t *new_sock,
+                                        pj_sockaddr_t *local,
+                                        pj_sockaddr_t *remote,
+                                        int *addrlen)
 {
-    
-    return key->cbObj->StartAccept(op_key, new_sock, local, remote, addrlen);
+
+    return key->cbObj->StartAccept (op_key, new_sock, local, remote, addrlen);
 }
 
 
 /*
  * Initiate non-blocking socket connect.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_connect( pj_ioqueue_key_t *key,
-					const pj_sockaddr_t *addr,
-					int addrlen )
+PJ_DEF (pj_status_t) pj_ioqueue_connect (pj_ioqueue_key_t *key,
+        const pj_sockaddr_t *addr,
+        int addrlen)
 {
     pj_status_t status;
-    
+
     RSocket &rSock = key->cbObj->get_pj_socket()->Socket();
     TInetAddr inetAddr;
     TRequestStatus reqStatus;
 
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
-    
+
     // Convert address
-    status = PjSymbianOS::pj2Addr(*(const pj_sockaddr*)addr, addrlen, 
-    				  inetAddr);
+    status = PjSymbianOS::pj2Addr (* (const pj_sockaddr*) addr, addrlen,
+                                   inetAddr);
+
     if (status != PJ_SUCCESS)
-    	return status;
-    
+        return status;
+
     // We don't support async connect for now.
-    PJ_TODO(IOQUEUE_SUPPORT_ASYNC_CONNECT);
+    PJ_TODO (IOQUEUE_SUPPORT_ASYNC_CONNECT);
 
-    rSock.Connect(inetAddr, reqStatus);
-    User::WaitForRequest(reqStatus);
+    rSock.Connect (inetAddr, reqStatus);
+    User::WaitForRequest (reqStatus);
 
     if (reqStatus == KErrNone)
-	return PJ_SUCCESS;
+        return PJ_SUCCESS;
 
-    return PJ_RETURN_OS_ERROR(reqStatus.Int());
+    return PJ_RETURN_OS_ERROR (reqStatus.Int());
 }
 
 
@@ -683,14 +678,14 @@ PJ_DEF(pj_status_t) pj_ioqueue_connect( pj_ioqueue_key_t *key,
 /*
  * Poll the I/O Queue for completed events.
  */
-PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioq,
-			     const pj_time_val *timeout)
+PJ_DEF (int) pj_ioqueue_poll (pj_ioqueue_t *ioq,
+                              const pj_time_val *timeout)
 {
     /* Polling is not necessary on Symbian, since all async activities
      * are registered to active scheduler.
      */
-    PJ_UNUSED_ARG(ioq);
-    PJ_UNUSED_ARG(timeout);
+    PJ_UNUSED_ARG (ioq);
+    PJ_UNUSED_ARG (timeout);
     return 0;
 }
 
@@ -698,19 +693,19 @@ PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioq,
 /*
  * Instruct the I/O Queue to read from the specified handle.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_recv( pj_ioqueue_key_t *key,
-                                     pj_ioqueue_op_key_t *op_key,
-				     void *buffer,
-				     pj_ssize_t *length,
-				     pj_uint32_t flags )
+PJ_DEF (pj_status_t) pj_ioqueue_recv (pj_ioqueue_key_t *key,
+                                      pj_ioqueue_op_key_t *op_key,
+                                      void *buffer,
+                                      pj_ssize_t *length,
+                                      pj_uint32_t flags)
 {
     // If socket has reader, delete it.
     if (key->cbObj->get_pj_socket()->Reader())
-    	key->cbObj->get_pj_socket()->DestroyReader();
-    
+        key->cbObj->get_pj_socket()->DestroyReader();
+
     // Clear flag
     flags &= ~PJ_IOQUEUE_ALWAYS_ASYNC;
-    return key->cbObj->StartRead(op_key, buffer, length, flags, NULL, NULL);
+    return key->cbObj->StartRead (op_key, buffer, length, flags, NULL, NULL);
 }
 
 
@@ -719,57 +714,58 @@ PJ_DEF(pj_status_t) pj_ioqueue_recv( pj_ioqueue_key_t *key,
  * normally called for socket, and the remote address will also be returned
  * along with the data.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_recvfrom( pj_ioqueue_key_t *key,
-                                         pj_ioqueue_op_key_t *op_key,
-					 void *buffer,
-					 pj_ssize_t *length,
-                                         pj_uint32_t flags,
-					 pj_sockaddr_t *addr,
-					 int *addrlen)
+PJ_DEF (pj_status_t) pj_ioqueue_recvfrom (pj_ioqueue_key_t *key,
+        pj_ioqueue_op_key_t *op_key,
+        void *buffer,
+        pj_ssize_t *length,
+        pj_uint32_t flags,
+        pj_sockaddr_t *addr,
+        int *addrlen)
 {
     CPjSocket *sock = key->cbObj->get_pj_socket();
-    
+
     // If address is specified, check that the length match the
     // address family
     if (addr || addrlen) {
-    	PJ_ASSERT_RETURN(addr && addrlen && *addrlen, PJ_EINVAL);
-    	if (sock->GetAf() == PJ_AF_INET) {
-    	    PJ_ASSERT_RETURN(*addrlen>=(int)sizeof(pj_sockaddr_in), PJ_EINVAL);
-    	} else if (sock->GetAf() == PJ_AF_INET6) {
-    	    PJ_ASSERT_RETURN(*addrlen>=(int)sizeof(pj_sockaddr_in6), PJ_EINVAL);
-    	}
+        PJ_ASSERT_RETURN (addr && addrlen && *addrlen, PJ_EINVAL);
+
+        if (sock->GetAf() == PJ_AF_INET) {
+            PJ_ASSERT_RETURN (*addrlen>= (int) sizeof (pj_sockaddr_in), PJ_EINVAL);
+        } else if (sock->GetAf() == PJ_AF_INET6) {
+            PJ_ASSERT_RETURN (*addrlen>= (int) sizeof (pj_sockaddr_in6), PJ_EINVAL);
+        }
     }
-    
+
     // If socket has reader, delete it.
     if (sock->Reader())
-    	sock->DestroyReader();
-    
+        sock->DestroyReader();
+
     if (key->cbObj->IsActive())
-	return PJ_EBUSY;
+        return PJ_EBUSY;
 
     // Clear flag
     flags &= ~PJ_IOQUEUE_ALWAYS_ASYNC;
-    return key->cbObj->StartRead(op_key, buffer, length, flags, addr, addrlen);
+    return key->cbObj->StartRead (op_key, buffer, length, flags, addr, addrlen);
 }
 
 
 /*
  * Instruct the I/O Queue to write to the handle.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_send( pj_ioqueue_key_t *key,
-                                     pj_ioqueue_op_key_t *op_key,
-				     const void *data,
-				     pj_ssize_t *length,
-				     pj_uint32_t flags )
+PJ_DEF (pj_status_t) pj_ioqueue_send (pj_ioqueue_key_t *key,
+                                      pj_ioqueue_op_key_t *op_key,
+                                      const void *data,
+                                      pj_ssize_t *length,
+                                      pj_uint32_t flags)
 {
     TRequestStatus reqStatus;
-    TPtrC8 aBuffer((const TUint8*)data, (TInt)*length);
+    TPtrC8 aBuffer ( (const TUint8*) data, (TInt) *length);
     TSockXfrLength aLen;
-    
-    PJ_UNUSED_ARG(op_key);
+
+    PJ_UNUSED_ARG (op_key);
 
     // Forcing pending operation is not supported.
-    PJ_ASSERT_RETURN((flags & PJ_IOQUEUE_ALWAYS_ASYNC)==0, PJ_EINVAL);
+    PJ_ASSERT_RETURN ( (flags & PJ_IOQUEUE_ALWAYS_ASYNC) ==0, PJ_EINVAL);
 
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
@@ -777,11 +773,11 @@ PJ_DEF(pj_status_t) pj_ioqueue_send( pj_ioqueue_key_t *key,
     // Clear flag
     flags &= ~PJ_IOQUEUE_ALWAYS_ASYNC;
 
-    key->cbObj->get_pj_socket()->Socket().Send(aBuffer, flags, reqStatus, aLen);
-    User::WaitForRequest(reqStatus);
+    key->cbObj->get_pj_socket()->Socket().Send (aBuffer, flags, reqStatus, aLen);
+    User::WaitForRequest (reqStatus);
 
     if (reqStatus.Int() != KErrNone)
-	return PJ_RETURN_OS_ERROR(reqStatus.Int());
+        return PJ_RETURN_OS_ERROR (reqStatus.Int());
 
     //At least in UIQ Emulator, aLen.Length() reports incorrect length
     //for UDP (some newlc.com users seem to have reported this too).
@@ -793,45 +789,46 @@ PJ_DEF(pj_status_t) pj_ioqueue_send( pj_ioqueue_key_t *key,
 /*
  * Instruct the I/O Queue to write to the handle.
  */
-PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key,
-                                       pj_ioqueue_op_key_t *op_key,
-				       const void *data,
-				       pj_ssize_t *length,
-                                       pj_uint32_t flags,
-				       const pj_sockaddr_t *addr,
-				       int addrlen)
+PJ_DEF (pj_status_t) pj_ioqueue_sendto (pj_ioqueue_key_t *key,
+                                        pj_ioqueue_op_key_t *op_key,
+                                        const void *data,
+                                        pj_ssize_t *length,
+                                        pj_uint32_t flags,
+                                        const pj_sockaddr_t *addr,
+                                        int addrlen)
 {
     TRequestStatus reqStatus;
     TPtrC8 aBuffer;
     TInetAddr inetAddr;
     TSockXfrLength aLen;
     pj_status_t status;
-    
-    PJ_UNUSED_ARG(op_key);
+
+    PJ_UNUSED_ARG (op_key);
 
     // Forcing pending operation is not supported.
-    PJ_ASSERT_RETURN((flags & PJ_IOQUEUE_ALWAYS_ASYNC)==0, PJ_EINVAL);
+    PJ_ASSERT_RETURN ( (flags & PJ_IOQUEUE_ALWAYS_ASYNC) ==0, PJ_EINVAL);
 
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
 
     // Convert address
-    status = PjSymbianOS::pj2Addr(*(const pj_sockaddr*)addr, addrlen, 
-    				  inetAddr);
+    status = PjSymbianOS::pj2Addr (* (const pj_sockaddr*) addr, addrlen,
+                                   inetAddr);
+
     if (status != PJ_SUCCESS)
-    	return status;
-    
+        return status;
+
     // Clear flag
     flags &= ~PJ_IOQUEUE_ALWAYS_ASYNC;
 
-    aBuffer.Set((const TUint8*)data, (TInt)*length);
+    aBuffer.Set ( (const TUint8*) data, (TInt) *length);
     CPjSocket *pjSock = key->cbObj->get_pj_socket();
 
-    pjSock->Socket().SendTo(aBuffer, inetAddr, flags, reqStatus, aLen);
-    User::WaitForRequest(reqStatus);
+    pjSock->Socket().SendTo (aBuffer, inetAddr, flags, reqStatus, aLen);
+    User::WaitForRequest (reqStatus);
 
     if (reqStatus.Int() != KErrNone)
-	return PJ_RETURN_OS_ERROR(reqStatus.Int());
+        return PJ_RETURN_OS_ERROR (reqStatus.Int());
 
     //At least in UIQ Emulator, aLen.Length() reports incorrect length
     //for UDP (some newlc.com users seem to have reported this too).
@@ -839,25 +836,25 @@ PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key,
     return PJ_SUCCESS;
 }
 
-PJ_DEF(pj_status_t) pj_ioqueue_set_concurrency(pj_ioqueue_key_t *key,
-											   pj_bool_t allow)
+PJ_DEF (pj_status_t) pj_ioqueue_set_concurrency (pj_ioqueue_key_t *key,
+        pj_bool_t allow)
 {
-	/* Not supported, just return PJ_SUCCESS silently */
-	PJ_UNUSED_ARG(key);
-	PJ_UNUSED_ARG(allow);
-	return PJ_SUCCESS;
+    /* Not supported, just return PJ_SUCCESS silently */
+    PJ_UNUSED_ARG (key);
+    PJ_UNUSED_ARG (allow);
+    return PJ_SUCCESS;
 }
 
-PJ_DEF(pj_status_t) pj_ioqueue_lock_key(pj_ioqueue_key_t *key)
+PJ_DEF (pj_status_t) pj_ioqueue_lock_key (pj_ioqueue_key_t *key)
 {
-	/* Not supported, just return PJ_SUCCESS silently */
-	PJ_UNUSED_ARG(key);
-	return PJ_SUCCESS;
+    /* Not supported, just return PJ_SUCCESS silently */
+    PJ_UNUSED_ARG (key);
+    return PJ_SUCCESS;
 }
 
-PJ_DEF(pj_status_t) pj_ioqueue_unlock_key(pj_ioqueue_key_t *key)
+PJ_DEF (pj_status_t) pj_ioqueue_unlock_key (pj_ioqueue_key_t *key)
 {
-	/* Not supported, just return PJ_SUCCESS silently */
-	PJ_UNUSED_ARG(key);
-	return PJ_SUCCESS;
+    /* Not supported, just return PJ_SUCCESS silently */
+    PJ_UNUSED_ARG (key);
+    return PJ_SUCCESS;
 }
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/ip_helper_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/ip_helper_symbian.cpp
index 511f12331abffc5765da4130d8161c4490e3e5e3..ea47fa0e6fcbb3a6e8ff1151727832df9c96aa07 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/ip_helper_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/ip_helper_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: ip_helper_symbian.cpp 2394 2008-12-23 17:27:53Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -42,119 +42,122 @@
 #define THIS_FILE	"ip_helper_symbian.cpp"
 #define TRACE_ME	0
 
-static pj_status_t rsock_enum_interface(int af,
-					unsigned *p_cnt,
-					pj_sockaddr ifs[]) 
+static pj_status_t rsock_enum_interface (int af,
+        unsigned *p_cnt,
+        pj_sockaddr ifs[])
 {
     TInt rc;
     RSocket rSock;
     TPckgBuf<TSoInetInterfaceInfo> info;
     unsigned i;
-    
+
     if (PjSymbianOS::Instance()->Connection()) {
-    	
-    	rc = rSock.Open(PjSymbianOS::Instance()->SocketServ(), 
-    			af, PJ_SOCK_DGRAM, KProtocolInetUdp,
-    			*PjSymbianOS::Instance()->Connection());
+
+        rc = rSock.Open (PjSymbianOS::Instance()->SocketServ(),
+                         af, PJ_SOCK_DGRAM, KProtocolInetUdp,
+                         *PjSymbianOS::Instance()->Connection());
     } else {
-    	
-    	rc = rSock.Open(PjSymbianOS::Instance()->SocketServ(), 
-    			af, PJ_SOCK_DGRAM, KProtocolInetUdp);
-    			
+
+        rc = rSock.Open (PjSymbianOS::Instance()->SocketServ(),
+                         af, PJ_SOCK_DGRAM, KProtocolInetUdp);
+
     }
-        
+
     if (rc != KErrNone)
-	return PJ_RETURN_OS_ERROR(rc);
-    
-    rSock.SetOpt(KSoInetEnumInterfaces, KSolInetIfCtrl);
-    
+        return PJ_RETURN_OS_ERROR (rc);
+
+    rSock.SetOpt (KSoInetEnumInterfaces, KSolInetIfCtrl);
+
     for (i=0; i<*p_cnt &&
-    		rSock.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, 
-    		             info) == KErrNone; ) 
-    {
-    	TInetAddr &iAddress = info().iAddress;
-    	int namelen;
+            rSock.GetOpt (KSoInetNextInterface, KSolInetIfCtrl,
+                          info) == KErrNone;) {
+        TInetAddr &iAddress = info().iAddress;
+        int namelen;
 
 #if TRACE_ME
-		if (1) {
-			pj_sockaddr a;
-			char ipaddr[PJ_INET6_ADDRSTRLEN+2];
-			
-			namelen = sizeof(pj_sockaddr);
-			if (PjSymbianOS::Addr2pj(iAddress, a, &namelen, 
-									 PJ_FALSE) == PJ_SUCCESS) 
-			{
-				PJ_LOG(5,(THIS_FILE, "Enum: found address %s", 
-						pj_sockaddr_print(&a, ipaddr, sizeof(ipaddr), 2)));
-			}
-		}
+
+        if (1) {
+            pj_sockaddr a;
+            char ipaddr[PJ_INET6_ADDRSTRLEN+2];
+
+            namelen = sizeof (pj_sockaddr);
+
+            if (PjSymbianOS::Addr2pj (iAddress, a, &namelen,
+                                      PJ_FALSE) == PJ_SUCCESS) {
+                PJ_LOG (5, (THIS_FILE, "Enum: found address %s",
+                            pj_sockaddr_print (&a, ipaddr, sizeof (ipaddr), 2)));
+            }
+        }
+
 #endif
-    	
-    	namelen = sizeof(ifs[i]);
-    	if (PjSymbianOS::Addr2pj(iAddress, ifs[i], &namelen, 
-    							 PJ_TRUE) != PJ_SUCCESS)
-    	{
-    	    continue;
-    	}
-
-    	if (ifs[i].addr.sa_family != af)
-		    continue;
-    	
-    	++i;
+
+        namelen = sizeof (ifs[i]);
+
+        if (PjSymbianOS::Addr2pj (iAddress, ifs[i], &namelen,
+                                  PJ_TRUE) != PJ_SUCCESS) {
+            continue;
+        }
+
+        if (ifs[i].addr.sa_family != af)
+            continue;
+
+        ++i;
     }
-    
+
     rSock.Close();
-    
+
     // Done
     *p_cnt = i;
-    
+
     return PJ_SUCCESS;
 }
-					
+
 /*
  * Enumerate the local IP interface currently active in the host.
  */
-PJ_DEF(pj_status_t) pj_enum_ip_interface(int af,
-					 unsigned *p_cnt,
-					 pj_sockaddr ifs[])
+PJ_DEF (pj_status_t) pj_enum_ip_interface (int af,
+        unsigned *p_cnt,
+        pj_sockaddr ifs[])
 {
     unsigned start;
     pj_status_t status = PJ_SUCCESS;
 
     start = 0;
-    	    
+
     /* Get IPv6 interface first. */
     if (af==PJ_AF_INET6 || af==PJ_AF_UNSPEC) {
-    	unsigned max = *p_cnt;
-    	status = rsock_enum_interface(PJ_AF_INET6, &max, &ifs[start]);
-    	if (status == PJ_SUCCESS) {
-    	    (*p_cnt) -= max;
-    	    start += max;
-    	}
+        unsigned max = *p_cnt;
+        status = rsock_enum_interface (PJ_AF_INET6, &max, &ifs[start]);
+
+        if (status == PJ_SUCCESS) {
+            (*p_cnt) -= max;
+            start += max;
+        }
     }
-    
+
     /* Get IPv4 interface. */
     if (af==PJ_AF_INET || af==PJ_AF_UNSPEC) {
-    	unsigned max = *p_cnt;
-    	status = rsock_enum_interface(PJ_AF_INET, &max, &ifs[start]);
-    	if (status == PJ_SUCCESS) {
-    	    (*p_cnt) -= max;
-    	    start += max;
-    	}
+        unsigned max = *p_cnt;
+        status = rsock_enum_interface (PJ_AF_INET, &max, &ifs[start]);
+
+        if (status == PJ_SUCCESS) {
+            (*p_cnt) -= max;
+            start += max;
+        }
     }
-    
+
     *p_cnt = start;
-    
+
     return start ? PJ_SUCCESS : PJ_ENOTFOUND;
 }
 
 /*
  * Enumerate the IP routing table for this host.
  */
-PJ_DEF(pj_status_t) pj_enum_ip_route(unsigned *p_cnt,
-				     pj_ip_route_entry routes[])
+PJ_DEF (pj_status_t) pj_enum_ip_route (unsigned *p_cnt,
+                                       pj_ip_route_entry routes[])
 {
-    PJ_ASSERT_RETURN(p_cnt && *p_cnt > 0 && routes, PJ_EINVAL);
+    PJ_ASSERT_RETURN (p_cnt && *p_cnt > 0 && routes, PJ_EINVAL);
     *p_cnt = 0;
     return PJ_ENOTSUP;
 }
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/log_writer_symbian_console.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/log_writer_symbian_console.cpp
index 26e4c7307cbfc6ae66a0501287c56a5cc61c7ef1..1d9b315f6d815e74947a553f6ee70b45504ab899 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/log_writer_symbian_console.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/log_writer_symbian_console.cpp
@@ -1,5 +1,5 @@
 /* $Id: log_writer_symbian_console.cpp 2394 2008-12-23 17:27:53Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -35,21 +35,21 @@
 #include "os_symbian.h"
 #include <e32cons.h>
 
-PJ_DEF(void) pj_log_write(int level, const char *buffer, int len)
+PJ_DEF (void) pj_log_write (int level, const char *buffer, int len)
 {
 #if 0
     wchar_t wbuffer[PJ_LOG_MAX_SIZE];
     CConsoleBase *cons = PjSymbianOS::Instance->Console();
 
-    pj_ansi_to_unicode(buffer, len, wbuffer, PJ_ARRAY_SIZE(wbuffer));
+    pj_ansi_to_unicode (buffer, len, wbuffer, PJ_ARRAY_SIZE (wbuffer));
 
-    
-    TPtrC16 aPtr((TUint16*)wbuffer, len);
-    console->Write(aPtr);
+
+    TPtrC16 aPtr ( (TUint16*) wbuffer, len);
+    console->Write (aPtr);
 #else
-    PJ_UNUSED_ARG(level);
-    PJ_UNUSED_ARG(buffer);
-    PJ_UNUSED_ARG(len);
+    PJ_UNUSED_ARG (level);
+    PJ_UNUSED_ARG (buffer);
+    PJ_UNUSED_ARG (len);
 #endif
 }
 
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/os_core_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/os_core_symbian.cpp
index 7ef1e1173ff7686a60563068c4285731e2c8fee9..ac5c2f1399ab1edac833e42d80d3c2939d8e0424 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/os_core_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/os_core_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: os_core_symbian.cpp 2853 2009-08-05 10:58:02Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -46,15 +46,14 @@
 #define DUMMY_MUTEX	    ((pj_mutex_t*)101)
 #define DUMMY_SEMAPHORE	    ((pj_sem_t*)102)
 #define THIS_FILE	    "os_core_symbian.c"
- 
+
 /*
  * Note:
  *
  * The Symbian implementation does not support threading!
- */ 
+ */
 
-struct pj_thread_t
-{
+struct pj_thread_t {
     char	    obj_name[PJ_MAX_OBJ_NAME];
     void	   *tls_values[PJ_MAX_TLS];
 
@@ -68,13 +67,11 @@ struct pj_thread_t
 
 } main_thread;
 
-struct pj_atomic_t
-{
+struct pj_atomic_t {
     pj_atomic_value_t	value;
 };
 
-struct pj_sem_t
-{
+struct pj_sem_t {
     int value;
     int max;
 };
@@ -84,7 +81,7 @@ static int tls_vars[PJ_MAX_TLS];
 
 /* atexit handlers */
 static unsigned atexit_count;
-static void (*atexit_func[32])(void);
+static void (*atexit_func[32]) (void);
 
 
 
@@ -95,7 +92,7 @@ static void (*atexit_func[32])(void);
 //
 
 CPjTimeoutTimer::CPjTimeoutTimer()
-: CActive(PJ_SYMBIAN_TIMER_PRIORITY), hasTimedOut_(PJ_FALSE)
+        : CActive (PJ_SYMBIAN_TIMER_PRIORITY), hasTimedOut_ (PJ_FALSE)
 {
 }
 
@@ -109,27 +106,27 @@ void CPjTimeoutTimer::ConstructL()
 {
     hasTimedOut_ = PJ_FALSE;
     timer_.CreateLocal();
-    CActiveScheduler::Add(this);
+    CActiveScheduler::Add (this);
 }
 
 CPjTimeoutTimer *CPjTimeoutTimer::NewL()
 {
     CPjTimeoutTimer *self = new CPjTimeoutTimer;
-    CleanupStack::PushL(self);
+    CleanupStack::PushL (self);
 
     self->ConstructL();
 
-    CleanupStack::Pop(self);
+    CleanupStack::Pop (self);
     return self;
 
 }
 
-void CPjTimeoutTimer::StartTimer(TUint miliSeconds)
+void CPjTimeoutTimer::StartTimer (TUint miliSeconds)
 {
     Cancel();
 
     hasTimedOut_ = PJ_FALSE;
-    timer_.After(iStatus, miliSeconds * 1000);
+    timer_.After (iStatus, miliSeconds * 1000);
     SetActive();
 }
 
@@ -148,9 +145,9 @@ void CPjTimeoutTimer::DoCancel()
     timer_.Cancel();
 }
 
-TInt CPjTimeoutTimer::RunError(TInt aError)
+TInt CPjTimeoutTimer::RunError (TInt aError)
 {
-    PJ_UNUSED_ARG(aError);
+    PJ_UNUSED_ARG (aError);
     return KErrNone;
 }
 
@@ -162,16 +159,16 @@ TInt CPjTimeoutTimer::RunError(TInt aError)
 //
 
 PjSymbianOS::PjSymbianOS()
-: isConnectionUp_(false),
-  isSocketServInitialized_(false), isResolverInitialized_(false),
-  console_(NULL), selectTimeoutTimer_(NULL),
-  appSocketServ_(NULL), appConnection_(NULL), appHostResolver_(NULL),
-  appHostResolver6_(NULL)
+        : isConnectionUp_ (false),
+        isSocketServInitialized_ (false), isResolverInitialized_ (false),
+        console_ (NULL), selectTimeoutTimer_ (NULL),
+        appSocketServ_ (NULL), appConnection_ (NULL), appHostResolver_ (NULL),
+        appHostResolver6_ (NULL)
 {
 }
 
 // Set parameters
-void PjSymbianOS::SetParameters(pj_symbianos_params *params) 
+void PjSymbianOS::SetParameters (pj_symbianos_params *params)
 {
     appSocketServ_ = (RSocketServ*) params->rsocketserv;
     appConnection_ = (RConnection*) params->rconnection;
@@ -195,9 +192,9 @@ TInt PjSymbianOS::Initialize()
     selectTimeoutTimer_ = CPjTimeoutTimer::NewL();
 
 #if 0
-    pj_assert(console_ == NULL);
-    TRAPD(err, console_ = Console::NewL(_L("PJLIB"), 
-				        TSize(KConsFullScreen,KConsFullScreen)));
+    pj_assert (console_ == NULL);
+    TRAPD (err, console_ = Console::NewL (_L ("PJLIB"),
+                                          TSize (KConsFullScreen,KConsFullScreen)));
     return err;
 #endif
 
@@ -205,44 +202,47 @@ TInt PjSymbianOS::Initialize()
      * in the parameters
      */
     if (!isSocketServInitialized_ && appSocketServ_ == NULL) {
-	err = socketServ_.Connect();
-	if (err != KErrNone)
-	    goto on_error;
+        err = socketServ_.Connect();
+
+        if (err != KErrNone)
+            goto on_error;
 
-	isSocketServInitialized_ = true;
+        isSocketServInitialized_ = true;
     }
 
     if (!isResolverInitialized_) {
-    	if (appHostResolver_ == NULL) {
-    	    if (Connection())
-    	    	err = hostResolver_.Open(SocketServ(), KAfInet, KSockStream,
-    	    			     	 *Connection());
-    	    else
-	    	err = hostResolver_.Open(SocketServ(), KAfInet, KSockStream);
-    	
-	    if (err != KErrNone)
-	    	goto on_error;
-    	}
-    	
+        if (appHostResolver_ == NULL) {
+            if (Connection())
+                err = hostResolver_.Open (SocketServ(), KAfInet, KSockStream,
+                                          *Connection());
+            else
+                err = hostResolver_.Open (SocketServ(), KAfInet, KSockStream);
+
+            if (err != KErrNone)
+                goto on_error;
+        }
+
 #if defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0
-    	if (appHostResolver6_ == NULL) {
-    	    if (Connection())
-    	    	err = hostResolver6_.Open(SocketServ(), KAfInet6, KSockStream,
-    	    			     	  *Connection());
-    	    else
-	    	err = hostResolver6_.Open(SocketServ(), KAfInet6, KSockStream);
-    	
-	    if (err != KErrNone)
-	    	goto on_error;
-    	}
+
+        if (appHostResolver6_ == NULL) {
+            if (Connection())
+                err = hostResolver6_.Open (SocketServ(), KAfInet6, KSockStream,
+                                           *Connection());
+            else
+                err = hostResolver6_.Open (SocketServ(), KAfInet6, KSockStream);
+
+            if (err != KErrNone)
+                goto on_error;
+        }
+
 #endif
-    	
-    	
-	isResolverInitialized_ = true;
+
+
+        isResolverInitialized_ = true;
     }
 
     isConnectionUp_ = true;
-    
+
     return KErrNone;
 
 on_error:
@@ -254,18 +254,18 @@ on_error:
 void PjSymbianOS::Shutdown()
 {
     isConnectionUp_ = false;
-    
+
     if (isResolverInitialized_) {
-		hostResolver_.Close();
+        hostResolver_.Close();
 #if defined(PJ_HAS_IPV6) && PJ_HAS_IPV6!=0
-    	hostResolver6_.Close();
+        hostResolver6_.Close();
 #endif
-    	isResolverInitialized_ = false;
+        isResolverInitialized_ = false;
     }
 
     if (isSocketServInitialized_) {
-	socketServ_.Close();
-	isSocketServInitialized_ = false;
+        socketServ_.Close();
+        isSocketServInitialized_ = false;
     }
 
     delete console_;
@@ -273,7 +273,7 @@ void PjSymbianOS::Shutdown()
 
     delete selectTimeoutTimer_;
     selectTimeoutTimer_ = NULL;
-    
+
     appSocketServ_ = NULL;
     appConnection_ = NULL;
     appHostResolver_ = NULL;
@@ -281,24 +281,24 @@ void PjSymbianOS::Shutdown()
 }
 
 // Convert to Unicode
-TInt PjSymbianOS::ConvertToUnicode(TDes16 &aUnicode, const TDesC8 &aForeign)
+TInt PjSymbianOS::ConvertToUnicode (TDes16 &aUnicode, const TDesC8 &aForeign)
 {
 #if 0
-    pj_assert(conv_ != NULL);
-    return conv_->ConvertToUnicode(aUnicode, aForeign, convToUnicodeState_);
+    pj_assert (conv_ != NULL);
+    return conv_->ConvertToUnicode (aUnicode, aForeign, convToUnicodeState_);
 #else
-    return CnvUtfConverter::ConvertToUnicodeFromUtf8(aUnicode, aForeign);
+    return CnvUtfConverter::ConvertToUnicodeFromUtf8 (aUnicode, aForeign);
 #endif
 }
 
 // Convert from Unicode
-TInt PjSymbianOS::ConvertFromUnicode(TDes8 &aForeign, const TDesC16 &aUnicode)
+TInt PjSymbianOS::ConvertFromUnicode (TDes8 &aForeign, const TDesC16 &aUnicode)
 {
 #if 0
-    pj_assert(conv_ != NULL);
-    return conv_->ConvertFromUnicode(aForeign, aUnicode, convToAnsiState_);
+    pj_assert (conv_ != NULL);
+    return conv_->ConvertFromUnicode (aForeign, aUnicode, convToAnsiState_);
 #else
-    return CnvUtfConverter::ConvertFromUnicodeToUtf8(aForeign, aUnicode);
+    return CnvUtfConverter::ConvertFromUnicodeToUtf8 (aForeign, aUnicode);
 #endif
 }
 
@@ -308,25 +308,25 @@ TInt PjSymbianOS::ConvertFromUnicode(TDes8 &aForeign, const TDesC16 &aUnicode)
 // PJLIB os.h implementation
 //
 
-PJ_DEF(pj_uint32_t) pj_getpid(void)
+PJ_DEF (pj_uint32_t) pj_getpid (void)
 {
     return 0;
 }
 
 
 /* Set Symbian specific parameters */
-PJ_DEF(pj_status_t) pj_symbianos_set_params(pj_symbianos_params *prm) 
+PJ_DEF (pj_status_t) pj_symbianos_set_params (pj_symbianos_params *prm)
 {
-    PJ_ASSERT_RETURN(prm != NULL, PJ_EINVAL);
-    PjSymbianOS::Instance()->SetParameters(prm);
+    PJ_ASSERT_RETURN (prm != NULL, PJ_EINVAL);
+    PjSymbianOS::Instance()->SetParameters (prm);
     return PJ_SUCCESS;
 }
 
 
 /* Set connection status */
-PJ_DEF(void) pj_symbianos_set_connection_status(pj_bool_t up)
+PJ_DEF (void) pj_symbianos_set_connection_status (pj_bool_t up)
 {
-    PjSymbianOS::Instance()->SetConnectionStatus(up != 0);
+    PjSymbianOS::Instance()->SetConnectionStatus (up != 0);
 }
 
 
@@ -334,33 +334,35 @@ PJ_DEF(void) pj_symbianos_set_connection_status(pj_bool_t up)
  * pj_init(void).
  * Init PJLIB!
  */
-PJ_DEF(pj_status_t) pj_init(void)
+PJ_DEF (pj_status_t) pj_init (void)
 {
-	char stack_ptr;
+    char stack_ptr;
     pj_status_t status;
-    
-    pj_ansi_strcpy(main_thread.obj_name, "pjthread");
+
+    pj_ansi_strcpy (main_thread.obj_name, "pjthread");
 
     // Init main thread
-    pj_memset(&main_thread, 0, sizeof(main_thread));
+    pj_memset (&main_thread, 0, sizeof (main_thread));
 
     // Initialize PjSymbianOS instance
     PjSymbianOS *os = PjSymbianOS::Instance();
 
-    PJ_LOG(4,(THIS_FILE, "Initializing PJLIB for Symbian OS.."));
+    PJ_LOG (4, (THIS_FILE, "Initializing PJLIB for Symbian OS.."));
 
-    TInt err; 
+    TInt err;
     err = os->Initialize();
+
     if (err != KErrNone)
-    	return PJ_RETURN_OS_ERROR(err);
+        return PJ_RETURN_OS_ERROR (err);
 
     /* Init logging */
     pj_log_init();
 
-    /* Initialize exception ID for the pool. 
+    /* Initialize exception ID for the pool.
      * Must do so after critical section is configured.
-     */ 
-    status = pj_exception_id_alloc("PJLIB/No memory", &PJ_NO_MEMORY_EXCEPTION);
+     */
+    status = pj_exception_id_alloc ("PJLIB/No memory", &PJ_NO_MEMORY_EXCEPTION);
+
     if (status != PJ_SUCCESS)
         goto on_error;
 
@@ -372,19 +374,19 @@ PJ_DEF(pj_status_t) pj_init(void)
     stack_ptr = '\0';
 #endif
 
-    PJ_LOG(5,(THIS_FILE, "PJLIB initialized."));
+    PJ_LOG (5, (THIS_FILE, "PJLIB initialized."));
     return PJ_SUCCESS;
 
 on_error:
     pj_shutdown();
-    return PJ_RETURN_OS_ERROR(err);
+    return PJ_RETURN_OS_ERROR (err);
 }
 
 
-PJ_DEF(pj_status_t) pj_atexit(pj_exit_callback func)
+PJ_DEF (pj_status_t) pj_atexit (pj_exit_callback func)
 {
-    if (atexit_count >= PJ_ARRAY_SIZE(atexit_func))
-	return PJ_ETOOMANY;
+    if (atexit_count >= PJ_ARRAY_SIZE (atexit_func))
+        return PJ_ETOOMANY;
 
     atexit_func[atexit_count++] = func;
     return PJ_SUCCESS;
@@ -392,18 +394,18 @@ PJ_DEF(pj_status_t) pj_atexit(pj_exit_callback func)
 
 
 
-PJ_DEF(void) pj_shutdown(void)
+PJ_DEF (void) pj_shutdown (void)
 {
     /* Call atexit() functions */
     while (atexit_count > 0) {
-	(*atexit_func[atexit_count-1])();
-	--atexit_count;
+        (*atexit_func[atexit_count-1]) ();
+        --atexit_count;
     }
 
     /* Free exception ID */
     if (PJ_NO_MEMORY_EXCEPTION != -1) {
-	pj_exception_id_free(PJ_NO_MEMORY_EXCEPTION);
-	PJ_NO_MEMORY_EXCEPTION = -1;
+        pj_exception_id_free (PJ_NO_MEMORY_EXCEPTION);
+        PJ_NO_MEMORY_EXCEPTION = -1;
     }
 
     /* Clear static variables */
@@ -415,88 +417,88 @@ PJ_DEF(void) pj_shutdown(void)
 
 /////////////////////////////////////////////////////////////////////////////
 
-class CPollTimeoutTimer : public CActive 
+class CPollTimeoutTimer : public CActive
 {
-public:
-    static CPollTimeoutTimer* NewL(int msec, TInt prio);
-    ~CPollTimeoutTimer();
-    
-    virtual void RunL();
-    virtual void DoCancel();
+    public:
+        static CPollTimeoutTimer* NewL (int msec, TInt prio);
+        ~CPollTimeoutTimer();
 
-private:	
-    RTimer	     rtimer_;
-    
-    explicit CPollTimeoutTimer(TInt prio);
-    void ConstructL(int msec);
+        virtual void RunL();
+        virtual void DoCancel();
+
+    private:
+        RTimer	     rtimer_;
+
+        explicit CPollTimeoutTimer (TInt prio);
+        void ConstructL (int msec);
 };
 
-CPollTimeoutTimer::CPollTimeoutTimer(TInt prio)
-: CActive(prio)
+CPollTimeoutTimer::CPollTimeoutTimer (TInt prio)
+        : CActive (prio)
 {
 }
 
 
-CPollTimeoutTimer::~CPollTimeoutTimer() 
+CPollTimeoutTimer::~CPollTimeoutTimer()
 {
     rtimer_.Close();
 }
 
-void CPollTimeoutTimer::ConstructL(int msec) 
+void CPollTimeoutTimer::ConstructL (int msec)
 {
     rtimer_.CreateLocal();
-    CActiveScheduler::Add(this);
-    rtimer_.After(iStatus, msec*1000);
+    CActiveScheduler::Add (this);
+    rtimer_.After (iStatus, msec*1000);
     SetActive();
 }
 
-CPollTimeoutTimer* CPollTimeoutTimer::NewL(int msec, TInt prio) 
+CPollTimeoutTimer* CPollTimeoutTimer::NewL (int msec, TInt prio)
 {
-    CPollTimeoutTimer *self = new CPollTimeoutTimer(prio);
-    CleanupStack::PushL(self);
-    self->ConstructL(msec);    
-    CleanupStack::Pop(self);
+    CPollTimeoutTimer *self = new CPollTimeoutTimer (prio);
+    CleanupStack::PushL (self);
+    self->ConstructL (msec);
+    CleanupStack::Pop (self);
 
     return self;
 }
 
-void CPollTimeoutTimer::RunL() 
+void CPollTimeoutTimer::RunL()
 {
 }
 
-void CPollTimeoutTimer::DoCancel() 
+void CPollTimeoutTimer::DoCancel()
 {
-     rtimer_.Cancel();
+    rtimer_.Cancel();
 }
 
 
 /*
- * Wait the completion of any Symbian active objects. 
+ * Wait the completion of any Symbian active objects.
  */
-PJ_DEF(pj_bool_t) pj_symbianos_poll(int priority, int ms_timeout)
+PJ_DEF (pj_bool_t) pj_symbianos_poll (int priority, int ms_timeout)
 {
     CPollTimeoutTimer *timer = NULL;
-    
+
     if (priority==-1)
-    	priority = EPriorityNull;
-    
+        priority = EPriorityNull;
+
     if (ms_timeout >= 0) {
-    	timer = CPollTimeoutTimer::NewL(ms_timeout, priority);
+        timer = CPollTimeoutTimer::NewL (ms_timeout, priority);
     }
-    
-    PjSymbianOS::Instance()->WaitForActiveObjects(priority);
-    
+
+    PjSymbianOS::Instance()->WaitForActiveObjects (priority);
+
     if (timer) {
         bool timer_is_active = timer->IsActive();
-    
-	timer->Cancel();
-        
+
+        timer->Cancel();
+
         delete timer;
-        
-    	return timer_is_active ? PJ_TRUE : PJ_FALSE;
-    	
+
+        return timer_is_active ? PJ_TRUE : PJ_FALSE;
+
     } else {
-    	return PJ_TRUE;
+        return PJ_TRUE;
     }
 }
 
@@ -504,7 +506,7 @@ PJ_DEF(pj_bool_t) pj_symbianos_poll(int priority, int ms_timeout)
 /*
  * pj_thread_is_registered()
  */
-PJ_DEF(pj_bool_t) pj_thread_is_registered(void)
+PJ_DEF (pj_bool_t) pj_thread_is_registered (void)
 {
     return PJ_FALSE;
 }
@@ -513,9 +515,9 @@ PJ_DEF(pj_bool_t) pj_thread_is_registered(void)
 /*
  * Get thread priority value for the thread.
  */
-PJ_DEF(int) pj_thread_get_prio(pj_thread_t *thread)
+PJ_DEF (int) pj_thread_get_prio (pj_thread_t *thread)
 {
-    PJ_UNUSED_ARG(thread);
+    PJ_UNUSED_ARG (thread);
     return 1;
 }
 
@@ -523,10 +525,10 @@ PJ_DEF(int) pj_thread_get_prio(pj_thread_t *thread)
 /*
  * Set the thread priority.
  */
-PJ_DEF(pj_status_t) pj_thread_set_prio(pj_thread_t *thread,  int prio)
+PJ_DEF (pj_status_t) pj_thread_set_prio (pj_thread_t *thread,  int prio)
 {
-    PJ_UNUSED_ARG(thread);
-    PJ_UNUSED_ARG(prio);
+    PJ_UNUSED_ARG (thread);
+    PJ_UNUSED_ARG (prio);
     return PJ_SUCCESS;
 }
 
@@ -534,9 +536,9 @@ PJ_DEF(pj_status_t) pj_thread_set_prio(pj_thread_t *thread,  int prio)
 /*
  * Get the lowest priority value available on this system.
  */
-PJ_DEF(int) pj_thread_get_prio_min(pj_thread_t *thread)
+PJ_DEF (int) pj_thread_get_prio_min (pj_thread_t *thread)
 {
-    PJ_UNUSED_ARG(thread);
+    PJ_UNUSED_ARG (thread);
     return 1;
 }
 
@@ -544,9 +546,9 @@ PJ_DEF(int) pj_thread_get_prio_min(pj_thread_t *thread)
 /*
  * Get the highest priority value available on this system.
  */
-PJ_DEF(int) pj_thread_get_prio_max(pj_thread_t *thread)
+PJ_DEF (int) pj_thread_get_prio_max (pj_thread_t *thread)
 {
-    PJ_UNUSED_ARG(thread);
+    PJ_UNUSED_ARG (thread);
     return 1;
 }
 
@@ -554,22 +556,22 @@ PJ_DEF(int) pj_thread_get_prio_max(pj_thread_t *thread)
 /*
  * pj_thread_get_os_handle()
  */
-PJ_DEF(void*) pj_thread_get_os_handle(pj_thread_t *thread) 
+PJ_DEF (void*) pj_thread_get_os_handle (pj_thread_t *thread)
 {
-    PJ_UNUSED_ARG(thread);
+    PJ_UNUSED_ARG (thread);
     return NULL;
 }
 
 /*
  * pj_thread_register(..)
  */
-PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name,
-					 pj_thread_desc desc,
-                                         pj_thread_t **thread_ptr)
+PJ_DEF (pj_status_t) pj_thread_register (const char *cstr_thread_name,
+        pj_thread_desc desc,
+        pj_thread_t **thread_ptr)
 {
-    PJ_UNUSED_ARG(cstr_thread_name);
-    PJ_UNUSED_ARG(desc);
-    PJ_UNUSED_ARG(thread_ptr);
+    PJ_UNUSED_ARG (cstr_thread_name);
+    PJ_UNUSED_ARG (desc);
+    PJ_UNUSED_ARG (thread_ptr);
     return PJ_EINVALIDOP;
 }
 
@@ -577,21 +579,21 @@ PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name,
 /*
  * pj_thread_create(...)
  */
-PJ_DEF(pj_status_t) pj_thread_create( pj_pool_t *pool, 
-				      const char *thread_name,
-				      pj_thread_proc *proc, 
-				      void *arg,
-				      pj_size_t stack_size, 
-				      unsigned flags,
-				      pj_thread_t **ptr_thread)
-{
-    PJ_UNUSED_ARG(pool);
-    PJ_UNUSED_ARG(thread_name);
-    PJ_UNUSED_ARG(proc);
-    PJ_UNUSED_ARG(arg);
-    PJ_UNUSED_ARG(stack_size);
-    PJ_UNUSED_ARG(flags);
-    PJ_UNUSED_ARG(ptr_thread);
+PJ_DEF (pj_status_t) pj_thread_create (pj_pool_t *pool,
+                                       const char *thread_name,
+                                       pj_thread_proc *proc,
+                                       void *arg,
+                                       pj_size_t stack_size,
+                                       unsigned flags,
+                                       pj_thread_t **ptr_thread)
+{
+    PJ_UNUSED_ARG (pool);
+    PJ_UNUSED_ARG (thread_name);
+    PJ_UNUSED_ARG (proc);
+    PJ_UNUSED_ARG (arg);
+    PJ_UNUSED_ARG (stack_size);
+    PJ_UNUSED_ARG (flags);
+    PJ_UNUSED_ARG (ptr_thread);
 
     /* Sorry mate, we don't support threading */
     return PJ_ENOTSUP;
@@ -600,25 +602,25 @@ PJ_DEF(pj_status_t) pj_thread_create( pj_pool_t *pool,
 /*
  * pj_thread-get_name()
  */
-PJ_DEF(const char*) pj_thread_get_name(pj_thread_t *p)
+PJ_DEF (const char*) pj_thread_get_name (pj_thread_t *p)
 {
-    pj_assert(p == &main_thread);
+    pj_assert (p == &main_thread);
     return p->obj_name;
 }
 
 /*
  * pj_thread_resume()
  */
-PJ_DEF(pj_status_t) pj_thread_resume(pj_thread_t *p)
+PJ_DEF (pj_status_t) pj_thread_resume (pj_thread_t *p)
 {
-    PJ_UNUSED_ARG(p);
+    PJ_UNUSED_ARG (p);
     return PJ_EINVALIDOP;
 }
 
 /*
  * pj_thread_this()
  */
-PJ_DEF(pj_thread_t*) pj_thread_this(void)
+PJ_DEF (pj_thread_t*) pj_thread_this (void)
 {
     return &main_thread;
 }
@@ -626,27 +628,27 @@ PJ_DEF(pj_thread_t*) pj_thread_this(void)
 /*
  * pj_thread_join()
  */
-PJ_DEF(pj_status_t) pj_thread_join(pj_thread_t *rec)
+PJ_DEF (pj_status_t) pj_thread_join (pj_thread_t *rec)
 {
-    PJ_UNUSED_ARG(rec);
+    PJ_UNUSED_ARG (rec);
     return PJ_EINVALIDOP;
 }
 
 /*
  * pj_thread_destroy()
  */
-PJ_DEF(pj_status_t) pj_thread_destroy(pj_thread_t *rec)
+PJ_DEF (pj_status_t) pj_thread_destroy (pj_thread_t *rec)
 {
-    PJ_UNUSED_ARG(rec);
+    PJ_UNUSED_ARG (rec);
     return PJ_EINVALIDOP;
 }
 
 /*
  * pj_thread_sleep()
  */
-PJ_DEF(pj_status_t) pj_thread_sleep(unsigned msec)
+PJ_DEF (pj_status_t) pj_thread_sleep (unsigned msec)
 {
-    User::After(msec*1000);
+    User::After (msec*1000);
 
     return PJ_SUCCESS;
 }
@@ -657,18 +659,18 @@ PJ_DEF(pj_status_t) pj_thread_sleep(unsigned msec)
  * pj_thread_local_alloc()
  */
 
-PJ_DEF(pj_status_t) pj_thread_local_alloc(long *index)
+PJ_DEF (pj_status_t) pj_thread_local_alloc (long *index)
 {
     unsigned i;
 
     /* Find unused TLS variable */
-    for (i=0; i<PJ_ARRAY_SIZE(tls_vars); ++i) {
-	if (tls_vars[i] == 0)
-	    break;
+    for (i=0; i<PJ_ARRAY_SIZE (tls_vars); ++i) {
+        if (tls_vars[i] == 0)
+            break;
     }
 
-    if (i == PJ_ARRAY_SIZE(tls_vars))
-	return PJ_ETOOMANY;
+    if (i == PJ_ARRAY_SIZE (tls_vars))
+        return PJ_ETOOMANY;
 
     tls_vars[i] = 1;
     *index = i;
@@ -679,10 +681,10 @@ PJ_DEF(pj_status_t) pj_thread_local_alloc(long *index)
 /*
  * pj_thread_local_free()
  */
-PJ_DEF(void) pj_thread_local_free(long index)
+PJ_DEF (void) pj_thread_local_free (long index)
 {
-    PJ_ASSERT_ON_FAIL(index >= 0 && index < (int)PJ_ARRAY_SIZE(tls_vars) &&
-		     tls_vars[index] != 0, return);
+    PJ_ASSERT_ON_FAIL (index >= 0 && index < (int) PJ_ARRAY_SIZE (tls_vars) &&
+                       tls_vars[index] != 0, return);
 
     tls_vars[index] = 0;
 }
@@ -691,12 +693,12 @@ PJ_DEF(void) pj_thread_local_free(long index)
 /*
  * pj_thread_local_set()
  */
-PJ_DEF(pj_status_t) pj_thread_local_set(long index, void *value)
+PJ_DEF (pj_status_t) pj_thread_local_set (long index, void *value)
 {
     pj_thread_t *rec = pj_thread_this();
 
-    PJ_ASSERT_RETURN(index >= 0 && index < (int)PJ_ARRAY_SIZE(tls_vars) &&
-		     tls_vars[index] != 0, PJ_EINVAL);
+    PJ_ASSERT_RETURN (index >= 0 && index < (int) PJ_ARRAY_SIZE (tls_vars) &&
+                      tls_vars[index] != 0, PJ_EINVAL);
 
     rec->tls_values[index] = value;
     return PJ_SUCCESS;
@@ -705,12 +707,12 @@ PJ_DEF(pj_status_t) pj_thread_local_set(long index, void *value)
 /*
  * pj_thread_local_get()
  */
-PJ_DEF(void*) pj_thread_local_get(long index)
+PJ_DEF (void*) pj_thread_local_get (long index)
 {
     pj_thread_t *rec = pj_thread_this();
 
-    PJ_ASSERT_RETURN(index >= 0 && index < (int)PJ_ARRAY_SIZE(tls_vars) &&
-		     tls_vars[index] != 0, NULL);
+    PJ_ASSERT_RETURN (index >= 0 && index < (int) PJ_ARRAY_SIZE (tls_vars) &&
+                      tls_vars[index] != 0, NULL);
 
     return rec->tls_values[index];
 }
@@ -720,11 +722,11 @@ PJ_DEF(void*) pj_thread_local_get(long index)
 /*
  * Create atomic variable.
  */
-PJ_DEF(pj_status_t) pj_atomic_create( pj_pool_t *pool, 
-				      pj_atomic_value_t initial,
-				      pj_atomic_t **atomic )
+PJ_DEF (pj_status_t) pj_atomic_create (pj_pool_t *pool,
+                                       pj_atomic_value_t initial,
+                                       pj_atomic_t **atomic)
 {
-    *atomic = (pj_atomic_t*)pj_pool_alloc(pool, sizeof(struct pj_atomic_t));
+    *atomic = (pj_atomic_t*) pj_pool_alloc (pool, sizeof (struct pj_atomic_t));
     (*atomic)->value = initial;
     return PJ_SUCCESS;
 }
@@ -733,9 +735,9 @@ PJ_DEF(pj_status_t) pj_atomic_create( pj_pool_t *pool,
 /*
  * Destroy atomic variable.
  */
-PJ_DEF(pj_status_t) pj_atomic_destroy( pj_atomic_t *atomic_var )
+PJ_DEF (pj_status_t) pj_atomic_destroy (pj_atomic_t *atomic_var)
 {
-    PJ_UNUSED_ARG(atomic_var);
+    PJ_UNUSED_ARG (atomic_var);
     return PJ_SUCCESS;
 }
 
@@ -743,8 +745,8 @@ PJ_DEF(pj_status_t) pj_atomic_destroy( pj_atomic_t *atomic_var )
 /*
  * Set the value of an atomic type, and return the previous value.
  */
-PJ_DEF(void) pj_atomic_set( pj_atomic_t *atomic_var, 
-			    pj_atomic_value_t value)
+PJ_DEF (void) pj_atomic_set (pj_atomic_t *atomic_var,
+                             pj_atomic_value_t value)
 {
     atomic_var->value = value;
 }
@@ -753,7 +755,7 @@ PJ_DEF(void) pj_atomic_set( pj_atomic_t *atomic_var,
 /*
  * Get the value of an atomic type.
  */
-PJ_DEF(pj_atomic_value_t) pj_atomic_get(pj_atomic_t *atomic_var)
+PJ_DEF (pj_atomic_value_t) pj_atomic_get (pj_atomic_t *atomic_var)
 {
     return atomic_var->value;
 }
@@ -762,7 +764,7 @@ PJ_DEF(pj_atomic_value_t) pj_atomic_get(pj_atomic_t *atomic_var)
 /*
  * Increment the value of an atomic type.
  */
-PJ_DEF(void) pj_atomic_inc(pj_atomic_t *atomic_var)
+PJ_DEF (void) pj_atomic_inc (pj_atomic_t *atomic_var)
 {
     ++atomic_var->value;
 }
@@ -771,7 +773,7 @@ PJ_DEF(void) pj_atomic_inc(pj_atomic_t *atomic_var)
 /*
  * Increment the value of an atomic type and get the result.
  */
-PJ_DEF(pj_atomic_value_t) pj_atomic_inc_and_get(pj_atomic_t *atomic_var)
+PJ_DEF (pj_atomic_value_t) pj_atomic_inc_and_get (pj_atomic_t *atomic_var)
 {
     return ++atomic_var->value;
 }
@@ -780,16 +782,16 @@ PJ_DEF(pj_atomic_value_t) pj_atomic_inc_and_get(pj_atomic_t *atomic_var)
 /*
  * Decrement the value of an atomic type.
  */
-PJ_DEF(void) pj_atomic_dec(pj_atomic_t *atomic_var)
+PJ_DEF (void) pj_atomic_dec (pj_atomic_t *atomic_var)
 {
     --atomic_var->value;
-}	
+}
 
 
 /*
  * Decrement the value of an atomic type and get the result.
  */
-PJ_DEF(pj_atomic_value_t) pj_atomic_dec_and_get(pj_atomic_t *atomic_var)
+PJ_DEF (pj_atomic_value_t) pj_atomic_dec_and_get (pj_atomic_t *atomic_var)
 {
     return --atomic_var->value;
 }
@@ -798,8 +800,8 @@ PJ_DEF(pj_atomic_value_t) pj_atomic_dec_and_get(pj_atomic_t *atomic_var)
 /*
  * Add a value to an atomic type.
  */
-PJ_DEF(void) pj_atomic_add( pj_atomic_t *atomic_var,
-			    pj_atomic_value_t value)
+PJ_DEF (void) pj_atomic_add (pj_atomic_t *atomic_var,
+                             pj_atomic_value_t value)
 {
     atomic_var->value += value;
 }
@@ -808,8 +810,8 @@ PJ_DEF(void) pj_atomic_add( pj_atomic_t *atomic_var,
 /*
  * Add a value to an atomic type and get the result.
  */
-PJ_DEF(pj_atomic_value_t) pj_atomic_add_and_get( pj_atomic_t *atomic_var,
-			                         pj_atomic_value_t value)
+PJ_DEF (pj_atomic_value_t) pj_atomic_add_and_get (pj_atomic_t *atomic_var,
+        pj_atomic_value_t value)
 {
     atomic_var->value += value;
     return atomic_var->value;
@@ -819,14 +821,14 @@ PJ_DEF(pj_atomic_value_t) pj_atomic_add_and_get( pj_atomic_t *atomic_var,
 
 /////////////////////////////////////////////////////////////////////////////
 
-PJ_DEF(pj_status_t) pj_mutex_create( pj_pool_t *pool, 
-                                     const char *name,
-				     int type, 
-                                     pj_mutex_t **mutex)
+PJ_DEF (pj_status_t) pj_mutex_create (pj_pool_t *pool,
+                                      const char *name,
+                                      int type,
+                                      pj_mutex_t **mutex)
 {
-    PJ_UNUSED_ARG(pool);
-    PJ_UNUSED_ARG(name);
-    PJ_UNUSED_ARG(type);
+    PJ_UNUSED_ARG (pool);
+    PJ_UNUSED_ARG (name);
+    PJ_UNUSED_ARG (type);
 
     *mutex = DUMMY_MUTEX;
     return PJ_SUCCESS;
@@ -835,55 +837,55 @@ PJ_DEF(pj_status_t) pj_mutex_create( pj_pool_t *pool,
 /*
  * pj_mutex_create_simple()
  */
-PJ_DEF(pj_status_t) pj_mutex_create_simple( pj_pool_t *pool, 
-                                            const char *name,
-					    pj_mutex_t **mutex )
+PJ_DEF (pj_status_t) pj_mutex_create_simple (pj_pool_t *pool,
+        const char *name,
+        pj_mutex_t **mutex)
 {
-    return pj_mutex_create(pool, name, PJ_MUTEX_SIMPLE, mutex);
+    return pj_mutex_create (pool, name, PJ_MUTEX_SIMPLE, mutex);
 }
 
 
-PJ_DEF(pj_status_t) pj_mutex_create_recursive( pj_pool_t *pool,
-					       const char *name,
-					       pj_mutex_t **mutex )
+PJ_DEF (pj_status_t) pj_mutex_create_recursive (pj_pool_t *pool,
+        const char *name,
+        pj_mutex_t **mutex)
 {
-    return pj_mutex_create(pool, name, PJ_MUTEX_RECURSE, mutex);
+    return pj_mutex_create (pool, name, PJ_MUTEX_RECURSE, mutex);
 }
 
 
 /*
  * pj_mutex_lock()
  */
-PJ_DEF(pj_status_t) pj_mutex_lock(pj_mutex_t *mutex)
+PJ_DEF (pj_status_t) pj_mutex_lock (pj_mutex_t *mutex)
 {
-    pj_assert(mutex == DUMMY_MUTEX);
+    pj_assert (mutex == DUMMY_MUTEX);
     return PJ_SUCCESS;
 }
 
 /*
  * pj_mutex_trylock()
  */
-PJ_DEF(pj_status_t) pj_mutex_trylock(pj_mutex_t *mutex)
+PJ_DEF (pj_status_t) pj_mutex_trylock (pj_mutex_t *mutex)
 {
-    pj_assert(mutex == DUMMY_MUTEX);
+    pj_assert (mutex == DUMMY_MUTEX);
     return PJ_SUCCESS;
 }
 
 /*
  * pj_mutex_unlock()
  */
-PJ_DEF(pj_status_t) pj_mutex_unlock(pj_mutex_t *mutex)
+PJ_DEF (pj_status_t) pj_mutex_unlock (pj_mutex_t *mutex)
 {
-    pj_assert(mutex == DUMMY_MUTEX);
+    pj_assert (mutex == DUMMY_MUTEX);
     return PJ_SUCCESS;
 }
 
 /*
  * pj_mutex_destroy()
  */
-PJ_DEF(pj_status_t) pj_mutex_destroy(pj_mutex_t *mutex)
+PJ_DEF (pj_status_t) pj_mutex_destroy (pj_mutex_t *mutex)
 {
-    pj_assert(mutex == DUMMY_MUTEX);
+    pj_assert (mutex == DUMMY_MUTEX);
     return PJ_SUCCESS;
 }
 
@@ -900,7 +902,7 @@ PJ_DEF(pj_status_t) pj_mutex_destroy(pj_mutex_t *mutex)
 /*
  * Enter critical section.
  */
-PJ_DEF(void) pj_enter_critical_section(void)
+PJ_DEF (void) pj_enter_critical_section (void)
 {
     /* Nothing to do */
 }
@@ -909,7 +911,7 @@ PJ_DEF(void) pj_enter_critical_section(void)
 /*
  * Leave critical section.
  */
-PJ_DEF(void) pj_leave_critical_section(void)
+PJ_DEF (void) pj_leave_critical_section (void)
 {
     /* Nothing to do */
 }
@@ -920,17 +922,17 @@ PJ_DEF(void) pj_leave_critical_section(void)
 /*
  * Create semaphore.
  */
-PJ_DEF(pj_status_t) pj_sem_create( pj_pool_t *pool, 
-                                   const char *name,
-				   unsigned initial, 
-                                   unsigned max,
-				   pj_sem_t **p_sem)
+PJ_DEF (pj_status_t) pj_sem_create (pj_pool_t *pool,
+                                    const char *name,
+                                    unsigned initial,
+                                    unsigned max,
+                                    pj_sem_t **p_sem)
 {
     pj_sem_t *sem;
- 
-    PJ_UNUSED_ARG(name);
 
-    sem = (pj_sem_t*) pj_pool_zalloc(pool, sizeof(pj_sem_t));
+    PJ_UNUSED_ARG (name);
+
+    sem = (pj_sem_t*) pj_pool_zalloc (pool, sizeof (pj_sem_t));
     sem->value = initial;
     sem->max = max;
 
@@ -943,14 +945,14 @@ PJ_DEF(pj_status_t) pj_sem_create( pj_pool_t *pool,
 /*
  * Wait for semaphore.
  */
-PJ_DEF(pj_status_t) pj_sem_wait(pj_sem_t *sem)
+PJ_DEF (pj_status_t) pj_sem_wait (pj_sem_t *sem)
 {
     if (sem->value > 0) {
-	sem->value--;
-	return PJ_SUCCESS;
+        sem->value--;
+        return PJ_SUCCESS;
     } else {
-	pj_assert(!"Unexpected!");
-	return PJ_EINVALIDOP;
+        pj_assert (!"Unexpected!");
+        return PJ_EINVALIDOP;
     }
 }
 
@@ -958,14 +960,14 @@ PJ_DEF(pj_status_t) pj_sem_wait(pj_sem_t *sem)
 /*
  * Try wait for semaphore.
  */
-PJ_DEF(pj_status_t) pj_sem_trywait(pj_sem_t *sem)
+PJ_DEF (pj_status_t) pj_sem_trywait (pj_sem_t *sem)
 {
     if (sem->value > 0) {
-	sem->value--;
-	return PJ_SUCCESS;
+        sem->value--;
+        return PJ_SUCCESS;
     } else {
-	pj_assert(!"Unexpected!");
-	return PJ_EINVALIDOP;
+        pj_assert (!"Unexpected!");
+        return PJ_EINVALIDOP;
     }
 }
 
@@ -973,7 +975,7 @@ PJ_DEF(pj_status_t) pj_sem_trywait(pj_sem_t *sem)
 /*
  * Release semaphore.
  */
-PJ_DEF(pj_status_t) pj_sem_post(pj_sem_t *sem)
+PJ_DEF (pj_status_t) pj_sem_post (pj_sem_t *sem)
 {
     sem->value++;
     return PJ_SUCCESS;
@@ -983,56 +985,56 @@ PJ_DEF(pj_status_t) pj_sem_post(pj_sem_t *sem)
 /*
  * Destroy semaphore.
  */
-PJ_DEF(pj_status_t) pj_sem_destroy(pj_sem_t *sem)
+PJ_DEF (pj_status_t) pj_sem_destroy (pj_sem_t *sem)
 {
-    PJ_UNUSED_ARG(sem);
+    PJ_UNUSED_ARG (sem);
     return PJ_SUCCESS;
 }
 
 
 #if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK != 0
 /*
- * The implementation of stack checking. 
+ * The implementation of stack checking.
  */
-PJ_DEF(void) pj_thread_check_stack(const char *file, int line)
+PJ_DEF (void) pj_thread_check_stack (const char *file, int line)
 {
     char stk_ptr;
     pj_uint32_t usage;
     pj_thread_t *thread = pj_thread_this();
 
-    pj_assert(thread);
+    pj_assert (thread);
 
     /* Calculate current usage. */
     usage = (&stk_ptr > thread->stk_start) ? &stk_ptr - thread->stk_start :
-		thread->stk_start - &stk_ptr;
+            thread->stk_start - &stk_ptr;
 
     /* Assert if stack usage is dangerously high. */
-    pj_assert("STACK OVERFLOW!! " && (usage <= thread->stk_size - 128));
+    pj_assert ("STACK OVERFLOW!! " && (usage <= thread->stk_size - 128));
 
     /* Keep statistic. */
     if (usage > thread->stk_max_usage) {
-	thread->stk_max_usage = usage;
-	thread->caller_file = file;
-	thread->caller_line = line;
+        thread->stk_max_usage = usage;
+        thread->caller_file = file;
+        thread->caller_line = line;
     }
 }
 
 /*
- * Get maximum stack usage statistic. 
+ * Get maximum stack usage statistic.
  */
-PJ_DEF(pj_uint32_t) pj_thread_get_stack_max_usage(pj_thread_t *thread)
+PJ_DEF (pj_uint32_t) pj_thread_get_stack_max_usage (pj_thread_t *thread)
 {
     return thread->stk_max_usage;
 }
 
 /*
- * Dump thread stack status. 
+ * Dump thread stack status.
  */
-PJ_DEF(pj_status_t) pj_thread_get_stack_info(pj_thread_t *thread,
-					     const char **file,
-					     int *line)
+PJ_DEF (pj_status_t) pj_thread_get_stack_info (pj_thread_t *thread,
+        const char **file,
+        int *line)
 {
-    pj_assert(thread);
+    pj_assert (thread);
 
     *file = thread->caller_file;
     *line = thread->caller_line;
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/os_error_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/os_error_symbian.cpp
index eba44ecc0934b506ecf6bb7ecb9185cdeee49f16..93b25ba60332ac07087eddb6fd4fb9f30267a442 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/os_error_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/os_error_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: os_error_symbian.cpp 2394 2008-12-23 17:27:53Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -46,61 +46,61 @@ static const struct {
     /*
      * Generic error -1 to -46
      */
-    PJ_BUILD_ERR( KErrNotFound,	    "Unable to find the specified object"),
-    PJ_BUILD_ERR( KErrGeneral,	    "General (unspecified) error"),
-    PJ_BUILD_ERR( KErrCancel,	    "The operation was cancelled"),
-    PJ_BUILD_ERR( KErrNoMemory,	    "Not enough memory"),
-    PJ_BUILD_ERR( KErrNotSupported, "The operation requested is not supported"),
-    PJ_BUILD_ERR( KErrArgument,	    "Bad request"),
-    PJ_BUILD_ERR( KErrTotalLossOfPrecision, "Total loss of precision"),
-    PJ_BUILD_ERR( KErrBadHandle,    "Bad object"),
-    PJ_BUILD_ERR( KErrOverflow,	    "Overflow"),
-    PJ_BUILD_ERR( KErrUnderflow,    "Underflow"),
-    PJ_BUILD_ERR( KErrAlreadyExists,"Already exists"),
-    PJ_BUILD_ERR( KErrPathNotFound, "Unable to find the specified folder"),
-    PJ_BUILD_ERR( KErrDied,	    "Closed"),
-    PJ_BUILD_ERR( KErrInUse,	    "The specified object is currently in use by another program"),
-    PJ_BUILD_ERR( KErrServerTerminated,	    "Server has closed"),
-    PJ_BUILD_ERR( KErrServerBusy,   "Server busy"),
-    PJ_BUILD_ERR( KErrCompletion,   "Completion error"),
-    PJ_BUILD_ERR( KErrNotReady,	    "Not ready"),
-    PJ_BUILD_ERR( KErrUnknown,	    "Unknown error"),
-    PJ_BUILD_ERR( KErrCorrupt,	    "Corrupt"),
-    PJ_BUILD_ERR( KErrAccessDenied, "Access denied"),
-    PJ_BUILD_ERR( KErrLocked,	    "Locked"),
-    PJ_BUILD_ERR( KErrWrite,	    "Failed to write"),
-    PJ_BUILD_ERR( KErrDisMounted,   "Wrong disk present"),
-    PJ_BUILD_ERR( KErrEof,	    "Unexpected end of file"),
-    PJ_BUILD_ERR( KErrDiskFull,	    "Disk full"),
-    PJ_BUILD_ERR( KErrBadDriver,    "Bad device driver"),
-    PJ_BUILD_ERR( KErrBadName,	    "Bad name"),
-    PJ_BUILD_ERR( KErrCommsLineFail,"Comms line failed"),
-    PJ_BUILD_ERR( KErrCommsFrame,   "Comms frame error"),
-    PJ_BUILD_ERR( KErrCommsOverrun, "Comms overrun error"),
-    PJ_BUILD_ERR( KErrCommsParity,  "Comms parity error"),
-    PJ_BUILD_ERR( KErrTimedOut,	    "Timed out"),
-    PJ_BUILD_ERR( KErrCouldNotConnect, "Failed to connect"),
-    PJ_BUILD_ERR( KErrCouldNotDisconnect, "Failed to disconnect"),
-    PJ_BUILD_ERR( KErrDisconnected, "Disconnected"),
-    PJ_BUILD_ERR( KErrBadLibraryEntryPoint, "Bad library entry point"),
-    PJ_BUILD_ERR( KErrBadDescriptor,"Bad descriptor"),
-    PJ_BUILD_ERR( KErrAbort,	    "Interrupted"),
-    PJ_BUILD_ERR( KErrTooBig,	    "Too big"),
-    PJ_BUILD_ERR( KErrDivideByZero, "Divide by zero"),
-    PJ_BUILD_ERR( KErrBadPower,	    "Batteries too low"),
-    PJ_BUILD_ERR( KErrDirFull,	    "Folder full"),
-    PJ_BUILD_ERR( KErrHardwareNotAvailable, ""),
-    PJ_BUILD_ERR( KErrSessionClosed,	    ""),
-    PJ_BUILD_ERR( KErrPermissionDenied,     ""),
+    PJ_BUILD_ERR (KErrNotFound,	    "Unable to find the specified object"),
+    PJ_BUILD_ERR (KErrGeneral,	    "General (unspecified) error"),
+    PJ_BUILD_ERR (KErrCancel,	    "The operation was cancelled"),
+    PJ_BUILD_ERR (KErrNoMemory,	    "Not enough memory"),
+    PJ_BUILD_ERR (KErrNotSupported, "The operation requested is not supported"),
+    PJ_BUILD_ERR (KErrArgument,	    "Bad request"),
+    PJ_BUILD_ERR (KErrTotalLossOfPrecision, "Total loss of precision"),
+    PJ_BUILD_ERR (KErrBadHandle,    "Bad object"),
+    PJ_BUILD_ERR (KErrOverflow,	    "Overflow"),
+    PJ_BUILD_ERR (KErrUnderflow,    "Underflow"),
+    PJ_BUILD_ERR (KErrAlreadyExists,"Already exists"),
+    PJ_BUILD_ERR (KErrPathNotFound, "Unable to find the specified folder"),
+    PJ_BUILD_ERR (KErrDied,	    "Closed"),
+    PJ_BUILD_ERR (KErrInUse,	    "The specified object is currently in use by another program"),
+    PJ_BUILD_ERR (KErrServerTerminated,	    "Server has closed"),
+    PJ_BUILD_ERR (KErrServerBusy,   "Server busy"),
+    PJ_BUILD_ERR (KErrCompletion,   "Completion error"),
+    PJ_BUILD_ERR (KErrNotReady,	    "Not ready"),
+    PJ_BUILD_ERR (KErrUnknown,	    "Unknown error"),
+    PJ_BUILD_ERR (KErrCorrupt,	    "Corrupt"),
+    PJ_BUILD_ERR (KErrAccessDenied, "Access denied"),
+    PJ_BUILD_ERR (KErrLocked,	    "Locked"),
+    PJ_BUILD_ERR (KErrWrite,	    "Failed to write"),
+    PJ_BUILD_ERR (KErrDisMounted,   "Wrong disk present"),
+    PJ_BUILD_ERR (KErrEof,	    "Unexpected end of file"),
+    PJ_BUILD_ERR (KErrDiskFull,	    "Disk full"),
+    PJ_BUILD_ERR (KErrBadDriver,    "Bad device driver"),
+    PJ_BUILD_ERR (KErrBadName,	    "Bad name"),
+    PJ_BUILD_ERR (KErrCommsLineFail,"Comms line failed"),
+    PJ_BUILD_ERR (KErrCommsFrame,   "Comms frame error"),
+    PJ_BUILD_ERR (KErrCommsOverrun, "Comms overrun error"),
+    PJ_BUILD_ERR (KErrCommsParity,  "Comms parity error"),
+    PJ_BUILD_ERR (KErrTimedOut,	    "Timed out"),
+    PJ_BUILD_ERR (KErrCouldNotConnect, "Failed to connect"),
+    PJ_BUILD_ERR (KErrCouldNotDisconnect, "Failed to disconnect"),
+    PJ_BUILD_ERR (KErrDisconnected, "Disconnected"),
+    PJ_BUILD_ERR (KErrBadLibraryEntryPoint, "Bad library entry point"),
+    PJ_BUILD_ERR (KErrBadDescriptor,"Bad descriptor"),
+    PJ_BUILD_ERR (KErrAbort,	    "Interrupted"),
+    PJ_BUILD_ERR (KErrTooBig,	    "Too big"),
+    PJ_BUILD_ERR (KErrDivideByZero, "Divide by zero"),
+    PJ_BUILD_ERR (KErrBadPower,	    "Batteries too low"),
+    PJ_BUILD_ERR (KErrDirFull,	    "Folder full"),
+    PJ_BUILD_ERR (KErrHardwareNotAvailable, ""),
+    PJ_BUILD_ERR (KErrSessionClosed,	    ""),
+    PJ_BUILD_ERR (KErrPermissionDenied,     ""),
 
     /*
      * Socket errors (-190 - -1000)
      */
-    PJ_BUILD_ERR( KErrNetUnreach,   "Could not connect to the network. Currently unreachable"),
-    PJ_BUILD_ERR( KErrHostUnreach,  "Could not connect to the specified server"),
-    PJ_BUILD_ERR( KErrNoProtocolOpt,"The specified server refuses the selected protocol"),
-    PJ_BUILD_ERR( KErrUrgentData,   ""),
-    PJ_BUILD_ERR( KErrWouldBlock,   "Conflicts with KErrExtended, but cannot occur in practice"),
+    PJ_BUILD_ERR (KErrNetUnreach,   "Could not connect to the network. Currently unreachable"),
+    PJ_BUILD_ERR (KErrHostUnreach,  "Could not connect to the specified server"),
+    PJ_BUILD_ERR (KErrNoProtocolOpt,"The specified server refuses the selected protocol"),
+    PJ_BUILD_ERR (KErrUrgentData,   ""),
+    PJ_BUILD_ERR (KErrWouldBlock,   "Conflicts with KErrExtended, but cannot occur in practice"),
 
     {0, NULL}
 };
@@ -108,45 +108,45 @@ static const struct {
 #endif	/* PJ_HAS_ERROR_STRING */
 
 
-PJ_DEF(pj_status_t) pj_get_os_error(void)
+PJ_DEF (pj_status_t) pj_get_os_error (void)
 {
     return -1;
 }
 
-PJ_DEF(void) pj_set_os_error(pj_status_t code)
+PJ_DEF (void) pj_set_os_error (pj_status_t code)
 {
-    PJ_UNUSED_ARG(code);
+    PJ_UNUSED_ARG (code);
 }
 
-PJ_DEF(pj_status_t) pj_get_netos_error(void)
+PJ_DEF (pj_status_t) pj_get_netos_error (void)
 {
     return -1;
 }
 
-PJ_DEF(void) pj_set_netos_error(pj_status_t code)
+PJ_DEF (void) pj_set_netos_error (pj_status_t code)
 {
-    PJ_UNUSED_ARG(code);
+    PJ_UNUSED_ARG (code);
 }
 
 PJ_BEGIN_DECL
 
-    PJ_DECL(int) platform_strerror( pj_os_err_type os_errcode, 
-                       		    char *buf, pj_size_t bufsize);
+PJ_DECL (int) platform_strerror (pj_os_err_type os_errcode,
+                                 char *buf, pj_size_t bufsize);
 PJ_END_DECL
 
-/* 
+/*
  * platform_strerror()
  *
- * Platform specific error message. This file is called by pj_strerror() 
- * in errno.c 
+ * Platform specific error message. This file is called by pj_strerror()
+ * in errno.c
  */
-PJ_DEF(int) platform_strerror( pj_os_err_type os_errcode, 
-			       char *buf, pj_size_t bufsize)
+PJ_DEF (int) platform_strerror (pj_os_err_type os_errcode,
+                                char *buf, pj_size_t bufsize)
 {
     int len = 0;
 
-    pj_assert(buf != NULL);
-    pj_assert(bufsize >= 0);
+    pj_assert (buf != NULL);
+    pj_assert (bufsize >= 0);
 
     /*
      * MUST NOT check stack here.
@@ -156,26 +156,30 @@ PJ_DEF(int) platform_strerror( pj_os_err_type os_errcode,
 
     if (!len) {
 #if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING!=0)
-	int i;
+        int i;
+
         for (i = 0; gaErrorList[i].msg; ++i) {
             if (gaErrorList[i].code == os_errcode) {
-                len = strlen(gaErrorList[i].msg);
-		if ((pj_size_t)len >= bufsize) {
-		    len = bufsize-1;
-		}
-		pj_memcpy(buf, gaErrorList[i].msg, len);
-		buf[len] = '\0';
+                len = strlen (gaErrorList[i].msg);
+
+                if ( (pj_size_t) len >= bufsize) {
+                    len = bufsize-1;
+                }
+
+                pj_memcpy (buf, gaErrorList[i].msg, len);
+                buf[len] = '\0';
                 break;
             }
         }
+
 #endif	/* PJ_HAS_ERROR_STRING */
 
     }
 
     if (!len) {
-	len = pj_ansi_snprintf( buf, bufsize, "Symbian native error %d", 
-				os_errcode);
-	buf[len] = '\0';
+        len = pj_ansi_snprintf (buf, bufsize, "Symbian native error %d",
+                                os_errcode);
+        buf[len] = '\0';
     }
 
     return len;
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/pool_policy_new.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/pool_policy_new.cpp
index ed4f2b4f44db36831e5a8badc938156894d9c3f3..2015204b7bf55a82335ce7aba19c170389afcf1a 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/pool_policy_new.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/pool_policy_new.cpp
@@ -1,5 +1,5 @@
 /* $Id: pool_policy_new.cpp 2394 2008-12-23 17:27:53Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -38,76 +38,76 @@
  * This file contains pool default policy definition and implementation.
  */
 #include "pool_signature.h"
- 
 
-static void *operator_new(pj_pool_factory *factory, pj_size_t size)
+
+static void *operator_new (pj_pool_factory *factory, pj_size_t size)
 {
     void *mem;
 
     PJ_CHECK_STACK();
 
     if (factory->on_block_alloc) {
-		int rc;
-		rc = factory->on_block_alloc(factory, size);
-		if (!rc)
-		    return NULL;
+        int rc;
+        rc = factory->on_block_alloc (factory, size);
+
+        if (!rc)
+            return NULL;
     }
-    
-    mem = (void*) new char[size+(SIG_SIZE << 1)];
-    
+
+    mem = (void*) new char[size+ (SIG_SIZE << 1) ];
+
     /* Exception for new operator may be disabled, so.. */
     if (mem) {
-	/* Apply signature when PJ_SAFE_POOL is set. It will move
-	 * "mem" pointer forward.
-	 */
-	APPLY_SIG(mem, size);
+        /* Apply signature when PJ_SAFE_POOL is set. It will move
+         * "mem" pointer forward.
+         */
+        APPLY_SIG (mem, size);
     }
 
     return mem;
 }
 
-static void operator_delete(pj_pool_factory *factory, void *mem, pj_size_t size)
+static void operator_delete (pj_pool_factory *factory, void *mem, pj_size_t size)
 {
     PJ_CHECK_STACK();
 
-    if (factory->on_block_free) 
-        factory->on_block_free(factory, size);
-    
+    if (factory->on_block_free)
+        factory->on_block_free (factory, size);
+
     /* Check and remove signature when PJ_SAFE_POOL is set. It will
      * move "mem" pointer backward.
      */
-    REMOVE_SIG(mem, size);
+    REMOVE_SIG (mem, size);
 
     /* Note that when PJ_SAFE_POOL is set, the actual size of the block
      * is size + SIG_SIZE*2.
      */
 
-    char *p = (char*)mem;
+    char *p = (char*) mem;
     delete [] p;
 }
 
-static void default_pool_callback(pj_pool_t *pool, pj_size_t size)
+static void default_pool_callback (pj_pool_t *pool, pj_size_t size)
 {
     PJ_CHECK_STACK();
-    PJ_UNUSED_ARG(pool);
-    PJ_UNUSED_ARG(size);
+    PJ_UNUSED_ARG (pool);
+    PJ_UNUSED_ARG (size);
 
-    PJ_THROW(PJ_NO_MEMORY_EXCEPTION);
+    PJ_THROW (PJ_NO_MEMORY_EXCEPTION);
 }
 
-PJ_DEF_DATA(pj_pool_factory_policy) pj_pool_factory_default_policy = 
-{
+PJ_DEF_DATA (pj_pool_factory_policy) pj_pool_factory_default_policy = {
     &operator_new,
     &operator_delete,
     &default_pool_callback,
     0
 };
 
-PJ_DEF(const pj_pool_factory_policy*) pj_pool_factory_get_default_policy(void)
+PJ_DEF (const pj_pool_factory_policy*) pj_pool_factory_get_default_policy (void)
 {
     return &pj_pool_factory_default_policy;
 }
 
- 
+
 #endif	/* PJ_HAS_POOL_ALT_API */
 
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/sock_qos_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/sock_qos_symbian.cpp
index 112fcc210407580424cf68d810281a7caee64bbf..6881fbe01ab9d20b2bffe16f44dbf39e595b862b 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/sock_qos_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/sock_qos_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: sock_qos_symbian.cpp 2998 2009-11-09 08:51:34Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -30,77 +30,81 @@
 #include <pj/sock_qos.h>
 #include "os_symbian.h"
 
-PJ_DEF(pj_status_t) pj_sock_set_qos_params(pj_sock_t sock,
-					   pj_qos_params *param)
+PJ_DEF (pj_status_t) pj_sock_set_qos_params (pj_sock_t sock,
+        pj_qos_params *param)
 {
-    PJ_ASSERT_RETURN(sock!=0 && sock!=PJ_INVALID_SOCKET, PJ_EINVAL);
-    
-    CPjSocket *pjsock = (CPjSocket*)sock;
+    PJ_ASSERT_RETURN (sock!=0 && sock!=PJ_INVALID_SOCKET, PJ_EINVAL);
+
+    CPjSocket *pjsock = (CPjSocket*) sock;
     RSocket & rsock = pjsock->Socket();
     pj_status_t last_err = PJ_ENOTSUP;
-    
+
     /* SO_PRIORITY and WMM are not supported */
-    param->flags &= ~(PJ_QOS_PARAM_HAS_SO_PRIO | PJ_QOS_PARAM_HAS_WMM);
-    
+    param->flags &= ~ (PJ_QOS_PARAM_HAS_SO_PRIO | PJ_QOS_PARAM_HAS_WMM);
+
     if (param->flags & PJ_QOS_PARAM_HAS_DSCP) {
-	TInt err;
-	
-	err = rsock.SetOpt(KSoIpTOS, KProtocolInetIp,
-		           (param->dscp_val << 2));
-	if (err != KErrNone) {
-	    last_err = PJ_RETURN_OS_ERROR(err);
-	    param->flags &= ~(PJ_QOS_PARAM_HAS_DSCP);
-	}
+        TInt err;
+
+        err = rsock.SetOpt (KSoIpTOS, KProtocolInetIp,
+                            (param->dscp_val << 2));
+
+        if (err != KErrNone) {
+            last_err = PJ_RETURN_OS_ERROR (err);
+            param->flags &= ~ (PJ_QOS_PARAM_HAS_DSCP);
+        }
     }
-    
+
     return param->flags ? PJ_SUCCESS : last_err;
 }
 
-PJ_DEF(pj_status_t) pj_sock_set_qos_type(pj_sock_t sock,
-					 pj_qos_type type)
+PJ_DEF (pj_status_t) pj_sock_set_qos_type (pj_sock_t sock,
+        pj_qos_type type)
 {
     pj_qos_params param;
     pj_status_t status;
-    
-    status = pj_qos_get_params(type, &param);
+
+    status = pj_qos_get_params (type, &param);
+
     if (status != PJ_SUCCESS)
-	return status;
-    
-    return pj_sock_set_qos_params(sock, &param);
+        return status;
+
+    return pj_sock_set_qos_params (sock, &param);
 }
 
 
-PJ_DEF(pj_status_t) pj_sock_get_qos_params(pj_sock_t sock,
-					   pj_qos_params *p_param)
+PJ_DEF (pj_status_t) pj_sock_get_qos_params (pj_sock_t sock,
+        pj_qos_params *p_param)
 {
-    PJ_ASSERT_RETURN(sock!=0 && sock!=PJ_INVALID_SOCKET, PJ_EINVAL);
-    
-    CPjSocket *pjsock = (CPjSocket*)sock;
+    PJ_ASSERT_RETURN (sock!=0 && sock!=PJ_INVALID_SOCKET, PJ_EINVAL);
+
+    CPjSocket *pjsock = (CPjSocket*) sock;
     RSocket & rsock = pjsock->Socket();
     TInt err, dscp;
-    
-    pj_bzero(p_param, sizeof(*p_param));
 
-    err = rsock.GetOpt(KSoIpTOS, KProtocolInetIp, dscp);
+    pj_bzero (p_param, sizeof (*p_param));
+
+    err = rsock.GetOpt (KSoIpTOS, KProtocolInetIp, dscp);
+
     if (err == KErrNone) {
-	p_param->flags |= PJ_QOS_PARAM_HAS_DSCP;
-	p_param->dscp_val = (dscp >> 2);
-	return PJ_SUCCESS;
+        p_param->flags |= PJ_QOS_PARAM_HAS_DSCP;
+        p_param->dscp_val = (dscp >> 2);
+        return PJ_SUCCESS;
     } else {
-	return PJ_RETURN_OS_ERROR(err);
+        return PJ_RETURN_OS_ERROR (err);
     }
 }
 
-PJ_DEF(pj_status_t) pj_sock_get_qos_type(pj_sock_t sock,
-					 pj_qos_type *p_type)
+PJ_DEF (pj_status_t) pj_sock_get_qos_type (pj_sock_t sock,
+        pj_qos_type *p_type)
 {
     pj_qos_params param;
     pj_status_t status;
-    
-    status = pj_sock_get_qos_params(sock, &param);
+
+    status = pj_sock_get_qos_params (sock, &param);
+
     if (status != PJ_SUCCESS)
-	return status;
-    
-    return pj_qos_get_type(&param, p_type);
+        return status;
+
+    return pj_qos_get_type (&param, p_type);
 }
 
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/sock_select_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/sock_select_symbian.cpp
index 7d4cc8c9a8ef3fa78e19d654a0a87485c2103c43..ee1d23b041abbc2a766872724eea2a38d6a0b300 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/sock_select_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/sock_select_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: sock_select_symbian.cpp 2394 2008-12-23 17:27:53Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -34,140 +34,142 @@
 #include <pj/os.h>
 #include "os_symbian.h"
 
- 
-struct symbian_fd_set
-{
+
+struct symbian_fd_set {
     unsigned	 count;
     CPjSocket	*sock[PJ_IOQUEUE_MAX_HANDLES];
 };
 
 
-PJ_DEF(void) PJ_FD_ZERO(pj_fd_set_t *fdsetp)
+PJ_DEF (void) PJ_FD_ZERO (pj_fd_set_t *fdsetp)
 {
-    symbian_fd_set *fds = (symbian_fd_set *)fdsetp;
+    symbian_fd_set *fds = (symbian_fd_set *) fdsetp;
     fds->count = 0;
 }
 
 
-PJ_DEF(void) PJ_FD_SET(pj_sock_t fd, pj_fd_set_t *fdsetp)
+PJ_DEF (void) PJ_FD_SET (pj_sock_t fd, pj_fd_set_t *fdsetp)
 {
-    symbian_fd_set *fds = (symbian_fd_set *)fdsetp;
+    symbian_fd_set *fds = (symbian_fd_set *) fdsetp;
 
-    PJ_ASSERT_ON_FAIL(fds->count < PJ_IOQUEUE_MAX_HANDLES, return);
-    fds->sock[fds->count++] = (CPjSocket*)fd;
+    PJ_ASSERT_ON_FAIL (fds->count < PJ_IOQUEUE_MAX_HANDLES, return);
+    fds->sock[fds->count++] = (CPjSocket*) fd;
 }
 
 
-PJ_DEF(void) PJ_FD_CLR(pj_sock_t fd, pj_fd_set_t *fdsetp)
+PJ_DEF (void) PJ_FD_CLR (pj_sock_t fd, pj_fd_set_t *fdsetp)
 {
-    symbian_fd_set *fds = (symbian_fd_set *)fdsetp;
+    symbian_fd_set *fds = (symbian_fd_set *) fdsetp;
     unsigned i;
-    
+
     for (i=0; i<fds->count; ++i) {
-	if (fds->sock[i] == (CPjSocket*)fd) {
-	    pj_array_erase(fds->sock, sizeof(fds->sock[0]), fds->count, i);
-	    --fds->count;
-	    return;
-	}
+        if (fds->sock[i] == (CPjSocket*) fd) {
+            pj_array_erase (fds->sock, sizeof (fds->sock[0]), fds->count, i);
+            --fds->count;
+            return;
+        }
     }
 }
 
 
-PJ_DEF(pj_bool_t) PJ_FD_ISSET(pj_sock_t fd, const pj_fd_set_t *fdsetp)
+PJ_DEF (pj_bool_t) PJ_FD_ISSET (pj_sock_t fd, const pj_fd_set_t *fdsetp)
 {
-    symbian_fd_set *fds = (symbian_fd_set *)fdsetp;
+    symbian_fd_set *fds = (symbian_fd_set *) fdsetp;
     unsigned i;
-    
+
     for (i=0; i<fds->count; ++i) {
-	if (fds->sock[i] == (CPjSocket*)fd) {
-	    return PJ_TRUE;
-	}
+        if (fds->sock[i] == (CPjSocket*) fd) {
+            return PJ_TRUE;
+        }
     }
 
     return PJ_FALSE;
 }
 
-PJ_DEF(pj_size_t) PJ_FD_COUNT(const pj_fd_set_t *fdsetp)
+PJ_DEF (pj_size_t) PJ_FD_COUNT (const pj_fd_set_t *fdsetp)
 {
-    symbian_fd_set *fds = (symbian_fd_set *)fdsetp;
+    symbian_fd_set *fds = (symbian_fd_set *) fdsetp;
     return fds->count;
 }
 
 
-PJ_DEF(int) pj_sock_select( int n, 
-			    pj_fd_set_t *readfds, 
-			    pj_fd_set_t *writefds,
-			    pj_fd_set_t *exceptfds, 
-			    const pj_time_val *timeout)
+PJ_DEF (int) pj_sock_select (int n,
+                             pj_fd_set_t *readfds,
+                             pj_fd_set_t *writefds,
+                             pj_fd_set_t *exceptfds,
+                             const pj_time_val *timeout)
 {
     CPjTimeoutTimer *pjTimer;
     unsigned i;
 
-    PJ_UNUSED_ARG(n);
-    PJ_UNUSED_ARG(writefds);
-    PJ_UNUSED_ARG(exceptfds);
+    PJ_UNUSED_ARG (n);
+    PJ_UNUSED_ARG (writefds);
+    PJ_UNUSED_ARG (exceptfds);
 
     if (timeout) {
-	pjTimer = PjSymbianOS::Instance()->SelectTimeoutTimer();
-	pjTimer->StartTimer(timeout->sec*1000 + timeout->msec);
+        pjTimer = PjSymbianOS::Instance()->SelectTimeoutTimer();
+        pjTimer->StartTimer (timeout->sec*1000 + timeout->msec);
 
     } else {
-	pjTimer = NULL;
+        pjTimer = NULL;
     }
 
     /* Scan for readable sockets */
 
     if (readfds) {
-	symbian_fd_set *fds = (symbian_fd_set *)readfds;
+        symbian_fd_set *fds = (symbian_fd_set *) readfds;
 
-	do {
-	    /* Scan sockets for readily available data */
-	    for (i=0; i<fds->count; ++i) {
-		CPjSocket *pjsock = fds->sock[i];
+        do {
+            /* Scan sockets for readily available data */
+            for (i=0; i<fds->count; ++i) {
+                CPjSocket *pjsock = fds->sock[i];
 
-		if (pjsock->Reader()) {
-		    if (pjsock->Reader()->HasData() && !pjsock->Reader()->IsActive()) {
+                if (pjsock->Reader()) {
+                    if (pjsock->Reader()->HasData() && !pjsock->Reader()->IsActive()) {
 
-			/* Found socket with data ready */
-			PJ_FD_ZERO(readfds);
-			PJ_FD_SET((pj_sock_t)pjsock, readfds);
+                        /* Found socket with data ready */
+                        PJ_FD_ZERO (readfds);
+                        PJ_FD_SET ( (pj_sock_t) pjsock, readfds);
 
-			/* Cancel timer, if any */
-			if (pjTimer) {
-			    pjTimer->Cancel();
-			}
+                        /* Cancel timer, if any */
+                        if (pjTimer) {
+                            pjTimer->Cancel();
+                        }
 
-			/* Clear writable and exception fd_set */
-			if (writefds)
-			    PJ_FD_ZERO(writefds);
-			if (exceptfds)
-			    PJ_FD_ZERO(exceptfds);
+                        /* Clear writable and exception fd_set */
+                        if (writefds)
+                            PJ_FD_ZERO (writefds);
 
-			return 1;
+                        if (exceptfds)
+                            PJ_FD_ZERO (exceptfds);
 
-		    } else if (!pjsock->Reader()->IsActive())
-			pjsock->Reader()->StartRecvFrom();
+                        return 1;
 
-		} else {
-		    pjsock->CreateReader();
-		    pjsock->Reader()->StartRecvFrom();
-		}
-	    }
+                    } else if (!pjsock->Reader()->IsActive())
+                        pjsock->Reader()->StartRecvFrom();
 
-	    PjSymbianOS::Instance()->WaitForActiveObjects();
+                } else {
+                    pjsock->CreateReader();
+                    pjsock->Reader()->StartRecvFrom();
+                }
+            }
 
-	} while (pjTimer==NULL || !pjTimer->HasTimedOut());
+            PjSymbianOS::Instance()->WaitForActiveObjects();
+
+        } while (pjTimer==NULL || !pjTimer->HasTimedOut());
     }
 
 
     /* Timeout */
 
     if (readfds)
-	PJ_FD_ZERO(readfds);
+        PJ_FD_ZERO (readfds);
+
     if (writefds)
-	PJ_FD_ZERO(writefds);
+        PJ_FD_ZERO (writefds);
+
     if (exceptfds)
-	PJ_FD_ZERO(exceptfds);
+        PJ_FD_ZERO (exceptfds);
 
     return 0;
 }
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/sock_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/sock_symbian.cpp
index 7479ac745f485bc3e80aa9db54602ab336e8fb19..ce6683bf49f5ae36de63ca8c8afe305137062d43 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/sock_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/sock_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: sock_symbian.cpp 2966 2009-10-25 09:02:07Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -108,19 +108,19 @@ CPjSocket::~CPjSocket()
 
 
 // Create socket reader.
-CPjSocketReader *CPjSocket::CreateReader(unsigned max_len)
+CPjSocketReader *CPjSocket::CreateReader (unsigned max_len)
 {
-    pj_assert(sockReader_ == NULL);
-    return sockReader_ = CPjSocketReader::NewL(*this, max_len);
+    pj_assert (sockReader_ == NULL);
+    return sockReader_ = CPjSocketReader::NewL (*this, max_len);
 }
 
 // Delete socket reader when it's not wanted.
-void CPjSocket::DestroyReader() 
+void CPjSocket::DestroyReader()
 {
     if (sockReader_) {
-	sockReader_->Cancel();
-	delete sockReader_;
-	sockReader_ = NULL;
+        sockReader_->Cancel();
+        delete sockReader_;
+        sockReader_ = NULL;
     }
 }
 
@@ -132,28 +132,28 @@ void CPjSocket::DestroyReader()
 //
 
 
-CPjSocketReader::CPjSocketReader(CPjSocket &sock)
-: CActive(EPriorityStandard), 
-  sock_(sock), buffer_(NULL, 0), readCb_(NULL), key_(NULL)
+CPjSocketReader::CPjSocketReader (CPjSocket &sock)
+        : CActive (EPriorityStandard),
+        sock_ (sock), buffer_ (NULL, 0), readCb_ (NULL), key_ (NULL)
 {
 }
 
 
-void CPjSocketReader::ConstructL(unsigned max_len)
+void CPjSocketReader::ConstructL (unsigned max_len)
 {
     isDatagram_ = sock_.IsDatagram();
 
     TUint8 *ptr = new TUint8[max_len];
-    buffer_.Set(ptr, 0, (TInt)max_len);
-    CActiveScheduler::Add(this);
+    buffer_.Set (ptr, 0, (TInt) max_len);
+    CActiveScheduler::Add (this);
 }
 
-CPjSocketReader *CPjSocketReader::NewL(CPjSocket &sock, unsigned max_len)
+CPjSocketReader *CPjSocketReader::NewL (CPjSocket &sock, unsigned max_len)
 {
-    CPjSocketReader *self = new (ELeave) CPjSocketReader(sock);
-    CleanupStack::PushL(self);
-    self->ConstructL(max_len);
-    CleanupStack::Pop(self);
+    CPjSocketReader *self = new (ELeave) CPjSocketReader (sock);
+    CleanupStack::PushL (self);
+    self->ConstructL (max_len);
+    CleanupStack::Pop (self);
 
     return self;
 }
@@ -165,27 +165,28 @@ CPjSocketReader::~CPjSocketReader()
     delete [] data;
 }
 
-void CPjSocketReader::StartRecv(void (*cb)(void *key), 
-			        void *key, 
-			        TDes8 *aDesc,
-			        TUint flags)
+void CPjSocketReader::StartRecv (void (*cb) (void *key),
+                                 void *key,
+                                 TDes8 *aDesc,
+                                 TUint flags)
 {
-    StartRecvFrom(cb, key, aDesc, flags, NULL);
+    StartRecvFrom (cb, key, aDesc, flags, NULL);
 }
 
-void CPjSocketReader::StartRecvFrom(void (*cb)(void *key), 
-				    void *key, 
-				    TDes8 *aDesc,
-				    TUint flags,
-				    TSockAddr *fromAddr)
+void CPjSocketReader::StartRecvFrom (void (*cb) (void *key),
+                                     void *key,
+                                     TDes8 *aDesc,
+                                     TUint flags,
+                                     TSockAddr *fromAddr)
 {
     readCb_ = cb;
     key_ = key;
 
     if (aDesc == NULL) aDesc = &buffer_;
+
     if (fromAddr == NULL) fromAddr = &recvAddr_;
 
-    sock_.Socket().RecvFrom(*aDesc, *fromAddr, flags, iStatus);
+    sock_.Socket().RecvFrom (*aDesc, *fromAddr, flags, iStatus);
     SetActive();
 }
 
@@ -196,40 +197,41 @@ void CPjSocketReader::DoCancel()
 
 void CPjSocketReader::RunL()
 {
-    void (*old_cb)(void *key) = readCb_;
+    void (*old_cb) (void *key) = readCb_;
     void *old_key = key_;
 
     readCb_ = NULL;
     key_ = NULL;
 
     if (old_cb) {
-	(*old_cb)(old_key);
+        (*old_cb) (old_key);
     }
 }
 
 // Append data to aDesc, up to aDesc's maximum size.
 // If socket is datagram based, buffer_ will be clared.
-void CPjSocketReader::ReadData(TDes8 &aDesc, TInetAddr *addr)
+void CPjSocketReader::ReadData (TDes8 &aDesc, TInetAddr *addr)
 {
     if (isDatagram_)
-	aDesc.Zero();
+        aDesc.Zero();
 
     if (buffer_.Length() == 0)
-	return;
+        return;
 
     TInt size_to_copy = aDesc.MaxLength() - aDesc.Length();
+
     if (size_to_copy > buffer_.Length())
-	size_to_copy = buffer_.Length();
+        size_to_copy = buffer_.Length();
 
-    aDesc.Append(buffer_.Ptr(), size_to_copy);
+    aDesc.Append (buffer_.Ptr(), size_to_copy);
 
     if (isDatagram_)
-	buffer_.Zero();
+        buffer_.Zero();
     else
-	buffer_.Delete(0, size_to_copy);
+        buffer_.Delete (0, size_to_copy);
 
     if (addr)
-	*addr = recvAddr_;
+        *addr = recvAddr_;
 }
 
 
@@ -242,10 +244,10 @@ void CPjSocketReader::ReadData(TDes8 &aDesc, TInetAddr *addr)
 /*
  * Convert 16-bit value from network byte order to host byte order.
  */
-PJ_DEF(pj_uint16_t) pj_ntohs(pj_uint16_t netshort)
+PJ_DEF (pj_uint16_t) pj_ntohs (pj_uint16_t netshort)
 {
 #if PJ_IS_LITTLE_ENDIAN
-    return pj_swap16(netshort);
+    return pj_swap16 (netshort);
 #else
     return netshort;
 #endif
@@ -254,10 +256,10 @@ PJ_DEF(pj_uint16_t) pj_ntohs(pj_uint16_t netshort)
 /*
  * Convert 16-bit value from host byte order to network byte order.
  */
-PJ_DEF(pj_uint16_t) pj_htons(pj_uint16_t hostshort)
+PJ_DEF (pj_uint16_t) pj_htons (pj_uint16_t hostshort)
 {
 #if PJ_IS_LITTLE_ENDIAN
-    return pj_swap16(hostshort);
+    return pj_swap16 (hostshort);
 #else
     return hostshort;
 #endif
@@ -266,10 +268,10 @@ PJ_DEF(pj_uint16_t) pj_htons(pj_uint16_t hostshort)
 /*
  * Convert 32-bit value from network byte order to host byte order.
  */
-PJ_DEF(pj_uint32_t) pj_ntohl(pj_uint32_t netlong)
+PJ_DEF (pj_uint32_t) pj_ntohl (pj_uint32_t netlong)
 {
 #if PJ_IS_LITTLE_ENDIAN
-    return pj_swap32(netlong);
+    return pj_swap32 (netlong);
 #else
     return netlong;
 #endif
@@ -278,10 +280,10 @@ PJ_DEF(pj_uint32_t) pj_ntohl(pj_uint32_t netlong)
 /*
  * Convert 32-bit value from host byte order to network byte order.
  */
-PJ_DEF(pj_uint32_t) pj_htonl(pj_uint32_t hostlong)
+PJ_DEF (pj_uint32_t) pj_htonl (pj_uint32_t hostlong)
 {
 #if PJ_IS_LITTLE_ENDIAN
-    return pj_swap32(hostlong);
+    return pj_swap32 (hostlong);
 #else
     return netlong;
 #endif
@@ -291,25 +293,25 @@ PJ_DEF(pj_uint32_t) pj_htonl(pj_uint32_t hostlong)
  * Convert an Internet host address given in network byte order
  * to string in standard numbers and dots notation.
  */
-PJ_DEF(char*) pj_inet_ntoa(pj_in_addr inaddr)
+PJ_DEF (char*) pj_inet_ntoa (pj_in_addr inaddr)
 {
-	static char str8[PJ_INET_ADDRSTRLEN];
-    TBuf<PJ_INET_ADDRSTRLEN> str16(0);
+    static char str8[PJ_INET_ADDRSTRLEN];
+    TBuf<PJ_INET_ADDRSTRLEN> str16 (0);
 
     /* (Symbian IP address is in host byte order) */
-    TInetAddr temp_addr((TUint32)pj_ntohl(inaddr.s_addr), (TUint)0);
-    temp_addr.Output(str16);
- 
-    return pj_unicode_to_ansi((const wchar_t*)str16.PtrZ(), str16.Length(),
-			      str8, sizeof(str8));
+    TInetAddr temp_addr ( (TUint32) pj_ntohl (inaddr.s_addr), (TUint) 0);
+    temp_addr.Output (str16);
+
+    return pj_unicode_to_ansi ( (const wchar_t*) str16.PtrZ(), str16.Length(),
+                                str8, sizeof (str8));
 }
 
 /*
  * This function converts the Internet host address cp from the standard
  * numbers-and-dots notation into binary data and stores it in the structure
- * that inp points to. 
+ * that inp points to.
  */
-PJ_DEF(int) pj_inet_aton(const pj_str_t *cp, struct pj_in_addr *inp)
+PJ_DEF (int) pj_inet_aton (const pj_str_t *cp, struct pj_in_addr *inp)
 {
     enum { MAXIPLEN = PJ_INET_ADDRSTRLEN };
 
@@ -323,48 +325,50 @@ PJ_DEF(int) pj_inet_aton(const pj_str_t *cp, struct pj_in_addr *inp)
      *	this function might be called with cp->slen >= 16
      *  (i.e. when called with hostname to check if it's an IP addr).
      */
-    PJ_ASSERT_RETURN(cp && cp->slen && inp, 0);
+    PJ_ASSERT_RETURN (cp && cp->slen && inp, 0);
+
     if (cp->slen >= 16) {
-	return 0;
+        return 0;
     }
 
     char tempaddr8[MAXIPLEN];
-    pj_memcpy(tempaddr8, cp->ptr, cp->slen);
+    pj_memcpy (tempaddr8, cp->ptr, cp->slen);
     tempaddr8[cp->slen] = '\0';
 
     wchar_t tempaddr16[MAXIPLEN];
-    pj_ansi_to_unicode(tempaddr8, pj_ansi_strlen(tempaddr8),
-		       tempaddr16, sizeof(tempaddr16));
+    pj_ansi_to_unicode (tempaddr8, pj_ansi_strlen (tempaddr8),
+                        tempaddr16, sizeof (tempaddr16));
 
-    TBuf<MAXIPLEN> ip_addr((const TText*)tempaddr16);
+    TBuf<MAXIPLEN> ip_addr ( (const TText*) tempaddr16);
 
     TInetAddr addr;
-    addr.Init(KAfInet);
-    if (addr.Input(ip_addr) == KErrNone) {
-	/* Success (Symbian IP address is in host byte order) */
-	inp->s_addr = pj_htonl(addr.Address());
-	return 1;
+    addr.Init (KAfInet);
+
+    if (addr.Input (ip_addr) == KErrNone) {
+        /* Success (Symbian IP address is in host byte order) */
+        inp->s_addr = pj_htonl (addr.Address());
+        return 1;
     } else {
-	/* Error */
-	return 0;
+        /* Error */
+        return 0;
     }
 }
 
 /*
  * Convert text to IPv4/IPv6 address.
  */
-PJ_DEF(pj_status_t) pj_inet_pton(int af, const pj_str_t *src, void *dst)
+PJ_DEF (pj_status_t) pj_inet_pton (int af, const pj_str_t *src, void *dst)
 {
     char tempaddr[PJ_INET6_ADDRSTRLEN];
 
-    PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6, PJ_EINVAL);
-    PJ_ASSERT_RETURN(src && src->slen && dst, PJ_EINVAL);
+    PJ_ASSERT_RETURN (af==PJ_AF_INET || af==PJ_AF_INET6, PJ_EINVAL);
+    PJ_ASSERT_RETURN (src && src->slen && dst, PJ_EINVAL);
 
-    /* Initialize output with PJ_IN_ADDR_NONE for IPv4 (to be 
+    /* Initialize output with PJ_IN_ADDR_NONE for IPv4 (to be
      * compatible with pj_inet_aton()
      */
     if (af==PJ_AF_INET) {
-	((pj_in_addr*)dst)->s_addr = PJ_INADDR_NONE;
+        ( (pj_in_addr*) dst)->s_addr = PJ_INADDR_NONE;
     }
 
     /* Caution:
@@ -372,88 +376,90 @@ PJ_DEF(pj_status_t) pj_inet_pton(int af, const pj_str_t *src, void *dst)
      *  (i.e. when called with hostname to check if it's an IP addr).
      */
     if (src->slen >= PJ_INET6_ADDRSTRLEN) {
-	return PJ_ENAMETOOLONG;
+        return PJ_ENAMETOOLONG;
     }
 
-    pj_memcpy(tempaddr, src->ptr, src->slen);
+    pj_memcpy (tempaddr, src->ptr, src->slen);
     tempaddr[src->slen] = '\0';
 
 
     wchar_t tempaddr16[PJ_INET6_ADDRSTRLEN];
-    pj_ansi_to_unicode(tempaddr, pj_ansi_strlen(tempaddr),
-		       tempaddr16, sizeof(tempaddr16));
+    pj_ansi_to_unicode (tempaddr, pj_ansi_strlen (tempaddr),
+                        tempaddr16, sizeof (tempaddr16));
 
-    TBuf<PJ_INET6_ADDRSTRLEN> ip_addr((const TText*)tempaddr16);
+    TBuf<PJ_INET6_ADDRSTRLEN> ip_addr ( (const TText*) tempaddr16);
 
     TInetAddr addr;
-    addr.Init(KAfInet6);
-    if (addr.Input(ip_addr) == KErrNone) {
-	if (af==PJ_AF_INET) {
-	    /* Success (Symbian IP address is in host byte order) */
-	    pj_uint32_t ip = pj_htonl(addr.Address());
-	    pj_memcpy(dst, &ip, 4);
-	} else if (af==PJ_AF_INET6) {
-	    const TIp6Addr & ip6 = addr.Ip6Address();
-	    pj_memcpy(dst, ip6.u.iAddr8, 16);
-	} else {
-	    pj_assert(!"Unexpected!");
-	    return PJ_EBUG;
-	}
-	return PJ_SUCCESS;
+    addr.Init (KAfInet6);
+
+    if (addr.Input (ip_addr) == KErrNone) {
+        if (af==PJ_AF_INET) {
+            /* Success (Symbian IP address is in host byte order) */
+            pj_uint32_t ip = pj_htonl (addr.Address());
+            pj_memcpy (dst, &ip, 4);
+        } else if (af==PJ_AF_INET6) {
+            const TIp6Addr & ip6 = addr.Ip6Address();
+            pj_memcpy (dst, ip6.u.iAddr8, 16);
+        } else {
+            pj_assert (!"Unexpected!");
+            return PJ_EBUG;
+        }
+
+        return PJ_SUCCESS;
     } else {
-	/* Error */
-	return PJ_EINVAL;
+        /* Error */
+        return PJ_EINVAL;
     }
 }
 
 /*
  * Convert IPv4/IPv6 address to text.
  */
-PJ_DEF(pj_status_t) pj_inet_ntop(int af, const void *src,
-				 char *dst, int size)
+PJ_DEF (pj_status_t) pj_inet_ntop (int af, const void *src,
+                                   char *dst, int size)
 
 {
-    PJ_ASSERT_RETURN(src && dst && size, PJ_EINVAL);
+    PJ_ASSERT_RETURN (src && dst && size, PJ_EINVAL);
 
     *dst = '\0';
 
     if (af==PJ_AF_INET) {
 
-	TBuf<PJ_INET_ADDRSTRLEN> str16;
-	pj_in_addr inaddr;
+        TBuf<PJ_INET_ADDRSTRLEN> str16;
+        pj_in_addr inaddr;
+
+        if (size < PJ_INET_ADDRSTRLEN)
+            return PJ_ETOOSMALL;
 
-	if (size < PJ_INET_ADDRSTRLEN)
-	    return PJ_ETOOSMALL;
+        pj_memcpy (&inaddr, src, 4);
 
-	pj_memcpy(&inaddr, src, 4);
+        /* Symbian IP address is in host byte order */
+        TInetAddr temp_addr ( (TUint32) pj_ntohl (inaddr.s_addr), (TUint) 0);
+        temp_addr.Output (str16);
 
-	/* Symbian IP address is in host byte order */
-	TInetAddr temp_addr((TUint32)pj_ntohl(inaddr.s_addr), (TUint)0);
-	temp_addr.Output(str16);
- 
-	pj_unicode_to_ansi((const wchar_t*)str16.PtrZ(), str16.Length(),
-			   dst, size);
-	return PJ_SUCCESS;
+        pj_unicode_to_ansi ( (const wchar_t*) str16.PtrZ(), str16.Length(),
+                             dst, size);
+        return PJ_SUCCESS;
 
     } else if (af==PJ_AF_INET6) {
-	TBuf<PJ_INET6_ADDRSTRLEN> str16;
+        TBuf<PJ_INET6_ADDRSTRLEN> str16;
 
-	if (size < PJ_INET6_ADDRSTRLEN)
-	    return PJ_ETOOSMALL;
+        if (size < PJ_INET6_ADDRSTRLEN)
+            return PJ_ETOOSMALL;
 
-	TIp6Addr ip6;
-	pj_memcpy(ip6.u.iAddr8, src, 16);
+        TIp6Addr ip6;
+        pj_memcpy (ip6.u.iAddr8, src, 16);
 
-	TInetAddr temp_addr(ip6, (TUint)0);
-	temp_addr.Output(str16);
- 
-	pj_unicode_to_ansi((const wchar_t*)str16.PtrZ(), str16.Length(),
-			   dst, size);
-	return PJ_SUCCESS;
+        TInetAddr temp_addr (ip6, (TUint) 0);
+        temp_addr.Output (str16);
+
+        pj_unicode_to_ansi ( (const wchar_t*) str16.PtrZ(), str16.Length(),
+                             dst, size);
+        return PJ_SUCCESS;
 
     } else {
-	pj_assert(!"Unsupport address family");
-	return PJ_EINVAL;
+        pj_assert (!"Unsupport address family");
+        return PJ_EINVAL;
     }
 
 }
@@ -461,7 +467,7 @@ PJ_DEF(pj_status_t) pj_inet_ntop(int af, const void *src,
 /*
  * Get hostname.
  */
-PJ_DEF(const pj_str_t*) pj_gethostname(void)
+PJ_DEF (const pj_str_t*) pj_gethostname (void)
 {
     static char buf[PJ_MAX_HOSTNAME];
     static pj_str_t hostname;
@@ -469,66 +475,68 @@ PJ_DEF(const pj_str_t*) pj_gethostname(void)
     PJ_CHECK_STACK();
 
     if (hostname.ptr == NULL) {
-	RHostResolver &resv = PjSymbianOS::Instance()->GetResolver(PJ_AF_INET);
-	TRequestStatus reqStatus;
-	THostName tmpName;
+        RHostResolver &resv = PjSymbianOS::Instance()->GetResolver (PJ_AF_INET);
+        TRequestStatus reqStatus;
+        THostName tmpName;
 
-	// Return empty hostname if access point is marked as down by app.
-	PJ_SYMBIAN_CHECK_CONNECTION2(&hostname);
+        // Return empty hostname if access point is marked as down by app.
+        PJ_SYMBIAN_CHECK_CONNECTION2 (&hostname);
 
-	resv.GetHostName(tmpName, reqStatus);
-	User::WaitForRequest(reqStatus);
+        resv.GetHostName (tmpName, reqStatus);
+        User::WaitForRequest (reqStatus);
 
-	hostname.ptr = pj_unicode_to_ansi((const wchar_t*)tmpName.Ptr(), tmpName.Length(),
-					  buf, sizeof(buf));
-	hostname.slen = tmpName.Length();
+        hostname.ptr = pj_unicode_to_ansi ( (const wchar_t*) tmpName.Ptr(), tmpName.Length(),
+                                            buf, sizeof (buf));
+        hostname.slen = tmpName.Length();
     }
+
     return &hostname;
 }
 
 /*
  * Create new socket/endpoint for communication and returns a descriptor.
  */
-PJ_DEF(pj_status_t) pj_sock_socket(int af, 
-				   int type, 
-				   int proto,
-				   pj_sock_t *p_sock)
+PJ_DEF (pj_status_t) pj_sock_socket (int af,
+                                     int type,
+                                     int proto,
+                                     pj_sock_t *p_sock)
 {
     TInt rc;
 
     PJ_CHECK_STACK();
 
     /* Sanity checks. */
-    PJ_ASSERT_RETURN(p_sock!=NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN (p_sock!=NULL, PJ_EINVAL);
 
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
-    
+
     /* Set proto if none is specified. */
     if (proto == 0) {
-	if (type == pj_SOCK_STREAM())
-	    proto = KProtocolInetTcp;
-	else if (type == pj_SOCK_DGRAM())
-	    proto = KProtocolInetUdp;
+        if (type == pj_SOCK_STREAM())
+            proto = KProtocolInetTcp;
+        else if (type == pj_SOCK_DGRAM())
+            proto = KProtocolInetUdp;
     }
 
     /* Create Symbian RSocket */
     RSocket rSock;
+
     if (PjSymbianOS::Instance()->Connection())
-    	rc = rSock.Open(PjSymbianOS::Instance()->SocketServ(), 
-    			af, type, proto,
-    			*PjSymbianOS::Instance()->Connection());
+        rc = rSock.Open (PjSymbianOS::Instance()->SocketServ(),
+                         af, type, proto,
+                         *PjSymbianOS::Instance()->Connection());
     else
-    	rc = rSock.Open(PjSymbianOS::Instance()->SocketServ(), 
-    			af, type, proto);
-        
+        rc = rSock.Open (PjSymbianOS::Instance()->SocketServ(),
+                         af, type, proto);
+
     if (rc != KErrNone)
-	return PJ_RETURN_OS_ERROR(rc);
+        return PJ_RETURN_OS_ERROR (rc);
 
 
     /* Wrap Symbian RSocket into PJLIB's CPjSocket, and return to caller */
-    CPjSocket *pjSock = new CPjSocket(af, type, rSock);
-    *p_sock = (pj_sock_t)pjSock;
+    CPjSocket *pjSock = new CPjSocket (af, type, rSock);
+    *p_sock = (pj_sock_t) pjSock;
 
     return PJ_SUCCESS;
 }
@@ -537,64 +545,65 @@ PJ_DEF(pj_status_t) pj_sock_socket(int af,
 /*
  * Bind socket.
  */
-PJ_DEF(pj_status_t) pj_sock_bind( pj_sock_t sock, 
-				  const pj_sockaddr_t *addr,
-				  int len)
+PJ_DEF (pj_status_t) pj_sock_bind (pj_sock_t sock,
+                                   const pj_sockaddr_t *addr,
+                                   int len)
 {
     pj_status_t status;
     TInt rc;
 
     PJ_CHECK_STACK();
 
-    PJ_ASSERT_RETURN(sock != 0, PJ_EINVAL);
-    PJ_ASSERT_RETURN(addr && len>=(int)sizeof(pj_sockaddr_in), PJ_EINVAL);
+    PJ_ASSERT_RETURN (sock != 0, PJ_EINVAL);
+    PJ_ASSERT_RETURN (addr && len>= (int) sizeof (pj_sockaddr_in), PJ_EINVAL);
 
     // Convert PJLIB's pj_sockaddr into Symbian's TInetAddr
     TInetAddr inetAddr;
-    status = PjSymbianOS::pj2Addr(*(pj_sockaddr*)addr, len, inetAddr);
+    status = PjSymbianOS::pj2Addr (* (pj_sockaddr*) addr, len, inetAddr);
+
     if (status != PJ_SUCCESS)
-    	return status;
+        return status;
 
     // Get the RSocket instance
-    RSocket &rSock = ((CPjSocket*)sock)->Socket();
+    RSocket &rSock = ( (CPjSocket*) sock)->Socket();
 
     // Bind
-    rc = rSock.Bind(inetAddr);
+    rc = rSock.Bind (inetAddr);
 
-    return (rc==KErrNone) ? PJ_SUCCESS : PJ_RETURN_OS_ERROR(rc);
+    return (rc==KErrNone) ? PJ_SUCCESS : PJ_RETURN_OS_ERROR (rc);
 }
 
 
 /*
  * Bind socket.
  */
-PJ_DEF(pj_status_t) pj_sock_bind_in( pj_sock_t sock, 
-				     pj_uint32_t addr32,
-				     pj_uint16_t port)
+PJ_DEF (pj_status_t) pj_sock_bind_in (pj_sock_t sock,
+                                      pj_uint32_t addr32,
+                                      pj_uint16_t port)
 {
     pj_sockaddr_in addr;
 
     PJ_CHECK_STACK();
 
-    pj_bzero(&addr, sizeof(addr));
+    pj_bzero (&addr, sizeof (addr));
     addr.sin_family = PJ_AF_INET;
-    addr.sin_addr.s_addr = pj_htonl(addr32);
-    addr.sin_port = pj_htons(port);
+    addr.sin_addr.s_addr = pj_htonl (addr32);
+    addr.sin_port = pj_htons (port);
 
-    return pj_sock_bind(sock, &addr, sizeof(pj_sockaddr_in));
+    return pj_sock_bind (sock, &addr, sizeof (pj_sockaddr_in));
 }
 
 
 /*
  * Close socket.
  */
-PJ_DEF(pj_status_t) pj_sock_close(pj_sock_t sock)
+PJ_DEF (pj_status_t) pj_sock_close (pj_sock_t sock)
 {
     PJ_CHECK_STACK();
 
-    PJ_ASSERT_RETURN(sock != 0, PJ_EINVAL);
+    PJ_ASSERT_RETURN (sock != 0, PJ_EINVAL);
 
-    CPjSocket *pjSock = (CPjSocket*)sock;
+    CPjSocket *pjSock = (CPjSocket*) sock;
 
     // This will close the socket.
     delete pjSock;
@@ -605,325 +614,328 @@ PJ_DEF(pj_status_t) pj_sock_close(pj_sock_t sock)
 /*
  * Get remote's name.
  */
-PJ_DEF(pj_status_t) pj_sock_getpeername( pj_sock_t sock,
-					 pj_sockaddr_t *addr,
-					 int *namelen)
+PJ_DEF (pj_status_t) pj_sock_getpeername (pj_sock_t sock,
+        pj_sockaddr_t *addr,
+        int *namelen)
 {
     PJ_CHECK_STACK();
-    
-    PJ_ASSERT_RETURN(sock && addr && namelen && 
-		     *namelen>=(int)sizeof(pj_sockaddr_in), PJ_EINVAL);
 
-    CPjSocket *pjSock = (CPjSocket*)sock;
+    PJ_ASSERT_RETURN (sock && addr && namelen &&
+                      *namelen>= (int) sizeof (pj_sockaddr_in), PJ_EINVAL);
+
+    CPjSocket *pjSock = (CPjSocket*) sock;
     RSocket &rSock = pjSock->Socket();
 
     // Socket must be connected.
-    PJ_ASSERT_RETURN(pjSock->IsConnected(), PJ_EINVALIDOP);
+    PJ_ASSERT_RETURN (pjSock->IsConnected(), PJ_EINVALIDOP);
 
     TInetAddr inetAddr;
-    rSock.RemoteName(inetAddr);
+    rSock.RemoteName (inetAddr);
 
-    return PjSymbianOS::Addr2pj(inetAddr, *(pj_sockaddr*)addr, namelen);
+    return PjSymbianOS::Addr2pj (inetAddr, * (pj_sockaddr*) addr, namelen);
 }
 
 /*
  * Get socket name.
  */
-PJ_DEF(pj_status_t) pj_sock_getsockname( pj_sock_t sock,
-					 pj_sockaddr_t *addr,
-					 int *namelen)
+PJ_DEF (pj_status_t) pj_sock_getsockname (pj_sock_t sock,
+        pj_sockaddr_t *addr,
+        int *namelen)
 {
     PJ_CHECK_STACK();
-    
-    PJ_ASSERT_RETURN(sock && addr && namelen && 
-		     *namelen>=(int)sizeof(pj_sockaddr_in), PJ_EINVAL);
 
-    CPjSocket *pjSock = (CPjSocket*)sock;
+    PJ_ASSERT_RETURN (sock && addr && namelen &&
+                      *namelen>= (int) sizeof (pj_sockaddr_in), PJ_EINVAL);
+
+    CPjSocket *pjSock = (CPjSocket*) sock;
     RSocket &rSock = pjSock->Socket();
 
     TInetAddr inetAddr;
-    rSock.LocalName(inetAddr);
+    rSock.LocalName (inetAddr);
 
-    return PjSymbianOS::Addr2pj(inetAddr, *(pj_sockaddr*)addr, namelen);
+    return PjSymbianOS::Addr2pj (inetAddr, * (pj_sockaddr*) addr, namelen);
 }
 
 /*
  * Send data
  */
-PJ_DEF(pj_status_t) pj_sock_send(pj_sock_t sock,
-				 const void *buf,
-				 pj_ssize_t *len,
-				 unsigned flags)
+PJ_DEF (pj_status_t) pj_sock_send (pj_sock_t sock,
+                                   const void *buf,
+                                   pj_ssize_t *len,
+                                   unsigned flags)
 {
     PJ_CHECK_STACK();
-    PJ_ASSERT_RETURN(sock && buf && len, PJ_EINVAL);
+    PJ_ASSERT_RETURN (sock && buf && len, PJ_EINVAL);
 
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
-    
-    CPjSocket *pjSock = (CPjSocket*)sock;
+
+    CPjSocket *pjSock = (CPjSocket*) sock;
     RSocket &rSock = pjSock->Socket();
 
     // send() should only be called to connected socket
-    PJ_ASSERT_RETURN(pjSock->IsConnected(), PJ_EINVALIDOP);
+    PJ_ASSERT_RETURN (pjSock->IsConnected(), PJ_EINVALIDOP);
 
-    TPtrC8 data((const TUint8*)buf, (TInt)*len);
+    TPtrC8 data ( (const TUint8*) buf, (TInt) *len);
     TRequestStatus reqStatus;
     TSockXfrLength sentLen;
 
-    rSock.Send(data, flags, reqStatus, sentLen);
-    User::WaitForRequest(reqStatus);
+    rSock.Send (data, flags, reqStatus, sentLen);
+    User::WaitForRequest (reqStatus);
 
-    if (reqStatus.Int()==KErrNone) {
-	//*len = (TInt) sentLen.Length();
-	return PJ_SUCCESS;
+    if (reqStatus.Int() ==KErrNone) {
+        //*len = (TInt) sentLen.Length();
+        return PJ_SUCCESS;
     } else
-	return PJ_RETURN_OS_ERROR(reqStatus.Int());
+        return PJ_RETURN_OS_ERROR (reqStatus.Int());
 }
 
 
 /*
  * Send data.
  */
-PJ_DEF(pj_status_t) pj_sock_sendto(pj_sock_t sock,
-				   const void *buf,
-				   pj_ssize_t *len,
-				   unsigned flags,
-				   const pj_sockaddr_t *to,
-				   int tolen)
+PJ_DEF (pj_status_t) pj_sock_sendto (pj_sock_t sock,
+                                     const void *buf,
+                                     pj_ssize_t *len,
+                                     unsigned flags,
+                                     const pj_sockaddr_t *to,
+                                     int tolen)
 {
     pj_status_t status;
-    
+
     PJ_CHECK_STACK();
-    PJ_ASSERT_RETURN(sock && buf && len, PJ_EINVAL);
+    PJ_ASSERT_RETURN (sock && buf && len, PJ_EINVAL);
 
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
-    
-    CPjSocket *pjSock = (CPjSocket*)sock;
+
+    CPjSocket *pjSock = (CPjSocket*) sock;
     RSocket &rSock = pjSock->Socket();
 
     // Only supports AF_INET for now
-    PJ_ASSERT_RETURN(tolen>=(int)sizeof(pj_sockaddr_in), PJ_EINVAL);
+    PJ_ASSERT_RETURN (tolen>= (int) sizeof (pj_sockaddr_in), PJ_EINVAL);
 
     TInetAddr inetAddr;
-    status = PjSymbianOS::pj2Addr(*(pj_sockaddr*)to, tolen, inetAddr);
+    status = PjSymbianOS::pj2Addr (* (pj_sockaddr*) to, tolen, inetAddr);
+
     if (status != PJ_SUCCESS)
-    	return status;
+        return status;
 
-    TPtrC8 data((const TUint8*)buf, (TInt)*len);
+    TPtrC8 data ( (const TUint8*) buf, (TInt) *len);
     TRequestStatus reqStatus;
     TSockXfrLength sentLen;
 
-    rSock.SendTo(data, inetAddr, flags, reqStatus, sentLen);
-    User::WaitForRequest(reqStatus);
+    rSock.SendTo (data, inetAddr, flags, reqStatus, sentLen);
+    User::WaitForRequest (reqStatus);
 
-    if (reqStatus.Int()==KErrNone) {
-	//For some reason TSockXfrLength is not returning correctly!
-	//*len = (TInt) sentLen.Length();
-	return PJ_SUCCESS;
-    } else 
-	return PJ_RETURN_OS_ERROR(reqStatus.Int());
+    if (reqStatus.Int() ==KErrNone) {
+        //For some reason TSockXfrLength is not returning correctly!
+        //*len = (TInt) sentLen.Length();
+        return PJ_SUCCESS;
+    } else
+        return PJ_RETURN_OS_ERROR (reqStatus.Int());
 }
 
 /*
  * Receive data.
  */
-PJ_DEF(pj_status_t) pj_sock_recv(pj_sock_t sock,
-				 void *buf,
-				 pj_ssize_t *len,
-				 unsigned flags)
+PJ_DEF (pj_status_t) pj_sock_recv (pj_sock_t sock,
+                                   void *buf,
+                                   pj_ssize_t *len,
+                                   unsigned flags)
 {
     PJ_CHECK_STACK();
 
-    PJ_ASSERT_RETURN(sock && buf && len, PJ_EINVAL);
-    PJ_ASSERT_RETURN(*len > 0, PJ_EINVAL);
+    PJ_ASSERT_RETURN (sock && buf && len, PJ_EINVAL);
+    PJ_ASSERT_RETURN (*len > 0, PJ_EINVAL);
 
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
 
-    CPjSocket *pjSock = (CPjSocket*)sock;
+    CPjSocket *pjSock = (CPjSocket*) sock;
 
     if (pjSock->Reader()) {
-	CPjSocketReader *reader = pjSock->Reader();
+        CPjSocketReader *reader = pjSock->Reader();
 
-	while (reader->IsActive() && !reader->HasData()) {
-	    User::WaitForAnyRequest();
-	}
+        while (reader->IsActive() && !reader->HasData()) {
+            User::WaitForAnyRequest();
+        }
 
-	if (reader->HasData()) {
-	    TPtr8 data((TUint8*)buf, (TInt)*len);
-	    TInetAddr inetAddr;
+        if (reader->HasData()) {
+            TPtr8 data ( (TUint8*) buf, (TInt) *len);
+            TInetAddr inetAddr;
 
-	    reader->ReadData(data, &inetAddr);
+            reader->ReadData (data, &inetAddr);
 
-	    *len = data.Length();
-	    return PJ_SUCCESS;
-	}
+            *len = data.Length();
+            return PJ_SUCCESS;
+        }
     }
 
     TRequestStatus reqStatus;
     TSockXfrLength recvLen;
-    TPtr8 data((TUint8*)buf, (TInt)*len, (TInt)*len);
+    TPtr8 data ( (TUint8*) buf, (TInt) *len, (TInt) *len);
 
     if (pjSock->IsDatagram()) {
-	pjSock->Socket().Recv(data, flags, reqStatus);
+        pjSock->Socket().Recv (data, flags, reqStatus);
     } else {
-	// Using static like this is not pretty, but we don't need to use
-	// the value anyway, hence doing it like this is probably most
-	// optimal.
-	static TSockXfrLength len;
-	pjSock->Socket().RecvOneOrMore(data, flags, reqStatus, len);
+        // Using static like this is not pretty, but we don't need to use
+        // the value anyway, hence doing it like this is probably most
+        // optimal.
+        static TSockXfrLength len;
+        pjSock->Socket().RecvOneOrMore (data, flags, reqStatus, len);
     }
-    User::WaitForRequest(reqStatus);
+
+    User::WaitForRequest (reqStatus);
 
     if (reqStatus == KErrNone) {
-	//*len = (TInt)recvLen.Length();
-	*len = data.Length();
-	return PJ_SUCCESS;
+        //*len = (TInt)recvLen.Length();
+        *len = data.Length();
+        return PJ_SUCCESS;
     } else {
-	*len = -1;
-	return PJ_RETURN_OS_ERROR(reqStatus.Int());
+        *len = -1;
+        return PJ_RETURN_OS_ERROR (reqStatus.Int());
     }
 }
 
 /*
  * Receive data.
  */
-PJ_DEF(pj_status_t) pj_sock_recvfrom(pj_sock_t sock,
-				     void *buf,
-				     pj_ssize_t *len,
-				     unsigned flags,
-				     pj_sockaddr_t *from,
-				     int *fromlen)
+PJ_DEF (pj_status_t) pj_sock_recvfrom (pj_sock_t sock,
+                                       void *buf,
+                                       pj_ssize_t *len,
+                                       unsigned flags,
+                                       pj_sockaddr_t *from,
+                                       int *fromlen)
 {
     PJ_CHECK_STACK();
 
-    PJ_ASSERT_RETURN(sock && buf && len && from && fromlen, PJ_EINVAL);
-    PJ_ASSERT_RETURN(*len > 0, PJ_EINVAL);
-    PJ_ASSERT_RETURN(*fromlen >= (int)sizeof(pj_sockaddr_in), PJ_EINVAL);
+    PJ_ASSERT_RETURN (sock && buf && len && from && fromlen, PJ_EINVAL);
+    PJ_ASSERT_RETURN (*len > 0, PJ_EINVAL);
+    PJ_ASSERT_RETURN (*fromlen >= (int) sizeof (pj_sockaddr_in), PJ_EINVAL);
 
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
 
-    CPjSocket *pjSock = (CPjSocket*)sock;
+    CPjSocket *pjSock = (CPjSocket*) sock;
     RSocket &rSock = pjSock->Socket();
 
     if (pjSock->Reader()) {
-	CPjSocketReader *reader = pjSock->Reader();
+        CPjSocketReader *reader = pjSock->Reader();
 
-	while (reader->IsActive() && !reader->HasData()) {
-	    User::WaitForAnyRequest();
-	}
+        while (reader->IsActive() && !reader->HasData()) {
+            User::WaitForAnyRequest();
+        }
 
-	if (reader->HasData()) {
-	    TPtr8 data((TUint8*)buf, (TInt)*len);
-	    TInetAddr inetAddr;
+        if (reader->HasData()) {
+            TPtr8 data ( (TUint8*) buf, (TInt) *len);
+            TInetAddr inetAddr;
 
-	    reader->ReadData(data, &inetAddr);
+            reader->ReadData (data, &inetAddr);
 
-	    *len = data.Length();
+            *len = data.Length();
 
-	    if (from && fromlen) {
-		return PjSymbianOS::Addr2pj(inetAddr, *(pj_sockaddr*)from, 
-					    fromlen);
-	    } else {
-	    	return PJ_SUCCESS;
-	    }
-	}
+            if (from && fromlen) {
+                return PjSymbianOS::Addr2pj (inetAddr, * (pj_sockaddr*) from,
+                                             fromlen);
+            } else {
+                return PJ_SUCCESS;
+            }
+        }
     }
 
     TInetAddr inetAddr;
     TRequestStatus reqStatus;
     TSockXfrLength recvLen;
-    TPtr8 data((TUint8*)buf, (TInt)*len, (TInt)*len);
+    TPtr8 data ( (TUint8*) buf, (TInt) *len, (TInt) *len);
 
-    rSock.RecvFrom(data, inetAddr, flags, reqStatus, recvLen);
-    User::WaitForRequest(reqStatus);
+    rSock.RecvFrom (data, inetAddr, flags, reqStatus, recvLen);
+    User::WaitForRequest (reqStatus);
 
     if (reqStatus == KErrNone) {
-	//*len = (TInt)recvLen.Length();
-	*len = data.Length();
-	return PjSymbianOS::Addr2pj(inetAddr, *(pj_sockaddr*)from, fromlen);
+        //*len = (TInt)recvLen.Length();
+        *len = data.Length();
+        return PjSymbianOS::Addr2pj (inetAddr, * (pj_sockaddr*) from, fromlen);
     } else {
-	*len = -1;
-	*fromlen = -1;
-	return PJ_RETURN_OS_ERROR(reqStatus.Int());
+        *len = -1;
+        *fromlen = -1;
+        return PJ_RETURN_OS_ERROR (reqStatus.Int());
     }
 }
 
 /*
  * Get socket option.
  */
-PJ_DEF(pj_status_t) pj_sock_getsockopt( pj_sock_t sock,
-					pj_uint16_t level,
-					pj_uint16_t optname,
-					void *optval,
-					int *optlen)
+PJ_DEF (pj_status_t) pj_sock_getsockopt (pj_sock_t sock,
+        pj_uint16_t level,
+        pj_uint16_t optname,
+        void *optval,
+        int *optlen)
 {
     // Not supported for now.
-    PJ_UNUSED_ARG(sock);
-    PJ_UNUSED_ARG(level);
-    PJ_UNUSED_ARG(optname);
-    PJ_UNUSED_ARG(optval);
-    PJ_UNUSED_ARG(optlen);
+    PJ_UNUSED_ARG (sock);
+    PJ_UNUSED_ARG (level);
+    PJ_UNUSED_ARG (optname);
+    PJ_UNUSED_ARG (optval);
+    PJ_UNUSED_ARG (optlen);
     return PJ_EINVALIDOP;
 }
 
 /*
  * Set socket option.
  */
-PJ_DEF(pj_status_t) pj_sock_setsockopt( pj_sock_t sock,
-					pj_uint16_t level,
-					pj_uint16_t optname,
-					const void *optval,
-					int optlen)
+PJ_DEF (pj_status_t) pj_sock_setsockopt (pj_sock_t sock,
+        pj_uint16_t level,
+        pj_uint16_t optname,
+        const void *optval,
+        int optlen)
 {
     // Not supported for now.
-    PJ_UNUSED_ARG(sock);
-    PJ_UNUSED_ARG(level);
-    PJ_UNUSED_ARG(optname);
-    PJ_UNUSED_ARG(optval);
-    PJ_UNUSED_ARG(optlen);
+    PJ_UNUSED_ARG (sock);
+    PJ_UNUSED_ARG (level);
+    PJ_UNUSED_ARG (optname);
+    PJ_UNUSED_ARG (optval);
+    PJ_UNUSED_ARG (optlen);
     return PJ_EINVALIDOP;
 }
 
 /*
  * Connect socket.
  */
-PJ_DEF(pj_status_t) pj_sock_connect( pj_sock_t sock,
-				     const pj_sockaddr_t *addr,
-				     int namelen)
+PJ_DEF (pj_status_t) pj_sock_connect (pj_sock_t sock,
+                                      const pj_sockaddr_t *addr,
+                                      int namelen)
 {
     pj_status_t status;
-    
+
     PJ_CHECK_STACK();
 
-    PJ_ASSERT_RETURN(sock && addr && namelen, PJ_EINVAL);
-    PJ_ASSERT_RETURN(((pj_sockaddr*)addr)->addr.sa_family == PJ_AF_INET, 
-		     PJ_EINVAL);
+    PJ_ASSERT_RETURN (sock && addr && namelen, PJ_EINVAL);
+    PJ_ASSERT_RETURN ( ( (pj_sockaddr*) addr)->addr.sa_family == PJ_AF_INET,
+                       PJ_EINVAL);
 
     // Return failure if access point is marked as down by app.
     PJ_SYMBIAN_CHECK_CONNECTION();
-    
-    CPjSocket *pjSock = (CPjSocket*)sock;
+
+    CPjSocket *pjSock = (CPjSocket*) sock;
     RSocket &rSock = pjSock->Socket();
 
     TInetAddr inetAddr;
     TRequestStatus reqStatus;
 
-    status = PjSymbianOS::pj2Addr(*(pj_sockaddr*)addr, namelen, inetAddr);
+    status = PjSymbianOS::pj2Addr (* (pj_sockaddr*) addr, namelen, inetAddr);
+
     if (status != PJ_SUCCESS)
-    	return status;
+        return status;
 
-    rSock.Connect(inetAddr, reqStatus);
-    User::WaitForRequest(reqStatus);
+    rSock.Connect (inetAddr, reqStatus);
+    User::WaitForRequest (reqStatus);
 
     if (reqStatus == KErrNone) {
-	pjSock->SetConnected(true);
-	return PJ_SUCCESS;
+        pjSock->SetConnected (true);
+        return PJ_SUCCESS;
     } else {
-	return PJ_RETURN_OS_ERROR(reqStatus.Int());
+        return PJ_RETURN_OS_ERROR (reqStatus.Int());
     }
 }
 
@@ -932,96 +944,97 @@ PJ_DEF(pj_status_t) pj_sock_connect( pj_sock_t sock,
  * Shutdown socket.
  */
 #if PJ_HAS_TCP
-PJ_DEF(pj_status_t) pj_sock_shutdown( pj_sock_t sock,
-				      int how)
+PJ_DEF (pj_status_t) pj_sock_shutdown (pj_sock_t sock,
+                                       int how)
 {
     PJ_CHECK_STACK();
 
-    PJ_ASSERT_RETURN(sock, PJ_EINVAL);
+    PJ_ASSERT_RETURN (sock, PJ_EINVAL);
 
-    CPjSocket *pjSock = (CPjSocket*)sock;
+    CPjSocket *pjSock = (CPjSocket*) sock;
     RSocket &rSock = pjSock->Socket();
 
     RSocket::TShutdown aHow;
+
     if (how == PJ_SD_RECEIVE)
-	aHow = RSocket::EStopInput;
+        aHow = RSocket::EStopInput;
     else if (how == PJ_SHUT_WR)
-	aHow = RSocket::EStopOutput;
+        aHow = RSocket::EStopOutput;
     else
-	aHow = RSocket::ENormal;
+        aHow = RSocket::ENormal;
 
     TRequestStatus reqStatus;
 
-    rSock.Shutdown(aHow, reqStatus);
-    User::WaitForRequest(reqStatus);
+    rSock.Shutdown (aHow, reqStatus);
+    User::WaitForRequest (reqStatus);
 
     if (reqStatus == KErrNone) {
-	return PJ_SUCCESS;
+        return PJ_SUCCESS;
     } else {
-	return PJ_RETURN_OS_ERROR(reqStatus.Int());
+        return PJ_RETURN_OS_ERROR (reqStatus.Int());
     }
 }
 
 /*
  * Start listening to incoming connections.
  */
-PJ_DEF(pj_status_t) pj_sock_listen( pj_sock_t sock,
-				    int backlog)
+PJ_DEF (pj_status_t) pj_sock_listen (pj_sock_t sock,
+                                     int backlog)
 {
     PJ_CHECK_STACK();
 
-    PJ_ASSERT_RETURN(sock && backlog, PJ_EINVAL);
+    PJ_ASSERT_RETURN (sock && backlog, PJ_EINVAL);
 
-    CPjSocket *pjSock = (CPjSocket*)sock;
+    CPjSocket *pjSock = (CPjSocket*) sock;
     RSocket &rSock = pjSock->Socket();
 
-    TInt rc = rSock.Listen((TUint)backlog);
+    TInt rc = rSock.Listen ( (TUint) backlog);
 
     if (rc == KErrNone) {
-	return PJ_SUCCESS;
+        return PJ_SUCCESS;
     } else {
-	return PJ_RETURN_OS_ERROR(rc);
+        return PJ_RETURN_OS_ERROR (rc);
     }
 }
 
 /*
  * Accept incoming connections
  */
-PJ_DEF(pj_status_t) pj_sock_accept( pj_sock_t serverfd,
-				    pj_sock_t *newsock,
-				    pj_sockaddr_t *addr,
-				    int *addrlen)
+PJ_DEF (pj_status_t) pj_sock_accept (pj_sock_t serverfd,
+                                     pj_sock_t *newsock,
+                                     pj_sockaddr_t *addr,
+                                     int *addrlen)
 {
     PJ_CHECK_STACK();
 
-    PJ_ASSERT_RETURN(serverfd && newsock, PJ_EINVAL);
+    PJ_ASSERT_RETURN (serverfd && newsock, PJ_EINVAL);
 
-    CPjSocket *pjSock = (CPjSocket*)serverfd;
+    CPjSocket *pjSock = (CPjSocket*) serverfd;
     RSocket &rSock = pjSock->Socket();
 
     // Create a 'blank' socket
     RSocket newSock;
-    newSock.Open(PjSymbianOS::Instance()->SocketServ());
+    newSock.Open (PjSymbianOS::Instance()->SocketServ());
 
     // Call Accept()
     TRequestStatus reqStatus;
 
-    rSock.Accept(newSock, reqStatus);
-    User::WaitForRequest(reqStatus);
+    rSock.Accept (newSock, reqStatus);
+    User::WaitForRequest (reqStatus);
 
     if (reqStatus != KErrNone) {
-	return PJ_RETURN_OS_ERROR(reqStatus.Int());
+        return PJ_RETURN_OS_ERROR (reqStatus.Int());
     }
 
     // Create PJ socket
-    CPjSocket *newPjSock = new CPjSocket(pjSock->GetAf(), pjSock->GetSockType(),
-					 newSock);
-    newPjSock->SetConnected(true);
+    CPjSocket *newPjSock = new CPjSocket (pjSock->GetAf(), pjSock->GetSockType(),
+                                          newSock);
+    newPjSock->SetConnected (true);
 
     *newsock = (pj_sock_t) newPjSock;
 
     if (addr && addrlen) {
-	return pj_sock_getpeername(*newsock, addr, addrlen);
+        return pj_sock_getpeername (*newsock, addr, addrlen);
     }
 
     return PJ_SUCCESS;
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/ssl_sock_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/ssl_sock_symbian.cpp
index da388d0bc4f674681204100400f3b52a8de18817..acafd88b50b2b3d803a024bef4c3ec83792a0b88 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/ssl_sock_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/ssl_sock_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: ssl_sock_symbian.cpp 2998 2009-11-09 08:51:34Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -43,235 +43,240 @@
 
 #define THIS_FILE "ssl_sock_symbian.cpp"
 
-typedef void (*CPjSSLSocket_cb)(int err, void *key);
+typedef void (*CPjSSLSocket_cb) (int err, void *key);
 
 class CPjSSLSocketReader : public CActive
 {
-public:
-    static CPjSSLSocketReader *NewL(CSecureSocket &sock) 
-    {
-	CPjSSLSocketReader *self = new (ELeave) 
-				   CPjSSLSocketReader(sock);
-	CleanupStack::PushL(self);
-	self->ConstructL();
-	CleanupStack::Pop(self);
-	return self;
-    }
+    public:
+        static CPjSSLSocketReader *NewL (CSecureSocket &sock) {
+            CPjSSLSocketReader *self = new (ELeave)
+            CPjSSLSocketReader (sock);
+            CleanupStack::PushL (self);
+            self->ConstructL();
+            CleanupStack::Pop (self);
+            return self;
+        }
 
-    ~CPjSSLSocketReader() {
-	Cancel();
-    }
+        ~CPjSSLSocketReader() {
+            Cancel();
+        }
 
-    /* Asynchronous read from the socket. */
-    int Read(CPjSSLSocket_cb cb, void *key, TPtr8 &data, TUint flags)
-    {
-	PJ_ASSERT_RETURN(!IsActive(), PJ_EBUSY);
-	
-	cb_ = cb;
-	key_ = key;
-	sock_.RecvOneOrMore(data, iStatus, len_received_);
-	SetActive();
-	
-	return PJ_EPENDING;
-    }
+        /* Asynchronous read from the socket. */
+        int Read (CPjSSLSocket_cb cb, void *key, TPtr8 &data, TUint flags) {
+            PJ_ASSERT_RETURN (!IsActive(), PJ_EBUSY);
 
-private:
-    CSecureSocket  	&sock_;
-    CPjSSLSocket_cb	 cb_;
-    void		*key_;
-    TSockXfrLength  	 len_received_; /* not really useful? */
+            cb_ = cb;
+            key_ = key;
+            sock_.RecvOneOrMore (data, iStatus, len_received_);
+            SetActive();
 
-    void DoCancel() {
-	sock_.CancelAll();
-    }
-    
-    void RunL() {
-	(*cb_)(iStatus.Int(), key_);
-    }
+            return PJ_EPENDING;
+        }
 
-    CPjSSLSocketReader(CSecureSocket &sock) : 
-	CActive(0), sock_(sock), cb_(NULL), key_(NULL) 
-    {}
-    
-    void ConstructL() {
-	CActiveScheduler::Add(this);
-    }
+    private:
+        CSecureSocket  	&sock_;
+        CPjSSLSocket_cb	 cb_;
+        void		*key_;
+        TSockXfrLength  	 len_received_; /* not really useful? */
+
+        void DoCancel() {
+            sock_.CancelAll();
+        }
+
+        void RunL() {
+            (*cb_) (iStatus.Int(), key_);
+        }
+
+        CPjSSLSocketReader (CSecureSocket &sock) :
+                CActive (0), sock_ (sock), cb_ (NULL), key_ (NULL) {}
+
+        void ConstructL() {
+            CActiveScheduler::Add (this);
+        }
 };
 
 class CPjSSLSocket : public CActive
 {
-public:
-    enum ssl_state {
-	SSL_STATE_NULL,
-	SSL_STATE_CONNECTING,
-	SSL_STATE_HANDSHAKING,
-	SSL_STATE_ESTABLISHED
-    };
-    
-    static CPjSSLSocket *NewL(const TDesC8 &ssl_proto,
-			      pj_qos_type qos_type,
-			      const pj_qos_params &qos_params) 
-    {
-	CPjSSLSocket *self = new (ELeave) CPjSSLSocket(qos_type, qos_params);
-	CleanupStack::PushL(self);
-	self->ConstructL(ssl_proto);
-	CleanupStack::Pop(self);
-	return self;
-    }
+    public:
+        enum ssl_state {
+            SSL_STATE_NULL,
+            SSL_STATE_CONNECTING,
+            SSL_STATE_HANDSHAKING,
+            SSL_STATE_ESTABLISHED
+        };
+
+        static CPjSSLSocket *NewL (const TDesC8 &ssl_proto,
+                                   pj_qos_type qos_type,
+                                   const pj_qos_params &qos_params) {
+            CPjSSLSocket *self = new (ELeave) CPjSSLSocket (qos_type, qos_params);
+            CleanupStack::PushL (self);
+            self->ConstructL (ssl_proto);
+            CleanupStack::Pop (self);
+            return self;
+        }
 
-    ~CPjSSLSocket() {
-	Cancel();
-	CleanupSubObjects();
-    }
+        ~CPjSSLSocket() {
+            Cancel();
+            CleanupSubObjects();
+        }
 
-    int Connect(CPjSSLSocket_cb cb, void *key, const TInetAddr &local_addr, 
-		const TInetAddr &rem_addr, 
-		const TDesC8 &servername = TPtrC8(NULL,0));
-    int Send(CPjSSLSocket_cb cb, void *key, const TDesC8 &aDesc, TUint flags);
-    int SendSync(const TDesC8 &aDesc, TUint flags);
-
-    CPjSSLSocketReader* GetReader();
-    enum ssl_state GetState() const { return state_; }
-    const TInetAddr* GetLocalAddr() const { return &local_addr_; }
-    int GetCipher(TDes8 &cipher) const {
-	if (securesock_)
-	    return securesock_->CurrentCipherSuite(cipher);
-	return KErrNotFound;
-    }
+        int Connect (CPjSSLSocket_cb cb, void *key, const TInetAddr &local_addr,
+                     const TInetAddr &rem_addr,
+                     const TDesC8 &servername = TPtrC8 (NULL,0));
+        int Send (CPjSSLSocket_cb cb, void *key, const TDesC8 &aDesc, TUint flags);
+        int SendSync (const TDesC8 &aDesc, TUint flags);
 
-private:
-    enum ssl_state	 state_;
-    pj_sock_t	    	 sock_;
-    CSecureSocket  	*securesock_;
-    bool	    	 is_connected_;
-    
-    pj_qos_type 	 qos_type_;
-    pj_qos_params 	 qos_params_;
-    			      
-    CPjSSLSocketReader  *reader_;
-    TBuf<32> 	    	 ssl_proto_;
-    TInetAddr       	 rem_addr_;
-    TPtrC8		 servername_;
-    TInetAddr       	 local_addr_;
-    TSockXfrLength 	 sent_len_;
-
-    CPjSSLSocket_cb 	 cb_;
-    void 	   	*key_;
-    
-    void DoCancel();
-    void RunL();
-
-    CPjSSLSocket(pj_qos_type qos_type, const pj_qos_params &qos_params) :
-	CActive(0), state_(SSL_STATE_NULL), sock_(PJ_INVALID_SOCKET), 
-	securesock_(NULL), is_connected_(false),
-	qos_type_(qos_type), qos_params_(qos_params),
-	reader_(NULL), 	cb_(NULL), key_(NULL)
-    {}
-    
-    void ConstructL(const TDesC8 &ssl_proto) {
-	ssl_proto_.Copy(ssl_proto);
-	CActiveScheduler::Add(this);
-    }
+        CPjSSLSocketReader* GetReader();
+        enum ssl_state GetState() const {
+            return state_;
+        }
+        const TInetAddr* GetLocalAddr() const {
+            return &local_addr_;
+        }
+        int GetCipher (TDes8 &cipher) const {
+            if (securesock_)
+                return securesock_->CurrentCipherSuite (cipher);
 
-    void CleanupSubObjects() {
-	delete reader_;
-	reader_ = NULL;
-	if (securesock_) {
-	    securesock_->Close();
-	    delete securesock_;
-	    securesock_ = NULL;
-	}
-	if (sock_ != PJ_INVALID_SOCKET) {
-	    pj_sock_close(sock_);
-	    sock_ = PJ_INVALID_SOCKET;
-	}	    
-    }
+            return KErrNotFound;
+        }
+
+    private:
+        enum ssl_state	 state_;
+        pj_sock_t	    	 sock_;
+        CSecureSocket  	*securesock_;
+        bool	    	 is_connected_;
+
+        pj_qos_type 	 qos_type_;
+        pj_qos_params 	 qos_params_;
+
+        CPjSSLSocketReader  *reader_;
+        TBuf<32> 	    	 ssl_proto_;
+        TInetAddr       	 rem_addr_;
+        TPtrC8		 servername_;
+        TInetAddr       	 local_addr_;
+        TSockXfrLength 	 sent_len_;
+
+        CPjSSLSocket_cb 	 cb_;
+        void 	   	*key_;
+
+        void DoCancel();
+        void RunL();
+
+        CPjSSLSocket (pj_qos_type qos_type, const pj_qos_params &qos_params) :
+                CActive (0), state_ (SSL_STATE_NULL), sock_ (PJ_INVALID_SOCKET),
+                securesock_ (NULL), is_connected_ (false),
+                qos_type_ (qos_type), qos_params_ (qos_params),
+                reader_ (NULL), 	cb_ (NULL), key_ (NULL) {}
+
+        void ConstructL (const TDesC8 &ssl_proto) {
+            ssl_proto_.Copy (ssl_proto);
+            CActiveScheduler::Add (this);
+        }
+
+        void CleanupSubObjects() {
+            delete reader_;
+            reader_ = NULL;
+
+            if (securesock_) {
+                securesock_->Close();
+                delete securesock_;
+                securesock_ = NULL;
+            }
+
+            if (sock_ != PJ_INVALID_SOCKET) {
+                pj_sock_close (sock_);
+                sock_ = PJ_INVALID_SOCKET;
+            }
+        }
 };
 
-int CPjSSLSocket::Connect(CPjSSLSocket_cb cb, void *key, 
-			  const TInetAddr &local_addr, 
-			  const TInetAddr &rem_addr,
-			  const TDesC8 &servername)
+int CPjSSLSocket::Connect (CPjSSLSocket_cb cb, void *key,
+                           const TInetAddr &local_addr,
+                           const TInetAddr &rem_addr,
+                           const TDesC8 &servername)
 {
     pj_status_t status;
-    
-    PJ_ASSERT_RETURN(state_ == SSL_STATE_NULL, PJ_EINVALIDOP);
-    
-    status = pj_sock_socket(rem_addr.Family(), pj_SOCK_STREAM(), 0, &sock_);
+
+    PJ_ASSERT_RETURN (state_ == SSL_STATE_NULL, PJ_EINVALIDOP);
+
+    status = pj_sock_socket (rem_addr.Family(), pj_SOCK_STREAM(), 0, &sock_);
+
     if (status != PJ_SUCCESS)
-	return status;
+        return status;
 
     // Apply QoS
-    status = pj_sock_apply_qos2(sock_, qos_type_, &qos_params_, 
-    				2,  THIS_FILE, NULL);
-    
-    RSocket &rSock = ((CPjSocket*)sock_)->Socket();
+    status = pj_sock_apply_qos2 (sock_, qos_type_, &qos_params_,
+                                 2,  THIS_FILE, NULL);
+
+    RSocket &rSock = ( (CPjSocket*) sock_)->Socket();
 
     local_addr_ = local_addr;
-    
+
     if (!local_addr_.IsUnspecified()) {
-	TInt err = rSock.Bind(local_addr_);
-	if (err != KErrNone)
-	    return PJ_RETURN_OS_ERROR(err);
+        TInt err = rSock.Bind (local_addr_);
+
+        if (err != KErrNone)
+            return PJ_RETURN_OS_ERROR (err);
     }
-    
+
     cb_ = cb;
     key_ = key;
     rem_addr_ = rem_addr;
-    servername_.Set(servername);
+    servername_.Set (servername);
     state_ = SSL_STATE_CONNECTING;
 
-    rSock.Connect(rem_addr_, iStatus);
+    rSock.Connect (rem_addr_, iStatus);
     SetActive();
-    
-    rSock.LocalName(local_addr_);
+
+    rSock.LocalName (local_addr_);
 
     return PJ_EPENDING;
 }
 
-int CPjSSLSocket::Send(CPjSSLSocket_cb cb, void *key, const TDesC8 &aDesc, 
-		       TUint flags)
+int CPjSSLSocket::Send (CPjSSLSocket_cb cb, void *key, const TDesC8 &aDesc,
+                        TUint flags)
 {
-    PJ_UNUSED_ARG(flags);
+    PJ_UNUSED_ARG (flags);
+
+    PJ_ASSERT_RETURN (state_ == SSL_STATE_ESTABLISHED, PJ_EINVALIDOP);
 
-    PJ_ASSERT_RETURN(state_ == SSL_STATE_ESTABLISHED, PJ_EINVALIDOP);
-    
     if (IsActive())
-	return PJ_EBUSY;
-    
+        return PJ_EBUSY;
+
     cb_ = cb;
     key_ = key;
-    
-    securesock_->Send(aDesc, iStatus, sent_len_);
+
+    securesock_->Send (aDesc, iStatus, sent_len_);
     SetActive();
-    
+
     return PJ_EPENDING;
 }
 
-int CPjSSLSocket::SendSync(const TDesC8 &aDesc, TUint flags)
+int CPjSSLSocket::SendSync (const TDesC8 &aDesc, TUint flags)
 {
-    PJ_UNUSED_ARG(flags);
+    PJ_UNUSED_ARG (flags);
+
+    PJ_ASSERT_RETURN (state_ == SSL_STATE_ESTABLISHED, PJ_EINVALIDOP);
 
-    PJ_ASSERT_RETURN(state_ == SSL_STATE_ESTABLISHED, PJ_EINVALIDOP);
-    
     TRequestStatus reqStatus;
-    securesock_->Send(aDesc, reqStatus, sent_len_);
-    User::WaitForRequest(reqStatus);
-    
-    return PJ_RETURN_OS_ERROR(reqStatus.Int());
+    securesock_->Send (aDesc, reqStatus, sent_len_);
+    User::WaitForRequest (reqStatus);
+
+    return PJ_RETURN_OS_ERROR (reqStatus.Int());
 }
 
 CPjSSLSocketReader* CPjSSLSocket::GetReader()
 {
-    PJ_ASSERT_RETURN(state_ == SSL_STATE_ESTABLISHED, NULL);
-    
+    PJ_ASSERT_RETURN (state_ == SSL_STATE_ESTABLISHED, NULL);
+
     if (reader_)
-	return reader_;
-    
-    TRAPD(err,	reader_ = CPjSSLSocketReader::NewL(*securesock_));
+        return reader_;
+
+    TRAPD (err,	reader_ = CPjSSLSocketReader::NewL (*securesock_));
+
     if (err != KErrNone)
-	return NULL;
-    
+        return NULL;
+
     return reader_;
 }
 
@@ -279,109 +284,124 @@ void CPjSSLSocket::DoCancel()
 {
     /* Operation to be cancelled depends on current state */
     switch (state_) {
-    case SSL_STATE_CONNECTING:
-	{
-	    RSocket &rSock = ((CPjSocket*)sock_)->Socket();
-	    rSock.CancelConnect();
-	    
-	    CleanupSubObjects();
-
-	    state_ = SSL_STATE_NULL;
-	}
-	break;
-    case SSL_STATE_HANDSHAKING:
-	{
-	    securesock_->CancelHandshake();
-	    securesock_->Close();
-	    
-	    CleanupSubObjects();
-	    
-	    state_ = SSL_STATE_NULL;
-	}
-	break;
-    case SSL_STATE_ESTABLISHED:
-	securesock_->CancelSend();
-	break;
-    default:
-	break;
+        case SSL_STATE_CONNECTING: {
+            RSocket &rSock = ( (CPjSocket*) sock_)->Socket();
+            rSock.CancelConnect();
+
+            CleanupSubObjects();
+
+            state_ = SSL_STATE_NULL;
+        }
+        break;
+        case SSL_STATE_HANDSHAKING: {
+            securesock_->CancelHandshake();
+            securesock_->Close();
+
+            CleanupSubObjects();
+
+            state_ = SSL_STATE_NULL;
+        }
+        break;
+        case SSL_STATE_ESTABLISHED:
+            securesock_->CancelSend();
+            break;
+        default:
+            break;
     }
 }
 
 void CPjSSLSocket::RunL()
 {
     switch (state_) {
-    case SSL_STATE_CONNECTING:
-	if (iStatus != KErrNone) {
-	    CleanupSubObjects();
-	    state_ = SSL_STATE_NULL;
-	    /* Dispatch connect failure notification */
-	    if (cb_) (*cb_)(iStatus.Int(), key_);
-	} else {
-	    RSocket &rSock = ((CPjSocket*)sock_)->Socket();
-
-	    /* Get local addr */
-	    rSock.LocalName(local_addr_);
-	    
-	    /* Prepare and start handshake */
-	    securesock_ = CSecureSocket::NewL(rSock, ssl_proto_);
-	    securesock_->SetDialogMode(EDialogModeAttended);
-	    if (servername_.Length() > 0)
-		securesock_->SetOpt(KSoSSLDomainName, KSolInetSSL,
-				    servername_);
-	    securesock_->FlushSessionCache();
-	    securesock_->StartClientHandshake(iStatus);
-	    SetActive();
-	    state_ = SSL_STATE_HANDSHAKING;
-	}
-	break;
-    case SSL_STATE_HANDSHAKING:
-	if (iStatus == KErrNone) {
-	    state_ = SSL_STATE_ESTABLISHED;
-	} else {
-	    state_ = SSL_STATE_NULL;
-	    CleanupSubObjects();
-	}
-	/* Dispatch connect status notification */
-	if (cb_) (*cb_)(iStatus.Int(), key_);
-	break;
-    case SSL_STATE_ESTABLISHED:
-	/* Dispatch data sent notification */
-	if (cb_) (*cb_)(iStatus.Int(), key_);
-	break;
-    default:
-	pj_assert(0);
-	break;
+        case SSL_STATE_CONNECTING:
+
+            if (iStatus != KErrNone) {
+                CleanupSubObjects();
+                state_ = SSL_STATE_NULL;
+
+                /* Dispatch connect failure notification */
+                if (cb_) (*cb_) (iStatus.Int(), key_);
+            } else {
+                RSocket &rSock = ( (CPjSocket*) sock_)->Socket();
+
+                /* Get local addr */
+                rSock.LocalName (local_addr_);
+
+                /* Prepare and start handshake */
+                securesock_ = CSecureSocket::NewL (rSock, ssl_proto_);
+                securesock_->SetDialogMode (EDialogModeAttended);
+
+                if (servername_.Length() > 0)
+                    securesock_->SetOpt (KSoSSLDomainName, KSolInetSSL,
+                                         servername_);
+
+                securesock_->FlushSessionCache();
+                securesock_->StartClientHandshake (iStatus);
+                SetActive();
+                state_ = SSL_STATE_HANDSHAKING;
+            }
+
+            break;
+        case SSL_STATE_HANDSHAKING:
+
+            if (iStatus == KErrNone) {
+                state_ = SSL_STATE_ESTABLISHED;
+            } else {
+                state_ = SSL_STATE_NULL;
+                CleanupSubObjects();
+            }
+
+            /* Dispatch connect status notification */
+            if (cb_) (*cb_) (iStatus.Int(), key_);
+
+            break;
+        case SSL_STATE_ESTABLISHED:
+
+            /* Dispatch data sent notification */
+            if (cb_) (*cb_) (iStatus.Int(), key_);
+
+            break;
+        default:
+            pj_assert (0);
+            break;
     }
 }
 
-typedef void (*CPjTimer_cb)(void *user_data);
+typedef void (*CPjTimer_cb) (void *user_data);
 
-class CPjTimer : public CActive 
+class CPjTimer : public CActive
 {
-public:
-    CPjTimer(const pj_time_val *delay, CPjTimer_cb cb, void *user_data) : 
-	CActive(0), cb_(cb), user_data_(user_data)
-    {
-	CActiveScheduler::Add(this);
-
-	rtimer_.CreateLocal();
-	pj_int32_t interval = PJ_TIME_VAL_MSEC(*delay) * 1000;
-	if (interval < 0) {
-	    interval = 0;
-	}
-	rtimer_.After(iStatus, interval);
-	SetActive();
-    }
-    
-    ~CPjTimer() { Cancel(); }
-    
-private:	
-    RTimer		 rtimer_;
-    CPjTimer_cb		 cb_;
-    void		*user_data_;
-    
-    void RunL() { if (cb_) (*cb_)(user_data_); }
-    void DoCancel() { rtimer_.Cancel(); }
+    public:
+        CPjTimer (const pj_time_val *delay, CPjTimer_cb cb, void *user_data) :
+                CActive (0), cb_ (cb), user_data_ (user_data) {
+            CActiveScheduler::Add (this);
+
+            rtimer_.CreateLocal();
+            pj_int32_t interval = PJ_TIME_VAL_MSEC (*delay) * 1000;
+
+            if (interval < 0) {
+                interval = 0;
+            }
+
+            rtimer_.After (iStatus, interval);
+            SetActive();
+        }
+
+        ~CPjTimer() {
+            Cancel();
+        }
+
+    private:
+        RTimer		 rtimer_;
+        CPjTimer_cb		 cb_;
+        void		*user_data_;
+
+        void RunL() {
+            if (cb_) (*cb_) (user_data_);
+        }
+        void DoCancel() {
+            rtimer_.Cancel();
+        }
 };
 
 /*
@@ -390,7 +410,7 @@ private:
 typedef struct read_state_t {
     TPtr8		*read_buf;
     TPtr8		*orig_buf;
-    pj_uint32_t		 flags;    
+    pj_uint32_t		 flags;
 } read_state_t;
 
 /*
@@ -408,7 +428,7 @@ typedef struct write_data_t {
  */
 typedef struct write_state_t {
     char		*buf;
-    pj_size_t		 max_len;    
+    pj_size_t		 max_len;
     char		*start;
     pj_size_t		 len;
     write_data_t	*current_data;
@@ -418,11 +438,10 @@ typedef struct write_state_t {
 /*
  * Secure socket structure definition.
  */
-struct pj_ssl_sock_t
-{
+struct pj_ssl_sock_t {
     pj_ssl_sock_cb	 cb;
     void		*user_data;
-    
+
     pj_bool_t		 established;
     write_state_t	 write_state;
     read_state_t	 read_state;
@@ -451,89 +470,96 @@ struct pj_ssl_sock_t
 /*
  * Get cipher list supported by SSL/TLS backend.
  */
-PJ_DEF(pj_status_t) pj_ssl_cipher_get_availables (pj_ssl_cipher ciphers[],
-					          unsigned *cipher_num)
+PJ_DEF (pj_status_t) pj_ssl_cipher_get_availables (pj_ssl_cipher ciphers[],
+        unsigned *cipher_num)
 {
     /* Available ciphers */
     static pj_ssl_cipher ciphers_[64];
     static unsigned ciphers_num_ = 0;
     unsigned i;
 
-    PJ_ASSERT_RETURN(ciphers && cipher_num, PJ_EINVAL);
-    
+    PJ_ASSERT_RETURN (ciphers && cipher_num, PJ_EINVAL);
+
     if (ciphers_num_ == 0) {
         RSocket sock;
         CSecureSocket *secure_sock;
-        TPtrC16 proto(_L16("TLS1.0"));
+        TPtrC16 proto (_L16 ("TLS1.0"));
+
+        secure_sock = CSecureSocket::NewL (sock, proto);
 
-        secure_sock = CSecureSocket::NewL(sock, proto);
         if (secure_sock) {
-            TBuf8<128> ciphers_buf(0);
-            secure_sock->AvailableCipherSuites(ciphers_buf);
-            
+            TBuf8<128> ciphers_buf (0);
+            secure_sock->AvailableCipherSuites (ciphers_buf);
+
             ciphers_num_ = ciphers_buf.Length() / 2;
-            if (ciphers_num_ > PJ_ARRAY_SIZE(ciphers_))
-        	ciphers_num_ = PJ_ARRAY_SIZE(ciphers_);
+
+            if (ciphers_num_ > PJ_ARRAY_SIZE (ciphers_))
+                ciphers_num_ = PJ_ARRAY_SIZE (ciphers_);
+
             for (i = 0; i < ciphers_num_; ++i)
-                ciphers_[i] = (pj_ssl_cipher)(ciphers_buf[i*2]*10 + 
-					      ciphers_buf[i*2+1]);
+                ciphers_[i] = (pj_ssl_cipher) (ciphers_buf[i*2]*10 +
+                                               ciphers_buf[i*2+1]);
         }
-        
+
         delete secure_sock;
     }
-    
+
     if (ciphers_num_ == 0) {
-	return PJ_ENOTFOUND;
+        return PJ_ENOTFOUND;
     }
-    
-    *cipher_num = PJ_MIN(*cipher_num, ciphers_num_);
+
+    *cipher_num = PJ_MIN (*cipher_num, ciphers_num_);
+
     for (i = 0; i < *cipher_num; ++i)
         ciphers[i] = ciphers_[i];
-    
+
     return PJ_SUCCESS;
 }
 
 /*
- * Create SSL socket instance. 
+ * Create SSL socket instance.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_create (pj_pool_t *pool,
-					const pj_ssl_sock_param *param,
-					pj_ssl_sock_t **p_ssock)
+PJ_DEF (pj_status_t) pj_ssl_sock_create (pj_pool_t *pool,
+        const pj_ssl_sock_param *param,
+        pj_ssl_sock_t **p_ssock)
 {
     pj_ssl_sock_t *ssock;
 
-    PJ_ASSERT_RETURN(param->async_cnt == 1, PJ_EINVAL);
-    PJ_ASSERT_RETURN(pool && param && p_ssock, PJ_EINVAL);
+    PJ_ASSERT_RETURN (param->async_cnt == 1, PJ_EINVAL);
+    PJ_ASSERT_RETURN (pool && param && p_ssock, PJ_EINVAL);
 
     /* Allocate secure socket */
-    ssock = PJ_POOL_ZALLOC_T(pool, pj_ssl_sock_t);
-    
+    ssock = PJ_POOL_ZALLOC_T (pool, pj_ssl_sock_t);
+
     /* Allocate write buffer */
-    ssock->write_state.buf = (char*)pj_pool_alloc(pool, 
-						  param->send_buffer_size);
+    ssock->write_state.buf = (char*) pj_pool_alloc (pool,
+                             param->send_buffer_size);
     ssock->write_state.max_len = param->send_buffer_size;
     ssock->write_state.start = ssock->write_state.buf;
-    
+
     /* Init secure socket */
     ssock->sock_af = param->sock_af;
     ssock->sock_type = param->sock_type;
     ssock->cb = param->cb;
     ssock->user_data = param->user_data;
     ssock->ciphers_num = param->ciphers_num;
+
     if (param->ciphers_num > 0) {
-	unsigned i;
-	ssock->ciphers = (pj_ssl_cipher*)
-			 pj_pool_calloc(pool, param->ciphers_num, 
-					sizeof(pj_ssl_cipher));
-	for (i = 0; i < param->ciphers_num; ++i)
-	    ssock->ciphers[i] = param->ciphers[i];
+        unsigned i;
+        ssock->ciphers = (pj_ssl_cipher*)
+                         pj_pool_calloc (pool, param->ciphers_num,
+                                         sizeof (pj_ssl_cipher));
+
+        for (i = 0; i < param->ciphers_num; ++i)
+            ssock->ciphers[i] = param->ciphers[i];
     }
-    pj_strdup_with_null(pool, &ssock->servername, &param->server_name);
+
+    pj_strdup_with_null (pool, &ssock->servername, &param->server_name);
 
     ssock->qos_type = param->qos_type;
     ssock->qos_ignore_error = param->qos_ignore_error;
-    pj_memcpy(&ssock->qos_params, &param->qos_params,
-	      sizeof(param->qos_params));
+    pj_memcpy (&ssock->qos_params, &param->qos_params,
+               sizeof (param->qos_params));
 
     /* Finally */
     *p_ssock = ssock;
@@ -542,46 +568,46 @@ PJ_DEF(pj_status_t) pj_ssl_sock_create (pj_pool_t *pool,
 }
 
 
-PJ_DEF(pj_status_t) pj_ssl_cert_load_from_files(pj_pool_t *pool,
-                                        	const pj_str_t *CA_file,
-                                        	const pj_str_t *cert_file,
-                                        	const pj_str_t *privkey_file,
-                                        	const pj_str_t *privkey_pass,
-                                        	pj_ssl_cert_t **p_cert)
+PJ_DEF (pj_status_t) pj_ssl_cert_load_from_files (pj_pool_t *pool,
+        const pj_str_t *CA_file,
+        const pj_str_t *cert_file,
+        const pj_str_t *privkey_file,
+        const pj_str_t *privkey_pass,
+        pj_ssl_cert_t **p_cert)
 {
-    PJ_UNUSED_ARG(pool);
-    PJ_UNUSED_ARG(CA_file);
-    PJ_UNUSED_ARG(cert_file);
-    PJ_UNUSED_ARG(privkey_file);
-    PJ_UNUSED_ARG(privkey_pass);
-    PJ_UNUSED_ARG(p_cert);
+    PJ_UNUSED_ARG (pool);
+    PJ_UNUSED_ARG (CA_file);
+    PJ_UNUSED_ARG (cert_file);
+    PJ_UNUSED_ARG (privkey_file);
+    PJ_UNUSED_ARG (privkey_pass);
+    PJ_UNUSED_ARG (p_cert);
     return PJ_ENOTSUP;
 }
 
 /*
  * Set SSL socket credential.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_set_certificate(
-					    pj_ssl_sock_t *ssock,
-					    pj_pool_t *pool,
-					    const pj_ssl_cert_t *cert)
+PJ_DEF (pj_status_t) pj_ssl_sock_set_certificate (
+    pj_ssl_sock_t *ssock,
+    pj_pool_t *pool,
+    const pj_ssl_cert_t *cert)
 {
-    PJ_UNUSED_ARG(ssock);
-    PJ_UNUSED_ARG(pool);
-    PJ_UNUSED_ARG(cert);
+    PJ_UNUSED_ARG (ssock);
+    PJ_UNUSED_ARG (pool);
+    PJ_UNUSED_ARG (cert);
     return PJ_ENOTSUP;
 }
 
 /*
  * Close the SSL socket.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_close(pj_ssl_sock_t *ssock)
+PJ_DEF (pj_status_t) pj_ssl_sock_close (pj_ssl_sock_t *ssock)
 {
-    PJ_ASSERT_RETURN(ssock, PJ_EINVAL);
-    
+    PJ_ASSERT_RETURN (ssock, PJ_EINVAL);
+
     delete ssock->connect_timer;
     ssock->connect_timer = NULL;
-    
+
     delete ssock->sock;
     ssock->sock = NULL;
 
@@ -589,7 +615,7 @@ PJ_DEF(pj_status_t) pj_ssl_sock_close(pj_ssl_sock_t *ssock)
     delete ssock->read_state.orig_buf;
     ssock->read_state.read_buf = NULL;
     ssock->read_state.orig_buf = NULL;
-    
+
     return PJ_SUCCESS;
 }
 
@@ -597,25 +623,25 @@ PJ_DEF(pj_status_t) pj_ssl_sock_close(pj_ssl_sock_t *ssock)
 /*
  * Associate arbitrary data with the SSL socket.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_set_user_data (pj_ssl_sock_t *ssock,
-					       void *user_data)
+PJ_DEF (pj_status_t) pj_ssl_sock_set_user_data (pj_ssl_sock_t *ssock,
+        void *user_data)
 {
-    PJ_ASSERT_RETURN(ssock, PJ_EINVAL);
-    
+    PJ_ASSERT_RETURN (ssock, PJ_EINVAL);
+
     ssock->user_data = user_data;
-    
+
     return PJ_SUCCESS;
 }
-					       
+
 
 /*
  * Retrieve the user data previously associated with this SSL
  * socket.
  */
-PJ_DEF(void*) pj_ssl_sock_get_user_data(pj_ssl_sock_t *ssock)
+PJ_DEF (void*) pj_ssl_sock_get_user_data (pj_ssl_sock_t *ssock)
 {
-    PJ_ASSERT_RETURN(ssock, NULL);
-    
+    PJ_ASSERT_RETURN (ssock, NULL);
+
     return ssock->user_data;
 }
 
@@ -623,43 +649,45 @@ PJ_DEF(void*) pj_ssl_sock_get_user_data(pj_ssl_sock_t *ssock)
 /*
  * Retrieve the local address and port used by specified SSL socket.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_get_info (pj_ssl_sock_t *ssock,
-					  pj_ssl_sock_info *info)
+PJ_DEF (pj_status_t) pj_ssl_sock_get_info (pj_ssl_sock_t *ssock,
+        pj_ssl_sock_info *info)
 {
-    PJ_ASSERT_RETURN(ssock && info, PJ_EINVAL);
-    
-    pj_bzero(info, sizeof(*info));
-    
+    PJ_ASSERT_RETURN (ssock && info, PJ_EINVAL);
+
+    pj_bzero (info, sizeof (*info));
+
     info->established = ssock->established;
-    
+
     /* Local address */
     if (ssock->sock) {
-	const TInetAddr* local_addr_ = ssock->sock->GetLocalAddr();
-	int addrlen = sizeof(pj_sockaddr);
-	pj_status_t status;
-	
-	status = PjSymbianOS::Addr2pj(*local_addr_, info->local_addr, &addrlen);
-	if (status != PJ_SUCCESS)
-	    return status;
+        const TInetAddr* local_addr_ = ssock->sock->GetLocalAddr();
+        int addrlen = sizeof (pj_sockaddr);
+        pj_status_t status;
+
+        status = PjSymbianOS::Addr2pj (*local_addr_, info->local_addr, &addrlen);
+
+        if (status != PJ_SUCCESS)
+            return status;
     } else {
-	pj_sockaddr_cp(&info->local_addr, &ssock->local_addr);
+        pj_sockaddr_cp (&info->local_addr, &ssock->local_addr);
     }
 
     if (info->established) {
-	/* Cipher suite */
-	TBuf8<4> cipher;
-	if (ssock->sock->GetCipher(cipher) == KErrNone) {
-	    info->cipher = (pj_ssl_cipher)cipher[1]; 
-	}
-
-	/* Remote address */
-        pj_sockaddr_cp((pj_sockaddr_t*)&info->remote_addr, 
-    		   (pj_sockaddr_t*)&ssock->rem_addr);
+        /* Cipher suite */
+        TBuf8<4> cipher;
+
+        if (ssock->sock->GetCipher (cipher) == KErrNone) {
+            info->cipher = (pj_ssl_cipher) cipher[1];
+        }
+
+        /* Remote address */
+        pj_sockaddr_cp ( (pj_sockaddr_t*) &info->remote_addr,
+                         (pj_sockaddr_t*) &ssock->rem_addr);
     }
 
     /* Protocol */
     info->proto = ssock->proto;
-    
+
     return PJ_SUCCESS;
 }
 
@@ -667,91 +695,92 @@ PJ_DEF(pj_status_t) pj_ssl_sock_get_info (pj_ssl_sock_t *ssock,
 /*
  * Starts read operation on this SSL socket.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_start_read (pj_ssl_sock_t *ssock,
-					    pj_pool_t *pool,
-					    unsigned buff_size,
-					    pj_uint32_t flags)
+PJ_DEF (pj_status_t) pj_ssl_sock_start_read (pj_ssl_sock_t *ssock,
+        pj_pool_t *pool,
+        unsigned buff_size,
+        pj_uint32_t flags)
 {
-    PJ_ASSERT_RETURN(ssock && pool && buff_size, PJ_EINVAL);
-    PJ_ASSERT_RETURN(ssock->established, PJ_EINVALIDOP);
+    PJ_ASSERT_RETURN (ssock && pool && buff_size, PJ_EINVAL);
+    PJ_ASSERT_RETURN (ssock->established, PJ_EINVALIDOP);
 
     /* Reading is already started */
     if (ssock->read_state.orig_buf) {
-	return PJ_SUCCESS;
+        return PJ_SUCCESS;
     }
 
     void *readbuf[1];
-    readbuf[0] = pj_pool_alloc(pool, buff_size);
-    return pj_ssl_sock_start_read2(ssock, pool, buff_size, readbuf, flags);
+    readbuf[0] = pj_pool_alloc (pool, buff_size);
+    return pj_ssl_sock_start_read2 (ssock, pool, buff_size, readbuf, flags);
 }
 
-static void read_cb(int err, void *key)
+static void read_cb (int err, void *key)
 {
-    pj_ssl_sock_t *ssock = (pj_ssl_sock_t*)key;
+    pj_ssl_sock_t *ssock = (pj_ssl_sock_t*) key;
     pj_status_t status;
 
-    status = (err == KErrNone)? PJ_SUCCESS : PJ_RETURN_OS_ERROR(err);
+    status = (err == KErrNone) ? PJ_SUCCESS : PJ_RETURN_OS_ERROR (err);
 
     /* Check connection status */
     if (err == KErrEof || !PjSymbianOS::Instance()->IsConnectionUp() ||
-	!ssock->established) 
-    {
-	status = PJ_EEOF;
+            !ssock->established) {
+        status = PJ_EEOF;
     }
-    
+
     /* Notify data arrival */
     if (ssock->cb.on_data_read) {
-	pj_size_t remainder = 0;
-	char *data = (char*)ssock->read_state.orig_buf->Ptr();
-	pj_size_t data_len = ssock->read_state.read_buf->Length() + 
-			     ssock->read_state.read_buf->Ptr() -
-			     ssock->read_state.orig_buf->Ptr();
-	
-	if (data_len > 0) {
-	    /* Notify received data */
-	    pj_bool_t ret = (*ssock->cb.on_data_read)(ssock, data, data_len, 
-						      status, &remainder);
-	    if (!ret) {
-		/* We've been destroyed */
-		return;
-	    }
-	    
-	    /* Calculate available data for next READ operation */
-	    if (remainder > 0) {
-		pj_size_t data_maxlen = ssock->read_state.orig_buf->MaxLength();
-		
-		/* There is some data left unconsumed by application, we give
-		 * smaller buffer for next READ operation.
-		 */
-		ssock->read_state.read_buf->Set((TUint8*)data+remainder, 0, 
-					        data_maxlen - remainder);
-	    } else {
-		/* Give all buffer for next READ operation. 
-		 */
-		ssock->read_state.read_buf->Set(*ssock->read_state.orig_buf);
-	    }
-	}
+        pj_size_t remainder = 0;
+        char *data = (char*) ssock->read_state.orig_buf->Ptr();
+        pj_size_t data_len = ssock->read_state.read_buf->Length() +
+                             ssock->read_state.read_buf->Ptr() -
+                             ssock->read_state.orig_buf->Ptr();
+
+        if (data_len > 0) {
+            /* Notify received data */
+            pj_bool_t ret = (*ssock->cb.on_data_read) (ssock, data, data_len,
+                            status, &remainder);
+
+            if (!ret) {
+                /* We've been destroyed */
+                return;
+            }
+
+            /* Calculate available data for next READ operation */
+            if (remainder > 0) {
+                pj_size_t data_maxlen = ssock->read_state.orig_buf->MaxLength();
+
+                /* There is some data left unconsumed by application, we give
+                 * smaller buffer for next READ operation.
+                 */
+                ssock->read_state.read_buf->Set ( (TUint8*) data+remainder, 0,
+                                                  data_maxlen - remainder);
+            } else {
+                /* Give all buffer for next READ operation.
+                 */
+                ssock->read_state.read_buf->Set (*ssock->read_state.orig_buf);
+            }
+        }
     }
 
     if (status == PJ_SUCCESS) {
-	/* Perform the "next" READ operation */
-	CPjSSLSocketReader *reader = ssock->sock->GetReader(); 
-	ssock->read_state.read_buf->SetLength(0);
-	status = reader->Read(&read_cb, ssock, *ssock->read_state.read_buf, 
-			      ssock->read_state.flags);
-	if (status != PJ_EPENDING) {
-	    /* Notify error */
-	    (*ssock->cb.on_data_read)(ssock, NULL, 0, status, NULL);
-	}
+        /* Perform the "next" READ operation */
+        CPjSSLSocketReader *reader = ssock->sock->GetReader();
+        ssock->read_state.read_buf->SetLength (0);
+        status = reader->Read (&read_cb, ssock, *ssock->read_state.read_buf,
+                               ssock->read_state.flags);
+
+        if (status != PJ_EPENDING) {
+            /* Notify error */
+            (*ssock->cb.on_data_read) (ssock, NULL, 0, status, NULL);
+        }
     }
-    
+
     if (status != PJ_SUCCESS && status != PJ_EPENDING) {
-	/* Connection closed or something goes wrong */
-	delete ssock->read_state.read_buf;
-	delete ssock->read_state.orig_buf;
-	ssock->read_state.read_buf = NULL;
-	ssock->read_state.orig_buf = NULL;
-	ssock->established = PJ_FALSE;
+        /* Connection closed or something goes wrong */
+        delete ssock->read_state.read_buf;
+        delete ssock->read_state.orig_buf;
+        ssock->read_state.read_buf = NULL;
+        ssock->read_state.orig_buf = NULL;
+        ssock->established = PJ_FALSE;
     }
 }
 
@@ -760,52 +789,53 @@ static void read_cb(int err, void *key)
  * supplies the buffers for the read operation so that the acive socket
  * does not have to allocate the buffers.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_start_read2 (pj_ssl_sock_t *ssock,
-					     pj_pool_t *pool,
-					     unsigned buff_size,
-					     void *readbuf[],
-					     pj_uint32_t flags)
+PJ_DEF (pj_status_t) pj_ssl_sock_start_read2 (pj_ssl_sock_t *ssock,
+        pj_pool_t *pool,
+        unsigned buff_size,
+        void *readbuf[],
+        pj_uint32_t flags)
 {
-    PJ_ASSERT_RETURN(ssock && buff_size && readbuf, PJ_EINVAL);
-    PJ_ASSERT_RETURN(ssock->established, PJ_EINVALIDOP);
-    
+    PJ_ASSERT_RETURN (ssock && buff_size && readbuf, PJ_EINVAL);
+    PJ_ASSERT_RETURN (ssock->established, PJ_EINVALIDOP);
+
     /* Return failure if access point is marked as down by app. */
     PJ_SYMBIAN_CHECK_CONNECTION();
-    
+
     /* Reading is already started */
     if (ssock->read_state.orig_buf) {
-	return PJ_SUCCESS;
+        return PJ_SUCCESS;
     }
-    
-    PJ_UNUSED_ARG(pool);
+
+    PJ_UNUSED_ARG (pool);
 
     /* Get reader instance */
     CPjSSLSocketReader *reader = ssock->sock->GetReader();
+
     if (!reader)
-	return PJ_ENOMEM;
-    
+        return PJ_ENOMEM;
+
     /* We manage two buffer pointers here:
      * 1. orig_buf keeps the orginal buffer address (and its max length).
      * 2. read_buf provides buffer for READ operation, mind that there may be
      *    some remainder data left by application.
      */
-    ssock->read_state.read_buf = new TPtr8((TUint8*)readbuf[0], 0, buff_size);
-    ssock->read_state.orig_buf = new TPtr8((TUint8*)readbuf[0], 0, buff_size);
+    ssock->read_state.read_buf = new TPtr8 ( (TUint8*) readbuf[0], 0, buff_size);
+    ssock->read_state.orig_buf = new TPtr8 ( (TUint8*) readbuf[0], 0, buff_size);
     ssock->read_state.flags = flags;
-    
+
     pj_status_t status;
-    status = reader->Read(&read_cb, ssock, *ssock->read_state.read_buf, 
-			  ssock->read_state.flags);
-    
+    status = reader->Read (&read_cb, ssock, *ssock->read_state.read_buf,
+                           ssock->read_state.flags);
+
     if (status != PJ_SUCCESS && status != PJ_EPENDING) {
-	delete ssock->read_state.read_buf;
-	delete ssock->read_state.orig_buf;
-	ssock->read_state.read_buf = NULL;
-	ssock->read_state.orig_buf = NULL;
-	
-	return status;
+        delete ssock->read_state.read_buf;
+        delete ssock->read_state.orig_buf;
+        ssock->read_state.read_buf = NULL;
+        ssock->read_state.orig_buf = NULL;
+
+        return status;
     }
-    
+
     return PJ_SUCCESS;
 }
 
@@ -814,48 +844,47 @@ PJ_DEF(pj_status_t) pj_ssl_sock_start_read2 (pj_ssl_sock_t *ssock,
  * only for datagram sockets, and it will trigger \a on_data_recvfrom()
  * callback instead.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_start_recvfrom (pj_ssl_sock_t *ssock,
-						pj_pool_t *pool,
-						unsigned buff_size,
-						pj_uint32_t flags)
+PJ_DEF (pj_status_t) pj_ssl_sock_start_recvfrom (pj_ssl_sock_t *ssock,
+        pj_pool_t *pool,
+        unsigned buff_size,
+        pj_uint32_t flags)
 {
-    PJ_UNUSED_ARG(ssock);
-    PJ_UNUSED_ARG(pool);
-    PJ_UNUSED_ARG(buff_size);
-    PJ_UNUSED_ARG(flags);
+    PJ_UNUSED_ARG (ssock);
+    PJ_UNUSED_ARG (pool);
+    PJ_UNUSED_ARG (buff_size);
+    PJ_UNUSED_ARG (flags);
     return PJ_ENOTSUP;
 }
 
 /*
- * Same as #pj_ssl_sock_start_recvfrom() except that the recvfrom() 
+ * Same as #pj_ssl_sock_start_recvfrom() except that the recvfrom()
  * operation takes the buffer from the argument rather than creating
  * new ones.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_start_recvfrom2 (pj_ssl_sock_t *ssock,
-						 pj_pool_t *pool,
-						 unsigned buff_size,
-						 void *readbuf[],
-						 pj_uint32_t flags)
+PJ_DEF (pj_status_t) pj_ssl_sock_start_recvfrom2 (pj_ssl_sock_t *ssock,
+        pj_pool_t *pool,
+        unsigned buff_size,
+        void *readbuf[],
+        pj_uint32_t flags)
 {
-    PJ_UNUSED_ARG(ssock);
-    PJ_UNUSED_ARG(pool);
-    PJ_UNUSED_ARG(buff_size);
-    PJ_UNUSED_ARG(readbuf);
-    PJ_UNUSED_ARG(flags);
+    PJ_UNUSED_ARG (ssock);
+    PJ_UNUSED_ARG (pool);
+    PJ_UNUSED_ARG (buff_size);
+    PJ_UNUSED_ARG (readbuf);
+    PJ_UNUSED_ARG (flags);
     return PJ_ENOTSUP;
 }
 
-static void send_cb(int err, void *key)
+static void send_cb (int err, void *key)
 {
-    pj_ssl_sock_t *ssock = (pj_ssl_sock_t*)key;
+    pj_ssl_sock_t *ssock = (pj_ssl_sock_t*) key;
     write_state_t *st = &ssock->write_state;
 
     /* Check connection status */
     if (err != KErrNone || !PjSymbianOS::Instance()->IsConnectionUp() ||
-	!ssock->established) 
-    {
-	ssock->established = PJ_FALSE;
-	return;
+            !ssock->established) {
+        ssock->established = PJ_FALSE;
+        return;
     }
 
     /* Remove sent data from buffer */
@@ -867,253 +896,260 @@ static void send_cb(int err, void *key)
 
     /* Let's check if there is pending data to send */
     if (st->len) {
-	write_data_t *wdata = (write_data_t*)st->start;
-	pj_status_t status;
-	
-	st->send_ptr.Set((TUint8*)wdata->data, (TInt)wdata->data_len);
-	st->current_data = wdata;
-	status = ssock->sock->Send(&send_cb, ssock, st->send_ptr, 0);
-	if (status != PJ_EPENDING) {
-	    ssock->established = PJ_FALSE;
-	    st->len = 0;
-	    return;
-	}
+        write_data_t *wdata = (write_data_t*) st->start;
+        pj_status_t status;
+
+        st->send_ptr.Set ( (TUint8*) wdata->data, (TInt) wdata->data_len);
+        st->current_data = wdata;
+        status = ssock->sock->Send (&send_cb, ssock, st->send_ptr, 0);
+
+        if (status != PJ_EPENDING) {
+            ssock->established = PJ_FALSE;
+            st->len = 0;
+            return;
+        }
     }
 }
 
 /*
  * Send data using the socket.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_send (pj_ssl_sock_t *ssock,
-				      pj_ioqueue_op_key_t *send_key,
-				      const void *data,
-				      pj_ssize_t *size,
-				      unsigned flags)
+PJ_DEF (pj_status_t) pj_ssl_sock_send (pj_ssl_sock_t *ssock,
+                                       pj_ioqueue_op_key_t *send_key,
+                                       const void *data,
+                                       pj_ssize_t *size,
+                                       unsigned flags)
 {
     PJ_CHECK_STACK();
-    PJ_ASSERT_RETURN(ssock && data && size, PJ_EINVAL);
-    PJ_ASSERT_RETURN(ssock->write_state.max_len == 0 || 
-		     ssock->write_state.max_len >= (pj_size_t)*size, 
-		     PJ_ETOOSMALL);
-    
+    PJ_ASSERT_RETURN (ssock && data && size, PJ_EINVAL);
+    PJ_ASSERT_RETURN (ssock->write_state.max_len == 0 ||
+                      ssock->write_state.max_len >= (pj_size_t) *size,
+                      PJ_ETOOSMALL);
+
     /* Check connection status */
-    if (!PjSymbianOS::Instance()->IsConnectionUp() || !ssock->established) 
-    {
-	ssock->established = PJ_FALSE;
-	return PJ_ECANCELLED;
+    if (!PjSymbianOS::Instance()->IsConnectionUp() || !ssock->established) {
+        ssock->established = PJ_FALSE;
+        return PJ_ECANCELLED;
     }
 
     write_state_t *st = &ssock->write_state;
-    
+
     /* Synchronous mode */
     if (st->max_len == 0) {
-	st->send_ptr.Set((TUint8*)data, (TInt)*size);
-	return ssock->sock->SendSync(st->send_ptr, flags);
+        st->send_ptr.Set ( (TUint8*) data, (TInt) *size);
+        return ssock->sock->SendSync (st->send_ptr, flags);
     }
 
     /* CSecureSocket only allows one outstanding send operation, so
-     * we use buffering mechanism to allow application to perform send 
+     * we use buffering mechanism to allow application to perform send
      * operations at any time.
      */
-    
+
     pj_size_t avail_len = st->max_len - st->len;
-    pj_size_t needed_len = *size + sizeof(write_data_t) - 1;
-    
+    pj_size_t needed_len = *size + sizeof (write_data_t) - 1;
+
     /* Align needed_len to be multiplication of 4 */
-    needed_len = ((needed_len + 3) >> 2) << 2; 
+    needed_len = ( (needed_len + 3) >> 2) << 2;
 
     /* Block until there is buffer slot available! */
     while (needed_len >= avail_len) {
-	pj_symbianos_poll(-1, -1);
-	avail_len = st->max_len - st->len;
+        pj_symbianos_poll (-1, -1);
+        avail_len = st->max_len - st->len;
     }
 
     /* Ok, make sure the new data will not get wrapped */
     if (st->start + st->len + needed_len > st->buf + st->max_len) {
-	/* Align buffer left */
-	pj_memmove(st->buf, st->start, st->len);
-	st->start = st->buf;
+        /* Align buffer left */
+        pj_memmove (st->buf, st->start, st->len);
+        st->start = st->buf;
     }
-    
+
     /* Push back the send data into the buffer */
-    write_data_t *wdata = (write_data_t*)(st->start + st->len);
-    
+    write_data_t *wdata = (write_data_t*) (st->start + st->len);
+
     wdata->len = needed_len;
     wdata->key = send_key;
-    wdata->data_len = (pj_size_t)*size;
-    pj_memcpy(wdata->data, data, *size);
+    wdata->data_len = (pj_size_t) *size;
+    pj_memcpy (wdata->data, data, *size);
     st->len += needed_len;
 
     /* If no outstanding send, send it */
     if (st->current_data == NULL) {
-	pj_status_t status;
-	    
-	wdata = (write_data_t*)st->start;
-	st->current_data = wdata;
-	st->send_ptr.Set((TUint8*)wdata->data, (TInt)wdata->data_len);
-	status = ssock->sock->Send(&send_cb, ssock, st->send_ptr, flags);
-	
-	if (status != PJ_EPENDING) {
-	    *size = -status;
-	    return status;
-	}
+        pj_status_t status;
+
+        wdata = (write_data_t*) st->start;
+        st->current_data = wdata;
+        st->send_ptr.Set ( (TUint8*) wdata->data, (TInt) wdata->data_len);
+        status = ssock->sock->Send (&send_cb, ssock, st->send_ptr, flags);
+
+        if (status != PJ_EPENDING) {
+            *size = -status;
+            return status;
+        }
     }
-    
+
     return PJ_SUCCESS;
 }
 
 /*
  * Send datagram using the socket.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_sendto (pj_ssl_sock_t *ssock,
-					pj_ioqueue_op_key_t *send_key,
-					const void *data,
-					pj_ssize_t *size,
-					unsigned flags,
-					const pj_sockaddr_t *addr,
-					int addr_len)
+PJ_DEF (pj_status_t) pj_ssl_sock_sendto (pj_ssl_sock_t *ssock,
+        pj_ioqueue_op_key_t *send_key,
+        const void *data,
+        pj_ssize_t *size,
+        unsigned flags,
+        const pj_sockaddr_t *addr,
+        int addr_len)
 {
-    PJ_UNUSED_ARG(ssock);
-    PJ_UNUSED_ARG(send_key);
-    PJ_UNUSED_ARG(data);
-    PJ_UNUSED_ARG(size);
-    PJ_UNUSED_ARG(flags);
-    PJ_UNUSED_ARG(addr);
-    PJ_UNUSED_ARG(addr_len);
+    PJ_UNUSED_ARG (ssock);
+    PJ_UNUSED_ARG (send_key);
+    PJ_UNUSED_ARG (data);
+    PJ_UNUSED_ARG (size);
+    PJ_UNUSED_ARG (flags);
+    PJ_UNUSED_ARG (addr);
+    PJ_UNUSED_ARG (addr_len);
     return PJ_ENOTSUP;
 }
 
 /*
- * Starts asynchronous socket accept() operations on this SSL socket. 
+ * Starts asynchronous socket accept() operations on this SSL socket.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_start_accept (pj_ssl_sock_t *ssock,
-					      pj_pool_t *pool,
-					      const pj_sockaddr_t *local_addr,
-					      int addr_len)
+PJ_DEF (pj_status_t) pj_ssl_sock_start_accept (pj_ssl_sock_t *ssock,
+        pj_pool_t *pool,
+        const pj_sockaddr_t *local_addr,
+        int addr_len)
 {
-    PJ_UNUSED_ARG(ssock);
-    PJ_UNUSED_ARG(pool);
-    PJ_UNUSED_ARG(local_addr);
-    PJ_UNUSED_ARG(addr_len);
-    
+    PJ_UNUSED_ARG (ssock);
+    PJ_UNUSED_ARG (pool);
+    PJ_UNUSED_ARG (local_addr);
+    PJ_UNUSED_ARG (addr_len);
+
     return PJ_ENOTSUP;
 }
 
-static void connect_cb(int err, void *key)
+static void connect_cb (int err, void *key)
 {
-    pj_ssl_sock_t *ssock = (pj_ssl_sock_t*)key;
+    pj_ssl_sock_t *ssock = (pj_ssl_sock_t*) key;
     pj_status_t status;
-    
+
     if (ssock->connect_timer) {
-	delete ssock->connect_timer;
-	ssock->connect_timer = NULL;
+        delete ssock->connect_timer;
+        ssock->connect_timer = NULL;
     }
 
-    status = (err == KErrNone)? PJ_SUCCESS : PJ_RETURN_OS_ERROR(err);
+    status = (err == KErrNone) ? PJ_SUCCESS : PJ_RETURN_OS_ERROR (err);
+
     if (status == PJ_SUCCESS) {
-	ssock->established = PJ_TRUE;
+        ssock->established = PJ_TRUE;
     } else {
-	delete ssock->sock;
-	ssock->sock = NULL;
+        delete ssock->sock;
+        ssock->sock = NULL;
     }
-    
+
     if (ssock->cb.on_connect_complete) {
-	pj_bool_t ret = (*ssock->cb.on_connect_complete)(ssock, status);
-	if (!ret) {
-	    /* We've been destroyed */
-	    return;
-	}
+        pj_bool_t ret = (*ssock->cb.on_connect_complete) (ssock, status);
+
+        if (!ret) {
+            /* We've been destroyed */
+            return;
+        }
     }
 }
 
-static void connect_timer_cb(void *key)
+static void connect_timer_cb (void *key)
 {
-    connect_cb(KErrTimedOut, key);
+    connect_cb (KErrTimedOut, key);
 }
 
 /*
- * Starts asynchronous socket connect() operation and SSL/TLS handshaking 
+ * Starts asynchronous socket connect() operation and SSL/TLS handshaking
  * for this socket. Once the connection is done (either successfully or not),
  * the \a on_connect_complete() callback will be called.
  */
-PJ_DEF(pj_status_t) pj_ssl_sock_start_connect (pj_ssl_sock_t *ssock,
-					       pj_pool_t *pool,
-					       const pj_sockaddr_t *localaddr,
-					       const pj_sockaddr_t *remaddr,
-					       int addr_len)
+PJ_DEF (pj_status_t) pj_ssl_sock_start_connect (pj_ssl_sock_t *ssock,
+        pj_pool_t *pool,
+        const pj_sockaddr_t *localaddr,
+        const pj_sockaddr_t *remaddr,
+        int addr_len)
 {
     CPjSSLSocket *sock = NULL;
     pj_status_t status;
-    
-    PJ_ASSERT_RETURN(ssock && pool && localaddr && remaddr && addr_len,
-		     PJ_EINVAL);
+
+    PJ_ASSERT_RETURN (ssock && pool && localaddr && remaddr && addr_len,
+                      PJ_EINVAL);
 
     /* Check connection status */
     PJ_SYMBIAN_CHECK_CONNECTION();
-    
+
     if (ssock->sock != NULL) {
-	CPjSSLSocket::ssl_state state = ssock->sock->GetState();
-	switch (state) {
-	case CPjSSLSocket::SSL_STATE_ESTABLISHED:
-	    return PJ_SUCCESS;
-	default:
-	    return PJ_EPENDING;
-	}
+        CPjSSLSocket::ssl_state state = ssock->sock->GetState();
+
+        switch (state) {
+            case CPjSSLSocket::SSL_STATE_ESTABLISHED:
+                return PJ_SUCCESS;
+            default:
+                return PJ_EPENDING;
+        }
     }
 
     /* Set SSL protocol */
     TPtrC8 proto;
-    
+
     if (ssock->proto == PJ_SSL_SOCK_PROTO_DEFAULT)
-	ssock->proto = PJ_SSL_SOCK_PROTO_TLS1;
+        ssock->proto = PJ_SSL_SOCK_PROTO_TLS1;
 
     /* CSecureSocket only support TLS1.0 and SSL3.0 */
-    switch(ssock->proto) {
-    case PJ_SSL_SOCK_PROTO_TLS1:
-	proto.Set((const TUint8*)"TLS1.0", 6);
-	break;
-    case PJ_SSL_SOCK_PROTO_SSL3:
-	proto.Set((const TUint8*)"SSL3.0", 6);
-	break;
-    default:
-	return PJ_ENOTSUP;
+    switch (ssock->proto) {
+        case PJ_SSL_SOCK_PROTO_TLS1:
+            proto.Set ( (const TUint8*) "TLS1.0", 6);
+            break;
+        case PJ_SSL_SOCK_PROTO_SSL3:
+            proto.Set ( (const TUint8*) "SSL3.0", 6);
+            break;
+        default:
+            return PJ_ENOTSUP;
     }
 
     /* Prepare addresses */
     TInetAddr localaddr_, remaddr_;
-    status = PjSymbianOS::pj2Addr(*(pj_sockaddr*)localaddr, addr_len, 
-				  localaddr_);
+    status = PjSymbianOS::pj2Addr (* (pj_sockaddr*) localaddr, addr_len,
+                                   localaddr_);
+
     if (status != PJ_SUCCESS)
-	return status;
-    
-    status = PjSymbianOS::pj2Addr(*(pj_sockaddr*)remaddr, addr_len,
-				  remaddr_);
+        return status;
+
+    status = PjSymbianOS::pj2Addr (* (pj_sockaddr*) remaddr, addr_len,
+                                   remaddr_);
+
     if (status != PJ_SUCCESS)
-	return status;
+        return status;
 
-    pj_sockaddr_cp((pj_sockaddr_t*)&ssock->rem_addr, remaddr);
+    pj_sockaddr_cp ( (pj_sockaddr_t*) &ssock->rem_addr, remaddr);
 
     /* Init SSL engine */
-    TRAPD(err, sock = CPjSSLSocket::NewL(proto, ssock->qos_type, 
-				         ssock->qos_params));
+    TRAPD (err, sock = CPjSSLSocket::NewL (proto, ssock->qos_type,
+                                           ssock->qos_params));
+
     if (err != KErrNone)
-	return PJ_ENOMEM;
-    
+        return PJ_ENOMEM;
+
     if (ssock->timeout.sec != 0 || ssock->timeout.msec != 0) {
-	ssock->connect_timer = new CPjTimer(&ssock->timeout, 
-					    &connect_timer_cb, ssock);
+        ssock->connect_timer = new CPjTimer (&ssock->timeout,
+                                             &connect_timer_cb, ssock);
     }
-    
+
     /* Convert server name to Symbian descriptor */
-    TPtrC8 servername_((TUint8*)ssock->servername.ptr, 
-		       ssock->servername.slen);
-    
+    TPtrC8 servername_ ( (TUint8*) ssock->servername.ptr,
+                         ssock->servername.slen);
+
     /* Try to connect */
-    status = sock->Connect(&connect_cb, ssock, localaddr_, remaddr_,
-			   servername_);
+    status = sock->Connect (&connect_cb, ssock, localaddr_, remaddr_,
+                            servername_);
+
     if (status != PJ_SUCCESS && status != PJ_EPENDING) {
-	delete sock;
-	return status;
+        delete sock;
+        return status;
     }
 
     ssock->sock = sock;
@@ -1121,8 +1157,8 @@ PJ_DEF(pj_status_t) pj_ssl_sock_start_connect (pj_ssl_sock_t *ssock,
 }
 
 
-PJ_DEF(pj_status_t) pj_ssl_sock_renegotiate(pj_ssl_sock_t *ssock)
+PJ_DEF (pj_status_t) pj_ssl_sock_renegotiate (pj_ssl_sock_t *ssock)
 {
-    PJ_UNUSED_ARG(ssock);
+    PJ_UNUSED_ARG (ssock);
     return PJ_ENOTSUP;
 }
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/timer_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/timer_symbian.cpp
index 6a243ecda2eac1147e9aad38443216c0135965b6..03c7d7da31a32cafffb4f0d2d7926a33dceb9e37 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/timer_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/timer_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: timer_symbian.cpp 3034 2009-12-16 13:30:34Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -56,8 +56,7 @@ class CPjTimerEntry;
 /**
  * The implementation of timer heap.
  */
-struct pj_timer_heap_t
-{
+struct pj_timer_heap_t {
     /** Maximum size of the heap. */
     pj_size_t max_size;
 
@@ -68,7 +67,7 @@ struct pj_timer_heap_t
      *  the slot number will be saved in entry->_timer_id
      */
     CPjTimerEntry **entries;
-    
+
     /** Array of free slot indexes in the "entries" array */
     int *free_slots;
 };
@@ -76,28 +75,28 @@ struct pj_timer_heap_t
 /**
  * Active object for each timer entry.
  */
-class CPjTimerEntry : public CActive 
+class CPjTimerEntry : public CActive
 {
-public:
-    pj_timer_entry  *entry_;
-    
-    static CPjTimerEntry* NewL(	pj_timer_heap_t *timer_heap,
-    				pj_timer_entry *entry,
-    				const pj_time_val *delay);
-    
-    ~CPjTimerEntry();
-    
-    virtual void RunL();
-    virtual void DoCancel();
-
-private:	
-    pj_timer_heap_t *timer_heap_;
-    RTimer	     rtimer_;
-    pj_uint32_t	     interval_left_;
-    
-    CPjTimerEntry(pj_timer_heap_t *timer_heap, pj_timer_entry *entry);
-    void ConstructL(const pj_time_val *delay);
-    void Schedule();
+    public:
+        pj_timer_entry  *entry_;
+
+        static CPjTimerEntry* NewL (pj_timer_heap_t *timer_heap,
+                                    pj_timer_entry *entry,
+                                    const pj_time_val *delay);
+
+        ~CPjTimerEntry();
+
+        virtual void RunL();
+        virtual void DoCancel();
+
+    private:
+        pj_timer_heap_t *timer_heap_;
+        RTimer	     rtimer_;
+        pj_uint32_t	     interval_left_;
+
+        CPjTimerEntry (pj_timer_heap_t *timer_heap, pj_timer_entry *entry);
+        void ConstructL (const pj_time_val *delay);
+        void Schedule();
 };
 
 //////////////////////////////////////////////////////////////////////////////
@@ -106,46 +105,52 @@ private:
  */
 
 /* Grow timer heap to the specified size */
-static pj_status_t realloc_timer_heap(pj_timer_heap_t *th, pj_size_t new_size)
+static pj_status_t realloc_timer_heap (pj_timer_heap_t *th, pj_size_t new_size)
 {
     typedef CPjTimerEntry *entry_ptr;
     CPjTimerEntry **entries = NULL;
     int *free_slots = NULL;
     unsigned i, j;
- 
+
     if (new_size > PJ_SYMBIAN_TIMER_MAX_COUNT) {
-	/* Just some sanity limit */
-	new_size = PJ_SYMBIAN_TIMER_MAX_COUNT;
-	if (new_size <= th->max_size) {
-	    /* We've grown large enough */
-	    pj_assert(!"Too many timer heap entries");
-	    return PJ_ETOOMANY;
-	}
+        /* Just some sanity limit */
+        new_size = PJ_SYMBIAN_TIMER_MAX_COUNT;
+
+        if (new_size <= th->max_size) {
+            /* We've grown large enough */
+            pj_assert (!"Too many timer heap entries");
+            return PJ_ETOOMANY;
+        }
     }
-    
+
     /* Allocate entries, move entries from the old array if there is one */
     entries = new entry_ptr[new_size];
+
     if (th->entries) {
-	pj_memcpy(entries, th->entries, th->max_size * sizeof(th->entries[0]));
+        pj_memcpy (entries, th->entries, th->max_size * sizeof (th->entries[0]));
     }
+
     /* Initialize the remaining new area */
-    pj_bzero(&entries[th->max_size], 
-	    (new_size - th->max_size) * sizeof(th->entries[0]));
-    
+    pj_bzero (&entries[th->max_size],
+              (new_size - th->max_size) * sizeof (th->entries[0]));
+
     /* Allocate free slots array */
     free_slots = new int[new_size];
+
     if (th->free_slots) {
-	pj_memcpy(free_slots, th->free_slots, 
-		  FREECNT(th) * sizeof(th->free_slots[0]));
+        pj_memcpy (free_slots, th->free_slots,
+                   FREECNT (th) * sizeof (th->free_slots[0]));
     }
+
     /* Initialize the remaining new area */
-    for (i=FREECNT(th), j=th->max_size; j<new_size; ++i, ++j) {
-	free_slots[i] = j;
+    for (i=FREECNT (th), j=th->max_size; j<new_size; ++i, ++j) {
+        free_slots[i] = j;
     }
-    for ( ; i<new_size; ++i) {
-	free_slots[i] = -1;
+
+    for (; i<new_size; ++i) {
+        free_slots[i] = -1;
     }
-    
+
     /* Apply */
     delete [] th->entries;
     th->entries = entries;
@@ -157,59 +162,60 @@ static pj_status_t realloc_timer_heap(pj_timer_heap_t *th, pj_size_t new_size)
 }
 
 /* Allocate and register an entry to timer heap for newly scheduled entry */
-static pj_status_t add_entry(pj_timer_heap_t *th, CPjTimerEntry *entry)
+static pj_status_t add_entry (pj_timer_heap_t *th, CPjTimerEntry *entry)
 {
     pj_status_t status;
     int slot;
-    
+
     /* Check that there's still capacity left in the timer heap */
-    if (FREECNT(th) < 1) {
-	// Grow the timer heap twice the capacity
-	status = realloc_timer_heap(th, th->max_size * 2);
-	if (status != PJ_SUCCESS)
-	    return status;
+    if (FREECNT (th) < 1) {
+        // Grow the timer heap twice the capacity
+        status = realloc_timer_heap (th, th->max_size * 2);
+
+        if (status != PJ_SUCCESS)
+            return status;
     }
-    
+
     /* Allocate one free slot. Use LIFO */
-    slot = th->free_slots[FREECNT(th)-1];
-    PJ_ASSERT_RETURN((slot >= 0) && (slot < (int)th->max_size) && 
-		     (th->entries[slot]==NULL), PJ_EBUG);
-    
-    th->free_slots[FREECNT(th)-1] = -1;
+    slot = th->free_slots[FREECNT (th)-1];
+    PJ_ASSERT_RETURN ( (slot >= 0) && (slot < (int) th->max_size) &&
+                       (th->entries[slot]==NULL), PJ_EBUG);
+
+    th->free_slots[FREECNT (th)-1] = -1;
     th->entries[slot] = entry;
     entry->entry_->_timer_id = slot;
     ++th->cur_size;
-    
+
     return PJ_SUCCESS;
 }
 
 /* Free a slot when an entry's timer has elapsed or cancel */
-static pj_status_t remove_entry(pj_timer_heap_t *th, CPjTimerEntry *entry)
+static pj_status_t remove_entry (pj_timer_heap_t *th, CPjTimerEntry *entry)
 {
     int slot = entry->entry_->_timer_id;
-    
-    PJ_ASSERT_RETURN(slot >= 0 && slot < (int)th->max_size, PJ_EBUG);
-    PJ_ASSERT_RETURN(FREECNT(th) < th->max_size, PJ_EBUG);
-    PJ_ASSERT_RETURN(th->entries[slot]==entry, PJ_EBUG);
-    PJ_ASSERT_RETURN(th->free_slots[FREECNT(th)]==-1, PJ_EBUG);
-    
+
+    PJ_ASSERT_RETURN (slot >= 0 && slot < (int) th->max_size, PJ_EBUG);
+    PJ_ASSERT_RETURN (FREECNT (th) < th->max_size, PJ_EBUG);
+    PJ_ASSERT_RETURN (th->entries[slot]==entry, PJ_EBUG);
+    PJ_ASSERT_RETURN (th->free_slots[FREECNT (th) ]==-1, PJ_EBUG);
+
     th->entries[slot] = NULL;
-    th->free_slots[FREECNT(th)] = slot;
+    th->free_slots[FREECNT (th) ] = slot;
     entry->entry_->_timer_id = -1;
     --th->cur_size;
-    
+
     return PJ_SUCCESS;
 }
 
 
-CPjTimerEntry::CPjTimerEntry(pj_timer_heap_t *timer_heap,
-			     pj_timer_entry *entry)
-: CActive(PJ_SYMBIAN_TIMER_PRIORITY), entry_(entry), timer_heap_(timer_heap), 
-  interval_left_(0)
+CPjTimerEntry::CPjTimerEntry (pj_timer_heap_t *timer_heap,
+                              pj_timer_entry *entry)
+        : CActive (PJ_SYMBIAN_TIMER_PRIORITY), entry_ (entry), timer_heap_ (timer_heap),
+        interval_left_ (0)
 {
 }
 
-CPjTimerEntry::~CPjTimerEntry() 
+CPjTimerEntry::~CPjTimerEntry()
 {
     Cancel();
     rtimer_.Close();
@@ -218,62 +224,62 @@ CPjTimerEntry::~CPjTimerEntry()
 void CPjTimerEntry::Schedule()
 {
     pj_int32_t interval;
-    
+
     if (interval_left_ > MAX_RTIMER_INTERVAL) {
-	interval = MAX_RTIMER_INTERVAL;
+        interval = MAX_RTIMER_INTERVAL;
     } else {
-	interval = interval_left_;
+        interval = interval_left_;
     }
-    
+
     interval_left_ -= interval;
-    rtimer_.After(iStatus, interval * 1000);
+    rtimer_.After (iStatus, interval * 1000);
     SetActive();
 }
 
-void CPjTimerEntry::ConstructL(const pj_time_val *delay) 
+void CPjTimerEntry::ConstructL (const pj_time_val *delay)
 {
     rtimer_.CreateLocal();
-    CActiveScheduler::Add(this);
-    
-    interval_left_ = PJ_TIME_VAL_MSEC(*delay);
+    CActiveScheduler::Add (this);
+
+    interval_left_ = PJ_TIME_VAL_MSEC (*delay);
     Schedule();
 }
 
-CPjTimerEntry* CPjTimerEntry::NewL(pj_timer_heap_t *timer_heap,
-				   pj_timer_entry *entry,
-				   const pj_time_val *delay) 
+CPjTimerEntry* CPjTimerEntry::NewL (pj_timer_heap_t *timer_heap,
+                                    pj_timer_entry *entry,
+                                    const pj_time_val *delay)
 {
-    CPjTimerEntry *self = new CPjTimerEntry(timer_heap, entry);
-    CleanupStack::PushL(self);
-    self->ConstructL(delay);
-    CleanupStack::Pop(self);
+    CPjTimerEntry *self = new CPjTimerEntry (timer_heap, entry);
+    CleanupStack::PushL (self);
+    self->ConstructL (delay);
+    CleanupStack::Pop (self);
 
     return self;
 }
 
-void CPjTimerEntry::RunL() 
+void CPjTimerEntry::RunL()
 {
     if (interval_left_ > 0) {
-	Schedule();
-	return;
+        Schedule();
+        return;
     }
-    
-    remove_entry(timer_heap_, this);
-    entry_->cb(timer_heap_, entry_);
-    
+
+    remove_entry (timer_heap_, this);
+    entry_->cb (timer_heap_, entry_);
+
     // Finger's crossed!
     delete this;
 }
 
-void CPjTimerEntry::DoCancel() 
+void CPjTimerEntry::DoCancel()
 {
     /* It's possible that _timer_id is -1, see schedule(). In this case,
      * the entry has not been added to the timer heap, so don't remove
      * it.
      */
     if (entry_ && entry_->_timer_id != -1)
-	remove_entry(timer_heap_, this);
-    
+        remove_entry (timer_heap_, this);
+
     rtimer_.Cancel();
 }
 
@@ -284,89 +290,93 @@ void CPjTimerEntry::DoCancel()
 /*
  * Calculate memory size required to create a timer heap.
  */
-PJ_DEF(pj_size_t) pj_timer_heap_mem_size(pj_size_t count)
+PJ_DEF (pj_size_t) pj_timer_heap_mem_size (pj_size_t count)
 {
     return /* size of the timer heap itself: */
-           sizeof(pj_timer_heap_t) + 
-           /* size of each entry: */
-           (count+2) * (sizeof(void*)+sizeof(int)) +
-           /* lock, pool etc: */
-           132;
+        sizeof (pj_timer_heap_t) +
+        /* size of each entry: */
+        (count+2) * (sizeof (void*) +sizeof (int)) +
+        /* lock, pool etc: */
+        132;
 }
 
 /*
  * Create a new timer heap.
  */
-PJ_DEF(pj_status_t) pj_timer_heap_create( pj_pool_t *pool,
-					  pj_size_t size,
-                                          pj_timer_heap_t **p_heap)
+PJ_DEF (pj_status_t) pj_timer_heap_create (pj_pool_t *pool,
+        pj_size_t size,
+        pj_timer_heap_t **p_heap)
 {
     pj_timer_heap_t *ht;
     pj_status_t status;
 
-    PJ_ASSERT_RETURN(pool && p_heap, PJ_EINVAL);
+    PJ_ASSERT_RETURN (pool && p_heap, PJ_EINVAL);
 
     *p_heap = NULL;
 
     /* Allocate timer heap data structure from the pool */
-    ht = PJ_POOL_ZALLOC_T(pool, pj_timer_heap_t);
+    ht = PJ_POOL_ZALLOC_T (pool, pj_timer_heap_t);
+
     if (!ht)
         return PJ_ENOMEM;
 
     /* Allocate slots */
-    status = realloc_timer_heap(ht, size);
+    status = realloc_timer_heap (ht, size);
+
     if (status != PJ_SUCCESS)
-	return status;
+        return status;
 
     *p_heap = ht;
     return PJ_SUCCESS;
 }
 
-PJ_DEF(void) pj_timer_heap_destroy( pj_timer_heap_t *ht )
+PJ_DEF (void) pj_timer_heap_destroy (pj_timer_heap_t *ht)
 {
     /* Cancel and delete pending active objects */
     if (ht->entries) {
-	unsigned i;
-	for (i=0; i<ht->max_size; ++i) {
-	    if (ht->entries[i]) {
-		ht->entries[i]->Cancel();
-		delete ht->entries[i];
-		ht->entries[i] = NULL;
-	    }
-	}
+        unsigned i;
+
+        for (i=0; i<ht->max_size; ++i) {
+            if (ht->entries[i]) {
+                ht->entries[i]->Cancel();
+                delete ht->entries[i];
+                ht->entries[i] = NULL;
+            }
+        }
     }
-    
+
     delete [] ht->entries;
     delete [] ht->free_slots;
-    
+
     ht->entries = NULL;
     ht->free_slots = NULL;
 }
 
-PJ_DEF(void) pj_timer_heap_set_lock(  pj_timer_heap_t *ht,
+PJ_DEF (void) pj_timer_heap_set_lock (pj_timer_heap_t *ht,
                                       pj_lock_t *lock,
-                                      pj_bool_t auto_del )
+                                      pj_bool_t auto_del)
 {
-    PJ_UNUSED_ARG(ht);
+    PJ_UNUSED_ARG (ht);
+
     if (auto_del)
-    	pj_lock_destroy(lock);
+        pj_lock_destroy (lock);
 }
 
 
-PJ_DEF(unsigned) pj_timer_heap_set_max_timed_out_per_poll(pj_timer_heap_t *ht,
-                                                          unsigned count )
+PJ_DEF (unsigned) pj_timer_heap_set_max_timed_out_per_poll (pj_timer_heap_t *ht,
+        unsigned count)
 {
     /* Not applicable */
-    PJ_UNUSED_ARG(count);
+    PJ_UNUSED_ARG (count);
     return ht->max_size;
 }
 
-PJ_DEF(pj_timer_entry*) pj_timer_entry_init( pj_timer_entry *entry,
-                                             int id,
-                                             void *user_data,
-                                             pj_timer_heap_callback *cb )
+PJ_DEF (pj_timer_entry*) pj_timer_entry_init (pj_timer_entry *entry,
+        int id,
+        void *user_data,
+        pj_timer_heap_callback *cb)
 {
-    pj_assert(entry && cb);
+    pj_assert (entry && cb);
 
     entry->_timer_id = -1;
     entry->id = id;
@@ -376,81 +386,85 @@ PJ_DEF(pj_timer_entry*) pj_timer_entry_init( pj_timer_entry *entry,
     return entry;
 }
 
-PJ_DEF(pj_status_t) pj_timer_heap_schedule( pj_timer_heap_t *ht,
-					    pj_timer_entry *entry, 
-					    const pj_time_val *delay)
+PJ_DEF (pj_status_t) pj_timer_heap_schedule (pj_timer_heap_t *ht,
+        pj_timer_entry *entry,
+        const pj_time_val *delay)
 {
     CPjTimerEntry *timerObj;
     pj_status_t status;
-    
-    PJ_ASSERT_RETURN(ht && entry && delay, PJ_EINVAL);
-    PJ_ASSERT_RETURN(entry->cb != NULL, PJ_EINVAL);
+
+    PJ_ASSERT_RETURN (ht && entry && delay, PJ_EINVAL);
+    PJ_ASSERT_RETURN (entry->cb != NULL, PJ_EINVAL);
 
     /* Prevent same entry from being scheduled more than once */
-    PJ_ASSERT_RETURN(entry->_timer_id < 1, PJ_EINVALIDOP);
+    PJ_ASSERT_RETURN (entry->_timer_id < 1, PJ_EINVALIDOP);
 
     entry->_timer_id = -1;
-    
-    timerObj = CPjTimerEntry::NewL(ht, entry, delay);
-    status = add_entry(ht, timerObj);
+
+    timerObj = CPjTimerEntry::NewL (ht, entry, delay);
+    status = add_entry (ht, timerObj);
+
     if (status != PJ_SUCCESS) {
-	timerObj->Cancel();
-	delete timerObj;
-	return status;
+        timerObj->Cancel();
+        delete timerObj;
+        return status;
     }
-    
+
     return PJ_SUCCESS;
 }
 
-PJ_DEF(int) pj_timer_heap_cancel( pj_timer_heap_t *ht,
-				  pj_timer_entry *entry)
+PJ_DEF (int) pj_timer_heap_cancel (pj_timer_heap_t *ht,
+                                   pj_timer_entry *entry)
 {
-    PJ_ASSERT_RETURN(ht && entry, PJ_EINVAL);
-    
-    if (entry->_timer_id >= 0 && entry->_timer_id < (int)ht->max_size) {
-    	CPjTimerEntry *timerObj = ht->entries[entry->_timer_id];
-    	if (timerObj) {
-    	    timerObj->Cancel();
-    	    delete timerObj;
-    	    return 1;
-    	} else {
-    	    return 0;
-    	}
+    PJ_ASSERT_RETURN (ht && entry, PJ_EINVAL);
+
+    if (entry->_timer_id >= 0 && entry->_timer_id < (int) ht->max_size) {
+        CPjTimerEntry *timerObj = ht->entries[entry->_timer_id];
+
+        if (timerObj) {
+            timerObj->Cancel();
+            delete timerObj;
+            return 1;
+        } else {
+            return 0;
+        }
     } else {
-    	return 0;
+        return 0;
     }
 }
 
-PJ_DEF(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht, 
-                                     pj_time_val *next_delay )
+PJ_DEF (unsigned) pj_timer_heap_poll (pj_timer_heap_t *ht,
+                                      pj_time_val *next_delay)
 {
     /* Polling is not necessary on Symbian, since all async activities
      * are registered to active scheduler.
      */
-    PJ_UNUSED_ARG(ht);
+    PJ_UNUSED_ARG (ht);
+
     if (next_delay) {
-    	next_delay->sec = 1;
-    	next_delay->msec = 0;
+        next_delay->sec = 1;
+        next_delay->msec = 0;
     }
+
     return 0;
 }
 
-PJ_DEF(pj_size_t) pj_timer_heap_count( pj_timer_heap_t *ht )
+PJ_DEF (pj_size_t) pj_timer_heap_count (pj_timer_heap_t *ht)
 {
-    PJ_ASSERT_RETURN(ht, 0);
+    PJ_ASSERT_RETURN (ht, 0);
 
     return ht->cur_size;
 }
 
-PJ_DEF(pj_status_t) pj_timer_heap_earliest_time( pj_timer_heap_t * ht,
-					         pj_time_val *timeval)
+PJ_DEF (pj_status_t) pj_timer_heap_earliest_time (pj_timer_heap_t * ht,
+        pj_time_val *timeval)
 {
     /* We don't support this! */
-    PJ_UNUSED_ARG(ht);
-    
+    PJ_UNUSED_ARG (ht);
+
     timeval->sec = 1;
     timeval->msec = 0;
-    
+
     return PJ_SUCCESS;
 }
 
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pj/unicode_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pj/unicode_symbian.cpp
index 2665565c2fb2e79d6c46fcff6598c26675522b51..474c5673e719e6d959d800c03a92cdefc6ef95b6 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pj/unicode_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pj/unicode_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: unicode_symbian.cpp 3047 2010-01-06 14:35:13Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -36,23 +36,23 @@
 /*
  * Convert ANSI strings to Unicode strings.
  */
-PJ_DEF(wchar_t*) pj_ansi_to_unicode( const char *str, pj_size_t len,
-				     wchar_t *wbuf, pj_size_t wbuf_count)
+PJ_DEF (wchar_t*) pj_ansi_to_unicode (const char *str, pj_size_t len,
+                                      wchar_t *wbuf, pj_size_t wbuf_count)
 {
-    TPtrC8 aForeign((const TUint8*)str, (TInt)len);
-    TPtr16 aUnicode((TUint16*)wbuf, (TInt)(wbuf_count-1));
+    TPtrC8 aForeign ( (const TUint8*) str, (TInt) len);
+    TPtr16 aUnicode ( (TUint16*) wbuf, (TInt) (wbuf_count-1));
     TInt left;
 
-    left = PjSymbianOS::Instance()->ConvertToUnicode(aUnicode, aForeign);
+    left = PjSymbianOS::Instance()->ConvertToUnicode (aUnicode, aForeign);
 
     if (left != 0) {
-	// Error, or there are unconvertable characters
-	*wbuf = 0;
+        // Error, or there are unconvertable characters
+        *wbuf = 0;
     } else {
-	if (len < wbuf_count)
-	    wbuf[len] = 0;
-	else
-	    wbuf[len-1] = 0;
+        if (len < wbuf_count)
+            wbuf[len] = 0;
+        else
+            wbuf[len-1] = 0;
     }
 
     return wbuf;
@@ -62,23 +62,23 @@ PJ_DEF(wchar_t*) pj_ansi_to_unicode( const char *str, pj_size_t len,
 /*
  * Convert Unicode string to ANSI string.
  */
-PJ_DEF(char*) pj_unicode_to_ansi( const wchar_t *wstr, pj_size_t len,
-				  char *buf, pj_size_t buf_size)
+PJ_DEF (char*) pj_unicode_to_ansi (const wchar_t *wstr, pj_size_t len,
+                                   char *buf, pj_size_t buf_size)
 {
-    TPtrC16 aUnicode((const TUint16*)wstr, (TInt)len);
-    TPtr8 aForeign((TUint8*)buf, (TInt)(buf_size-1));
+    TPtrC16 aUnicode ( (const TUint16*) wstr, (TInt) len);
+    TPtr8 aForeign ( (TUint8*) buf, (TInt) (buf_size-1));
     TInt left;
 
-    left = PjSymbianOS::Instance()->ConvertFromUnicode(aForeign, aUnicode);
+    left = PjSymbianOS::Instance()->ConvertFromUnicode (aForeign, aUnicode);
 
     if (left != 0) {
-	// Error, or there are unconvertable characters
-	buf[0] = '\0';
+        // Error, or there are unconvertable characters
+        buf[0] = '\0';
     } else {
-	if (len < buf_size)
-	    buf[len] = '\0';
-	else
-	    buf[len-1] = '\0';
+        if (len < buf_size)
+            buf[len] = '\0';
+        else
+            buf[len-1] = '\0';
     }
 
     return buf;
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pjlib++-test/main.cpp b/sflphone-common/libs/pjproject/pjlib/src/pjlib++-test/main.cpp
index d0e204c63b40b0eb9af9cad278ae8f2f86d004cb..776ce86afe3c3ce6297199c9c9a8eccedbba605e 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pjlib++-test/main.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pjlib++-test/main.cpp
@@ -1,5 +1,5 @@
 /* $Id */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -53,20 +53,20 @@ int main()
     Pj_Caching_Pool mem;
     Pj_Pool the_pool;
     Pj_Pool *pool = &the_pool;
-    
-    the_pool.attach(mem.create_pool(4000,4000));
 
-    Pj_Semaphore_Lock lsem(pool);
+    the_pool.attach (mem.create_pool (4000,4000));
+
+    Pj_Semaphore_Lock lsem (pool);
     Pj_Semaphore_Lock *plsem;
 
-    plsem = new(pool) Pj_Semaphore_Lock(pool);
+    plsem = new (pool) Pj_Semaphore_Lock (pool);
     delete plsem;
 
-    Pj_Proactor proactor(pool, 100, 100);
+    Pj_Proactor proactor (pool, 100, 100);
 
-    My_Event_Handler *event_handler = new(the_pool) My_Event_Handler;
-    proactor.register_socket_handler(pool, event_handler);
-    proactor.unregister_handler(event_handler);
+    My_Event_Handler *event_handler = new (the_pool) My_Event_Handler;
+    proactor.register_socket_handler (pool, event_handler);
+    proactor.unregister_handler (event_handler);
 
     return 0;
 }
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/exception_wrap.cpp b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/exception_wrap.cpp
index 8562c0ed950636e72869e9bb15b3e6da020f007b..aa958645a1048a24b6f3257a4a2200762feea49a 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/exception_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/exception_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: exception_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/main_symbian.cpp b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/main_symbian.cpp
index a91b671f2cb11adf3d02369bb100a42dfa5e79fe..79183c395d3aef1f0520a48be7037e2d314f96d9 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/main_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/main_symbian.cpp
@@ -25,7 +25,8 @@ int main()
     //err = test_main();
 
     if (err)
-	return err;
+        return err;
+
     return exp;
     //return 0;
 }
@@ -46,31 +47,30 @@ LOCAL_D CConsoleBase* console;  // write all messages to this
 
 class MyScheduler : public CActiveScheduler
 {
-public:
-    MyScheduler()
-    {}
+    public:
+        MyScheduler() {}
 
-    void Error(TInt aError) const;
+        void Error (TInt aError) const;
 };
 
-void MyScheduler::Error(TInt aError) const
+void MyScheduler::Error (TInt aError) const
 {
-    PJ_UNUSED_ARG(aError);
+    PJ_UNUSED_ARG (aError);
 }
 
 LOCAL_C void DoStartL()
-    {
+{
     // Create active scheduler (to run active objects)
     CActiveScheduler* scheduler = new (ELeave) MyScheduler;
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
+    CleanupStack::PushL (scheduler);
+    CActiveScheduler::Install (scheduler);
 
     test_main();
 
-    CActiveScheduler::Install(NULL);
-    CleanupStack::Pop(scheduler);
+    CActiveScheduler::Install (NULL);
+    CleanupStack::Pop (scheduler);
     delete scheduler;
-    }
+}
 
 #define WRITE_TO_DEBUG_CONSOLE
 
@@ -79,55 +79,57 @@ LOCAL_C void DoStartL()
 #endif
 
 //  Global Functions
-static void log_writer(int level, const char *buf, int len)
+static void log_writer (int level, const char *buf, int len)
 {
     static wchar_t buf16[PJ_LOG_MAX_SIZE];
 
-    PJ_UNUSED_ARG(level);
-    
-    pj_ansi_to_unicode(buf, len, buf16, PJ_ARRAY_SIZE(buf16));
+    PJ_UNUSED_ARG (level);
+
+    pj_ansi_to_unicode (buf, len, buf16, PJ_ARRAY_SIZE (buf16));
     buf16[len] = 0;
     buf16[len+1] = 0;
-    
-    TPtrC16 aBuf((const TUint16*)buf16, (TInt)len);
-    console->Write(aBuf);
-    
+
+    TPtrC16 aBuf ( (const TUint16*) buf16, (TInt) len);
+    console->Write (aBuf);
+
 #ifdef WRITE_TO_DEBUG_CONSOLE
-    RDebug::Print(aBuf);
+    RDebug::Print (aBuf);
 #endif
 }
 
 
 GLDEF_C TInt E32Main()
-    {
+{
     // Create cleanup stack
     __UHEAP_MARK;
     CTrapCleanup* cleanup = CTrapCleanup::New();
 
     // Create output console
-    TRAPD(createError, console = Console::NewL(_L("Console"), TSize(KConsFullScreen,KConsFullScreen)));
+    TRAPD (createError, console = Console::NewL (_L ("Console"), TSize (KConsFullScreen,KConsFullScreen)));
+
     if (createError)
         return createError;
 
-    pj_log_set_log_func(&log_writer);
+    pj_log_set_log_func (&log_writer);
 
     // Run application code inside TRAP harness, wait keypress when terminated
-    TRAPD(mainError, DoStartL());
+    TRAPD (mainError, DoStartL());
+
     if (mainError)
-        console->Printf(_L(" failed, leave code = %d"), mainError);
-    
-    console->Printf(_L(" [press any key]\n"));
+        console->Printf (_L (" failed, leave code = %d"), mainError);
+
+    console->Printf (_L (" [press any key]\n"));
     console->Getch();
-    
+
     delete console;
     delete cleanup;
-    
-    CloseSTDLIB(); 
-    
+
+    CloseSTDLIB();
+
     __UHEAP_MARKEND;
-    
+
     return KErrNone;
-    }
+}
 
 #endif	/* if 0 */
 
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/pool_wrap.cpp b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/pool_wrap.cpp
index 0158e3bf0aac91599527933514fbef46953aae07..09f3b71fe95ceb20b05ccc028257414dd2b7373e 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/pool_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/pool_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: pool_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/test_wrap.cpp b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/test_wrap.cpp
index 2572e91d126220196b75e4a6565552d0a65b4d05..c01f5230ab3cda4b0b8faeac4f9b1855e0bba9a8 100644
--- a/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/test_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjlib/src/pjlib-test/test_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: test_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjmedia/include/pjmedia-audiodev/config.h b/sflphone-common/libs/pjproject/pjmedia/include/pjmedia-audiodev/config.h
index 276e4cd7b04be42f127efa58f73d81b1dc723367..6b4575f11029d3cda6051a1cb3911941ae847799 100644
--- a/sflphone-common/libs/pjproject/pjmedia/include/pjmedia-audiodev/config.h
+++ b/sflphone-common/libs/pjproject/pjmedia/include/pjmedia-audiodev/config.h
@@ -1,5 +1,5 @@
 /* $Id: config.h 2977 2009-10-29 09:39:17Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -104,7 +104,7 @@ PJ_BEGIN_DECL
 
 
 /**
- * This setting controls whether Symbian audio (using built-in multimedia 
+ * This setting controls whether Symbian audio (using built-in multimedia
  * framework) support should be included.
  */
 #ifndef PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA
@@ -115,7 +115,7 @@ PJ_BEGIN_DECL
 /**
  * This setting controls whether the Audio Device API should support
  * device implementation that is based on the old sound device API
- * (sound.h). 
+ * (sound.h).
  *
  * Enable this API if:
  *  - you have implemented your own sound device using the old sound
@@ -149,7 +149,7 @@ PJ_END_DECL
  * @{
 
 PJMEDIA Audio Device API is a cross-platform audio API appropriate for use with
-VoIP applications and many other types of audio streaming applications. 
+VoIP applications and many other types of audio streaming applications.
 
 The API abstracts many different audio API's on various platforms, such as:
  - PortAudio back-end for Win32, Windows Mobile, Linux, Unix, dan MacOS X.
@@ -159,45 +159,45 @@ The API abstracts many different audio API's on various platforms, such as:
  - null-audio implementation
  - and more to be implemented in the future
 
-The Audio Device API/library is an evolution from PJMEDIA @ref PJMED_SND and 
+The Audio Device API/library is an evolution from PJMEDIA @ref PJMED_SND and
 contains many enhancements:
 
  - Forward compatibility:
 \n
-   The new API has been designed to be extensible, it will support new API's as 
-   well as new features that may be introduced in the future without breaking 
-   compatibility with applications that use this API as well as compatibility 
-   with existing device implementations. 
+   The new API has been designed to be extensible, it will support new API's as
+   well as new features that may be introduced in the future without breaking
+   compatibility with applications that use this API as well as compatibility
+   with existing device implementations.
 
  - Device capabilities:
 \n
    At the heart of the API is device capabilities management, where all possible
    audio capabilities of audio devices should be able to be handled in a generic
-   manner. With this framework, new capabilities that may be discovered in the 
-   future can be handled in manner without breaking existing applications. 
+   manner. With this framework, new capabilities that may be discovered in the
+   future can be handled in manner without breaking existing applications.
 
  - Built-in features:
 \n
-   The device capabilities framework enables applications to use and control 
+   The device capabilities framework enables applications to use and control
    audio features built-in in the device, such as:
-    - echo cancellation, 
-    - built-in codecs, 
+    - echo cancellation,
+    - built-in codecs,
     - audio routing (e.g. to earpiece or loudspeaker),
     - volume control,
     - etc.
 
  - Codec support:
 \n
-   Some audio devices such as Nokia/Symbian Audio Proxy Server (APS) and Nokia 
+   Some audio devices such as Nokia/Symbian Audio Proxy Server (APS) and Nokia
    VoIP Audio Services (VAS) support built-in hardware audio codecs (e.g. G.729,
    iLBC, and AMR), and application can use the sound device in encoded mode to
-   make use of these hardware codecs. 
+   make use of these hardware codecs.
 
  - Multiple backends:
 \n
-   The new API supports multiple audio backends (called factories or drivers in 
-   the code) to be active simultaneously, and audio backends may be added or 
-   removed during run-time. 
+   The new API supports multiple audio backends (called factories or drivers in
+   the code) to be active simultaneously, and audio backends may be added or
+   removed during run-time.
 
 
 @section using Overview on using the API
@@ -205,11 +205,11 @@ contains many enhancements:
 @subsection getting_started Getting started
 
  -# <b>Configure the application's project settings</b>.\n
-    Add the following 
+    Add the following
     include:
     \code
     #include <pjmedia_audiodev.h>\endcode\n
-    And add <b>pjmedia-audiodev</b> library to your application link 
+    And add <b>pjmedia-audiodev</b> library to your application link
     specifications.\n
  -# <b>Compile time settings</b>.\n
     Use the compile time settings to enable or
@@ -240,7 +240,7 @@ contains many enhancements:
 
 	status = pjmedia_aud_dev_get_info(dev_idx, &info);
 	printf("%d. %s (in=%d, out=%d)\n",
-	       dev_idx, info.name, 
+	       dev_idx, info.name,
 	       info.input_count, info.output_count);
     }
     \endcode\n
@@ -285,7 +285,7 @@ Capabilities are encoded as #pjmedia_aud_dev_cap enumeration. Please see
  -# Info: You can set the device settings when opening audio stream by setting
     the flags and the appropriate setting in #pjmedia_aud_param when calling
     #pjmedia_aud_stream_create()\n
- -# Info: Once the audio stream is running, you can retrieve or change the stream 
+ -# Info: Once the audio stream is running, you can retrieve or change the stream
     setting by specifying the capability in #pjmedia_aud_stream_get_cap()
     and #pjmedia_aud_stream_set_cap() respectively.
 
@@ -340,12 +340,12 @@ or both.
     param.ext_fmt.vad = PJ_FALSE;
     \endcode\n
  -# Note that if non-PCM format is configured on the audio stream, the
-    capture and/or playback functions (#pjmedia_aud_rec_cb and 
+    capture and/or playback functions (#pjmedia_aud_rec_cb and
     #pjmedia_aud_play_cb respectively) will report the audio frame as
     #pjmedia_frame_ext structure instead of the #pjmedia_frame.
  -# Optionally configure other device's capabilities. The following snippet
     shows how to enable echo cancellation on the device (note that this
-    snippet may not be necessary since the setting may have been enabled 
+    snippet may not be necessary since the setting may have been enabled
     when calling #pjmedia_aud_dev_default_param() above):
     \code
     if (info.caps & PJMEDIA_AUD_DEV_CAP_EC) {
@@ -358,7 +358,7 @@ or both.
     \code
        pjmedia_aud_stream *stream;
 
-       status = pjmedia_aud_stream_create(&param, &rec_cb, &play_cb, 
+       status = pjmedia_aud_stream_create(&param, &rec_cb, &play_cb,
                                           user_data, &stream);
     \endcode
 
@@ -381,7 +381,7 @@ or both.
     \code
     // Volume setting is an unsigned integer showing the level in percent.
     unsigned vol;
-    status = pjmedia_aud_stream_get_cap(stream, 
+    status = pjmedia_aud_stream_get_cap(stream,
 					PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
 					&vol);
     \endcode
@@ -390,7 +390,7 @@ or both.
     \code
     // Volume setting is an unsigned integer showing the level in percent.
     unsigned vol = 50;
-    status = pjmedia_aud_stream_set_cap(stream, 
+    status = pjmedia_aud_stream_set_cap(stream,
 					PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
 					&vol);
     \endcode
diff --git a/sflphone-common/libs/pjproject/pjmedia/include/pjmedia-codec/config.h b/sflphone-common/libs/pjproject/pjmedia/include/pjmedia-codec/config.h
index d8de2fed07f3efaa6bbb2c58dee23133ebffbffa..bdcf8e5cfaa4261cf3711e88a14ae4aab2c5e476 100644
--- a/sflphone-common/libs/pjproject/pjmedia/include/pjmedia-codec/config.h
+++ b/sflphone-common/libs/pjproject/pjmedia/include/pjmedia-codec/config.h
@@ -1,5 +1,5 @@
 /* $Id: config.h 2875 2009-08-13 15:57:26Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -142,7 +142,7 @@
 
 /**
  * Enable Intel IPP AMR codec. This also needs to be enabled when AMR WB
- * codec is enabled. This option is only used when PJMEDIA_HAS_INTEL_IPP 
+ * codec is enabled. This option is only used when PJMEDIA_HAS_INTEL_IPP
  * is enabled.
  *
  * Default: 1
@@ -154,7 +154,7 @@
 
 /**
  * Enable Intel IPP AMR wideband codec. The PJMEDIA_HAS_INTEL_IPP_CODEC_AMR
- * option must also be enabled to use this codec. This option is only used 
+ * option must also be enabled to use this codec. This option is only used
  * when PJMEDIA_HAS_INTEL_IPP is enabled.
  *
  * Default: 1
@@ -290,8 +290,8 @@
 #endif
 
 /**
- * Default G.722.1 codec encoder and decoder level adjustment. 
- * If the value is non-zero, then PCM input samples to the encoder will 
+ * Default G.722.1 codec encoder and decoder level adjustment.
+ * If the value is non-zero, then PCM input samples to the encoder will
  * be shifted right by this value, and similarly PCM output samples from
  * the decoder will be shifted left by this value.
  *
@@ -305,7 +305,7 @@
 
 /**
  * Enabling both G.722.1 codec implementations, internal PJMEDIA and IPP,
- * may cause problem in SDP, i.e: payload types duplications. So, let's 
+ * may cause problem in SDP, i.e: payload types duplications. So, let's
  * just trap such case here at compile time.
  *
  * Application can control which implementation to be used by manipulating
diff --git a/sflphone-common/libs/pjproject/pjmedia/include/pjmedia/config.h b/sflphone-common/libs/pjproject/pjmedia/include/pjmedia/config.h
index a929b867cb2d2c63bfa8500615dcfc09d48a1c17..52865e821af64fb0ce33d79577380754605939d0 100644
--- a/sflphone-common/libs/pjproject/pjmedia/include/pjmedia/config.h
+++ b/sflphone-common/libs/pjproject/pjmedia/include/pjmedia/config.h
@@ -1,5 +1,5 @@
 /* $Id: config.h 2977 2009-10-29 09:39:17Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -56,11 +56,11 @@
 #endif
 
 /**
- * Specify whether we prefer to use audio switch board rather than 
+ * Specify whether we prefer to use audio switch board rather than
  * conference bridge.
  *
- * Audio switch board is a kind of simplified version of conference 
- * bridge, but not really the subset of conference bridge. It has 
+ * Audio switch board is a kind of simplified version of conference
+ * bridge, but not really the subset of conference bridge. It has
  * stricter rules on audio routing among the pjmedia ports and has
  * no audio mixing capability. The power of it is it could work with
  * encoded audio frames where conference brigde couldn't.
@@ -114,7 +114,7 @@
 #endif
 
 /**
- * Specify default sound device latency, in milisecond. 
+ * Specify default sound device latency, in milisecond.
  *
  * Default is 160ms for Windows Mobile and 140ms for other platforms.
  */
@@ -144,21 +144,21 @@
 /**
  * This denotes implementation of WSOLA using fixed or floating point WSOLA
  * algorithm. This implementation provides the best quality of the result,
- * at the expense of one frame delay and intensive processing power 
+ * at the expense of one frame delay and intensive processing power
  * requirement.
  */
 #define PJMEDIA_WSOLA_IMP_WSOLA		    1
 
 /**
- * This denotes implementation of WSOLA algorithm with faster waveform 
- * similarity calculation. This implementation provides fair quality of 
+ * This denotes implementation of WSOLA algorithm with faster waveform
+ * similarity calculation. This implementation provides fair quality of
  * the result with the main advantage of low processing power requirement.
  */
 #define PJMEDIA_WSOLA_IMP_WSOLA_LITE	    2
 
 /**
  * Specify type of Waveform based Similarity Overlap and Add (WSOLA) backend
- * implementation to be used. WSOLA is an algorithm to expand and/or compress 
+ * implementation to be used. WSOLA is an algorithm to expand and/or compress
  * audio frames without changing the pitch, and used by the delaybuf and as PLC
  * backend algorithm.
  *
@@ -171,8 +171,8 @@
 
 /**
  * Specify the default maximum duration of synthetic audio that is generated
- * by WSOLA. This value should be long enough to cover burst of packet losses. 
- * but not too long, because as the duration increases the quality would 
+ * by WSOLA. This value should be long enough to cover burst of packet losses.
+ * but not too long, because as the duration increases the quality would
  * degrade considerably.
  *
  * Note that this limit is only applied when fading is enabled in the WSOLA
@@ -201,7 +201,7 @@
 /**
  * Specify WSOLA algorithm delay, in milliseconds. The algorithm delay is
  * used to merge synthetic samples with real samples in the transition
- * between real to synthetic and vice versa. The longer the delay, the 
+ * between real to synthetic and vice versa. The longer the delay, the
  * smoother signal to be generated, at the expense of longer latency and
  * a slighty more computation.
  *
@@ -230,7 +230,7 @@
 /**
  * Specify number of sound buffers. Larger number is better for sound
  * stability and to accommodate sound devices that are unable to send frames
- * in timely manner, however it would probably cause more audio delay (and 
+ * in timely manner, however it would probably cause more audio delay (and
  * definitely will take more memory). One individual buffer is normally 10ms
  * or 20 ms long, depending on ptime settings (samples_per_frame value).
  *
@@ -313,13 +313,13 @@
  */
 #define PJMEDIA_RESAMPLE_NONE		    1	/**< No resampling.	    */
 #define PJMEDIA_RESAMPLE_LIBRESAMPLE	    2	/**< Sample rate conversion 
-						     using libresample.  */
+using libresample.  */
 #define PJMEDIA_RESAMPLE_SPEEX		    3	/**< Sample rate conversion 
-						     using Speex. */
+using Speex. */
 #define PJMEDIA_RESAMPLE_LIBSAMPLERATE	    4	/**< Sample rate conversion 
-						     using libsamplerate 
-						     (a.k.a Secret Rabbit Code)
-						 */
+using libsamplerate
+(a.k.a Secret Rabbit Code)
+*/
 
 /**
  * Select which resample implementation to use. Currently pjmedia supports:
@@ -359,7 +359,7 @@
  * This (among other thing) will affect the size of buffers to be allocated
  * for outgoing packets.
  */
-#ifndef PJMEDIA_MAX_FRAME_DURATION_MS   
+#ifndef PJMEDIA_MAX_FRAME_DURATION_MS
 #   define PJMEDIA_MAX_FRAME_DURATION_MS   	200
 #endif
 
@@ -367,7 +367,7 @@
 /**
  * Max packet size to support.
  */
-#ifndef PJMEDIA_MAX_MTU			
+#ifndef PJMEDIA_MAX_MTU
 #  define PJMEDIA_MAX_MTU			1500
 #endif
 
@@ -375,7 +375,7 @@
 /**
  * DTMF/telephone-event duration, in timestamp.
  */
-#ifndef PJMEDIA_DTMF_DURATION		
+#ifndef PJMEDIA_DTMF_DURATION
 #  define PJMEDIA_DTMF_DURATION			1600	/* in timestamp */
 #endif
 
@@ -385,7 +385,7 @@
  * remote address required to make the stream switch transmission
  * to the source address.
  */
-#ifndef PJMEDIA_RTP_NAT_PROBATION_CNT	
+#ifndef PJMEDIA_RTP_NAT_PROBATION_CNT
 #  define PJMEDIA_RTP_NAT_PROBATION_CNT		10
 #endif
 
@@ -426,9 +426,9 @@
 
 /**
  * Specify whether RTCP XR support should be built into PJMEDIA. Disabling
- * this feature will reduce footprint slightly. Note that even when this 
- * setting is enabled, RTCP XR processing will only be performed in stream 
- * if it is enabled on run-time on per stream basis. See  
+ * this feature will reduce footprint slightly. Note that even when this
+ * setting is enabled, RTCP XR processing will only be performed in stream
+ * if it is enabled on run-time on per stream basis. See
  * PJMEDIA_STREAM_ENABLE_XR setting for more info.
  *
  * Default: 1 (yes).
@@ -440,7 +440,7 @@
 
 /**
  * The RTCP XR feature is activated and used by stream if \a enable_rtcp_xr
- * field of \a pjmedia_stream_info structure is non-zero. This setting 
+ * field of \a pjmedia_stream_info structure is non-zero. This setting
  * controls the default value of this field.
  *
  * Default: 0 (disabled)
@@ -459,7 +459,7 @@
  *
  * Specify zero to disable this feature.
  *
- * Default: 600 msec (which gives good probability that some RTP 
+ * Default: 600 msec (which gives good probability that some RTP
  *                    packets will reach the destination, but without
  *                    filling up the jitter buffer on the remote end).
  */
@@ -469,13 +469,13 @@
 
 
 /**
- * Specify the maximum duration of silence period in the codec, in msec. 
+ * Specify the maximum duration of silence period in the codec, in msec.
  * This is useful for example to keep NAT binding open in the firewall
- * and to prevent server from disconnecting the call because no 
+ * and to prevent server from disconnecting the call because no
  * RTP packet is received.
  *
  * This only applies to codecs that use PJMEDIA's VAD (pretty much
- * everything including iLBC, except Speex, which has its own DTX 
+ * everything including iLBC, except Speex, which has its own DTX
  * mechanism).
  *
  * Use (-1) to disable this feature.
@@ -527,7 +527,7 @@
  * remote, or should it rather use the codec preference as specified by
  * local endpoint.
  *
- * For example, suppose incoming call has codec order "8 0 3", while 
+ * For example, suppose incoming call has codec order "8 0 3", while
  * local codec order is "3 0 8". If remote codec order is preferable,
  * the selected codec will be 8, while if local codec order is preferable,
  * the selected codec will be 3.
@@ -555,7 +555,7 @@
 
 
 /**
- * This macro controls whether pjmedia should include SDP rtpmap 
+ * This macro controls whether pjmedia should include SDP rtpmap
  * attribute for static payload types. SDP rtpmap for static
  * payload types are optional, although they are normally included
  * for interoperability reason.
@@ -609,12 +609,12 @@
 #endif
 
 
-/* 
+/*
  * Below specifies the various tone generator backend algorithm.
  */
 
-/** 
- * The math's sine(), floating point. This has very good precision 
+/**
+ * The math's sine(), floating point. This has very good precision
  * but it's the slowest and requires floating point support and
  * linking with the math library.
  */
@@ -630,7 +630,7 @@
 /**
  * Fixed point using sine signal generated by Cordic algorithm. This
  * algorithm can be tuned to provide balance between precision and
- * performance by tuning the PJMEDIA_TONEGEN_FIXED_POINT_CORDIC_LOOP 
+ * performance by tuning the PJMEDIA_TONEGEN_FIXED_POINT_CORDIC_LOOP
  * setting, and may be suitable for platforms that lack floating-point
  * support.
  */
@@ -645,7 +645,7 @@
 
 
 /**
- * Specify the tone generator algorithm to be used. Please see 
+ * Specify the tone generator algorithm to be used. Please see
  * http://trac.pjsip.org/repos/wiki/Tone_Generator for the performance
  * analysis results of the various tone generator algorithms.
  *
@@ -665,7 +665,7 @@
 /**
  * Specify the number of calculation loops to generate the tone, when
  * PJMEDIA_TONEGEN_FIXED_POINT_CORDIC algorithm is used. With more calculation
- * loops, the tone signal gets more precise, but this will add more 
+ * loops, the tone signal gets more precise, but this will add more
  * processing.
  *
  * Valid values are 1 to 28.
@@ -753,8 +753,8 @@
 
 /**
  * Transport info (pjmedia_transport_info) contains a socket info and list
- * of transport specific info, since transports can be chained together 
- * (for example, SRTP transport uses UDP transport as the underlying 
+ * of transport specific info, since transports can be chained together
+ * (for example, SRTP transport uses UDP transport as the underlying
  * transport). This constant specifies maximum number of transport specific
  * infos that can be held in a transport info.
  */
@@ -797,22 +797,22 @@
 #endif
 
 /**
- * Specify another type of keep-alive and NAT hole punching 
+ * Specify another type of keep-alive and NAT hole punching
  * mechanism (the other type is PJMEDIA_STREAM_VAD_SUSPEND_MSEC
- * and PJMEDIA_CODEC_MAX_SILENCE_PERIOD) to be used by stream. 
- * When this feature is enabled, the stream will initially 
+ * and PJMEDIA_CODEC_MAX_SILENCE_PERIOD) to be used by stream.
+ * When this feature is enabled, the stream will initially
  * transmit one packet to punch a hole in NAT, and periodically
  * transmit keep-alive packets.
  *
  * When this alternative keep-alive mechanism is used, application
- * may disable the other keep-alive mechanisms, i.e: by setting 
- * PJMEDIA_STREAM_VAD_SUSPEND_MSEC to zero and 
+ * may disable the other keep-alive mechanisms, i.e: by setting
+ * PJMEDIA_STREAM_VAD_SUSPEND_MSEC to zero and
  * PJMEDIA_CODEC_MAX_SILENCE_PERIOD to -1.
  *
  * The value of this macro specifies the type of packet used
  * for the keep-alive mechanism. Valid values are
  * PJMEDIA_STREAM_KA_EMPTY_RTP and PJMEDIA_STREAM_KA_USER.
- * 
+ *
  * The duration of the keep-alive interval further can be set
  * with PJMEDIA_STREAM_KA_INTERVAL setting.
  *
diff --git a/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp b/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp
index a807a3d3507855f90882d85c9875074b4a24ad39..b812147010d595fa866329a4e6258c9eb84da7f1 100644
--- a/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp
+++ b/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_aps_dev.cpp
@@ -1,5 +1,5 @@
 /* $Id: symb_aps_dev.cpp 2958 2009-10-20 14:54:57Z nanang $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -46,7 +46,7 @@
 #include <APSClientSession.h>
 #include <pjmedia-codec/amr_helper.h>
 
-/* Pack/unpack G.729 frame of S60 DSP codec, taken from:  
+/* Pack/unpack G.729 frame of S60 DSP codec, taken from:
  * http://wiki.forum.nokia.com/index.php/TSS000776_-_Payload_conversion_for_G.729_audio_format
  */
 #include "s60_g729_bitstream.h"
@@ -70,8 +70,7 @@ static pj_uint8_t aps_g711_frame_len;
 
 
 /* APS factory */
-struct aps_factory
-{
+struct aps_factory {
     pjmedia_aud_dev_factory	 base;
     pj_pool_t			*pool;
     pj_pool_factory		*pf;
@@ -84,11 +83,10 @@ class CPjAudioEngine;
 
 
 /* APS stream. */
-struct aps_stream
-{
+struct aps_stream {
     // Base
     pjmedia_aud_stream	 base;			/**< Base class.	*/
-    
+
     // Pool
     pj_pool_t		*pool;			/**< Memory pool.       */
 
@@ -111,7 +109,7 @@ struct aps_stream
     pj_uint16_t		 rec_buf_len;		/**< Record buffer length. */
     void                *strm_data;		/**< Stream data.	*/
 
-    /* Resampling is needed, in case audio device is opened with clock rate 
+    /* Resampling is needed, in case audio device is opened with clock rate
      * other than 8kHz (only for PCM format).
      */
     pjmedia_resample	*play_resample;		/**< Resampler for playback. */
@@ -128,38 +126,37 @@ struct aps_stream
 
 
 /* Prototypes */
-static pj_status_t factory_init(pjmedia_aud_dev_factory *f);
-static pj_status_t factory_destroy(pjmedia_aud_dev_factory *f);
-static unsigned    factory_get_dev_count(pjmedia_aud_dev_factory *f);
-static pj_status_t factory_get_dev_info(pjmedia_aud_dev_factory *f, 
-					unsigned index,
-					pjmedia_aud_dev_info *info);
-static pj_status_t factory_default_param(pjmedia_aud_dev_factory *f,
-					 unsigned index,
-					 pjmedia_aud_param *param);
-static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
-					 const pjmedia_aud_param *param,
-					 pjmedia_aud_rec_cb rec_cb,
-					 pjmedia_aud_play_cb play_cb,
-					 void *user_data,
-					 pjmedia_aud_stream **p_aud_strm);
-
-static pj_status_t stream_get_param(pjmedia_aud_stream *strm,
-				    pjmedia_aud_param *param);
-static pj_status_t stream_get_cap(pjmedia_aud_stream *strm,
-				  pjmedia_aud_dev_cap cap,
-				  void *value);
-static pj_status_t stream_set_cap(pjmedia_aud_stream *strm,
-				  pjmedia_aud_dev_cap cap,
-				  const void *value);
-static pj_status_t stream_start(pjmedia_aud_stream *strm);
-static pj_status_t stream_stop(pjmedia_aud_stream *strm);
-static pj_status_t stream_destroy(pjmedia_aud_stream *strm);
+static pj_status_t factory_init (pjmedia_aud_dev_factory *f);
+static pj_status_t factory_destroy (pjmedia_aud_dev_factory *f);
+static unsigned    factory_get_dev_count (pjmedia_aud_dev_factory *f);
+static pj_status_t factory_get_dev_info (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_dev_info *info);
+static pj_status_t factory_default_param (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_param *param);
+static pj_status_t factory_create_stream (pjmedia_aud_dev_factory *f,
+        const pjmedia_aud_param *param,
+        pjmedia_aud_rec_cb rec_cb,
+        pjmedia_aud_play_cb play_cb,
+        void *user_data,
+        pjmedia_aud_stream **p_aud_strm);
+
+static pj_status_t stream_get_param (pjmedia_aud_stream *strm,
+                                     pjmedia_aud_param *param);
+static pj_status_t stream_get_cap (pjmedia_aud_stream *strm,
+                                   pjmedia_aud_dev_cap cap,
+                                   void *value);
+static pj_status_t stream_set_cap (pjmedia_aud_stream *strm,
+                                   pjmedia_aud_dev_cap cap,
+                                   const void *value);
+static pj_status_t stream_start (pjmedia_aud_stream *strm);
+static pj_status_t stream_stop (pjmedia_aud_stream *strm);
+static pj_status_t stream_destroy (pjmedia_aud_stream *strm);
 
 
 /* Operations */
-static pjmedia_aud_dev_factory_op factory_op =
-{
+static pjmedia_aud_dev_factory_op factory_op = {
     &factory_init,
     &factory_destroy,
     &factory_get_dev_count,
@@ -168,8 +165,7 @@ static pjmedia_aud_dev_factory_op factory_op =
     &factory_create_stream
 };
 
-static pjmedia_aud_stream_op stream_op = 
-{
+static pjmedia_aud_stream_op stream_op = {
     &stream_get_param,
     &stream_get_cap,
     &stream_set_cap,
@@ -186,32 +182,31 @@ static pjmedia_aud_stream_op stream_op =
 /*
  * Utility: print sound device error
  */
-static void snd_perror(const char *title, TInt rc)
+static void snd_perror (const char *title, TInt rc)
 {
-    PJ_LOG(1,(THIS_FILE, "%s (error code=%d)", title, rc));
+    PJ_LOG (1, (THIS_FILE, "%s (error code=%d)", title, rc));
 }
 
-typedef void(*PjAudioCallback)(TAPSCommBuffer &buf, void *user_data);
+typedef void (*PjAudioCallback) (TAPSCommBuffer &buf, void *user_data);
 
 /**
  * Abstract class for handler of callbacks from APS client.
  */
 class MQueueHandlerObserver
 {
-public:
-    MQueueHandlerObserver(PjAudioCallback RecCb_, PjAudioCallback PlayCb_,
-			  void *UserData_)
-    : RecCb(RecCb_), PlayCb(PlayCb_), UserData(UserData_)
-    {}
-
-    virtual void InputStreamInitialized(const TInt aStatus) = 0;
-    virtual void OutputStreamInitialized(const TInt aStatus) = 0;
-    virtual void NotifyError(const TInt aError) = 0;
-
-public:
-    PjAudioCallback RecCb;
-    PjAudioCallback PlayCb;
-    void *UserData;
+    public:
+        MQueueHandlerObserver (PjAudioCallback RecCb_, PjAudioCallback PlayCb_,
+                               void *UserData_)
+                : RecCb (RecCb_), PlayCb (PlayCb_), UserData (UserData_) {}
+
+        virtual void InputStreamInitialized (const TInt aStatus) = 0;
+        virtual void OutputStreamInitialized (const TInt aStatus) = 0;
+        virtual void NotifyError (const TInt aError) = 0;
+
+    public:
+        PjAudioCallback RecCb;
+        PjAudioCallback PlayCb;
+        void *UserData;
 };
 
 /**
@@ -219,148 +214,158 @@ public:
  */
 class CQueueHandler : public CActive
 {
-public:
-    // Types of queue handler
-    enum TQueueHandlerType {
-        ERecordCommQueue,
-        EPlayCommQueue,
-        ERecordQueue,
-        EPlayQueue
-    };
-
-    // The order corresponds to the APS Server state, do not change!
-    enum TState {
-    	EAPSPlayerInitialize        = 1,
-    	EAPSRecorderInitialize      = 2,
-    	EAPSPlayData                = 3,
-    	EAPSRecordData              = 4,
-    	EAPSPlayerInitComplete      = 5,
-    	EAPSRecorderInitComplete    = 6
-    };
-
-    static CQueueHandler* NewL(MQueueHandlerObserver* aObserver,
-			       RMsgQueue<TAPSCommBuffer>* aQ,
-			       RMsgQueue<TAPSCommBuffer>* aWriteQ,
-			       TQueueHandlerType aType)
-    {
-	CQueueHandler* self = new (ELeave) CQueueHandler(aObserver, aQ, aWriteQ,
-							 aType);
-	CleanupStack::PushL(self);
-	self->ConstructL();
-	CleanupStack::Pop(self);
-	return self;
-    }
-
-    // Destructor
-    ~CQueueHandler() { Cancel(); }
+    public:
+        // Types of queue handler
+        enum TQueueHandlerType {
+            ERecordCommQueue,
+            EPlayCommQueue,
+            ERecordQueue,
+            EPlayQueue
+        };
+
+        // The order corresponds to the APS Server state, do not change!
+        enum TState {
+            EAPSPlayerInitialize        = 1,
+            EAPSRecorderInitialize      = 2,
+            EAPSPlayData                = 3,
+            EAPSRecordData              = 4,
+            EAPSPlayerInitComplete      = 5,
+            EAPSRecorderInitComplete    = 6
+        };
+
+        static CQueueHandler* NewL (MQueueHandlerObserver* aObserver,
+                                    RMsgQueue<TAPSCommBuffer>* aQ,
+                                    RMsgQueue<TAPSCommBuffer>* aWriteQ,
+                                    TQueueHandlerType aType) {
+            CQueueHandler* self = new (ELeave) CQueueHandler (aObserver, aQ, aWriteQ,
+                    aType);
+            CleanupStack::PushL (self);
+            self->ConstructL();
+            CleanupStack::Pop (self);
+            return self;
+        }
 
-    // Start listening queue event
-    void Start() {
-	iQ->NotifyDataAvailable(iStatus);
-	SetActive();
-    }
+        // Destructor
+        ~CQueueHandler() {
+            Cancel();
+        }
 
-private:
-    // Constructor
-    CQueueHandler(MQueueHandlerObserver* aObserver,
-		  RMsgQueue<TAPSCommBuffer>* aQ,
-		  RMsgQueue<TAPSCommBuffer>* aWriteQ,
-		  TQueueHandlerType aType)
-	: CActive(CActive::EPriorityHigh),
-	  iQ(aQ), iWriteQ(aWriteQ), iObserver(aObserver), iType(aType)
-    {
-	CActiveScheduler::Add(this);
-
-	// use lower priority for comm queues
-	if ((iType == ERecordCommQueue) || (iType == EPlayCommQueue))
-	    SetPriority(CActive::EPriorityStandard);
-    }
+        // Start listening queue event
+        void Start() {
+            iQ->NotifyDataAvailable (iStatus);
+            SetActive();
+        }
 
-    // Second phase constructor
-    void ConstructL() {}
+    private:
+        // Constructor
+        CQueueHandler (MQueueHandlerObserver* aObserver,
+                       RMsgQueue<TAPSCommBuffer>* aQ,
+                       RMsgQueue<TAPSCommBuffer>* aWriteQ,
+                       TQueueHandlerType aType)
+                : CActive (CActive::EPriorityHigh),
+                iQ (aQ), iWriteQ (aWriteQ), iObserver (aObserver), iType (aType) {
+            CActiveScheduler::Add (this);
+
+            // use lower priority for comm queues
+            if ( (iType == ERecordCommQueue) || (iType == EPlayCommQueue))
+                SetPriority (CActive::EPriorityStandard);
+        }
 
-    // Inherited from CActive
-    void DoCancel() { iQ->CancelDataAvailable(); }
+        // Second phase constructor
+        void ConstructL() {}
 
-    void RunL() {
-	if (iStatus != KErrNone) {
-	    iObserver->NotifyError(iStatus.Int());
-	    return;
+        // Inherited from CActive
+        void DoCancel() {
+            iQ->CancelDataAvailable();
         }
 
-	TAPSCommBuffer buffer;
-	TInt ret = iQ->Receive(buffer);
-
-	if (ret != KErrNone) {
-	    iObserver->NotifyError(ret);
-	    return;
-	}
-
-	switch (iType) {
-	case ERecordQueue:
-	    if (buffer.iCommand == EAPSRecordData) {
-		iObserver->RecCb(buffer, iObserver->UserData);
-	    } else {
-		iObserver->NotifyError(buffer.iStatus);
-	    }
-	    break;
-
-	// Callbacks from the APS main thread
-	case EPlayCommQueue:
-	    switch (buffer.iCommand) {
-		case EAPSPlayData:
-		    if (buffer.iStatus == KErrUnderflow) {
-			iObserver->PlayCb(buffer, iObserver->UserData);
-			iWriteQ->Send(buffer);
-		    }
-		    break;
-		case EAPSPlayerInitialize:
-		    iObserver->NotifyError(buffer.iStatus);
-		    break;
-		case EAPSPlayerInitComplete:
-		    iObserver->OutputStreamInitialized(buffer.iStatus);
-		    break;
-		case EAPSRecorderInitComplete:
-		    iObserver->InputStreamInitialized(buffer.iStatus);
-		    break;
-		default:
-		    iObserver->NotifyError(buffer.iStatus);
-		    break;
-	    }
-	    break;
-
-	// Callbacks from the APS recorder thread
-	case ERecordCommQueue:
-	    switch (buffer.iCommand) {
-		// The APS recorder thread will only report errors
-		// through this handler. All other callbacks will be
-		// sent from the APS main thread through EPlayCommQueue
-		case EAPSRecorderInitialize:
-		case EAPSRecordData:
-		default:
-		    iObserver->NotifyError(buffer.iStatus);
-		    break;
-	    }
-	    break;
-
-	default:
-	    break;
+        void RunL() {
+            if (iStatus != KErrNone) {
+                iObserver->NotifyError (iStatus.Int());
+                return;
+            }
+
+            TAPSCommBuffer buffer;
+            TInt ret = iQ->Receive (buffer);
+
+            if (ret != KErrNone) {
+                iObserver->NotifyError (ret);
+                return;
+            }
+
+            switch (iType) {
+                case ERecordQueue:
+
+                    if (buffer.iCommand == EAPSRecordData) {
+                        iObserver->RecCb (buffer, iObserver->UserData);
+                    } else {
+                        iObserver->NotifyError (buffer.iStatus);
+                    }
+
+                    break;
+
+                    // Callbacks from the APS main thread
+                case EPlayCommQueue:
+
+                    switch (buffer.iCommand) {
+                        case EAPSPlayData:
+
+                            if (buffer.iStatus == KErrUnderflow) {
+                                iObserver->PlayCb (buffer, iObserver->UserData);
+                                iWriteQ->Send (buffer);
+                            }
+
+                            break;
+                        case EAPSPlayerInitialize:
+                            iObserver->NotifyError (buffer.iStatus);
+                            break;
+                        case EAPSPlayerInitComplete:
+                            iObserver->OutputStreamInitialized (buffer.iStatus);
+                            break;
+                        case EAPSRecorderInitComplete:
+                            iObserver->InputStreamInitialized (buffer.iStatus);
+                            break;
+                        default:
+                            iObserver->NotifyError (buffer.iStatus);
+                            break;
+                    }
+
+                    break;
+
+                    // Callbacks from the APS recorder thread
+                case ERecordCommQueue:
+
+                    switch (buffer.iCommand) {
+                            // The APS recorder thread will only report errors
+                            // through this handler. All other callbacks will be
+                            // sent from the APS main thread through EPlayCommQueue
+                        case EAPSRecorderInitialize:
+                        case EAPSRecordData:
+                        default:
+                            iObserver->NotifyError (buffer.iStatus);
+                            break;
+                    }
+
+                    break;
+
+                default:
+                    break;
+            }
+
+            // issue next request
+            iQ->NotifyDataAvailable (iStatus);
+            SetActive();
         }
 
-        // issue next request
-        iQ->NotifyDataAvailable(iStatus);
-        SetActive();
-    }
-
-    TInt RunError(TInt) {
-	return 0;
-    }
+        TInt RunError (TInt) {
+            return 0;
+        }
 
-    // Data
-    RMsgQueue<TAPSCommBuffer>	*iQ;   // (not owned)
-    RMsgQueue<TAPSCommBuffer>	*iWriteQ;   // (not owned)
-    MQueueHandlerObserver	*iObserver; // (not owned)
-    TQueueHandlerType            iType;
+        // Data
+        RMsgQueue<TAPSCommBuffer>	*iQ;   // (not owned)
+        RMsgQueue<TAPSCommBuffer>	*iWriteQ;   // (not owned)
+        MQueueHandlerObserver	*iObserver; // (not owned)
+        TQueueHandlerType            iType;
 };
 
 /*
@@ -368,13 +373,13 @@ private:
  */
 class CPjAudioSetting
 {
-public:
-    TFourCC		 fourcc;
-    TAPSCodecMode	 mode;
-    TBool		 plc;
-    TBool		 vad;
-    TBool		 cng;
-    TBool		 loudspk;
+    public:
+        TFourCC		 fourcc;
+        TAPSCodecMode	 mode;
+        TBool		 plc;
+        TBool		 vad;
+        TBool		 cng;
+        TBool		 loudspk;
 };
 
 /*
@@ -382,101 +387,112 @@ public:
  */
 class CPjAudioEngine : public CBase, MQueueHandlerObserver
 {
-public:
-    enum State
-    {
-	STATE_NULL,
-	STATE_INITIALIZING,
-	STATE_READY,
-	STATE_STREAMING,
-	STATE_PENDING_STOP
-    };
-
-    ~CPjAudioEngine();
-
-    static CPjAudioEngine *NewL(struct aps_stream *parent_strm,
-			        PjAudioCallback rec_cb,
-				PjAudioCallback play_cb,
-				void *user_data,
-				const CPjAudioSetting &setting);
-
-    TInt StartL();
-    void Stop();
-
-    TInt ActivateSpeaker(TBool active);
-    
-    TInt SetVolume(TInt vol) { return iSession.SetVolume(vol); }
-    TInt GetVolume() { return iSession.Volume(); }
-    TInt GetMaxVolume() { return iSession.MaxVolume(); }
-    
-    TInt SetGain(TInt gain) { return iSession.SetGain(gain); }
-    TInt GetGain() { return iSession.Gain(); }
-    TInt GetMaxGain() { return iSession.MaxGain(); }
-
-private:
-    CPjAudioEngine(struct aps_stream *parent_strm,
-		   PjAudioCallback rec_cb,
-		   PjAudioCallback play_cb,
-		   void *user_data,
-		   const CPjAudioSetting &setting);
-    void ConstructL();
-
-    TInt InitPlayL();
-    TInt InitRecL();
-    TInt StartStreamL();
-
-    // Inherited from MQueueHandlerObserver
-    virtual void InputStreamInitialized(const TInt aStatus);
-    virtual void OutputStreamInitialized(const TInt aStatus);
-    virtual void NotifyError(const TInt aError);
-
-    State			 state_;
-    struct aps_stream		*parentStrm_;
-    CPjAudioSetting		 setting_;
-
-    RAPSSession                  iSession;
-    TAPSInitSettings             iPlaySettings;
-    TAPSInitSettings             iRecSettings;
-
-    RMsgQueue<TAPSCommBuffer>    iReadQ;
-    RMsgQueue<TAPSCommBuffer>    iReadCommQ;
-    RMsgQueue<TAPSCommBuffer>    iWriteQ;
-    RMsgQueue<TAPSCommBuffer>    iWriteCommQ;
-
-    CQueueHandler		*iPlayCommHandler;
-    CQueueHandler		*iRecCommHandler;
-    CQueueHandler		*iRecHandler;
+    public:
+        enum State {
+            STATE_NULL,
+            STATE_INITIALIZING,
+            STATE_READY,
+            STATE_STREAMING,
+            STATE_PENDING_STOP
+        };
+
+        ~CPjAudioEngine();
+
+        static CPjAudioEngine *NewL (struct aps_stream *parent_strm,
+                                     PjAudioCallback rec_cb,
+                                     PjAudioCallback play_cb,
+                                     void *user_data,
+                                     const CPjAudioSetting &setting);
+
+        TInt StartL();
+        void Stop();
+
+        TInt ActivateSpeaker (TBool active);
+
+        TInt SetVolume (TInt vol) {
+            return iSession.SetVolume (vol);
+        }
+        TInt GetVolume() {
+            return iSession.Volume();
+        }
+        TInt GetMaxVolume() {
+            return iSession.MaxVolume();
+        }
+
+        TInt SetGain (TInt gain) {
+            return iSession.SetGain (gain);
+        }
+        TInt GetGain() {
+            return iSession.Gain();
+        }
+        TInt GetMaxGain() {
+            return iSession.MaxGain();
+        }
+
+    private:
+        CPjAudioEngine (struct aps_stream *parent_strm,
+                        PjAudioCallback rec_cb,
+                        PjAudioCallback play_cb,
+                        void *user_data,
+                        const CPjAudioSetting &setting);
+        void ConstructL();
+
+        TInt InitPlayL();
+        TInt InitRecL();
+        TInt StartStreamL();
+
+        // Inherited from MQueueHandlerObserver
+        virtual void InputStreamInitialized (const TInt aStatus);
+        virtual void OutputStreamInitialized (const TInt aStatus);
+        virtual void NotifyError (const TInt aError);
+
+        State			 state_;
+        struct aps_stream		*parentStrm_;
+        CPjAudioSetting		 setting_;
+
+        RAPSSession                  iSession;
+        TAPSInitSettings             iPlaySettings;
+        TAPSInitSettings             iRecSettings;
+
+        RMsgQueue<TAPSCommBuffer>    iReadQ;
+        RMsgQueue<TAPSCommBuffer>    iReadCommQ;
+        RMsgQueue<TAPSCommBuffer>    iWriteQ;
+        RMsgQueue<TAPSCommBuffer>    iWriteCommQ;
+
+        CQueueHandler		*iPlayCommHandler;
+        CQueueHandler		*iRecCommHandler;
+        CQueueHandler		*iRecHandler;
 };
 
 
-CPjAudioEngine* CPjAudioEngine::NewL(struct aps_stream *parent_strm,
-				     PjAudioCallback rec_cb,
-				     PjAudioCallback play_cb,
-				     void *user_data,
-				     const CPjAudioSetting &setting)
+CPjAudioEngine* CPjAudioEngine::NewL (struct aps_stream *parent_strm,
+                                      PjAudioCallback rec_cb,
+                                      PjAudioCallback play_cb,
+                                      void *user_data,
+                                      const CPjAudioSetting &setting)
 {
-    CPjAudioEngine* self = new (ELeave) CPjAudioEngine(parent_strm,
-						       rec_cb, play_cb,
-						       user_data,
-						       setting);
-    CleanupStack::PushL(self);
+    CPjAudioEngine* self = new (ELeave) CPjAudioEngine (parent_strm,
+            rec_cb, play_cb,
+            user_data,
+            setting);
+    CleanupStack::PushL (self);
     self->ConstructL();
-    CleanupStack::Pop(self);
+    CleanupStack::Pop (self);
     return self;
 }
 
-CPjAudioEngine::CPjAudioEngine(struct aps_stream *parent_strm,
-			       PjAudioCallback rec_cb,
-			       PjAudioCallback play_cb,
-			       void *user_data,
-			       const CPjAudioSetting &setting)
-      : MQueueHandlerObserver(rec_cb, play_cb, user_data),
-	state_(STATE_NULL),
-	parentStrm_(parent_strm),
-	setting_(setting),
-	iPlayCommHandler(0),
-	iRecCommHandler(0),
-	iRecHandler(0)
+CPjAudioEngine::CPjAudioEngine (struct aps_stream *parent_strm,
+                                PjAudioCallback rec_cb,
+                                PjAudioCallback play_cb,
+                                void *user_data,
+                                const CPjAudioSetting &setting)
+        : MQueueHandlerObserver (rec_cb, play_cb, user_data),
+        state_ (STATE_NULL),
+        parentStrm_ (parent_strm),
+        setting_ (setting),
+        iPlayCommHandler (0),
+        iRecCommHandler (0),
+        iRecHandler (0)
 {
 }
 
@@ -493,49 +509,53 @@ CPjAudioEngine::~CPjAudioEngine()
     // the client session.
     TTime start, now;
     enum { APS_CLOSE_WAIT_TIME = 200 }; /* in msecs */
-    
+
     start.UniversalTime();
+
     do {
-	pj_symbianos_poll(-1, APS_CLOSE_WAIT_TIME);
-	now.UniversalTime();
-    } while (now.MicroSecondsFrom(start) < APS_CLOSE_WAIT_TIME * 1000);
+        pj_symbianos_poll (-1, APS_CLOSE_WAIT_TIME);
+        now.UniversalTime();
+    } while (now.MicroSecondsFrom (start) < APS_CLOSE_WAIT_TIME * 1000);
 
     iSession.Close();
 
     if (state_ == STATE_READY) {
-	if (parentStrm_->param.dir != PJMEDIA_DIR_PLAYBACK) {
-	    iReadQ.Close();
-	    iReadCommQ.Close();
-	}
-	iWriteQ.Close();
-	iWriteCommQ.Close();
+        if (parentStrm_->param.dir != PJMEDIA_DIR_PLAYBACK) {
+            iReadQ.Close();
+            iReadCommQ.Close();
+        }
+
+        iWriteQ.Close();
+        iWriteCommQ.Close();
     }
-    
-    TRACE_((THIS_FILE, "Sound device destroyed"));
+
+    TRACE_ ( (THIS_FILE, "Sound device destroyed"));
 }
 
 TInt CPjAudioEngine::InitPlayL()
 {
-    TInt err = iSession.InitializePlayer(iPlaySettings);
+    TInt err = iSession.InitializePlayer (iPlaySettings);
+
     if (err != KErrNone) {
-	snd_perror("Failed to initialize player", err);
-	return err;
+        snd_perror ("Failed to initialize player", err);
+        return err;
     }
 
     // Open message queues for the output stream
     TBuf<128> buf2 = iPlaySettings.iGlobal;
-    buf2.Append(_L("PlayQueue"));
+    buf2.Append (_L ("PlayQueue"));
     TBuf<128> buf3 = iPlaySettings.iGlobal;
-    buf3.Append(_L("PlayCommQueue"));
+    buf3.Append (_L ("PlayCommQueue"));
 
-    while (iWriteQ.OpenGlobal(buf2))
-	User::After(10);
-    while (iWriteCommQ.OpenGlobal(buf3))
-	User::After(10);
+    while (iWriteQ.OpenGlobal (buf2))
+        User::After (10);
+
+    while (iWriteCommQ.OpenGlobal (buf3))
+        User::After (10);
 
     // Construct message queue handler
-    iPlayCommHandler = CQueueHandler::NewL(this, &iWriteCommQ, &iWriteQ,
-					   CQueueHandler::EPlayCommQueue);
+    iPlayCommHandler = CQueueHandler::NewL (this, &iWriteCommQ, &iWriteQ,
+                                            CQueueHandler::EPlayCommQueue);
 
     // Start observing APS callbacks on output stream message queue
     iPlayCommHandler->Start();
@@ -546,29 +566,31 @@ TInt CPjAudioEngine::InitPlayL()
 TInt CPjAudioEngine::InitRecL()
 {
     // Initialize input stream device
-    TInt err = iSession.InitializeRecorder(iRecSettings);
+    TInt err = iSession.InitializeRecorder (iRecSettings);
+
     if (err != KErrNone && err != KErrAlreadyExists) {
-	snd_perror("Failed to initialize recorder", err);
-	return err;
+        snd_perror ("Failed to initialize recorder", err);
+        return err;
     }
 
     TBuf<128> buf1 = iRecSettings.iGlobal;
-    buf1.Append(_L("RecordQueue"));
+    buf1.Append (_L ("RecordQueue"));
     TBuf<128> buf4 = iRecSettings.iGlobal;
-    buf4.Append(_L("RecordCommQueue"));
+    buf4.Append (_L ("RecordCommQueue"));
 
     // Must wait for APS thread to finish creating message queues
     // before we can open and use them.
-    while (iReadQ.OpenGlobal(buf1))
-	User::After(10);
-    while (iReadCommQ.OpenGlobal(buf4))
-	User::After(10);
+    while (iReadQ.OpenGlobal (buf1))
+        User::After (10);
+
+    while (iReadCommQ.OpenGlobal (buf4))
+        User::After (10);
 
     // Construct message queue handlers
-    iRecHandler = CQueueHandler::NewL(this, &iReadQ, NULL,
-				      CQueueHandler::ERecordQueue);
-    iRecCommHandler = CQueueHandler::NewL(this, &iReadCommQ, NULL,
-					  CQueueHandler::ERecordCommQueue);
+    iRecHandler = CQueueHandler::NewL (this, &iReadQ, NULL,
+                                       CQueueHandler::ERecordQueue);
+    iRecCommHandler = CQueueHandler::NewL (this, &iReadCommQ, NULL,
+                                           CQueueHandler::ERecordCommQueue);
 
     // Start observing APS callbacks from on input stream message queue
     iRecHandler->Start();
@@ -580,10 +602,10 @@ TInt CPjAudioEngine::InitRecL()
 TInt CPjAudioEngine::StartL()
 {
     if (state_ == STATE_READY)
-	return StartStreamL();
+        return StartStreamL();
+
+    PJ_ASSERT_RETURN (state_ == STATE_NULL, PJMEDIA_EAUD_INVOP);
 
-    PJ_ASSERT_RETURN(state_ == STATE_NULL, PJMEDIA_EAUD_INVOP);
-    
     // Even if only capturer are opened, playback thread of APS Server need
     // to be run(?). Since some messages will be delivered via play comm queue.
     state_ = STATE_INITIALIZING;
@@ -594,17 +616,17 @@ TInt CPjAudioEngine::StartL()
 void CPjAudioEngine::Stop()
 {
     if (state_ == STATE_STREAMING) {
-	iSession.Stop();
-	state_ = STATE_READY;
-	TRACE_((THIS_FILE, "Sound device stopped"));
+        iSession.Stop();
+        state_ = STATE_READY;
+        TRACE_ ( (THIS_FILE, "Sound device stopped"));
     } else if (state_ == STATE_INITIALIZING) {
-	// Initialization is on progress, so let's set the state to 
-	// STATE_PENDING_STOP to prevent it starting the stream.
-	state_ = STATE_PENDING_STOP;
-	
-	// Then wait until initialization done.
-	while (state_ != STATE_READY)
-	    pj_symbianos_poll(-1, 100);
+        // Initialization is on progress, so let's set the state to
+        // STATE_PENDING_STOP to prevent it starting the stream.
+        state_ = STATE_PENDING_STOP;
+
+        // Then wait until initialization done.
+        while (state_ != STATE_READY)
+            pj_symbianos_poll (-1, 100);
     }
 }
 
@@ -613,94 +635,95 @@ void CPjAudioEngine::ConstructL()
     // Recorder settings
     iRecSettings.iFourCC		= setting_.fourcc;
     iRecSettings.iGlobal		= APP_UID;
-    iRecSettings.iPriority		= TMdaPriority(100);
-    iRecSettings.iPreference		= TMdaPriorityPreference(0x05210001);
+    iRecSettings.iPriority		= TMdaPriority (100);
+    iRecSettings.iPreference		= TMdaPriorityPreference (0x05210001);
     iRecSettings.iSettings.iChannels	= EMMFMono;
     iRecSettings.iSettings.iSampleRate	= EMMFSampleRate8000Hz;
 
     // Player settings
     iPlaySettings.iFourCC		= setting_.fourcc;
     iPlaySettings.iGlobal		= APP_UID;
-    iPlaySettings.iPriority		= TMdaPriority(100);
-    iPlaySettings.iPreference		= TMdaPriorityPreference(0x05220001);
+    iPlaySettings.iPriority		= TMdaPriority (100);
+    iPlaySettings.iPreference		= TMdaPriorityPreference (0x05220001);
     iPlaySettings.iSettings.iChannels	= EMMFMono;
     iPlaySettings.iSettings.iSampleRate = EMMFSampleRate8000Hz;
     iPlaySettings.iSettings.iVolume	= 0;
 
-    User::LeaveIfError(iSession.Connect());
+    User::LeaveIfError (iSession.Connect());
 }
 
 TInt CPjAudioEngine::StartStreamL()
 {
-    pj_assert(state_==STATE_READY || state_==STATE_INITIALIZING); 
-    
-    iSession.SetCng(setting_.cng);
-    iSession.SetVadMode(setting_.vad);
-    iSession.SetPlc(setting_.plc);
-    iSession.SetEncoderMode(setting_.mode);
-    iSession.SetDecoderMode(setting_.mode);
-    iSession.ActivateLoudspeaker(setting_.loudspk);
+    pj_assert (state_==STATE_READY || state_==STATE_INITIALIZING);
+
+    iSession.SetCng (setting_.cng);
+    iSession.SetVadMode (setting_.vad);
+    iSession.SetPlc (setting_.plc);
+    iSession.SetEncoderMode (setting_.mode);
+    iSession.SetDecoderMode (setting_.mode);
+    iSession.ActivateLoudspeaker (setting_.loudspk);
 
     // Not only capture
     if (parentStrm_->param.dir != PJMEDIA_DIR_CAPTURE) {
-	iSession.Write();
-	TRACE_((THIS_FILE, "Player started"));
+        iSession.Write();
+        TRACE_ ( (THIS_FILE, "Player started"));
     }
 
     // Not only playback
     if (parentStrm_->param.dir != PJMEDIA_DIR_PLAYBACK) {
-	iSession.Read();
-	TRACE_((THIS_FILE, "Recorder started"));
+        iSession.Read();
+        TRACE_ ( (THIS_FILE, "Recorder started"));
     }
 
     state_ = STATE_STREAMING;
-    
+
     return 0;
 }
 
-void CPjAudioEngine::InputStreamInitialized(const TInt aStatus)
+void CPjAudioEngine::InputStreamInitialized (const TInt aStatus)
 {
-    TRACE_((THIS_FILE, "Recorder initialized, err=%d", aStatus));
+    TRACE_ ( (THIS_FILE, "Recorder initialized, err=%d", aStatus));
 
     if (aStatus == KErrNone) {
-	// Don't start the stream since Stop() has been requested. 
-	if (state_ != STATE_PENDING_STOP) {
-	    StartStreamL();
-	} else {
-	    state_ = STATE_READY;
-	}
+        // Don't start the stream since Stop() has been requested.
+        if (state_ != STATE_PENDING_STOP) {
+            StartStreamL();
+        } else {
+            state_ = STATE_READY;
+        }
     }
 }
 
-void CPjAudioEngine::OutputStreamInitialized(const TInt aStatus)
+void CPjAudioEngine::OutputStreamInitialized (const TInt aStatus)
 {
-    TRACE_((THIS_FILE, "Player initialized, err=%d", aStatus));
+    TRACE_ ( (THIS_FILE, "Player initialized, err=%d", aStatus));
 
     if (aStatus == KErrNone) {
-	if (parentStrm_->param.dir == PJMEDIA_DIR_PLAYBACK) {
-	    // Don't start the stream since Stop() has been requested.
-	    if (state_ != STATE_PENDING_STOP) {
-		StartStreamL();
-	    } else {
-		state_ = STATE_READY;
-	    }
-	} else
-	    InitRecL();
+        if (parentStrm_->param.dir == PJMEDIA_DIR_PLAYBACK) {
+            // Don't start the stream since Stop() has been requested.
+            if (state_ != STATE_PENDING_STOP) {
+                StartStreamL();
+            } else {
+                state_ = STATE_READY;
+            }
+        } else
+            InitRecL();
     }
 }
 
-void CPjAudioEngine::NotifyError(const TInt aError)
+void CPjAudioEngine::NotifyError (const TInt aError)
 {
-    snd_perror("Error from CQueueHandler", aError);
+    snd_perror ("Error from CQueueHandler", aError);
 }
 
-TInt CPjAudioEngine::ActivateSpeaker(TBool active)
+TInt CPjAudioEngine::ActivateSpeaker (TBool active)
 {
     if (state_ == STATE_READY || state_ == STATE_STREAMING) {
-        iSession.ActivateLoudspeaker(active);
-        TRACE_((THIS_FILE, "Loudspeaker turned %s", (active? "on":"off")));
-	return KErrNone;
+        iSession.ActivateLoudspeaker (active);
+        TRACE_ ( (THIS_FILE, "Loudspeaker turned %s", (active? "on":"off")));
+        return KErrNone;
     }
+
     return KErrNotReady;
 }
 
@@ -708,20 +731,20 @@ TInt CPjAudioEngine::ActivateSpeaker(TBool active)
  * Internal APS callbacks for PCM format
  */
 
-static void RecCbPcm(TAPSCommBuffer &buf, void *user_data)
+static void RecCbPcm (TAPSCommBuffer &buf, void *user_data)
 {
     struct aps_stream *strm = (struct aps_stream*) user_data;
 
     /* Buffer has to contain normal speech. */
-    pj_assert(buf.iBuffer[0] == 1 && buf.iBuffer[1] == 0);
+    pj_assert (buf.iBuffer[0] == 1 && buf.iBuffer[1] == 0);
 
     /* Detect the recorder G.711 frame size, player frame size will follow
      * this recorder frame size.
      */
     if (aps_g711_frame_len == 0) {
-	aps_g711_frame_len = buf.iBuffer.Length() < 160? 80 : 160;
-	TRACE_((THIS_FILE, "Detected APS G.711 frame size = %u samples",
-		aps_g711_frame_len));
+        aps_g711_frame_len = buf.iBuffer.Length() < 160? 80 : 160;
+        TRACE_ ( (THIS_FILE, "Detected APS G.711 frame size = %u samples",
+                  aps_g711_frame_len));
     }
 
     /* Decode APS buffer (coded in G.711) and put the PCM result into rec_buf.
@@ -730,67 +753,68 @@ static void RecCbPcm(TAPSCommBuffer &buf, void *user_data)
     unsigned samples_processed = 0;
 
     while (samples_processed < aps_g711_frame_len) {
-	unsigned samples_to_process;
-	unsigned samples_req;
-
-	samples_to_process = aps_g711_frame_len - samples_processed;
-	samples_req = (strm->param.samples_per_frame /
-		       strm->param.channel_count /
-		       strm->resample_factor) -
-		      strm->rec_buf_len;
-	if (samples_to_process > samples_req)
-	    samples_to_process = samples_req;
-
-	pjmedia_ulaw_decode(&strm->rec_buf[strm->rec_buf_len],
-			    buf.iBuffer.Ptr() + 2 + samples_processed,
-			    samples_to_process);
-
-	strm->rec_buf_len += samples_to_process;
-	samples_processed += samples_to_process;
-
-	/* Buffer is full, time to call parent callback */
-	if (strm->rec_buf_len == strm->param.samples_per_frame / 
-				 strm->param.channel_count /
-				 strm->resample_factor) 
-	{
-	    pjmedia_frame f;
-
-	    /* Need to resample clock rate? */
-	    if (strm->rec_resample) {
-		unsigned resampled = 0;
-		
-		while (resampled < strm->rec_buf_len) {
-		    pjmedia_resample_run(strm->rec_resample, 
-				&strm->rec_buf[resampled],
-				strm->pcm_buf + 
-				resampled * strm->resample_factor);
-		    resampled += 80;
-		}
-		f.buf = strm->pcm_buf;
-	    } else {
-		f.buf = strm->rec_buf;
-	    }
-
-	    /* Need to convert channel count? */
-	    if (strm->param.channel_count != 1) {
-		pjmedia_convert_channel_1ton((pj_int16_t*)f.buf,
-					     (pj_int16_t*)f.buf,
-					     strm->param.channel_count,
-					     strm->param.samples_per_frame /
-					     strm->param.channel_count,
-					     0);
-	    }
-
-	    /* Call parent callback */
-	    f.type = PJMEDIA_FRAME_TYPE_AUDIO;
-	    f.size = strm->param.samples_per_frame << 1;
-	    strm->rec_cb(strm->user_data, &f);
-	    strm->rec_buf_len = 0;
-	}
+        unsigned samples_to_process;
+        unsigned samples_req;
+
+        samples_to_process = aps_g711_frame_len - samples_processed;
+        samples_req = (strm->param.samples_per_frame /
+                       strm->param.channel_count /
+                       strm->resample_factor) -
+                      strm->rec_buf_len;
+
+        if (samples_to_process > samples_req)
+            samples_to_process = samples_req;
+
+        pjmedia_ulaw_decode (&strm->rec_buf[strm->rec_buf_len],
+                             buf.iBuffer.Ptr() + 2 + samples_processed,
+                             samples_to_process);
+
+        strm->rec_buf_len += samples_to_process;
+        samples_processed += samples_to_process;
+
+        /* Buffer is full, time to call parent callback */
+        if (strm->rec_buf_len == strm->param.samples_per_frame /
+                strm->param.channel_count /
+                strm->resample_factor) {
+            pjmedia_frame f;
+
+            /* Need to resample clock rate? */
+            if (strm->rec_resample) {
+                unsigned resampled = 0;
+
+                while (resampled < strm->rec_buf_len) {
+                    pjmedia_resample_run (strm->rec_resample,
+                                          &strm->rec_buf[resampled],
+                                          strm->pcm_buf +
+                                          resampled * strm->resample_factor);
+                    resampled += 80;
+                }
+
+                f.buf = strm->pcm_buf;
+            } else {
+                f.buf = strm->rec_buf;
+            }
+
+            /* Need to convert channel count? */
+            if (strm->param.channel_count != 1) {
+                pjmedia_convert_channel_1ton ( (pj_int16_t*) f.buf,
+                                               (pj_int16_t*) f.buf,
+                                               strm->param.channel_count,
+                                               strm->param.samples_per_frame /
+                                               strm->param.channel_count,
+                                               0);
+            }
+
+            /* Call parent callback */
+            f.type = PJMEDIA_FRAME_TYPE_AUDIO;
+            f.size = strm->param.samples_per_frame << 1;
+            strm->rec_cb (strm->user_data, &f);
+            strm->rec_buf_len = 0;
+        }
     }
 }
 
-static void PlayCbPcm(TAPSCommBuffer &buf, void *user_data)
+static void PlayCbPcm (TAPSCommBuffer &buf, void *user_data)
 {
     struct aps_stream *strm = (struct aps_stream*) user_data;
     unsigned g711_frame_len = aps_g711_frame_len;
@@ -799,79 +823,80 @@ static void PlayCbPcm(TAPSCommBuffer &buf, void *user_data)
     buf.iCommand = CQueueHandler::EAPSPlayData;
     buf.iStatus = 0;
     buf.iBuffer.Zero();
-    buf.iBuffer.Append(1);
-    buf.iBuffer.Append(0);
+    buf.iBuffer.Append (1);
+    buf.iBuffer.Append (0);
 
     /* Assume frame size is 10ms if frame size hasn't been known. */
     if (g711_frame_len == 0)
-	g711_frame_len = 80;
+        g711_frame_len = 80;
 
     /* Call parent stream callback to get PCM samples to play,
      * encode the PCM samples into G.711 and put it into APS buffer.
      */
     unsigned samples_processed = 0;
-    
+
     while (samples_processed < g711_frame_len) {
-	/* Need more samples to play, time to call parent callback */
-	if (strm->play_buf_len == 0) {
-	    pjmedia_frame f;
-	    unsigned samples_got;
-	    
-	    f.size = strm->param.samples_per_frame << 1;
-	    if (strm->play_resample || strm->param.channel_count != 1)
-		f.buf = strm->pcm_buf;
-	    else
-		f.buf = strm->play_buf;
-
-	    /* Call parent callback */
-	    strm->play_cb(strm->user_data, &f);
-	    if (f.type != PJMEDIA_FRAME_TYPE_AUDIO) {
-		pjmedia_zero_samples((pj_int16_t*)f.buf, 
-				     strm->param.samples_per_frame);
-	    }
-	    
-	    samples_got = strm->param.samples_per_frame / 
-			  strm->param.channel_count /
-			  strm->resample_factor;
-
-	    /* Need to convert channel count? */
-	    if (strm->param.channel_count != 1) {
-		pjmedia_convert_channel_nto1((pj_int16_t*)f.buf,
-					     (pj_int16_t*)f.buf,
-					     strm->param.channel_count,
-					     strm->param.samples_per_frame,
-					     PJ_FALSE,
-					     0);
-	    }
-
-	    /* Need to resample clock rate? */
-	    if (strm->play_resample) {
-		unsigned resampled = 0;
-		
-		while (resampled < samples_got) 
-		{
-		    pjmedia_resample_run(strm->play_resample, 
-				strm->pcm_buf + 
-				resampled * strm->resample_factor,
-				&strm->play_buf[resampled]);
-		    resampled += 80;
-		}
-	    }
-	    
-	    strm->play_buf_len = samples_got;
-	    strm->play_buf_start = 0;
-	}
-
-	unsigned tmp;
-
-	tmp = PJ_MIN(strm->play_buf_len, g711_frame_len - samples_processed);
-	pjmedia_ulaw_encode((pj_uint8_t*)&strm->play_buf[strm->play_buf_start],
-			    &strm->play_buf[strm->play_buf_start],
-			    tmp);
-	buf.iBuffer.Append((TUint8*)&strm->play_buf[strm->play_buf_start], tmp);
-	samples_processed += tmp;
-	strm->play_buf_len -= tmp;
-	strm->play_buf_start += tmp;
+        /* Need more samples to play, time to call parent callback */
+        if (strm->play_buf_len == 0) {
+            pjmedia_frame f;
+            unsigned samples_got;
+
+            f.size = strm->param.samples_per_frame << 1;
+
+            if (strm->play_resample || strm->param.channel_count != 1)
+                f.buf = strm->pcm_buf;
+            else
+                f.buf = strm->play_buf;
+
+            /* Call parent callback */
+            strm->play_cb (strm->user_data, &f);
+
+            if (f.type != PJMEDIA_FRAME_TYPE_AUDIO) {
+                pjmedia_zero_samples ( (pj_int16_t*) f.buf,
+                                       strm->param.samples_per_frame);
+            }
+
+            samples_got = strm->param.samples_per_frame /
+                          strm->param.channel_count /
+                          strm->resample_factor;
+
+            /* Need to convert channel count? */
+            if (strm->param.channel_count != 1) {
+                pjmedia_convert_channel_nto1 ( (pj_int16_t*) f.buf,
+                                               (pj_int16_t*) f.buf,
+                                               strm->param.channel_count,
+                                               strm->param.samples_per_frame,
+                                               PJ_FALSE,
+                                               0);
+            }
+
+            /* Need to resample clock rate? */
+            if (strm->play_resample) {
+                unsigned resampled = 0;
+
+                while (resampled < samples_got) {
+                    pjmedia_resample_run (strm->play_resample,
+                                          strm->pcm_buf +
+                                          resampled * strm->resample_factor,
+                                          &strm->play_buf[resampled]);
+                    resampled += 80;
+                }
+            }
+
+            strm->play_buf_len = samples_got;
+            strm->play_buf_start = 0;
+        }
+
+        unsigned tmp;
+
+        tmp = PJ_MIN (strm->play_buf_len, g711_frame_len - samples_processed);
+        pjmedia_ulaw_encode ( (pj_uint8_t*) &strm->play_buf[strm->play_buf_start],
+                              &strm->play_buf[strm->play_buf_start],
+                              tmp);
+        buf.iBuffer.Append ( (TUint8*) &strm->play_buf[strm->play_buf_start], tmp);
+        samples_processed += tmp;
+        strm->play_buf_len -= tmp;
+        strm->play_buf_start += tmp;
     }
 }
 
@@ -879,130 +904,127 @@ static void PlayCbPcm(TAPSCommBuffer &buf, void *user_data)
  * Internal APS callbacks for non-PCM format
  */
 
-static void RecCb(TAPSCommBuffer &buf, void *user_data)
+static void RecCb (TAPSCommBuffer &buf, void *user_data)
 {
     struct aps_stream *strm = (struct aps_stream*) user_data;
     pjmedia_frame_ext *frame = (pjmedia_frame_ext*) strm->rec_buf;
-    
-    switch(strm->param.ext_fmt.id) {
-    case PJMEDIA_FORMAT_AMR:
-	{
-	    const pj_uint8_t *p = (const pj_uint8_t*)buf.iBuffer.Ptr() + 1;
-	    unsigned len = buf.iBuffer.Length() - 1;
-	    
-	    pjmedia_frame_ext_append_subframe(frame, p, len << 3, 160);
-	    if (frame->samples_cnt == strm->param.samples_per_frame) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->rec_cb(strm->user_data, (pjmedia_frame*)frame);
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_G729:
-	{
-	    /* Check if we got a normal or SID frame. */
-	    if (buf.iBuffer[0] != 0 || buf.iBuffer[1] != 0) {
-		enum { NORMAL_LEN = 22, SID_LEN = 8 };
-		TBitStream *bitstream = (TBitStream*)strm->strm_data;
-		unsigned src_len = buf.iBuffer.Length()- 2;
-		
-		pj_assert(src_len == NORMAL_LEN || src_len == SID_LEN);
-
-		const TDesC8& p = bitstream->CompressG729Frame(
-					    buf.iBuffer.Right(src_len), 
-					    src_len == SID_LEN);
-		
-		pjmedia_frame_ext_append_subframe(frame, p.Ptr(), 
-						  p.Length() << 3, 80);
-	    } else { /* We got null frame. */
-		pjmedia_frame_ext_append_subframe(frame, NULL, 0, 80);
-	    }
-	    
-	    if (frame->samples_cnt == strm->param.samples_per_frame) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->rec_cb(strm->user_data, (pjmedia_frame*)frame);
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-
-    case PJMEDIA_FORMAT_ILBC:
-	{
-	    unsigned samples_got;
-	    
-	    samples_got = strm->param.ext_fmt.bitrate == 15200? 160 : 240;
-	    
-	    /* Check if we got a normal frame. */
-	    if (buf.iBuffer[0] == 1 && buf.iBuffer[1] == 0) {
-		const pj_uint8_t *p = (const pj_uint8_t*)buf.iBuffer.Ptr() + 2;
-		unsigned len = buf.iBuffer.Length() - 2;
-		
-		pjmedia_frame_ext_append_subframe(frame, p, len << 3,
-						  samples_got);
-	    } else { /* We got null frame. */
-		pjmedia_frame_ext_append_subframe(frame, NULL, 0, samples_got);
-	    }
-	    
-	    if (frame->samples_cnt == strm->param.samples_per_frame) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->rec_cb(strm->user_data, (pjmedia_frame*)frame);
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_PCMU:
-    case PJMEDIA_FORMAT_PCMA:
-	{
-	    unsigned samples_processed = 0;
-	    
-	    /* Make sure it is normal frame. */
-	    pj_assert(buf.iBuffer[0] == 1 && buf.iBuffer[1] == 0);
-
-	    /* Detect the recorder G.711 frame size, player frame size will 
-	     * follow this recorder frame size.
-	     */
-	    if (aps_g711_frame_len == 0) {
-		aps_g711_frame_len = buf.iBuffer.Length() < 160? 80 : 160;
-		TRACE_((THIS_FILE, "Detected APS G.711 frame size = %u samples",
-			aps_g711_frame_len));
-	    }
-	    
-	    /* Convert APS buffer format into pjmedia_frame_ext. Whenever 
-	     * samples count in the frame is equal to stream's samples per 
-	     * frame, call parent stream callback.
-	     */
-	    while (samples_processed < aps_g711_frame_len) {
-		unsigned tmp;
-		const pj_uint8_t *pb = (const pj_uint8_t*)buf.iBuffer.Ptr() +
-				       2 + samples_processed;
-    
-		tmp = PJ_MIN(strm->param.samples_per_frame - frame->samples_cnt,
-			     aps_g711_frame_len - samples_processed);
-		
-		pjmedia_frame_ext_append_subframe(frame, pb, tmp << 3, tmp);
-		samples_processed += tmp;
-    
-		if (frame->samples_cnt == strm->param.samples_per_frame) {
-		    frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		    strm->rec_cb(strm->user_data, (pjmedia_frame*)frame);
-		    frame->samples_cnt = 0;
-		    frame->subframe_cnt = 0;
-		}
-	    }
-	}
-	break;
-	
-    default:
-	break;
+
+    switch (strm->param.ext_fmt.id) {
+        case PJMEDIA_FORMAT_AMR: {
+            const pj_uint8_t *p = (const pj_uint8_t*) buf.iBuffer.Ptr() + 1;
+            unsigned len = buf.iBuffer.Length() - 1;
+
+            pjmedia_frame_ext_append_subframe (frame, p, len << 3, 160);
+
+            if (frame->samples_cnt == strm->param.samples_per_frame) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->rec_cb (strm->user_data, (pjmedia_frame*) frame);
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_G729: {
+            /* Check if we got a normal or SID frame. */
+            if (buf.iBuffer[0] != 0 || buf.iBuffer[1] != 0) {
+                enum { NORMAL_LEN = 22, SID_LEN = 8 };
+                TBitStream *bitstream = (TBitStream*) strm->strm_data;
+                unsigned src_len = buf.iBuffer.Length()- 2;
+
+                pj_assert (src_len == NORMAL_LEN || src_len == SID_LEN);
+
+                const TDesC8& p = bitstream->CompressG729Frame (
+                                      buf.iBuffer.Right (src_len),
+                                      src_len == SID_LEN);
+
+                pjmedia_frame_ext_append_subframe (frame, p.Ptr(),
+                                                   p.Length() << 3, 80);
+            } else { /* We got null frame. */
+                pjmedia_frame_ext_append_subframe (frame, NULL, 0, 80);
+            }
+
+            if (frame->samples_cnt == strm->param.samples_per_frame) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->rec_cb (strm->user_data, (pjmedia_frame*) frame);
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_ILBC: {
+            unsigned samples_got;
+
+            samples_got = strm->param.ext_fmt.bitrate == 15200? 160 : 240;
+
+            /* Check if we got a normal frame. */
+            if (buf.iBuffer[0] == 1 && buf.iBuffer[1] == 0) {
+                const pj_uint8_t *p = (const pj_uint8_t*) buf.iBuffer.Ptr() + 2;
+                unsigned len = buf.iBuffer.Length() - 2;
+
+                pjmedia_frame_ext_append_subframe (frame, p, len << 3,
+                                                   samples_got);
+            } else { /* We got null frame. */
+                pjmedia_frame_ext_append_subframe (frame, NULL, 0, samples_got);
+            }
+
+            if (frame->samples_cnt == strm->param.samples_per_frame) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->rec_cb (strm->user_data, (pjmedia_frame*) frame);
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_PCMU:
+        case PJMEDIA_FORMAT_PCMA: {
+            unsigned samples_processed = 0;
+
+            /* Make sure it is normal frame. */
+            pj_assert (buf.iBuffer[0] == 1 && buf.iBuffer[1] == 0);
+
+            /* Detect the recorder G.711 frame size, player frame size will
+             * follow this recorder frame size.
+             */
+            if (aps_g711_frame_len == 0) {
+                aps_g711_frame_len = buf.iBuffer.Length() < 160? 80 : 160;
+                TRACE_ ( (THIS_FILE, "Detected APS G.711 frame size = %u samples",
+                          aps_g711_frame_len));
+            }
+
+            /* Convert APS buffer format into pjmedia_frame_ext. Whenever
+             * samples count in the frame is equal to stream's samples per
+             * frame, call parent stream callback.
+             */
+            while (samples_processed < aps_g711_frame_len) {
+                unsigned tmp;
+                const pj_uint8_t *pb = (const pj_uint8_t*) buf.iBuffer.Ptr() +
+                                       2 + samples_processed;
+
+                tmp = PJ_MIN (strm->param.samples_per_frame - frame->samples_cnt,
+                              aps_g711_frame_len - samples_processed);
+
+                pjmedia_frame_ext_append_subframe (frame, pb, tmp << 3, tmp);
+                samples_processed += tmp;
+
+                if (frame->samples_cnt == strm->param.samples_per_frame) {
+                    frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                    strm->rec_cb (strm->user_data, (pjmedia_frame*) frame);
+                    frame->samples_cnt = 0;
+                    frame->subframe_cnt = 0;
+                }
+            }
+        }
+        break;
+
+        default:
+            break;
     }
 }
 
-static void PlayCb(TAPSCommBuffer &buf, void *user_data)
+static void PlayCb (TAPSCommBuffer &buf, void *user_data)
 {
     struct aps_stream *strm = (struct aps_stream*) user_data;
     pjmedia_frame_ext *frame = (pjmedia_frame_ext*) strm->play_buf;
@@ -1012,202 +1034,202 @@ static void PlayCb(TAPSCommBuffer &buf, void *user_data)
     buf.iStatus = 0;
     buf.iBuffer.Zero();
 
-    switch(strm->param.ext_fmt.id) {
-    case PJMEDIA_FORMAT_AMR:
-	{
-	    if (frame->samples_cnt == 0) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->play_cb(strm->user_data, (pjmedia_frame*)frame);
-		pj_assert(frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
-			  frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
-	    }
-
-	    if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) { 
-		pjmedia_frame_ext_subframe *sf;
-		unsigned samples_cnt;
-		
-		sf = pjmedia_frame_ext_get_subframe(frame, 0);
-		samples_cnt = frame->samples_cnt / frame->subframe_cnt;
-		
-		if (sf->data && sf->bitlen) {
-		    /* AMR header for APS is one byte, the format (may be!):
-		     * 0xxxxy00, where xxxx:frame type, y:not sure. 
-		     */
-		    unsigned len = (sf->bitlen+7)>>3;
-		    enum {SID_FT = 8 };
-		    pj_uint8_t amr_header = 4, ft = SID_FT;
-
-		    if (len >= pjmedia_codec_amrnb_framelen[0])
-			ft = pjmedia_codec_amr_get_mode2(PJ_TRUE, len);
-		    
-		    amr_header |= ft << 3;
-		    buf.iBuffer.Append(amr_header);
-		    
-		    buf.iBuffer.Append((TUint8*)sf->data, len);
-		} else {
-		    buf.iBuffer.Append(0);
-		}
-
-		pjmedia_frame_ext_pop_subframes(frame, 1);
-	    
-	    } else { /* PJMEDIA_FRAME_TYPE_NONE */
-		buf.iBuffer.Append(0);
-		
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_G729:
-	{
-	    if (frame->samples_cnt == 0) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->play_cb(strm->user_data, (pjmedia_frame*)frame);
-		pj_assert(frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
-			  frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
-	    }
-
-	    if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) { 
-		pjmedia_frame_ext_subframe *sf;
-		unsigned samples_cnt;
-		
-		sf = pjmedia_frame_ext_get_subframe(frame, 0);
-		samples_cnt = frame->samples_cnt / frame->subframe_cnt;
-		
-		if (sf->data && sf->bitlen) {
-		    enum { NORMAL_LEN = 10, SID_LEN = 2 };
-		    pj_bool_t sid_frame = ((sf->bitlen >> 3) == SID_LEN);
-		    TBitStream *bitstream = (TBitStream*)strm->strm_data;
-		    const TPtrC8 src(sf->data, sf->bitlen>>3);
-		    const TDesC8 &dst = bitstream->ExpandG729Frame(src,
-								   sid_frame); 
-		    if (sid_frame) {
-			buf.iBuffer.Append(2);
-			buf.iBuffer.Append(0);
-		    } else {
-			buf.iBuffer.Append(1);
-			buf.iBuffer.Append(0);
-		    }
-		    buf.iBuffer.Append(dst);
-		} else {
-		    buf.iBuffer.Append(2);
-		    buf.iBuffer.Append(0);
-		    buf.iBuffer.AppendFill(0, 22);
-		}
-
-		pjmedia_frame_ext_pop_subframes(frame, 1);
-	    
-	    } else { /* PJMEDIA_FRAME_TYPE_NONE */
-	        buf.iBuffer.Append(2);
-	        buf.iBuffer.Append(0);
-	        buf.iBuffer.AppendFill(0, 22);
-		
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_ILBC:
-	{
-	    if (frame->samples_cnt == 0) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->play_cb(strm->user_data, (pjmedia_frame*)frame);
-		pj_assert(frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
-			  frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
-	    }
-
-	    if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) { 
-		pjmedia_frame_ext_subframe *sf;
-		unsigned samples_cnt;
-		
-		sf = pjmedia_frame_ext_get_subframe(frame, 0);
-		samples_cnt = frame->samples_cnt / frame->subframe_cnt;
-		
-		pj_assert((strm->param.ext_fmt.bitrate == 15200 && 
-			   samples_cnt == 160) ||
-			  (strm->param.ext_fmt.bitrate != 15200 &&
-			   samples_cnt == 240));
-		
-		if (sf->data && sf->bitlen) {
-		    buf.iBuffer.Append(1);
-		    buf.iBuffer.Append(0);
-		    buf.iBuffer.Append((TUint8*)sf->data, sf->bitlen>>3);
-		} else {
-		    buf.iBuffer.Append(0);
-		    buf.iBuffer.Append(0);
-		}
-
-		pjmedia_frame_ext_pop_subframes(frame, 1);
-	    
-	    } else { /* PJMEDIA_FRAME_TYPE_NONE */
-		buf.iBuffer.Append(0);
-		buf.iBuffer.Append(0);
-		
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_PCMU:
-    case PJMEDIA_FORMAT_PCMA:
-	{
-	    unsigned samples_ready = 0;
-	    unsigned samples_req = aps_g711_frame_len;
-	    
-	    /* Assume frame size is 10ms if frame size hasn't been known. */
-	    if (samples_req == 0)
-		samples_req = 80;
-	    
-	    buf.iBuffer.Append(1);
-	    buf.iBuffer.Append(0);
-	    
-	    /* Call parent stream callback to get samples to play. */
-	    while (samples_ready < samples_req) {
-		if (frame->samples_cnt == 0) {
-		    frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		    strm->play_cb(strm->user_data, (pjmedia_frame*)frame);
-		    pj_assert(frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
-			      frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
-		}
-    
-		if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) { 
-		    pjmedia_frame_ext_subframe *sf;
-		    unsigned samples_cnt;
-		    
-		    sf = pjmedia_frame_ext_get_subframe(frame, 0);
-		    samples_cnt = frame->samples_cnt / frame->subframe_cnt;
-		    if (sf->data && sf->bitlen) {
-			buf.iBuffer.Append((TUint8*)sf->data, sf->bitlen>>3);
-		    } else {
-			pj_uint8_t silc;
-			silc = (strm->param.ext_fmt.id==PJMEDIA_FORMAT_PCMU)?
-				pjmedia_linear2ulaw(0) : pjmedia_linear2alaw(0);
-			buf.iBuffer.AppendFill(silc, samples_cnt);
-		    }
-		    samples_ready += samples_cnt;
-		    
-		    pjmedia_frame_ext_pop_subframes(frame, 1);
-		
-		} else { /* PJMEDIA_FRAME_TYPE_NONE */
-		    pj_uint8_t silc;
-		    
-		    silc = (strm->param.ext_fmt.id==PJMEDIA_FORMAT_PCMU)?
-			    pjmedia_linear2ulaw(0) : pjmedia_linear2alaw(0);
-		    buf.iBuffer.AppendFill(silc, samples_req - samples_ready);
-
-		    samples_ready = samples_req;
-		    frame->samples_cnt = 0;
-		    frame->subframe_cnt = 0;
-		}
-	    }
-	}
-	break;
-	
-    default:
-	break;
+    switch (strm->param.ext_fmt.id) {
+        case PJMEDIA_FORMAT_AMR: {
+            if (frame->samples_cnt == 0) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->play_cb (strm->user_data, (pjmedia_frame*) frame);
+                pj_assert (frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
+                           frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
+            }
+
+            if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) {
+                pjmedia_frame_ext_subframe *sf;
+                unsigned samples_cnt;
+
+                sf = pjmedia_frame_ext_get_subframe (frame, 0);
+                samples_cnt = frame->samples_cnt / frame->subframe_cnt;
+
+                if (sf->data && sf->bitlen) {
+                    /* AMR header for APS is one byte, the format (may be!):
+                     * 0xxxxy00, where xxxx:frame type, y:not sure.
+                     */
+                    unsigned len = (sf->bitlen+7) >>3;
+                    enum {SID_FT = 8 };
+                    pj_uint8_t amr_header = 4, ft = SID_FT;
+
+                    if (len >= pjmedia_codec_amrnb_framelen[0])
+                        ft = pjmedia_codec_amr_get_mode2 (PJ_TRUE, len);
+
+                    amr_header |= ft << 3;
+                    buf.iBuffer.Append (amr_header);
+
+                    buf.iBuffer.Append ( (TUint8*) sf->data, len);
+                } else {
+                    buf.iBuffer.Append (0);
+                }
+
+                pjmedia_frame_ext_pop_subframes (frame, 1);
+
+            } else { /* PJMEDIA_FRAME_TYPE_NONE */
+                buf.iBuffer.Append (0);
+
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_G729: {
+            if (frame->samples_cnt == 0) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->play_cb (strm->user_data, (pjmedia_frame*) frame);
+                pj_assert (frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
+                           frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
+            }
+
+            if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) {
+                pjmedia_frame_ext_subframe *sf;
+                unsigned samples_cnt;
+
+                sf = pjmedia_frame_ext_get_subframe (frame, 0);
+                samples_cnt = frame->samples_cnt / frame->subframe_cnt;
+
+                if (sf->data && sf->bitlen) {
+                    enum { NORMAL_LEN = 10, SID_LEN = 2 };
+                    pj_bool_t sid_frame = ( (sf->bitlen >> 3) == SID_LEN);
+                    TBitStream *bitstream = (TBitStream*) strm->strm_data;
+                    const TPtrC8 src (sf->data, sf->bitlen>>3);
+                    const TDesC8 &dst = bitstream->ExpandG729Frame (src,
+                                        sid_frame);
+
+                    if (sid_frame) {
+                        buf.iBuffer.Append (2);
+                        buf.iBuffer.Append (0);
+                    } else {
+                        buf.iBuffer.Append (1);
+                        buf.iBuffer.Append (0);
+                    }
+
+                    buf.iBuffer.Append (dst);
+                } else {
+                    buf.iBuffer.Append (2);
+                    buf.iBuffer.Append (0);
+                    buf.iBuffer.AppendFill (0, 22);
+                }
+
+                pjmedia_frame_ext_pop_subframes (frame, 1);
+
+            } else { /* PJMEDIA_FRAME_TYPE_NONE */
+                buf.iBuffer.Append (2);
+                buf.iBuffer.Append (0);
+                buf.iBuffer.AppendFill (0, 22);
+
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_ILBC: {
+            if (frame->samples_cnt == 0) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->play_cb (strm->user_data, (pjmedia_frame*) frame);
+                pj_assert (frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
+                           frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
+            }
+
+            if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) {
+                pjmedia_frame_ext_subframe *sf;
+                unsigned samples_cnt;
+
+                sf = pjmedia_frame_ext_get_subframe (frame, 0);
+                samples_cnt = frame->samples_cnt / frame->subframe_cnt;
+
+                pj_assert ( (strm->param.ext_fmt.bitrate == 15200 &&
+                             samples_cnt == 160) ||
+                            (strm->param.ext_fmt.bitrate != 15200 &&
+                             samples_cnt == 240));
+
+                if (sf->data && sf->bitlen) {
+                    buf.iBuffer.Append (1);
+                    buf.iBuffer.Append (0);
+                    buf.iBuffer.Append ( (TUint8*) sf->data, sf->bitlen>>3);
+                } else {
+                    buf.iBuffer.Append (0);
+                    buf.iBuffer.Append (0);
+                }
+
+                pjmedia_frame_ext_pop_subframes (frame, 1);
+
+            } else { /* PJMEDIA_FRAME_TYPE_NONE */
+                buf.iBuffer.Append (0);
+                buf.iBuffer.Append (0);
+
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_PCMU:
+        case PJMEDIA_FORMAT_PCMA: {
+            unsigned samples_ready = 0;
+            unsigned samples_req = aps_g711_frame_len;
+
+            /* Assume frame size is 10ms if frame size hasn't been known. */
+            if (samples_req == 0)
+                samples_req = 80;
+
+            buf.iBuffer.Append (1);
+            buf.iBuffer.Append (0);
+
+            /* Call parent stream callback to get samples to play. */
+            while (samples_ready < samples_req) {
+                if (frame->samples_cnt == 0) {
+                    frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                    strm->play_cb (strm->user_data, (pjmedia_frame*) frame);
+                    pj_assert (frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
+                               frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
+                }
+
+                if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) {
+                    pjmedia_frame_ext_subframe *sf;
+                    unsigned samples_cnt;
+
+                    sf = pjmedia_frame_ext_get_subframe (frame, 0);
+                    samples_cnt = frame->samples_cnt / frame->subframe_cnt;
+
+                    if (sf->data && sf->bitlen) {
+                        buf.iBuffer.Append ( (TUint8*) sf->data, sf->bitlen>>3);
+                    } else {
+                        pj_uint8_t silc;
+                        silc = (strm->param.ext_fmt.id==PJMEDIA_FORMAT_PCMU) ?
+                               pjmedia_linear2ulaw (0) : pjmedia_linear2alaw (0);
+                        buf.iBuffer.AppendFill (silc, samples_cnt);
+                    }
+
+                    samples_ready += samples_cnt;
+
+                    pjmedia_frame_ext_pop_subframes (frame, 1);
+
+                } else { /* PJMEDIA_FRAME_TYPE_NONE */
+                    pj_uint8_t silc;
+
+                    silc = (strm->param.ext_fmt.id==PJMEDIA_FORMAT_PCMU) ?
+                           pjmedia_linear2ulaw (0) : pjmedia_linear2alaw (0);
+                    buf.iBuffer.AppendFill (silc, samples_req - samples_ready);
+
+                    samples_ready = samples_req;
+                    frame->samples_cnt = 0;
+                    frame->subframe_cnt = 0;
+                }
+            }
+        }
+        break;
+
+        default:
+            break;
     }
 }
 
@@ -1220,19 +1242,19 @@ static void PlayCb(TAPSCommBuffer &buf, void *user_data)
  * C compatible declaration of APS factory.
  */
 PJ_BEGIN_DECL
-PJ_DECL(pjmedia_aud_dev_factory*) pjmedia_aps_factory(pj_pool_factory *pf);
+PJ_DECL (pjmedia_aud_dev_factory*) pjmedia_aps_factory (pj_pool_factory *pf);
 PJ_END_DECL
 
 /*
  * Init APS audio driver.
  */
-PJ_DEF(pjmedia_aud_dev_factory*) pjmedia_aps_factory(pj_pool_factory *pf)
+PJ_DEF (pjmedia_aud_dev_factory*) pjmedia_aps_factory (pj_pool_factory *pf)
 {
     struct aps_factory *f;
     pj_pool_t *pool;
 
-    pool = pj_pool_create(pf, "APS", 1000, 1000, NULL);
-    f = PJ_POOL_ZALLOC_T(pool, struct aps_factory);
+    pool = pj_pool_create (pf, "APS", 1000, 1000, NULL);
+    f = PJ_POOL_ZALLOC_T (pool, struct aps_factory);
     f->pf = pf;
     f->pool = pool;
     f->base.op = &factory_op;
@@ -1241,20 +1263,20 @@ PJ_DEF(pjmedia_aud_dev_factory*) pjmedia_aps_factory(pj_pool_factory *pf)
 }
 
 /* API: init factory */
-static pj_status_t factory_init(pjmedia_aud_dev_factory *f)
+static pj_status_t factory_init (pjmedia_aud_dev_factory *f)
 {
-    struct aps_factory *af = (struct aps_factory*)f;
+    struct aps_factory *af = (struct aps_factory*) f;
 
-    pj_ansi_strcpy(af->dev_info.name, "S60 APS");
+    pj_ansi_strcpy (af->dev_info.name, "S60 APS");
     af->dev_info.default_samples_per_sec = 8000;
     af->dev_info.caps = PJMEDIA_AUD_DEV_CAP_EXT_FORMAT |
-			//PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING |
-			PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING |
-			PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE |
-			PJMEDIA_AUD_DEV_CAP_VAD |
-			PJMEDIA_AUD_DEV_CAP_CNG;
-    af->dev_info.routes = PJMEDIA_AUD_DEV_ROUTE_EARPIECE | 
-			  PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
+                        //PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING |
+                        PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING |
+                        PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE |
+                        PJMEDIA_AUD_DEV_CAP_VAD |
+                        PJMEDIA_AUD_DEV_CAP_CNG;
+    af->dev_info.routes = PJMEDIA_AUD_DEV_ROUTE_EARPIECE |
+                          PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
     af->dev_info.input_count = 1;
     af->dev_info.output_count = 1;
 
@@ -1279,57 +1301,57 @@ static pj_status_t factory_init(pjmedia_aud_dev_factory *f)
     af->dev_info.ext_fmt[4].id = PJMEDIA_FORMAT_PCMA;
     af->dev_info.ext_fmt[4].bitrate = 64000;
     af->dev_info.ext_fmt[4].vad = PJ_FALSE;
-    
-    PJ_LOG(4, (THIS_FILE, "APS initialized"));
+
+    PJ_LOG (4, (THIS_FILE, "APS initialized"));
 
     return PJ_SUCCESS;
 }
 
 /* API: destroy factory */
-static pj_status_t factory_destroy(pjmedia_aud_dev_factory *f)
+static pj_status_t factory_destroy (pjmedia_aud_dev_factory *f)
 {
-    struct aps_factory *af = (struct aps_factory*)f;
+    struct aps_factory *af = (struct aps_factory*) f;
     pj_pool_t *pool = af->pool;
 
     af->pool = NULL;
-    pj_pool_release(pool);
+    pj_pool_release (pool);
+
+    PJ_LOG (4, (THIS_FILE, "APS destroyed"));
 
-    PJ_LOG(4, (THIS_FILE, "APS destroyed"));
-    
     return PJ_SUCCESS;
 }
 
 /* API: get number of devices */
-static unsigned factory_get_dev_count(pjmedia_aud_dev_factory *f)
+static unsigned factory_get_dev_count (pjmedia_aud_dev_factory *f)
 {
-    PJ_UNUSED_ARG(f);
+    PJ_UNUSED_ARG (f);
     return 1;
 }
 
 /* API: get device info */
-static pj_status_t factory_get_dev_info(pjmedia_aud_dev_factory *f, 
-					unsigned index,
-					pjmedia_aud_dev_info *info)
+static pj_status_t factory_get_dev_info (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_dev_info *info)
 {
-    struct aps_factory *af = (struct aps_factory*)f;
+    struct aps_factory *af = (struct aps_factory*) f;
 
-    PJ_ASSERT_RETURN(index == 0, PJMEDIA_EAUD_INVDEV);
+    PJ_ASSERT_RETURN (index == 0, PJMEDIA_EAUD_INVDEV);
 
-    pj_memcpy(info, &af->dev_info, sizeof(*info));
+    pj_memcpy (info, &af->dev_info, sizeof (*info));
 
     return PJ_SUCCESS;
 }
 
 /* API: create default device parameter */
-static pj_status_t factory_default_param(pjmedia_aud_dev_factory *f,
-					 unsigned index,
-					 pjmedia_aud_param *param)
+static pj_status_t factory_default_param (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_param *param)
 {
-    struct aps_factory *af = (struct aps_factory*)f;
+    struct aps_factory *af = (struct aps_factory*) f;
 
-    PJ_ASSERT_RETURN(index == 0, PJMEDIA_EAUD_INVDEV);
+    PJ_ASSERT_RETURN (index == 0, PJMEDIA_EAUD_INVDEV);
 
-    pj_bzero(param, sizeof(*param));
+    pj_bzero (param, sizeof (*param));
     param->dir = PJMEDIA_DIR_CAPTURE_PLAYBACK;
     param->rec_id = index;
     param->play_id = index;
@@ -1345,14 +1367,14 @@ static pj_status_t factory_default_param(pjmedia_aud_dev_factory *f,
 
 
 /* API: create stream */
-static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
-					 const pjmedia_aud_param *param,
-					 pjmedia_aud_rec_cb rec_cb,
-					 pjmedia_aud_play_cb play_cb,
-					 void *user_data,
-					 pjmedia_aud_stream **p_aud_strm)
+static pj_status_t factory_create_stream (pjmedia_aud_dev_factory *f,
+        const pjmedia_aud_param *param,
+        pjmedia_aud_rec_cb rec_cb,
+        pjmedia_aud_play_cb play_cb,
+        void *user_data,
+        pjmedia_aud_stream **p_aud_strm)
 {
-    struct aps_factory *af = (struct aps_factory*)f;
+    struct aps_factory *af = (struct aps_factory*) f;
     pj_pool_t *pool;
     struct aps_stream *strm;
 
@@ -1361,103 +1383,97 @@ static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
     PjAudioCallback aps_play_cb;
 
     /* Can only support 16bits per sample */
-    PJ_ASSERT_RETURN(param->bits_per_sample == BITS_PER_SAMPLE, PJ_EINVAL);
+    PJ_ASSERT_RETURN (param->bits_per_sample == BITS_PER_SAMPLE, PJ_EINVAL);
 
     /* Supported clock rates:
-     * - for non-PCM format: 8kHz  
-     * - for PCM format: 8kHz and 16kHz  
+     * - for non-PCM format: 8kHz
+     * - for PCM format: 8kHz and 16kHz
      */
-    PJ_ASSERT_RETURN(param->clock_rate == 8000 ||
-		     (param->clock_rate == 16000 && 
-		      param->ext_fmt.id == PJMEDIA_FORMAT_L16),
-		     PJ_EINVAL);
+    PJ_ASSERT_RETURN (param->clock_rate == 8000 ||
+                      (param->clock_rate == 16000 &&
+                       param->ext_fmt.id == PJMEDIA_FORMAT_L16),
+                      PJ_EINVAL);
 
     /* Supported channels number:
      * - for non-PCM format: mono
-     * - for PCM format: mono and stereo  
+     * - for PCM format: mono and stereo
      */
-    PJ_ASSERT_RETURN(param->channel_count == 1 || 
-		     (param->channel_count == 2 &&
-		      param->ext_fmt.id == PJMEDIA_FORMAT_L16),
-		     PJ_EINVAL);
+    PJ_ASSERT_RETURN (param->channel_count == 1 ||
+                      (param->channel_count == 2 &&
+                       param->ext_fmt.id == PJMEDIA_FORMAT_L16),
+                      PJ_EINVAL);
 
     /* Create and Initialize stream descriptor */
-    pool = pj_pool_create(af->pf, "aps-dev", 1000, 1000, NULL);
-    PJ_ASSERT_RETURN(pool, PJ_ENOMEM);
+    pool = pj_pool_create (af->pf, "aps-dev", 1000, 1000, NULL);
+    PJ_ASSERT_RETURN (pool, PJ_ENOMEM);
 
-    strm = PJ_POOL_ZALLOC_T(pool, struct aps_stream);
+    strm = PJ_POOL_ZALLOC_T (pool, struct aps_stream);
     strm->pool = pool;
     strm->param = *param;
 
     if (strm->param.flags & PJMEDIA_AUD_DEV_CAP_EXT_FORMAT == 0)
-	strm->param.ext_fmt.id = PJMEDIA_FORMAT_L16;
-	
+        strm->param.ext_fmt.id = PJMEDIA_FORMAT_L16;
+
     /* Set audio engine fourcc. */
-    switch(strm->param.ext_fmt.id) {
-    case PJMEDIA_FORMAT_L16:
-    case PJMEDIA_FORMAT_PCMU:
-    case PJMEDIA_FORMAT_PCMA:
-	aps_setting.fourcc = TFourCC(KMCPFourCCIdG711);
-	break;
-    case PJMEDIA_FORMAT_AMR:
-	aps_setting.fourcc = TFourCC(KMCPFourCCIdAMRNB);
-	break;
-    case PJMEDIA_FORMAT_G729:
-	aps_setting.fourcc = TFourCC(KMCPFourCCIdG729);
-	break;
-    case PJMEDIA_FORMAT_ILBC:
-	aps_setting.fourcc = TFourCC(KMCPFourCCIdILBC);
-	break;
-    default:
-	aps_setting.fourcc = 0;
-	break;
+    switch (strm->param.ext_fmt.id) {
+        case PJMEDIA_FORMAT_L16:
+        case PJMEDIA_FORMAT_PCMU:
+        case PJMEDIA_FORMAT_PCMA:
+            aps_setting.fourcc = TFourCC (KMCPFourCCIdG711);
+            break;
+        case PJMEDIA_FORMAT_AMR:
+            aps_setting.fourcc = TFourCC (KMCPFourCCIdAMRNB);
+            break;
+        case PJMEDIA_FORMAT_G729:
+            aps_setting.fourcc = TFourCC (KMCPFourCCIdG729);
+            break;
+        case PJMEDIA_FORMAT_ILBC:
+            aps_setting.fourcc = TFourCC (KMCPFourCCIdILBC);
+            break;
+        default:
+            aps_setting.fourcc = 0;
+            break;
     }
 
     /* Set audio engine mode. */
-    if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_AMR)
-    {
-	aps_setting.mode = (TAPSCodecMode)strm->param.ext_fmt.bitrate;
-    } 
-    else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMU ||
-	     strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16 ||
-	    (strm->param.ext_fmt.id == PJMEDIA_FORMAT_ILBC  &&
-	     strm->param.ext_fmt.bitrate != 15200))
-    {
-	aps_setting.mode = EULawOr30ms;
-    } 
-    else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMA ||
-	    (strm->param.ext_fmt.id == PJMEDIA_FORMAT_ILBC &&
-	     strm->param.ext_fmt.bitrate == 15200))
-    {
-	aps_setting.mode = EALawOr20ms;
+    if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_AMR) {
+        aps_setting.mode = (TAPSCodecMode) strm->param.ext_fmt.bitrate;
+    } else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMU ||
+               strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16 ||
+               (strm->param.ext_fmt.id == PJMEDIA_FORMAT_ILBC  &&
+                strm->param.ext_fmt.bitrate != 15200)) {
+        aps_setting.mode = EULawOr30ms;
+    } else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMA ||
+               (strm->param.ext_fmt.id == PJMEDIA_FORMAT_ILBC &&
+                strm->param.ext_fmt.bitrate == 15200)) {
+        aps_setting.mode = EALawOr20ms;
     }
 
-    /* Disable VAD on L16, G711, and also G729 (G729's VAD potentially 
+    /* Disable VAD on L16, G711, and also G729 (G729's VAD potentially
      * causes noise?).
      */
     if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMU ||
-	strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMA ||
-	strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16 ||
-	strm->param.ext_fmt.id == PJMEDIA_FORMAT_G729)
-    {
-	aps_setting.vad = EFalse;
+            strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMA ||
+            strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16 ||
+            strm->param.ext_fmt.id == PJMEDIA_FORMAT_G729) {
+        aps_setting.vad = EFalse;
     } else {
-	aps_setting.vad = strm->param.ext_fmt.vad;
+        aps_setting.vad = strm->param.ext_fmt.vad;
     }
-    
+
     /* Set other audio engine attributes. */
     aps_setting.plc = strm->param.plc_enabled;
     aps_setting.cng = aps_setting.vad;
-    aps_setting.loudspk = 
-		strm->param.output_route==PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
+    aps_setting.loudspk =
+        strm->param.output_route==PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
 
     /* Set audio engine callbacks. */
     if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16) {
-	aps_play_cb = &PlayCbPcm;
-	aps_rec_cb  = &RecCbPcm;
+        aps_play_cb = &PlayCbPcm;
+        aps_rec_cb  = &RecCbPcm;
     } else {
-	aps_play_cb = &PlayCb;
-	aps_rec_cb  = &RecCb;
+        aps_play_cb = &PlayCb;
+        aps_rec_cb  = &RecCb;
     }
 
     strm->rec_cb = rec_cb;
@@ -1466,80 +1482,81 @@ static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
     strm->resample_factor = strm->param.clock_rate / 8000;
 
     /* play_buf size is samples per frame scaled in to 8kHz mono. */
-    strm->play_buf = (pj_int16_t*)pj_pool_zalloc(
-					pool, 
-					(strm->param.samples_per_frame / 
-					strm->resample_factor /
-					strm->param.channel_count) << 1);
+    strm->play_buf = (pj_int16_t*) pj_pool_zalloc (
+                         pool,
+                         (strm->param.samples_per_frame /
+                          strm->resample_factor /
+                          strm->param.channel_count) << 1);
     strm->play_buf_len = 0;
     strm->play_buf_start = 0;
 
     /* rec_buf size is samples per frame scaled in to 8kHz mono. */
-    strm->rec_buf  = (pj_int16_t*)pj_pool_zalloc(
-					pool, 
-					(strm->param.samples_per_frame / 
-					strm->resample_factor /
-					strm->param.channel_count) << 1);
+    strm->rec_buf  = (pj_int16_t*) pj_pool_zalloc (
+                         pool,
+                         (strm->param.samples_per_frame /
+                          strm->resample_factor /
+                          strm->param.channel_count) << 1);
     strm->rec_buf_len = 0;
 
     if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_G729) {
-	TBitStream *g729_bitstream = new TBitStream;
-	
-	PJ_ASSERT_RETURN(g729_bitstream, PJ_ENOMEM);
-	strm->strm_data = (void*)g729_bitstream;
+        TBitStream *g729_bitstream = new TBitStream;
+
+        PJ_ASSERT_RETURN (g729_bitstream, PJ_ENOMEM);
+        strm->strm_data = (void*) g729_bitstream;
     }
-	
+
     /* Init resampler when format is PCM and clock rate is not 8kHz */
-    if (strm->param.clock_rate != 8000 && 
-	strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16)
-    {
-	pj_status_t status;
-	
-	if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	    /* Create resample for recorder */
-	    status = pjmedia_resample_create( pool, PJ_TRUE, PJ_FALSE, 1, 
-					      8000,
-					      strm->param.clock_rate,
-					      80,
-					      &strm->rec_resample);
-	    if (status != PJ_SUCCESS)
-		return status;
-	}
-    
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    /* Create resample for player */
-	    status = pjmedia_resample_create( pool, PJ_TRUE, PJ_FALSE, 1, 
-					      strm->param.clock_rate,
-					      8000,
-					      80 * strm->resample_factor,
-					      &strm->play_resample);
-	    if (status != PJ_SUCCESS)
-		return status;
-	}
+    if (strm->param.clock_rate != 8000 &&
+            strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16) {
+        pj_status_t status;
+
+        if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
+            /* Create resample for recorder */
+            status = pjmedia_resample_create (pool, PJ_TRUE, PJ_FALSE, 1,
+                                              8000,
+                                              strm->param.clock_rate,
+                                              80,
+                                              &strm->rec_resample);
+
+            if (status != PJ_SUCCESS)
+                return status;
+        }
+
+        if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+            /* Create resample for player */
+            status = pjmedia_resample_create (pool, PJ_TRUE, PJ_FALSE, 1,
+                                              strm->param.clock_rate,
+                                              8000,
+                                              80 * strm->resample_factor,
+                                              &strm->play_resample);
+
+            if (status != PJ_SUCCESS)
+                return status;
+        }
     }
 
     /* Create PCM buffer, when the clock rate is not 8kHz or not mono */
     if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16 &&
-	(strm->resample_factor > 1 || strm->param.channel_count != 1)) 
-    {
-	strm->pcm_buf = (pj_int16_t*)pj_pool_zalloc(pool, 
-					strm->param.samples_per_frame << 1);
+            (strm->resample_factor > 1 || strm->param.channel_count != 1)) {
+        strm->pcm_buf = (pj_int16_t*) pj_pool_zalloc (pool,
+                        strm->param.samples_per_frame << 1);
     }
 
-    
+
     /* Create the audio engine. */
-    TRAPD(err, strm->engine = CPjAudioEngine::NewL(strm,
-						   aps_rec_cb, aps_play_cb,
-						   strm, aps_setting));
+    TRAPD (err, strm->engine = CPjAudioEngine::NewL (strm,
+                               aps_rec_cb, aps_play_cb,
+                               strm, aps_setting));
+
     if (err != KErrNone) {
-    	pj_pool_release(pool);
-	return PJ_RETURN_OS_ERROR(err);
+        pj_pool_release (pool);
+        return PJ_RETURN_OS_ERROR (err);
     }
 
     /* Apply output volume setting if specified */
     if (param->flags & PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING) {
-	stream_set_cap(&strm->base, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, 
-		       &param->output_vol);
+        stream_set_cap (&strm->base, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
+                        &param->output_vol);
     }
 
     /* Done */
@@ -1550,193 +1567,204 @@ static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
 }
 
 /* API: Get stream info. */
-static pj_status_t stream_get_param(pjmedia_aud_stream *s,
-				    pjmedia_aud_param *pi)
+static pj_status_t stream_get_param (pjmedia_aud_stream *s,
+                                     pjmedia_aud_param *pi)
 {
-    struct aps_stream *strm = (struct aps_stream*)s;
+    struct aps_stream *strm = (struct aps_stream*) s;
 
-    PJ_ASSERT_RETURN(strm && pi, PJ_EINVAL);
+    PJ_ASSERT_RETURN (strm && pi, PJ_EINVAL);
 
-    pj_memcpy(pi, &strm->param, sizeof(*pi));
+    pj_memcpy (pi, &strm->param, sizeof (*pi));
 
     /* Update the output volume setting */
-    if (stream_get_cap(s, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
-		       &pi->output_vol) == PJ_SUCCESS)
-    {
-	pi->flags |= PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING;
+    if (stream_get_cap (s, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
+                        &pi->output_vol) == PJ_SUCCESS) {
+        pi->flags |= PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING;
     }
-    
+
     return PJ_SUCCESS;
 }
 
 /* API: get capability */
-static pj_status_t stream_get_cap(pjmedia_aud_stream *s,
-				  pjmedia_aud_dev_cap cap,
-				  void *pval)
+static pj_status_t stream_get_cap (pjmedia_aud_stream *s,
+                                   pjmedia_aud_dev_cap cap,
+                                   void *pval)
 {
-    struct aps_stream *strm = (struct aps_stream*)s;
+    struct aps_stream *strm = (struct aps_stream*) s;
     pj_status_t status = PJ_ENOTSUP;
 
-    PJ_ASSERT_RETURN(s && pval, PJ_EINVAL);
+    PJ_ASSERT_RETURN (s && pval, PJ_EINVAL);
 
     switch (cap) {
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE: 
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    *(pjmedia_aud_dev_route*)pval = strm->param.output_route;
-	    status = PJ_SUCCESS;
-	}
-	break;
-    
-    /* There is a case that GetMaxGain() stucks, e.g: in N95. */ 
-    /*
-    case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    TInt max_gain = strm->engine->GetMaxGain();
-	    TInt gain = strm->engine->GetGain();
-	    
-	    if (max_gain > 0 && gain >= 0) {
-		*(unsigned*)pval = gain * 100 / max_gain; 
-		status = PJ_SUCCESS;
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	}
-	break;
-    */
-
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    TInt max_vol = strm->engine->GetMaxVolume();
-	    TInt vol = strm->engine->GetVolume();
-	    
-	    if (max_vol > 0 && vol >= 0) {
-		*(unsigned*)pval = vol * 100 / max_vol; 
-		status = PJ_SUCCESS;
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	}
-	break;
-    default:
-	break;
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE:
+
+            if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+                * (pjmedia_aud_dev_route*) pval = strm->param.output_route;
+                status = PJ_SUCCESS;
+            }
+
+            break;
+
+            /* There is a case that GetMaxGain() stucks, e.g: in N95. */
+            /*
+            case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
+            if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
+                PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
+
+                TInt max_gain = strm->engine->GetMaxGain();
+                TInt gain = strm->engine->GetGain();
+
+                if (max_gain > 0 && gain >= 0) {
+            	*(unsigned*)pval = gain * 100 / max_gain;
+            	status = PJ_SUCCESS;
+                } else {
+            	status = PJMEDIA_EAUD_NOTREADY;
+                }
+            }
+            break;
+            */
+
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
+
+            if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+                PJ_ASSERT_RETURN (strm->engine, PJ_EINVAL);
+
+                TInt max_vol = strm->engine->GetMaxVolume();
+                TInt vol = strm->engine->GetVolume();
+
+                if (max_vol > 0 && vol >= 0) {
+                    * (unsigned*) pval = vol * 100 / max_vol;
+                    status = PJ_SUCCESS;
+                } else {
+                    status = PJMEDIA_EAUD_NOTREADY;
+                }
+            }
+
+            break;
+        default:
+            break;
     }
-    
+
     return status;
 }
 
 /* API: set capability */
-static pj_status_t stream_set_cap(pjmedia_aud_stream *s,
-				  pjmedia_aud_dev_cap cap,
-				  const void *pval)
+static pj_status_t stream_set_cap (pjmedia_aud_stream *s,
+                                   pjmedia_aud_dev_cap cap,
+                                   const void *pval)
 {
-    struct aps_stream *strm = (struct aps_stream*)s;
+    struct aps_stream *strm = (struct aps_stream*) s;
     pj_status_t status = PJ_ENOTSUP;
 
-    PJ_ASSERT_RETURN(s && pval, PJ_EINVAL);
+    PJ_ASSERT_RETURN (s && pval, PJ_EINVAL);
 
     switch (cap) {
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE: 
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    pjmedia_aud_dev_route r = *(const pjmedia_aud_dev_route*)pval;
-	    TInt err;
-
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    switch (r) {
-	    case PJMEDIA_AUD_DEV_ROUTE_DEFAULT:
-	    case PJMEDIA_AUD_DEV_ROUTE_EARPIECE:
-		err = strm->engine->ActivateSpeaker(EFalse);
-		status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
-		break;
-	    case PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER:
-		err = strm->engine->ActivateSpeaker(ETrue);
-		status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
-		break;
-	    default:
-		status = PJ_EINVAL;
-		break;
-	    }
-	    if (status == PJ_SUCCESS)
-		strm->param.output_route = r; 
-	}
-	break;
-
-    /* There is a case that GetMaxGain() stucks, e.g: in N95. */ 
-    /*
-    case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    TInt max_gain = strm->engine->GetMaxGain();
-	    if (max_gain > 0) {
-		TInt gain, err;
-		
-		gain = *(unsigned*)pval * max_gain / 100;
-		err = strm->engine->SetGain(gain);
-		status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	    if (status == PJ_SUCCESS)
-		strm->param.input_vol = *(unsigned*)pval;
-	}
-	break;
-    */
-
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    TInt max_vol = strm->engine->GetMaxVolume();
-	    if (max_vol > 0) {
-		TInt vol, err;
-		
-		vol = *(unsigned*)pval * max_vol / 100;
-		err = strm->engine->SetVolume(vol);
-		status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	    if (status == PJ_SUCCESS)
-		strm->param.output_vol = *(unsigned*)pval;
-	}
-	break;
-    default:
-	break;
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE:
+
+            if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+                pjmedia_aud_dev_route r = * (const pjmedia_aud_dev_route*) pval;
+                TInt err;
+
+                PJ_ASSERT_RETURN (strm->engine, PJ_EINVAL);
+
+                switch (r) {
+                    case PJMEDIA_AUD_DEV_ROUTE_DEFAULT:
+                    case PJMEDIA_AUD_DEV_ROUTE_EARPIECE:
+                        err = strm->engine->ActivateSpeaker (EFalse);
+                        status = (err==KErrNone) ? PJ_SUCCESS:PJ_RETURN_OS_ERROR (err);
+                        break;
+                    case PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER:
+                        err = strm->engine->ActivateSpeaker (ETrue);
+                        status = (err==KErrNone) ? PJ_SUCCESS:PJ_RETURN_OS_ERROR (err);
+                        break;
+                    default:
+                        status = PJ_EINVAL;
+                        break;
+                }
+
+                if (status == PJ_SUCCESS)
+                    strm->param.output_route = r;
+            }
+
+            break;
+
+            /* There is a case that GetMaxGain() stucks, e.g: in N95. */
+            /*
+            case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
+            if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
+                PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
+
+                TInt max_gain = strm->engine->GetMaxGain();
+                if (max_gain > 0) {
+            	TInt gain, err;
+
+            	gain = *(unsigned*)pval * max_gain / 100;
+            	err = strm->engine->SetGain(gain);
+            	status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
+                } else {
+            	status = PJMEDIA_EAUD_NOTREADY;
+                }
+                if (status == PJ_SUCCESS)
+            	strm->param.input_vol = *(unsigned*)pval;
+            }
+            break;
+            */
+
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
+
+            if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+                PJ_ASSERT_RETURN (strm->engine, PJ_EINVAL);
+
+                TInt max_vol = strm->engine->GetMaxVolume();
+
+                if (max_vol > 0) {
+                    TInt vol, err;
+
+                    vol = * (unsigned*) pval * max_vol / 100;
+                    err = strm->engine->SetVolume (vol);
+                    status = (err==KErrNone) ? PJ_SUCCESS:PJ_RETURN_OS_ERROR (err);
+                } else {
+                    status = PJMEDIA_EAUD_NOTREADY;
+                }
+
+                if (status == PJ_SUCCESS)
+                    strm->param.output_vol = * (unsigned*) pval;
+            }
+
+            break;
+        default:
+            break;
     }
-    
+
     return status;
 }
 
 /* API: Start stream. */
-static pj_status_t stream_start(pjmedia_aud_stream *strm)
+static pj_status_t stream_start (pjmedia_aud_stream *strm)
 {
-    struct aps_stream *stream = (struct aps_stream*)strm;
+    struct aps_stream *stream = (struct aps_stream*) strm;
 
-    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+    PJ_ASSERT_RETURN (stream, PJ_EINVAL);
 
     if (stream->engine) {
-	TInt err = stream->engine->StartL();
-    	if (err != KErrNone)
-    	    return PJ_RETURN_OS_ERROR(err);
+        TInt err = stream->engine->StartL();
+
+        if (err != KErrNone)
+            return PJ_RETURN_OS_ERROR (err);
     }
 
     return PJ_SUCCESS;
 }
 
 /* API: Stop stream. */
-static pj_status_t stream_stop(pjmedia_aud_stream *strm)
+static pj_status_t stream_stop (pjmedia_aud_stream *strm)
 {
-    struct aps_stream *stream = (struct aps_stream*)strm;
+    struct aps_stream *stream = (struct aps_stream*) strm;
 
-    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+    PJ_ASSERT_RETURN (stream, PJ_EINVAL);
 
     if (stream->engine) {
-    	stream->engine->Stop();
+        stream->engine->Stop();
     }
 
     return PJ_SUCCESS;
@@ -1744,28 +1772,29 @@ static pj_status_t stream_stop(pjmedia_aud_stream *strm)
 
 
 /* API: Destroy stream. */
-static pj_status_t stream_destroy(pjmedia_aud_stream *strm)
+static pj_status_t stream_destroy (pjmedia_aud_stream *strm)
 {
-    struct aps_stream *stream = (struct aps_stream*)strm;
+    struct aps_stream *stream = (struct aps_stream*) strm;
 
-    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+    PJ_ASSERT_RETURN (stream, PJ_EINVAL);
 
-    stream_stop(strm);
+    stream_stop (strm);
 
     delete stream->engine;
     stream->engine = NULL;
 
     if (stream->param.ext_fmt.id == PJMEDIA_FORMAT_G729) {
-	TBitStream *g729_bitstream = (TBitStream*)stream->strm_data;
-	stream->strm_data = NULL;
-	delete g729_bitstream;
+        TBitStream *g729_bitstream = (TBitStream*) stream->strm_data;
+        stream->strm_data = NULL;
+        delete g729_bitstream;
     }
 
     pj_pool_t *pool;
     pool = stream->pool;
+
     if (pool) {
-    	stream->pool = NULL;
-    	pj_pool_release(pool);
+        stream->pool = NULL;
+        pj_pool_release (pool);
     }
 
     return PJ_SUCCESS;
diff --git a/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_mda_dev.cpp b/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_mda_dev.cpp
index 809604ccb5bffaafc62a059130cebb7c4a34af0d..98bcde55579e6389da7118bbdc5db64357a41ad7 100644
--- a/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_mda_dev.cpp
+++ b/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_mda_dev.cpp
@@ -1,5 +1,5 @@
 /* $Id: symb_mda_dev.cpp 2777 2009-06-19 09:15:59Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -43,7 +43,7 @@
  * This file provides sound implementation for Symbian Audio Streaming
  * device. Application using this sound abstraction must link with:
  *  - mediaclientaudiostream.lib, and
- *  - mediaclientaudioinputstream.lib 
+ *  - mediaclientaudioinputstream.lib
  */
 #include <mda/common/audio.h>
 #include <mdaaudiooutputstream.h>
@@ -63,8 +63,7 @@
 
 
 /* MDA factory */
-struct mda_factory
-{
+struct mda_factory {
     pjmedia_aud_dev_factory	 base;
     pj_pool_t			*pool;
     pj_pool_factory		*pf;
@@ -76,11 +75,10 @@ class CPjAudioInputEngine;
 class CPjAudioOutputEngine;
 
 /* MDA stream. */
-struct mda_stream
-{
+struct mda_stream {
     // Base
     pjmedia_aud_stream	 base;			/**< Base class.	*/
-    
+
     // Pool
     pj_pool_t		*pool;			/**< Memory pool.       */
 
@@ -94,38 +92,37 @@ struct mda_stream
 
 
 /* Prototypes */
-static pj_status_t factory_init(pjmedia_aud_dev_factory *f);
-static pj_status_t factory_destroy(pjmedia_aud_dev_factory *f);
-static unsigned    factory_get_dev_count(pjmedia_aud_dev_factory *f);
-static pj_status_t factory_get_dev_info(pjmedia_aud_dev_factory *f, 
-					unsigned index,
-					pjmedia_aud_dev_info *info);
-static pj_status_t factory_default_param(pjmedia_aud_dev_factory *f,
-					 unsigned index,
-					 pjmedia_aud_param *param);
-static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
-					 const pjmedia_aud_param *param,
-					 pjmedia_aud_rec_cb rec_cb,
-					 pjmedia_aud_play_cb play_cb,
-					 void *user_data,
-					 pjmedia_aud_stream **p_aud_strm);
-
-static pj_status_t stream_get_param(pjmedia_aud_stream *strm,
-				    pjmedia_aud_param *param);
-static pj_status_t stream_get_cap(pjmedia_aud_stream *strm,
-				  pjmedia_aud_dev_cap cap,
-				  void *value);
-static pj_status_t stream_set_cap(pjmedia_aud_stream *strm,
-				  pjmedia_aud_dev_cap cap,
-				  const void *value);
-static pj_status_t stream_start(pjmedia_aud_stream *strm);
-static pj_status_t stream_stop(pjmedia_aud_stream *strm);
-static pj_status_t stream_destroy(pjmedia_aud_stream *strm);
+static pj_status_t factory_init (pjmedia_aud_dev_factory *f);
+static pj_status_t factory_destroy (pjmedia_aud_dev_factory *f);
+static unsigned    factory_get_dev_count (pjmedia_aud_dev_factory *f);
+static pj_status_t factory_get_dev_info (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_dev_info *info);
+static pj_status_t factory_default_param (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_param *param);
+static pj_status_t factory_create_stream (pjmedia_aud_dev_factory *f,
+        const pjmedia_aud_param *param,
+        pjmedia_aud_rec_cb rec_cb,
+        pjmedia_aud_play_cb play_cb,
+        void *user_data,
+        pjmedia_aud_stream **p_aud_strm);
+
+static pj_status_t stream_get_param (pjmedia_aud_stream *strm,
+                                     pjmedia_aud_param *param);
+static pj_status_t stream_get_cap (pjmedia_aud_stream *strm,
+                                   pjmedia_aud_dev_cap cap,
+                                   void *value);
+static pj_status_t stream_set_cap (pjmedia_aud_stream *strm,
+                                   pjmedia_aud_dev_cap cap,
+                                   const void *value);
+static pj_status_t stream_start (pjmedia_aud_stream *strm);
+static pj_status_t stream_stop (pjmedia_aud_stream *strm);
+static pj_status_t stream_destroy (pjmedia_aud_stream *strm);
 
 
 /* Operations */
-static pjmedia_aud_dev_factory_op factory_op =
-{
+static pjmedia_aud_dev_factory_op factory_op = {
     &factory_init,
     &factory_destroy,
     &factory_get_dev_count,
@@ -134,8 +131,7 @@ static pjmedia_aud_dev_factory_op factory_op =
     &factory_create_stream
 };
 
-static pjmedia_aud_stream_op stream_op = 
-{
+static pjmedia_aud_stream_op stream_op = {
     &stream_get_param,
     &stream_get_cap,
     &stream_set_cap,
@@ -148,46 +144,59 @@ static pjmedia_aud_stream_op stream_op =
 /*
  * Convert clock rate to Symbian's TMdaAudioDataSettings capability.
  */
-static TInt get_clock_rate_cap(unsigned clock_rate)
+static TInt get_clock_rate_cap (unsigned clock_rate)
 {
     switch (clock_rate) {
-    case 8000:  return TMdaAudioDataSettings::ESampleRate8000Hz;
-    case 11025: return TMdaAudioDataSettings::ESampleRate11025Hz;
-    case 12000: return TMdaAudioDataSettings::ESampleRate12000Hz;
-    case 16000: return TMdaAudioDataSettings::ESampleRate16000Hz;
-    case 22050: return TMdaAudioDataSettings::ESampleRate22050Hz;
-    case 24000: return TMdaAudioDataSettings::ESampleRate24000Hz;
-    case 32000: return TMdaAudioDataSettings::ESampleRate32000Hz;
-    case 44100: return TMdaAudioDataSettings::ESampleRate44100Hz;
-    case 48000: return TMdaAudioDataSettings::ESampleRate48000Hz;
-    case 64000: return TMdaAudioDataSettings::ESampleRate64000Hz;
-    case 96000: return TMdaAudioDataSettings::ESampleRate96000Hz;
-    default:
-	return 0;
+        case 8000:
+            return TMdaAudioDataSettings::ESampleRate8000Hz;
+        case 11025:
+            return TMdaAudioDataSettings::ESampleRate11025Hz;
+        case 12000:
+            return TMdaAudioDataSettings::ESampleRate12000Hz;
+        case 16000:
+            return TMdaAudioDataSettings::ESampleRate16000Hz;
+        case 22050:
+            return TMdaAudioDataSettings::ESampleRate22050Hz;
+        case 24000:
+            return TMdaAudioDataSettings::ESampleRate24000Hz;
+        case 32000:
+            return TMdaAudioDataSettings::ESampleRate32000Hz;
+        case 44100:
+            return TMdaAudioDataSettings::ESampleRate44100Hz;
+        case 48000:
+            return TMdaAudioDataSettings::ESampleRate48000Hz;
+        case 64000:
+            return TMdaAudioDataSettings::ESampleRate64000Hz;
+        case 96000:
+            return TMdaAudioDataSettings::ESampleRate96000Hz;
+        default:
+            return 0;
     }
 }
 
 /*
  * Convert number of channels into Symbian's TMdaAudioDataSettings capability.
  */
-static TInt get_channel_cap(unsigned channel_count)
+static TInt get_channel_cap (unsigned channel_count)
 {
     switch (channel_count) {
-    case 1: return TMdaAudioDataSettings::EChannelsMono;
-    case 2: return TMdaAudioDataSettings::EChannelsStereo;
-    default:
-	return 0;
+        case 1:
+            return TMdaAudioDataSettings::EChannelsMono;
+        case 2:
+            return TMdaAudioDataSettings::EChannelsStereo;
+        default:
+            return 0;
     }
 }
 
 /*
  * Utility: print sound device error
  */
-static void snd_perror(const char *title, TInt rc) 
+static void snd_perror (const char *title, TInt rc)
 {
-    PJ_LOG(1,(THIS_FILE, "%s: error code %d", title, rc));
+    PJ_LOG (1, (THIS_FILE, "%s: error code %d", title, rc));
 }
- 
+
 //////////////////////////////////////////////////////////////////////////////
 //
 
@@ -196,93 +205,92 @@ static void snd_perror(const char *title, TInt rc)
  */
 class CPjAudioInputEngine : public CBase, MMdaAudioInputStreamCallback
 {
-public:
-    enum State
-    {
-	STATE_INACTIVE,
-	STATE_ACTIVE,
-    };
-
-    ~CPjAudioInputEngine();
-
-    static CPjAudioInputEngine *NewL(struct mda_stream *parent_strm,
-				     pjmedia_aud_rec_cb rec_cb,
-				     void *user_data);
-
-    static CPjAudioInputEngine *NewLC(struct mda_stream *parent_strm,
-				      pjmedia_aud_rec_cb rec_cb,
-				      void *user_data);
-
-    pj_status_t StartRecord();
-    void Stop();
-
-    pj_status_t SetGain(TInt gain) { 
-	if (iInputStream_) { 
-	    iInputStream_->SetGain(gain);
-	    return PJ_SUCCESS;
-	} else
-	    return PJ_EINVALIDOP;
-    }
-    
-    TInt GetGain() { 
-	if (iInputStream_) { 
-	    return iInputStream_->Gain();
-	} else
-	    return PJ_EINVALIDOP;
-    }
-
-    TInt GetMaxGain() { 
-	if (iInputStream_) { 
-	    return iInputStream_->MaxGain();
-	} else
-	    return PJ_EINVALIDOP;
-    }
-    
-private:
-    State		     state_;
-    struct mda_stream	    *parentStrm_;
-    pjmedia_aud_rec_cb	     recCb_;
-    void		    *userData_;
-    CMdaAudioInputStream    *iInputStream_;
-    HBufC8		    *iStreamBuffer_;
-    TPtr8		     iFramePtr_;
-    TInt		     lastError_;
-    pj_uint32_t		     timeStamp_;
-
-    // cache variable
-    // to avoid calculating frame length repeatedly
-    TInt		     frameLen_;
-    
-    // sometimes recorded size != requested framesize, so let's
-    // provide a buffer to make sure the rec callback returning
-    // framesize as requested.
-    TUint8		    *frameRecBuf_;
-    TInt		     frameRecBufLen_;
-
-    CPjAudioInputEngine(struct mda_stream *parent_strm,
-	    pjmedia_aud_rec_cb rec_cb,
-			void *user_data);
-    void ConstructL();
-    TPtr8 & GetFrame();
-    
-public:
-    virtual void MaiscOpenComplete(TInt aError);
-    virtual void MaiscBufferCopied(TInt aError, const TDesC8 &aBuffer);
-    virtual void MaiscRecordComplete(TInt aError);
+    public:
+        enum State {
+            STATE_INACTIVE,
+            STATE_ACTIVE,
+        };
+
+        ~CPjAudioInputEngine();
+
+        static CPjAudioInputEngine *NewL (struct mda_stream *parent_strm,
+                                          pjmedia_aud_rec_cb rec_cb,
+                                          void *user_data);
+
+        static CPjAudioInputEngine *NewLC (struct mda_stream *parent_strm,
+                                           pjmedia_aud_rec_cb rec_cb,
+                                           void *user_data);
+
+        pj_status_t StartRecord();
+        void Stop();
+
+        pj_status_t SetGain (TInt gain) {
+            if (iInputStream_) {
+                iInputStream_->SetGain (gain);
+                return PJ_SUCCESS;
+            } else
+                return PJ_EINVALIDOP;
+        }
+
+        TInt GetGain() {
+            if (iInputStream_) {
+                return iInputStream_->Gain();
+            } else
+                return PJ_EINVALIDOP;
+        }
+
+        TInt GetMaxGain() {
+            if (iInputStream_) {
+                return iInputStream_->MaxGain();
+            } else
+                return PJ_EINVALIDOP;
+        }
+
+    private:
+        State		     state_;
+        struct mda_stream	    *parentStrm_;
+        pjmedia_aud_rec_cb	     recCb_;
+        void		    *userData_;
+        CMdaAudioInputStream    *iInputStream_;
+        HBufC8		    *iStreamBuffer_;
+        TPtr8		     iFramePtr_;
+        TInt		     lastError_;
+        pj_uint32_t		     timeStamp_;
+
+        // cache variable
+        // to avoid calculating frame length repeatedly
+        TInt		     frameLen_;
+
+        // sometimes recorded size != requested framesize, so let's
+        // provide a buffer to make sure the rec callback returning
+        // framesize as requested.
+        TUint8		    *frameRecBuf_;
+        TInt		     frameRecBufLen_;
+
+        CPjAudioInputEngine (struct mda_stream *parent_strm,
+                             pjmedia_aud_rec_cb rec_cb,
+                             void *user_data);
+        void ConstructL();
+        TPtr8 & GetFrame();
+
+    public:
+        virtual void MaiscOpenComplete (TInt aError);
+        virtual void MaiscBufferCopied (TInt aError, const TDesC8 &aBuffer);
+        virtual void MaiscRecordComplete (TInt aError);
 
 };
 
 
-CPjAudioInputEngine::CPjAudioInputEngine(struct mda_stream *parent_strm,
-					 pjmedia_aud_rec_cb rec_cb,
-					 void *user_data)
-    : state_(STATE_INACTIVE), parentStrm_(parent_strm), 
-      recCb_(rec_cb), userData_(user_data), 
-      iInputStream_(NULL), iStreamBuffer_(NULL), iFramePtr_(0, 0),
-      lastError_(KErrNone), timeStamp_(0),
-      frameLen_(parent_strm->param.samples_per_frame * 
-	        BYTES_PER_SAMPLE),
-      frameRecBuf_(NULL), frameRecBufLen_(0)
+CPjAudioInputEngine::CPjAudioInputEngine (struct mda_stream *parent_strm,
+        pjmedia_aud_rec_cb rec_cb,
+        void *user_data)
+        : state_ (STATE_INACTIVE), parentStrm_ (parent_strm),
+        recCb_ (rec_cb), userData_ (user_data),
+        iInputStream_ (NULL), iStreamBuffer_ (NULL), iFramePtr_ (0, 0),
+        lastError_ (KErrNone), timeStamp_ (0),
+        frameLen_ (parent_strm->param.samples_per_frame *
+                   BYTES_PER_SAMPLE),
+        frameRecBuf_ (NULL), frameRecBufLen_ (0)
 {
 }
 
@@ -292,7 +300,7 @@ CPjAudioInputEngine::~CPjAudioInputEngine()
 
     delete iStreamBuffer_;
     iStreamBuffer_ = NULL;
-    
+
     delete [] frameRecBuf_;
     frameRecBuf_ = NULL;
     frameRecBufLen_ = 0;
@@ -300,33 +308,33 @@ CPjAudioInputEngine::~CPjAudioInputEngine()
 
 void CPjAudioInputEngine::ConstructL()
 {
-    iStreamBuffer_ = HBufC8::NewL(frameLen_);
-    CleanupStack::PushL(iStreamBuffer_);
+    iStreamBuffer_ = HBufC8::NewL (frameLen_);
+    CleanupStack::PushL (iStreamBuffer_);
 
     frameRecBuf_ = new TUint8[frameLen_*2];
-    CleanupStack::PushL(frameRecBuf_);
+    CleanupStack::PushL (frameRecBuf_);
 }
 
-CPjAudioInputEngine *CPjAudioInputEngine::NewLC(struct mda_stream *parent,
-						pjmedia_aud_rec_cb rec_cb,
-					        void *user_data)
+CPjAudioInputEngine *CPjAudioInputEngine::NewLC (struct mda_stream *parent,
+        pjmedia_aud_rec_cb rec_cb,
+        void *user_data)
 {
-    CPjAudioInputEngine* self = new (ELeave) CPjAudioInputEngine(parent,
-								 rec_cb, 
-								 user_data);
-    CleanupStack::PushL(self);
+    CPjAudioInputEngine* self = new (ELeave) CPjAudioInputEngine (parent,
+            rec_cb,
+            user_data);
+    CleanupStack::PushL (self);
     self->ConstructL();
     return self;
 }
 
-CPjAudioInputEngine *CPjAudioInputEngine::NewL(struct mda_stream *parent,
-					       pjmedia_aud_rec_cb rec_cb,
-					       void *user_data)
+CPjAudioInputEngine *CPjAudioInputEngine::NewL (struct mda_stream *parent,
+        pjmedia_aud_rec_cb rec_cb,
+        void *user_data)
 {
-    CPjAudioInputEngine *self = NewLC(parent, rec_cb, user_data);
-    CleanupStack::Pop(self->frameRecBuf_);
-    CleanupStack::Pop(self->iStreamBuffer_);
-    CleanupStack::Pop(self);
+    CPjAudioInputEngine *self = NewLC (parent, rec_cb, user_data);
+    CleanupStack::Pop (self->frameRecBuf_);
+    CleanupStack::Pop (self->iStreamBuffer_);
+    CleanupStack::Pop (self);
     return self;
 }
 
@@ -336,44 +344,46 @@ pj_status_t CPjAudioInputEngine::StartRecord()
 
     // Ignore command if recording is in progress.
     if (state_ == STATE_ACTIVE)
-	return PJ_SUCCESS;
+        return PJ_SUCCESS;
 
     // According to Nokia's AudioStream example, some 2nd Edition, FP2 devices
-    // (such as Nokia 6630) require the stream to be reconstructed each time 
+    // (such as Nokia 6630) require the stream to be reconstructed each time
     // before calling Open() - otherwise the callback never gets called.
     // For uniform behavior, lets just delete/re-create the stream for all
     // devices.
 
     // Destroy existing stream.
     if (iInputStream_) delete iInputStream_;
+
     iInputStream_ = NULL;
 
     // Create the stream.
-    TRAPD(err, iInputStream_ = CMdaAudioInputStream::NewL(*this));
+    TRAPD (err, iInputStream_ = CMdaAudioInputStream::NewL (*this));
+
     if (err != KErrNone)
-	return PJ_RETURN_OS_ERROR(err);
+        return PJ_RETURN_OS_ERROR (err);
 
     // Initialize settings.
     TMdaAudioDataSettings iStreamSettings;
-    iStreamSettings.iChannels = 
-			    get_channel_cap(parentStrm_->param.channel_count);
-    iStreamSettings.iSampleRate = 
-			    get_clock_rate_cap(parentStrm_->param.clock_rate);
-
-    pj_assert(iStreamSettings.iChannels != 0 && 
-	      iStreamSettings.iSampleRate != 0);
-
-    PJ_LOG(4,(THIS_FILE, "Opening sound device for capture, "
-    		         "clock rate=%d, channel count=%d..",
-    		         parentStrm_->param.clock_rate, 
-    		         parentStrm_->param.channel_count));
-    
+    iStreamSettings.iChannels =
+        get_channel_cap (parentStrm_->param.channel_count);
+    iStreamSettings.iSampleRate =
+        get_clock_rate_cap (parentStrm_->param.clock_rate);
+
+    pj_assert (iStreamSettings.iChannels != 0 &&
+               iStreamSettings.iSampleRate != 0);
+
+    PJ_LOG (4, (THIS_FILE, "Opening sound device for capture, "
+                "clock rate=%d, channel count=%d..",
+                parentStrm_->param.clock_rate,
+                parentStrm_->param.channel_count));
+
     // Open stream.
     lastError_ = KRequestPending;
-    iInputStream_->Open(&iStreamSettings);
-    
+    iInputStream_->Open (&iStreamSettings);
+
     // Success
-    PJ_LOG(4,(THIS_FILE, "Sound capture started."));
+    PJ_LOG (4, (THIS_FILE, "Sound capture started."));
     return PJ_SUCCESS;
 }
 
@@ -382,113 +392,118 @@ void CPjAudioInputEngine::Stop()
 {
     // If capture is in progress, stop it.
     if (iInputStream_ && state_ == STATE_ACTIVE) {
-    	lastError_ = KRequestPending;
-    	iInputStream_->Stop();
+        lastError_ = KRequestPending;
+        iInputStream_->Stop();
 
-	// Wait until it's actually stopped
-    	while (lastError_ == KRequestPending)
-	    pj_symbianos_poll(-1, 100);
+        // Wait until it's actually stopped
+        while (lastError_ == KRequestPending)
+            pj_symbianos_poll (-1, 100);
     }
 
     if (iInputStream_) {
-	delete iInputStream_;
-	iInputStream_ = NULL;
+        delete iInputStream_;
+        iInputStream_ = NULL;
     }
-    
+
     state_ = STATE_INACTIVE;
 }
 
 
-TPtr8 & CPjAudioInputEngine::GetFrame() 
+TPtr8 & CPjAudioInputEngine::GetFrame()
 {
     //iStreamBuffer_->Des().FillZ(frameLen_);
-    iFramePtr_.Set((TUint8*)(iStreamBuffer_->Ptr()), frameLen_, frameLen_);
+    iFramePtr_.Set ( (TUint8*) (iStreamBuffer_->Ptr()), frameLen_, frameLen_);
     return iFramePtr_;
 }
 
-void CPjAudioInputEngine::MaiscOpenComplete(TInt aError)
+void CPjAudioInputEngine::MaiscOpenComplete (TInt aError)
 {
     lastError_ = aError;
+
     if (aError != KErrNone) {
-        snd_perror("Error in MaiscOpenComplete()", aError);
-    	return;
+        snd_perror ("Error in MaiscOpenComplete()", aError);
+        return;
     }
 
     // set stream priority to normal and time sensitive
-    iInputStream_->SetPriority(EPriorityNormal, 
-    			       EMdaPriorityPreferenceTime);				
+    iInputStream_->SetPriority (EPriorityNormal,
+                                EMdaPriorityPreferenceTime);
 
     // Read the first frame.
     TPtr8 & frm = GetFrame();
-    TRAPD(err2, iInputStream_->ReadL(frm));
+    TRAPD (err2, iInputStream_->ReadL (frm));
+
     if (err2) {
-    	PJ_LOG(4,(THIS_FILE, "Exception in iInputStream_->ReadL()"));
+        PJ_LOG (4, (THIS_FILE, "Exception in iInputStream_->ReadL()"));
     }
 }
 
-void CPjAudioInputEngine::MaiscBufferCopied(TInt aError, 
-					    const TDesC8 &aBuffer)
+void CPjAudioInputEngine::MaiscBufferCopied (TInt aError,
+        const TDesC8 &aBuffer)
 {
     lastError_ = aError;
+
     if (aError != KErrNone) {
-    	snd_perror("Error in MaiscBufferCopied()", aError);
-	return;
+        snd_perror ("Error in MaiscBufferCopied()", aError);
+        return;
     }
 
     if (frameRecBufLen_ || aBuffer.Length() < frameLen_) {
-	pj_memcpy(frameRecBuf_ + frameRecBufLen_, (void*) aBuffer.Ptr(), aBuffer.Length());
-	frameRecBufLen_ += aBuffer.Length();
+        pj_memcpy (frameRecBuf_ + frameRecBufLen_, (void*) aBuffer.Ptr(), aBuffer.Length());
+        frameRecBufLen_ += aBuffer.Length();
     }
 
     if (frameRecBufLen_) {
-    	while (frameRecBufLen_ >= frameLen_) {
-    	    pjmedia_frame f;
-    	    
-    	    f.type = PJMEDIA_FRAME_TYPE_AUDIO;
-    	    f.buf = frameRecBuf_;
-    	    f.size = frameLen_;
-    	    f.timestamp.u32.lo = timeStamp_;
-    	    f.bit_info = 0;
-    	    
-    	    // Call the callback.
-	    recCb_(userData_, &f);
-	    // Increment timestamp.
-	    timeStamp_ += parentStrm_->param.samples_per_frame;
-
-	    frameRecBufLen_ -= frameLen_;
-	    pj_memmove(frameRecBuf_, frameRecBuf_+frameLen_, frameRecBufLen_);
-    	}
+        while (frameRecBufLen_ >= frameLen_) {
+            pjmedia_frame f;
+
+            f.type = PJMEDIA_FRAME_TYPE_AUDIO;
+            f.buf = frameRecBuf_;
+            f.size = frameLen_;
+            f.timestamp.u32.lo = timeStamp_;
+            f.bit_info = 0;
+
+            // Call the callback.
+            recCb_ (userData_, &f);
+            // Increment timestamp.
+            timeStamp_ += parentStrm_->param.samples_per_frame;
+
+            frameRecBufLen_ -= frameLen_;
+            pj_memmove (frameRecBuf_, frameRecBuf_+frameLen_, frameRecBufLen_);
+        }
     } else {
-	pjmedia_frame f;
-	
-	f.type = PJMEDIA_FRAME_TYPE_AUDIO;
-	f.buf = (void*)aBuffer.Ptr();
-	f.size = aBuffer.Length();
-	f.timestamp.u32.lo = timeStamp_;
-	f.bit_info = 0;
-	
-	// Call the callback.
-	recCb_(userData_, &f);
-	
-	// Increment timestamp.
-	timeStamp_ += parentStrm_->param.samples_per_frame;
+        pjmedia_frame f;
+
+        f.type = PJMEDIA_FRAME_TYPE_AUDIO;
+        f.buf = (void*) aBuffer.Ptr();
+        f.size = aBuffer.Length();
+        f.timestamp.u32.lo = timeStamp_;
+        f.bit_info = 0;
+
+        // Call the callback.
+        recCb_ (userData_, &f);
+
+        // Increment timestamp.
+        timeStamp_ += parentStrm_->param.samples_per_frame;
     }
 
     // Record next frame
     TPtr8 & frm = GetFrame();
-    TRAPD(err2, iInputStream_->ReadL(frm));
+    TRAPD (err2, iInputStream_->ReadL (frm));
+
     if (err2) {
-    	PJ_LOG(4,(THIS_FILE, "Exception in iInputStream_->ReadL()"));
+        PJ_LOG (4, (THIS_FILE, "Exception in iInputStream_->ReadL()"));
     }
 }
 
 
-void CPjAudioInputEngine::MaiscRecordComplete(TInt aError)
+void CPjAudioInputEngine::MaiscRecordComplete (TInt aError)
 {
     lastError_ = aError;
     state_ = STATE_INACTIVE;
+
     if (aError != KErrNone && aError != KErrCancel) {
-    	snd_perror("Error in MaiscRecordComplete()", aError);
+        snd_perror ("Error in MaiscRecordComplete()", aError);
     }
 }
 
@@ -503,77 +518,76 @@ void CPjAudioInputEngine::MaiscRecordComplete(TInt aError)
 
 class CPjAudioOutputEngine : public CBase, MMdaAudioOutputStreamCallback
 {
-public:
-    enum State
-    {
-	STATE_INACTIVE,
-	STATE_ACTIVE,
-    };
-
-    ~CPjAudioOutputEngine();
-
-    static CPjAudioOutputEngine *NewL(struct mda_stream *parent_strm,
-				      pjmedia_aud_play_cb play_cb,
-				      void *user_data);
-
-    static CPjAudioOutputEngine *NewLC(struct mda_stream *parent_strm,
-				       pjmedia_aud_play_cb rec_cb,
-				       void *user_data);
-
-    pj_status_t StartPlay();
-    void Stop();
-
-    pj_status_t SetVolume(TInt vol) { 
-	if (iOutputStream_) { 
-	    iOutputStream_->SetVolume(vol);
-	    return PJ_SUCCESS;
-	} else
-	    return PJ_EINVALIDOP;
-    }
-    
-    TInt GetVolume() { 
-	if (iOutputStream_) { 
-	    return iOutputStream_->Volume();
-	} else
-	    return PJ_EINVALIDOP;
-    }
-
-    TInt GetMaxVolume() { 
-	if (iOutputStream_) { 
-	    return iOutputStream_->MaxVolume();
-	} else
-	    return PJ_EINVALIDOP;
-    }
-
-private:
-    State		     state_;
-    struct mda_stream	    *parentStrm_;
-    pjmedia_aud_play_cb	     playCb_;
-    void		    *userData_;
-    CMdaAudioOutputStream   *iOutputStream_;
-    TUint8		    *frameBuf_;
-    unsigned		     frameBufSize_;
-    TPtrC8		     frame_;
-    TInt		     lastError_;
-    unsigned		     timestamp_;
-
-    CPjAudioOutputEngine(struct mda_stream *parent_strm,
-			 pjmedia_aud_play_cb play_cb,
-			 void *user_data);
-    void ConstructL();
-
-    virtual void MaoscOpenComplete(TInt aError);
-    virtual void MaoscBufferCopied(TInt aError, const TDesC8& aBuffer);
-    virtual void MaoscPlayComplete(TInt aError);
+    public:
+        enum State {
+            STATE_INACTIVE,
+            STATE_ACTIVE,
+        };
+
+        ~CPjAudioOutputEngine();
+
+        static CPjAudioOutputEngine *NewL (struct mda_stream *parent_strm,
+                                           pjmedia_aud_play_cb play_cb,
+                                           void *user_data);
+
+        static CPjAudioOutputEngine *NewLC (struct mda_stream *parent_strm,
+                                            pjmedia_aud_play_cb rec_cb,
+                                            void *user_data);
+
+        pj_status_t StartPlay();
+        void Stop();
+
+        pj_status_t SetVolume (TInt vol) {
+            if (iOutputStream_) {
+                iOutputStream_->SetVolume (vol);
+                return PJ_SUCCESS;
+            } else
+                return PJ_EINVALIDOP;
+        }
+
+        TInt GetVolume() {
+            if (iOutputStream_) {
+                return iOutputStream_->Volume();
+            } else
+                return PJ_EINVALIDOP;
+        }
+
+        TInt GetMaxVolume() {
+            if (iOutputStream_) {
+                return iOutputStream_->MaxVolume();
+            } else
+                return PJ_EINVALIDOP;
+        }
+
+    private:
+        State		     state_;
+        struct mda_stream	    *parentStrm_;
+        pjmedia_aud_play_cb	     playCb_;
+        void		    *userData_;
+        CMdaAudioOutputStream   *iOutputStream_;
+        TUint8		    *frameBuf_;
+        unsigned		     frameBufSize_;
+        TPtrC8		     frame_;
+        TInt		     lastError_;
+        unsigned		     timestamp_;
+
+        CPjAudioOutputEngine (struct mda_stream *parent_strm,
+                              pjmedia_aud_play_cb play_cb,
+                              void *user_data);
+        void ConstructL();
+
+        virtual void MaoscOpenComplete (TInt aError);
+        virtual void MaoscBufferCopied (TInt aError, const TDesC8& aBuffer);
+        virtual void MaoscPlayComplete (TInt aError);
 };
 
 
-CPjAudioOutputEngine::CPjAudioOutputEngine(struct mda_stream *parent_strm,
-					   pjmedia_aud_play_cb play_cb,
-					   void *user_data) 
-: state_(STATE_INACTIVE), parentStrm_(parent_strm), playCb_(play_cb), 
-  userData_(user_data), iOutputStream_(NULL), frameBuf_(NULL),
-  lastError_(KErrNone), timestamp_(0)
+CPjAudioOutputEngine::CPjAudioOutputEngine (struct mda_stream *parent_strm,
+        pjmedia_aud_play_cb play_cb,
+        void *user_data)
+        : state_ (STATE_INACTIVE), parentStrm_ (parent_strm), playCb_ (play_cb),
+        userData_ (user_data), iOutputStream_ (NULL), frameBuf_ (NULL),
+        lastError_ (KErrNone), timestamp_ (0)
 {
 }
 
@@ -581,36 +595,36 @@ CPjAudioOutputEngine::CPjAudioOutputEngine(struct mda_stream *parent_strm,
 void CPjAudioOutputEngine::ConstructL()
 {
     frameBufSize_ = parentStrm_->param.samples_per_frame *
-		    BYTES_PER_SAMPLE;
+                    BYTES_PER_SAMPLE;
     frameBuf_ = new TUint8[frameBufSize_];
 }
 
 CPjAudioOutputEngine::~CPjAudioOutputEngine()
 {
     Stop();
-    delete [] frameBuf_;	
+    delete [] frameBuf_;
 }
 
 CPjAudioOutputEngine *
-CPjAudioOutputEngine::NewLC(struct mda_stream *parent_strm,
-			    pjmedia_aud_play_cb play_cb,
-			    void *user_data)
+CPjAudioOutputEngine::NewLC (struct mda_stream *parent_strm,
+                             pjmedia_aud_play_cb play_cb,
+                             void *user_data)
 {
-    CPjAudioOutputEngine* self = new (ELeave) CPjAudioOutputEngine(parent_strm,
-								   play_cb, 
-								   user_data);
-    CleanupStack::PushL(self);
+    CPjAudioOutputEngine* self = new (ELeave) CPjAudioOutputEngine (parent_strm,
+            play_cb,
+            user_data);
+    CleanupStack::PushL (self);
     self->ConstructL();
     return self;
 }
 
 CPjAudioOutputEngine *
-CPjAudioOutputEngine::NewL(struct mda_stream *parent_strm,
-			   pjmedia_aud_play_cb play_cb,
-			   void *user_data)
+CPjAudioOutputEngine::NewL (struct mda_stream *parent_strm,
+                            pjmedia_aud_play_cb play_cb,
+                            void *user_data)
 {
-    CPjAudioOutputEngine *self = NewLC(parent_strm, play_cb, user_data);
-    CleanupStack::Pop(self);
+    CPjAudioOutputEngine *self = NewLC (parent_strm, play_cb, user_data);
+    CleanupStack::Pop (self);
     return self;
 }
 
@@ -618,38 +632,40 @@ pj_status_t CPjAudioOutputEngine::StartPlay()
 {
     // Ignore command if playing is in progress.
     if (state_ == STATE_ACTIVE)
-	return PJ_SUCCESS;
-    
+        return PJ_SUCCESS;
+
     // Destroy existing stream.
     if (iOutputStream_) delete iOutputStream_;
+
     iOutputStream_ = NULL;
-    
+
     // Create the stream
-    TRAPD(err, iOutputStream_ = CMdaAudioOutputStream::NewL(*this));
+    TRAPD (err, iOutputStream_ = CMdaAudioOutputStream::NewL (*this));
+
     if (err != KErrNone)
-	return PJ_RETURN_OS_ERROR(err);
-    
+        return PJ_RETURN_OS_ERROR (err);
+
     // Initialize settings.
     TMdaAudioDataSettings iStreamSettings;
-    iStreamSettings.iChannels = 
-			    get_channel_cap(parentStrm_->param.channel_count);
-    iStreamSettings.iSampleRate = 
-			    get_clock_rate_cap(parentStrm_->param.clock_rate);
-
-    pj_assert(iStreamSettings.iChannels != 0 && 
-	      iStreamSettings.iSampleRate != 0);
-    
-    PJ_LOG(4,(THIS_FILE, "Opening sound device for playback, "
-    		         "clock rate=%d, channel count=%d..",
-    		         parentStrm_->param.clock_rate, 
-    		         parentStrm_->param.channel_count));
+    iStreamSettings.iChannels =
+        get_channel_cap (parentStrm_->param.channel_count);
+    iStreamSettings.iSampleRate =
+        get_clock_rate_cap (parentStrm_->param.clock_rate);
+
+    pj_assert (iStreamSettings.iChannels != 0 &&
+               iStreamSettings.iSampleRate != 0);
+
+    PJ_LOG (4, (THIS_FILE, "Opening sound device for playback, "
+                "clock rate=%d, channel count=%d..",
+                parentStrm_->param.clock_rate,
+                parentStrm_->param.channel_count));
 
     // Open stream.
     lastError_ = KRequestPending;
-    iOutputStream_->Open(&iStreamSettings);
+    iOutputStream_->Open (&iStreamSettings);
 
     // Success
-    PJ_LOG(4,(THIS_FILE, "Sound playback started"));
+    PJ_LOG (4, (THIS_FILE, "Sound playback started"));
     return PJ_SUCCESS;
 
 }
@@ -658,131 +674,134 @@ void CPjAudioOutputEngine::Stop()
 {
     // Stop stream if it's playing
     if (iOutputStream_ && state_ != STATE_INACTIVE) {
-    	lastError_ = KRequestPending;
-    	iOutputStream_->Stop();
+        lastError_ = KRequestPending;
+        iOutputStream_->Stop();
 
-	// Wait until it's actually stopped
-    	while (lastError_ == KRequestPending)
-	    pj_symbianos_poll(-1, 100);
+        // Wait until it's actually stopped
+        while (lastError_ == KRequestPending)
+            pj_symbianos_poll (-1, 100);
     }
-    
-    if (iOutputStream_) {	
-	delete iOutputStream_;
-	iOutputStream_ = NULL;
+
+    if (iOutputStream_) {
+        delete iOutputStream_;
+        iOutputStream_ = NULL;
     }
-    
+
     state_ = STATE_INACTIVE;
 }
 
-void CPjAudioOutputEngine::MaoscOpenComplete(TInt aError)
+void CPjAudioOutputEngine::MaoscOpenComplete (TInt aError)
 {
     lastError_ = aError;
-    
+
     if (aError==KErrNone) {
-	// output stream opened succesfully, set status to Active
-	state_ = STATE_ACTIVE;
-
-	// set stream properties, 16bit 8KHz mono
-	TMdaAudioDataSettings iSettings;
-	iSettings.iChannels = 
-			get_channel_cap(parentStrm_->param.channel_count);
-	iSettings.iSampleRate = 
-			get_clock_rate_cap(parentStrm_->param.clock_rate);
-
-	iOutputStream_->SetAudioPropertiesL(iSettings.iSampleRate, 
-					    iSettings.iChannels);
-
-	// set volume to 1/2th of stream max volume
-	iOutputStream_->SetVolume(iOutputStream_->MaxVolume()/2);
-	
-	// set stream priority to normal and time sensitive
-	iOutputStream_->SetPriority(EPriorityNormal, 
-				    EMdaPriorityPreferenceTime);				
-
-	// Call callback to retrieve frame from upstream.
-	pjmedia_frame f;
-	pj_status_t status;
-	
-	f.type = PJMEDIA_FRAME_TYPE_AUDIO;
-	f.buf = frameBuf_;
-	f.size = frameBufSize_;
-	f.timestamp.u32.lo = timestamp_;
-	f.bit_info = 0;
-
-	status = playCb_(this->userData_, &f);
-	if (status != PJ_SUCCESS) {
-	    this->Stop();
-	    return;
-	}
-
-	if (f.type != PJMEDIA_FRAME_TYPE_AUDIO)
-	    pj_bzero(frameBuf_, frameBufSize_);
-	
-	// Increment timestamp.
-	timestamp_ += (frameBufSize_ / BYTES_PER_SAMPLE);
-
-	// issue WriteL() to write the first audio data block, 
-	// subsequent calls to WriteL() will be issued in 
-	// MMdaAudioOutputStreamCallback::MaoscBufferCopied() 
-	// until whole data buffer is written.
-	frame_.Set(frameBuf_, frameBufSize_);
-	iOutputStream_->WriteL(frame_);
+        // output stream opened succesfully, set status to Active
+        state_ = STATE_ACTIVE;
+
+        // set stream properties, 16bit 8KHz mono
+        TMdaAudioDataSettings iSettings;
+        iSettings.iChannels =
+            get_channel_cap (parentStrm_->param.channel_count);
+        iSettings.iSampleRate =
+            get_clock_rate_cap (parentStrm_->param.clock_rate);
+
+        iOutputStream_->SetAudioPropertiesL (iSettings.iSampleRate,
+                                             iSettings.iChannels);
+
+        // set volume to 1/2th of stream max volume
+        iOutputStream_->SetVolume (iOutputStream_->MaxVolume() /2);
+
+        // set stream priority to normal and time sensitive
+        iOutputStream_->SetPriority (EPriorityNormal,
+                                     EMdaPriorityPreferenceTime);
+
+        // Call callback to retrieve frame from upstream.
+        pjmedia_frame f;
+        pj_status_t status;
+
+        f.type = PJMEDIA_FRAME_TYPE_AUDIO;
+        f.buf = frameBuf_;
+        f.size = frameBufSize_;
+        f.timestamp.u32.lo = timestamp_;
+        f.bit_info = 0;
+
+        status = playCb_ (this->userData_, &f);
+
+        if (status != PJ_SUCCESS) {
+            this->Stop();
+            return;
+        }
+
+        if (f.type != PJMEDIA_FRAME_TYPE_AUDIO)
+            pj_bzero (frameBuf_, frameBufSize_);
+
+        // Increment timestamp.
+        timestamp_ += (frameBufSize_ / BYTES_PER_SAMPLE);
+
+        // issue WriteL() to write the first audio data block,
+        // subsequent calls to WriteL() will be issued in
+        // MMdaAudioOutputStreamCallback::MaoscBufferCopied()
+        // until whole data buffer is written.
+        frame_.Set (frameBuf_, frameBufSize_);
+        iOutputStream_->WriteL (frame_);
     } else {
-    	snd_perror("Error in MaoscOpenComplete()", aError);
+        snd_perror ("Error in MaoscOpenComplete()", aError);
     }
 }
 
-void CPjAudioOutputEngine::MaoscBufferCopied(TInt aError, 
-					     const TDesC8& aBuffer)
+void CPjAudioOutputEngine::MaoscBufferCopied (TInt aError,
+        const TDesC8& aBuffer)
 {
-    PJ_UNUSED_ARG(aBuffer);
+    PJ_UNUSED_ARG (aBuffer);
 
     if (aError==KErrNone) {
-    	// Buffer successfully written, feed another one.
-
-	// Call callback to retrieve frame from upstream.
-	pjmedia_frame f;
-	pj_status_t status;
-	
-	f.type = PJMEDIA_FRAME_TYPE_AUDIO;
-	f.buf = frameBuf_;
-	f.size = frameBufSize_;
-	f.timestamp.u32.lo = timestamp_;
-	f.bit_info = 0;
-
-	status = playCb_(this->userData_, &f);
-	if (status != PJ_SUCCESS) {
-	    this->Stop();
-	    return;
-	}
-
-	if (f.type != PJMEDIA_FRAME_TYPE_AUDIO)
-	    pj_bzero(frameBuf_, frameBufSize_);
-	
-	// Increment timestamp.
-	timestamp_ += (frameBufSize_ / BYTES_PER_SAMPLE);
-
-	// Write to playback stream.
-	frame_.Set(frameBuf_, frameBufSize_);
-	iOutputStream_->WriteL(frame_);
+        // Buffer successfully written, feed another one.
+
+        // Call callback to retrieve frame from upstream.
+        pjmedia_frame f;
+        pj_status_t status;
+
+        f.type = PJMEDIA_FRAME_TYPE_AUDIO;
+        f.buf = frameBuf_;
+        f.size = frameBufSize_;
+        f.timestamp.u32.lo = timestamp_;
+        f.bit_info = 0;
+
+        status = playCb_ (this->userData_, &f);
+
+        if (status != PJ_SUCCESS) {
+            this->Stop();
+            return;
+        }
+
+        if (f.type != PJMEDIA_FRAME_TYPE_AUDIO)
+            pj_bzero (frameBuf_, frameBufSize_);
+
+        // Increment timestamp.
+        timestamp_ += (frameBufSize_ / BYTES_PER_SAMPLE);
+
+        // Write to playback stream.
+        frame_.Set (frameBuf_, frameBufSize_);
+        iOutputStream_->WriteL (frame_);
 
     } else if (aError==KErrAbort) {
-	// playing was aborted, due to call to CMdaAudioOutputStream::Stop()
-	state_ = STATE_INACTIVE;
+        // playing was aborted, due to call to CMdaAudioOutputStream::Stop()
+        state_ = STATE_INACTIVE;
     } else  {
-	// error writing data to output
-	lastError_ = aError;
-	state_ = STATE_INACTIVE;
-	snd_perror("Error in MaoscBufferCopied()", aError);
+        // error writing data to output
+        lastError_ = aError;
+        state_ = STATE_INACTIVE;
+        snd_perror ("Error in MaoscBufferCopied()", aError);
     }
 }
 
-void CPjAudioOutputEngine::MaoscPlayComplete(TInt aError)
+void CPjAudioOutputEngine::MaoscPlayComplete (TInt aError)
 {
     lastError_ = aError;
     state_ = STATE_INACTIVE;
+
     if (aError != KErrNone && aError != KErrCancel) {
-    	snd_perror("Error in MaoscPlayComplete()", aError);
+        snd_perror ("Error in MaoscPlayComplete()", aError);
     }
 }
 
@@ -794,19 +813,19 @@ void CPjAudioOutputEngine::MaoscPlayComplete(TInt aError)
  * C compatible declaration of MDA factory.
  */
 PJ_BEGIN_DECL
-PJ_DECL(pjmedia_aud_dev_factory*) pjmedia_symb_mda_factory(pj_pool_factory *pf);
+PJ_DECL (pjmedia_aud_dev_factory*) pjmedia_symb_mda_factory (pj_pool_factory *pf);
 PJ_END_DECL
 
 /*
  * Init Symbian audio driver.
  */
-pjmedia_aud_dev_factory* pjmedia_symb_mda_factory(pj_pool_factory *pf)
+pjmedia_aud_dev_factory* pjmedia_symb_mda_factory (pj_pool_factory *pf)
 {
     struct mda_factory *f;
     pj_pool_t *pool;
 
-    pool = pj_pool_create(pf, "symb_aud", 1000, 1000, NULL);
-    f = PJ_POOL_ZALLOC_T(pool, struct mda_factory);
+    pool = pj_pool_create (pf, "symb_aud", 1000, 1000, NULL);
+    f = PJ_POOL_ZALLOC_T (pool, struct mda_factory);
     f->pf = pf;
     f->pool = pool;
     f->base.op = &factory_op;
@@ -815,67 +834,67 @@ pjmedia_aud_dev_factory* pjmedia_symb_mda_factory(pj_pool_factory *pf)
 }
 
 /* API: init factory */
-static pj_status_t factory_init(pjmedia_aud_dev_factory *f)
+static pj_status_t factory_init (pjmedia_aud_dev_factory *f)
 {
-    struct mda_factory *af = (struct mda_factory*)f;
+    struct mda_factory *af = (struct mda_factory*) f;
 
-    pj_ansi_strcpy(af->dev_info.name, "Symbian Audio");
+    pj_ansi_strcpy (af->dev_info.name, "Symbian Audio");
     af->dev_info.default_samples_per_sec = 8000;
     af->dev_info.caps = PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING |
-			PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING;
+                        PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING;
     af->dev_info.input_count = 1;
     af->dev_info.output_count = 1;
 
-    PJ_LOG(4, (THIS_FILE, "Symb Mda initialized"));
+    PJ_LOG (4, (THIS_FILE, "Symb Mda initialized"));
 
     return PJ_SUCCESS;
 }
 
 /* API: destroy factory */
-static pj_status_t factory_destroy(pjmedia_aud_dev_factory *f)
+static pj_status_t factory_destroy (pjmedia_aud_dev_factory *f)
 {
-    struct mda_factory *af = (struct mda_factory*)f;
+    struct mda_factory *af = (struct mda_factory*) f;
     pj_pool_t *pool = af->pool;
 
     af->pool = NULL;
-    pj_pool_release(pool);
+    pj_pool_release (pool);
+
+    PJ_LOG (4, (THIS_FILE, "Symbian Mda destroyed"));
 
-    PJ_LOG(4, (THIS_FILE, "Symbian Mda destroyed"));
-    
     return PJ_SUCCESS;
 }
 
 /* API: get number of devices */
-static unsigned factory_get_dev_count(pjmedia_aud_dev_factory *f)
+static unsigned factory_get_dev_count (pjmedia_aud_dev_factory *f)
 {
-    PJ_UNUSED_ARG(f);
+    PJ_UNUSED_ARG (f);
     return 1;
 }
 
 /* API: get device info */
-static pj_status_t factory_get_dev_info(pjmedia_aud_dev_factory *f, 
-					unsigned index,
-					pjmedia_aud_dev_info *info)
+static pj_status_t factory_get_dev_info (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_dev_info *info)
 {
-    struct mda_factory *af = (struct mda_factory*)f;
+    struct mda_factory *af = (struct mda_factory*) f;
 
-    PJ_ASSERT_RETURN(index == 0, PJMEDIA_EAUD_INVDEV);
+    PJ_ASSERT_RETURN (index == 0, PJMEDIA_EAUD_INVDEV);
 
-    pj_memcpy(info, &af->dev_info, sizeof(*info));
+    pj_memcpy (info, &af->dev_info, sizeof (*info));
 
     return PJ_SUCCESS;
 }
 
 /* API: create default device parameter */
-static pj_status_t factory_default_param(pjmedia_aud_dev_factory *f,
-					 unsigned index,
-					 pjmedia_aud_param *param)
+static pj_status_t factory_default_param (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_param *param)
 {
-    struct mda_factory *af = (struct mda_factory*)f;
+    struct mda_factory *af = (struct mda_factory*) f;
 
-    PJ_ASSERT_RETURN(index == 0, PJMEDIA_EAUD_INVDEV);
+    PJ_ASSERT_RETURN (index == 0, PJMEDIA_EAUD_INVDEV);
 
-    pj_bzero(param, sizeof(*param));
+    pj_bzero (param, sizeof (*param));
     param->dir = PJMEDIA_DIR_CAPTURE_PLAYBACK;
     param->rec_id = index;
     param->play_id = index;
@@ -890,57 +909,59 @@ static pj_status_t factory_default_param(pjmedia_aud_dev_factory *f,
 
 
 /* API: create stream */
-static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
-					 const pjmedia_aud_param *param,
-					 pjmedia_aud_rec_cb rec_cb,
-					 pjmedia_aud_play_cb play_cb,
-					 void *user_data,
-					 pjmedia_aud_stream **p_aud_strm)
+static pj_status_t factory_create_stream (pjmedia_aud_dev_factory *f,
+        const pjmedia_aud_param *param,
+        pjmedia_aud_rec_cb rec_cb,
+        pjmedia_aud_play_cb play_cb,
+        void *user_data,
+        pjmedia_aud_stream **p_aud_strm)
 {
-    struct mda_factory *mf = (struct mda_factory*)f;
+    struct mda_factory *mf = (struct mda_factory*) f;
     pj_pool_t *pool;
     struct mda_stream *strm;
 
     /* Can only support 16bits per sample raw PCM format. */
-    PJ_ASSERT_RETURN(param->bits_per_sample == BITS_PER_SAMPLE, PJ_EINVAL);
-    PJ_ASSERT_RETURN((param->flags & PJMEDIA_AUD_DEV_CAP_EXT_FORMAT)==0 ||
-		     param->ext_fmt.id == PJMEDIA_FORMAT_L16,
-		     PJ_ENOTSUP);
-    
+    PJ_ASSERT_RETURN (param->bits_per_sample == BITS_PER_SAMPLE, PJ_EINVAL);
+    PJ_ASSERT_RETURN ( (param->flags & PJMEDIA_AUD_DEV_CAP_EXT_FORMAT) ==0 ||
+                       param->ext_fmt.id == PJMEDIA_FORMAT_L16,
+                       PJ_ENOTSUP);
+
     /* It seems that MDA recorder only supports for mono channel. */
-    PJ_ASSERT_RETURN(param->channel_count == 1, PJ_EINVAL);
+    PJ_ASSERT_RETURN (param->channel_count == 1, PJ_EINVAL);
 
     /* Create and Initialize stream descriptor */
-    pool = pj_pool_create(mf->pf, "symb_aud_dev", 1000, 1000, NULL);
-    PJ_ASSERT_RETURN(pool, PJ_ENOMEM);
+    pool = pj_pool_create (mf->pf, "symb_aud_dev", 1000, 1000, NULL);
+    PJ_ASSERT_RETURN (pool, PJ_ENOMEM);
 
-    strm = PJ_POOL_ZALLOC_T(pool, struct mda_stream);
+    strm = PJ_POOL_ZALLOC_T (pool, struct mda_stream);
     strm->pool = pool;
     strm->param = *param;
 
     // Create the output stream.
     if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	TRAPD(err, strm->out_engine = CPjAudioOutputEngine::NewL(strm, play_cb,
-								 user_data));
-	if (err != KErrNone) {
-	    pj_pool_release(pool);	
-	    return PJ_RETURN_OS_ERROR(err);
-	}
+        TRAPD (err, strm->out_engine = CPjAudioOutputEngine::NewL (strm, play_cb,
+                                       user_data));
+
+        if (err != KErrNone) {
+            pj_pool_release (pool);
+            return PJ_RETURN_OS_ERROR (err);
+        }
     }
 
     // Create the input stream.
     if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	TRAPD(err, strm->in_engine = CPjAudioInputEngine::NewL(strm, rec_cb, 
-							       user_data));
-	if (err != KErrNone) {
-	    strm->in_engine = NULL;
-	    delete strm->out_engine;
-	    strm->out_engine = NULL;
-	    pj_pool_release(pool);	
-	    return PJ_RETURN_OS_ERROR(err);
-	}
+        TRAPD (err, strm->in_engine = CPjAudioInputEngine::NewL (strm, rec_cb,
+                                      user_data));
+
+        if (err != KErrNone) {
+            strm->in_engine = NULL;
+            delete strm->out_engine;
+            strm->out_engine = NULL;
+            pj_pool_release (pool);
+            return PJ_RETURN_OS_ERROR (err);
+        }
     }
-	
+
     /* Done */
     strm->base.op = &stream_op;
     *p_aud_strm = &strm->base;
@@ -949,151 +970,163 @@ static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
 }
 
 /* API: Get stream info. */
-static pj_status_t stream_get_param(pjmedia_aud_stream *s,
-				    pjmedia_aud_param *pi)
+static pj_status_t stream_get_param (pjmedia_aud_stream *s,
+                                     pjmedia_aud_param *pi)
 {
-    struct mda_stream *strm = (struct mda_stream*)s;
+    struct mda_stream *strm = (struct mda_stream*) s;
 
-    PJ_ASSERT_RETURN(strm && pi, PJ_EINVAL);
+    PJ_ASSERT_RETURN (strm && pi, PJ_EINVAL);
+
+    pj_memcpy (pi, &strm->param, sizeof (*pi));
 
-    pj_memcpy(pi, &strm->param, sizeof(*pi));
-    
     return PJ_SUCCESS;
 }
 
 /* API: get capability */
-static pj_status_t stream_get_cap(pjmedia_aud_stream *s,
-				  pjmedia_aud_dev_cap cap,
-				  void *pval)
+static pj_status_t stream_get_cap (pjmedia_aud_stream *s,
+                                   pjmedia_aud_dev_cap cap,
+                                   void *pval)
 {
-    struct mda_stream *strm = (struct mda_stream*)s;
+    struct mda_stream *strm = (struct mda_stream*) s;
     pj_status_t status = PJ_ENOTSUP;
 
-    PJ_ASSERT_RETURN(s && pval, PJ_EINVAL);
+    PJ_ASSERT_RETURN (s && pval, PJ_EINVAL);
 
     switch (cap) {
-    case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	    PJ_ASSERT_RETURN(strm->in_engine, PJ_EINVAL);
-	    
-	    TInt max_gain = strm->in_engine->GetMaxGain();
-	    TInt gain = strm->in_engine->GetGain();
-	    
-	    if (max_gain > 0 && gain >= 0) {
-		*(unsigned*)pval = gain * 100 / max_gain; 
-		status = PJ_SUCCESS;
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	}
-	break;
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    PJ_ASSERT_RETURN(strm->out_engine, PJ_EINVAL);
-	    
-	    TInt max_vol = strm->out_engine->GetMaxVolume();
-	    TInt vol = strm->out_engine->GetVolume();
-	    
-	    if (max_vol > 0 && vol >= 0) {
-		*(unsigned*)pval = vol * 100 / max_vol; 
-		status = PJ_SUCCESS;
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	}
-	break;
-    default:
-	break;
+        case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
+
+            if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
+                PJ_ASSERT_RETURN (strm->in_engine, PJ_EINVAL);
+
+                TInt max_gain = strm->in_engine->GetMaxGain();
+                TInt gain = strm->in_engine->GetGain();
+
+                if (max_gain > 0 && gain >= 0) {
+                    * (unsigned*) pval = gain * 100 / max_gain;
+                    status = PJ_SUCCESS;
+                } else {
+                    status = PJMEDIA_EAUD_NOTREADY;
+                }
+            }
+
+            break;
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
+
+            if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+                PJ_ASSERT_RETURN (strm->out_engine, PJ_EINVAL);
+
+                TInt max_vol = strm->out_engine->GetMaxVolume();
+                TInt vol = strm->out_engine->GetVolume();
+
+                if (max_vol > 0 && vol >= 0) {
+                    * (unsigned*) pval = vol * 100 / max_vol;
+                    status = PJ_SUCCESS;
+                } else {
+                    status = PJMEDIA_EAUD_NOTREADY;
+                }
+            }
+
+            break;
+        default:
+            break;
     }
-    
+
     return status;
 }
 
 /* API: set capability */
-static pj_status_t stream_set_cap(pjmedia_aud_stream *s,
-				  pjmedia_aud_dev_cap cap,
-				  const void *pval)
+static pj_status_t stream_set_cap (pjmedia_aud_stream *s,
+                                   pjmedia_aud_dev_cap cap,
+                                   const void *pval)
 {
-    struct mda_stream *strm = (struct mda_stream*)s;
+    struct mda_stream *strm = (struct mda_stream*) s;
     pj_status_t status = PJ_ENOTSUP;
 
-    PJ_ASSERT_RETURN(s && pval, PJ_EINVAL);
+    PJ_ASSERT_RETURN (s && pval, PJ_EINVAL);
 
     switch (cap) {
-    case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	    PJ_ASSERT_RETURN(strm->in_engine, PJ_EINVAL);
-	    
-	    TInt max_gain = strm->in_engine->GetMaxGain();
-	    if (max_gain > 0) {
-		TInt gain;
-		
-		gain = *(unsigned*)pval * max_gain / 100;
-		status = strm->in_engine->SetGain(gain);
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	}
-	break;
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	    PJ_ASSERT_RETURN(strm->out_engine, PJ_EINVAL);
-	    
-	    TInt max_vol = strm->out_engine->GetMaxVolume();
-	    if (max_vol > 0) {
-		TInt vol;
-		
-		vol = *(unsigned*)pval * max_vol / 100;
-		status = strm->out_engine->SetVolume(vol);
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	}
-	break;
-    default:
-	break;
+        case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
+
+            if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
+                PJ_ASSERT_RETURN (strm->in_engine, PJ_EINVAL);
+
+                TInt max_gain = strm->in_engine->GetMaxGain();
+
+                if (max_gain > 0) {
+                    TInt gain;
+
+                    gain = * (unsigned*) pval * max_gain / 100;
+                    status = strm->in_engine->SetGain (gain);
+                } else {
+                    status = PJMEDIA_EAUD_NOTREADY;
+                }
+            }
+
+            break;
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
+
+            if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
+                PJ_ASSERT_RETURN (strm->out_engine, PJ_EINVAL);
+
+                TInt max_vol = strm->out_engine->GetMaxVolume();
+
+                if (max_vol > 0) {
+                    TInt vol;
+
+                    vol = * (unsigned*) pval * max_vol / 100;
+                    status = strm->out_engine->SetVolume (vol);
+                } else {
+                    status = PJMEDIA_EAUD_NOTREADY;
+                }
+            }
+
+            break;
+        default:
+            break;
     }
-    
+
     return status;
 }
 
 /* API: Start stream. */
-static pj_status_t stream_start(pjmedia_aud_stream *strm)
+static pj_status_t stream_start (pjmedia_aud_stream *strm)
 {
-    struct mda_stream *stream = (struct mda_stream*)strm;
+    struct mda_stream *stream = (struct mda_stream*) strm;
 
-    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+    PJ_ASSERT_RETURN (stream, PJ_EINVAL);
 
     if (stream->out_engine) {
-	pj_status_t status;
-    	status = stream->out_engine->StartPlay();
-    	if (status != PJ_SUCCESS)
-    	    return status;
+        pj_status_t status;
+        status = stream->out_engine->StartPlay();
+
+        if (status != PJ_SUCCESS)
+            return status;
     }
-    
+
     if (stream->in_engine) {
-	pj_status_t status;
-    	status = stream->in_engine->StartRecord();
-    	if (status != PJ_SUCCESS)
-    	    return status;
+        pj_status_t status;
+        status = stream->in_engine->StartRecord();
+
+        if (status != PJ_SUCCESS)
+            return status;
     }
 
     return PJ_SUCCESS;
 }
 
 /* API: Stop stream. */
-static pj_status_t stream_stop(pjmedia_aud_stream *strm)
+static pj_status_t stream_stop (pjmedia_aud_stream *strm)
 {
-    struct mda_stream *stream = (struct mda_stream*)strm;
+    struct mda_stream *stream = (struct mda_stream*) strm;
 
-    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+    PJ_ASSERT_RETURN (stream, PJ_EINVAL);
 
     if (stream->in_engine) {
-    	stream->in_engine->Stop();
+        stream->in_engine->Stop();
     }
-    	
+
     if (stream->out_engine) {
-    	stream->out_engine->Stop();
+        stream->out_engine->Stop();
     }
 
     return PJ_SUCCESS;
@@ -1101,13 +1134,13 @@ static pj_status_t stream_stop(pjmedia_aud_stream *strm)
 
 
 /* API: Destroy stream. */
-static pj_status_t stream_destroy(pjmedia_aud_stream *strm)
+static pj_status_t stream_destroy (pjmedia_aud_stream *strm)
 {
-    struct mda_stream *stream = (struct mda_stream*)strm;
+    struct mda_stream *stream = (struct mda_stream*) strm;
 
-    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+    PJ_ASSERT_RETURN (stream, PJ_EINVAL);
 
-    stream_stop(strm);
+    stream_stop (strm);
 
     delete stream->in_engine;
     stream->in_engine = NULL;
@@ -1117,9 +1150,10 @@ static pj_status_t stream_destroy(pjmedia_aud_stream *strm)
 
     pj_pool_t *pool;
     pool = stream->pool;
+
     if (pool) {
-    	stream->pool = NULL;
-    	pj_pool_release(pool);
+        stream->pool = NULL;
+        pj_pool_release (pool);
     }
 
     return PJ_SUCCESS;
diff --git a/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_vas_dev.cpp b/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_vas_dev.cpp
index 74dcc5451ac339a4f88de4889705a78b2ca4479f..793042dc19898e672bc4d7a3909b455c99c55a6e 100644
--- a/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_vas_dev.cpp
+++ b/sflphone-common/libs/pjproject/pjmedia/src/pjmedia-audiodev/symb_vas_dev.cpp
@@ -1,5 +1,5 @@
 /* $Id: symb_vas_dev.cpp 3025 2009-11-24 12:24:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -51,10 +51,10 @@
 #include <VoIPILBCDecoderIntfc.h>
 #include <VoIPILBCEncoderIntfc.h>
 
-/* AMR helper */  
+/* AMR helper */
 #include <pjmedia-codec/amr_helper.h>
 
-/* Pack/unpack G.729 frame of S60 DSP codec, taken from:  
+/* Pack/unpack G.729 frame of S60 DSP codec, taken from:
  * http://wiki.forum.nokia.com/index.php/TSS000776_-_Payload_conversion_for_G.729_audio_format
  */
 #include "s60_g729_bitstream.h"
@@ -81,8 +81,7 @@ static pj_uint8_t vas_g711_frame_len;
 
 
 /* VAS factory */
-struct vas_factory
-{
+struct vas_factory {
     pjmedia_aud_dev_factory	 base;
     pj_pool_t			*pool;
     pj_pool_factory		*pf;
@@ -95,11 +94,10 @@ class CPjAudioEngine;
 
 
 /* VAS stream. */
-struct vas_stream
-{
+struct vas_stream {
     // Base
     pjmedia_aud_stream	 base;			/**< Base class.	*/
-    
+
     // Pool
     pj_pool_t		*pool;			/**< Memory pool.       */
 
@@ -122,7 +120,7 @@ struct vas_stream
     pj_uint16_t		 rec_buf_len;		/**< Record buffer length. */
     void                *strm_data;		/**< Stream data.	*/
 
-    /* Resampling is needed, in case audio device is opened with clock rate 
+    /* Resampling is needed, in case audio device is opened with clock rate
      * other than 8kHz (only for PCM format).
      */
     pjmedia_resample	*play_resample;		/**< Resampler for playback. */
@@ -139,38 +137,37 @@ struct vas_stream
 
 
 /* Prototypes */
-static pj_status_t factory_init(pjmedia_aud_dev_factory *f);
-static pj_status_t factory_destroy(pjmedia_aud_dev_factory *f);
-static unsigned    factory_get_dev_count(pjmedia_aud_dev_factory *f);
-static pj_status_t factory_get_dev_info(pjmedia_aud_dev_factory *f, 
-					unsigned index,
-					pjmedia_aud_dev_info *info);
-static pj_status_t factory_default_param(pjmedia_aud_dev_factory *f,
-					 unsigned index,
-					 pjmedia_aud_param *param);
-static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
-					 const pjmedia_aud_param *param,
-					 pjmedia_aud_rec_cb rec_cb,
-					 pjmedia_aud_play_cb play_cb,
-					 void *user_data,
-					 pjmedia_aud_stream **p_aud_strm);
-
-static pj_status_t stream_get_param(pjmedia_aud_stream *strm,
-				    pjmedia_aud_param *param);
-static pj_status_t stream_get_cap(pjmedia_aud_stream *strm,
-				  pjmedia_aud_dev_cap cap,
-				  void *value);
-static pj_status_t stream_set_cap(pjmedia_aud_stream *strm,
-				  pjmedia_aud_dev_cap cap,
-				  const void *value);
-static pj_status_t stream_start(pjmedia_aud_stream *strm);
-static pj_status_t stream_stop(pjmedia_aud_stream *strm);
-static pj_status_t stream_destroy(pjmedia_aud_stream *strm);
+static pj_status_t factory_init (pjmedia_aud_dev_factory *f);
+static pj_status_t factory_destroy (pjmedia_aud_dev_factory *f);
+static unsigned    factory_get_dev_count (pjmedia_aud_dev_factory *f);
+static pj_status_t factory_get_dev_info (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_dev_info *info);
+static pj_status_t factory_default_param (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_param *param);
+static pj_status_t factory_create_stream (pjmedia_aud_dev_factory *f,
+        const pjmedia_aud_param *param,
+        pjmedia_aud_rec_cb rec_cb,
+        pjmedia_aud_play_cb play_cb,
+        void *user_data,
+        pjmedia_aud_stream **p_aud_strm);
+
+static pj_status_t stream_get_param (pjmedia_aud_stream *strm,
+                                     pjmedia_aud_param *param);
+static pj_status_t stream_get_cap (pjmedia_aud_stream *strm,
+                                   pjmedia_aud_dev_cap cap,
+                                   void *value);
+static pj_status_t stream_set_cap (pjmedia_aud_stream *strm,
+                                   pjmedia_aud_dev_cap cap,
+                                   const void *value);
+static pj_status_t stream_start (pjmedia_aud_stream *strm);
+static pj_status_t stream_stop (pjmedia_aud_stream *strm);
+static pj_status_t stream_destroy (pjmedia_aud_stream *strm);
 
 
 /* Operations */
-static pjmedia_aud_dev_factory_op factory_op =
-{
+static pjmedia_aud_dev_factory_op factory_op = {
     &factory_init,
     &factory_destroy,
     &factory_get_dev_count,
@@ -179,8 +176,7 @@ static pjmedia_aud_dev_factory_op factory_op =
     &factory_create_stream
 };
 
-static pjmedia_aud_stream_op stream_op = 
-{
+static pjmedia_aud_stream_op stream_op = {
     &stream_get_param,
     &stream_get_cap,
     &stream_set_cap,
@@ -197,277 +193,298 @@ static pjmedia_aud_stream_op stream_op =
 /*
  * Utility: print sound device error
  */
-static void snd_perror(const char *title, TInt rc)
+static void snd_perror (const char *title, TInt rc)
 {
-    PJ_LOG(1,(THIS_FILE, "%s (error code=%d)", title, rc));
+    PJ_LOG (1, (THIS_FILE, "%s (error code=%d)", title, rc));
 }
 
-typedef void(*PjAudioCallback)(CVoIPDataBuffer *buf, void *user_data);
+typedef void (*PjAudioCallback) (CVoIPDataBuffer *buf, void *user_data);
 
 /*
  * Audio setting for CPjAudioEngine.
  */
 class CPjAudioSetting
 {
-public:
-    TVoIPCodecFormat	 format;
-    TInt		 mode;
-    TBool		 plc;
-    TBool		 vad;
-    TBool		 cng;
-    TBool		 loudspk;
+    public:
+        TVoIPCodecFormat	 format;
+        TInt		 mode;
+        TBool		 plc;
+        TBool		 vad;
+        TBool		 cng;
+        TBool		 loudspk;
 };
 
 /*
  * Implementation: Symbian Input & Output Stream.
  */
 class CPjAudioEngine :  public CBase,
-			public MVoIPDownlinkObserver,
-			public MVoIPUplinkObserver,
-			public MVoIPFormatObserver
+        public MVoIPDownlinkObserver,
+        public MVoIPUplinkObserver,
+        public MVoIPFormatObserver
 {
-public:
-    enum State
-    {
-	STATE_NULL,
-	STATE_STARTING,
-	STATE_READY,
-	STATE_STREAMING
-    };
-
-    ~CPjAudioEngine();
-
-    static CPjAudioEngine *NewL(struct vas_stream *parent_strm,
-			        PjAudioCallback rec_cb,
-				PjAudioCallback play_cb,
-				void *user_data,
-				const CPjAudioSetting &setting);
-
-    TInt Start();
-    void Stop();
-
-    TInt ActivateSpeaker(TBool active);
-    
-    TInt SetVolume(TInt vol) { return iVoIPDnlink->SetVolume(vol); }
-    TInt GetVolume() { TInt vol;iVoIPDnlink->GetVolume(vol);return vol; }
-    TInt GetMaxVolume() { TInt vol;iVoIPDnlink->GetMaxVolume(vol);return vol; }
-    
-    TInt SetGain(TInt gain) { return iVoIPUplink->SetGain(gain); }
-    TInt GetGain() { TInt gain;iVoIPUplink->GetGain(gain);return gain; }
-    TInt GetMaxGain() { TInt gain;iVoIPUplink->GetMaxGain(gain);return gain; }
-
-    TBool IsStarted();
-    
-private:
-    CPjAudioEngine(struct vas_stream *parent_strm,
-		   PjAudioCallback rec_cb,
-		   PjAudioCallback play_cb,
-		   void *user_data,
-		   const CPjAudioSetting &setting);
-    void ConstructL();
-
-    TInt InitPlay();
-    TInt InitRec();
-
-    TInt StartPlay();
-    TInt StartRec();
-
-    // From MVoIPDownlinkObserver
-    void FillBuffer(const CVoIPAudioDownlinkStream& aSrc,
-                            CVoIPDataBuffer* aBuffer);
-    void Event(const CVoIPAudioDownlinkStream& aSrc,
-                       TInt aEventType,
-                       TInt aError);
-
-    // From MVoIPUplinkObserver
-    void EmptyBuffer(const CVoIPAudioUplinkStream& aSrc,
-                             CVoIPDataBuffer* aBuffer);
-    void Event(const CVoIPAudioUplinkStream& aSrc,
-                       TInt aEventType,
-                       TInt aError);
-
-    // From MVoIPFormatObserver
-    void Event(const CVoIPFormatIntfc& aSrc, TInt aEventType);
-
-    State			 dn_state_;
-    State			 up_state_;
-    struct vas_stream		*parentStrm_;
-    CPjAudioSetting		 setting_;
-    PjAudioCallback 		 rec_cb_;
-    PjAudioCallback 		 play_cb_;
-    void 			*user_data_;
-
-    // VAS objects
-    CVoIPUtilityFactory         *iFactory;
-    CVoIPAudioDownlinkStream    *iVoIPDnlink;
-    CVoIPAudioUplinkStream      *iVoIPUplink;
-    CVoIPFormatIntfc		*enc_fmt_if;
-    CVoIPFormatIntfc		*dec_fmt_if;
+    public:
+        enum State {
+            STATE_NULL,
+            STATE_STARTING,
+            STATE_READY,
+            STATE_STREAMING
+        };
+
+        ~CPjAudioEngine();
+
+        static CPjAudioEngine *NewL (struct vas_stream *parent_strm,
+                                     PjAudioCallback rec_cb,
+                                     PjAudioCallback play_cb,
+                                     void *user_data,
+                                     const CPjAudioSetting &setting);
+
+        TInt Start();
+        void Stop();
+
+        TInt ActivateSpeaker (TBool active);
+
+        TInt SetVolume (TInt vol) {
+            return iVoIPDnlink->SetVolume (vol);
+        }
+        TInt GetVolume() {
+            TInt vol;
+            iVoIPDnlink->GetVolume (vol);
+            return vol;
+        }
+        TInt GetMaxVolume() {
+            TInt vol;
+            iVoIPDnlink->GetMaxVolume (vol);
+            return vol;
+        }
+
+        TInt SetGain (TInt gain) {
+            return iVoIPUplink->SetGain (gain);
+        }
+        TInt GetGain() {
+            TInt gain;
+            iVoIPUplink->GetGain (gain);
+            return gain;
+        }
+        TInt GetMaxGain() {
+            TInt gain;
+            iVoIPUplink->GetMaxGain (gain);
+            return gain;
+        }
+
+        TBool IsStarted();
+
+    private:
+        CPjAudioEngine (struct vas_stream *parent_strm,
+                        PjAudioCallback rec_cb,
+                        PjAudioCallback play_cb,
+                        void *user_data,
+                        const CPjAudioSetting &setting);
+        void ConstructL();
+
+        TInt InitPlay();
+        TInt InitRec();
+
+        TInt StartPlay();
+        TInt StartRec();
+
+        // From MVoIPDownlinkObserver
+        void FillBuffer (const CVoIPAudioDownlinkStream& aSrc,
+                         CVoIPDataBuffer* aBuffer);
+        void Event (const CVoIPAudioDownlinkStream& aSrc,
+                    TInt aEventType,
+                    TInt aError);
+
+        // From MVoIPUplinkObserver
+        void EmptyBuffer (const CVoIPAudioUplinkStream& aSrc,
+                          CVoIPDataBuffer* aBuffer);
+        void Event (const CVoIPAudioUplinkStream& aSrc,
+                    TInt aEventType,
+                    TInt aError);
+
+        // From MVoIPFormatObserver
+        void Event (const CVoIPFormatIntfc& aSrc, TInt aEventType);
+
+        State			 dn_state_;
+        State			 up_state_;
+        struct vas_stream		*parentStrm_;
+        CPjAudioSetting		 setting_;
+        PjAudioCallback 		 rec_cb_;
+        PjAudioCallback 		 play_cb_;
+        void 			*user_data_;
+
+        // VAS objects
+        CVoIPUtilityFactory         *iFactory;
+        CVoIPAudioDownlinkStream    *iVoIPDnlink;
+        CVoIPAudioUplinkStream      *iVoIPUplink;
+        CVoIPFormatIntfc		*enc_fmt_if;
+        CVoIPFormatIntfc		*dec_fmt_if;
 };
 
 
-CPjAudioEngine* CPjAudioEngine::NewL(struct vas_stream *parent_strm,
-				     PjAudioCallback rec_cb,
-				     PjAudioCallback play_cb,
-				     void *user_data,
-				     const CPjAudioSetting &setting)
+CPjAudioEngine* CPjAudioEngine::NewL (struct vas_stream *parent_strm,
+                                      PjAudioCallback rec_cb,
+                                      PjAudioCallback play_cb,
+                                      void *user_data,
+                                      const CPjAudioSetting &setting)
 {
-    CPjAudioEngine* self = new (ELeave) CPjAudioEngine(parent_strm,
-						       rec_cb, play_cb,
-						       user_data,
-						       setting);
-    CleanupStack::PushL(self);
+    CPjAudioEngine* self = new (ELeave) CPjAudioEngine (parent_strm,
+            rec_cb, play_cb,
+            user_data,
+            setting);
+    CleanupStack::PushL (self);
     self->ConstructL();
-    CleanupStack::Pop(self);
+    CleanupStack::Pop (self);
     return self;
 }
 
 void CPjAudioEngine::ConstructL()
 {
     TInt err;
-    const TVersion ver(1, 0, 0); /* Not really used at this time */
+    const TVersion ver (1, 0, 0); /* Not really used at this time */
 
-    err = CVoIPUtilityFactory::CreateFactory(iFactory);
-    User::LeaveIfError(err);
+    err = CVoIPUtilityFactory::CreateFactory (iFactory);
+    User::LeaveIfError (err);
 
     if (parentStrm_->param.dir != PJMEDIA_DIR_CAPTURE) {
-	err = iFactory->CreateDownlinkStream(ver, 
-					     CVoIPUtilityFactory::EVoIPCall,
-					     iVoIPDnlink);
-	User::LeaveIfError(err);
+        err = iFactory->CreateDownlinkStream (ver,
+                                              CVoIPUtilityFactory::EVoIPCall,
+                                              iVoIPDnlink);
+        User::LeaveIfError (err);
     }
 
     if (parentStrm_->param.dir != PJMEDIA_DIR_PLAYBACK) {
-	err = iFactory->CreateUplinkStream(ver, 
-					   CVoIPUtilityFactory::EVoIPCall,
-					   iVoIPUplink);
-	User::LeaveIfError(err);
+        err = iFactory->CreateUplinkStream (ver,
+                                            CVoIPUtilityFactory::EVoIPCall,
+                                            iVoIPUplink);
+        User::LeaveIfError (err);
     }
 }
 
-CPjAudioEngine::CPjAudioEngine(struct vas_stream *parent_strm,
-			       PjAudioCallback rec_cb,
-			       PjAudioCallback play_cb,
-			       void *user_data,
-			       const CPjAudioSetting &setting)
-      : dn_state_(STATE_NULL),
-        up_state_(STATE_NULL),
-	parentStrm_(parent_strm),
-	setting_(setting),
-        rec_cb_(rec_cb),
-        play_cb_(play_cb),
-        user_data_(user_data),
-        iFactory(NULL),
-        iVoIPDnlink(NULL),
-        iVoIPUplink(NULL),
-        enc_fmt_if(NULL),
-        dec_fmt_if(NULL)
+CPjAudioEngine::CPjAudioEngine (struct vas_stream *parent_strm,
+                                PjAudioCallback rec_cb,
+                                PjAudioCallback play_cb,
+                                void *user_data,
+                                const CPjAudioSetting &setting)
+        : dn_state_ (STATE_NULL),
+        up_state_ (STATE_NULL),
+        parentStrm_ (parent_strm),
+        setting_ (setting),
+        rec_cb_ (rec_cb),
+        play_cb_ (play_cb),
+        user_data_ (user_data),
+        iFactory (NULL),
+        iVoIPDnlink (NULL),
+        iVoIPUplink (NULL),
+        enc_fmt_if (NULL),
+        dec_fmt_if (NULL)
 {
 }
 
 CPjAudioEngine::~CPjAudioEngine()
 {
     Stop();
-    
+
     if (iVoIPUplink)
-	iVoIPUplink->Close();
-    
+        iVoIPUplink->Close();
+
     if (iVoIPDnlink)
-	iVoIPDnlink->Close();
+        iVoIPDnlink->Close();
 
     delete iVoIPDnlink;
     delete iVoIPUplink;
     delete iFactory;
-    
-    TRACE_((THIS_FILE, "Sound device destroyed"));
+
+    TRACE_ ( (THIS_FILE, "Sound device destroyed"));
 }
 
 TBool CPjAudioEngine::IsStarted()
 {
-    return ((((parentStrm_->param.dir & PJMEDIA_DIR_CAPTURE) == 0) || 
-	       up_state_ == STATE_STREAMING) &&
-	    (((parentStrm_->param.dir & PJMEDIA_DIR_PLAYBACK) == 0) || 
-	       dn_state_ == STATE_STREAMING));
+    return ( ( ( (parentStrm_->param.dir & PJMEDIA_DIR_CAPTURE) == 0) ||
+               up_state_ == STATE_STREAMING) &&
+             ( ( (parentStrm_->param.dir & PJMEDIA_DIR_PLAYBACK) == 0) ||
+               dn_state_ == STATE_STREAMING));
 }
 
 TInt CPjAudioEngine::InitPlay()
 {
     TInt err;
 
-    pj_assert(iVoIPDnlink);
+    pj_assert (iVoIPDnlink);
+
+    err = iVoIPDnlink->SetFormat (setting_.format, dec_fmt_if);
 
-    err = iVoIPDnlink->SetFormat(setting_.format, dec_fmt_if);
     if (err != KErrNone)
-	return err;
-    
-    err = dec_fmt_if->SetObserver(*this);
+        return err;
+
+    err = dec_fmt_if->SetObserver (*this);
+
     if (err != KErrNone)
-	return err;
+        return err;
 
-    return iVoIPDnlink->Open(*this);
+    return iVoIPDnlink->Open (*this);
 }
 
 TInt CPjAudioEngine::InitRec()
 {
     TInt err;
-    
-    pj_assert(iVoIPUplink);
 
-    err = iVoIPUplink->SetFormat(setting_.format, enc_fmt_if);
+    pj_assert (iVoIPUplink);
+
+    err = iVoIPUplink->SetFormat (setting_.format, enc_fmt_if);
+
     if (err != KErrNone)
-	return err;
-    
-    err = enc_fmt_if->SetObserver(*this);
+        return err;
+
+    err = enc_fmt_if->SetObserver (*this);
+
     if (err != KErrNone)
-	return err;
-    
-    return iVoIPUplink->Open(*this);
+        return err;
+
+    return iVoIPUplink->Open (*this);
 }
 
 TInt CPjAudioEngine::StartPlay()
 {
     TInt err;
-    
-    pj_assert(iVoIPDnlink);
-    pj_assert(dn_state_ == STATE_READY);
+
+    pj_assert (iVoIPDnlink);
+    pj_assert (dn_state_ == STATE_READY);
 
     /* Configure specific codec setting */
     switch (setting_.format) {
-    case EG711:
-	{
-	    CVoIPG711DecoderIntfc *g711dec_if = (CVoIPG711DecoderIntfc*)
-						dec_fmt_if;
-	    err = g711dec_if->SetMode((CVoIPFormatIntfc::TG711CodecMode)
-				      setting_.mode);
-	    pj_assert(err == KErrNone);
-	}
-	break;
-	
-    case EILBC:
-	{
-	    CVoIPILBCDecoderIntfc *ilbcdec_if = (CVoIPILBCDecoderIntfc*)
-						dec_fmt_if;
-	    err = ilbcdec_if->SetMode((CVoIPFormatIntfc::TILBCCodecMode)
-				      setting_.mode);
-	    pj_assert(err == KErrNone);
-	}
-	break;
-
-    default:
-	break;
+        case EG711: {
+            CVoIPG711DecoderIntfc *g711dec_if = (CVoIPG711DecoderIntfc*)
+                                                dec_fmt_if;
+            err = g711dec_if->SetMode ( (CVoIPFormatIntfc::TG711CodecMode)
+                                        setting_.mode);
+            pj_assert (err == KErrNone);
+        }
+        break;
+
+        case EILBC: {
+            CVoIPILBCDecoderIntfc *ilbcdec_if = (CVoIPILBCDecoderIntfc*)
+                                                dec_fmt_if;
+            err = ilbcdec_if->SetMode ( (CVoIPFormatIntfc::TILBCCodecMode)
+                                        setting_.mode);
+            pj_assert (err == KErrNone);
+        }
+        break;
+
+        default:
+            break;
     }
-    
+
     /* Configure audio routing */
-    ActivateSpeaker(setting_.loudspk);
+    ActivateSpeaker (setting_.loudspk);
 
     /* Start player */
     err = iVoIPDnlink->Start();
-    
+
     if (err == KErrNone) {
-	dn_state_ = STATE_STREAMING;
-	TRACE_((THIS_FILE, "Downlink started"));
+        dn_state_ = STATE_STREAMING;
+        TRACE_ ( (THIS_FILE, "Downlink started"));
     } else {
-	snd_perror("Failed starting downlink", err);
+        snd_perror ("Failed starting downlink", err);
     }
 
     return err;
@@ -476,47 +493,45 @@ TInt CPjAudioEngine::StartPlay()
 TInt CPjAudioEngine::StartRec()
 {
     TInt err;
-    
-    pj_assert(iVoIPUplink);
-    pj_assert(up_state_ == STATE_READY);
+
+    pj_assert (iVoIPUplink);
+    pj_assert (up_state_ == STATE_READY);
 
     /* Configure specific codec setting */
     switch (setting_.format) {
-    case EG711:
-	{
-	    CVoIPG711EncoderIntfc *g711enc_if = (CVoIPG711EncoderIntfc*)
-						enc_fmt_if;
-	    err = g711enc_if->SetMode((CVoIPFormatIntfc::TG711CodecMode)
-				      setting_.mode);
-	    pj_assert(err == KErrNone);
-	}
-	break;
-
-    case EILBC:
-	{
-	    CVoIPILBCEncoderIntfc *ilbcenc_if = (CVoIPILBCEncoderIntfc*)
-						enc_fmt_if;
-	    err = ilbcenc_if->SetMode((CVoIPFormatIntfc::TILBCCodecMode)
-				      setting_.mode);
-	    pj_assert(err == KErrNone);
-	}
-	break;
-	
-    default:
-	break;
+        case EG711: {
+            CVoIPG711EncoderIntfc *g711enc_if = (CVoIPG711EncoderIntfc*)
+                                                enc_fmt_if;
+            err = g711enc_if->SetMode ( (CVoIPFormatIntfc::TG711CodecMode)
+                                        setting_.mode);
+            pj_assert (err == KErrNone);
+        }
+        break;
+
+        case EILBC: {
+            CVoIPILBCEncoderIntfc *ilbcenc_if = (CVoIPILBCEncoderIntfc*)
+                                                enc_fmt_if;
+            err = ilbcenc_if->SetMode ( (CVoIPFormatIntfc::TILBCCodecMode)
+                                        setting_.mode);
+            pj_assert (err == KErrNone);
+        }
+        break;
+
+        default:
+            break;
     }
-    
+
     /* Configure general codec setting */
-    enc_fmt_if->SetVAD(setting_.vad);
-    
+    enc_fmt_if->SetVAD (setting_.vad);
+
     /* Start recorder */
     err = iVoIPUplink->Start();
-    
+
     if (err == KErrNone) {
-	up_state_ = STATE_STREAMING;
-	TRACE_((THIS_FILE, "Uplink started"));
+        up_state_ = STATE_STREAMING;
+        TRACE_ ( (THIS_FILE, "Uplink started"));
     } else {
-	snd_perror("Failed starting uplink", err);
+        snd_perror ("Failed starting uplink", err);
     }
 
     return err;
@@ -525,37 +540,41 @@ TInt CPjAudioEngine::StartRec()
 TInt CPjAudioEngine::Start()
 {
     TInt err = KErrNone;
-    
+
     if (iVoIPDnlink) {
-	switch(dn_state_) {
-	case STATE_READY:
-	    err = StartPlay();
-	    break;
-	case STATE_NULL:
-	    err = InitPlay();
-	    if (err != KErrNone)
-		return err;
-	    dn_state_ = STATE_STARTING;
-	    break;
-	default:
-	    break;
-	}
+        switch (dn_state_) {
+            case STATE_READY:
+                err = StartPlay();
+                break;
+            case STATE_NULL:
+                err = InitPlay();
+
+                if (err != KErrNone)
+                    return err;
+
+                dn_state_ = STATE_STARTING;
+                break;
+            default:
+                break;
+        }
     }
-    
+
     if (iVoIPUplink) {
-	switch(up_state_) {
-	case STATE_READY:
-	    err = StartRec();
-	    break;
-	case STATE_NULL:
-	    err = InitRec();
-	    if (err != KErrNone)
-		return err;
-	    up_state_ = STATE_STARTING;
-	    break;
-	default:
-	    break;
-	}
+        switch (up_state_) {
+            case STATE_READY:
+                err = StartRec();
+                break;
+            case STATE_NULL:
+                err = InitRec();
+
+                if (err != KErrNone)
+                    return err;
+
+                up_state_ = STATE_STARTING;
+                break;
+            default:
+                break;
+        }
     }
 
     return err;
@@ -564,134 +583,138 @@ TInt CPjAudioEngine::Start()
 void CPjAudioEngine::Stop()
 {
     if (iVoIPDnlink) {
-	switch(dn_state_) {
-	case STATE_STREAMING:
-	    iVoIPDnlink->Stop();
-	    dn_state_ = STATE_READY;
-	    break;
-	case STATE_STARTING:
-	    dn_state_ = STATE_NULL;
-	    break;
-	default:
-	    break;
-	}
+        switch (dn_state_) {
+            case STATE_STREAMING:
+                iVoIPDnlink->Stop();
+                dn_state_ = STATE_READY;
+                break;
+            case STATE_STARTING:
+                dn_state_ = STATE_NULL;
+                break;
+            default:
+                break;
+        }
     }
 
     if (iVoIPUplink) {
-	switch(up_state_) {
-	case STATE_STREAMING:
-	    iVoIPUplink->Stop();
-	    up_state_ = STATE_READY;
-	    break;
-	case STATE_STARTING:
-	    up_state_ = STATE_NULL;
-	    break;
-	default:
-	    break;
-	}
+        switch (up_state_) {
+            case STATE_STREAMING:
+                iVoIPUplink->Stop();
+                up_state_ = STATE_READY;
+                break;
+            case STATE_STARTING:
+                up_state_ = STATE_NULL;
+                break;
+            default:
+                break;
+        }
     }
 }
 
 
-TInt CPjAudioEngine::ActivateSpeaker(TBool active)
+TInt CPjAudioEngine::ActivateSpeaker (TBool active)
 {
     TInt err = KErrNotSupported;
-    
+
     if (iVoIPDnlink) {
-	err = iVoIPDnlink->SetAudioDevice(active?
-				    CVoIPAudioDownlinkStream::ELoudSpeaker :
-				    CVoIPAudioDownlinkStream::EHandset);
-	TRACE_((THIS_FILE, "Loudspeaker turned %s", (active? "on":"off")));
+        err = iVoIPDnlink->SetAudioDevice (active?
+                                           CVoIPAudioDownlinkStream::ELoudSpeaker :
+                                           CVoIPAudioDownlinkStream::EHandset);
+        TRACE_ ( (THIS_FILE, "Loudspeaker turned %s", (active? "on":"off")));
     }
-    
+
     return err;
 }
 
 // Callback from MVoIPDownlinkObserver
-void CPjAudioEngine::FillBuffer(const CVoIPAudioDownlinkStream& aSrc,
-                                CVoIPDataBuffer* aBuffer)
+void CPjAudioEngine::FillBuffer (const CVoIPAudioDownlinkStream& aSrc,
+                                 CVoIPDataBuffer* aBuffer)
 {
-    play_cb_(aBuffer, user_data_);
-    iVoIPDnlink->BufferFilled(aBuffer);
+    play_cb_ (aBuffer, user_data_);
+    iVoIPDnlink->BufferFilled (aBuffer);
 }
 
 // Callback from MVoIPUplinkObserver
-void CPjAudioEngine::EmptyBuffer(const CVoIPAudioUplinkStream& aSrc,
-                                 CVoIPDataBuffer* aBuffer)
+void CPjAudioEngine::EmptyBuffer (const CVoIPAudioUplinkStream& aSrc,
+                                  CVoIPDataBuffer* aBuffer)
 {
-    rec_cb_(aBuffer, user_data_);
-    iVoIPUplink->BufferEmptied(aBuffer);
+    rec_cb_ (aBuffer, user_data_);
+    iVoIPUplink->BufferEmptied (aBuffer);
 }
 
 // Callback from MVoIPDownlinkObserver
-void CPjAudioEngine::Event(const CVoIPAudioDownlinkStream& /*aSrc*/,
-                           TInt aEventType,
-                           TInt aError)
+void CPjAudioEngine::Event (const CVoIPAudioDownlinkStream& /*aSrc*/,
+                            TInt aEventType,
+                            TInt aError)
 {
     switch (aEventType) {
-    case MVoIPDownlinkObserver::KOpenComplete:
-	if (aError == KErrNone) {
-	    State last_state = dn_state_;
-
-	    dn_state_ = STATE_READY;
-	    TRACE_((THIS_FILE, "Downlink opened"));
-
-	    if (last_state == STATE_STARTING)
-		StartPlay();
-	}
-	break;
-
-    case MVoIPDownlinkObserver::KDownlinkClosed:
-	dn_state_ = STATE_NULL;
-	TRACE_((THIS_FILE, "Downlink closed"));
-	break;
-
-    case MVoIPDownlinkObserver::KDownlinkError:
-	dn_state_ = STATE_READY;
-	snd_perror("Downlink problem", aError);
-	break;
-    default:
-	break;
+        case MVoIPDownlinkObserver::KOpenComplete:
+
+            if (aError == KErrNone) {
+                State last_state = dn_state_;
+
+                dn_state_ = STATE_READY;
+                TRACE_ ( (THIS_FILE, "Downlink opened"));
+
+                if (last_state == STATE_STARTING)
+                    StartPlay();
+            }
+
+            break;
+
+        case MVoIPDownlinkObserver::KDownlinkClosed:
+            dn_state_ = STATE_NULL;
+            TRACE_ ( (THIS_FILE, "Downlink closed"));
+            break;
+
+        case MVoIPDownlinkObserver::KDownlinkError:
+            dn_state_ = STATE_READY;
+            snd_perror ("Downlink problem", aError);
+            break;
+        default:
+            break;
     }
 }
 
 // Callback from MVoIPUplinkObserver
-void CPjAudioEngine::Event(const CVoIPAudioUplinkStream& /*aSrc*/,
-                           TInt aEventType,
-                           TInt aError)
+void CPjAudioEngine::Event (const CVoIPAudioUplinkStream& /*aSrc*/,
+                            TInt aEventType,
+                            TInt aError)
 {
     switch (aEventType) {
-    case MVoIPUplinkObserver::KOpenComplete:
-	if (aError == KErrNone) {
-	    State last_state = up_state_;
-
-	    up_state_ = STATE_READY;
-	    TRACE_((THIS_FILE, "Uplink opened"));
-	    
-	    if (last_state == STATE_STARTING)
-		StartRec();
-	}
-	break;
-
-    case MVoIPUplinkObserver::KUplinkClosed:
-	up_state_ = STATE_NULL;
-	TRACE_((THIS_FILE, "Uplink closed"));
-	break;
-
-    case MVoIPUplinkObserver::KUplinkError:
-	up_state_ = STATE_READY;
-	snd_perror("Uplink problem", aError);
-	break;
-    default:
-	break;
+        case MVoIPUplinkObserver::KOpenComplete:
+
+            if (aError == KErrNone) {
+                State last_state = up_state_;
+
+                up_state_ = STATE_READY;
+                TRACE_ ( (THIS_FILE, "Uplink opened"));
+
+                if (last_state == STATE_STARTING)
+                    StartRec();
+            }
+
+            break;
+
+        case MVoIPUplinkObserver::KUplinkClosed:
+            up_state_ = STATE_NULL;
+            TRACE_ ( (THIS_FILE, "Uplink closed"));
+            break;
+
+        case MVoIPUplinkObserver::KUplinkError:
+            up_state_ = STATE_READY;
+            snd_perror ("Uplink problem", aError);
+            break;
+        default:
+            break;
     }
 }
 
 // Callback from MVoIPFormatObserver
-void CPjAudioEngine::Event(const CVoIPFormatIntfc& /*aSrc*/, 
-			   TInt aEventType)
+void CPjAudioEngine::Event (const CVoIPFormatIntfc& /*aSrc*/,
+                            TInt aEventType)
 {
-    snd_perror("Format event", aEventType);
+    snd_perror ("Format event", aEventType);
 }
 
 /****************************************************************************
@@ -700,89 +723,94 @@ void CPjAudioEngine::Event(const CVoIPFormatIntfc& /*aSrc*/,
 
 #ifdef USE_NATIVE_PCM
 
-static void RecCbPcm2(CVoIPDataBuffer *buf, void *user_data)
+static void RecCbPcm2 (CVoIPDataBuffer *buf, void *user_data)
 {
     struct vas_stream *strm = (struct vas_stream*) user_data;
-    TPtr8 buffer(0, 0, 0);
+    TPtr8 buffer (0, 0, 0);
     pj_int16_t *p_buf;
     unsigned buf_len;
 
     /* Get the buffer */
-    buf->GetPayloadPtr(buffer);
-    
+    buf->GetPayloadPtr (buffer);
+
     /* Call parent callback */
     p_buf = (pj_int16_t*) buffer.Ptr();
     buf_len = buffer.Length() >> 1;
+
     while (buf_len) {
-	unsigned req;
-	
-	req = strm->param.samples_per_frame - strm->rec_buf_len;
-	if (req > buf_len)
-	    req = buf_len;
-	pjmedia_copy_samples(strm->rec_buf + strm->rec_buf_len, p_buf, req);
-	p_buf += req;
-	buf_len -= req;
-	strm->rec_buf_len += req;
-	
-	if (strm->rec_buf_len >= strm->param.samples_per_frame) {
-	    pjmedia_frame f;
-
-	    f.buf = strm->rec_buf;
-	    f.type = PJMEDIA_FRAME_TYPE_AUDIO;
-	    f.size = strm->param.samples_per_frame << 1;
-	    strm->rec_cb(strm->user_data, &f);
-	    strm->rec_buf_len = 0;
-	}
+        unsigned req;
+
+        req = strm->param.samples_per_frame - strm->rec_buf_len;
+
+        if (req > buf_len)
+            req = buf_len;
+
+        pjmedia_copy_samples (strm->rec_buf + strm->rec_buf_len, p_buf, req);
+        p_buf += req;
+        buf_len -= req;
+        strm->rec_buf_len += req;
+
+        if (strm->rec_buf_len >= strm->param.samples_per_frame) {
+            pjmedia_frame f;
+
+            f.buf = strm->rec_buf;
+            f.type = PJMEDIA_FRAME_TYPE_AUDIO;
+            f.size = strm->param.samples_per_frame << 1;
+            strm->rec_cb (strm->user_data, &f);
+            strm->rec_buf_len = 0;
+        }
     }
 }
 
-static void PlayCbPcm2(CVoIPDataBuffer *buf, void *user_data)
+static void PlayCbPcm2 (CVoIPDataBuffer *buf, void *user_data)
 {
     struct vas_stream *strm = (struct vas_stream*) user_data;
-    TPtr8 buffer(0, 0, 0);
+    TPtr8 buffer (0, 0, 0);
     pjmedia_frame f;
 
     /* Get the buffer */
-    buf->GetPayloadPtr(buffer);
+    buf->GetPayloadPtr (buffer);
 
     /* Call parent callback */
     f.buf = strm->play_buf;
     f.size = strm->param.samples_per_frame << 1;
-    strm->play_cb(strm->user_data, &f);
+    strm->play_cb (strm->user_data, &f);
+
     if (f.type != PJMEDIA_FRAME_TYPE_AUDIO) {
-	pjmedia_zero_samples((pj_int16_t*)f.buf, 
-			     strm->param.samples_per_frame);
+        pjmedia_zero_samples ( (pj_int16_t*) f.buf,
+                               strm->param.samples_per_frame);
     }
+
     f.size = strm->param.samples_per_frame << 1;
 
     /* Init buffer attributes and header. */
     buffer.Zero();
-    buffer.Append((TUint8*)f.buf, f.size);
+    buffer.Append ( (TUint8*) f.buf, f.size);
 
     /* Set the buffer */
-    buf->SetPayloadPtr(buffer);
+    buf->SetPayloadPtr (buffer);
 }
 
 #else // not USE_NATIVE_PCM
 
-static void RecCbPcm(CVoIPDataBuffer *buf, void *user_data)
+static void RecCbPcm (CVoIPDataBuffer *buf, void *user_data)
 {
     struct vas_stream *strm = (struct vas_stream*) user_data;
-    TPtr8 buffer(0, 0, 0);
+    TPtr8 buffer (0, 0, 0);
 
     /* Get the buffer */
-    buf->GetPayloadPtr(buffer);
-    
+    buf->GetPayloadPtr (buffer);
+
     /* Buffer has to contain normal speech. */
-    pj_assert(buffer[0] == 1 && buffer[1] == 0);
+    pj_assert (buffer[0] == 1 && buffer[1] == 0);
 
     /* Detect the recorder G.711 frame size, player frame size will follow
      * this recorder frame size.
      */
     if (vas_g711_frame_len == 0) {
-	vas_g711_frame_len = buffer.Length() < 160? 80 : 160;
-	TRACE_((THIS_FILE, "Detected VAS G.711 frame size = %u samples",
-		vas_g711_frame_len));
+        vas_g711_frame_len = buffer.Length() < 160? 80 : 160;
+        TRACE_ ( (THIS_FILE, "Detected VAS G.711 frame size = %u samples",
+                  vas_g711_frame_len));
     }
 
     /* Decode VAS buffer (coded in G.711) and put the PCM result into rec_buf.
@@ -791,511 +819,510 @@ static void RecCbPcm(CVoIPDataBuffer *buf, void *user_data)
     unsigned samples_processed = 0;
 
     while (samples_processed < vas_g711_frame_len) {
-	unsigned samples_to_process;
-	unsigned samples_req;
-
-	samples_to_process = vas_g711_frame_len - samples_processed;
-	samples_req = (strm->param.samples_per_frame /
-		       strm->param.channel_count /
-		       strm->resample_factor) -
-		      strm->rec_buf_len;
-	if (samples_to_process > samples_req)
-	    samples_to_process = samples_req;
-
-	pjmedia_ulaw_decode(&strm->rec_buf[strm->rec_buf_len],
-			    buffer.Ptr() + 2 + samples_processed,
-			    samples_to_process);
-
-	strm->rec_buf_len += samples_to_process;
-	samples_processed += samples_to_process;
-
-	/* Buffer is full, time to call parent callback */
-	if (strm->rec_buf_len == strm->param.samples_per_frame / 
-				 strm->param.channel_count /
-				 strm->resample_factor) 
-	{
-	    pjmedia_frame f;
-
-	    /* Need to resample clock rate? */
-	    if (strm->rec_resample) {
-		unsigned resampled = 0;
-		
-		while (resampled < strm->rec_buf_len) {
-		    pjmedia_resample_run(strm->rec_resample, 
-				&strm->rec_buf[resampled],
-				strm->pcm_buf + 
-				resampled * strm->resample_factor);
-		    resampled += 80;
-		}
-		f.buf = strm->pcm_buf;
-	    } else {
-		f.buf = strm->rec_buf;
-	    }
-
-	    /* Need to convert channel count? */
-	    if (strm->param.channel_count != 1) {
-		pjmedia_convert_channel_1ton((pj_int16_t*)f.buf,
-					     (pj_int16_t*)f.buf,
-					     strm->param.channel_count,
-					     strm->param.samples_per_frame /
-					     strm->param.channel_count,
-					     0);
-	    }
-
-	    /* Call parent callback */
-	    f.type = PJMEDIA_FRAME_TYPE_AUDIO;
-	    f.size = strm->param.samples_per_frame << 1;
-	    strm->rec_cb(strm->user_data, &f);
-	    strm->rec_buf_len = 0;
-	}
+        unsigned samples_to_process;
+        unsigned samples_req;
+
+        samples_to_process = vas_g711_frame_len - samples_processed;
+        samples_req = (strm->param.samples_per_frame /
+                       strm->param.channel_count /
+                       strm->resample_factor) -
+                      strm->rec_buf_len;
+
+        if (samples_to_process > samples_req)
+            samples_to_process = samples_req;
+
+        pjmedia_ulaw_decode (&strm->rec_buf[strm->rec_buf_len],
+                             buffer.Ptr() + 2 + samples_processed,
+                             samples_to_process);
+
+        strm->rec_buf_len += samples_to_process;
+        samples_processed += samples_to_process;
+
+        /* Buffer is full, time to call parent callback */
+        if (strm->rec_buf_len == strm->param.samples_per_frame /
+                strm->param.channel_count /
+                strm->resample_factor) {
+            pjmedia_frame f;
+
+            /* Need to resample clock rate? */
+            if (strm->rec_resample) {
+                unsigned resampled = 0;
+
+                while (resampled < strm->rec_buf_len) {
+                    pjmedia_resample_run (strm->rec_resample,
+                                          &strm->rec_buf[resampled],
+                                          strm->pcm_buf +
+                                          resampled * strm->resample_factor);
+                    resampled += 80;
+                }
+
+                f.buf = strm->pcm_buf;
+            } else {
+                f.buf = strm->rec_buf;
+            }
+
+            /* Need to convert channel count? */
+            if (strm->param.channel_count != 1) {
+                pjmedia_convert_channel_1ton ( (pj_int16_t*) f.buf,
+                                               (pj_int16_t*) f.buf,
+                                               strm->param.channel_count,
+                                               strm->param.samples_per_frame /
+                                               strm->param.channel_count,
+                                               0);
+            }
+
+            /* Call parent callback */
+            f.type = PJMEDIA_FRAME_TYPE_AUDIO;
+            f.size = strm->param.samples_per_frame << 1;
+            strm->rec_cb (strm->user_data, &f);
+            strm->rec_buf_len = 0;
+        }
     }
 }
 
 #endif // USE_NATIVE_PCM
 
-static void PlayCbPcm(CVoIPDataBuffer *buf, void *user_data)
+static void PlayCbPcm (CVoIPDataBuffer *buf, void *user_data)
 {
     struct vas_stream *strm = (struct vas_stream*) user_data;
     unsigned g711_frame_len = vas_g711_frame_len;
-    TPtr8 buffer(0, 0, 0);
+    TPtr8 buffer (0, 0, 0);
 
     /* Get the buffer */
-    buf->GetPayloadPtr(buffer);
+    buf->GetPayloadPtr (buffer);
 
     /* Init buffer attributes and header. */
     buffer.Zero();
-    buffer.Append(1);
-    buffer.Append(0);
+    buffer.Append (1);
+    buffer.Append (0);
 
     /* Assume frame size is 10ms if frame size hasn't been known. */
     if (g711_frame_len == 0)
-	g711_frame_len = 80;
+        g711_frame_len = 80;
 
     /* Call parent stream callback to get PCM samples to play,
      * encode the PCM samples into G.711 and put it into VAS buffer.
      */
     unsigned samples_processed = 0;
-    
+
     while (samples_processed < g711_frame_len) {
-	/* Need more samples to play, time to call parent callback */
-	if (strm->play_buf_len == 0) {
-	    pjmedia_frame f;
-	    unsigned samples_got;
-	    
-	    f.size = strm->param.samples_per_frame << 1;
-	    if (strm->play_resample || strm->param.channel_count != 1)
-		f.buf = strm->pcm_buf;
-	    else
-		f.buf = strm->play_buf;
-
-	    /* Call parent callback */
-	    strm->play_cb(strm->user_data, &f);
-	    if (f.type != PJMEDIA_FRAME_TYPE_AUDIO) {
-		pjmedia_zero_samples((pj_int16_t*)f.buf, 
-				     strm->param.samples_per_frame);
-	    }
-	    
-	    samples_got = strm->param.samples_per_frame / 
-			  strm->param.channel_count /
-			  strm->resample_factor;
-
-	    /* Need to convert channel count? */
-	    if (strm->param.channel_count != 1) {
-		pjmedia_convert_channel_nto1((pj_int16_t*)f.buf,
-					     (pj_int16_t*)f.buf,
-					     strm->param.channel_count,
-					     strm->param.samples_per_frame,
-					     PJ_FALSE,
-					     0);
-	    }
-
-	    /* Need to resample clock rate? */
-	    if (strm->play_resample) {
-		unsigned resampled = 0;
-		
-		while (resampled < samples_got) 
-		{
-		    pjmedia_resample_run(strm->play_resample, 
-				strm->pcm_buf + 
-				resampled * strm->resample_factor,
-				&strm->play_buf[resampled]);
-		    resampled += 80;
-		}
-	    }
-	    
-	    strm->play_buf_len = samples_got;
-	    strm->play_buf_start = 0;
-	}
-
-	unsigned tmp;
-
-	tmp = PJ_MIN(strm->play_buf_len, g711_frame_len - samples_processed);
-	pjmedia_ulaw_encode((pj_uint8_t*)&strm->play_buf[strm->play_buf_start],
-			    &strm->play_buf[strm->play_buf_start],
-			    tmp);
-	buffer.Append((TUint8*)&strm->play_buf[strm->play_buf_start], tmp);
-	samples_processed += tmp;
-	strm->play_buf_len -= tmp;
-	strm->play_buf_start += tmp;
+        /* Need more samples to play, time to call parent callback */
+        if (strm->play_buf_len == 0) {
+            pjmedia_frame f;
+            unsigned samples_got;
+
+            f.size = strm->param.samples_per_frame << 1;
+
+            if (strm->play_resample || strm->param.channel_count != 1)
+                f.buf = strm->pcm_buf;
+            else
+                f.buf = strm->play_buf;
+
+            /* Call parent callback */
+            strm->play_cb (strm->user_data, &f);
+
+            if (f.type != PJMEDIA_FRAME_TYPE_AUDIO) {
+                pjmedia_zero_samples ( (pj_int16_t*) f.buf,
+                                       strm->param.samples_per_frame);
+            }
+
+            samples_got = strm->param.samples_per_frame /
+                          strm->param.channel_count /
+                          strm->resample_factor;
+
+            /* Need to convert channel count? */
+            if (strm->param.channel_count != 1) {
+                pjmedia_convert_channel_nto1 ( (pj_int16_t*) f.buf,
+                                               (pj_int16_t*) f.buf,
+                                               strm->param.channel_count,
+                                               strm->param.samples_per_frame,
+                                               PJ_FALSE,
+                                               0);
+            }
+
+            /* Need to resample clock rate? */
+            if (strm->play_resample) {
+                unsigned resampled = 0;
+
+                while (resampled < samples_got) {
+                    pjmedia_resample_run (strm->play_resample,
+                                          strm->pcm_buf +
+                                          resampled * strm->resample_factor,
+                                          &strm->play_buf[resampled]);
+                    resampled += 80;
+                }
+            }
+
+            strm->play_buf_len = samples_got;
+            strm->play_buf_start = 0;
+        }
+
+        unsigned tmp;
+
+        tmp = PJ_MIN (strm->play_buf_len, g711_frame_len - samples_processed);
+        pjmedia_ulaw_encode ( (pj_uint8_t*) &strm->play_buf[strm->play_buf_start],
+                              &strm->play_buf[strm->play_buf_start],
+                              tmp);
+        buffer.Append ( (TUint8*) &strm->play_buf[strm->play_buf_start], tmp);
+        samples_processed += tmp;
+        strm->play_buf_len -= tmp;
+        strm->play_buf_start += tmp;
     }
 
     /* Set the buffer */
-    buf->SetPayloadPtr(buffer);
+    buf->SetPayloadPtr (buffer);
 }
 
 /****************************************************************************
  * Internal VAS callbacks for non-PCM format
  */
 
-static void RecCb(CVoIPDataBuffer *buf, void *user_data)
+static void RecCb (CVoIPDataBuffer *buf, void *user_data)
 {
     struct vas_stream *strm = (struct vas_stream*) user_data;
     pjmedia_frame_ext *frame = (pjmedia_frame_ext*) strm->rec_buf;
-    TPtr8 buffer(0, 0, 0);
+    TPtr8 buffer (0, 0, 0);
 
     /* Get the buffer */
-    buf->GetPayloadPtr(buffer);
-    
-    switch(strm->param.ext_fmt.id) {
-    case PJMEDIA_FORMAT_AMR:
-	{
-	    const pj_uint8_t *p = (const pj_uint8_t*)buffer.Ptr() + 1;
-	    unsigned len = buffer.Length() - 1;
-	    
-	    pjmedia_frame_ext_append_subframe(frame, p, len << 3, 160);
-	    if (frame->samples_cnt == strm->param.samples_per_frame) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->rec_cb(strm->user_data, (pjmedia_frame*)frame);
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_G729:
-	{
-	    /* Check if we got a normal or SID frame. */
-	    if (buffer[0] != 0) {
-		enum { NORMAL_LEN = 22, SID_LEN = 8 };
-		TBitStream *bitstream = (TBitStream*)strm->strm_data;
-		unsigned src_len = buffer.Length()- 2;
-		
-		pj_assert(src_len == NORMAL_LEN || src_len == SID_LEN);
-		
-		const TDesC8& p = bitstream->CompressG729Frame(
-					    buffer.Right(src_len), 
-					    src_len == SID_LEN);
-		
-		pjmedia_frame_ext_append_subframe(frame, p.Ptr(), 
-						  p.Length() << 3, 80);
-	    } else { /* We got null frame. */
-		pjmedia_frame_ext_append_subframe(frame, NULL, 0, 80);
-	    }
-	    
-	    if (frame->samples_cnt == strm->param.samples_per_frame) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->rec_cb(strm->user_data, (pjmedia_frame*)frame);
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-
-    case PJMEDIA_FORMAT_ILBC:
-	{
-	    unsigned samples_got;
-	    
-	    samples_got = strm->param.ext_fmt.bitrate == 15200? 160 : 240;
-	    
-	    /* Check if we got a normal or SID frame. */
-	    if (buffer[0] != 0) {
-		const pj_uint8_t *p = (const pj_uint8_t*)buffer.Ptr() + 2;
-		unsigned len = buffer.Length() - 2;
-		
-		pjmedia_frame_ext_append_subframe(frame, p, len << 3,
-						  samples_got);
-	    } else { /* We got null frame. */
-		pjmedia_frame_ext_append_subframe(frame, NULL, 0, samples_got);
-	    }
-	    
-	    if (frame->samples_cnt == strm->param.samples_per_frame) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->rec_cb(strm->user_data, (pjmedia_frame*)frame);
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_PCMU:
-    case PJMEDIA_FORMAT_PCMA:
-	{
-	    unsigned samples_processed = 0;
-	    
-	    /* Make sure it is normal frame. */
-	    pj_assert(buffer[0] == 1 && buffer[1] == 0);
-
-	    /* Detect the recorder G.711 frame size, player frame size will 
-	     * follow this recorder frame size.
-	     */
-	    if (vas_g711_frame_len == 0) {
-		vas_g711_frame_len = buffer.Length() < 160? 80 : 160;
-		TRACE_((THIS_FILE, "Detected VAS G.711 frame size = %u samples",
-			vas_g711_frame_len));
-	    }
-	    
-	    /* Convert VAS buffer format into pjmedia_frame_ext. Whenever 
-	     * samples count in the frame is equal to stream's samples per 
-	     * frame, call parent stream callback.
-	     */
-	    while (samples_processed < vas_g711_frame_len) {
-		unsigned tmp;
-		const pj_uint8_t *pb = (const pj_uint8_t*)buffer.Ptr() +
-				       2 + samples_processed;
-    
-		tmp = PJ_MIN(strm->param.samples_per_frame - frame->samples_cnt,
-			     vas_g711_frame_len - samples_processed);
-		
-		pjmedia_frame_ext_append_subframe(frame, pb, tmp << 3, tmp);
-		samples_processed += tmp;
-    
-		if (frame->samples_cnt == strm->param.samples_per_frame) {
-		    frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		    strm->rec_cb(strm->user_data, (pjmedia_frame*)frame);
-		    frame->samples_cnt = 0;
-		    frame->subframe_cnt = 0;
-		}
-	    }
-	}
-	break;
-	
-    default:
-	break;
+    buf->GetPayloadPtr (buffer);
+
+    switch (strm->param.ext_fmt.id) {
+        case PJMEDIA_FORMAT_AMR: {
+            const pj_uint8_t *p = (const pj_uint8_t*) buffer.Ptr() + 1;
+            unsigned len = buffer.Length() - 1;
+
+            pjmedia_frame_ext_append_subframe (frame, p, len << 3, 160);
+
+            if (frame->samples_cnt == strm->param.samples_per_frame) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->rec_cb (strm->user_data, (pjmedia_frame*) frame);
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_G729: {
+            /* Check if we got a normal or SID frame. */
+            if (buffer[0] != 0) {
+                enum { NORMAL_LEN = 22, SID_LEN = 8 };
+                TBitStream *bitstream = (TBitStream*) strm->strm_data;
+                unsigned src_len = buffer.Length()- 2;
+
+                pj_assert (src_len == NORMAL_LEN || src_len == SID_LEN);
+
+                const TDesC8& p = bitstream->CompressG729Frame (
+                                      buffer.Right (src_len),
+                                      src_len == SID_LEN);
+
+                pjmedia_frame_ext_append_subframe (frame, p.Ptr(),
+                                                   p.Length() << 3, 80);
+            } else { /* We got null frame. */
+                pjmedia_frame_ext_append_subframe (frame, NULL, 0, 80);
+            }
+
+            if (frame->samples_cnt == strm->param.samples_per_frame) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->rec_cb (strm->user_data, (pjmedia_frame*) frame);
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_ILBC: {
+            unsigned samples_got;
+
+            samples_got = strm->param.ext_fmt.bitrate == 15200? 160 : 240;
+
+            /* Check if we got a normal or SID frame. */
+            if (buffer[0] != 0) {
+                const pj_uint8_t *p = (const pj_uint8_t*) buffer.Ptr() + 2;
+                unsigned len = buffer.Length() - 2;
+
+                pjmedia_frame_ext_append_subframe (frame, p, len << 3,
+                                                   samples_got);
+            } else { /* We got null frame. */
+                pjmedia_frame_ext_append_subframe (frame, NULL, 0, samples_got);
+            }
+
+            if (frame->samples_cnt == strm->param.samples_per_frame) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->rec_cb (strm->user_data, (pjmedia_frame*) frame);
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_PCMU:
+        case PJMEDIA_FORMAT_PCMA: {
+            unsigned samples_processed = 0;
+
+            /* Make sure it is normal frame. */
+            pj_assert (buffer[0] == 1 && buffer[1] == 0);
+
+            /* Detect the recorder G.711 frame size, player frame size will
+             * follow this recorder frame size.
+             */
+            if (vas_g711_frame_len == 0) {
+                vas_g711_frame_len = buffer.Length() < 160? 80 : 160;
+                TRACE_ ( (THIS_FILE, "Detected VAS G.711 frame size = %u samples",
+                          vas_g711_frame_len));
+            }
+
+            /* Convert VAS buffer format into pjmedia_frame_ext. Whenever
+             * samples count in the frame is equal to stream's samples per
+             * frame, call parent stream callback.
+             */
+            while (samples_processed < vas_g711_frame_len) {
+                unsigned tmp;
+                const pj_uint8_t *pb = (const pj_uint8_t*) buffer.Ptr() +
+                                       2 + samples_processed;
+
+                tmp = PJ_MIN (strm->param.samples_per_frame - frame->samples_cnt,
+                              vas_g711_frame_len - samples_processed);
+
+                pjmedia_frame_ext_append_subframe (frame, pb, tmp << 3, tmp);
+                samples_processed += tmp;
+
+                if (frame->samples_cnt == strm->param.samples_per_frame) {
+                    frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                    strm->rec_cb (strm->user_data, (pjmedia_frame*) frame);
+                    frame->samples_cnt = 0;
+                    frame->subframe_cnt = 0;
+                }
+            }
+        }
+        break;
+
+        default:
+            break;
     }
 }
 
-static void PlayCb(CVoIPDataBuffer *buf, void *user_data)
+static void PlayCb (CVoIPDataBuffer *buf, void *user_data)
 {
     struct vas_stream *strm = (struct vas_stream*) user_data;
     pjmedia_frame_ext *frame = (pjmedia_frame_ext*) strm->play_buf;
-    TPtr8 buffer(0, 0, 0);
+    TPtr8 buffer (0, 0, 0);
 
     /* Get the buffer */
-    buf->GetPayloadPtr(buffer);
+    buf->GetPayloadPtr (buffer);
 
     /* Init buffer attributes and header. */
     buffer.Zero();
 
-    switch(strm->param.ext_fmt.id) {
-    case PJMEDIA_FORMAT_AMR:
-	{
-	    if (frame->samples_cnt == 0) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->play_cb(strm->user_data, (pjmedia_frame*)frame);
-		pj_assert(frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
-			  frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
-	    }
-
-	    if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) { 
-		pjmedia_frame_ext_subframe *sf;
-		unsigned samples_cnt;
-		
-		sf = pjmedia_frame_ext_get_subframe(frame, 0);
-		samples_cnt = frame->samples_cnt / frame->subframe_cnt;
-		
-		if (sf->data && sf->bitlen) {
-		    /* AMR header for VAS is one byte, the format (may be!):
-		     * 0xxxxy00, where xxxx:frame type, y:not sure. 
-		     */
-		    unsigned len = (sf->bitlen+7)>>3;
-		    enum {SID_FT = 8 };
-		    pj_uint8_t amr_header = 4, ft = SID_FT;
-
-		    if (len >= pjmedia_codec_amrnb_framelen[0])
-			ft = pjmedia_codec_amr_get_mode2(PJ_TRUE, len);
-		    
-		    amr_header |= ft << 3;
-		    buffer.Append(amr_header);
-		    
-		    buffer.Append((TUint8*)sf->data, len);
-		} else {
-		    buffer.Append(0);
-		}
-
-		pjmedia_frame_ext_pop_subframes(frame, 1);
-	    
-	    } else { /* PJMEDIA_FRAME_TYPE_NONE */
-		buffer.Append(0);
-		
-		frame->samples_cnt = 0;
-		frame->subframe_cnt = 0;
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_G729:
-	{
-	    if (frame->samples_cnt == 0) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->play_cb(strm->user_data, (pjmedia_frame*)frame);
-		pj_assert(frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
-			  frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
-	    }
-
-	    if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) { 
-		pjmedia_frame_ext_subframe *sf;
-		unsigned samples_cnt;
-		
-		sf = pjmedia_frame_ext_get_subframe(frame, 0);
-		samples_cnt = frame->samples_cnt / frame->subframe_cnt;
-		
-		if (sf->data && sf->bitlen) {
-		    enum { NORMAL_LEN = 10, SID_LEN = 2 };
-		    pj_bool_t sid_frame = ((sf->bitlen >> 3) == SID_LEN);
-		    TBitStream *bitstream = (TBitStream*)strm->strm_data;
-		    const TPtrC8 src(sf->data, sf->bitlen>>3);
-		    const TDesC8 &dst = bitstream->ExpandG729Frame(src,
-								   sid_frame); 
-		    if (sid_frame) {
-			buffer.Append(2);
-			buffer.Append(0);
-		    } else {
-			buffer.Append(1);
-			buffer.Append(0);
-		    }
-		    buffer.Append(dst);
-		} else {
-		    buffer.Append(2);
-		    buffer.Append(0);
-
-		    buffer.AppendFill(0, 22);
-		}
-
-		pjmedia_frame_ext_pop_subframes(frame, 1);
-	    
-	    } else { /* PJMEDIA_FRAME_TYPE_NONE */
-		buffer.Append(2);
-		buffer.Append(0);
-		
-		buffer.AppendFill(0, 22);
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_ILBC:
-	{
-	    if (frame->samples_cnt == 0) {
-		frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		strm->play_cb(strm->user_data, (pjmedia_frame*)frame);
-		pj_assert(frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
-			  frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
-	    }
-
-	    if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) { 
-		pjmedia_frame_ext_subframe *sf;
-		unsigned samples_cnt;
-		
-		sf = pjmedia_frame_ext_get_subframe(frame, 0);
-		samples_cnt = frame->samples_cnt / frame->subframe_cnt;
-		
-		pj_assert((strm->param.ext_fmt.bitrate == 15200 && 
-			   samples_cnt == 160) ||
-			  (strm->param.ext_fmt.bitrate != 15200 &&
-			   samples_cnt == 240));
-		
-		if (sf->data && sf->bitlen) {
-		    buffer.Append(1);
-		    buffer.Append(0);
-		    buffer.Append((TUint8*)sf->data, sf->bitlen>>3);
-		} else {
-		    unsigned frame_len;
-		    
-		    buffer.Append(1);
-		    buffer.Append(0);
-		    
-		    /* VAS iLBC frame is 20ms or 30ms */
-		    frame_len = strm->param.ext_fmt.bitrate == 15200? 38 : 50;
-		    buffer.AppendFill(0, frame_len);
-		}
-
-		pjmedia_frame_ext_pop_subframes(frame, 1);
-	    
-	    } else { /* PJMEDIA_FRAME_TYPE_NONE */
-		
-		unsigned frame_len;
-		
-		buffer.Append(1);
-		buffer.Append(0);
-		
-		/* VAS iLBC frame is 20ms or 30ms */
-		frame_len = strm->param.ext_fmt.bitrate == 15200? 38 : 50;
-		buffer.AppendFill(0, frame_len);
-
-	    }
-	}
-	break;
-	
-    case PJMEDIA_FORMAT_PCMU:
-    case PJMEDIA_FORMAT_PCMA:
-	{
-	    unsigned samples_ready = 0;
-	    unsigned samples_req = vas_g711_frame_len;
-	    
-	    /* Assume frame size is 10ms if frame size hasn't been known. */
-	    if (samples_req == 0)
-		samples_req = 80;
-	    
-	    buffer.Append(1);
-	    buffer.Append(0);
-	    
-	    /* Call parent stream callback to get samples to play. */
-	    while (samples_ready < samples_req) {
-		if (frame->samples_cnt == 0) {
-		    frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
-		    strm->play_cb(strm->user_data, (pjmedia_frame*)frame);
-		    pj_assert(frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
-			      frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
-		}
-    
-		if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) { 
-		    pjmedia_frame_ext_subframe *sf;
-		    unsigned samples_cnt;
-		    
-		    sf = pjmedia_frame_ext_get_subframe(frame, 0);
-		    samples_cnt = frame->samples_cnt / frame->subframe_cnt;
-		    if (sf->data && sf->bitlen) {
-			buffer.Append((TUint8*)sf->data, sf->bitlen>>3);
-		    } else {
-			pj_uint8_t silc;
-			silc = (strm->param.ext_fmt.id==PJMEDIA_FORMAT_PCMU)?
-				pjmedia_linear2ulaw(0) : pjmedia_linear2alaw(0);
-			buffer.AppendFill(silc, samples_cnt);
-		    }
-		    samples_ready += samples_cnt;
-		    
-		    pjmedia_frame_ext_pop_subframes(frame, 1);
-		
-		} else { /* PJMEDIA_FRAME_TYPE_NONE */
-		    pj_uint8_t silc;
-		    
-		    silc = (strm->param.ext_fmt.id==PJMEDIA_FORMAT_PCMU)?
-			    pjmedia_linear2ulaw(0) : pjmedia_linear2alaw(0);
-		    buffer.AppendFill(silc, samples_req - samples_ready);
-
-		    samples_ready = samples_req;
-		    frame->samples_cnt = 0;
-		    frame->subframe_cnt = 0;
-		}
-	    }
-	}
-	break;
-	
-    default:
-	break;
+    switch (strm->param.ext_fmt.id) {
+        case PJMEDIA_FORMAT_AMR: {
+            if (frame->samples_cnt == 0) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->play_cb (strm->user_data, (pjmedia_frame*) frame);
+                pj_assert (frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
+                           frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
+            }
+
+            if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) {
+                pjmedia_frame_ext_subframe *sf;
+                unsigned samples_cnt;
+
+                sf = pjmedia_frame_ext_get_subframe (frame, 0);
+                samples_cnt = frame->samples_cnt / frame->subframe_cnt;
+
+                if (sf->data && sf->bitlen) {
+                    /* AMR header for VAS is one byte, the format (may be!):
+                     * 0xxxxy00, where xxxx:frame type, y:not sure.
+                     */
+                    unsigned len = (sf->bitlen+7) >>3;
+                    enum {SID_FT = 8 };
+                    pj_uint8_t amr_header = 4, ft = SID_FT;
+
+                    if (len >= pjmedia_codec_amrnb_framelen[0])
+                        ft = pjmedia_codec_amr_get_mode2 (PJ_TRUE, len);
+
+                    amr_header |= ft << 3;
+                    buffer.Append (amr_header);
+
+                    buffer.Append ( (TUint8*) sf->data, len);
+                } else {
+                    buffer.Append (0);
+                }
+
+                pjmedia_frame_ext_pop_subframes (frame, 1);
+
+            } else { /* PJMEDIA_FRAME_TYPE_NONE */
+                buffer.Append (0);
+
+                frame->samples_cnt = 0;
+                frame->subframe_cnt = 0;
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_G729: {
+            if (frame->samples_cnt == 0) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->play_cb (strm->user_data, (pjmedia_frame*) frame);
+                pj_assert (frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
+                           frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
+            }
+
+            if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) {
+                pjmedia_frame_ext_subframe *sf;
+                unsigned samples_cnt;
+
+                sf = pjmedia_frame_ext_get_subframe (frame, 0);
+                samples_cnt = frame->samples_cnt / frame->subframe_cnt;
+
+                if (sf->data && sf->bitlen) {
+                    enum { NORMAL_LEN = 10, SID_LEN = 2 };
+                    pj_bool_t sid_frame = ( (sf->bitlen >> 3) == SID_LEN);
+                    TBitStream *bitstream = (TBitStream*) strm->strm_data;
+                    const TPtrC8 src (sf->data, sf->bitlen>>3);
+                    const TDesC8 &dst = bitstream->ExpandG729Frame (src,
+                                        sid_frame);
+
+                    if (sid_frame) {
+                        buffer.Append (2);
+                        buffer.Append (0);
+                    } else {
+                        buffer.Append (1);
+                        buffer.Append (0);
+                    }
+
+                    buffer.Append (dst);
+                } else {
+                    buffer.Append (2);
+                    buffer.Append (0);
+
+                    buffer.AppendFill (0, 22);
+                }
+
+                pjmedia_frame_ext_pop_subframes (frame, 1);
+
+            } else { /* PJMEDIA_FRAME_TYPE_NONE */
+                buffer.Append (2);
+                buffer.Append (0);
+
+                buffer.AppendFill (0, 22);
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_ILBC: {
+            if (frame->samples_cnt == 0) {
+                frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                strm->play_cb (strm->user_data, (pjmedia_frame*) frame);
+                pj_assert (frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
+                           frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
+            }
+
+            if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) {
+                pjmedia_frame_ext_subframe *sf;
+                unsigned samples_cnt;
+
+                sf = pjmedia_frame_ext_get_subframe (frame, 0);
+                samples_cnt = frame->samples_cnt / frame->subframe_cnt;
+
+                pj_assert ( (strm->param.ext_fmt.bitrate == 15200 &&
+                             samples_cnt == 160) ||
+                            (strm->param.ext_fmt.bitrate != 15200 &&
+                             samples_cnt == 240));
+
+                if (sf->data && sf->bitlen) {
+                    buffer.Append (1);
+                    buffer.Append (0);
+                    buffer.Append ( (TUint8*) sf->data, sf->bitlen>>3);
+                } else {
+                    unsigned frame_len;
+
+                    buffer.Append (1);
+                    buffer.Append (0);
+
+                    /* VAS iLBC frame is 20ms or 30ms */
+                    frame_len = strm->param.ext_fmt.bitrate == 15200? 38 : 50;
+                    buffer.AppendFill (0, frame_len);
+                }
+
+                pjmedia_frame_ext_pop_subframes (frame, 1);
+
+            } else { /* PJMEDIA_FRAME_TYPE_NONE */
+
+                unsigned frame_len;
+
+                buffer.Append (1);
+                buffer.Append (0);
+
+                /* VAS iLBC frame is 20ms or 30ms */
+                frame_len = strm->param.ext_fmt.bitrate == 15200? 38 : 50;
+                buffer.AppendFill (0, frame_len);
+
+            }
+        }
+        break;
+
+        case PJMEDIA_FORMAT_PCMU:
+        case PJMEDIA_FORMAT_PCMA: {
+            unsigned samples_ready = 0;
+            unsigned samples_req = vas_g711_frame_len;
+
+            /* Assume frame size is 10ms if frame size hasn't been known. */
+            if (samples_req == 0)
+                samples_req = 80;
+
+            buffer.Append (1);
+            buffer.Append (0);
+
+            /* Call parent stream callback to get samples to play. */
+            while (samples_ready < samples_req) {
+                if (frame->samples_cnt == 0) {
+                    frame->base.type = PJMEDIA_FRAME_TYPE_EXTENDED;
+                    strm->play_cb (strm->user_data, (pjmedia_frame*) frame);
+                    pj_assert (frame->base.type==PJMEDIA_FRAME_TYPE_EXTENDED ||
+                               frame->base.type==PJMEDIA_FRAME_TYPE_NONE);
+                }
+
+                if (frame->base.type == PJMEDIA_FRAME_TYPE_EXTENDED) {
+                    pjmedia_frame_ext_subframe *sf;
+                    unsigned samples_cnt;
+
+                    sf = pjmedia_frame_ext_get_subframe (frame, 0);
+                    samples_cnt = frame->samples_cnt / frame->subframe_cnt;
+
+                    if (sf->data && sf->bitlen) {
+                        buffer.Append ( (TUint8*) sf->data, sf->bitlen>>3);
+                    } else {
+                        pj_uint8_t silc;
+                        silc = (strm->param.ext_fmt.id==PJMEDIA_FORMAT_PCMU) ?
+                               pjmedia_linear2ulaw (0) : pjmedia_linear2alaw (0);
+                        buffer.AppendFill (silc, samples_cnt);
+                    }
+
+                    samples_ready += samples_cnt;
+
+                    pjmedia_frame_ext_pop_subframes (frame, 1);
+
+                } else { /* PJMEDIA_FRAME_TYPE_NONE */
+                    pj_uint8_t silc;
+
+                    silc = (strm->param.ext_fmt.id==PJMEDIA_FORMAT_PCMU) ?
+                           pjmedia_linear2ulaw (0) : pjmedia_linear2alaw (0);
+                    buffer.AppendFill (silc, samples_req - samples_ready);
+
+                    samples_ready = samples_req;
+                    frame->samples_cnt = 0;
+                    frame->subframe_cnt = 0;
+                }
+            }
+        }
+        break;
+
+        default:
+            break;
     }
 
     /* Set the buffer */
-    buf->SetPayloadPtr(buffer);
+    buf->SetPayloadPtr (buffer);
 }
 
 
@@ -1307,19 +1334,19 @@ static void PlayCb(CVoIPDataBuffer *buf, void *user_data)
  * C compatible declaration of VAS factory.
  */
 PJ_BEGIN_DECL
-PJ_DECL(pjmedia_aud_dev_factory*)pjmedia_symb_vas_factory(pj_pool_factory *pf);
+PJ_DECL (pjmedia_aud_dev_factory*) pjmedia_symb_vas_factory (pj_pool_factory *pf);
 PJ_END_DECL
 
 /*
  * Init VAS audio driver.
  */
-PJ_DEF(pjmedia_aud_dev_factory*) pjmedia_symb_vas_factory(pj_pool_factory *pf)
+PJ_DEF (pjmedia_aud_dev_factory*) pjmedia_symb_vas_factory (pj_pool_factory *pf)
 {
     struct vas_factory *f;
     pj_pool_t *pool;
 
-    pool = pj_pool_create(pf, "VAS", 1000, 1000, NULL);
-    f = PJ_POOL_ZALLOC_T(pool, struct vas_factory);
+    pool = pj_pool_create (pf, "VAS", 1000, 1000, NULL);
+    f = PJ_POOL_ZALLOC_T (pool, struct vas_factory);
     f->pf = pf;
     f->pool = pool;
     f->base.op = &factory_op;
@@ -1328,60 +1355,65 @@ PJ_DEF(pjmedia_aud_dev_factory*) pjmedia_symb_vas_factory(pj_pool_factory *pf)
 }
 
 /* API: init factory */
-static pj_status_t factory_init(pjmedia_aud_dev_factory *f)
+static pj_status_t factory_init (pjmedia_aud_dev_factory *f)
 {
-    struct vas_factory *af = (struct vas_factory*)f;
+    struct vas_factory *af = (struct vas_factory*) f;
     CVoIPUtilityFactory *vas_factory_;
     CVoIPAudioUplinkStream *vas_uplink;
     CVoIPAudioDownlinkStream *vas_dnlink;
     RArray<TVoIPCodecFormat> uplink_formats, dnlink_formats;
     unsigned ext_fmt_cnt = 0;
-    TVersion vas_version(1, 0, 0); /* Not really used at this time */
+    TVersion vas_version (1, 0, 0); /* Not really used at this time */
     TInt err;
 
-    pj_ansi_strcpy(af->dev_info.name, "S60 VAS");
+    pj_ansi_strcpy (af->dev_info.name, "S60 VAS");
     af->dev_info.default_samples_per_sec = 8000;
     af->dev_info.caps = PJMEDIA_AUD_DEV_CAP_EXT_FORMAT |
-			//PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING |
-			PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING |
-			PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE |
-			PJMEDIA_AUD_DEV_CAP_VAD |
-			PJMEDIA_AUD_DEV_CAP_CNG;
-    af->dev_info.routes = PJMEDIA_AUD_DEV_ROUTE_EARPIECE | 
-			  PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
+                        //PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING |
+                        PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING |
+                        PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE |
+                        PJMEDIA_AUD_DEV_CAP_VAD |
+                        PJMEDIA_AUD_DEV_CAP_CNG;
+    af->dev_info.routes = PJMEDIA_AUD_DEV_ROUTE_EARPIECE |
+                          PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
     af->dev_info.input_count = 1;
     af->dev_info.output_count = 1;
     af->dev_info.ext_fmt_cnt = 0;
 
     /* Enumerate supported formats */
-    err = CVoIPUtilityFactory::CreateFactory(vas_factory_);
+    err = CVoIPUtilityFactory::CreateFactory (vas_factory_);
+
     if (err != KErrNone)
-	goto on_error;
+        goto on_error;
 
-    /* On VAS 2.0, uplink & downlink stream should be instantiated before 
+    /* On VAS 2.0, uplink & downlink stream should be instantiated before
      * querying formats.
      */
-    err = vas_factory_->CreateUplinkStream(vas_version, 
-				          CVoIPUtilityFactory::EVoIPCall,
-				          vas_uplink);
+    err = vas_factory_->CreateUplinkStream (vas_version,
+                                            CVoIPUtilityFactory::EVoIPCall,
+                                            vas_uplink);
+
     if (err != KErrNone)
-	goto on_error;
-    
-    err = vas_factory_->CreateDownlinkStream(vas_version, 
-				            CVoIPUtilityFactory::EVoIPCall,
-				            vas_dnlink);
+        goto on_error;
+
+    err = vas_factory_->CreateDownlinkStream (vas_version,
+            CVoIPUtilityFactory::EVoIPCall,
+            vas_dnlink);
+
     if (err != KErrNone)
-	goto on_error;
-    
+        goto on_error;
+
     uplink_formats.Reset();
-    err = vas_factory_->GetSupportedUplinkFormats(uplink_formats);
+    err = vas_factory_->GetSupportedUplinkFormats (uplink_formats);
+
     if (err != KErrNone)
-	goto on_error;
+        goto on_error;
 
     dnlink_formats.Reset();
-    err = vas_factory_->GetSupportedDownlinkFormats(dnlink_formats);
+    err = vas_factory_->GetSupportedDownlinkFormats (dnlink_formats);
+
     if (err != KErrNone)
-	goto on_error;
+        goto on_error;
 
     /* Free the streams, they are just used for querying formats */
     delete vas_uplink;
@@ -1390,109 +1422,109 @@ static pj_status_t factory_init(pjmedia_aud_dev_factory *f)
     vas_dnlink = NULL;
     delete vas_factory_;
     vas_factory_ = NULL;
-    
+
     for (TInt i = 0; i < dnlink_formats.Count(); i++) {
-	/* Format must be supported by both downlink & uplink. */
-	if (uplink_formats.Find(dnlink_formats[i]) == KErrNotFound)
-	    continue;
-	
-	switch (dnlink_formats[i]) {
-	case EAMR_NB:
-	    af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_AMR;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 7400;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_TRUE;
-	    break;
-
-	case EG729:
-	    af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_G729;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 8000;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_FALSE;
-	    break;
-
-	case EILBC:
-	    af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_ILBC;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 13333;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_TRUE;
-	    break;
-
-	case EG711:
+        /* Format must be supported by both downlink & uplink. */
+        if (uplink_formats.Find (dnlink_formats[i]) == KErrNotFound)
+            continue;
+
+        switch (dnlink_formats[i]) {
+            case EAMR_NB:
+                af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_AMR;
+                af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 7400;
+                af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_TRUE;
+                break;
+
+            case EG729:
+                af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_G729;
+                af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 8000;
+                af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_FALSE;
+                break;
+
+            case EILBC:
+                af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_ILBC;
+                af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 13333;
+                af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_TRUE;
+                break;
+
+            case EG711:
 #if PJMEDIA_AUDIO_DEV_SYMB_VAS_VERSION==2
-	case EG711_10MS:
+            case EG711_10MS:
 #endif
-	    af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_PCMU;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 64000;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_FALSE;
-	    ++ext_fmt_cnt;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_PCMA;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 64000;
-	    af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_FALSE;
-	    break;
-	
-	default:
-	    continue;
-	}
-	
-	++ext_fmt_cnt;
+                af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_PCMU;
+                af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 64000;
+                af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_FALSE;
+                ++ext_fmt_cnt;
+                af->dev_info.ext_fmt[ext_fmt_cnt].id = PJMEDIA_FORMAT_PCMA;
+                af->dev_info.ext_fmt[ext_fmt_cnt].bitrate = 64000;
+                af->dev_info.ext_fmt[ext_fmt_cnt].vad = PJ_FALSE;
+                break;
+
+            default:
+                continue;
+        }
+
+        ++ext_fmt_cnt;
     }
-    
+
     af->dev_info.ext_fmt_cnt = ext_fmt_cnt;
 
     uplink_formats.Close();
     dnlink_formats.Close();
-    
-    PJ_LOG(3, (THIS_FILE, "VAS initialized"));
+
+    PJ_LOG (3, (THIS_FILE, "VAS initialized"));
 
     return PJ_SUCCESS;
-    
+
 on_error:
-    return PJ_RETURN_OS_ERROR(err);
+    return PJ_RETURN_OS_ERROR (err);
 }
 
 /* API: destroy factory */
-static pj_status_t factory_destroy(pjmedia_aud_dev_factory *f)
+static pj_status_t factory_destroy (pjmedia_aud_dev_factory *f)
 {
-    struct vas_factory *af = (struct vas_factory*)f;
+    struct vas_factory *af = (struct vas_factory*) f;
     pj_pool_t *pool = af->pool;
 
     af->pool = NULL;
-    pj_pool_release(pool);
+    pj_pool_release (pool);
+
+    PJ_LOG (3, (THIS_FILE, "VAS destroyed"));
 
-    PJ_LOG(3, (THIS_FILE, "VAS destroyed"));
-    
     return PJ_SUCCESS;
 }
 
 /* API: get number of devices */
-static unsigned factory_get_dev_count(pjmedia_aud_dev_factory *f)
+static unsigned factory_get_dev_count (pjmedia_aud_dev_factory *f)
 {
-    PJ_UNUSED_ARG(f);
+    PJ_UNUSED_ARG (f);
     return 1;
 }
 
 /* API: get device info */
-static pj_status_t factory_get_dev_info(pjmedia_aud_dev_factory *f, 
-					unsigned index,
-					pjmedia_aud_dev_info *info)
+static pj_status_t factory_get_dev_info (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_dev_info *info)
 {
-    struct vas_factory *af = (struct vas_factory*)f;
+    struct vas_factory *af = (struct vas_factory*) f;
 
-    PJ_ASSERT_RETURN(index == 0, PJMEDIA_EAUD_INVDEV);
+    PJ_ASSERT_RETURN (index == 0, PJMEDIA_EAUD_INVDEV);
 
-    pj_memcpy(info, &af->dev_info, sizeof(*info));
+    pj_memcpy (info, &af->dev_info, sizeof (*info));
 
     return PJ_SUCCESS;
 }
 
 /* API: create default device parameter */
-static pj_status_t factory_default_param(pjmedia_aud_dev_factory *f,
-					 unsigned index,
-					 pjmedia_aud_param *param)
+static pj_status_t factory_default_param (pjmedia_aud_dev_factory *f,
+        unsigned index,
+        pjmedia_aud_param *param)
 {
-    struct vas_factory *af = (struct vas_factory*)f;
+    struct vas_factory *af = (struct vas_factory*) f;
 
-    PJ_ASSERT_RETURN(index == 0, PJMEDIA_EAUD_INVDEV);
+    PJ_ASSERT_RETURN (index == 0, PJMEDIA_EAUD_INVDEV);
 
-    pj_bzero(param, sizeof(*param));
+    pj_bzero (param, sizeof (*param));
     param->dir = PJMEDIA_DIR_CAPTURE_PLAYBACK;
     param->rec_id = index;
     param->play_id = index;
@@ -1508,14 +1540,14 @@ static pj_status_t factory_default_param(pjmedia_aud_dev_factory *f,
 
 
 /* API: create stream */
-static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
-					 const pjmedia_aud_param *param,
-					 pjmedia_aud_rec_cb rec_cb,
-					 pjmedia_aud_play_cb play_cb,
-					 void *user_data,
-					 pjmedia_aud_stream **p_aud_strm)
+static pj_status_t factory_create_stream (pjmedia_aud_dev_factory *f,
+        const pjmedia_aud_param *param,
+        pjmedia_aud_rec_cb rec_cb,
+        pjmedia_aud_play_cb play_cb,
+        void *user_data,
+        pjmedia_aud_stream **p_aud_strm)
 {
-    struct vas_factory *af = (struct vas_factory*)f;
+    struct vas_factory *af = (struct vas_factory*) f;
     pj_pool_t *pool;
     struct vas_stream *strm;
 
@@ -1524,127 +1556,117 @@ static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
     PjAudioCallback vas_play_cb;
 
     /* Can only support 16bits per sample */
-    PJ_ASSERT_RETURN(param->bits_per_sample == BITS_PER_SAMPLE, PJ_EINVAL);
+    PJ_ASSERT_RETURN (param->bits_per_sample == BITS_PER_SAMPLE, PJ_EINVAL);
 
     /* Supported clock rates:
-     * - for non-PCM format: 8kHz  
-     * - for PCM format: 8kHz and 16kHz  
+     * - for non-PCM format: 8kHz
+     * - for PCM format: 8kHz and 16kHz
      */
-    PJ_ASSERT_RETURN(param->clock_rate == 8000 ||
-		     (param->clock_rate == 16000 && 
-		      param->ext_fmt.id == PJMEDIA_FORMAT_L16),
-		     PJ_EINVAL);
+    PJ_ASSERT_RETURN (param->clock_rate == 8000 ||
+                      (param->clock_rate == 16000 &&
+                       param->ext_fmt.id == PJMEDIA_FORMAT_L16),
+                      PJ_EINVAL);
 
     /* Supported channels number:
      * - for non-PCM format: mono
-     * - for PCM format: mono and stereo  
+     * - for PCM format: mono and stereo
      */
-    PJ_ASSERT_RETURN(param->channel_count == 1 || 
-		     (param->channel_count == 2 &&
-		      param->ext_fmt.id == PJMEDIA_FORMAT_L16),
-		     PJ_EINVAL);
+    PJ_ASSERT_RETURN (param->channel_count == 1 ||
+                      (param->channel_count == 2 &&
+                       param->ext_fmt.id == PJMEDIA_FORMAT_L16),
+                      PJ_EINVAL);
 
     /* Create and Initialize stream descriptor */
-    pool = pj_pool_create(af->pf, "vas-dev", 1000, 1000, NULL);
-    PJ_ASSERT_RETURN(pool, PJ_ENOMEM);
+    pool = pj_pool_create (af->pf, "vas-dev", 1000, 1000, NULL);
+    PJ_ASSERT_RETURN (pool, PJ_ENOMEM);
 
-    strm = PJ_POOL_ZALLOC_T(pool, struct vas_stream);
+    strm = PJ_POOL_ZALLOC_T (pool, struct vas_stream);
     strm->pool = pool;
     strm->param = *param;
 
     if (strm->param.flags & PJMEDIA_AUD_DEV_CAP_EXT_FORMAT == 0)
-	strm->param.ext_fmt.id = PJMEDIA_FORMAT_L16;
-	
+        strm->param.ext_fmt.id = PJMEDIA_FORMAT_L16;
+
     /* Set audio engine fourcc. */
-    switch(strm->param.ext_fmt.id) {
-    case PJMEDIA_FORMAT_L16:
-#ifdef USE_NATIVE_PCM	
-	vas_setting.format = EPCM16;
+    switch (strm->param.ext_fmt.id) {
+        case PJMEDIA_FORMAT_L16:
+#ifdef USE_NATIVE_PCM
+            vas_setting.format = EPCM16;
 #else
-	vas_setting.format = EG711;
+            vas_setting.format = EG711;
 #endif
-	break;
-    case PJMEDIA_FORMAT_PCMU:
-    case PJMEDIA_FORMAT_PCMA:
-	vas_setting.format = EG711;
-	break;
-    case PJMEDIA_FORMAT_AMR:
-	vas_setting.format = EAMR_NB;
-	break;
-    case PJMEDIA_FORMAT_G729:
-	vas_setting.format = EG729;
-	break;
-    case PJMEDIA_FORMAT_ILBC:
-	vas_setting.format = EILBC;
-	break;
-    default:
-	vas_setting.format = ENULL;
-	break;
+            break;
+        case PJMEDIA_FORMAT_PCMU:
+        case PJMEDIA_FORMAT_PCMA:
+            vas_setting.format = EG711;
+            break;
+        case PJMEDIA_FORMAT_AMR:
+            vas_setting.format = EAMR_NB;
+            break;
+        case PJMEDIA_FORMAT_G729:
+            vas_setting.format = EG729;
+            break;
+        case PJMEDIA_FORMAT_ILBC:
+            vas_setting.format = EILBC;
+            break;
+        default:
+            vas_setting.format = ENULL;
+            break;
     }
 
     /* Set audio engine mode. */
-    if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16)
-    {
-#ifdef USE_NATIVE_PCM	
-	vas_setting.mode = 0;
+    if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16) {
+#ifdef USE_NATIVE_PCM
+        vas_setting.mode = 0;
 #else
-	vas_setting.mode = CVoIPFormatIntfc::EG711uLaw;
+        vas_setting.mode = CVoIPFormatIntfc::EG711uLaw;
 #endif
-    } 
-    else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_AMR)
-    {
-	vas_setting.mode = strm->param.ext_fmt.bitrate;
-    } 
-    else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMU)
-    {
-	vas_setting.mode = CVoIPFormatIntfc::EG711uLaw;
-    }
-    else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMA)
-    {
-	vas_setting.mode = CVoIPFormatIntfc::EG711ALaw;
-    }
-    else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_ILBC)
-    {
-	if (strm->param.ext_fmt.bitrate == 15200)
-	    vas_setting.mode = CVoIPFormatIntfc::EiLBC20mSecFrame;
-	else
-	    vas_setting.mode = CVoIPFormatIntfc::EiLBC30mSecFrame;
+    } else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_AMR) {
+        vas_setting.mode = strm->param.ext_fmt.bitrate;
+    } else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMU) {
+        vas_setting.mode = CVoIPFormatIntfc::EG711uLaw;
+    } else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMA) {
+        vas_setting.mode = CVoIPFormatIntfc::EG711ALaw;
+    } else if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_ILBC) {
+        if (strm->param.ext_fmt.bitrate == 15200)
+            vas_setting.mode = CVoIPFormatIntfc::EiLBC20mSecFrame;
+        else
+            vas_setting.mode = CVoIPFormatIntfc::EiLBC30mSecFrame;
     } else {
-	vas_setting.mode = 0;
+        vas_setting.mode = 0;
     }
 
-    /* Disable VAD on L16, G711, iLBC, and also G729 (G729's SID 
+    /* Disable VAD on L16, G711, iLBC, and also G729 (G729's SID
      * potentially cause noise?).
      */
     if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMU ||
-	strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMA ||
-	strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16 ||
-	strm->param.ext_fmt.id == PJMEDIA_FORMAT_ILBC ||
-	strm->param.ext_fmt.id == PJMEDIA_FORMAT_G729)
-    {
-	vas_setting.vad = EFalse;
+            strm->param.ext_fmt.id == PJMEDIA_FORMAT_PCMA ||
+            strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16 ||
+            strm->param.ext_fmt.id == PJMEDIA_FORMAT_ILBC ||
+            strm->param.ext_fmt.id == PJMEDIA_FORMAT_G729) {
+        vas_setting.vad = EFalse;
     } else {
-	vas_setting.vad = strm->param.ext_fmt.vad;
+        vas_setting.vad = strm->param.ext_fmt.vad;
     }
-    
+
     /* Set other audio engine attributes. */
     vas_setting.plc = strm->param.plc_enabled;
     vas_setting.cng = vas_setting.vad;
-    vas_setting.loudspk = 
-		strm->param.output_route==PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
+    vas_setting.loudspk =
+        strm->param.output_route==PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
 
     /* Set audio engine callbacks. */
     if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16) {
 #ifdef USE_NATIVE_PCM
-	vas_play_cb = &PlayCbPcm2;
-	vas_rec_cb  = &RecCbPcm2;
+        vas_play_cb = &PlayCbPcm2;
+        vas_rec_cb  = &RecCbPcm2;
 #else
-	vas_play_cb = &PlayCbPcm;
-	vas_rec_cb  = &RecCbPcm;
+        vas_play_cb = &PlayCbPcm;
+        vas_rec_cb  = &RecCbPcm;
 #endif
     } else {
-	vas_play_cb = &PlayCb;
-	vas_rec_cb  = &RecCb;
+        vas_play_cb = &PlayCb;
+        vas_rec_cb  = &RecCb;
     }
 
     strm->rec_cb = rec_cb;
@@ -1653,80 +1675,81 @@ static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
     strm->resample_factor = strm->param.clock_rate / 8000;
 
     /* play_buf size is samples per frame scaled in to 8kHz mono. */
-    strm->play_buf = (pj_int16_t*)pj_pool_zalloc(
-					pool, 
-					(strm->param.samples_per_frame / 
-					strm->resample_factor /
-					strm->param.channel_count) << 1);
+    strm->play_buf = (pj_int16_t*) pj_pool_zalloc (
+                         pool,
+                         (strm->param.samples_per_frame /
+                          strm->resample_factor /
+                          strm->param.channel_count) << 1);
     strm->play_buf_len = 0;
     strm->play_buf_start = 0;
 
     /* rec_buf size is samples per frame scaled in to 8kHz mono. */
-    strm->rec_buf  = (pj_int16_t*)pj_pool_zalloc(
-					pool, 
-					(strm->param.samples_per_frame / 
-					strm->resample_factor /
-					strm->param.channel_count) << 1);
+    strm->rec_buf  = (pj_int16_t*) pj_pool_zalloc (
+                         pool,
+                         (strm->param.samples_per_frame /
+                          strm->resample_factor /
+                          strm->param.channel_count) << 1);
     strm->rec_buf_len = 0;
 
     if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_G729) {
-	TBitStream *g729_bitstream = new TBitStream;
-	
-	PJ_ASSERT_RETURN(g729_bitstream, PJ_ENOMEM);
-	strm->strm_data = (void*)g729_bitstream;
+        TBitStream *g729_bitstream = new TBitStream;
+
+        PJ_ASSERT_RETURN (g729_bitstream, PJ_ENOMEM);
+        strm->strm_data = (void*) g729_bitstream;
     }
-	
+
     /* Init resampler when format is PCM and clock rate is not 8kHz */
-    if (strm->param.clock_rate != 8000 && 
-	strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16)
-    {
-	pj_status_t status;
-	
-	if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	    /* Create resample for recorder */
-	    status = pjmedia_resample_create( pool, PJ_TRUE, PJ_FALSE, 1, 
-					      8000,
-					      strm->param.clock_rate,
-					      80,
-					      &strm->rec_resample);
-	    if (status != PJ_SUCCESS)
-		return status;
-	}
-    
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    /* Create resample for player */
-	    status = pjmedia_resample_create( pool, PJ_TRUE, PJ_FALSE, 1, 
-					      strm->param.clock_rate,
-					      8000,
-					      80 * strm->resample_factor,
-					      &strm->play_resample);
-	    if (status != PJ_SUCCESS)
-		return status;
-	}
+    if (strm->param.clock_rate != 8000 &&
+            strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16) {
+        pj_status_t status;
+
+        if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
+            /* Create resample for recorder */
+            status = pjmedia_resample_create (pool, PJ_TRUE, PJ_FALSE, 1,
+                                              8000,
+                                              strm->param.clock_rate,
+                                              80,
+                                              &strm->rec_resample);
+
+            if (status != PJ_SUCCESS)
+                return status;
+        }
+
+        if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+            /* Create resample for player */
+            status = pjmedia_resample_create (pool, PJ_TRUE, PJ_FALSE, 1,
+                                              strm->param.clock_rate,
+                                              8000,
+                                              80 * strm->resample_factor,
+                                              &strm->play_resample);
+
+            if (status != PJ_SUCCESS)
+                return status;
+        }
     }
 
     /* Create PCM buffer, when the clock rate is not 8kHz or not mono */
     if (strm->param.ext_fmt.id == PJMEDIA_FORMAT_L16 &&
-	(strm->resample_factor > 1 || strm->param.channel_count != 1)) 
-    {
-	strm->pcm_buf = (pj_int16_t*)pj_pool_zalloc(pool, 
-					strm->param.samples_per_frame << 1);
+            (strm->resample_factor > 1 || strm->param.channel_count != 1)) {
+        strm->pcm_buf = (pj_int16_t*) pj_pool_zalloc (pool,
+                        strm->param.samples_per_frame << 1);
     }
 
-    
+
     /* Create the audio engine. */
-    TRAPD(err, strm->engine = CPjAudioEngine::NewL(strm,
-						   vas_rec_cb, vas_play_cb,
-						   strm, vas_setting));
+    TRAPD (err, strm->engine = CPjAudioEngine::NewL (strm,
+                               vas_rec_cb, vas_play_cb,
+                               strm, vas_setting));
+
     if (err != KErrNone) {
-    	pj_pool_release(pool);
-	return PJ_RETURN_OS_ERROR(err);
+        pj_pool_release (pool);
+        return PJ_RETURN_OS_ERROR (err);
     }
 
     /* Apply output volume setting if specified */
     if (param->flags & PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING) {
-	stream_set_cap(&strm->base, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, 
-		       &param->output_vol);
+        stream_set_cap (&strm->base, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
+                        &param->output_vol);
     }
 
     /* Done */
@@ -1737,209 +1760,220 @@ static pj_status_t factory_create_stream(pjmedia_aud_dev_factory *f,
 }
 
 /* API: Get stream info. */
-static pj_status_t stream_get_param(pjmedia_aud_stream *s,
-				    pjmedia_aud_param *pi)
+static pj_status_t stream_get_param (pjmedia_aud_stream *s,
+                                     pjmedia_aud_param *pi)
 {
-    struct vas_stream *strm = (struct vas_stream*)s;
+    struct vas_stream *strm = (struct vas_stream*) s;
 
-    PJ_ASSERT_RETURN(strm && pi, PJ_EINVAL);
+    PJ_ASSERT_RETURN (strm && pi, PJ_EINVAL);
 
-    pj_memcpy(pi, &strm->param, sizeof(*pi));
+    pj_memcpy (pi, &strm->param, sizeof (*pi));
 
     /* Update the output volume setting */
-    if (stream_get_cap(s, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
-		       &pi->output_vol) == PJ_SUCCESS)
-    {
-	pi->flags |= PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING;
+    if (stream_get_cap (s, PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
+                        &pi->output_vol) == PJ_SUCCESS) {
+        pi->flags |= PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING;
     }
-    
+
     return PJ_SUCCESS;
 }
 
 /* API: get capability */
-static pj_status_t stream_get_cap(pjmedia_aud_stream *s,
-				  pjmedia_aud_dev_cap cap,
-				  void *pval)
+static pj_status_t stream_get_cap (pjmedia_aud_stream *s,
+                                   pjmedia_aud_dev_cap cap,
+                                   void *pval)
 {
-    struct vas_stream *strm = (struct vas_stream*)s;
+    struct vas_stream *strm = (struct vas_stream*) s;
     pj_status_t status = PJ_ENOTSUP;
 
-    PJ_ASSERT_RETURN(s && pval, PJ_EINVAL);
+    PJ_ASSERT_RETURN (s && pval, PJ_EINVAL);
 
     switch (cap) {
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE: 
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    *(pjmedia_aud_dev_route*)pval = strm->param.output_route;
-	    status = PJ_SUCCESS;
-	}
-	break;
-    
-    /* There is a case that GetMaxGain() stucks, e.g: in N95. */ 
-    /*
-    case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    TInt max_gain = strm->engine->GetMaxGain();
-	    TInt gain = strm->engine->GetGain();
-	    
-	    if (max_gain > 0 && gain >= 0) {
-		*(unsigned*)pval = gain * 100 / max_gain; 
-		status = PJ_SUCCESS;
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	}
-	break;
-    */
-
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    TInt max_vol = strm->engine->GetMaxVolume();
-	    TInt vol = strm->engine->GetVolume();
-	    
-	    if (max_vol > 0 && vol >= 0) {
-		*(unsigned*)pval = vol * 100 / max_vol; 
-		status = PJ_SUCCESS;
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	}
-	break;
-    default:
-	break;
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE:
+
+            if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+                * (pjmedia_aud_dev_route*) pval = strm->param.output_route;
+                status = PJ_SUCCESS;
+            }
+
+            break;
+
+            /* There is a case that GetMaxGain() stucks, e.g: in N95. */
+            /*
+            case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
+            if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
+                PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
+
+                TInt max_gain = strm->engine->GetMaxGain();
+                TInt gain = strm->engine->GetGain();
+
+                if (max_gain > 0 && gain >= 0) {
+            	*(unsigned*)pval = gain * 100 / max_gain;
+            	status = PJ_SUCCESS;
+                } else {
+            	status = PJMEDIA_EAUD_NOTREADY;
+                }
+            }
+            break;
+            */
+
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
+
+            if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+                PJ_ASSERT_RETURN (strm->engine, PJ_EINVAL);
+
+                TInt max_vol = strm->engine->GetMaxVolume();
+                TInt vol = strm->engine->GetVolume();
+
+                if (max_vol > 0 && vol >= 0) {
+                    * (unsigned*) pval = vol * 100 / max_vol;
+                    status = PJ_SUCCESS;
+                } else {
+                    status = PJMEDIA_EAUD_NOTREADY;
+                }
+            }
+
+            break;
+        default:
+            break;
     }
-    
+
     return status;
 }
 
 /* API: set capability */
-static pj_status_t stream_set_cap(pjmedia_aud_stream *s,
-				  pjmedia_aud_dev_cap cap,
-				  const void *pval)
+static pj_status_t stream_set_cap (pjmedia_aud_stream *s,
+                                   pjmedia_aud_dev_cap cap,
+                                   const void *pval)
 {
-    struct vas_stream *strm = (struct vas_stream*)s;
+    struct vas_stream *strm = (struct vas_stream*) s;
     pj_status_t status = PJ_ENOTSUP;
 
-    PJ_ASSERT_RETURN(s && pval, PJ_EINVAL);
+    PJ_ASSERT_RETURN (s && pval, PJ_EINVAL);
 
     switch (cap) {
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE: 
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    pjmedia_aud_dev_route r = *(const pjmedia_aud_dev_route*)pval;
-	    TInt err;
-
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    switch (r) {
-	    case PJMEDIA_AUD_DEV_ROUTE_DEFAULT:
-	    case PJMEDIA_AUD_DEV_ROUTE_EARPIECE:
-		err = strm->engine->ActivateSpeaker(EFalse);
-		status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
-		break;
-	    case PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER:
-		err = strm->engine->ActivateSpeaker(ETrue);
-		status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
-		break;
-	    default:
-		status = PJ_EINVAL;
-		break;
-	    }
-	    if (status == PJ_SUCCESS)
-		strm->param.output_route = r; 
-	}
-	break;
-
-    /* There is a case that GetMaxGain() stucks, e.g: in N95. */ 
-    /*
-    case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    TInt max_gain = strm->engine->GetMaxGain();
-	    if (max_gain > 0) {
-		TInt gain, err;
-		
-		gain = *(unsigned*)pval * max_gain / 100;
-		err = strm->engine->SetGain(gain);
-		status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	    if (status == PJ_SUCCESS)
-		strm->param.input_vol = *(unsigned*)pval;
-	}
-	break;
-    */
-
-    case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
-	if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
-	    PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
-	    
-	    TInt max_vol = strm->engine->GetMaxVolume();
-	    if (max_vol > 0) {
-		TInt vol, err;
-		
-		vol = *(unsigned*)pval * max_vol / 100;
-		err = strm->engine->SetVolume(vol);
-		status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
-	    } else {
-		status = PJMEDIA_EAUD_NOTREADY;
-	    }
-	    if (status == PJ_SUCCESS)
-		strm->param.output_vol = *(unsigned*)pval;
-	}
-	break;
-    default:
-	break;
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE:
+
+            if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+                pjmedia_aud_dev_route r = * (const pjmedia_aud_dev_route*) pval;
+                TInt err;
+
+                PJ_ASSERT_RETURN (strm->engine, PJ_EINVAL);
+
+                switch (r) {
+                    case PJMEDIA_AUD_DEV_ROUTE_DEFAULT:
+                    case PJMEDIA_AUD_DEV_ROUTE_EARPIECE:
+                        err = strm->engine->ActivateSpeaker (EFalse);
+                        status = (err==KErrNone) ? PJ_SUCCESS:PJ_RETURN_OS_ERROR (err);
+                        break;
+                    case PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER:
+                        err = strm->engine->ActivateSpeaker (ETrue);
+                        status = (err==KErrNone) ? PJ_SUCCESS:PJ_RETURN_OS_ERROR (err);
+                        break;
+                    default:
+                        status = PJ_EINVAL;
+                        break;
+                }
+
+                if (status == PJ_SUCCESS)
+                    strm->param.output_route = r;
+            }
+
+            break;
+
+            /* There is a case that GetMaxGain() stucks, e.g: in N95. */
+            /*
+            case PJMEDIA_AUD_DEV_CAP_INPUT_VOLUME_SETTING:
+            if (strm->param.dir & PJMEDIA_DIR_CAPTURE) {
+                PJ_ASSERT_RETURN(strm->engine, PJ_EINVAL);
+
+                TInt max_gain = strm->engine->GetMaxGain();
+                if (max_gain > 0) {
+            	TInt gain, err;
+
+            	gain = *(unsigned*)pval * max_gain / 100;
+            	err = strm->engine->SetGain(gain);
+            	status = (err==KErrNone)? PJ_SUCCESS:PJ_RETURN_OS_ERROR(err);
+                } else {
+            	status = PJMEDIA_EAUD_NOTREADY;
+                }
+                if (status == PJ_SUCCESS)
+            	strm->param.input_vol = *(unsigned*)pval;
+            }
+            break;
+            */
+
+        case PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING:
+
+            if (strm->param.dir & PJMEDIA_DIR_PLAYBACK) {
+                PJ_ASSERT_RETURN (strm->engine, PJ_EINVAL);
+
+                TInt max_vol = strm->engine->GetMaxVolume();
+
+                if (max_vol > 0) {
+                    TInt vol, err;
+
+                    vol = * (unsigned*) pval * max_vol / 100;
+                    err = strm->engine->SetVolume (vol);
+                    status = (err==KErrNone) ? PJ_SUCCESS:PJ_RETURN_OS_ERROR (err);
+                } else {
+                    status = PJMEDIA_EAUD_NOTREADY;
+                }
+
+                if (status == PJ_SUCCESS)
+                    strm->param.output_vol = * (unsigned*) pval;
+            }
+
+            break;
+        default:
+            break;
     }
-    
+
     return status;
 }
 
 /* API: Start stream. */
-static pj_status_t stream_start(pjmedia_aud_stream *strm)
+static pj_status_t stream_start (pjmedia_aud_stream *strm)
 {
-    struct vas_stream *stream = (struct vas_stream*)strm;
+    struct vas_stream *stream = (struct vas_stream*) strm;
 
-    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+    PJ_ASSERT_RETURN (stream, PJ_EINVAL);
 
     if (stream->engine) {
-	enum { VAS_WAIT_START = 2000 }; /* in msecs */
-	TTime start, now;
-	TInt err = stream->engine->Start();
-	
-    	if (err != KErrNone)
-    	    return PJ_RETURN_OS_ERROR(err);
-
-    	/* Perform synchronous start, timeout after VAS_WAIT_START ms */
-	start.UniversalTime();
-	do {
-    	    pj_symbianos_poll(-1, 100);
-    	    now.UniversalTime();
-    	} while (!stream->engine->IsStarted() &&
-		 (now.MicroSecondsFrom(start) < VAS_WAIT_START * 1000));
-	
-	if (stream->engine->IsStarted())
-	    return PJ_SUCCESS;
-	else
-	    return PJ_ETIMEDOUT;
-    }    
+        enum { VAS_WAIT_START = 2000 }; /* in msecs */
+        TTime start, now;
+        TInt err = stream->engine->Start();
+
+        if (err != KErrNone)
+            return PJ_RETURN_OS_ERROR (err);
+
+        /* Perform synchronous start, timeout after VAS_WAIT_START ms */
+        start.UniversalTime();
+
+        do {
+            pj_symbianos_poll (-1, 100);
+            now.UniversalTime();
+        } while (!stream->engine->IsStarted() &&
+                 (now.MicroSecondsFrom (start) < VAS_WAIT_START * 1000));
+
+        if (stream->engine->IsStarted())
+            return PJ_SUCCESS;
+        else
+            return PJ_ETIMEDOUT;
+    }
 
     return PJ_EINVALIDOP;
 }
 
 /* API: Stop stream. */
-static pj_status_t stream_stop(pjmedia_aud_stream *strm)
+static pj_status_t stream_stop (pjmedia_aud_stream *strm)
 {
-    struct vas_stream *stream = (struct vas_stream*)strm;
+    struct vas_stream *stream = (struct vas_stream*) strm;
 
-    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+    PJ_ASSERT_RETURN (stream, PJ_EINVAL);
 
     if (stream->engine) {
-    	stream->engine->Stop();
+        stream->engine->Stop();
     }
 
     return PJ_SUCCESS;
@@ -1947,28 +1981,29 @@ static pj_status_t stream_stop(pjmedia_aud_stream *strm)
 
 
 /* API: Destroy stream. */
-static pj_status_t stream_destroy(pjmedia_aud_stream *strm)
+static pj_status_t stream_destroy (pjmedia_aud_stream *strm)
 {
-    struct vas_stream *stream = (struct vas_stream*)strm;
+    struct vas_stream *stream = (struct vas_stream*) strm;
 
-    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+    PJ_ASSERT_RETURN (stream, PJ_EINVAL);
 
-    stream_stop(strm);
+    stream_stop (strm);
 
     delete stream->engine;
     stream->engine = NULL;
 
     if (stream->param.ext_fmt.id == PJMEDIA_FORMAT_G729) {
-	TBitStream *g729_bitstream = (TBitStream*)stream->strm_data;
-	stream->strm_data = NULL;
-	delete g729_bitstream;
+        TBitStream *g729_bitstream = (TBitStream*) stream->strm_data;
+        stream->strm_data = NULL;
+        delete g729_bitstream;
     }
 
     pj_pool_t *pool;
     pool = stream->pool;
+
     if (pool) {
-    	stream->pool = NULL;
-    	pj_pool_release(pool);
+        stream->pool = NULL;
+        pj_pool_release (pool);
     }
 
     return PJ_SUCCESS;
diff --git a/sflphone-common/libs/pjproject/pjmedia/src/pjmedia/sdp_wrap.cpp b/sflphone-common/libs/pjproject/pjmedia/src/pjmedia/sdp_wrap.cpp
index 6bae3ff65fedf3e50b6d292cc4ba534adfcf1246..87dd5ba96651df17c9555032c91d235328284307 100644
--- a/sflphone-common/libs/pjproject/pjmedia/src/pjmedia/sdp_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjmedia/src/pjmedia/sdp_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: sdp_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjnath/include/pjnath/config.h b/sflphone-common/libs/pjproject/pjnath/include/pjnath/config.h
index 728897732a62129c6cba0a87bcbf4fa1d20e3ec6..c21d1c4358e7effbf0524f1d9d7cb391aeb2ee9e 100644
--- a/sflphone-common/libs/pjproject/pjnath/include/pjnath/config.h
+++ b/sflphone-common/libs/pjproject/pjnath/include/pjnath/config.h
@@ -1,5 +1,5 @@
 /* $Id: config.h 2966 2009-10-25 09:02:07Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
@@ -77,9 +77,9 @@
 
 /**
  * The default initial STUN round-trip time estimation (the RTO value
- * in RFC 3489-bis), in miliseconds. 
- * This value is used to control the STUN request 
- * retransmit time. The initial value of retransmission interval 
+ * in RFC 3489-bis), in miliseconds.
+ * This value is used to control the STUN request
+ * retransmit time. The initial value of retransmission interval
  * would be set to this value, and will be doubled after each
  * retransmission.
  */
@@ -90,7 +90,7 @@
 
 /**
  * The STUN transaction timeout value, in miliseconds.
- * After the last retransmission is sent and if no response is received 
+ * After the last retransmission is sent and if no response is received
  * after this time, the STUN transaction will be considered to have failed.
  *
  * The default value is 16x RTO (as per RFC 3489-bis).
@@ -213,8 +213,8 @@
 
 
 /**
- * Number of seconds to refresh the permission/channel binding before the 
- * permission/channel binding expires. This value should be greater than 
+ * Number of seconds to refresh the permission/channel binding before the
+ * permission/channel binding expires. This value should be greater than
  * PJ_TURN_PERM_TIMEOUT setting.
  */
 #ifndef PJ_TURN_REFRESH_SEC_BEFORE
@@ -223,7 +223,7 @@
 
 
 /**
- * The TURN session timer heart beat interval. When this timer occurs, the 
+ * The TURN session timer heart beat interval. When this timer occurs, the
  * TURN session will scan all the permissions/channel bindings to see which
  * need to be refreshed.
  */
@@ -293,10 +293,10 @@
 /**
  * The number of bits to represent ICE candidate's local preference. The
  * local preference is used to specify preference among candidates with
- * the same type, and ICE draft suggests 65535 as the default local 
- * preference, which means we need 16 bits to represent the value. But 
+ * the same type, and ICE draft suggests 65535 as the default local
+ * preference, which means we need 16 bits to represent the value. But
  * since we don't have the facility to specify local preference, we'll
- * just disable this feature and let the preference sorted by the 
+ * just disable this feature and let the preference sorted by the
  * type only.
  *
  * Default: 0
@@ -327,15 +327,15 @@
 
 
 /**
- * According to ICE Section 8.2. Updating States, if an In-Progress pair in 
- * the check list is for the same component as a nominated pair, the agent 
+ * According to ICE Section 8.2. Updating States, if an In-Progress pair in
+ * the check list is for the same component as a nominated pair, the agent
  * SHOULD cease retransmissions for its check if its pair priority is lower
  * than the lowest priority nominated pair for that component.
  *
  * If a higher priority check is In Progress, this rule would cause that
  * check to be performed even when it most likely will fail.
  *
- * The macro here controls if ICE session should cancel all In Progress 
+ * The macro here controls if ICE session should cancel all In Progress
  * checks for the same component regardless of its priority.
  *
  * Default: 1 (yes, cancel all)
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp
index a10c67f887e3396f998e694ce5b4f3322de127f2..f9ddddf05b619d68d2ceea8989b12177d4f0be74 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp
@@ -54,15 +54,15 @@ static HWND	    hwndActionButton, hwndExitButton;
 //
 // STUN server
 #if 0
-	// Use this to have the STUN server resolved normally
+// Use this to have the STUN server resolved normally
 #   define STUN_DOMAIN	NULL
 #   define STUN_SERVER	"stun.fwdnet.net"
 #elif 0
-	// Use this to have the STUN server resolved with DNS SRV
+// Use this to have the STUN server resolved with DNS SRV
 #   define STUN_DOMAIN	"iptel.org"
 #   define STUN_SERVER	NULL
 #else
-	// Use this to disable STUN
+// Use this to disable STUN
 #   define STUN_DOMAIN	NULL
 #   define STUN_SERVER	NULL
 #endif
@@ -82,16 +82,14 @@ static int	    g_current_acc;
 static int	    g_current_call = PJSUA_INVALID_ID;
 static int	    g_current_action;
 
-enum
-{
+enum {
     ID_GLOBAL_STATUS	= 21,
     ID_URI,
     ID_CALL_STATUS,
     ID_POLL_TIMER,
 };
 
-enum
-{
+enum {
     ID_MENU_NONE	= 64,
     ID_MENU_CALL,
     ID_MENU_ANSWER,
@@ -104,85 +102,91 @@ enum
 static ATOM		MyRegisterClass	(HINSTANCE, LPTSTR);
 BOOL			InitInstance	(HINSTANCE, int);
 static void		OnCreate	(HWND hWnd);
-static LRESULT CALLBACK	WndProc		(HWND, UINT, WPARAM, LPARAM);
+static LRESULT CALLBACK	WndProc	(HWND, UINT, WPARAM, LPARAM);
 
 
 
 /////////////////////////////////////////////////////////////////////////////
 
-static void OnError(const wchar_t *title, pj_status_t status)
+static void OnError (const wchar_t *title, pj_status_t status)
 {
     char errmsg[PJ_ERR_MSG_SIZE];
-    PJ_DECL_UNICODE_TEMP_BUF(werrmsg, PJ_ERR_MSG_SIZE);
+    PJ_DECL_UNICODE_TEMP_BUF (werrmsg, PJ_ERR_MSG_SIZE);
 
-    pj_strerror(status, errmsg, sizeof(errmsg));
-    
-    MessageBox(NULL, PJ_STRING_TO_NATIVE(errmsg, werrmsg, PJ_ERR_MSG_SIZE),
-	       title, MB_OK);
+    pj_strerror (status, errmsg, sizeof (errmsg));
+
+    MessageBox (NULL, PJ_STRING_TO_NATIVE (errmsg, werrmsg, PJ_ERR_MSG_SIZE),
+                title, MB_OK);
 }
 
 
-static void SetLocalURI(const char *uri, int len, bool enabled=true)
+static void SetLocalURI (const char *uri, int len, bool enabled=true)
 {
     wchar_t tmp[128];
-    if (len==-1) len=pj_ansi_strlen(uri);
-    pj_ansi_to_unicode(uri, len, tmp, PJ_ARRAY_SIZE(tmp));
-    SetDlgItemText(hMainWnd, ID_GLOBAL_STATUS, tmp);
-    EnableWindow(hwndGlobalStatus, enabled?TRUE:FALSE);
+
+    if (len==-1) len=pj_ansi_strlen (uri);
+
+    pj_ansi_to_unicode (uri, len, tmp, PJ_ARRAY_SIZE (tmp));
+    SetDlgItemText (hMainWnd, ID_GLOBAL_STATUS, tmp);
+    EnableWindow (hwndGlobalStatus, enabled?TRUE:FALSE);
 }
 
 
 
-static void SetURI(const char *uri, int len, bool enabled=true)
+static void SetURI (const char *uri, int len, bool enabled=true)
 {
     wchar_t tmp[128];
-    if (len==-1) len=pj_ansi_strlen(uri);
-    pj_ansi_to_unicode(uri, len, tmp, PJ_ARRAY_SIZE(tmp));
-    SetDlgItemText(hMainWnd, ID_URI, tmp);
-    EnableWindow(hwndURI, enabled?TRUE:FALSE);
+
+    if (len==-1) len=pj_ansi_strlen (uri);
+
+    pj_ansi_to_unicode (uri, len, tmp, PJ_ARRAY_SIZE (tmp));
+    SetDlgItemText (hMainWnd, ID_URI, tmp);
+    EnableWindow (hwndURI, enabled?TRUE:FALSE);
 }
 
 
-static void SetCallStatus(const char *state, int len)
+static void SetCallStatus (const char *state, int len)
 {
     wchar_t tmp[128];
-    if (len==-1) len=pj_ansi_strlen(state);
-    pj_ansi_to_unicode(state, len, tmp, PJ_ARRAY_SIZE(tmp));
-    SetDlgItemText(hMainWnd, ID_CALL_STATUS, tmp);
+
+    if (len==-1) len=pj_ansi_strlen (state);
+
+    pj_ansi_to_unicode (state, len, tmp, PJ_ARRAY_SIZE (tmp));
+    SetDlgItemText (hMainWnd, ID_CALL_STATUS, tmp);
 }
 
-static void SetAction(int action, bool enable=true)
+static void SetAction (int action, bool enable=true)
 {
     HMENU hMenu;
 
-    hMenu = CommandBar_GetMenu(hwndCB, 0);
+    hMenu = CommandBar_GetMenu (hwndCB, 0);
 
-    RemoveMenu(hMenu, ID_MENU_NONE, MF_BYCOMMAND);
-    RemoveMenu(hMenu, ID_MENU_CALL, MF_BYCOMMAND);
-    RemoveMenu(hMenu, ID_MENU_ANSWER, MF_BYCOMMAND);
-    RemoveMenu(hMenu, ID_MENU_DISCONNECT, MF_BYCOMMAND);
+    RemoveMenu (hMenu, ID_MENU_NONE, MF_BYCOMMAND);
+    RemoveMenu (hMenu, ID_MENU_CALL, MF_BYCOMMAND);
+    RemoveMenu (hMenu, ID_MENU_ANSWER, MF_BYCOMMAND);
+    RemoveMenu (hMenu, ID_MENU_DISCONNECT, MF_BYCOMMAND);
 
     switch (action) {
-    case ID_MENU_NONE:
-	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("None"));
-	SetWindowText(hwndActionButton, TEXT("-"));
-	break;
-    case ID_MENU_CALL:
-	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("Call"));
-	SetWindowText(hwndActionButton, TEXT("&Call"));
-	break;
-    case ID_MENU_ANSWER:
-	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("Answer"));
-	SetWindowText(hwndActionButton, TEXT("&Answer"));
-	break;
-    case ID_MENU_DISCONNECT:
-	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("Hangup"));
-	SetWindowText(hwndActionButton, TEXT("&Hangup"));
-	break;
+        case ID_MENU_NONE:
+            InsertMenu (hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT ("None"));
+            SetWindowText (hwndActionButton, TEXT ("-"));
+            break;
+        case ID_MENU_CALL:
+            InsertMenu (hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT ("Call"));
+            SetWindowText (hwndActionButton, TEXT ("&Call"));
+            break;
+        case ID_MENU_ANSWER:
+            InsertMenu (hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT ("Answer"));
+            SetWindowText (hwndActionButton, TEXT ("&Answer"));
+            break;
+        case ID_MENU_DISCONNECT:
+            InsertMenu (hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT ("Hangup"));
+            SetWindowText (hwndActionButton, TEXT ("&Hangup"));
+            break;
     }
 
-    EnableMenuItem(hMenu, action, MF_BYCOMMAND | (enable?MF_ENABLED:MF_GRAYED));
-    DrawMenuBar(hMainWnd);
+    EnableMenuItem (hMenu, action, MF_BYCOMMAND | (enable?MF_ENABLED:MF_GRAYED));
+    DrawMenuBar (hMainWnd);
 
     g_current_action = action;
 }
@@ -191,35 +195,35 @@ static void SetAction(int action, bool enable=true)
 /*
  * Handler when invite state has changed.
  */
-static void on_call_state(pjsua_call_id call_id, pjsip_event *e)
+static void on_call_state (pjsua_call_id call_id, pjsip_event *e)
 {
     pjsua_call_info call_info;
 
-    PJ_UNUSED_ARG(e);
+    PJ_UNUSED_ARG (e);
 
-    pjsua_call_get_info(call_id, &call_info);
+    pjsua_call_get_info (call_id, &call_info);
 
     if (call_info.state == PJSIP_INV_STATE_DISCONNECTED) {
 
-	g_current_call = PJSUA_INVALID_ID;
-	SetURI(SIP_DST_URI, -1);
-	SetAction(ID_MENU_CALL);
-	//SetCallStatus(call_info.state_text.ptr, call_info.state_text.slen);
-	SetCallStatus(call_info.last_status_text.ptr, call_info.last_status_text.slen);
+        g_current_call = PJSUA_INVALID_ID;
+        SetURI (SIP_DST_URI, -1);
+        SetAction (ID_MENU_CALL);
+        //SetCallStatus(call_info.state_text.ptr, call_info.state_text.slen);
+        SetCallStatus (call_info.last_status_text.ptr, call_info.last_status_text.slen);
 
     } else {
-	//if (g_current_call == PJSUA_INVALID_ID)
-	//    g_current_call = call_id;
+        //if (g_current_call == PJSUA_INVALID_ID)
+        //    g_current_call = call_id;
 
-	if (call_info.remote_contact.slen)
-	    SetURI(call_info.remote_contact.ptr, call_info.remote_contact.slen, false);
-	else
-	    SetURI(call_info.remote_info.ptr, call_info.remote_info.slen, false);
+        if (call_info.remote_contact.slen)
+            SetURI (call_info.remote_contact.ptr, call_info.remote_contact.slen, false);
+        else
+            SetURI (call_info.remote_info.ptr, call_info.remote_info.slen, false);
 
-	if (call_info.state == PJSIP_INV_STATE_CONFIRMED)
-	    SetAction(ID_MENU_DISCONNECT);
+        if (call_info.state == PJSIP_INV_STATE_CONFIRMED)
+            SetAction (ID_MENU_DISCONNECT);
 
-	SetCallStatus(call_info.state_text.ptr, call_info.state_text.slen);
+        SetCallStatus (call_info.state_text.ptr, call_info.state_text.slen);
     }
 }
 
@@ -229,15 +233,15 @@ static void on_call_state(pjsua_call_id call_id, pjsip_event *e)
  * The action may connect the call to sound device, to file, or
  * to loop the call.
  */
-static void on_call_media_state(pjsua_call_id call_id)
+static void on_call_media_state (pjsua_call_id call_id)
 {
     pjsua_call_info call_info;
 
-    pjsua_call_get_info(call_id, &call_info);
+    pjsua_call_get_info (call_id, &call_info);
 
     if (call_info.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
-	pjsua_conf_connect(call_info.conf_slot, 0);
-	pjsua_conf_connect(0, call_info.conf_slot);
+        pjsua_conf_connect (call_info.conf_slot, 0);
+        pjsua_conf_connect (0, call_info.conf_slot);
     }
 }
 
@@ -245,37 +249,37 @@ static void on_call_media_state(pjsua_call_id call_id)
 /**
  * Handler when there is incoming call.
  */
-static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
-			     pjsip_rx_data *rdata)
+static void on_incoming_call (pjsua_acc_id acc_id, pjsua_call_id call_id,
+                              pjsip_rx_data *rdata)
 {
     pjsua_call_info call_info;
 
-    PJ_UNUSED_ARG(acc_id);
-    PJ_UNUSED_ARG(rdata);
+    PJ_UNUSED_ARG (acc_id);
+    PJ_UNUSED_ARG (rdata);
 
     if (g_current_call != PJSUA_INVALID_ID) {
-	pj_str_t reason;
-	reason = pj_str("Another call is in progress");
-	pjsua_call_answer(call_id, PJSIP_SC_BUSY_HERE, &reason, NULL);
-	return;
+        pj_str_t reason;
+        reason = pj_str ("Another call is in progress");
+        pjsua_call_answer (call_id, PJSIP_SC_BUSY_HERE, &reason, NULL);
+        return;
     }
 
     g_current_call = call_id;
 
-    pjsua_call_get_info(call_id, &call_info);
+    pjsua_call_get_info (call_id, &call_info);
 
-    SetAction(ID_MENU_ANSWER);
-    SetURI(call_info.remote_info.ptr, call_info.remote_info.slen, false);
-    pjsua_call_answer(call_id, 200, NULL, NULL);
+    SetAction (ID_MENU_ANSWER);
+    SetURI (call_info.remote_info.ptr, call_info.remote_info.slen, false);
+    pjsua_call_answer (call_id, 200, NULL, NULL);
 }
 
 
 /*
  * Handler registration status has changed.
  */
-static void on_reg_state(pjsua_acc_id acc_id)
+static void on_reg_state (pjsua_acc_id acc_id)
 {
-    PJ_UNUSED_ARG(acc_id);
+    PJ_UNUSED_ARG (acc_id);
 
     // Log already written.
 }
@@ -284,65 +288,65 @@ static void on_reg_state(pjsua_acc_id acc_id)
 /*
  * Handler on buddy state changed.
  */
-static void on_buddy_state(pjsua_buddy_id buddy_id)
+static void on_buddy_state (pjsua_buddy_id buddy_id)
 {
     /* Currently this is not processed */
-    PJ_UNUSED_ARG(buddy_id);
+    PJ_UNUSED_ARG (buddy_id);
 }
 
 
 /**
  * Incoming IM message (i.e. MESSAGE request)!
  */
-static void on_pager(pjsua_call_id call_id, const pj_str_t *from, 
-		     const pj_str_t *to, const pj_str_t *contact,
-		     const pj_str_t *mime_type, const pj_str_t *text)
+static void on_pager (pjsua_call_id call_id, const pj_str_t *from,
+                      const pj_str_t *to, const pj_str_t *contact,
+                      const pj_str_t *mime_type, const pj_str_t *text)
 {
     /* Currently this is not processed */
-    PJ_UNUSED_ARG(call_id);
-    PJ_UNUSED_ARG(from);
-    PJ_UNUSED_ARG(to);
-    PJ_UNUSED_ARG(contact);
-    PJ_UNUSED_ARG(mime_type);
-    PJ_UNUSED_ARG(text);
+    PJ_UNUSED_ARG (call_id);
+    PJ_UNUSED_ARG (from);
+    PJ_UNUSED_ARG (to);
+    PJ_UNUSED_ARG (contact);
+    PJ_UNUSED_ARG (mime_type);
+    PJ_UNUSED_ARG (text);
 }
 
 
 /**
  * Received typing indication
  */
-static void on_typing(pjsua_call_id call_id, const pj_str_t *from,
-		      const pj_str_t *to, const pj_str_t *contact,
-		      pj_bool_t is_typing)
+static void on_typing (pjsua_call_id call_id, const pj_str_t *from,
+                       const pj_str_t *to, const pj_str_t *contact,
+                       pj_bool_t is_typing)
 {
     /* Currently this is not processed */
-    PJ_UNUSED_ARG(call_id);
-    PJ_UNUSED_ARG(from);
-    PJ_UNUSED_ARG(to);
-    PJ_UNUSED_ARG(contact);
-    PJ_UNUSED_ARG(is_typing);
+    PJ_UNUSED_ARG (call_id);
+    PJ_UNUSED_ARG (from);
+    PJ_UNUSED_ARG (to);
+    PJ_UNUSED_ARG (contact);
+    PJ_UNUSED_ARG (is_typing);
 }
 
-/** 
- * Callback upon NAT detection completion 
+/**
+ * Callback upon NAT detection completion
  */
-static void nat_detect_cb(const pj_stun_nat_detect_result *res)
+static void nat_detect_cb (const pj_stun_nat_detect_result *res)
 {
     if (res->status != PJ_SUCCESS) {
-	char msg[250];
-	pj_ansi_snprintf(msg, sizeof(msg), "NAT detection failed: %s",
-			 res->status_text);
-	SetCallStatus(msg, pj_ansi_strlen(msg));
+        char msg[250];
+        pj_ansi_snprintf (msg, sizeof (msg), "NAT detection failed: %s",
+                          res->status_text);
+        SetCallStatus (msg, pj_ansi_strlen (msg));
     } else {
-	char msg[250];
-	pj_ansi_snprintf(msg, sizeof(msg), "NAT type is %s",
-			 res->nat_type_name);
-	SetCallStatus(msg, pj_ansi_strlen(msg));
+        char msg[250];
+        pj_ansi_snprintf (msg, sizeof (msg), "NAT type is %s",
+                          res->nat_type_name);
+        SetCallStatus (msg, pj_ansi_strlen (msg));
     }
 }
 
 
-static BOOL OnInitStack(void)
+static BOOL OnInitStack (void)
 {
     pjsua_config	    cfg;
     pjsua_logging_config    log_cfg;
@@ -356,26 +360,27 @@ static BOOL OnInitStack(void)
 
     /* Create pjsua */
     status = pjsua_create();
+
     if (status != PJ_SUCCESS) {
-	OnError(TEXT("Error creating pjsua"), status);
-	return FALSE;
+        OnError (TEXT ("Error creating pjsua"), status);
+        return FALSE;
     }
 
     /* Create global pool for application */
-    g_pool = pjsua_pool_create("pjsua", 4000, 4000);
+    g_pool = pjsua_pool_create ("pjsua", 4000, 4000);
 
     /* Init configs */
-    pjsua_config_default(&cfg);
-    pjsua_media_config_default(&media_cfg);
-    pjsua_transport_config_default(&udp_cfg);
+    pjsua_config_default (&cfg);
+    pjsua_media_config_default (&media_cfg);
+    pjsua_transport_config_default (&udp_cfg);
     udp_cfg.port = SIP_PORT;
 
-    pjsua_transport_config_default(&rtp_cfg);
+    pjsua_transport_config_default (&rtp_cfg);
     rtp_cfg.port = 40000;
 
-    pjsua_logging_config_default(&log_cfg);
+    pjsua_logging_config_default (&log_cfg);
     log_cfg.level = 5;
-    log_cfg.log_filename = pj_str("\\pjsua.txt");
+    log_cfg.log_filename = pj_str ("\\pjsua.txt");
     log_cfg.msg_logging = 1;
     log_cfg.decor = pj_log_get_decor() | PJ_LOG_HAS_CR;
 
@@ -399,98 +404,102 @@ static BOOL OnInitStack(void)
     cfg.cb.on_nat_detect = &nat_detect_cb;
 
     if (SIP_PROXY) {
-	    cfg.outbound_proxy_cnt = 1;
-	    cfg.outbound_proxy[0] = pj_str(SIP_PROXY);
+        cfg.outbound_proxy_cnt = 1;
+        cfg.outbound_proxy[0] = pj_str (SIP_PROXY);
     }
-    
+
     if (NAMESERVER) {
-	    cfg.nameserver_count = 1;
-	    cfg.nameserver[0] = pj_str(NAMESERVER);
+        cfg.nameserver_count = 1;
+        cfg.nameserver[0] = pj_str (NAMESERVER);
     }
-    
+
     if (NAMESERVER && STUN_DOMAIN) {
-	    cfg.stun_domain = pj_str(STUN_DOMAIN);
+        cfg.stun_domain = pj_str (STUN_DOMAIN);
     } else if (STUN_SERVER) {
-	    cfg.stun_host = pj_str(STUN_SERVER);
+        cfg.stun_host = pj_str (STUN_SERVER);
     }
-    
-    
+
+
     /* Initialize pjsua */
-    status = pjsua_init(&cfg, &log_cfg, &media_cfg);
+    status = pjsua_init (&cfg, &log_cfg, &media_cfg);
+
     if (status != PJ_SUCCESS) {
-	OnError(TEXT("Initialization error"), status);
-	return FALSE;
+        OnError (TEXT ("Initialization error"), status);
+        return FALSE;
     }
 
     /* Set codec priority */
-    pjsua_codec_set_priority(pj_cstr(&tmp, "pcmu"), 240);
-    pjsua_codec_set_priority(pj_cstr(&tmp, "pcma"), 230);
-    pjsua_codec_set_priority(pj_cstr(&tmp, "speex/8000"), 190);
-    pjsua_codec_set_priority(pj_cstr(&tmp, "ilbc"), 189);
-    pjsua_codec_set_priority(pj_cstr(&tmp, "speex/16000"), 180);
-    pjsua_codec_set_priority(pj_cstr(&tmp, "speex/32000"), 0);
-    pjsua_codec_set_priority(pj_cstr(&tmp, "gsm"), 100);
+    pjsua_codec_set_priority (pj_cstr (&tmp, "pcmu"), 240);
+    pjsua_codec_set_priority (pj_cstr (&tmp, "pcma"), 230);
+    pjsua_codec_set_priority (pj_cstr (&tmp, "speex/8000"), 190);
+    pjsua_codec_set_priority (pj_cstr (&tmp, "ilbc"), 189);
+    pjsua_codec_set_priority (pj_cstr (&tmp, "speex/16000"), 180);
+    pjsua_codec_set_priority (pj_cstr (&tmp, "speex/32000"), 0);
+    pjsua_codec_set_priority (pj_cstr (&tmp, "gsm"), 100);
 
 
     /* Add UDP transport and the corresponding PJSUA account */
-    status = pjsua_transport_create(PJSIP_TRANSPORT_UDP,
-				    &udp_cfg, &transport_id);
+    status = pjsua_transport_create (PJSIP_TRANSPORT_UDP,
+                                     &udp_cfg, &transport_id);
+
     if (status != PJ_SUCCESS) {
-	OnError(TEXT("Error starting SIP transport"), status);
-	return FALSE;
+        OnError (TEXT ("Error starting SIP transport"), status);
+        return FALSE;
     }
 
-    pjsua_transport_get_info(transport_id, &transport_info);
+    pjsua_transport_get_info (transport_id, &transport_info);
 
-    g_local_uri.ptr = (char*)pj_pool_alloc(g_pool, 128);
-    g_local_uri.slen = pj_ansi_sprintf(g_local_uri.ptr,
-				       "<sip:%.*s:%d>",
-				       (int)transport_info.local_name.host.slen,
-				       transport_info.local_name.host.ptr,
-				       transport_info.local_name.port);
+    g_local_uri.ptr = (char*) pj_pool_alloc (g_pool, 128);
+    g_local_uri.slen = pj_ansi_sprintf (g_local_uri.ptr,
+                                        "<sip:%.*s:%d>",
+                                        (int) transport_info.local_name.host.slen,
+                                        transport_info.local_name.host.ptr,
+                                        transport_info.local_name.port);
 
 
     /* Add local account */
-    pjsua_acc_add_local(transport_id, PJ_TRUE, &g_current_acc);
-    pjsua_acc_set_online_status(g_current_acc, PJ_TRUE);
+    pjsua_acc_add_local (transport_id, PJ_TRUE, &g_current_acc);
+    pjsua_acc_set_online_status (g_current_acc, PJ_TRUE);
 
     /* Add account */
     if (HAS_SIP_ACCOUNT) {
-	pjsua_acc_config cfg;
-
-	pjsua_acc_config_default(&cfg);
-	cfg.id = pj_str("sip:" SIP_USER "@" SIP_DOMAIN);
-	cfg.reg_uri = pj_str("sip:" SIP_DOMAIN);
-	cfg.cred_count = 1;
-	cfg.cred_info[0].realm = pj_str(SIP_REALM);
-	cfg.cred_info[0].scheme = pj_str("digest");
-	cfg.cred_info[0].username = pj_str(SIP_USER);
-	cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
-	cfg.cred_info[0].data = pj_str(SIP_PASSWD);
-
-	status = pjsua_acc_add(&cfg, PJ_TRUE, &g_current_acc);
-	if (status != PJ_SUCCESS) {
-	    pjsua_destroy();
-	    return PJ_FALSE;
-	}
+        pjsua_acc_config cfg;
+
+        pjsua_acc_config_default (&cfg);
+        cfg.id = pj_str ("sip:" SIP_USER "@" SIP_DOMAIN);
+        cfg.reg_uri = pj_str ("sip:" SIP_DOMAIN);
+        cfg.cred_count = 1;
+        cfg.cred_info[0].realm = pj_str (SIP_REALM);
+        cfg.cred_info[0].scheme = pj_str ("digest");
+        cfg.cred_info[0].username = pj_str (SIP_USER);
+        cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
+        cfg.cred_info[0].data = pj_str (SIP_PASSWD);
+
+        status = pjsua_acc_add (&cfg, PJ_TRUE, &g_current_acc);
+
+        if (status != PJ_SUCCESS) {
+            pjsua_destroy();
+            return PJ_FALSE;
+        }
     }
 
     /* Add buddy */
     if (SIP_DST_URI) {
-    	pjsua_buddy_config bcfg;
-    
-    	pjsua_buddy_config_default(&bcfg);
-    	bcfg.uri = pj_str(SIP_DST_URI);
-    	bcfg.subscribe = PJ_FALSE;
-    	
-    	pjsua_buddy_add(&bcfg, NULL);
+        pjsua_buddy_config bcfg;
+
+        pjsua_buddy_config_default (&bcfg);
+        bcfg.uri = pj_str (SIP_DST_URI);
+        bcfg.subscribe = PJ_FALSE;
+
+        pjsua_buddy_add (&bcfg, NULL);
     }
 
     /* Start pjsua */
     status = pjsua_start();
+
     if (status != PJ_SUCCESS) {
-	OnError(TEXT("Error starting pjsua"), status);
-	return FALSE;
+        OnError (TEXT ("Error starting pjsua"), status);
+        return FALSE;
     }
 
     return TRUE;
@@ -499,40 +508,37 @@ static BOOL OnInitStack(void)
 
 //////////////////////////////////////////////////////////////////////////////
 
-int WINAPI WinMain(HINSTANCE hInstance,
-		   HINSTANCE hPrevInstance,
-		   LPTSTR    lpCmdLine,
-		   int       nCmdShow)
+int WINAPI WinMain (HINSTANCE hInstance,
+                    HINSTANCE hPrevInstance,
+                    LPTSTR    lpCmdLine,
+                    int       nCmdShow)
 {
     MSG msg;
     HACCEL hAccelTable;
 
-    PJ_UNUSED_ARG(lpCmdLine);
-    PJ_UNUSED_ARG(hPrevInstance);
+    PJ_UNUSED_ARG (lpCmdLine);
+    PJ_UNUSED_ARG (hPrevInstance);
 
     // Perform application initialization:
-    if (!InitInstance (hInstance, nCmdShow)) 
-    {
-	return FALSE;
+    if (!InitInstance (hInstance, nCmdShow)) {
+        return FALSE;
     }
-    
-    hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_PJSUA_WINCE);
-    
-    
+
+    hAccelTable = LoadAccelerators (hInstance, (LPCTSTR) IDC_PJSUA_WINCE);
+
+
     // Main message loop:
-    while (GetMessage(&msg, NULL, 0, 0)) 
-    {
-	if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) 
-	{
-	    TranslateMessage(&msg);
-	    DispatchMessage(&msg);
-	}
+    while (GetMessage (&msg, NULL, 0, 0)) {
+        if (!TranslateAccelerator (msg.hwnd, hAccelTable, &msg)) {
+            TranslateMessage (&msg);
+            DispatchMessage (&msg);
+        }
     }
-    
+
     return msg.wParam;
 }
 
-static ATOM MyRegisterClass(HINSTANCE hInstance, LPTSTR szWindowClass)
+static ATOM MyRegisterClass (HINSTANCE hInstance, LPTSTR szWindowClass)
 {
     WNDCLASS wc;
 
@@ -541,17 +547,17 @@ static ATOM MyRegisterClass(HINSTANCE hInstance, LPTSTR szWindowClass)
     wc.cbClsExtra	= 0;
     wc.cbWndExtra	= 0;
     wc.hInstance	= hInstance;
-    wc.hIcon		= LoadIcon(hInstance, MAKEINTRESOURCE(IDI_PJSUA_WINCE));
+    wc.hIcon		= LoadIcon (hInstance, MAKEINTRESOURCE (IDI_PJSUA_WINCE));
     wc.hCursor		= 0;
-    wc.hbrBackground	= (HBRUSH) GetStockObject(WHITE_BRUSH);
+    wc.hbrBackground	= (HBRUSH) GetStockObject (WHITE_BRUSH);
     wc.lpszMenuName	= 0;
     wc.lpszClassName	= szWindowClass;
 
-    return RegisterClass(&wc);
+    return RegisterClass (&wc);
 }
 
 
-BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
+BOOL InitInstance (HINSTANCE hInstance, int nCmdShow)
 {
     HWND	hWnd;
     TCHAR	szTitle[MAX_LOADSTRING];
@@ -561,220 +567,231 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
 
     /* Init stack */
     if (OnInitStack() == FALSE)
-	return FALSE;
+        return FALSE;
 
-    LoadString(hInstance, IDC_PJSUA_WINCE, szWindowClass, MAX_LOADSTRING);
-    MyRegisterClass(hInstance, szWindowClass);
+    LoadString (hInstance, IDC_PJSUA_WINCE, szWindowClass, MAX_LOADSTRING);
+    MyRegisterClass (hInstance, szWindowClass);
 
-    LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
-    hWnd = CreateWindow(szWindowClass, szTitle, WS_VISIBLE,
-	    CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 200, 
-	    NULL, NULL, hInstance, NULL);
+    LoadString (hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
+    hWnd = CreateWindow (szWindowClass, szTitle, WS_VISIBLE,
+                         CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 200,
+                         NULL, NULL, hInstance, NULL);
 
-    if (!hWnd)
-    {	
-	    return FALSE;
+    if (!hWnd) {
+        return FALSE;
     }
 
     hMainWnd = hWnd;
-    ShowWindow(hWnd, nCmdShow);
-    UpdateWindow(hWnd);
+    ShowWindow (hWnd, nCmdShow);
+    UpdateWindow (hWnd);
+
     if (hwndCB)
-	CommandBar_Show(hwndCB, TRUE);
+        CommandBar_Show (hwndCB, TRUE);
 
-    SetTimer(hMainWnd, ID_POLL_TIMER, 50, NULL);
+    SetTimer (hMainWnd, ID_POLL_TIMER, 50, NULL);
 
     pjsua_detect_nat_type();
     return TRUE;
 }
 
 
-static void OnCreate(HWND hWnd)
+static void OnCreate (HWND hWnd)
 {
-    enum 
-    {
-	X = 10,
-	Y = 40,
-	W = 220,
-	H = 30,
+    enum {
+        X = 10,
+        Y = 40,
+        W = 220,
+        H = 30,
     };
 
     DWORD dwStyle;
 
     hMainWnd = hWnd;
 
-    hwndCB = CommandBar_Create(hInst, hWnd, 1);			
-    CommandBar_InsertMenubar(hwndCB, hInst, IDM_MENU, 0);   
-    CommandBar_AddAdornments(hwndCB, 0, 0);
+    hwndCB = CommandBar_Create (hInst, hWnd, 1);
+    CommandBar_InsertMenubar (hwndCB, hInst, IDM_MENU, 0);
+    CommandBar_AddAdornments (hwndCB, 0, 0);
 
     // Create global status text
-    dwStyle = WS_CHILD | WS_VISIBLE | WS_DISABLED | ES_LEFT;  
-    hwndGlobalStatus = CreateWindow(
-                TEXT("EDIT"),   // Class name
-                NULL,           // Window text
-                dwStyle,        // Window style
-                X,		// x-coordinate of the upper-left corner
-                Y+0,            // y-coordinate of the upper-left corner
-                W,		// Width of the window for the edit
-                                // control
-                H-5,		// Height of the window for the edit
-                                // control
-                hWnd,           // Window handle to the parent window
-                (HMENU) ID_GLOBAL_STATUS, // Control identifier
-                hInst,           // Instance handle
-                NULL);          // Specify NULL for this parameter when 
-                                // you create a control
-    SetLocalURI(g_local_uri.ptr, g_local_uri.slen, false);
+    dwStyle = WS_CHILD | WS_VISIBLE | WS_DISABLED | ES_LEFT;
+    hwndGlobalStatus = CreateWindow (
+                           TEXT ("EDIT"),  // Class name
+                           NULL,           // Window text
+                           dwStyle,        // Window style
+                           X,		// x-coordinate of the upper-left corner
+                           Y+0,            // y-coordinate of the upper-left corner
+                           W,		// Width of the window for the edit
+                           // control
+                           H-5,		// Height of the window for the edit
+                           // control
+                           hWnd,           // Window handle to the parent window
+                           (HMENU) ID_GLOBAL_STATUS, // Control identifier
+                           hInst,           // Instance handle
+                           NULL);          // Specify NULL for this parameter when
+    // you create a control
+    SetLocalURI (g_local_uri.ptr, g_local_uri.slen, false);
 
 
     // Create URI edit
-    dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER;  
+    dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER;
     hwndURI = CreateWindow (
-                TEXT("EDIT"),   // Class name
-                NULL,		// Window text
-                dwStyle,        // Window style
-                X,  // x-coordinate of the upper-left corner
-                Y+H,  // y-coordinate of the upper-left corner
-                W,  // Width of the window for the edit
-                                // control
-                H-5,  // Height of the window for the edit
-                                // control
-                hWnd,           // Window handle to the parent window
-                (HMENU) ID_URI, // Control identifier
-                hInst,           // Instance handle
-                NULL);          // Specify NULL for this parameter when 
-                                // you create a control
+                  TEXT ("EDIT"),  // Class name
+                  NULL,		// Window text
+                  dwStyle,        // Window style
+                  X,  // x-coordinate of the upper-left corner
+                  Y+H,  // y-coordinate of the upper-left corner
+                  W,  // Width of the window for the edit
+                  // control
+                  H-5,  // Height of the window for the edit
+                  // control
+                  hWnd,           // Window handle to the parent window
+                  (HMENU) ID_URI, // Control identifier
+                  hInst,           // Instance handle
+                  NULL);          // Specify NULL for this parameter when
+    // you create a control
 
     // Create action Button
-    hwndActionButton = CreateWindow( L"button", L"Action", 
-                         WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
-                         X, Y+2*H, 
-			 60, H-5, hWnd, 
-                         (HMENU) ID_BTN_ACTION,
-                         hInst, NULL );
+    hwndActionButton = CreateWindow (L"button", L"Action",
+                                     WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
+                                     X, Y+2*H,
+                                     60, H-5, hWnd,
+                                     (HMENU) ID_BTN_ACTION,
+                                     hInst, NULL);
 
     // Create exit button
-    hwndExitButton = CreateWindow( L"button", L"E&xit", 
-                         WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
-                         X+70, Y+2*H, 
-			 60, H-5, hWnd, 
-                         (HMENU) ID_EXIT,
-                         hInst, NULL );
+    hwndExitButton = CreateWindow (L"button", L"E&xit",
+                                   WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
+                                   X+70, Y+2*H,
+                                   60, H-5, hWnd,
+                                   (HMENU) ID_EXIT,
+                                   hInst, NULL);
 
 
     // Create call status edit
-    dwStyle = WS_CHILD | WS_VISIBLE | WS_DISABLED;  
+    dwStyle = WS_CHILD | WS_VISIBLE | WS_DISABLED;
     hwndCallStatus = CreateWindow (
-                TEXT("EDIT"),   // Class name
-                NULL,		// Window text
-                dwStyle,        // Window style
-                X,  // x-coordinate of the upper-left corner
-                Y+3*H,  // y-coordinate of the upper-left corner
-                W,  // Width of the window for the edit
-                                // control
-                H-5,  // Height of the window for the edit
-                                // control
-                hWnd,           // Window handle to the parent window
-                (HMENU) ID_CALL_STATUS, // Control identifier
-                hInst,           // Instance handle
-                NULL);          // Specify NULL for this parameter when 
-                                // you create a control
-    SetCallStatus("Ready", 5);
-    SetAction(ID_MENU_CALL);
-    SetURI(SIP_DST_URI, -1);
-    SetFocus(hWnd);
+                         TEXT ("EDIT"),  // Class name
+                         NULL,		// Window text
+                         dwStyle,        // Window style
+                         X,  // x-coordinate of the upper-left corner
+                         Y+3*H,  // y-coordinate of the upper-left corner
+                         W,  // Width of the window for the edit
+                         // control
+                         H-5,  // Height of the window for the edit
+                         // control
+                         hWnd,           // Window handle to the parent window
+                         (HMENU) ID_CALL_STATUS, // Control identifier
+                         hInst,           // Instance handle
+                         NULL);          // Specify NULL for this parameter when
+    // you create a control
+    SetCallStatus ("Ready", 5);
+    SetAction (ID_MENU_CALL);
+    SetURI (SIP_DST_URI, -1);
+    SetFocus (hWnd);
 
 }
 
 
-static void OnDestroy(void)
+static void OnDestroy (void)
 {
     pjsua_destroy();
 }
 
-static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+static LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
     int wmId, wmEvent;
-    
+
     switch (message) {
-    case WM_KEYUP:
-	if (wParam==114) {
-	    wParam = ID_MENU_CALL;
-	} else if (wParam==115) {
-	    if (g_current_call == PJSUA_INVALID_ID)
-		wParam = ID_EXIT;
-	    else
-		wParam = ID_MENU_DISCONNECT;
-	} else
-	    break;
-
-    case WM_COMMAND:
-	wmId    = LOWORD(wParam); 
-	wmEvent = HIWORD(wParam); 
-	if (wmId == ID_BTN_ACTION)
-	    wmId = g_current_action;
-	switch (wmId)
-	{
-	case ID_MENU_CALL:
-	    if (g_current_call != PJSUA_INVALID_ID) {
-		MessageBox(NULL, TEXT("Can not make call"), 
-			   TEXT("You already have one call active"), MB_OK);
-	    }
-	    pj_str_t dst_uri;
-	    wchar_t text[256];
-	    char tmp[256];
-	    pj_status_t status;
-
-	    GetWindowText(hwndURI, text, PJ_ARRAY_SIZE(text));
-	    pj_unicode_to_ansi(text, pj_unicode_strlen(text),
-			       tmp, sizeof(tmp));
-	    dst_uri.ptr = tmp;
-	    dst_uri.slen = pj_ansi_strlen(tmp);
-	    status = pjsua_call_make_call(g_current_acc,
-						      &dst_uri, 0, NULL,
-						      NULL, &g_current_call);
-	    if (status != PJ_SUCCESS)
-		OnError(TEXT("Unable to make call"), status);
-	    break;
-	case ID_MENU_ANSWER:
-	    if (g_current_call == PJSUA_INVALID_ID)
-		MessageBox(NULL, TEXT("Can not answer"), 
-			   TEXT("There is no call!"), MB_OK);
-	    else
-		pjsua_call_answer(g_current_call, 200, NULL, NULL);
-	    break;
-	case ID_MENU_DISCONNECT:
-	    if (g_current_call == PJSUA_INVALID_ID)
-		MessageBox(NULL, TEXT("Can not disconnect"), 
-			   TEXT("There is no call!"), MB_OK);
-	    else
-		pjsua_call_hangup(g_current_call, PJSIP_SC_DECLINE, NULL, NULL);
-	    break;
-	case ID_EXIT:
-	    DestroyWindow(hWnd);
-	    break;
-	default:
-	    return DefWindowProc(hWnd, message, wParam, lParam);
-	}
-	break;
-
-    case WM_CREATE:
-	OnCreate(hWnd);
-	break;
-
-    case WM_DESTROY:
-	OnDestroy();
-	CommandBar_Destroy(hwndCB);
-	PostQuitMessage(0);
-	break;
-
-    case WM_TIMER:
-	pjsua_handle_events(1);
-	break;
-
-    default:
-	return DefWindowProc(hWnd, message, wParam, lParam);
+        case WM_KEYUP:
+
+            if (wParam==114) {
+                wParam = ID_MENU_CALL;
+            } else if (wParam==115) {
+                if (g_current_call == PJSUA_INVALID_ID)
+                    wParam = ID_EXIT;
+                else
+                    wParam = ID_MENU_DISCONNECT;
+            } else
+                break;
+
+        case WM_COMMAND:
+            wmId    = LOWORD (wParam);
+            wmEvent = HIWORD (wParam);
+
+            if (wmId == ID_BTN_ACTION)
+                wmId = g_current_action;
+
+            switch (wmId) {
+                case ID_MENU_CALL:
+
+                    if (g_current_call != PJSUA_INVALID_ID) {
+                        MessageBox (NULL, TEXT ("Can not make call"),
+                                    TEXT ("You already have one call active"), MB_OK);
+                    }
+
+                    pj_str_t dst_uri;
+                    wchar_t text[256];
+                    char tmp[256];
+                    pj_status_t status;
+
+                    GetWindowText (hwndURI, text, PJ_ARRAY_SIZE (text));
+                    pj_unicode_to_ansi (text, pj_unicode_strlen (text),
+                                        tmp, sizeof (tmp));
+                    dst_uri.ptr = tmp;
+                    dst_uri.slen = pj_ansi_strlen (tmp);
+                    status = pjsua_call_make_call (g_current_acc,
+                                                   &dst_uri, 0, NULL,
+                                                   NULL, &g_current_call);
+
+                    if (status != PJ_SUCCESS)
+                        OnError (TEXT ("Unable to make call"), status);
+
+                    break;
+                case ID_MENU_ANSWER:
+
+                    if (g_current_call == PJSUA_INVALID_ID)
+                        MessageBox (NULL, TEXT ("Can not answer"),
+                                    TEXT ("There is no call!"), MB_OK);
+                    else
+                        pjsua_call_answer (g_current_call, 200, NULL, NULL);
+
+                    break;
+                case ID_MENU_DISCONNECT:
+
+                    if (g_current_call == PJSUA_INVALID_ID)
+                        MessageBox (NULL, TEXT ("Can not disconnect"),
+                                    TEXT ("There is no call!"), MB_OK);
+                    else
+                        pjsua_call_hangup (g_current_call, PJSIP_SC_DECLINE, NULL, NULL);
+
+                    break;
+                case ID_EXIT:
+                    DestroyWindow (hWnd);
+                    break;
+                default:
+                    return DefWindowProc (hWnd, message, wParam, lParam);
+            }
+
+            break;
+
+        case WM_CREATE:
+            OnCreate (hWnd);
+            break;
+
+        case WM_DESTROY:
+            OnDestroy();
+            CommandBar_Destroy (hwndCB);
+            PostQuitMessage (0);
+            break;
+
+        case WM_TIMER:
+            pjsua_handle_events (1);
+            break;
+
+        default:
+            return DefWindowProc (hWnd, message, wParam, lParam);
     }
-   return 0;
+
+    return 0;
 }
 
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PocketPJ.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PocketPJ.cpp
index 2d42d96e2ea3f8e259bbfb5dc4ab2966ea01d874..cc75d884ba8ed66ab5e30a943b74a3ec7d4f896e 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PocketPJ.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PocketPJ.cpp
@@ -14,21 +14,21 @@ static char THIS_FILE[] = __FILE__;
 /////////////////////////////////////////////////////////////////////////////
 // CPocketPJApp
 
-BEGIN_MESSAGE_MAP(CPocketPJApp, CWinApp)
-	//{{AFX_MSG_MAP(CPocketPJApp)
-		// NOTE - the ClassWizard will add and remove mapping macros here.
-		//    DO NOT EDIT what you see in these blocks of generated code!
-	//}}AFX_MSG_MAP
+BEGIN_MESSAGE_MAP (CPocketPJApp, CWinApp)
+    //{{AFX_MSG_MAP(CPocketPJApp)
+    // NOTE - the ClassWizard will add and remove mapping macros here.
+    //    DO NOT EDIT what you see in these blocks of generated code!
+    //}}AFX_MSG_MAP
 END_MESSAGE_MAP()
 
 /////////////////////////////////////////////////////////////////////////////
 // CPocketPJApp construction
 
 CPocketPJApp::CPocketPJApp()
-	: CWinApp()
+        : CWinApp()
 {
-	// TODO: add construction code here,
-	// Place all significant initialization in InitInstance
+    // TODO: add construction code here,
+    // Place all significant initialization in InitInstance
 }
 
 /////////////////////////////////////////////////////////////////////////////
@@ -41,26 +41,24 @@ CPocketPJApp theApp;
 
 BOOL CPocketPJApp::InitInstance()
 {
-	// Standard initialization
-	// If you are not using these features and wish to reduce the size
-	//  of your final executable, you should remove from the following
-	//  the specific initialization routines you do not need.
+    // Standard initialization
+    // If you are not using these features and wish to reduce the size
+    //  of your final executable, you should remove from the following
+    //  the specific initialization routines you do not need.
 
-	CPocketPJDlg dlg;
-	m_pMainWnd = &dlg;
-	int nResponse = dlg.DoModal();
-	if (nResponse == IDOK)
-	{
-		// TODO: Place code here to handle when the dialog is
-		//  dismissed with OK
-	}
-	else if (nResponse == IDCANCEL)
-	{
-		// TODO: Place code here to handle when the dialog is
-		//  dismissed with Cancel
-	}
+    CPocketPJDlg dlg;
+    m_pMainWnd = &dlg;
+    int nResponse = dlg.DoModal();
 
-	// Since the dialog has been closed, return FALSE so that we exit the
-	//  application, rather than start the application's message pump.
-	return FALSE;
+    if (nResponse == IDOK) {
+        // TODO: Place code here to handle when the dialog is
+        //  dismissed with OK
+    } else if (nResponse == IDCANCEL) {
+        // TODO: Place code here to handle when the dialog is
+        //  dismissed with Cancel
+    }
+
+    // Since the dialog has been closed, return FALSE so that we exit the
+    //  application, rather than start the application's message pump.
+    return FALSE;
 }
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PocketPJDlg.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PocketPJDlg.cpp
index b8a6bf2f1e7b3b3853bd122c02513c3e7d2fc0c2..7751205da544d54429c0e94c7c3a29c8d5c99723 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PocketPJDlg.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PocketPJDlg.cpp
@@ -18,64 +18,65 @@ static CPocketPJDlg *theDlg;
 /////////////////////////////////////////////////////////////////////////////
 // CPocketPJDlg dialog
 
-CPocketPJDlg::CPocketPJDlg(CWnd* pParent /*=NULL*/)
-	: CDialog(CPocketPJDlg::IDD, pParent), m_PopUp(NULL)
+CPocketPJDlg::CPocketPJDlg (CWnd* pParent /*=NULL*/)
+        : CDialog (CPocketPJDlg::IDD, pParent), m_PopUp (NULL)
 {
-	//{{AFX_DATA_INIT(CPocketPJDlg)
-		// NOTE: the ClassWizard will add member initialization here
-	//}}AFX_DATA_INIT
-	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
-	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
-
-	theDlg = this;
-
-	m_PopUp = new CPopUpWnd(this);
-	m_PopUp->Hide();
-
-	unsigned i;
-	m_PopUpCount = 0;
-	for (i=0; i<POPUP_MAX_TYPE; ++i) {
-	    m_PopUpState[i] = FALSE;
-	}
+    //{{AFX_DATA_INIT(CPocketPJDlg)
+    // NOTE: the ClassWizard will add member initialization here
+    //}}AFX_DATA_INIT
+    // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
+    m_hIcon = AfxGetApp()->LoadIcon (IDR_MAINFRAME);
+
+    theDlg = this;
+
+    m_PopUp = new CPopUpWnd (this);
+    m_PopUp->Hide();
+
+    unsigned i;
+    m_PopUpCount = 0;
+
+    for (i=0; i<POPUP_MAX_TYPE; ++i) {
+        m_PopUpState[i] = FALSE;
+    }
 }
 
-void CPocketPJDlg::DoDataExchange(CDataExchange* pDX)
+void CPocketPJDlg::DoDataExchange (CDataExchange* pDX)
 {
-	CDialog::DoDataExchange(pDX);
-	//{{AFX_DATA_MAP(CPocketPJDlg)
-	DDX_Control(pDX, IDC_URL, m_Url);
-	DDX_Control(pDX, IDC_BUDDY_LIST, m_BuddyList);
-	DDX_Control(pDX, IDC_BTN_ACTION, m_BtnUrlAction);
-	DDX_Control(pDX, IDC_BTN_ACC, m_BtnAcc);
-	DDX_Control(pDX, IDC_ACC_ID, m_AccId);
-	//}}AFX_DATA_MAP
+    CDialog::DoDataExchange (pDX);
+    //{{AFX_DATA_MAP(CPocketPJDlg)
+    DDX_Control (pDX, IDC_URL, m_Url);
+    DDX_Control (pDX, IDC_BUDDY_LIST, m_BuddyList);
+    DDX_Control (pDX, IDC_BTN_ACTION, m_BtnUrlAction);
+    DDX_Control (pDX, IDC_BTN_ACC, m_BtnAcc);
+    DDX_Control (pDX, IDC_ACC_ID, m_AccId);
+    //}}AFX_DATA_MAP
 }
 
-BEGIN_MESSAGE_MAP(CPocketPJDlg, CDialog)
-	//{{AFX_MSG_MAP(CPocketPJDlg)
-	ON_BN_CLICKED(IDC_BTN_ACC, OnBtnAcc)
-	ON_BN_CLICKED(IDC_BTN_ACTION, OnBtnAction)
-	ON_COMMAND(IDC_ACC_SETTINGS, OnSettings)
-	ON_COMMAND(IDC_URI_CALL, OnUriCall)
-	ON_WM_TIMER()
-	ON_COMMAND(IDC_URI_ADD_BUDDY, OnUriAddBuddy)
-	ON_COMMAND(IDC_URI_DEL_BUDDY, OnUriDelBuddy)
-	ON_COMMAND(IDC_ACC_ONLINE, OnAccOnline)
-	ON_COMMAND(IDC_ACC_INVISIBLE, OnAccInvisible)
-	ON_NOTIFY(NM_CLICK, IDC_BUDDY_LIST, OnClickBuddyList)
-	//}}AFX_MSG_MAP
+BEGIN_MESSAGE_MAP (CPocketPJDlg, CDialog)
+    //{{AFX_MSG_MAP(CPocketPJDlg)
+    ON_BN_CLICKED (IDC_BTN_ACC, OnBtnAcc)
+    ON_BN_CLICKED (IDC_BTN_ACTION, OnBtnAction)
+    ON_COMMAND (IDC_ACC_SETTINGS, OnSettings)
+    ON_COMMAND (IDC_URI_CALL, OnUriCall)
+    ON_WM_TIMER()
+    ON_COMMAND (IDC_URI_ADD_BUDDY, OnUriAddBuddy)
+    ON_COMMAND (IDC_URI_DEL_BUDDY, OnUriDelBuddy)
+    ON_COMMAND (IDC_ACC_ONLINE, OnAccOnline)
+    ON_COMMAND (IDC_ACC_INVISIBLE, OnAccInvisible)
+    ON_NOTIFY (NM_CLICK, IDC_BUDDY_LIST, OnClickBuddyList)
+    //}}AFX_MSG_MAP
 END_MESSAGE_MAP()
 
 
-void CPocketPJDlg::Error(const CString &title, pj_status_t rc)
+void CPocketPJDlg::Error (const CString &title, pj_status_t rc)
 {
     char errmsg[PJ_ERR_MSG_SIZE];
     wchar_t werrmsg[PJ_ERR_MSG_SIZE];
 
-    pj_strerror(rc, errmsg, sizeof(errmsg));
-    pj_ansi_to_unicode(errmsg, strlen(errmsg), werrmsg, PJ_ARRAY_SIZE(werrmsg));
+    pj_strerror (rc, errmsg, sizeof (errmsg));
+    pj_ansi_to_unicode (errmsg, strlen (errmsg), werrmsg, PJ_ARRAY_SIZE (werrmsg));
 
-    AfxMessageBox(title + _T(": ") + werrmsg);
+    AfxMessageBox (title + _T (": ") + werrmsg);
 }
 
 BOOL CPocketPJDlg::Restart()
@@ -84,41 +85,42 @@ BOOL CPocketPJDlg::Restart()
     pj_status_t status;
 
     char ver[80];
-    sprintf(ver, "PocketPJ/%s", pj_get_version());
+    sprintf (ver, "PocketPJ/%s", pj_get_version());
 
-    ShowWindow(SW_SHOW);
-    PopUp_Show(POPUP_REGISTRATION, ver,
-	       "Starting up....", "", "", "", 0);
+    ShowWindow (SW_SHOW);
+    PopUp_Show (POPUP_REGISTRATION, ver,
+                "Starting up....", "", "", "", 0);
 
-    KillTimer(TIMER_ID);
+    KillTimer (TIMER_ID);
 
     // Destroy first.
-    PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE3, "Cleaning up..");
+    PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE3, "Cleaning up..");
     pjsua_destroy();
 
-    m_BtnAcc.SetBitmap(::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_OFFLINE)) );
+    m_BtnAcc.SetBitmap (::LoadBitmap (AfxGetInstanceHandle(), MAKEINTRESOURCE (IDB_OFFLINE)));
     UpdateWindow();
 
 
     // Create
-    PopUp_Show(POPUP_REGISTRATION, ver,
-	       "Starting up....", "Creating stack..", "", "", 0);
+    PopUp_Show (POPUP_REGISTRATION, ver,
+                "Starting up....", "Creating stack..", "", "", 0);
 
     status = pjsua_create();
+
     if (status != PJ_SUCCESS) {
-	Error(_T("Error in creating library"), status);
-	PopUp_Hide(POPUP_REGISTRATION);
-	return FALSE;
+        Error (_T ("Error in creating library"), status);
+        PopUp_Hide (POPUP_REGISTRATION);
+        return FALSE;
     }
 
     pjsua_config cfg;
     pjsua_logging_config log_cfg;
     pjsua_media_config media_cfg;
 
-    pjsua_config_default(&cfg);
+    pjsua_config_default (&cfg);
     cfg.max_calls = 1;
     cfg.thread_cnt = 0;
-    cfg.user_agent = pj_str(ver);
+    cfg.user_agent = pj_str (ver);
 
     cfg.cb.on_call_state = &on_call_state;
     cfg.cb.on_call_media_state = &on_call_media_state;
@@ -130,53 +132,55 @@ BOOL CPocketPJDlg::Restart()
     /* Configure nameserver */
     char nameserver[60];
     {
-	FIXED_INFO fi;
-	PIP_ADDR_STRING pDNS = NULL;
-	ULONG len = sizeof(fi);
-	CString err;
-
-	PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE3, "Retrieving network parameters..");
-	if (GetNetworkParams(&fi, &len) != ERROR_SUCCESS) {
-	    err = _T("Info: Error querying network parameters. You must configure DNS server.");
-	} else if (fi.CurrentDnsServer) {
-	    pDNS = fi.CurrentDnsServer;
-	} else if (fi.DnsServerList.IpAddress.String[0] != 0) {
-	    pDNS = &fi.DnsServerList;
-	} else {
-	    err = _T("Info: DNS server not configured. You must configure DNS server.");
-	} 
-	
-	if (err.GetLength()) {
-	    if (m_Cfg.m_DNS.GetLength()) {
-		pj_unicode_to_ansi((LPCTSTR)m_Cfg.m_DNS, m_Cfg.m_DNS.GetLength(),
-				   nameserver, sizeof(nameserver));
-		cfg.nameserver_count = 1;
-		cfg.nameserver[0] = pj_str(nameserver);
-	    } else {
-		AfxMessageBox(err);
-		pjsua_destroy();
-		PopUp_Hide(POPUP_REGISTRATION);
-		return FALSE;
-	    }
-	} else {
-	    strcpy(nameserver, pDNS->IpAddress.String);
-	    cfg.nameserver_count = 1;
-	    cfg.nameserver[0] = pj_str(nameserver);
-	}
+        FIXED_INFO fi;
+        PIP_ADDR_STRING pDNS = NULL;
+        ULONG len = sizeof (fi);
+        CString err;
+
+        PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE3, "Retrieving network parameters..");
+
+        if (GetNetworkParams (&fi, &len) != ERROR_SUCCESS) {
+            err = _T ("Info: Error querying network parameters. You must configure DNS server.");
+        } else if (fi.CurrentDnsServer) {
+            pDNS = fi.CurrentDnsServer;
+        } else if (fi.DnsServerList.IpAddress.String[0] != 0) {
+            pDNS = &fi.DnsServerList;
+        } else {
+            err = _T ("Info: DNS server not configured. You must configure DNS server.");
+        }
+
+        if (err.GetLength()) {
+            if (m_Cfg.m_DNS.GetLength()) {
+                pj_unicode_to_ansi ( (LPCTSTR) m_Cfg.m_DNS, m_Cfg.m_DNS.GetLength(),
+                                     nameserver, sizeof (nameserver));
+                cfg.nameserver_count = 1;
+                cfg.nameserver[0] = pj_str (nameserver);
+            } else {
+                AfxMessageBox (err);
+                pjsua_destroy();
+                PopUp_Hide (POPUP_REGISTRATION);
+                return FALSE;
+            }
+        } else {
+            strcpy (nameserver, pDNS->IpAddress.String);
+            cfg.nameserver_count = 1;
+            cfg.nameserver[0] = pj_str (nameserver);
+        }
     }
 
     char tmp_stun[80];
+
     if (m_Cfg.m_UseStun) {
-	pj_unicode_to_ansi((LPCTSTR)m_Cfg.m_StunSrv, m_Cfg.m_StunSrv.GetLength(),
-			   tmp_stun, sizeof(tmp_stun));
-	cfg.stun_host = pj_str(tmp_stun);
+        pj_unicode_to_ansi ( (LPCTSTR) m_Cfg.m_StunSrv, m_Cfg.m_StunSrv.GetLength(),
+                             tmp_stun, sizeof (tmp_stun));
+        cfg.stun_host = pj_str (tmp_stun);
     }
 
-    pjsua_logging_config_default(&log_cfg);
+    pjsua_logging_config_default (&log_cfg);
     log_cfg.msg_logging = PJ_TRUE;
-    log_cfg.log_filename = pj_str("\\PocketPJ.TXT");
+    log_cfg.log_filename = pj_str ("\\PocketPJ.TXT");
 
-    pjsua_media_config_default(&media_cfg);
+    pjsua_media_config_default (&media_cfg);
     media_cfg.clock_rate = 8000;
     media_cfg.audio_frame_ptime = 40;
     media_cfg.ec_tail_len = 0;
@@ -189,104 +193,109 @@ BOOL CPocketPJDlg::Restart()
     media_cfg.no_vad = !m_Cfg.m_VAD;
 
     if (m_Cfg.m_EchoSuppress) {
-	media_cfg.ec_options = PJMEDIA_ECHO_SIMPLE;
-	media_cfg.ec_tail_len = m_Cfg.m_EcTail;
+        media_cfg.ec_options = PJMEDIA_ECHO_SIMPLE;
+        media_cfg.ec_tail_len = m_Cfg.m_EcTail;
     }
 
     // Init
-    PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE3, "Initializing..");
-    status = pjsua_init(&cfg, &log_cfg, &media_cfg);
+    PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE3, "Initializing..");
+    status = pjsua_init (&cfg, &log_cfg, &media_cfg);
+
     if (status != PJ_SUCCESS) {
-	Error(_T("Error initializing library"), status);
-	pjsua_destroy();
-	PopUp_Hide(POPUP_REGISTRATION);
-	return FALSE;
+        Error (_T ("Error initializing library"), status);
+        pjsua_destroy();
+        PopUp_Hide (POPUP_REGISTRATION);
+        return FALSE;
     }
 
     // Create one UDP transport
-    PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE3, "Adding UDP transport..");
+    PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE3, "Adding UDP transport..");
     pjsua_transport_id transport_id;
     pjsua_transport_config udp_cfg;
 
-    pjsua_transport_config_default(&udp_cfg);
+    pjsua_transport_config_default (&udp_cfg);
     udp_cfg.port = 0;
-    status = pjsua_transport_create(PJSIP_TRANSPORT_UDP,
-					&udp_cfg, &transport_id);
+    status = pjsua_transport_create (PJSIP_TRANSPORT_UDP,
+                                     &udp_cfg, &transport_id);
+
     if (status != PJ_SUCCESS) {
-	Error(_T("Error creating UDP transport"), status);
-	pjsua_destroy();
-	PopUp_Hide(POPUP_REGISTRATION);
-	return FALSE;
+        Error (_T ("Error creating UDP transport"), status);
+        pjsua_destroy();
+        PopUp_Hide (POPUP_REGISTRATION);
+        return FALSE;
     }
 
     // Always instantiate TCP to support auto-switching to TCP when
     // packet is larger than 1300 bytes. If TCP is disabled when
     // no auto-switching will occur
     if (1) {
-	// Create one TCP transport
-	PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE3, "Adding TCP transport..");
-	pjsua_transport_id transport_id;
-	pjsua_transport_config tcp_cfg;
-
-	pjsua_transport_config_default(&tcp_cfg);
-	tcp_cfg.port = 0;
-	status = pjsua_transport_create(PJSIP_TRANSPORT_TCP,
-					&tcp_cfg, &transport_id);
-	if (status != PJ_SUCCESS) {
-	    Error(_T("Error creating TCP transport"), status);
-	    pjsua_destroy();
-	    PopUp_Hide(POPUP_REGISTRATION);
-	    return FALSE;
-	}
+        // Create one TCP transport
+        PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE3, "Adding TCP transport..");
+        pjsua_transport_id transport_id;
+        pjsua_transport_config tcp_cfg;
+
+        pjsua_transport_config_default (&tcp_cfg);
+        tcp_cfg.port = 0;
+        status = pjsua_transport_create (PJSIP_TRANSPORT_TCP,
+                                         &tcp_cfg, &transport_id);
+
+        if (status != PJ_SUCCESS) {
+            Error (_T ("Error creating TCP transport"), status);
+            pjsua_destroy();
+            PopUp_Hide (POPUP_REGISTRATION);
+            return FALSE;
+        }
     }
 
     // Adjust codecs priority
     pj_str_t tmp;
-    pjsua_codec_set_priority(pj_cstr(&tmp, "*"), 0);
-    for (i=0; i<(unsigned)m_Cfg.m_Codecs.GetSize(); ++i) {
-	CString codec = m_Cfg.m_Codecs.GetAt(i);
-	char tmp_nam[80];
-
-	pj_unicode_to_ansi((LPCTSTR)codec, codec.GetLength(),
-			   tmp_nam, sizeof(tmp_nam));
-	pjsua_codec_set_priority(pj_cstr(&tmp, tmp_nam), (pj_uint8_t)(200-i));
+    pjsua_codec_set_priority (pj_cstr (&tmp, "*"), 0);
+
+    for (i=0; i< (unsigned) m_Cfg.m_Codecs.GetSize(); ++i) {
+        CString codec = m_Cfg.m_Codecs.GetAt (i);
+        char tmp_nam[80];
+
+        pj_unicode_to_ansi ( (LPCTSTR) codec, codec.GetLength(),
+                             tmp_nam, sizeof (tmp_nam));
+        pjsua_codec_set_priority (pj_cstr (&tmp, tmp_nam), (pj_uint8_t) (200-i));
     }
 
     // Start!
-    PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE3, "Starting..");
+    PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE3, "Starting..");
     status = pjsua_start();
+
     if (status != PJ_SUCCESS) {
-	Error(_T("Error starting library"), status);
-	pjsua_destroy();
-	PopUp_Hide(POPUP_REGISTRATION);
-	return FALSE;
+        Error (_T ("Error starting library"), status);
+        pjsua_destroy();
+        PopUp_Hide (POPUP_REGISTRATION);
+        return FALSE;
     }
 
     // Add account
-    PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE3, "Adding account..");
+    PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE3, "Adding account..");
     char domain[80], username[80], passwd[80];
     char id[80], reg_uri[80];
     pjsua_acc_config acc_cfg;
 
-    pj_unicode_to_ansi((LPCTSTR)m_Cfg.m_Domain, m_Cfg.m_Domain.GetLength(),
-		       domain, sizeof(domain));
-    pj_unicode_to_ansi((LPCTSTR)m_Cfg.m_User, m_Cfg.m_User.GetLength(),
-		       username, sizeof(username));
-    pj_unicode_to_ansi((LPCTSTR)m_Cfg.m_Password, m_Cfg.m_Password.GetLength(),
-		       passwd, sizeof(passwd));
+    pj_unicode_to_ansi ( (LPCTSTR) m_Cfg.m_Domain, m_Cfg.m_Domain.GetLength(),
+                         domain, sizeof (domain));
+    pj_unicode_to_ansi ( (LPCTSTR) m_Cfg.m_User, m_Cfg.m_User.GetLength(),
+                         username, sizeof (username));
+    pj_unicode_to_ansi ( (LPCTSTR) m_Cfg.m_Password, m_Cfg.m_Password.GetLength(),
+                         passwd, sizeof (passwd));
 
-    snprintf(id, sizeof(id), "<sip:%s@%s>", username, domain);
-    snprintf(reg_uri, sizeof(reg_uri), "sip:%s", domain);
+    snprintf (id, sizeof (id), "<sip:%s@%s>", username, domain);
+    snprintf (reg_uri, sizeof (reg_uri), "sip:%s", domain);
 
-    pjsua_acc_config_default(&acc_cfg);
-    acc_cfg.id = pj_str(id);
-    acc_cfg.reg_uri = pj_str(reg_uri);
+    pjsua_acc_config_default (&acc_cfg);
+    acc_cfg.id = pj_str (id);
+    acc_cfg.reg_uri = pj_str (reg_uri);
     acc_cfg.cred_count = 1;
-    acc_cfg.cred_info[0].scheme = pj_str("Digest");
-    acc_cfg.cred_info[0].realm = pj_str("*");
-    acc_cfg.cred_info[0].username = pj_str(username);
+    acc_cfg.cred_info[0].scheme = pj_str ("Digest");
+    acc_cfg.cred_info[0].realm = pj_str ("*");
+    acc_cfg.cred_info[0].username = pj_str (username);
     acc_cfg.cred_info[0].data_type = 0;
-    acc_cfg.cred_info[0].data = pj_str(passwd);
+    acc_cfg.cred_info[0].data = pj_str (passwd);
 
 #if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
     acc_cfg.use_srtp = (m_Cfg.m_UseSrtp ? PJMEDIA_SRTP_OPTIONAL : PJMEDIA_SRTP_DISABLED);
@@ -294,48 +303,50 @@ BOOL CPocketPJDlg::Restart()
 #endif
 
     acc_cfg.publish_enabled = m_Cfg.m_UsePublish;
-    
+
     char route[80];
+
     if (m_Cfg.m_TCP) {
-	snprintf(route, sizeof(route), "<sip:%s;lr;transport=tcp>", domain);
-	acc_cfg.proxy[acc_cfg.proxy_cnt++] = pj_str(route);
+        snprintf (route, sizeof (route), "<sip:%s;lr;transport=tcp>", domain);
+        acc_cfg.proxy[acc_cfg.proxy_cnt++] = pj_str (route);
     } else {
-	snprintf(route, sizeof(route), "<sip:%s;lr>", domain);
-	acc_cfg.proxy[acc_cfg.proxy_cnt++] = pj_str(route);
+        snprintf (route, sizeof (route), "<sip:%s;lr>", domain);
+        acc_cfg.proxy[acc_cfg.proxy_cnt++] = pj_str (route);
     }
 
-    status = pjsua_acc_add(&acc_cfg, PJ_TRUE, &m_PjsuaAccId);
+    status = pjsua_acc_add (&acc_cfg, PJ_TRUE, &m_PjsuaAccId);
+
     if (status != PJ_SUCCESS) {
-	Error(_T("Invalid account settings"), status);
-	pjsua_destroy();
-	PopUp_Hide(POPUP_REGISTRATION);
-	return FALSE;
+        Error (_T ("Invalid account settings"), status);
+        pjsua_destroy();
+        PopUp_Hide (POPUP_REGISTRATION);
+        return FALSE;
     }
 
-    CString acc_text = m_Cfg.m_User + _T("@") + m_Cfg.m_Domain;
-    m_AccId.SetWindowText(acc_text);
+    CString acc_text = m_Cfg.m_User + _T ("@") + m_Cfg.m_Domain;
+    m_AccId.SetWindowText (acc_text);
 
-    PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE1, acc_text);
-    PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE2, "Registering..");
-    PopUp_Modify(POPUP_REGISTRATION, POPUP_EL_TITLE3, "");
+    PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE1, acc_text);
+    PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE2, "Registering..");
+    PopUp_Modify (POPUP_REGISTRATION, POPUP_EL_TITLE3, "");
 
-    SetTimer(TIMER_ID, 100, NULL);
+    SetTimer (TIMER_ID, 100, NULL);
     return TRUE;
 }
 
 
-void CPocketPJDlg::PopUp_Show( PopUpType type, 
-			        const CString& title1,
-				const CString& title2,
-				const CString& title3,
-				const CString& btn1,
-				const CString& btn2,
-				unsigned userData)
+void CPocketPJDlg::PopUp_Show (PopUpType type,
+                               const CString& title1,
+                               const CString& title2,
+                               const CString& title3,
+                               const CString& btn1,
+                               const CString& btn2,
+                               unsigned userData)
 {
-    PJ_UNUSED_ARG(userData);
+    PJ_UNUSED_ARG (userData);
 
     if (!m_PopUpState[type])
-	++m_PopUpCount;
+        ++m_PopUpCount;
 
     m_PopUpState[type] = TRUE;
 
@@ -345,52 +356,52 @@ void CPocketPJDlg::PopUp_Show( PopUpType type,
     m_PopUpContent[type].m_Btn1 = btn1;
     m_PopUpContent[type].m_Btn2 = btn2;
 
-    m_PopUp->SetContent(m_PopUpContent[type]);
+    m_PopUp->SetContent (m_PopUpContent[type]);
     m_PopUp->Show();
 }
 
-void CPocketPJDlg::PopUp_Modify(PopUpType type,
-				PopUpElement el,
-				const CString& text)
+void CPocketPJDlg::PopUp_Modify (PopUpType type,
+                                 PopUpElement el,
+                                 const CString& text)
 {
     switch (el) {
-    case POPUP_EL_TITLE1:
-	m_PopUpContent[type].m_Title1 = text;
-	break;
-    case POPUP_EL_TITLE2:
-	m_PopUpContent[type].m_Title2 = text;
-	break;
-    case POPUP_EL_TITLE3:
-	m_PopUpContent[type].m_Title3 = text;
-	break;
-    case POPUP_EL_BUTTON1:
-	m_PopUpContent[type].m_Btn1 = text;
-	break;
-    case POPUP_EL_BUTTON2:
-	m_PopUpContent[type].m_Btn1 = text;
-	break;
+        case POPUP_EL_TITLE1:
+            m_PopUpContent[type].m_Title1 = text;
+            break;
+        case POPUP_EL_TITLE2:
+            m_PopUpContent[type].m_Title2 = text;
+            break;
+        case POPUP_EL_TITLE3:
+            m_PopUpContent[type].m_Title3 = text;
+            break;
+        case POPUP_EL_BUTTON1:
+            m_PopUpContent[type].m_Btn1 = text;
+            break;
+        case POPUP_EL_BUTTON2:
+            m_PopUpContent[type].m_Btn1 = text;
+            break;
     }
 
-    m_PopUp->SetContent(m_PopUpContent[type]);
+    m_PopUp->SetContent (m_PopUpContent[type]);
 }
 
-void CPocketPJDlg::PopUp_Hide(PopUpType type)
+void CPocketPJDlg::PopUp_Hide (PopUpType type)
 {
     if (m_PopUpState[type])
-	--m_PopUpCount;
+        --m_PopUpCount;
 
     m_PopUpState[type] = FALSE;
 
     if (m_PopUpCount == 0) {
-	m_PopUp->Hide();
-	UpdateWindow();
+        m_PopUp->Hide();
+        UpdateWindow();
     } else {
-	for (int i=POPUP_MAX_TYPE-1; i>=0; --i) {
-	    if (m_PopUpState[i]) {
-		m_PopUp->SetContent(m_PopUpContent[i]);
-		break;
-	    }
-	}
+        for (int i=POPUP_MAX_TYPE-1; i>=0; --i) {
+            if (m_PopUpState[i]) {
+                m_PopUp->SetContent (m_PopUpContent[i]);
+                break;
+            }
+        }
     }
 }
 
@@ -398,109 +409,112 @@ void CPocketPJDlg::OnCallState()
 {
     pjsua_call_info ci;
 
-    pjsua_call_get_info(0, &ci);
-    
+    pjsua_call_get_info (0, &ci);
+
     switch (ci.state) {
-    case PJSIP_INV_STATE_NULL:	    /**< Before INVITE is sent or received  */
-	break;
-    case PJSIP_INV_STATE_CALLING:   /**< After INVITE is sent		    */
-	PopUp_Show(POPUP_CALL, "Calling..", ci.remote_info.ptr, "",
-		   "", "Hangup", 0);
-	break;
-    case PJSIP_INV_STATE_INCOMING:  /**< After INVITE is received.	    */
-	PopUp_Show(POPUP_CALL, "Incoming call..", ci.remote_info.ptr, "",
-		   "Answer", "Hangup", 0);
-	pjsua_call_answer(0, 180, NULL, NULL);
-	if (m_Cfg.m_AutoAnswer)
-	    OnPopUpButton(1);
-	break;
-    case PJSIP_INV_STATE_EARLY:	    /**< After response with To tag.	    */
-    case PJSIP_INV_STATE_CONNECTING:/**< After 2xx is sent/received.	    */
-    case PJSIP_INV_STATE_CONFIRMED:  /**< After ACK is sent/received.	    */
-	{
-	    CString stateText = ci.state_text.ptr;
-	    PopUp_Modify(POPUP_CALL, POPUP_EL_TITLE3, stateText);
-	}
-	break;
-    case PJSIP_INV_STATE_DISCONNECTED:/**< Session is terminated.	    */
-	PopUp_Modify(POPUP_CALL, POPUP_EL_TITLE3, "Disconnected");
-	PopUp_Hide(POPUP_CALL);
-	break;
-    }    
+        case PJSIP_INV_STATE_NULL:	    /**< Before INVITE is sent or received  */
+            break;
+        case PJSIP_INV_STATE_CALLING:   /**< After INVITE is sent		    */
+            PopUp_Show (POPUP_CALL, "Calling..", ci.remote_info.ptr, "",
+                        "", "Hangup", 0);
+            break;
+        case PJSIP_INV_STATE_INCOMING:  /**< After INVITE is received.	    */
+            PopUp_Show (POPUP_CALL, "Incoming call..", ci.remote_info.ptr, "",
+                        "Answer", "Hangup", 0);
+            pjsua_call_answer (0, 180, NULL, NULL);
+
+            if (m_Cfg.m_AutoAnswer)
+                OnPopUpButton (1);
+
+            break;
+        case PJSIP_INV_STATE_EARLY:	    /**< After response with To tag.	    */
+        case PJSIP_INV_STATE_CONNECTING:/**< After 2xx is sent/received.	    */
+        case PJSIP_INV_STATE_CONFIRMED: { /**< After ACK is sent/received.	    */
+            CString stateText = ci.state_text.ptr;
+            PopUp_Modify (POPUP_CALL, POPUP_EL_TITLE3, stateText);
+        }
+        break;
+        case PJSIP_INV_STATE_DISCONNECTED:/**< Session is terminated.	    */
+            PopUp_Modify (POPUP_CALL, POPUP_EL_TITLE3, "Disconnected");
+            PopUp_Hide (POPUP_CALL);
+            break;
+    }
 }
 
-void CPocketPJDlg::on_call_state(pjsua_call_id call_id, pjsip_event *e)
+void CPocketPJDlg::on_call_state (pjsua_call_id call_id, pjsip_event *e)
 {
-    PJ_UNUSED_ARG(e);
-    PJ_UNUSED_ARG(call_id);
+    PJ_UNUSED_ARG (e);
+    PJ_UNUSED_ARG (call_id);
 
     theDlg->OnCallState();
 }
 
-void CPocketPJDlg::on_call_media_state(pjsua_call_id call_id)
+void CPocketPJDlg::on_call_media_state (pjsua_call_id call_id)
 {
     pjsua_call_info call_info;
 
-    pjsua_call_get_info(call_id, &call_info);
+    pjsua_call_get_info (call_id, &call_info);
+
     if (call_info.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
-	pjsua_conf_connect(call_info.conf_slot, 0);
-	pjsua_conf_connect(0, call_info.conf_slot);
+        pjsua_conf_connect (call_info.conf_slot, 0);
+        pjsua_conf_connect (0, call_info.conf_slot);
     }
 }
 
-void CPocketPJDlg::on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
-				    pjsip_rx_data *rdata)
+void CPocketPJDlg::on_incoming_call (pjsua_acc_id acc_id, pjsua_call_id call_id,
+                                     pjsip_rx_data *rdata)
 {
-    PJ_UNUSED_ARG(acc_id);
-    PJ_UNUSED_ARG(call_id);
-    PJ_UNUSED_ARG(rdata);
+    PJ_UNUSED_ARG (acc_id);
+    PJ_UNUSED_ARG (call_id);
+    PJ_UNUSED_ARG (rdata);
 }
 
 void CPocketPJDlg::OnRegState()
 {
     pjsua_acc_info ai;
-    pjsua_acc_get_info(m_PjsuaAccId, &ai);
+    pjsua_acc_get_info (m_PjsuaAccId, &ai);
 
-    CString acc_text = m_Cfg.m_User + _T("@") + m_Cfg.m_Domain;
+    CString acc_text = m_Cfg.m_User + _T ("@") + m_Cfg.m_Domain;
 
     if (ai.expires>0 && ai.status/100==2) {
-	/* Registration success */
-	HBITMAP old = m_BtnAcc.SetBitmap(::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_ONLINE)) );
-	PJ_UNUSED_ARG(old);
-	acc_text += " (OK)";
-	m_AccId.SetWindowText(acc_text);
+        /* Registration success */
+        HBITMAP old = m_BtnAcc.SetBitmap (::LoadBitmap (AfxGetInstanceHandle(), MAKEINTRESOURCE (IDB_ONLINE)));
+        PJ_UNUSED_ARG (old);
+        acc_text += " (OK)";
+        m_AccId.SetWindowText (acc_text);
     } else if (ai.status/100 != 2) {
-	acc_text += " (err)";
-	Error(_T("SIP registration error"), PJSIP_ERRNO_FROM_SIP_STATUS(ai.status));
-	m_AccId.SetWindowText(acc_text);
+        acc_text += " (err)";
+        Error (_T ("SIP registration error"), PJSIP_ERRNO_FROM_SIP_STATUS (ai.status));
+        m_AccId.SetWindowText (acc_text);
     }
-    PopUp_Hide(POPUP_REGISTRATION);
+
+    PopUp_Hide (POPUP_REGISTRATION);
 }
 
-void CPocketPJDlg::on_reg_state(pjsua_acc_id acc_id)
+void CPocketPJDlg::on_reg_state (pjsua_acc_id acc_id)
 {
-    PJ_UNUSED_ARG(acc_id);
+    PJ_UNUSED_ARG (acc_id);
 
     theDlg->OnRegState();
 }
 
-void CPocketPJDlg::on_buddy_state(pjsua_buddy_id buddy_id)
+void CPocketPJDlg::on_buddy_state (pjsua_buddy_id buddy_id)
 {
-    PJ_UNUSED_ARG(buddy_id);
+    PJ_UNUSED_ARG (buddy_id);
 
     theDlg->RedrawBuddyList();
 }
 
-void CPocketPJDlg::on_pager(pjsua_call_id call_id, const pj_str_t *from, 
-			    const pj_str_t *to, const pj_str_t *contact,
-			    const pj_str_t *mime_type, const pj_str_t *text)
+void CPocketPJDlg::on_pager (pjsua_call_id call_id, const pj_str_t *from,
+                             const pj_str_t *to, const pj_str_t *contact,
+                             const pj_str_t *mime_type, const pj_str_t *text)
 {
-    PJ_UNUSED_ARG(call_id);
-    PJ_UNUSED_ARG(from);
-    PJ_UNUSED_ARG(to);
-    PJ_UNUSED_ARG(contact);
-    PJ_UNUSED_ARG(mime_type);
-    PJ_UNUSED_ARG(text);
+    PJ_UNUSED_ARG (call_id);
+    PJ_UNUSED_ARG (from);
+    PJ_UNUSED_ARG (to);
+    PJ_UNUSED_ARG (contact);
+    PJ_UNUSED_ARG (mime_type);
+    PJ_UNUSED_ARG (text);
 }
 
 /////////////////////////////////////////////////////////////////////////////
@@ -508,143 +522,149 @@ void CPocketPJDlg::on_pager(pjsua_call_id call_id, const pj_str_t *from,
 
 BOOL CPocketPJDlg::OnInitDialog()
 {
-	CDialog::OnInitDialog();
-
-	// Set the icon for this dialog.  The framework does this automatically
-	//  when the application's main window is not a dialog
-	SetIcon(m_hIcon, TRUE);			// Set big icon
-	SetIcon(m_hIcon, FALSE);		// Set small icon
-	
-	CenterWindow(GetDesktopWindow());	// center to the hpc screen
- 
-	// TODO: Add extra initialization here
-	
-	m_Cfg.LoadRegistry();
-	//ShowWindow(SW_SHOW);
-	m_AccId.SetWindowText(m_Cfg.m_User);
-
-	CImageList *il = new CImageList;
-	VERIFY(il->Create(16, 16, ILC_COLOR|ILC_MASK, 2, 4));
-
-	CBitmap *bmp = new CBitmap;
-	bmp->LoadBitmap(MAKEINTRESOURCE(IDB_BLANK));
-	il->Add(bmp, RGB(255,255,255));
-	bmp = new CBitmap;
-	bmp->LoadBitmap(MAKEINTRESOURCE(IDB_ONLINE));
-	il->Add(bmp, RGB(255,255,255));
-	
-	m_BuddyList.SetImageList(il, LVSIL_SMALL);
-
-	if (m_Cfg.m_Domain.GetLength()==0 || Restart() == FALSE) {
-	    for (;;) {
-		CSettingsDlg dlg(m_Cfg);
-		if (dlg.DoModal() != IDOK) {
-		    EndDialog(IDOK);
-		    return TRUE;
-		}
-
-		m_Cfg.SaveRegistry();
-
-		if (Restart())
-		    break;
-	    }
-	}
-
-	RedrawBuddyList();
-	return TRUE;  // return TRUE  unless you set the focus to a control
+    CDialog::OnInitDialog();
+
+    // Set the icon for this dialog.  The framework does this automatically
+    //  when the application's main window is not a dialog
+    SetIcon (m_hIcon, TRUE);			// Set big icon
+    SetIcon (m_hIcon, FALSE);		// Set small icon
+
+    CenterWindow (GetDesktopWindow());	// center to the hpc screen
+
+    // TODO: Add extra initialization here
+
+    m_Cfg.LoadRegistry();
+    //ShowWindow(SW_SHOW);
+    m_AccId.SetWindowText (m_Cfg.m_User);
+
+    CImageList *il = new CImageList;
+    VERIFY (il->Create (16, 16, ILC_COLOR|ILC_MASK, 2, 4));
+
+    CBitmap *bmp = new CBitmap;
+    bmp->LoadBitmap (MAKEINTRESOURCE (IDB_BLANK));
+    il->Add (bmp, RGB (255,255,255));
+    bmp = new CBitmap;
+    bmp->LoadBitmap (MAKEINTRESOURCE (IDB_ONLINE));
+    il->Add (bmp, RGB (255,255,255));
+
+    m_BuddyList.SetImageList (il, LVSIL_SMALL);
+
+    if (m_Cfg.m_Domain.GetLength() ==0 || Restart() == FALSE) {
+        for (;;) {
+            CSettingsDlg dlg (m_Cfg);
+
+            if (dlg.DoModal() != IDOK) {
+                EndDialog (IDOK);
+                return TRUE;
+            }
+
+            m_Cfg.SaveRegistry();
+
+            if (Restart())
+                break;
+        }
+    }
+
+    RedrawBuddyList();
+    return TRUE;  // return TRUE  unless you set the focus to a control
 }
 
 
 
-void CPocketPJDlg::OnBtnAcc() 
+void CPocketPJDlg::OnBtnAcc()
 {
     CMenu menu;
-    VERIFY(menu.LoadMenu(IDR_ACC_MENU));
-    CMenu* pPopup = menu.GetSubMenu(0);
-    ASSERT(pPopup != NULL);
+    VERIFY (menu.LoadMenu (IDR_ACC_MENU));
+    CMenu* pPopup = menu.GetSubMenu (0);
+    ASSERT (pPopup != NULL);
 
     RECT r;
-    m_BtnAcc.GetWindowRect(&r);
-    pPopup->TrackPopupMenu(TPM_LEFTALIGN, r.left+4, r.top+4, this);
+    m_BtnAcc.GetWindowRect (&r);
+    pPopup->TrackPopupMenu (TPM_LEFTALIGN, r.left+4, r.top+4, this);
 }
 
-void CPocketPJDlg::OnBtnAction() 
+void CPocketPJDlg::OnBtnAction()
 {
     CMenu menu;
-    VERIFY(menu.LoadMenu(IDR_URI_MENU));
-    CMenu* pPopup = menu.GetSubMenu(0);
-    ASSERT(pPopup != NULL);
+    VERIFY (menu.LoadMenu (IDR_URI_MENU));
+    CMenu* pPopup = menu.GetSubMenu (0);
+    ASSERT (pPopup != NULL);
 
     RECT r;
-    this->m_BtnUrlAction.GetWindowRect(&r);
-    pPopup->TrackPopupMenu(TPM_LEFTALIGN, r.left+4, r.top+4, this);
+    this->m_BtnUrlAction.GetWindowRect (&r);
+    pPopup->TrackPopupMenu (TPM_LEFTALIGN, r.left+4, r.top+4, this);
 }
 
-void CPocketPJDlg::OnSettings() 
+void CPocketPJDlg::OnSettings()
 {
     for (;;) {
-	CSettingsDlg dlg(m_Cfg);
-	if (dlg.DoModal() != IDOK) {
-	    return;
-	}
+        CSettingsDlg dlg (m_Cfg);
+
+        if (dlg.DoModal() != IDOK) {
+            return;
+        }
 
-	m_Cfg.SaveRegistry();
+        m_Cfg.SaveRegistry();
 
-	if (Restart())
-	    break;
+        if (Restart())
+            break;
     }
 }
 
 void CPocketPJDlg::OnOK()
 {
-    if (AfxMessageBox(_T("Quit PocketPJ?"), MB_YESNO)==IDYES) {
-	KillTimer(TIMER_ID);
-	PopUp_Show(POPUP_REGISTRATION, "", "Shutting down..", "", "", "", 0);
-	pjsua_destroy();
-	CDialog::OnOK();
-	PopUp_Hide(POPUP_REGISTRATION);
-	m_Cfg.SaveRegistry();
-	return;
+    if (AfxMessageBox (_T ("Quit PocketPJ?"), MB_YESNO) ==IDYES) {
+        KillTimer (TIMER_ID);
+        PopUp_Show (POPUP_REGISTRATION, "", "Shutting down..", "", "", "", 0);
+        pjsua_destroy();
+        CDialog::OnOK();
+        PopUp_Hide (POPUP_REGISTRATION);
+        m_Cfg.SaveRegistry();
+        return;
     }
 }
 
-void CPocketPJDlg::OnTimer(UINT nIDEvent) 
+void CPocketPJDlg::OnTimer (UINT nIDEvent)
 {
-    pjsua_handle_events(10);
-    CDialog::OnTimer(nIDEvent);
+    pjsua_handle_events (10);
+    CDialog::OnTimer (nIDEvent);
 }
 
-int  CPocketPJDlg::FindBuddyInPjsua(const CString &Uri)
+int  CPocketPJDlg::FindBuddyInPjsua (const CString &Uri)
 {
     char uri[80];
     pjsua_buddy_id  id[128];
-    unsigned i, count = PJ_ARRAY_SIZE(id);
+    unsigned i, count = PJ_ARRAY_SIZE (id);
+
+    if (pjsua_enum_buddies (id, &count) != PJ_SUCCESS)
+        return PJSUA_INVALID_ID;
 
-    if (pjsua_enum_buddies(id, &count) != PJ_SUCCESS)
-	return PJSUA_INVALID_ID;
     if (count==0)
-	return PJSUA_INVALID_ID;
+        return PJSUA_INVALID_ID;
 
-    pj_unicode_to_ansi((LPCTSTR)Uri, Uri.GetLength(), uri, sizeof(uri));
+    pj_unicode_to_ansi ( (LPCTSTR) Uri, Uri.GetLength(), uri, sizeof (uri));
 
     for (i=0; i<count; ++i) {
-	pjsua_buddy_info bi;
-	pjsua_buddy_get_info(id[i], &bi);
-	if (pj_strcmp2(&bi.uri, uri)==0)
-	    return i;
+        pjsua_buddy_info bi;
+        pjsua_buddy_get_info (id[i], &bi);
+
+        if (pj_strcmp2 (&bi.uri, uri) ==0)
+            return i;
     }
 
     return PJSUA_INVALID_ID;
 }
 
-int  CPocketPJDlg::FindBuddyInCfg(const CString &uri)
+int  CPocketPJDlg::FindBuddyInCfg (const CString &uri)
 {
     int i;
+
     for (i=0; i<m_Cfg.m_BuddyList.GetSize(); ++i) {
-	if (m_Cfg.m_BuddyList.GetAt(0) == uri) {
-	    return i;
-	}
+        if (m_Cfg.m_BuddyList.GetAt (0) == uri) {
+            return i;
+        }
     }
+
     return -1;
 }
 
@@ -655,127 +675,132 @@ void CPocketPJDlg::RedrawBuddyList()
     m_BuddyList.DeleteAllItems();
 
     for (i=0; i<m_Cfg.m_BuddyList.GetSize(); ++i) {
-	int isOnline;
-	int id;
-
-	id = FindBuddyInPjsua(m_Cfg.m_BuddyList.GetAt(i));
-	if (id != PJSUA_INVALID_ID) {
-	    pjsua_buddy_info bi;
-	    pjsua_buddy_get_info(id, &bi);
-	    isOnline = (bi.status == PJSUA_BUDDY_STATUS_ONLINE);
-	} else {
-	    isOnline = 0;
-	}
-
-	LVITEM lvi;
-	memset(&lvi, 0, sizeof(lvi));
-	lvi.mask = LVIF_TEXT  | LVIF_IMAGE;
-	lvi.iItem = i;
-	lvi.iImage = isOnline;
-	lvi.pszText = (LPTSTR)(LPCTSTR)m_Cfg.m_BuddyList.GetAt(i);
-
-	m_BuddyList.InsertItem(&lvi);
+        int isOnline;
+        int id;
+
+        id = FindBuddyInPjsua (m_Cfg.m_BuddyList.GetAt (i));
+
+        if (id != PJSUA_INVALID_ID) {
+            pjsua_buddy_info bi;
+            pjsua_buddy_get_info (id, &bi);
+            isOnline = (bi.status == PJSUA_BUDDY_STATUS_ONLINE);
+        } else {
+            isOnline = 0;
+        }
+
+        LVITEM lvi;
+        memset (&lvi, 0, sizeof (lvi));
+        lvi.mask = LVIF_TEXT  | LVIF_IMAGE;
+        lvi.iItem = i;
+        lvi.iImage = isOnline;
+        lvi.pszText = (LPTSTR) (LPCTSTR) m_Cfg.m_BuddyList.GetAt (i);
+
+        m_BuddyList.InsertItem (&lvi);
     }
 }
 
-void CPocketPJDlg::OnUriCall() 
+void CPocketPJDlg::OnUriCall()
 {
     char tmp[120];
     CString uri;
     pj_status_t status;
 
-    m_Url.GetWindowText(uri);
-    pj_unicode_to_ansi((LPCTSTR)uri, uri.GetLength(), tmp, sizeof(tmp));
-    if ((status=pjsua_verify_sip_url(tmp)) != PJ_SUCCESS) {
-	Error("The URL is not valid SIP URL", status);
-	return;
+    m_Url.GetWindowText (uri);
+    pj_unicode_to_ansi ( (LPCTSTR) uri, uri.GetLength(), tmp, sizeof (tmp));
+
+    if ( (status=pjsua_verify_sip_url (tmp)) != PJ_SUCCESS) {
+        Error ("The URL is not valid SIP URL", status);
+        return;
     }
 
-    pj_str_t dest_uri = pj_str(tmp);
+    pj_str_t dest_uri = pj_str (tmp);
     pjsua_call_id call_id;
 
-    status = pjsua_call_make_call(m_PjsuaAccId, &dest_uri, 0, NULL, NULL, &call_id);
+    status = pjsua_call_make_call (m_PjsuaAccId, &dest_uri, 0, NULL, NULL, &call_id);
 
     if (status != PJ_SUCCESS)
-	Error("Unable to make call", status);
+        Error ("Unable to make call", status);
 }
 
-void CPocketPJDlg::OnUriAddBuddy() 
+void CPocketPJDlg::OnUriAddBuddy()
 {
     int i;
     char tmp[120];
     CString uri;
     pj_status_t status;
 
-    m_Url.GetWindowText(uri);
-    pj_unicode_to_ansi((LPCTSTR)uri, uri.GetLength(), tmp, sizeof(tmp));
-    if ((status=pjsua_verify_sip_url(tmp)) != PJ_SUCCESS) {
-	Error("The URL is not valid SIP URL", status);
-	return;
+    m_Url.GetWindowText (uri);
+    pj_unicode_to_ansi ( (LPCTSTR) uri, uri.GetLength(), tmp, sizeof (tmp));
+
+    if ( (status=pjsua_verify_sip_url (tmp)) != PJ_SUCCESS) {
+        Error ("The URL is not valid SIP URL", status);
+        return;
     }
 
     for (i=0; i<m_Cfg.m_BuddyList.GetSize(); ++i) {
-	if (m_Cfg.m_BuddyList.GetAt(0) == uri) {
-	    AfxMessageBox(_T("The URI is already in the buddy list"));
-	    return;
-	}
+        if (m_Cfg.m_BuddyList.GetAt (0) == uri) {
+            AfxMessageBox (_T ("The URI is already in the buddy list"));
+            return;
+        }
     }
 
-    m_Cfg.m_BuddyList.Add(uri);
+    m_Cfg.m_BuddyList.Add (uri);
     RedrawBuddyList();
 }
 
-void CPocketPJDlg::OnUriDelBuddy() 
+void CPocketPJDlg::OnUriDelBuddy()
 {
     CString uri;
 
-    m_Url.GetWindowText(uri);
-    int i = FindBuddyInCfg(uri);
+    m_Url.GetWindowText (uri);
+    int i = FindBuddyInCfg (uri);
+
     if (i<0) {
-	/* Buddy not found */
-	return;
+        /* Buddy not found */
+        return;
     }
 
-    m_Cfg.m_BuddyList.RemoveAt(i);
+    m_Cfg.m_BuddyList.RemoveAt (i);
     RedrawBuddyList();
-    AfxMessageBox(_T("Buddy " + uri + " deleted"));
+    AfxMessageBox (_T ("Buddy " + uri + " deleted"));
 }
 
-void CPocketPJDlg::OnAccOnline() 
+void CPocketPJDlg::OnAccOnline()
 {
-    pjsua_acc_set_online_status(m_PjsuaAccId, PJ_TRUE);
-    m_BtnAcc.SetBitmap(::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_ONLINE)) );
+    pjsua_acc_set_online_status (m_PjsuaAccId, PJ_TRUE);
+    m_BtnAcc.SetBitmap (::LoadBitmap (AfxGetInstanceHandle(), MAKEINTRESOURCE (IDB_ONLINE)));
 }
 
-void CPocketPJDlg::OnAccInvisible() 
+void CPocketPJDlg::OnAccInvisible()
 {
-    pjsua_acc_set_online_status(m_PjsuaAccId, PJ_FALSE);
-    m_BtnAcc.SetBitmap(::LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_INVISIBLE)) );
+    pjsua_acc_set_online_status (m_PjsuaAccId, PJ_FALSE);
+    m_BtnAcc.SetBitmap (::LoadBitmap (AfxGetInstanceHandle(), MAKEINTRESOURCE (IDB_INVISIBLE)));
 }
 
-void CPocketPJDlg::OnPopUpButton(int btnNo)
+void CPocketPJDlg::OnPopUpButton (int btnNo)
 {
     if (btnNo == 1) {
-	pjsua_call_answer(0, 200, NULL, 0);
-	PopUp_Modify(POPUP_CALL, POPUP_EL_BUTTON1, "");
+        pjsua_call_answer (0, 200, NULL, 0);
+        PopUp_Modify (POPUP_CALL, POPUP_EL_BUTTON1, "");
     } else if (btnNo == 2) {
-	// Hangup button
-	PopUp_Modify(POPUP_CALL, POPUP_EL_TITLE2, "Hang up..");
-	PopUp_Modify(POPUP_CALL, POPUP_EL_TITLE3, "");
-	pjsua_call_hangup(0, PJSIP_SC_DECLINE, 0, 0);
+        // Hangup button
+        PopUp_Modify (POPUP_CALL, POPUP_EL_TITLE2, "Hang up..");
+        PopUp_Modify (POPUP_CALL, POPUP_EL_TITLE3, "");
+        pjsua_call_hangup (0, PJSIP_SC_DECLINE, 0, 0);
     }
 }
 
-void CPocketPJDlg::OnClickBuddyList(NMHDR* pNMHDR, LRESULT* pResult) 
+void CPocketPJDlg::OnClickBuddyList (NMHDR* pNMHDR, LRESULT* pResult)
 {
     POSITION pos = m_BuddyList.GetFirstSelectedItemPosition();
 
-    PJ_UNUSED_ARG(pNMHDR);
+    PJ_UNUSED_ARG (pNMHDR);
 
     if (pos != NULL) {
-	int iItem = m_BuddyList.GetNextSelectedItem(pos);
-	CString uri = m_BuddyList.GetItemText(iItem, 0);
-	m_Url.SetWindowText(uri);
+        int iItem = m_BuddyList.GetNextSelectedItem (pos);
+        CString uri = m_BuddyList.GetItemText (iItem, 0);
+        m_Url.SetWindowText (uri);
     }
+
     *pResult = 0;
 }
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PopUpWnd.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PopUpWnd.cpp
index 1f1654f0621eca2dd67e4686be3002f1a647eff5..f87a84a7a0597d59968b490b354cca40397705fc 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PopUpWnd.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/PopUpWnd.cpp
@@ -16,9 +16,9 @@ static char THIS_FILE[] = __FILE__;
 /////////////////////////////////////////////////////////////////////////////
 // CPopUpWnd
 
-CPopUpWnd::CPopUpWnd(CPocketPJDlg* pParent)
+CPopUpWnd::CPopUpWnd (CPocketPJDlg* pParent)
 {
-    Create(pParent);
+    Create (pParent);
 }
 
 CPopUpWnd::~CPopUpWnd()
@@ -26,81 +26,87 @@ CPopUpWnd::~CPopUpWnd()
     DestroyWindow();
 }
 
-BOOL CPopUpWnd::Create(CPocketPJDlg* pParent)
+BOOL CPopUpWnd::Create (CPocketPJDlg* pParent)
 {
     BOOL bSuccess;
 
     m_ParentWnd = pParent;
 
     // Register window class
-    CString csClassName = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW,
-                                              0,
-                                              CBrush(::GetSysColor(COLOR_BTNFACE)));
+    CString csClassName = AfxRegisterWndClass (CS_HREDRAW|CS_VREDRAW,
+                          0,
+                          CBrush (::GetSysColor (COLOR_BTNFACE)));
 
     // Create popup window
-    bSuccess = CreateEx(WS_EX_DLGMODALFRAME|WS_EX_TOPMOST, // Extended style
-                        csClassName,                       // Classname
-                        _T("PocketPJ"),                    // Title
-                        WS_POPUP|WS_BORDER|WS_CAPTION,     // style
-                        0,0,                               // position - updated soon.
-                        1,1,				   // Size - updated soon
-                        pParent->GetSafeHwnd(),            // handle to parent
-                        0,                                 // No menu
-                        NULL);    
-    if (!bSuccess) 
-	return FALSE;
-
-    ShowWindow(SW_HIDE);
+    bSuccess = CreateEx (WS_EX_DLGMODALFRAME|WS_EX_TOPMOST, // Extended style
+                         csClassName,                       // Classname
+                         _T ("PocketPJ"),                   // Title
+                         WS_POPUP|WS_BORDER|WS_CAPTION,     // style
+                         0,0,                               // position - updated soon.
+                         1,1,				   // Size - updated soon
+                         pParent->GetSafeHwnd(),            // handle to parent
+                         0,                                 // No menu
+                         NULL);
+
+    if (!bSuccess)
+        return FALSE;
+
+    ShowWindow (SW_HIDE);
 
     // Now create the controls
-    CRect TempRect(0,0,10,10);
+    CRect TempRect (0,0,10,10);
 
     /* |SS_LEFTNOWORDWRAP */
-    bSuccess = m_Title1.Create(_T("Title1"), WS_CHILD|WS_VISIBLE|SS_NOPREFIX,
-			       TempRect, this, IDC_TITLE1);
+    bSuccess = m_Title1.Create (_T ("Title1"), WS_CHILD|WS_VISIBLE|SS_NOPREFIX,
+                                TempRect, this, IDC_TITLE1);
+
     if (!bSuccess)
-	return FALSE;
+        return FALSE;
+
+    bSuccess = m_Title2.Create (_T ("Title2"), WS_CHILD|WS_VISIBLE|SS_NOPREFIX,
+                                TempRect, this, IDC_TITLE2);
 
-    bSuccess = m_Title2.Create(_T("Title2"), WS_CHILD|WS_VISIBLE|SS_NOPREFIX,
-			       TempRect, this, IDC_TITLE2);
     if (!bSuccess)
-	return FALSE;
+        return FALSE;
+
+    bSuccess = m_Title3.Create (_T ("Title3"), WS_CHILD|WS_VISIBLE|SS_NOPREFIX,
+                                TempRect, this, IDC_TITLE3);
 
-    bSuccess = m_Title3.Create(_T("Title3"), WS_CHILD|WS_VISIBLE|SS_NOPREFIX,
-			       TempRect, this, IDC_TITLE3);
     if (!bSuccess)
-	return FALSE;
+        return FALSE;
+
+    bSuccess = m_Btn1.Create (_T ("Button1"),
+                              WS_CHILD|WS_VISIBLE|WS_TABSTOP| BS_PUSHBUTTON,
+                              TempRect, this, IDC_BTN1);
 
-    bSuccess = m_Btn1.Create(_T("Button1"), 
-                             WS_CHILD|WS_VISIBLE|WS_TABSTOP| BS_PUSHBUTTON, 
-                             TempRect, this, IDC_BTN1);
     if (!bSuccess)
-	return FALSE;
+        return FALSE;
+
+    bSuccess = m_Btn2.Create (_T ("Button2"),
+                              WS_CHILD|WS_VISIBLE|WS_TABSTOP| BS_PUSHBUTTON,
+                              TempRect, this, IDC_BTN2);
 
-    bSuccess = m_Btn2.Create(_T("Button2"), 
-                             WS_CHILD|WS_VISIBLE|WS_TABSTOP| BS_PUSHBUTTON, 
-                             TempRect, this, IDC_BTN2);
     if (!bSuccess)
-	return FALSE;
+        return FALSE;
 
-    CFont *ft1 = new CFont, 
-	  *ft2 = new CFont, 
-	  *ft3 = new CFont;
+    CFont *ft1 = new CFont,
+    *ft2 = new CFont,
+    *ft3 = new CFont;
 
 
     LOGFONT lf;
-    memset(&lf, 0, sizeof(LOGFONT));
+    memset (&lf, 0, sizeof (LOGFONT));
     lf.lfHeight = 12;
-    lstrcpy(lf.lfFaceName, _T("Arial"));
-    VERIFY(ft1->CreateFontIndirect(&lf));
-    VERIFY(ft3->CreateFontIndirect(&lf));
+    lstrcpy (lf.lfFaceName, _T ("Arial"));
+    VERIFY (ft1->CreateFontIndirect (&lf));
+    VERIFY (ft3->CreateFontIndirect (&lf));
 
     lf.lfHeight = 20;
-    VERIFY(ft2->CreateFontIndirect(&lf));
+    VERIFY (ft2->CreateFontIndirect (&lf));
 
-    m_Title1.SetFont(ft1, TRUE);
-    m_Title2.SetFont(ft2, TRUE);
-    m_Title3.SetFont(ft3, TRUE);
+    m_Title1.SetFont (ft1, TRUE);
+    m_Title2.SetFont (ft2, TRUE);
+    m_Title3.SetFont (ft3, TRUE);
 
 
     SetWindowSize();
@@ -113,109 +119,108 @@ BOOL CPopUpWnd::Create(CPocketPJDlg* pParent)
     return TRUE;
 }
 
-void CPopUpWnd::SetContent(const CPopUpContent &content)
+void CPopUpWnd::SetContent (const CPopUpContent &content)
 {
-    m_Title1.SetWindowText(content.m_Title1);
-    m_Title2.SetWindowText(content.m_Title2);
-    m_Title3.SetWindowText(content.m_Title3);
+    m_Title1.SetWindowText (content.m_Title1);
+    m_Title2.SetWindowText (content.m_Title2);
+    m_Title3.SetWindowText (content.m_Title3);
 
     if (content.m_Btn1 != "") {
-	m_Btn1.SetWindowText(content.m_Btn1);
-	m_Btn1.ShowWindow(SW_SHOW);
+        m_Btn1.SetWindowText (content.m_Btn1);
+        m_Btn1.ShowWindow (SW_SHOW);
     } else {
-	m_Btn1.ShowWindow(SW_HIDE);
+        m_Btn1.ShowWindow (SW_HIDE);
     }
 
     if (content.m_Btn2 != "") {
-	m_Btn2.SetWindowText(content.m_Btn2);
-	m_Btn2.ShowWindow(SW_SHOW);
+        m_Btn2.SetWindowText (content.m_Btn2);
+        m_Btn2.ShowWindow (SW_SHOW);
     } else {
-	m_Btn2.ShowWindow(SW_HIDE);
+        m_Btn2.ShowWindow (SW_HIDE);
     }
 
     UpdateWindow();
-    ShowWindow(SW_SHOW);
+    ShowWindow (SW_SHOW);
 }
 
-void CPopUpWnd::SetWindowSize(int width, int height)
+void CPopUpWnd::SetWindowSize (int width, int height)
 {
     enum { H1 = 16, H2 = 40, H3 = 16, S = 5, G = 10, BW=60, BH=20, BG=40};
 
-    CRect rootRect(0, 0, 320, 240);
+    CRect rootRect (0, 0, 320, 240);
     int Y;
 
-    MoveWindow((rootRect.Width() - width)/2, (rootRect.Height() - height)/2,
-	       width, height);
+    MoveWindow ( (rootRect.Width() - width) /2, (rootRect.Height() - height) /2,
+                 width, height);
 
-    m_Title1.MoveWindow(10, Y=S, width-20, H1);
-    m_Title2.MoveWindow(10, Y+=H1+G, width-20, H2);
-    m_Title3.MoveWindow(10, Y+=H2+G, width-20, H3);
+    m_Title1.MoveWindow (10, Y=S, width-20, H1);
+    m_Title2.MoveWindow (10, Y+=H1+G, width-20, H2);
+    m_Title3.MoveWindow (10, Y+=H2+G, width-20, H3);
 
-    m_Btn1.MoveWindow((width-2*BW-BG)/2, Y+=H3+G, BW, BH);
-    m_Btn2.MoveWindow((width-2*BW-BG)/2+BW+BG, Y, BW, BH);
+    m_Btn1.MoveWindow ( (width-2*BW-BG) /2, Y+=H3+G, BW, BH);
+    m_Btn2.MoveWindow ( (width-2*BW-BG) /2+BW+BG, Y, BW, BH);
 }
 
-void CPopUpWnd::Hide()  
-{ 
-    if (!::IsWindow(GetSafeHwnd())) 
+void CPopUpWnd::Hide()
+{
+    if (!::IsWindow (GetSafeHwnd()))
         return;
 
-    if (IsWindowVisible())
-    {
-        ShowWindow(SW_HIDE);
-        ModifyStyle(WS_VISIBLE, 0);
+    if (IsWindowVisible()) {
+        ShowWindow (SW_HIDE);
+        ModifyStyle (WS_VISIBLE, 0);
     }
 }
 
-void CPopUpWnd::Show()  
-{ 
-    if (!::IsWindow(GetSafeHwnd()))
+void CPopUpWnd::Show()
+{
+    if (!::IsWindow (GetSafeHwnd()))
         return;
 
-    ModifyStyle(0, WS_VISIBLE);
-    ShowWindow(SW_SHOWNA);
-    RedrawWindow(NULL,NULL,RDW_ERASE|RDW_INVALIDATE|RDW_UPDATENOW);
+    ModifyStyle (0, WS_VISIBLE);
+    ShowWindow (SW_SHOWNA);
+    RedrawWindow (NULL,NULL,RDW_ERASE|RDW_INVALIDATE|RDW_UPDATENOW);
 }
 
-BEGIN_MESSAGE_MAP(CPopUpWnd, CWnd)
+BEGIN_MESSAGE_MAP (CPopUpWnd, CWnd)
     //{{AFX_MSG_MAP(CPopUpWnd)
     ON_WM_ERASEBKGND()
-	//}}AFX_MSG_MAP
-    ON_BN_CLICKED(IDC_BTN1, OnCancel1)
-    ON_BN_CLICKED(IDC_BTN2, OnCancel2)
+    //}}AFX_MSG_MAP
+    ON_BN_CLICKED (IDC_BTN1, OnCancel1)
+    ON_BN_CLICKED (IDC_BTN2, OnCancel2)
 END_MESSAGE_MAP()
 
 
 /////////////////////////////////////////////////////////////////////////////
 // CPopUpWnd message handlers
 
-BOOL CPopUpWnd::OnEraseBkgnd(CDC* pDC) 
+BOOL CPopUpWnd::OnEraseBkgnd (CDC* pDC)
 {
     CBrush backBrush;
-    backBrush.CreateSolidBrush(RGB(255,255,255));
-    CBrush* pOldBrush = pDC->SelectObject(&backBrush);
+    backBrush.CreateSolidBrush (RGB (255,255,255));
+    CBrush* pOldBrush = pDC->SelectObject (&backBrush);
 
     CRect rect;
-    pDC->GetClipBox(&rect);     // Erase the area needed
-    pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
-    pDC->SelectObject(pOldBrush);
+    pDC->GetClipBox (&rect);    // Erase the area needed
+    pDC->PatBlt (rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
+    pDC->SelectObject (pOldBrush);
 
     return TRUE;
 }
 
-void CPopUpWnd::OnCancel1() 
+void CPopUpWnd::OnCancel1()
 {
-    m_ParentWnd->OnPopUpButton(1);
+    m_ParentWnd->OnPopUpButton (1);
 }
 
 
-void CPopUpWnd::OnCancel2() 
+void CPopUpWnd::OnCancel2()
 {
-    m_ParentWnd->OnPopUpButton(2);
+    m_ParentWnd->OnPopUpButton (2);
 }
 
 
-BOOL CPopUpWnd::DestroyWindow() 
+BOOL CPopUpWnd::DestroyWindow()
 {
     return CWnd::DestroyWindow();
 }
@@ -223,13 +228,12 @@ BOOL CPopUpWnd::DestroyWindow()
 void CPopUpWnd::PeekAndPump()
 {
     MSG msg;
-    while (::PeekMessage(&msg, NULL,0,0,PM_NOREMOVE)) 
-    {
-        if (!AfxGetApp()->PumpMessage()) 
-        {
-            ::PostQuitMessage(0);
+
+    while (::PeekMessage (&msg, NULL,0,0,PM_NOREMOVE)) {
+        if (!AfxGetApp()->PumpMessage()) {
+            ::PostQuitMessage (0);
             return;
-        } 
+        }
     }
 }
 
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/SettingsDlg.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/SettingsDlg.cpp
index 1357044ae2c4675b973a6de003ba6a4a8476b784..276435be8fe838cc0f0e7059ecaf60bf9fa803d3 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/SettingsDlg.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/pocketpj/SettingsDlg.cpp
@@ -37,20 +37,20 @@ static char THIS_FILE[] = __FILE__;
 /////////////////////////////////////////////////////////////////////////////
 // Settings
 CPocketPJSettings::CPocketPJSettings()
-: m_UseStun(FALSE), m_UseIce(FALSE), m_UseSrtp(FALSE), m_UsePublish(FALSE),
-  m_EchoSuppress(TRUE), m_EcTail(200), m_TCP(FALSE), m_VAD(FALSE),
-  m_AutoAnswer(FALSE)
+        : m_UseStun (FALSE), m_UseIce (FALSE), m_UseSrtp (FALSE), m_UsePublish (FALSE),
+        m_EchoSuppress (TRUE), m_EcTail (200), m_TCP (FALSE), m_VAD (FALSE),
+        m_AutoAnswer (FALSE)
 {
     /* Init codec list */
 #if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC
-    m_Codecs.Add(_T("GSM"));
+    m_Codecs.Add (_T ("GSM"));
 #endif
 #if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC
-    m_Codecs.Add(_T("PCMU"));
-    m_Codecs.Add(_T("PCMA"));
+    m_Codecs.Add (_T ("PCMU"));
+    m_Codecs.Add (_T ("PCMA"));
 #endif
 #if defined(PJMEDIA_HAS_SPEEX_CODEC) && PJMEDIA_HAS_SPEEX_CODEC
-    m_Codecs.Add(_T("Speex"));
+    m_Codecs.Add (_T ("Speex"));
 #endif
 }
 
@@ -63,113 +63,130 @@ void CPocketPJSettings::LoadRegistry()
     DWORD cbData;
 
 
-    if (key.Open(HKEY_CURRENT_USER, REG_PATH) != ERROR_SUCCESS)
-	return;
+    if (key.Open (HKEY_CURRENT_USER, REG_PATH) != ERROR_SUCCESS)
+        return;
 
-    cbData = sizeof(textVal);
-    if (key.QueryValue(textVal, REG_DOMAIN, &cbData) == ERROR_SUCCESS) {
-	m_Domain = textVal;
+    cbData = sizeof (textVal);
+
+    if (key.QueryValue (textVal, REG_DOMAIN, &cbData) == ERROR_SUCCESS) {
+        m_Domain = textVal;
     }
 
-    cbData = sizeof(textVal);
-    if (key.QueryValue(textVal, REG_USER, &cbData) == ERROR_SUCCESS) {
-	m_User = textVal;
+    cbData = sizeof (textVal);
+
+    if (key.QueryValue (textVal, REG_USER, &cbData) == ERROR_SUCCESS) {
+        m_User = textVal;
     }
 
-    cbData = sizeof(textVal);
-    if (key.QueryValue(textVal, REG_PASSWD, &cbData) == ERROR_SUCCESS) {
-	m_Password = textVal;
+    cbData = sizeof (textVal);
+
+    if (key.QueryValue (textVal, REG_PASSWD, &cbData) == ERROR_SUCCESS) {
+        m_Password = textVal;
     }
 
-    cbData = sizeof(textVal);
-    if (key.QueryValue(textVal, REG_STUN_SRV, &cbData) == ERROR_SUCCESS) {
-	m_StunSrv = textVal;
+    cbData = sizeof (textVal);
+
+    if (key.QueryValue (textVal, REG_STUN_SRV, &cbData) == ERROR_SUCCESS) {
+        m_StunSrv = textVal;
     }
 
-    cbData = sizeof(textVal);
-    if (key.QueryValue(textVal, REG_DNS, &cbData) == ERROR_SUCCESS) {
-	m_DNS = textVal;
+    cbData = sizeof (textVal);
+
+    if (key.QueryValue (textVal, REG_DNS, &cbData) == ERROR_SUCCESS) {
+        m_DNS = textVal;
     }
 
     dwordVal = 0;
-    if (key.QueryValue(dwordVal, REG_USE_STUN) == ERROR_SUCCESS) {
-	m_UseStun = dwordVal != 0;
+
+    if (key.QueryValue (dwordVal, REG_USE_STUN) == ERROR_SUCCESS) {
+        m_UseStun = dwordVal != 0;
     }
 
-    if (key.QueryValue(dwordVal, REG_USE_ICE) == ERROR_SUCCESS) {
-	m_UseIce = dwordVal != 0;
+    if (key.QueryValue (dwordVal, REG_USE_ICE) == ERROR_SUCCESS) {
+        m_UseIce = dwordVal != 0;
     }
 
 
-    if (key.QueryValue(dwordVal, REG_USE_SRTP) == ERROR_SUCCESS) {
-	m_UseSrtp = dwordVal != 0;
+    if (key.QueryValue (dwordVal, REG_USE_SRTP) == ERROR_SUCCESS) {
+        m_UseSrtp = dwordVal != 0;
     }
 
 
-    cbData = sizeof(dwordVal);
-    if (key.QueryValue(dwordVal, REG_USE_PUBLISH) == ERROR_SUCCESS) {
-	m_UsePublish = dwordVal != 0;
+    cbData = sizeof (dwordVal);
+
+    if (key.QueryValue (dwordVal, REG_USE_PUBLISH) == ERROR_SUCCESS) {
+        m_UsePublish = dwordVal != 0;
     }
 
-    cbData = sizeof(dwordVal);
-    if (key.QueryValue(dwordVal, REG_ENABLE_EC) == ERROR_SUCCESS) {
-	m_EchoSuppress = dwordVal != 0;
+    cbData = sizeof (dwordVal);
+
+    if (key.QueryValue (dwordVal, REG_ENABLE_EC) == ERROR_SUCCESS) {
+        m_EchoSuppress = dwordVal != 0;
     }
 
-    cbData = sizeof(dwordVal);
-    if (key.QueryValue(dwordVal, REG_EC_TAIL) == ERROR_SUCCESS) {
-	m_EcTail = dwordVal;
+    cbData = sizeof (dwordVal);
+
+    if (key.QueryValue (dwordVal, REG_EC_TAIL) == ERROR_SUCCESS) {
+        m_EcTail = dwordVal;
     }
 
-    cbData = sizeof(dwordVal);
-    if (key.QueryValue(dwordVal, REG_ENABLE_TCP) == ERROR_SUCCESS) {
-	m_TCP = dwordVal != 0;
+    cbData = sizeof (dwordVal);
+
+    if (key.QueryValue (dwordVal, REG_ENABLE_TCP) == ERROR_SUCCESS) {
+        m_TCP = dwordVal != 0;
     }
 
-    cbData = sizeof(dwordVal);
-    if (key.QueryValue(dwordVal, REG_ENABLE_VAD) == ERROR_SUCCESS) {
-	m_VAD = dwordVal != 0;
+    cbData = sizeof (dwordVal);
+
+    if (key.QueryValue (dwordVal, REG_ENABLE_VAD) == ERROR_SUCCESS) {
+        m_VAD = dwordVal != 0;
     }
 
-    cbData = sizeof(dwordVal);
-    if (key.QueryValue(dwordVal, REG_AUTO_ANSWER) == ERROR_SUCCESS) {
-	m_AutoAnswer = dwordVal != 0;
+    cbData = sizeof (dwordVal);
+
+    if (key.QueryValue (dwordVal, REG_AUTO_ANSWER) == ERROR_SUCCESS) {
+        m_AutoAnswer = dwordVal != 0;
     }
 
     m_BuddyList.RemoveAll();
 
     DWORD buddyCount = 0;
-    cbData = sizeof(dwordVal);
-    if (key.QueryValue(dwordVal, REG_BUDDY_CNT) == ERROR_SUCCESS) {
-	buddyCount = dwordVal;
+    cbData = sizeof (dwordVal);
+
+    if (key.QueryValue (dwordVal, REG_BUDDY_CNT) == ERROR_SUCCESS) {
+        buddyCount = dwordVal;
     }
 
     unsigned i;
+
     for (i=0; i<buddyCount; ++i) {
-	CString entry;
-	entry.Format(REG_BUDDY_X, i);
+        CString entry;
+        entry.Format (REG_BUDDY_X, i);
+
+        cbData = sizeof (textVal);
 
-	cbData = sizeof(textVal);
-	if (key.QueryValue(textVal, entry, &cbData) == ERROR_SUCCESS) {
-	    m_BuddyList.Add(textVal);
-	}
+        if (key.QueryValue (textVal, entry, &cbData) == ERROR_SUCCESS) {
+            m_BuddyList.Add (textVal);
+        }
     }
 
     DWORD codecCount = 0;
-    cbData = sizeof(dwordVal);
-    if (key.QueryValue(codecCount, REG_CODEC_CNT) == ERROR_SUCCESS) {
+    cbData = sizeof (dwordVal);
 
-	m_Codecs.RemoveAll();
+    if (key.QueryValue (codecCount, REG_CODEC_CNT) == ERROR_SUCCESS) {
 
-	for (i=0; i<codecCount; ++i) {
-	    CString entry;
-	    entry.Format(REG_CODEC_X, i);
+        m_Codecs.RemoveAll();
 
-	    cbData = sizeof(textVal);
-	    if (key.QueryValue(textVal, entry, &cbData) == ERROR_SUCCESS) {
-		m_Codecs.Add(textVal);
-	    }
-	}
+        for (i=0; i<codecCount; ++i) {
+            CString entry;
+            entry.Format (REG_CODEC_X, i);
+
+            cbData = sizeof (textVal);
+
+            if (key.QueryValue (textVal, entry, &cbData) == ERROR_SUCCESS) {
+                m_Codecs.Add (textVal);
+            }
+        }
     }
 
     key.Close();
@@ -180,42 +197,44 @@ void CPocketPJSettings::SaveRegistry()
 {
     CRegKey key;
 
-    if (key.Create(HKEY_CURRENT_USER, REG_PATH) != ERROR_SUCCESS)
-	return;
+    if (key.Create (HKEY_CURRENT_USER, REG_PATH) != ERROR_SUCCESS)
+        return;
+
+    key.SetValue (m_Domain, REG_DOMAIN);
+    key.SetValue (m_User, REG_USER);
+    key.SetValue (m_Password, REG_PASSWD);
+    key.SetValue (m_StunSrv, REG_STUN_SRV);
+    key.SetValue (m_DNS, REG_DNS);
 
-    key.SetValue(m_Domain, REG_DOMAIN);
-    key.SetValue(m_User, REG_USER);
-    key.SetValue(m_Password, REG_PASSWD);
-    key.SetValue(m_StunSrv, REG_STUN_SRV);
-    key.SetValue(m_DNS, REG_DNS);
-    
-    key.SetValue(m_UseStun, REG_USE_STUN);
-    key.SetValue(m_UseIce, REG_USE_ICE);
-    key.SetValue(m_UseSrtp, REG_USE_SRTP);
-    key.SetValue(m_UsePublish, REG_USE_PUBLISH);
+    key.SetValue (m_UseStun, REG_USE_STUN);
+    key.SetValue (m_UseIce, REG_USE_ICE);
+    key.SetValue (m_UseSrtp, REG_USE_SRTP);
+    key.SetValue (m_UsePublish, REG_USE_PUBLISH);
 
-    key.SetValue(m_EchoSuppress, REG_ENABLE_EC);
-    key.SetValue(m_EcTail, REG_EC_TAIL);
+    key.SetValue (m_EchoSuppress, REG_ENABLE_EC);
+    key.SetValue (m_EcTail, REG_EC_TAIL);
 
-    key.SetValue(m_TCP, REG_ENABLE_TCP);
-    key.SetValue(m_VAD, REG_ENABLE_VAD);
-    key.SetValue(m_AutoAnswer, REG_AUTO_ANSWER);
+    key.SetValue (m_TCP, REG_ENABLE_TCP);
+    key.SetValue (m_VAD, REG_ENABLE_VAD);
+    key.SetValue (m_AutoAnswer, REG_AUTO_ANSWER);
 
-    key.SetValue(m_BuddyList.GetSize(), REG_BUDDY_CNT);
+    key.SetValue (m_BuddyList.GetSize(), REG_BUDDY_CNT);
 
     int i;
+
     for (i=0; i<m_BuddyList.GetSize(); ++i) {
-	CString entry;
-	entry.Format(REG_BUDDY_X, i);
-	key.SetValue(m_BuddyList.GetAt(i), entry);
+        CString entry;
+        entry.Format (REG_BUDDY_X, i);
+        key.SetValue (m_BuddyList.GetAt (i), entry);
     }
 
     DWORD N = m_Codecs.GetSize();
-    key.SetValue(N, REG_CODEC_CNT);
+    key.SetValue (N, REG_CODEC_CNT);
+
     for (i=0; i<m_Codecs.GetSize(); ++i) {
-	CString entry;
-	entry.Format(REG_CODEC_X, i);
-	key.SetValue(m_Codecs.GetAt(i), entry);
+        CString entry;
+        entry.Format (REG_CODEC_X, i);
+        key.SetValue (m_Codecs.GetAt (i), entry);
     }
 
     key.Close();
@@ -226,127 +245,130 @@ void CPocketPJSettings::SaveRegistry()
 // CSettingsDlg dialog
 
 
-CSettingsDlg::CSettingsDlg(CPocketPJSettings &cfg, CWnd* pParent)
-	: CDialog(CSettingsDlg::IDD, pParent), m_Cfg(cfg)
+CSettingsDlg::CSettingsDlg (CPocketPJSettings &cfg, CWnd* pParent)
+        : CDialog (CSettingsDlg::IDD, pParent), m_Cfg (cfg)
 {
-	//{{AFX_DATA_INIT(CSettingsDlg)
-	m_Domain = _T("");
-	m_ICE = FALSE;
-	m_Passwd = _T("");
-	m_PUBLISH = FALSE;
-	m_SRTP = FALSE;
-	m_STUN = FALSE;
-	m_StunSrv = _T("");
-	m_User = _T("");
-	m_Dns = _T("");
-	m_EchoSuppress = FALSE;
-	m_EcTail = _T("");
-	m_TCP = FALSE;
-	m_VAD = FALSE;
-	m_AutoAnswer = FALSE;
-	//}}AFX_DATA_INIT
-
-	m_Domain    = m_Cfg.m_Domain;
-	m_ICE	    = m_Cfg.m_UseIce;
-	m_Passwd    = m_Cfg.m_Password;
-	m_PUBLISH   = m_Cfg.m_UsePublish;
-	m_SRTP	    = m_Cfg.m_UseSrtp;
-	m_STUN	    = m_Cfg.m_UseStun;
-	m_StunSrv   = m_Cfg.m_StunSrv;
-	m_User	    = m_Cfg.m_User;
-	m_Dns	    = m_Cfg.m_DNS;
-	m_EchoSuppress = m_Cfg.m_EchoSuppress;
-	m_TCP	    = m_Cfg.m_TCP;
-	m_VAD	    = m_Cfg.m_VAD;
-	m_AutoAnswer= m_Cfg.m_AutoAnswer;
-
-	CString s;
-	s.Format(_T("%d"), m_Cfg.m_EcTail);
-	m_EcTail    = s;
+    //{{AFX_DATA_INIT(CSettingsDlg)
+    m_Domain = _T ("");
+    m_ICE = FALSE;
+    m_Passwd = _T ("");
+    m_PUBLISH = FALSE;
+    m_SRTP = FALSE;
+    m_STUN = FALSE;
+    m_StunSrv = _T ("");
+    m_User = _T ("");
+    m_Dns = _T ("");
+    m_EchoSuppress = FALSE;
+    m_EcTail = _T ("");
+    m_TCP = FALSE;
+    m_VAD = FALSE;
+    m_AutoAnswer = FALSE;
+    //}}AFX_DATA_INIT
+
+    m_Domain    = m_Cfg.m_Domain;
+    m_ICE	    = m_Cfg.m_UseIce;
+    m_Passwd    = m_Cfg.m_Password;
+    m_PUBLISH   = m_Cfg.m_UsePublish;
+    m_SRTP	    = m_Cfg.m_UseSrtp;
+    m_STUN	    = m_Cfg.m_UseStun;
+    m_StunSrv   = m_Cfg.m_StunSrv;
+    m_User	    = m_Cfg.m_User;
+    m_Dns	    = m_Cfg.m_DNS;
+    m_EchoSuppress = m_Cfg.m_EchoSuppress;
+    m_TCP	    = m_Cfg.m_TCP;
+    m_VAD	    = m_Cfg.m_VAD;
+    m_AutoAnswer= m_Cfg.m_AutoAnswer;
+
+    CString s;
+    s.Format (_T ("%d"), m_Cfg.m_EcTail);
+    m_EcTail    = s;
 
 }
 
 
-void CSettingsDlg::DoDataExchange(CDataExchange* pDX)
+void CSettingsDlg::DoDataExchange (CDataExchange* pDX)
 {
-	CDialog::DoDataExchange(pDX);
-	//{{AFX_DATA_MAP(CSettingsDlg)
-	DDX_Control(pDX, IDC_CODECS, m_Codecs);
-	DDX_Text(pDX, IDC_DOMAIN, m_Domain);
-	DDX_Check(pDX, IDC_ICE, m_ICE);
-	DDX_Text(pDX, IDC_PASSWD, m_Passwd);
-	DDX_Check(pDX, IDC_PUBLISH, m_PUBLISH);
-	DDX_Check(pDX, IDC_SRTP, m_SRTP);
-	DDX_Check(pDX, IDC_STUN, m_STUN);
-	DDX_Text(pDX, IDC_STUN_SRV, m_StunSrv);
-	DDX_Text(pDX, IDC_USER, m_User);
-	DDX_Text(pDX, IDC_DNS, m_Dns);
-	DDX_Check(pDX, IDC_ECHO_SUPPRESS, m_EchoSuppress);
-	DDX_Text(pDX, IDC_EC_TAIL, m_EcTail);
-	DDX_Check(pDX, IDC_TCP, m_TCP);
-	DDX_Check(pDX, IDC_VAD, m_VAD);
-	DDX_Check(pDX, IDC_AA, m_AutoAnswer);
-	//}}AFX_DATA_MAP
-
-	
-	if (m_Codecs.GetCount() == 0) {
-	    int i;
-	    for (i=0; i<m_Cfg.m_Codecs.GetSize(); ++i) {
-		m_Codecs.AddString(m_Cfg.m_Codecs.GetAt(i));
-	    }
-	    m_Codecs.SetCurSel(0);
-	}
+    CDialog::DoDataExchange (pDX);
+    //{{AFX_DATA_MAP(CSettingsDlg)
+    DDX_Control (pDX, IDC_CODECS, m_Codecs);
+    DDX_Text (pDX, IDC_DOMAIN, m_Domain);
+    DDX_Check (pDX, IDC_ICE, m_ICE);
+    DDX_Text (pDX, IDC_PASSWD, m_Passwd);
+    DDX_Check (pDX, IDC_PUBLISH, m_PUBLISH);
+    DDX_Check (pDX, IDC_SRTP, m_SRTP);
+    DDX_Check (pDX, IDC_STUN, m_STUN);
+    DDX_Text (pDX, IDC_STUN_SRV, m_StunSrv);
+    DDX_Text (pDX, IDC_USER, m_User);
+    DDX_Text (pDX, IDC_DNS, m_Dns);
+    DDX_Check (pDX, IDC_ECHO_SUPPRESS, m_EchoSuppress);
+    DDX_Text (pDX, IDC_EC_TAIL, m_EcTail);
+    DDX_Check (pDX, IDC_TCP, m_TCP);
+    DDX_Check (pDX, IDC_VAD, m_VAD);
+    DDX_Check (pDX, IDC_AA, m_AutoAnswer);
+    //}}AFX_DATA_MAP
+
+
+    if (m_Codecs.GetCount() == 0) {
+        int i;
+
+        for (i=0; i<m_Cfg.m_Codecs.GetSize(); ++i) {
+            m_Codecs.AddString (m_Cfg.m_Codecs.GetAt (i));
+        }
+
+        m_Codecs.SetCurSel (0);
+    }
 }
 
 
-BEGIN_MESSAGE_MAP(CSettingsDlg, CDialog)
-	//{{AFX_MSG_MAP(CSettingsDlg)
-	ON_BN_CLICKED(IDC_STUN, OnStun)
-	ON_BN_CLICKED(IDC_ECHO_SUPPRESS, OnEchoSuppress)
-	ON_CBN_SELCHANGE(IDC_CODECS, OnSelchangeCodecs)
-	//}}AFX_MSG_MAP
+BEGIN_MESSAGE_MAP (CSettingsDlg, CDialog)
+    //{{AFX_MSG_MAP(CSettingsDlg)
+    ON_BN_CLICKED (IDC_STUN, OnStun)
+    ON_BN_CLICKED (IDC_ECHO_SUPPRESS, OnEchoSuppress)
+    ON_CBN_SELCHANGE (IDC_CODECS, OnSelchangeCodecs)
+    //}}AFX_MSG_MAP
 END_MESSAGE_MAP()
 
 /////////////////////////////////////////////////////////////////////////////
 // CSettingsDlg message handlers
 
-int CSettingsDlg::DoModal() 
+int CSettingsDlg::DoModal()
 {
-    int rc = CDialog::DoModal();	
+    int rc = CDialog::DoModal();
 
     return rc;
 }
 
-void CSettingsDlg::OnStun() 
+void CSettingsDlg::OnStun()
 {
 }
 
-void CSettingsDlg::OnEchoSuppress() 
+void CSettingsDlg::OnEchoSuppress()
 {
 }
 
-void CSettingsDlg::OnSelchangeCodecs() 
+void CSettingsDlg::OnSelchangeCodecs()
 {
     int cur = m_Codecs.GetCurSel();
+
     if (cur < 1)
-	return;
+        return;
 
     CString codec;
     DWORD N;
 
-    m_Codecs.GetLBText(cur, codec);
+    m_Codecs.GetLBText (cur, codec);
     N = m_Codecs.GetCount();
-    m_Codecs.DeleteString(cur);
+    m_Codecs.DeleteString (cur);
     N = m_Codecs.GetCount();
-    m_Codecs.InsertString(0, codec);
+    m_Codecs.InsertString (0, codec);
     N = m_Codecs.GetCount();
-    m_Codecs.SetCurSel(0);
+    m_Codecs.SetCurSel (0);
 }
 
 
-void CSettingsDlg::OnOK() 
+void CSettingsDlg::OnOK()
 {
-    UpdateData(TRUE);
+    UpdateData (TRUE);
 
     m_Cfg.m_Domain	= m_Domain;
     m_Cfg.m_UseIce	= m_ICE != 0;
@@ -358,7 +380,7 @@ void CSettingsDlg::OnOK()
     m_Cfg.m_User	= m_User;
     m_Cfg.m_DNS		= m_Dns;
     m_Cfg.m_EchoSuppress= m_EchoSuppress != 0;
-    m_Cfg.m_EcTail	= _ttoi(m_EcTail);
+    m_Cfg.m_EcTail	= _ttoi (m_EcTail);
     m_Cfg.m_TCP		= m_TCP != 0;
     m_Cfg.m_VAD		= m_VAD != 0;
     m_Cfg.m_AutoAnswer	= m_AutoAnswer != 0;
@@ -366,10 +388,11 @@ void CSettingsDlg::OnOK()
     unsigned i;
     m_Cfg.m_Codecs.RemoveAll();
     DWORD N = m_Codecs.GetCount();
+
     for (i=0; i<N; ++i) {
-	CString codec;
-	m_Codecs.GetLBText(i, codec);
-	m_Cfg.m_Codecs.Add(codec);
+        CString codec;
+        m_Codecs.GetLBText (i, codec);
+        m_Cfg.m_Codecs.Add (codec);
     }
 
     CDialog::OnOK();
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua/main_symbian.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua/main_symbian.cpp
index b1b884286cac3137827bd10a5cd42839b9d89007..ba9cec7c5f7ccdcfa892eb6ef92675cdff5be7cd 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua/main_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua/main_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: main_symbian.cpp 2673 2009-05-05 10:46:51Z nanang $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include "ua.h"
 
@@ -30,7 +30,7 @@ CConsoleBase* console;
 
 // Needed by APS
 //TPtrC APP_UID = _L("200235D3");
-TPtrC APP_UID = _L("A000000D");
+TPtrC APP_UID = _L ("A000000D");
 
 
 ////////////////////////////////////////////////////////////////////////////
@@ -38,13 +38,13 @@ TPtrC APP_UID = _L("A000000D");
 LOCAL_C void DoStartL()
 {
     CActiveScheduler *scheduler = new (ELeave) CActiveScheduler;
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
+    CleanupStack::PushL (scheduler);
+    CActiveScheduler::Install (scheduler);
 
     ua_main();
-    
-    CActiveScheduler::Install(NULL);
-    CleanupStack::Pop(scheduler);
+
+    CActiveScheduler::Install (NULL);
+    CleanupStack::Pop (scheduler);
     delete scheduler;
 }
 
@@ -61,19 +61,20 @@ GLDEF_C TInt E32Main()
     CTrapCleanup* cleanup = CTrapCleanup::New();
 
     // Create output console
-    TRAPD(createError, console = Console::NewL(_L("Console"), TSize(KConsFullScreen,KConsFullScreen)));
+    TRAPD (createError, console = Console::NewL (_L ("Console"), TSize (KConsFullScreen,KConsFullScreen)));
+
     if (createError)
         return createError;
 
-    TRAPD(startError, DoStartL());
+    TRAPD (startError, DoStartL());
 
-    console->Printf(_L("[press any key to close]\n"));
+    console->Printf (_L ("[press any key to close]\n"));
     console->Getch();
-    
+
     delete console;
     delete cleanup;
 
-    CloseSTDLIB(); 
+    CloseSTDLIB();
 
     // Mark end of heap usage, detect memory leaks
     __UHEAP_MARKEND;
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua/ua.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua/ua.cpp
index 7b5de03db3e38722f38500a92fd2a322304a5c7e..18c0e0ab90423e4c53e061be5c1842613ec6402f 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua/ua.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua/ua.cpp
@@ -1,5 +1,5 @@
 /* $Id: ua.cpp 2999 2009-11-09 09:52:23Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <pjsua-lib/pjsua.h>
 #include <pjsua-lib/pjsua_internal.h>
@@ -59,7 +59,7 @@
 #define ENABLE_SIP_TLS	0 // experimental
 
 #define TLS_SRV_NAME	"pjsip.org"	// TLS servername (required for
-					// TLS transport)
+// TLS transport)
 
 //
 // Configure nameserver if DNS SRV is to be used with both SIP
@@ -71,15 +71,15 @@
 //
 // STUN server
 #if 0
-	// Use this to have the STUN server resolved normally
+// Use this to have the STUN server resolved normally
 #   define STUN_DOMAIN	NULL
 #   define STUN_SERVER	"stun.pjsip.org"
 #elif 0
-	// Use this to have the STUN server resolved with DNS SRV
+// Use this to have the STUN server resolved with DNS SRV
 #   define STUN_DOMAIN	"pjsip.org"
 #   define STUN_SERVER	NULL
 #else
-	// Use this to disable STUN
+// Use this to disable STUN
 #   define STUN_DOMAIN	NULL
 #   define STUN_SERVER	NULL
 #endif
@@ -97,7 +97,7 @@
 //
 // Set QoS on transports? Yes!
 // As an example, we set SIP transports DSCP value to CS3 (DSCP
-// value 24 or 0x18), for no reason, and tag RTP/RTCP packets 
+// value 24 or 0x18), for no reason, and tag RTP/RTCP packets
 // with VOICE type.
 //
 #define SIP_QOS_DSCP	0x18
@@ -113,179 +113,179 @@ static pjsua_buddy_id g_buddy_id = PJSUA_INVALID_ID;
 
 
 /* Callback called by the library upon receiving incoming call */
-static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
-			     pjsip_rx_data *rdata)
+static void on_incoming_call (pjsua_acc_id acc_id, pjsua_call_id call_id,
+                              pjsip_rx_data *rdata)
 {
     pjsua_call_info ci;
 
-    PJ_UNUSED_ARG(acc_id);
-    PJ_UNUSED_ARG(rdata);
+    PJ_UNUSED_ARG (acc_id);
+    PJ_UNUSED_ARG (rdata);
 
     if (g_call_id != PJSUA_INVALID_ID) {
-    	pjsua_call_answer(call_id, PJSIP_SC_BUSY_HERE, NULL, NULL);
-    	return;
+        pjsua_call_answer (call_id, PJSIP_SC_BUSY_HERE, NULL, NULL);
+        return;
     }
-    
-    pjsua_call_get_info(call_id, &ci);
 
-    PJ_LOG(3,(THIS_FILE, "Incoming call from %.*s!!",
-			 (int)ci.remote_info.slen,
-			 ci.remote_info.ptr));
+    pjsua_call_get_info (call_id, &ci);
+
+    PJ_LOG (3, (THIS_FILE, "Incoming call from %.*s!!",
+                (int) ci.remote_info.slen,
+                ci.remote_info.ptr));
 
     g_call_id = call_id;
-    
+
     /* Automatically answer incoming calls with 180/Ringing */
-    pjsua_call_answer(call_id, 180, NULL, NULL);
+    pjsua_call_answer (call_id, 180, NULL, NULL);
 }
 
 /* Callback called by the library when call's state has changed */
-static void on_call_state(pjsua_call_id call_id, pjsip_event *e)
+static void on_call_state (pjsua_call_id call_id, pjsip_event *e)
 {
     pjsua_call_info ci;
 
-    PJ_UNUSED_ARG(e);
+    PJ_UNUSED_ARG (e);
+
+    pjsua_call_get_info (call_id, &ci);
 
-    pjsua_call_get_info(call_id, &ci);
-    
     if (ci.state == PJSIP_INV_STATE_DISCONNECTED) {
-    	if (call_id == g_call_id)
-    	    g_call_id = PJSUA_INVALID_ID;
+        if (call_id == g_call_id)
+            g_call_id = PJSUA_INVALID_ID;
     } else if (ci.state != PJSIP_INV_STATE_INCOMING) {
-    	if (g_call_id == PJSUA_INVALID_ID)
-    	    g_call_id = call_id;
+        if (g_call_id == PJSUA_INVALID_ID)
+            g_call_id = call_id;
     }
-    
-    PJ_LOG(3,(THIS_FILE, "Call %d state=%.*s", call_id,
-			 (int)ci.state_text.slen,
-			 ci.state_text.ptr));
+
+    PJ_LOG (3, (THIS_FILE, "Call %d state=%.*s", call_id,
+                (int) ci.state_text.slen,
+                ci.state_text.ptr));
 }
 
 /* Callback called by the library when call's media state has changed */
-static void on_call_media_state(pjsua_call_id call_id)
+static void on_call_media_state (pjsua_call_id call_id)
 {
     pjsua_call_info ci;
 
-    pjsua_call_get_info(call_id, &ci);
+    pjsua_call_get_info (call_id, &ci);
 
     if (ci.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
-	// When media is active, connect call to sound device.
-	pjsua_conf_connect(ci.conf_slot, 0);
-	pjsua_conf_connect(0, ci.conf_slot);
+        // When media is active, connect call to sound device.
+        pjsua_conf_connect (ci.conf_slot, 0);
+        pjsua_conf_connect (0, ci.conf_slot);
     }
 }
 
 
 /* Handler on buddy state changed. */
-static void on_buddy_state(pjsua_buddy_id buddy_id)
+static void on_buddy_state (pjsua_buddy_id buddy_id)
 {
     pjsua_buddy_info info;
-    pjsua_buddy_get_info(buddy_id, &info);
+    pjsua_buddy_get_info (buddy_id, &info);
 
-    PJ_LOG(3,(THIS_FILE, "%.*s status is %.*s",
-	      (int)info.uri.slen,
-	      info.uri.ptr,
-	      (int)info.status_text.slen,
-	      info.status_text.ptr));
+    PJ_LOG (3, (THIS_FILE, "%.*s status is %.*s",
+                (int) info.uri.slen,
+                info.uri.ptr,
+                (int) info.status_text.slen,
+                info.status_text.ptr));
 }
 
 
 /* Incoming IM message (i.e. MESSAGE request)!  */
-static void on_pager(pjsua_call_id call_id, const pj_str_t *from, 
-		     const pj_str_t *to, const pj_str_t *contact,
-		     const pj_str_t *mime_type, const pj_str_t *text)
+static void on_pager (pjsua_call_id call_id, const pj_str_t *from,
+                      const pj_str_t *to, const pj_str_t *contact,
+                      const pj_str_t *mime_type, const pj_str_t *text)
 {
     /* Note: call index may be -1 */
-    PJ_UNUSED_ARG(call_id);
-    PJ_UNUSED_ARG(to);
-    PJ_UNUSED_ARG(contact);
-    PJ_UNUSED_ARG(mime_type);
-
-    PJ_LOG(3,(THIS_FILE,"MESSAGE from %.*s: %.*s",
-	      (int)from->slen, from->ptr,
-	      (int)text->slen, text->ptr));
+    PJ_UNUSED_ARG (call_id);
+    PJ_UNUSED_ARG (to);
+    PJ_UNUSED_ARG (contact);
+    PJ_UNUSED_ARG (mime_type);
+
+    PJ_LOG (3, (THIS_FILE,"MESSAGE from %.*s: %.*s",
+                (int) from->slen, from->ptr,
+                (int) text->slen, text->ptr));
 }
 
 
 /* Received typing indication  */
-static void on_typing(pjsua_call_id call_id, const pj_str_t *from,
-		      const pj_str_t *to, const pj_str_t *contact,
-		      pj_bool_t is_typing)
+static void on_typing (pjsua_call_id call_id, const pj_str_t *from,
+                       const pj_str_t *to, const pj_str_t *contact,
+                       pj_bool_t is_typing)
 {
-    PJ_UNUSED_ARG(call_id);
-    PJ_UNUSED_ARG(to);
-    PJ_UNUSED_ARG(contact);
+    PJ_UNUSED_ARG (call_id);
+    PJ_UNUSED_ARG (to);
+    PJ_UNUSED_ARG (contact);
 
-    PJ_LOG(3,(THIS_FILE, "IM indication: %.*s %s",
-	      (int)from->slen, from->ptr,
-	      (is_typing?"is typing..":"has stopped typing")));
+    PJ_LOG (3, (THIS_FILE, "IM indication: %.*s %s",
+                (int) from->slen, from->ptr,
+                (is_typing?"is typing..":"has stopped typing")));
 }
 
 
 /* Call transfer request status. */
-static void on_call_transfer_status(pjsua_call_id call_id,
-				    int status_code,
-				    const pj_str_t *status_text,
-				    pj_bool_t final,
-				    pj_bool_t *p_cont)
+static void on_call_transfer_status (pjsua_call_id call_id,
+                                     int status_code,
+                                     const pj_str_t *status_text,
+                                     pj_bool_t final,
+                                     pj_bool_t *p_cont)
 {
-    PJ_LOG(3,(THIS_FILE, "Call %d: transfer status=%d (%.*s) %s",
-	      call_id, status_code,
-	      (int)status_text->slen, status_text->ptr,
-	      (final ? "[final]" : "")));
+    PJ_LOG (3, (THIS_FILE, "Call %d: transfer status=%d (%.*s) %s",
+                call_id, status_code,
+                (int) status_text->slen, status_text->ptr,
+                (final ? "[final]" : "")));
 
     if (status_code/100 == 2) {
-	PJ_LOG(3,(THIS_FILE, 
-	          "Call %d: call transfered successfully, disconnecting call",
-		  call_id));
-	pjsua_call_hangup(call_id, PJSIP_SC_GONE, NULL, NULL);
-	*p_cont = PJ_FALSE;
+        PJ_LOG (3, (THIS_FILE,
+                    "Call %d: call transfered successfully, disconnecting call",
+                    call_id));
+        pjsua_call_hangup (call_id, PJSIP_SC_GONE, NULL, NULL);
+        *p_cont = PJ_FALSE;
     }
 }
 
 
 /* NAT detection result */
-static void on_nat_detect(const pj_stun_nat_detect_result *res) 
+static void on_nat_detect (const pj_stun_nat_detect_result *res)
 {
     if (res->status != PJ_SUCCESS) {
-	pjsua_perror(THIS_FILE, "NAT detection failed", res->status);
+        pjsua_perror (THIS_FILE, "NAT detection failed", res->status);
     } else {
-	PJ_LOG(3, (THIS_FILE, "NAT detected as %s", res->nat_type_name));
-    }    
+        PJ_LOG (3, (THIS_FILE, "NAT detected as %s", res->nat_type_name));
+    }
 }
 
 /* Notification that call is being replaced. */
-static void on_call_replaced(pjsua_call_id old_call_id,
-			     pjsua_call_id new_call_id)
+static void on_call_replaced (pjsua_call_id old_call_id,
+                              pjsua_call_id new_call_id)
 {
     pjsua_call_info old_ci, new_ci;
 
-    pjsua_call_get_info(old_call_id, &old_ci);
-    pjsua_call_get_info(new_call_id, &new_ci);
+    pjsua_call_get_info (old_call_id, &old_ci);
+    pjsua_call_get_info (new_call_id, &new_ci);
 
-    PJ_LOG(3,(THIS_FILE, "Call %d with %.*s is being replaced by "
-			 "call %d with %.*s",
-			 old_call_id, 
-			 (int)old_ci.remote_info.slen, old_ci.remote_info.ptr,
-			 new_call_id,
-			 (int)new_ci.remote_info.slen, new_ci.remote_info.ptr));
+    PJ_LOG (3, (THIS_FILE, "Call %d with %.*s is being replaced by "
+                "call %d with %.*s",
+                old_call_id,
+                (int) old_ci.remote_info.slen, old_ci.remote_info.ptr,
+                new_call_id,
+                (int) new_ci.remote_info.slen, new_ci.remote_info.ptr));
 }
 
 
 //#include<e32debug.h>
 
 /* Logging callback */
-static void log_writer(int level, const char *buf, int len)
+static void log_writer (int level, const char *buf, int len)
 {
     static wchar_t buf16[PJ_LOG_MAX_SIZE];
 
-    PJ_UNUSED_ARG(level);
-    
-    pj_ansi_to_unicode(buf, len, buf16, PJ_ARRAY_SIZE(buf16));
+    PJ_UNUSED_ARG (level);
 
-    TPtrC16 aBuf((const TUint16*)buf16, (TInt)len);
+    pj_ansi_to_unicode (buf, len, buf16, PJ_ARRAY_SIZE (buf16));
+
+    TPtrC16 aBuf ( (const TUint16*) buf16, (TInt) len);
     //RDebug::Print(aBuf);
-    console->Write(aBuf);
-    
+    console->Write (aBuf);
+
 }
 
 /*
@@ -298,16 +298,17 @@ static pj_status_t app_startup()
     pj_status_t status;
 
     /* Redirect log before pjsua_init() */
-    pj_log_set_log_func(&log_writer);
-    
+    pj_log_set_log_func (&log_writer);
+
     /* Set log level */
-    pj_log_set_level(CON_LOG_LEVEL);
+    pj_log_set_level (CON_LOG_LEVEL);
 
     /* Create pjsua first! */
     status = pjsua_create();
+
     if (status != PJ_SUCCESS) {
-    	pjsua_perror(THIS_FILE, "pjsua_create() error", status);
-    	return status;
+        pjsua_perror (THIS_FILE, "pjsua_create() error", status);
+        return status;
     }
 
     /* Init pjsua */
@@ -315,12 +316,12 @@ static pj_status_t app_startup()
     pjsua_logging_config log_cfg;
     pjsua_media_config med_cfg;
 
-    pjsua_config_default(&cfg);
+    pjsua_config_default (&cfg);
     cfg.max_calls = 2;
     cfg.thread_cnt = 0; // Disable threading on Symbian
     cfg.use_srtp = USE_SRTP;
     cfg.srtp_secure_signaling = 0;
-    
+
     cfg.cb.on_incoming_call = &on_incoming_call;
     cfg.cb.on_call_media_state = &on_call_media_state;
     cfg.cb.on_call_state = &on_call_state;
@@ -330,31 +331,31 @@ static pj_status_t app_startup()
     cfg.cb.on_call_transfer_status = &on_call_transfer_status;
     cfg.cb.on_call_replaced = &on_call_replaced;
     cfg.cb.on_nat_detect = &on_nat_detect;
-    
+
     if (SIP_PROXY) {
-	    cfg.outbound_proxy_cnt = 1;
-	    cfg.outbound_proxy[0] = pj_str(SIP_PROXY);
+        cfg.outbound_proxy_cnt = 1;
+        cfg.outbound_proxy[0] = pj_str (SIP_PROXY);
     }
-    
+
     if (NAMESERVER) {
-	    cfg.nameserver_count = 1;
-	    cfg.nameserver[0] = pj_str(NAMESERVER);
+        cfg.nameserver_count = 1;
+        cfg.nameserver[0] = pj_str (NAMESERVER);
     }
-    
+
     if (NAMESERVER && STUN_DOMAIN) {
-	    cfg.stun_domain = pj_str(STUN_DOMAIN);
+        cfg.stun_domain = pj_str (STUN_DOMAIN);
     } else if (STUN_SERVER) {
-	    cfg.stun_host = pj_str(STUN_SERVER);
+        cfg.stun_host = pj_str (STUN_SERVER);
     }
-    
-    
-    pjsua_logging_config_default(&log_cfg);
+
+
+    pjsua_logging_config_default (&log_cfg);
     log_cfg.level = FILE_LOG_LEVEL;
     log_cfg.console_level = CON_LOG_LEVEL;
     log_cfg.cb = &log_writer;
-    log_cfg.log_filename = pj_str("C:\\data\\symbian_ua.log");
+    log_cfg.log_filename = pj_str ("C:\\data\\symbian_ua.log");
 
-    pjsua_media_config_default(&med_cfg);
+    pjsua_media_config_default (&med_cfg);
     med_cfg.thread_cnt = 0; // Disable threading on Symbian
     med_cfg.has_ioqueue = PJ_FALSE;
     med_cfg.clock_rate = 8000;
@@ -363,140 +364,157 @@ static pj_status_t app_startup()
     med_cfg.enable_ice = USE_ICE;
     med_cfg.snd_auto_close_time = 0; // wait for 0 seconds idle before sound dev get auto-closed
     //med_cfg.no_vad = PJ_TRUE;
-    
-    status = pjsua_init(&cfg, &log_cfg, &med_cfg);
+
+    status = pjsua_init (&cfg, &log_cfg, &med_cfg);
+
     if (status != PJ_SUCCESS) {
-	    pjsua_perror(THIS_FILE, "pjsua_init() error", status);
-	    pjsua_destroy();
-	    return status;
+        pjsua_perror (THIS_FILE, "pjsua_init() error", status);
+        pjsua_destroy();
+        return status;
     }
-    
+
     /* Adjust Speex priority and enable only the narrowband */
     {
-        pj_str_t codec_id = pj_str("speex/8000");
-        pjmedia_codec_mgr_set_codec_priority( 
-        	pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt),
-        	&codec_id, PJMEDIA_CODEC_PRIO_NORMAL+1);
-
-        codec_id = pj_str("speex/16000");
-        pjmedia_codec_mgr_set_codec_priority( 
-        	pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt),
-        	&codec_id, PJMEDIA_CODEC_PRIO_DISABLED);
-
-        codec_id = pj_str("speex/32000");
-        pjmedia_codec_mgr_set_codec_priority( 
-        	pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt),
-        	&codec_id, PJMEDIA_CODEC_PRIO_DISABLED);
+        pj_str_t codec_id = pj_str ("speex/8000");
+        pjmedia_codec_mgr_set_codec_priority (
+            pjmedia_endpt_get_codec_mgr (pjsua_var.med_endpt),
+            &codec_id, PJMEDIA_CODEC_PRIO_NORMAL+1);
+
+        codec_id = pj_str ("speex/16000");
+        pjmedia_codec_mgr_set_codec_priority (
+            pjmedia_endpt_get_codec_mgr (pjsua_var.med_endpt),
+            &codec_id, PJMEDIA_CODEC_PRIO_DISABLED);
+
+        codec_id = pj_str ("speex/32000");
+        pjmedia_codec_mgr_set_codec_priority (
+            pjmedia_endpt_get_codec_mgr (pjsua_var.med_endpt),
+            &codec_id, PJMEDIA_CODEC_PRIO_DISABLED);
     }
 
-    
+
     pjsua_transport_config tcfg;
     pjsua_transport_id tid;
 
 #if ENABLE_SIP_UDP
     /* Add UDP transport. */
-    pjsua_transport_config_default(&tcfg);
+    pjsua_transport_config_default (&tcfg);
     tcfg.port = SIP_PORT;
+
     if (SIP_QOS_DSCP) {
-	tcfg.qos_params.flags |= PJ_QOS_PARAM_HAS_DSCP;
-	tcfg.qos_params.dscp_val = SIP_QOS_DSCP;
+        tcfg.qos_params.flags |= PJ_QOS_PARAM_HAS_DSCP;
+        tcfg.qos_params.dscp_val = SIP_QOS_DSCP;
     }
-    status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &tcfg, &tid);
+
+    status = pjsua_transport_create (PJSIP_TRANSPORT_UDP, &tcfg, &tid);
+
     if (status != PJ_SUCCESS) {
-	    pjsua_perror(THIS_FILE, "Error creating UDP transport", status);
-	    pjsua_destroy();
-	    return status;
+        pjsua_perror (THIS_FILE, "Error creating UDP transport", status);
+        pjsua_destroy();
+        return status;
     }
+
 #endif
-    
+
 #if ENABLE_SIP_TCP
     /* Add TCP transport */
-    pjsua_transport_config_default(&tcfg);
+    pjsua_transport_config_default (&tcfg);
     tcfg.port = SIP_PORT;
+
     if (SIP_QOS_DSCP) {
-	tcfg.qos_params.flags |= PJ_QOS_PARAM_HAS_DSCP;
-	tcfg.qos_params.dscp_val = SIP_QOS_DSCP;
+        tcfg.qos_params.flags |= PJ_QOS_PARAM_HAS_DSCP;
+        tcfg.qos_params.dscp_val = SIP_QOS_DSCP;
     }
-    status = pjsua_transport_create(PJSIP_TRANSPORT_TCP, &tcfg, &tid);
+
+    status = pjsua_transport_create (PJSIP_TRANSPORT_TCP, &tcfg, &tid);
+
     if (status != PJ_SUCCESS) {
-	    pjsua_perror(THIS_FILE, "Error creating TCP transport", status);
-	    pjsua_destroy();
-	    return status;
+        pjsua_perror (THIS_FILE, "Error creating TCP transport", status);
+        pjsua_destroy();
+        return status;
     }
+
 #endif
-    
+
 #if ENABLE_SIP_TLS
     /* Add TLS transport */
-    pjsua_transport_config_default(&tcfg);
+    pjsua_transport_config_default (&tcfg);
     tcfg.port = SIP_PORT + 1;
+
     if (SIP_QOS_DSCP) {
-	tcfg.qos_params.flags |= PJ_QOS_PARAM_HAS_DSCP;
-	tcfg.qos_params.dscp_val = SIP_QOS_DSCP;
-	tcfg.tls_setting.qos_params = tcfg.qos_params;
+        tcfg.qos_params.flags |= PJ_QOS_PARAM_HAS_DSCP;
+        tcfg.qos_params.dscp_val = SIP_QOS_DSCP;
+        tcfg.tls_setting.qos_params = tcfg.qos_params;
     }
-    tcfg.tls_setting.server_name = pj_str(TLS_SRV_NAME);
-    status = pjsua_transport_create(PJSIP_TRANSPORT_TLS, &tcfg, &tid);
+
+    tcfg.tls_setting.server_name = pj_str (TLS_SRV_NAME);
+    status = pjsua_transport_create (PJSIP_TRANSPORT_TLS, &tcfg, &tid);
+
     if (status != PJ_SUCCESS) {
-	    pjsua_perror(THIS_FILE, "Error creating TLS transport", status);
-	    pjsua_destroy();
-	    return status;
+        pjsua_perror (THIS_FILE, "Error creating TLS transport", status);
+        pjsua_destroy();
+        return status;
     }
+
 #endif
-    
+
     /* Add account for the transport */
-    pjsua_acc_add_local(tid, PJ_TRUE, &g_acc_id);
+    pjsua_acc_add_local (tid, PJ_TRUE, &g_acc_id);
 
     /* Create media transports */
     pjsua_transport_config mtcfg;
-    pjsua_transport_config_default(&mtcfg);
+    pjsua_transport_config_default (&mtcfg);
     mtcfg.port = 4000;
     mtcfg.qos_type = RTP_QOS_TYPE;
-    status = pjsua_media_transports_create(&mtcfg);
+    status = pjsua_media_transports_create (&mtcfg);
+
     if (status != PJ_SUCCESS) {
-    	pjsua_perror(THIS_FILE, "Error creating media transports", status);
-    	pjsua_destroy();
-    	return status;
+        pjsua_perror (THIS_FILE, "Error creating media transports", status);
+        pjsua_destroy();
+        return status;
     }
-    
+
     /* Initialization is done, now start pjsua */
     status = pjsua_start();
+
     if (status != PJ_SUCCESS) {
-    	pjsua_perror(THIS_FILE, "Error starting pjsua", status);
-    	pjsua_destroy();
-    	return status;
+        pjsua_perror (THIS_FILE, "Error starting pjsua", status);
+        pjsua_destroy();
+        return status;
     }
 
     /* Register to SIP server by creating SIP account. */
     if (HAS_SIP_ACCOUNT) {
-	pjsua_acc_config cfg;
-
-	pjsua_acc_config_default(&cfg);
-	cfg.id = pj_str("sip:" SIP_USER "@" SIP_DOMAIN);
-	cfg.reg_uri = pj_str("sip:" SIP_DOMAIN);
-	cfg.cred_count = 1;
-	cfg.cred_info[0].realm = pj_str("*");
-	cfg.cred_info[0].scheme = pj_str("digest");
-	cfg.cred_info[0].username = pj_str(SIP_USER);
-	cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
-	cfg.cred_info[0].data = pj_str(SIP_PASSWD);
-
-	status = pjsua_acc_add(&cfg, PJ_TRUE, &g_acc_id);
-	if (status != PJ_SUCCESS) {
-		pjsua_perror(THIS_FILE, "Error adding account", status);
-		pjsua_destroy();
-		return status;
-	}
+        pjsua_acc_config cfg;
+
+        pjsua_acc_config_default (&cfg);
+        cfg.id = pj_str ("sip:" SIP_USER "@" SIP_DOMAIN);
+        cfg.reg_uri = pj_str ("sip:" SIP_DOMAIN);
+        cfg.cred_count = 1;
+        cfg.cred_info[0].realm = pj_str ("*");
+        cfg.cred_info[0].scheme = pj_str ("digest");
+        cfg.cred_info[0].username = pj_str (SIP_USER);
+        cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
+        cfg.cred_info[0].data = pj_str (SIP_PASSWD);
+
+        status = pjsua_acc_add (&cfg, PJ_TRUE, &g_acc_id);
+
+        if (status != PJ_SUCCESS) {
+            pjsua_perror (THIS_FILE, "Error adding account", status);
+            pjsua_destroy();
+            return status;
+        }
     }
 
     if (SIP_DST_URI) {
-    	pjsua_buddy_config bcfg;
-    
-    	pjsua_buddy_config_default(&bcfg);
-    	bcfg.uri = pj_str(SIP_DST_URI);
-    	bcfg.subscribe = PJ_FALSE;
-    	
-    	pjsua_buddy_add(&bcfg, &g_buddy_id);
+        pjsua_buddy_config bcfg;
+
+        pjsua_buddy_config_default (&bcfg);
+        bcfg.uri = pj_str (SIP_DST_URI);
+        bcfg.subscribe = PJ_FALSE;
+
+        pjsua_buddy_add (&bcfg, &g_buddy_id);
     }
+
     return PJ_SUCCESS;
 }
 
@@ -507,404 +525,421 @@ static pj_status_t app_startup()
  */
 #include <e32base.h>
 
-class ConsoleUI : public CActive 
+class ConsoleUI : public CActive
 {
-public:
-    ConsoleUI(CConsoleBase *con);
-    ~ConsoleUI();
-
-    // Run console UI
-    void Run();
-
-    // Stop
-    void Stop();
-    
-protected:
-    // Cancel asynchronous read.
-    void DoCancel();
-
-    // Implementation: called when read has completed.
-    void RunL();
-    
-private:
-    CConsoleBase *con_;
+    public:
+        ConsoleUI (CConsoleBase *con);
+        ~ConsoleUI();
+
+        // Run console UI
+        void Run();
+
+        // Stop
+        void Stop();
+
+    protected:
+        // Cancel asynchronous read.
+        void DoCancel();
+
+        // Implementation: called when read has completed.
+        void RunL();
+
+    private:
+        CConsoleBase *con_;
 };
 
 
-ConsoleUI::ConsoleUI(CConsoleBase *con) 
-: CActive(EPriorityStandard), con_(con)
+ConsoleUI::ConsoleUI (CConsoleBase *con)
+        : CActive (EPriorityStandard), con_ (con)
 {
-    CActiveScheduler::Add(this);
+    CActiveScheduler::Add (this);
 }
 
-ConsoleUI::~ConsoleUI() 
+ConsoleUI::~ConsoleUI()
 {
     Stop();
 }
 
 // Run console UI
-void ConsoleUI::Run() 
+void ConsoleUI::Run()
 {
-    con_->Read(iStatus);
+    con_->Read (iStatus);
     SetActive();
 }
 
 // Stop console UI
-void ConsoleUI::Stop() 
+void ConsoleUI::Stop()
 {
     Cancel();
 }
 
 // Cancel asynchronous read.
-void ConsoleUI::DoCancel() 
+void ConsoleUI::DoCancel()
 {
     con_->ReadCancel();
 }
 
-static void PrintMainMenu() 
+static void PrintMainMenu()
 {
     const char *menu =
-	    "\n\n"
-	    "Main Menu:\n"
-	    "  d    Enable/disable codecs\n"
-	    "  m    Call " SIP_DST_URI "\n"
-	    "  a    Answer call\n"
-	    "  g    Hangup all calls\n"
-   	    "  t    Toggle audio route\n"
+        "\n\n"
+        "Main Menu:\n"
+        "  d    Enable/disable codecs\n"
+        "  m    Call " SIP_DST_URI "\n"
+        "  a    Answer call\n"
+        "  g    Hangup all calls\n"
+        "  t    Toggle audio route\n"
 #if !defined(PJMEDIA_CONF_USE_SWITCH_BOARD) || PJMEDIA_CONF_USE_SWITCH_BOARD==0
-   	    "  j    Toggle loopback audio\n"
+        "  j    Toggle loopback audio\n"
 #endif
-   	    "up/dn  Increase/decrease output volume\n"
-	    "  s    Subscribe " SIP_DST_URI "\n"
-	    "  S    Unsubscribe presence\n"
-	    "  o    Set account online\n"
-	    "  O    Set account offline\n"
-	    "  w    Quit\n";
-    
-    PJ_LOG(3, (THIS_FILE, menu));
+        "up/dn  Increase/decrease output volume\n"
+        "  s    Subscribe " SIP_DST_URI "\n"
+        "  S    Unsubscribe presence\n"
+        "  o    Set account online\n"
+        "  O    Set account offline\n"
+        "  w    Quit\n";
+
+    PJ_LOG (3, (THIS_FILE, menu));
 }
 
-static void PrintCodecMenu() 
+static void PrintCodecMenu()
 {
-    const char *menu = 
-	    "\n\n"
-	    "Codec Menu:\n"
-	    "  a    Enable all codecs\n"
+    const char *menu =
+        "\n\n"
+        "Codec Menu:\n"
+        "  a    Enable all codecs\n"
 #if PJMEDIA_HAS_PASSTHROUGH_CODEC_AMR
-	    "  d    Enable only AMR\n"
+        "  d    Enable only AMR\n"
 #endif
 #if PJMEDIA_HAS_PASSTHROUGH_CODEC_G729
-	    "  g    Enable only G.729\n"
+        "  g    Enable only G.729\n"
 #endif
 #if PJMEDIA_HAS_PASSTHROUGH_CODEC_ILBC
-	    "  j    Enable only iLBC\n"
+        "  j    Enable only iLBC\n"
 #endif
-	    "  m    Enable only Speex\n"
-	    "  p    Enable only GSM\n"
-	    "  t    Enable only PCMU\n"
-	    "  w    Enable only PCMA\n";
-    
-    PJ_LOG(3, (THIS_FILE, menu));
+        "  m    Enable only Speex\n"
+        "  p    Enable only GSM\n"
+        "  t    Enable only PCMU\n"
+        "  w    Enable only PCMA\n";
+
+    PJ_LOG (3, (THIS_FILE, menu));
 }
 
-static void HandleMainMenu(TKeyCode kc) {
+static void HandleMainMenu (TKeyCode kc)
+{
     switch (kc) {
-    
-    case EKeyUpArrow:
-    case EKeyDownArrow:
-	{
-	    unsigned vol;
-	    pj_status_t status;
-	    
-	    status = pjsua_snd_get_setting(
-			     PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, &vol);
-	    if (status == PJ_SUCCESS) {
-		if (kc == EKeyUpArrow)
-		    vol = PJ_MIN(100, vol+10);
-		else
-		    vol = (vol>=10 ? vol-10 : 0);
-		status = pjsua_snd_set_setting(
-				    PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
-				    &vol, PJ_TRUE);
-	    }
-
-	    if (status == PJ_SUCCESS) {
-		PJ_LOG(3,(THIS_FILE, "Output volume set to %d", vol));
-	    } else {
-		pjsua_perror(THIS_FILE, "Error setting volume", status);
-	    }
-	}
-	break;
-    
-    case 't':
-	{
-	    pjmedia_aud_dev_route route;
-	    pj_status_t status;
-	    
-	    status = pjsua_snd_get_setting(PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE, 
-					   &route);
-	    
-	    if (status == PJ_SUCCESS) {
-		if (route == PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER)
-		    route = PJMEDIA_AUD_DEV_ROUTE_EARPIECE;
-		else
-		    route = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
-
-		status = pjsua_snd_set_setting(
-				    PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE,
-				    &route, PJ_TRUE);
-	    }
-
-	    if (status != PJ_SUCCESS)
-		pjsua_perror(THIS_FILE, "Error switch audio route", status);
-	}
-	break;
-	
-    case 'j':
-	{
-	    static pj_bool_t loopback_active = PJ_FALSE;
-	    if (!loopback_active)
-		pjsua_conf_connect(0, 0);
-	    else
-		pjsua_conf_disconnect(0, 0);
-	    loopback_active = !loopback_active;
-	}
-	break;
-	
-    case 'm':
-	if (g_call_id != PJSUA_INVALID_ID) {
-		PJ_LOG(3,(THIS_FILE, "Another call is active"));	
-		break;
-	}
-
-	if (pjsua_verify_sip_url(SIP_DST_URI) == PJ_SUCCESS) {
-		pj_str_t dst = pj_str(SIP_DST_URI);
-		pjsua_call_make_call(g_acc_id, &dst, 0, NULL,
-				     NULL, &g_call_id);
-	} else {
-		PJ_LOG(3,(THIS_FILE, "Invalid SIP URI"));
-	}
-	break;
-    case 'a':
-	if (g_call_id != PJSUA_INVALID_ID)
-		pjsua_call_answer(g_call_id, 200, NULL, NULL);
-	break;
-    case 'g':
-	pjsua_call_hangup_all();
-	break;
-    case 's':
-    case 'S':
-	if (g_buddy_id != PJSUA_INVALID_ID)
-		pjsua_buddy_subscribe_pres(g_buddy_id, kc=='s');
-	break;
-    case 'o':
-    case 'O':
-	pjsua_acc_set_online_status(g_acc_id, kc=='o');
-	break;
-	    
-    default:
-	PJ_LOG(3,(THIS_FILE, "Keycode '%c' (%d) is pressed", kc, kc));
-	break;
+
+        case EKeyUpArrow:
+        case EKeyDownArrow: {
+            unsigned vol;
+            pj_status_t status;
+
+            status = pjsua_snd_get_setting (
+                         PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING, &vol);
+
+            if (status == PJ_SUCCESS) {
+                if (kc == EKeyUpArrow)
+                    vol = PJ_MIN (100, vol+10);
+                else
+                    vol = (vol>=10 ? vol-10 : 0);
+
+                status = pjsua_snd_set_setting (
+                             PJMEDIA_AUD_DEV_CAP_OUTPUT_VOLUME_SETTING,
+                             &vol, PJ_TRUE);
+            }
+
+            if (status == PJ_SUCCESS) {
+                PJ_LOG (3, (THIS_FILE, "Output volume set to %d", vol));
+            } else {
+                pjsua_perror (THIS_FILE, "Error setting volume", status);
+            }
+        }
+        break;
+
+        case 't': {
+            pjmedia_aud_dev_route route;
+            pj_status_t status;
+
+            status = pjsua_snd_get_setting (PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE,
+                                            &route);
+
+            if (status == PJ_SUCCESS) {
+                if (route == PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER)
+                    route = PJMEDIA_AUD_DEV_ROUTE_EARPIECE;
+                else
+                    route = PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER;
+
+                status = pjsua_snd_set_setting (
+                             PJMEDIA_AUD_DEV_CAP_OUTPUT_ROUTE,
+                             &route, PJ_TRUE);
+            }
+
+            if (status != PJ_SUCCESS)
+                pjsua_perror (THIS_FILE, "Error switch audio route", status);
+        }
+        break;
+
+        case 'j': {
+            static pj_bool_t loopback_active = PJ_FALSE;
+
+            if (!loopback_active)
+                pjsua_conf_connect (0, 0);
+            else
+                pjsua_conf_disconnect (0, 0);
+
+            loopback_active = !loopback_active;
+        }
+        break;
+
+        case 'm':
+
+            if (g_call_id != PJSUA_INVALID_ID) {
+                PJ_LOG (3, (THIS_FILE, "Another call is active"));
+                break;
+            }
+
+            if (pjsua_verify_sip_url (SIP_DST_URI) == PJ_SUCCESS) {
+                pj_str_t dst = pj_str (SIP_DST_URI);
+                pjsua_call_make_call (g_acc_id, &dst, 0, NULL,
+                                      NULL, &g_call_id);
+            } else {
+                PJ_LOG (3, (THIS_FILE, "Invalid SIP URI"));
+            }
+
+            break;
+        case 'a':
+
+            if (g_call_id != PJSUA_INVALID_ID)
+                pjsua_call_answer (g_call_id, 200, NULL, NULL);
+
+            break;
+        case 'g':
+            pjsua_call_hangup_all();
+            break;
+        case 's':
+        case 'S':
+
+            if (g_buddy_id != PJSUA_INVALID_ID)
+                pjsua_buddy_subscribe_pres (g_buddy_id, kc=='s');
+
+            break;
+        case 'o':
+        case 'O':
+            pjsua_acc_set_online_status (g_acc_id, kc=='o');
+            break;
+
+        default:
+            PJ_LOG (3, (THIS_FILE, "Keycode '%c' (%d) is pressed", kc, kc));
+            break;
     }
 
     PrintMainMenu();
 }
 
-static void HandleCodecMenu(TKeyCode kc) {
+static void HandleCodecMenu (TKeyCode kc)
+{
     const pj_str_t ID_ALL = {"*", 1};
     pj_str_t codec = {NULL, 0};
-    
+
     if (kc == 'a') {
-	pjsua_codec_set_priority(&ID_ALL, PJMEDIA_CODEC_PRIO_NORMAL);
-	PJ_LOG(3,(THIS_FILE, "All codecs activated"));
+        pjsua_codec_set_priority (&ID_ALL, PJMEDIA_CODEC_PRIO_NORMAL);
+        PJ_LOG (3, (THIS_FILE, "All codecs activated"));
     } else {
-	switch (kc) {
-	case 'd':
-	    codec = pj_str("AMR");
-	    break;
-	case 'g':
-	    codec = pj_str("G729");
-	    break;
-	case 'j':
-	    codec = pj_str("ILBC");
-	    break;
-	case 'm':
-	    codec = pj_str("SPEEX/8000");
-	    break;
-	case 'p':
-	    codec = pj_str("GSM");
-	    break;
-	case 't':
-	    codec = pj_str("PCMU");
-	    break;
-	case 'w':
-	    codec = pj_str("PCMA");
-	    break;
-	default:
-	    PJ_LOG(3,(THIS_FILE, "Keycode '%c' (%d) is pressed", kc, kc));
-	    break;
-	}
-
-	if (codec.slen) {
-	    pj_status_t status;
-	    
-	    pjsua_codec_set_priority(&ID_ALL, PJMEDIA_CODEC_PRIO_DISABLED);
-		
-	    status = pjsua_codec_set_priority(&codec, 
-					      PJMEDIA_CODEC_PRIO_NORMAL);
-	    if (status == PJ_SUCCESS)
-		PJ_LOG(3,(THIS_FILE, "%s activated", codec.ptr));
-	    else
-		PJ_LOG(3,(THIS_FILE, "Failed activating %s, err=%d", 
-			  codec.ptr, status));
-	}
+        switch (kc) {
+            case 'd':
+                codec = pj_str ("AMR");
+                break;
+            case 'g':
+                codec = pj_str ("G729");
+                break;
+            case 'j':
+                codec = pj_str ("ILBC");
+                break;
+            case 'm':
+                codec = pj_str ("SPEEX/8000");
+                break;
+            case 'p':
+                codec = pj_str ("GSM");
+                break;
+            case 't':
+                codec = pj_str ("PCMU");
+                break;
+            case 'w':
+                codec = pj_str ("PCMA");
+                break;
+            default:
+                PJ_LOG (3, (THIS_FILE, "Keycode '%c' (%d) is pressed", kc, kc));
+                break;
+        }
+
+        if (codec.slen) {
+            pj_status_t status;
+
+            pjsua_codec_set_priority (&ID_ALL, PJMEDIA_CODEC_PRIO_DISABLED);
+
+            status = pjsua_codec_set_priority (&codec,
+                                               PJMEDIA_CODEC_PRIO_NORMAL);
+
+            if (status == PJ_SUCCESS)
+                PJ_LOG (3, (THIS_FILE, "%s activated", codec.ptr));
+            else
+                PJ_LOG (3, (THIS_FILE, "Failed activating %s, err=%d",
+                            codec.ptr, status));
+        }
     }
 }
 
 // Implementation: called when read has completed.
-void ConsoleUI::RunL() 
+void ConsoleUI::RunL()
 {
     enum {
-	MENU_TYPE_MAIN = 0,
-	MENU_TYPE_CODEC = 1
+        MENU_TYPE_MAIN = 0,
+        MENU_TYPE_CODEC = 1
     };
     static int menu_type = MENU_TYPE_MAIN;
     TKeyCode kc = con_->KeyCode();
     pj_bool_t reschedule = PJ_TRUE;
-    
+
     if (menu_type == MENU_TYPE_MAIN) {
-	if (kc == 'w') {
-	    CActiveScheduler::Stop();
-	    reschedule = PJ_FALSE;
-	} else if (kc == 'd') {
-	    menu_type = MENU_TYPE_CODEC;
-	    PrintCodecMenu();
-	} else {
-	    HandleMainMenu(kc);
-	}
+        if (kc == 'w') {
+            CActiveScheduler::Stop();
+            reschedule = PJ_FALSE;
+        } else if (kc == 'd') {
+            menu_type = MENU_TYPE_CODEC;
+            PrintCodecMenu();
+        } else {
+            HandleMainMenu (kc);
+        }
     } else {
-	HandleCodecMenu(kc);
-	
-	menu_type = MENU_TYPE_MAIN;
-	PrintMainMenu();
+        HandleCodecMenu (kc);
+
+        menu_type = MENU_TYPE_MAIN;
+        PrintMainMenu();
     }
-    
+
     if (reschedule)
-	Run();
+        Run();
 }
 
 #if 0
 // IP networking related testing
-static pj_status_t test_addr(void)
+static pj_status_t test_addr (void)
 {
-	int af;
-	unsigned i, count;
-	pj_addrinfo ai[8];
-	pj_sockaddr ifs[8];
-	const pj_str_t *hostname;
-	pj_hostent he;
-	pj_status_t status;
-	
-	pj_log_set_log_func(&log_writer);
-	
-	status = pj_init();
-	if (status != PJ_SUCCESS) {
-		pjsua_perror(THIS_FILE, "pj_init() error", status);
-		return status;
-	}
-	
-	af = pj_AF_INET();
-	
+    int af;
+    unsigned i, count;
+    pj_addrinfo ai[8];
+    pj_sockaddr ifs[8];
+    const pj_str_t *hostname;
+    pj_hostent he;
+    pj_status_t status;
+
+    pj_log_set_log_func (&log_writer);
+
+    status = pj_init();
+
+    if (status != PJ_SUCCESS) {
+        pjsua_perror (THIS_FILE, "pj_init() error", status);
+        return status;
+    }
+
+    af = pj_AF_INET();
+
 #if 0
-	pj_in_addr in_addr;
-	pj_str_t aa = pj_str("1.1.1.1");
-	in_addr = pj_inet_addr(&aa);
-	char *the_addr = pj_inet_ntoa(in_addr);
-	PJ_LOG(3,(THIS_FILE, "IP addr=%s", the_addr));
-
-	aa = pj_str("192.168.0.15");
-	in_addr = pj_inet_addr(&aa);
-	the_addr = pj_inet_ntoa(in_addr);
-	PJ_LOG(3,(THIS_FILE, "IP addr=%s", the_addr));
-
-	aa = pj_str("2.2.2.2");
-	in_addr = pj_inet_addr(&aa);
-	the_addr = pj_inet_ntoa(in_addr);
-	PJ_LOG(3,(THIS_FILE, "IP addr=%s", the_addr));
-	
-	return -1;
+    pj_in_addr in_addr;
+    pj_str_t aa = pj_str ("1.1.1.1");
+    in_addr = pj_inet_addr (&aa);
+    char *the_addr = pj_inet_ntoa (in_addr);
+    PJ_LOG (3, (THIS_FILE, "IP addr=%s", the_addr));
+
+    aa = pj_str ("192.168.0.15");
+    in_addr = pj_inet_addr (&aa);
+    the_addr = pj_inet_ntoa (in_addr);
+    PJ_LOG (3, (THIS_FILE, "IP addr=%s", the_addr));
+
+    aa = pj_str ("2.2.2.2");
+    in_addr = pj_inet_addr (&aa);
+    the_addr = pj_inet_ntoa (in_addr);
+    PJ_LOG (3, (THIS_FILE, "IP addr=%s", the_addr));
+
+    return -1;
 #endif
-	
-	// Hostname
-	hostname = pj_gethostname();
-	if (hostname == NULL) {
-		status = PJ_ERESOLVE;
-		pjsua_perror(THIS_FILE, "pj_gethostname() error", status);
-		goto on_return;
-	}
-	
-	PJ_LOG(3,(THIS_FILE, "Hostname: %.*s", hostname->slen, hostname->ptr));
-	
-	// Gethostbyname
-	status = pj_gethostbyname(hostname, &he);
-	if (status != PJ_SUCCESS) {
-		pjsua_perror(THIS_FILE, "pj_gethostbyname() error", status);
-	} else {
-		PJ_LOG(3,(THIS_FILE, "gethostbyname: %s", 
-				  pj_inet_ntoa(*(pj_in_addr*)he.h_addr)));
-	}
-	
-	// Getaddrinfo
-	count = PJ_ARRAY_SIZE(ai);
-	status = pj_getaddrinfo(af, hostname, &count, ai);
-	if (status != PJ_SUCCESS) {
-		pjsua_perror(THIS_FILE, "pj_getaddrinfo() error", status);
-	} else {
-		for (i=0; i<count; ++i) {
-			char ipaddr[PJ_INET6_ADDRSTRLEN+2];
-			PJ_LOG(3,(THIS_FILE, "Addrinfo: %s", 
-					  pj_sockaddr_print(&ai[i].ai_addr, ipaddr, sizeof(ipaddr), 2)));
-		}
-	}
-	
-	// Enum interface
-	count = PJ_ARRAY_SIZE(ifs);
-	status = pj_enum_ip_interface(af, &count, ifs);
-	if (status != PJ_SUCCESS) {
-		pjsua_perror(THIS_FILE, "pj_enum_ip_interface() error", status);
-	} else {
-		for (i=0; i<count; ++i) {
-			char ipaddr[PJ_INET6_ADDRSTRLEN+2];
-			PJ_LOG(3,(THIS_FILE, "Interface: %s", 
-					  pj_sockaddr_print(&ifs[i], ipaddr, sizeof(ipaddr), 2)));
-		}
-	}
-
-	// Get default iinterface
-	status = pj_getdefaultipinterface(af, &ifs[0]);
-	if (status != PJ_SUCCESS) {
-		pjsua_perror(THIS_FILE, "pj_getdefaultipinterface() error", status);
-	} else {
-		char ipaddr[PJ_INET6_ADDRSTRLEN+2];
-		PJ_LOG(3,(THIS_FILE, "Default IP: %s", 
-				  pj_sockaddr_print(&ifs[0], ipaddr, sizeof(ipaddr), 2)));
-	}
-	
-	// Get default IP address
-	status = pj_gethostip(af, &ifs[0]);
-	if (status != PJ_SUCCESS) {
-		pjsua_perror(THIS_FILE, "pj_gethostip() error", status);
-	} else {
-		char ipaddr[PJ_INET6_ADDRSTRLEN+2];
-		PJ_LOG(3,(THIS_FILE, "Host IP: %s", 
-				  pj_sockaddr_print(&ifs[0], ipaddr, sizeof(ipaddr), 2)));
-	}
-	
-	status = -1;
-	
+
+    // Hostname
+    hostname = pj_gethostname();
+
+    if (hostname == NULL) {
+        status = PJ_ERESOLVE;
+        pjsua_perror (THIS_FILE, "pj_gethostname() error", status);
+        goto on_return;
+    }
+
+    PJ_LOG (3, (THIS_FILE, "Hostname: %.*s", hostname->slen, hostname->ptr));
+
+    // Gethostbyname
+    status = pj_gethostbyname (hostname, &he);
+
+    if (status != PJ_SUCCESS) {
+        pjsua_perror (THIS_FILE, "pj_gethostbyname() error", status);
+    } else {
+        PJ_LOG (3, (THIS_FILE, "gethostbyname: %s",
+                    pj_inet_ntoa (* (pj_in_addr*) he.h_addr)));
+    }
+
+    // Getaddrinfo
+    count = PJ_ARRAY_SIZE (ai);
+    status = pj_getaddrinfo (af, hostname, &count, ai);
+
+    if (status != PJ_SUCCESS) {
+        pjsua_perror (THIS_FILE, "pj_getaddrinfo() error", status);
+    } else {
+        for (i=0; i<count; ++i) {
+            char ipaddr[PJ_INET6_ADDRSTRLEN+2];
+            PJ_LOG (3, (THIS_FILE, "Addrinfo: %s",
+                        pj_sockaddr_print (&ai[i].ai_addr, ipaddr, sizeof (ipaddr), 2)));
+        }
+    }
+
+    // Enum interface
+    count = PJ_ARRAY_SIZE (ifs);
+    status = pj_enum_ip_interface (af, &count, ifs);
+
+    if (status != PJ_SUCCESS) {
+        pjsua_perror (THIS_FILE, "pj_enum_ip_interface() error", status);
+    } else {
+        for (i=0; i<count; ++i) {
+            char ipaddr[PJ_INET6_ADDRSTRLEN+2];
+            PJ_LOG (3, (THIS_FILE, "Interface: %s",
+                        pj_sockaddr_print (&ifs[i], ipaddr, sizeof (ipaddr), 2)));
+        }
+    }
+
+    // Get default iinterface
+    status = pj_getdefaultipinterface (af, &ifs[0]);
+
+    if (status != PJ_SUCCESS) {
+        pjsua_perror (THIS_FILE, "pj_getdefaultipinterface() error", status);
+    } else {
+        char ipaddr[PJ_INET6_ADDRSTRLEN+2];
+        PJ_LOG (3, (THIS_FILE, "Default IP: %s",
+                    pj_sockaddr_print (&ifs[0], ipaddr, sizeof (ipaddr), 2)));
+    }
+
+    // Get default IP address
+    status = pj_gethostip (af, &ifs[0]);
+
+    if (status != PJ_SUCCESS) {
+        pjsua_perror (THIS_FILE, "pj_gethostip() error", status);
+    } else {
+        char ipaddr[PJ_INET6_ADDRSTRLEN+2];
+        PJ_LOG (3, (THIS_FILE, "Host IP: %s",
+                    pj_sockaddr_print (&ifs[0], ipaddr, sizeof (ipaddr), 2)));
+    }
+
+    status = -1;
+
 on_return:
-	pj_shutdown();
-	return status;
+    pj_shutdown();
+    return status;
 }
 #endif
 
@@ -912,40 +947,40 @@ on_return:
 #include <es_sock.h>
 
 #if 0
-// Force network connection to use the first IAP, 
-// this is useful for debugging on emulator without GUI. 
+// Force network connection to use the first IAP,
+// this is useful for debugging on emulator without GUI.
 // Include commdb.lib & apengine.lib in symbian_ua.mmp file
 // if this is enabled.
 
 #include <apdatahandler.h>
 
-inline void ForceUseFirstIAP() 
+inline void ForceUseFirstIAP()
 {
     TUint32 rank = 1;
     TUint32 bearers;
     TUint32 prompt;
     TUint32 iap;
 
-    CCommsDatabase* commDb = CCommsDatabase::NewL(EDatabaseTypeIAP);
-    CleanupStack::PushL(commDb);
+    CCommsDatabase* commDb = CCommsDatabase::NewL (EDatabaseTypeIAP);
+    CleanupStack::PushL (commDb);
+
+    CApDataHandler* apDataHandler = CApDataHandler::NewLC (*commDb);
 
-    CApDataHandler* apDataHandler = CApDataHandler::NewLC(*commDb);
-    
     TCommDbConnectionDirection direction = ECommDbConnectionDirectionOutgoing;
-    apDataHandler->GetPreferredIfDbIapTypeL(rank, direction, bearers, prompt, iap);
+    apDataHandler->GetPreferredIfDbIapTypeL (rank, direction, bearers, prompt, iap);
     prompt = ECommDbDialogPrefDoNotPrompt;
-    apDataHandler->SetPreferredIfDbIapTypeL(rank, direction, bearers, (TCommDbDialogPref)prompt, iap, ETrue);
-    CleanupStack::PopAndDestroy(2); // apDataHandler, commDb
+    apDataHandler->SetPreferredIfDbIapTypeL (rank, direction, bearers, (TCommDbDialogPref) prompt, iap, ETrue);
+    CleanupStack::PopAndDestroy (2); // apDataHandler, commDb
 }
 
-static void SelectIAP() 
+static void SelectIAP()
 {
     ForceUseFirstIAP();
 }
 
 #else
 
-static void SelectIAP() 
+static void SelectIAP()
 {
 }
 
@@ -954,96 +989,101 @@ static void SelectIAP()
 
 // Class CConnMon to monitor network connection (RConnection). Whenever
 // the connection is down, it will notify PJLIB and restart PJSUA-LIB.
-class CConnMon : public CActive {
-public:
-    static CConnMon* NewL(RConnection &conn, RSocketServ &sserver) {
-	CConnMon *self = new (ELeave) CConnMon(conn, sserver);
-	CleanupStack::PushL(self);
-	self->ConstructL();
-	CleanupStack::Pop(self);
-	return self;
-    }
-    
-    void Start() {
-	conn_.ProgressNotification(nif_progress_, iStatus);
-	SetActive();
-    }
-    
-    void Stop() {
-	Cancel();
-    }
-    
-    ~CConnMon() { Stop(); }
-    
-private:
-    CConnMon(RConnection &conn, RSocketServ &sserver) : 
-	CActive(EPriorityHigh), 
-	conn_(conn), 
-	sserver_(sserver)
-    {
-	CActiveScheduler::Add(this);
-    }
-    
-    void ConstructL() {}
-
-    void DoCancel() {
-	conn_.CancelProgressNotification();
-    }
-
-    void RunL() {
-	int stage = nif_progress_().iStage;
-	
-	if (stage == KLinkLayerClosed) {
-	    pj_status_t status;
-	    TInt err;
-
-	    // Tell pjlib that connection is down.
-	    pj_symbianos_set_connection_status(PJ_FALSE);
-	    
-	    PJ_LOG(3, (THIS_FILE, "RConnection closed, restarting PJSUA.."));
-	    
-	    // Destroy pjsua
-	    pjsua_destroy();
-	    PJ_LOG(3, (THIS_FILE, "PJSUA destroyed."));
-
-	    // Reopen the connection
-	    err = conn_.Open(sserver_);
-	    if (err == KErrNone)
-		err = conn_.Start();
-	    if (err != KErrNone) {
-		CActiveScheduler::Stop();
-		return;
-	    }
-
-	    // Reinit Symbian OS param before pj_init()
-	    pj_symbianos_params sym_params;
-	    pj_bzero(&sym_params, sizeof(sym_params));
-	    sym_params.rsocketserv = &sserver_;
-	    sym_params.rconnection = &conn_;
-	    pj_symbianos_set_params(&sym_params);
-
-	    // Reinit pjsua
-	    status = app_startup();
-	    if (status != PJ_SUCCESS) {
-		pjsua_perror(THIS_FILE, "app_startup() error", status);
-		CActiveScheduler::Stop();
-		return;
-	    }
-	    
-	    PJ_LOG(3, (THIS_FILE, "PJSUA restarted."));
-	    PrintMainMenu();
-	}
-	
-	Start();
-    }
-    
-    RConnection& conn_;
-    RSocketServ& sserver_;
-    TNifProgressBuf nif_progress_;
+class CConnMon : public CActive
+{
+    public:
+        static CConnMon* NewL (RConnection &conn, RSocketServ &sserver) {
+            CConnMon *self = new (ELeave) CConnMon (conn, sserver);
+            CleanupStack::PushL (self);
+            self->ConstructL();
+            CleanupStack::Pop (self);
+            return self;
+        }
+
+        void Start() {
+            conn_.ProgressNotification (nif_progress_, iStatus);
+            SetActive();
+        }
+
+        void Stop() {
+            Cancel();
+        }
+
+        ~CConnMon() {
+            Stop();
+        }
+
+    private:
+        CConnMon (RConnection &conn, RSocketServ &sserver) :
+                CActive (EPriorityHigh),
+                conn_ (conn),
+                sserver_ (sserver) {
+            CActiveScheduler::Add (this);
+        }
+
+        void ConstructL() {}
+
+        void DoCancel() {
+            conn_.CancelProgressNotification();
+        }
+
+        void RunL() {
+            int stage = nif_progress_().iStage;
+
+            if (stage == KLinkLayerClosed) {
+                pj_status_t status;
+                TInt err;
+
+                // Tell pjlib that connection is down.
+                pj_symbianos_set_connection_status (PJ_FALSE);
+
+                PJ_LOG (3, (THIS_FILE, "RConnection closed, restarting PJSUA.."));
+
+                // Destroy pjsua
+                pjsua_destroy();
+                PJ_LOG (3, (THIS_FILE, "PJSUA destroyed."));
+
+                // Reopen the connection
+                err = conn_.Open (sserver_);
+
+                if (err == KErrNone)
+                    err = conn_.Start();
+
+                if (err != KErrNone) {
+                    CActiveScheduler::Stop();
+                    return;
+                }
+
+                // Reinit Symbian OS param before pj_init()
+                pj_symbianos_params sym_params;
+                pj_bzero (&sym_params, sizeof (sym_params));
+                sym_params.rsocketserv = &sserver_;
+                sym_params.rconnection = &conn_;
+                pj_symbianos_set_params (&sym_params);
+
+                // Reinit pjsua
+                status = app_startup();
+
+                if (status != PJ_SUCCESS) {
+                    pjsua_perror (THIS_FILE, "app_startup() error", status);
+                    CActiveScheduler::Stop();
+                    return;
+                }
+
+                PJ_LOG (3, (THIS_FILE, "PJSUA restarted."));
+                PrintMainMenu();
+            }
+
+            Start();
+        }
+
+        RConnection& conn_;
+        RSocketServ& sserver_;
+        TNifProgressBuf nif_progress_;
 };
 
 ////////////////////////////////////////////////////////////////////////////
-int ua_main() 
+int ua_main()
 {
     RSocketServ aSocketServer;
     RConnection aConn;
@@ -1052,81 +1092,83 @@ int ua_main()
     pj_status_t status;
 
     SelectIAP();
-    
+
     // Initialize RSocketServ
-    if ((err=aSocketServer.Connect()) != KErrNone)
-    	return PJ_STATUS_FROM_OS(err);
-    
+    if ( (err=aSocketServer.Connect()) != KErrNone)
+        return PJ_STATUS_FROM_OS (err);
+
     // Open up a connection
-    if ((err=aConn.Open(aSocketServer)) != KErrNone) {
-	aSocketServer.Close();
-	return PJ_STATUS_FROM_OS(err);
+    if ( (err=aConn.Open (aSocketServer)) != KErrNone) {
+        aSocketServer.Close();
+        return PJ_STATUS_FROM_OS (err);
     }
-    
-    if ((err=aConn.Start()) != KErrNone) {
-    	aSocketServer.Close();
-    	return PJ_STATUS_FROM_OS(err);
+
+    if ( (err=aConn.Start()) != KErrNone) {
+        aSocketServer.Close();
+        return PJ_STATUS_FROM_OS (err);
     }
-    
+
     // Set Symbian OS parameters in pjlib.
     // This must be done before pj_init() is called.
-    pj_bzero(&sym_params, sizeof(sym_params));
+    pj_bzero (&sym_params, sizeof (sym_params));
     sym_params.rsocketserv = &aSocketServer;
     sym_params.rconnection = &aConn;
-    pj_symbianos_set_params(&sym_params);
-    
+    pj_symbianos_set_params (&sym_params);
+
     // Initialize pjsua
     status  = app_startup();
+
     //status = test_addr();
     if (status != PJ_SUCCESS) {
-    	aConn.Close();
-    	aSocketServer.Close();
-	return status;
+        aConn.Close();
+        aSocketServer.Close();
+        return status;
     }
 
-    
+
     // Run the UI
-    ConsoleUI *con = new ConsoleUI(console);
-    
+    ConsoleUI *con = new ConsoleUI (console);
+
     con->Run();
     PrintMainMenu();
 
     // Init & start connection monitor
-    CConnMon *connmon = CConnMon::NewL(aConn, aSocketServer);
+    CConnMon *connmon = CConnMon::NewL (aConn, aSocketServer);
     connmon->Start();
 
     CActiveScheduler::Start();
-    
+
     delete connmon;
     delete con;
 
     // Dump memory statistics
-    PJ_LOG(3,(THIS_FILE, "Max heap usage: %u.%03uMB",
-	      pjsua_var.cp.peak_used_size / 1000000,
-	      (pjsua_var.cp.peak_used_size % 1000000)/1000));
-    
+    PJ_LOG (3, (THIS_FILE, "Max heap usage: %u.%03uMB",
+                pjsua_var.cp.peak_used_size / 1000000,
+                (pjsua_var.cp.peak_used_size % 1000000) /1000));
+
     // check max stack usage
 #if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
-	pj_thread_t* this_thread = pj_thread_this();
-	if (!this_thread)
-	    return status;
-	
-	const char* max_stack_file;
-	int max_stack_line;
-	status = pj_thread_get_stack_info(this_thread, &max_stack_file, &max_stack_line);
-	
-	PJ_LOG(3,(THIS_FILE, "Max stack usage: %u at %s:%d", 
-		  pj_thread_get_stack_max_usage(this_thread), 
-		  max_stack_file, max_stack_line));
+    pj_thread_t* this_thread = pj_thread_this();
+
+    if (!this_thread)
+        return status;
+
+    const char* max_stack_file;
+    int max_stack_line;
+    status = pj_thread_get_stack_info (this_thread, &max_stack_file, &max_stack_line);
+
+    PJ_LOG (3, (THIS_FILE, "Max stack usage: %u at %s:%d",
+                pj_thread_get_stack_max_usage (this_thread),
+                max_stack_file, max_stack_line));
 #endif
-	
+
     // Shutdown pjsua
     pjsua_destroy();
-    
+
     // Close connection and socket server
     aConn.Close();
     aSocketServer.Close();
-    
+
     return status;
 }
 
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/Symbian_ua_guiSettingItemListSets.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/Symbian_ua_guiSettingItemListSets.cpp
index 6d7522938b924bc781abb0d7ae49544c8af38811..d1dd12bd660796307c83eafafbbd6ff4da00ba83 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/Symbian_ua_guiSettingItemListSets.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/Symbian_ua_guiSettingItemListSets.cpp
@@ -3,16 +3,16 @@
  Name        : Symbian_ua_guiSettingItemListSettings.cpp
  Author      : nanang
  Copyright   : (c) 2008-2009 Teluu Inc.
- Description : 
+ Description :
 ========================================================================
 */
 /**
- *	Generated helper class which manages the settings contained 
+ *	Generated helper class which manages the settings contained
  *	in 'symbian_ua_guiSettingItemList'.  Each CAknSettingItem maintains
  *	a reference to data in this class so that changes in the setting
  *	item list can be synchronized with this storage.
  */
- 
+
 // [[[ begin generated region: do not modify [Generated Includes]
 #include <e32base.h>
 #include <stringloader.h>
@@ -25,120 +25,120 @@
  * C/C++ constructor for settings data, cannot throw
  */
 TSymbian_ua_guiSettingItemListSettings::TSymbian_ua_guiSettingItemListSettings()
-	{
-	}
+{
+}
 
 /**
  * Two-phase constructor for settings data
  */
 TSymbian_ua_guiSettingItemListSettings* TSymbian_ua_guiSettingItemListSettings::NewL()
-	{
-	TSymbian_ua_guiSettingItemListSettings* data = new( ELeave ) TSymbian_ua_guiSettingItemListSettings;
-	CleanupStack::PushL( data );
-	data->ConstructL();
-	CleanupStack::Pop( data );
-	return data;
-	}
-	
+{
+    TSymbian_ua_guiSettingItemListSettings* data = new (ELeave) TSymbian_ua_guiSettingItemListSettings;
+    CleanupStack::PushL (data);
+    data->ConstructL();
+    CleanupStack::Pop (data);
+    return data;
+}
+
 /**
  *	Second phase for initializing settings data
  */
 void TSymbian_ua_guiSettingItemListSettings::ConstructL()
-	{
-	// [[[ begin generated region: do not modify [Generated Initializers]
-		{
-		HBufC* text = StringLoader::LoadLC( R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_ED_REGISTRAR );
-		SetEd_registrar( text->Des() );
-		CleanupStack::PopAndDestroy( text );
-		}
-		{
-		HBufC* text = StringLoader::LoadLC( R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_ED_USER );
-		SetEd_user( text->Des() );
-		CleanupStack::PopAndDestroy( text );
-		}
-	SetB_srtp( 0 );
-	SetB_ice( 0 );
-		{
-		HBufC* text = StringLoader::LoadLC( R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_ED_STUN_SERVER );
-		SetEd_stun_server( text->Des() );
-		CleanupStack::PopAndDestroy( text );
-		}
-	// ]]] end generated region [Generated Initializers]
-	
-	}
-	
+{
+    // [[[ begin generated region: do not modify [Generated Initializers]
+    {
+        HBufC* text = StringLoader::LoadLC (R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_ED_REGISTRAR);
+        SetEd_registrar (text->Des());
+        CleanupStack::PopAndDestroy (text);
+    }
+    {
+        HBufC* text = StringLoader::LoadLC (R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_ED_USER);
+        SetEd_user (text->Des());
+        CleanupStack::PopAndDestroy (text);
+    }
+    SetB_srtp (0);
+    SetB_ice (0);
+    {
+        HBufC* text = StringLoader::LoadLC (R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_ED_STUN_SERVER);
+        SetEd_stun_server (text->Des());
+        CleanupStack::PopAndDestroy (text);
+    }
+    // ]]] end generated region [Generated Initializers]
+
+}
+
 // [[[ begin generated region: do not modify [Generated Contents]
 TDes& TSymbian_ua_guiSettingItemListSettings::Ed_registrar()
-	{
-	return iEd_registrar;
-	}
-
-void TSymbian_ua_guiSettingItemListSettings::SetEd_registrar(const TDesC& aValue)
-	{
-	if ( aValue.Length() < KEd_registrarMaxLength)
-		iEd_registrar.Copy( aValue );
-	else
-		iEd_registrar.Copy( aValue.Ptr(), KEd_registrarMaxLength);
-	}
+{
+    return iEd_registrar;
+}
+
+void TSymbian_ua_guiSettingItemListSettings::SetEd_registrar (const TDesC& aValue)
+{
+    if (aValue.Length() < KEd_registrarMaxLength)
+        iEd_registrar.Copy (aValue);
+    else
+        iEd_registrar.Copy (aValue.Ptr(), KEd_registrarMaxLength);
+}
 
 TDes& TSymbian_ua_guiSettingItemListSettings::Ed_user()
-	{
-	return iEd_user;
-	}
-
-void TSymbian_ua_guiSettingItemListSettings::SetEd_user(const TDesC& aValue)
-	{
-	if ( aValue.Length() < KEd_userMaxLength)
-		iEd_user.Copy( aValue );
-	else
-		iEd_user.Copy( aValue.Ptr(), KEd_userMaxLength);
-	}
+{
+    return iEd_user;
+}
+
+void TSymbian_ua_guiSettingItemListSettings::SetEd_user (const TDesC& aValue)
+{
+    if (aValue.Length() < KEd_userMaxLength)
+        iEd_user.Copy (aValue);
+    else
+        iEd_user.Copy (aValue.Ptr(), KEd_userMaxLength);
+}
 
 TDes& TSymbian_ua_guiSettingItemListSettings::Ed_password()
-	{
-	return iEd_password;
-	}
-
-void TSymbian_ua_guiSettingItemListSettings::SetEd_password(const TDesC& aValue)
-	{
-	if ( aValue.Length() < KEd_passwordMaxLength)
-		iEd_password.Copy( aValue );
-	else
-		iEd_password.Copy( aValue.Ptr(), KEd_passwordMaxLength);
-	}
+{
+    return iEd_password;
+}
+
+void TSymbian_ua_guiSettingItemListSettings::SetEd_password (const TDesC& aValue)
+{
+    if (aValue.Length() < KEd_passwordMaxLength)
+        iEd_password.Copy (aValue);
+    else
+        iEd_password.Copy (aValue.Ptr(), KEd_passwordMaxLength);
+}
 
 TBool& TSymbian_ua_guiSettingItemListSettings::B_srtp()
-	{
-	return iB_srtp;
-	}
+{
+    return iB_srtp;
+}
 
-void TSymbian_ua_guiSettingItemListSettings::SetB_srtp(const TBool& aValue)
-	{
-	iB_srtp = aValue;
-	}
+void TSymbian_ua_guiSettingItemListSettings::SetB_srtp (const TBool& aValue)
+{
+    iB_srtp = aValue;
+}
 
 TBool& TSymbian_ua_guiSettingItemListSettings::B_ice()
-	{
-	return iB_ice;
-	}
+{
+    return iB_ice;
+}
 
-void TSymbian_ua_guiSettingItemListSettings::SetB_ice(const TBool& aValue)
-	{
-	iB_ice = aValue;
-	}
+void TSymbian_ua_guiSettingItemListSettings::SetB_ice (const TBool& aValue)
+{
+    iB_ice = aValue;
+}
 
 TDes& TSymbian_ua_guiSettingItemListSettings::Ed_stun_server()
-	{
-	return iEd_stun_server;
-	}
-
-void TSymbian_ua_guiSettingItemListSettings::SetEd_stun_server(const TDesC& aValue)
-	{
-	if ( aValue.Length() < KEd_stun_serverMaxLength)
-		iEd_stun_server.Copy( aValue );
-	else
-		iEd_stun_server.Copy( aValue.Ptr(), KEd_stun_serverMaxLength);
-	}
+{
+    return iEd_stun_server;
+}
+
+void TSymbian_ua_guiSettingItemListSettings::SetEd_stun_server (const TDesC& aValue)
+{
+    if (aValue.Length() < KEd_stun_serverMaxLength)
+        iEd_stun_server.Copy (aValue);
+    else
+        iEd_stun_server.Copy (aValue.Ptr(), KEd_stun_serverMaxLength);
+}
 
 // ]]] end generated region [Generated Contents]
 
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua.cpp
index f722336a1b900a640f9aecab638b82c5b60f10cc..ac905ff2c4b5df4594c3116d9a49dd0b41c25638 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua.cpp
@@ -1,5 +1,5 @@
 /* $Id: ua.cpp 1793 2008-02-14 13:39:24Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <pjsua-lib/pjsua.h>
 #include <pjsua-lib/pjsua_internal.h>
@@ -38,222 +38,228 @@ static pjsua_buddy_id g_buddy_id = PJSUA_INVALID_ID;
 
 static symbian_ua_info_cb_t g_cb =  {NULL, NULL, NULL, NULL, NULL};
 
-static void log_writer(int level, const char *buf, int len)
+static void log_writer (int level, const char *buf, int len)
 {
     static wchar_t buf16[PJ_LOG_MAX_SIZE];
 
-    PJ_UNUSED_ARG(level);
-    
+    PJ_UNUSED_ARG (level);
+
     if (!g_cb.on_info)
-	return;
+        return;
 
-    pj_ansi_to_unicode(buf, len, buf16, PJ_ARRAY_SIZE(buf16));
-    g_cb.on_info(buf16);
+    pj_ansi_to_unicode (buf, len, buf16, PJ_ARRAY_SIZE (buf16));
+    g_cb.on_info (buf16);
 }
 
-static void on_reg_state(pjsua_acc_id acc_id)
+static void on_reg_state (pjsua_acc_id acc_id)
 {
     pjsua_acc_info acc_info;
     pj_status_t status;
 
-    status = pjsua_acc_get_info(acc_id, &acc_info);
+    status = pjsua_acc_get_info (acc_id, &acc_info);
+
     if (status != PJ_SUCCESS)
-	return;
+        return;
 
     if (acc_info.status == 200) {
-	if (acc_info.expires) {
-	    PJ_LOG(3,(THIS_FILE, "Registration success!"));
-	    if (g_cb.on_reg_state) g_cb.on_reg_state(true);
-	} else {
-	    PJ_LOG(3,(THIS_FILE, "Unregistration success!"));
-	    if (g_cb.on_unreg_state) g_cb.on_unreg_state(true);
-	}
+        if (acc_info.expires) {
+            PJ_LOG (3, (THIS_FILE, "Registration success!"));
+
+            if (g_cb.on_reg_state) g_cb.on_reg_state (true);
+        } else {
+            PJ_LOG (3, (THIS_FILE, "Unregistration success!"));
+
+            if (g_cb.on_unreg_state) g_cb.on_unreg_state (true);
+        }
     } else {
-	if (acc_info.expires) {
-	    PJ_LOG(3,(THIS_FILE, "Registration failed!"));
-	    if (g_cb.on_reg_state) g_cb.on_reg_state(false);
-	} else {
-	    PJ_LOG(3,(THIS_FILE, "Unregistration failed!"));
-	    if (g_cb.on_unreg_state) g_cb.on_unreg_state(false);
-	}
+        if (acc_info.expires) {
+            PJ_LOG (3, (THIS_FILE, "Registration failed!"));
+
+            if (g_cb.on_reg_state) g_cb.on_reg_state (false);
+        } else {
+            PJ_LOG (3, (THIS_FILE, "Unregistration failed!"));
+
+            if (g_cb.on_unreg_state) g_cb.on_unreg_state (false);
+        }
     }
 }
 
 /* Callback called by the library upon receiving incoming call */
-static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
-			     pjsip_rx_data *rdata)
+static void on_incoming_call (pjsua_acc_id acc_id, pjsua_call_id call_id,
+                              pjsip_rx_data *rdata)
 {
     pjsua_call_info ci;
 
-    PJ_UNUSED_ARG(acc_id);
-    PJ_UNUSED_ARG(rdata);
+    PJ_UNUSED_ARG (acc_id);
+    PJ_UNUSED_ARG (rdata);
 
     if (g_call_id != PJSUA_INVALID_ID) {
-    	pjsua_call_answer(call_id, PJSIP_SC_BUSY_HERE, NULL, NULL);
-    	return;
+        pjsua_call_answer (call_id, PJSIP_SC_BUSY_HERE, NULL, NULL);
+        return;
     }
-    
-    pjsua_call_get_info(call_id, &ci);
 
-    PJ_LOG(3,(THIS_FILE, "Incoming call from %.*s!!",
-			 (int)ci.remote_info.slen,
-			 ci.remote_info.ptr));
+    pjsua_call_get_info (call_id, &ci);
+
+    PJ_LOG (3, (THIS_FILE, "Incoming call from %.*s!!",
+                (int) ci.remote_info.slen,
+                ci.remote_info.ptr));
 
     g_call_id = call_id;
-    
+
     /* Automatically answer incoming calls with 180/Ringing */
-    pjsua_call_answer(call_id, 180, NULL, NULL);
+    pjsua_call_answer (call_id, 180, NULL, NULL);
 
     if (g_cb.on_incoming_call) {
-	static wchar_t disp[256];
-	static wchar_t uri[PJSIP_MAX_URL_SIZE];
+        static wchar_t disp[256];
+        static wchar_t uri[PJSIP_MAX_URL_SIZE];
 
-	pj_ansi_to_unicode(ci.remote_info.ptr, ci.remote_info.slen, 
-	    disp, PJ_ARRAY_SIZE(disp));
-	pj_ansi_to_unicode(ci.remote_contact.ptr, ci.remote_contact.slen, 
-	    uri, PJ_ARRAY_SIZE(uri));
+        pj_ansi_to_unicode (ci.remote_info.ptr, ci.remote_info.slen,
+                            disp, PJ_ARRAY_SIZE (disp));
+        pj_ansi_to_unicode (ci.remote_contact.ptr, ci.remote_contact.slen,
+                            uri, PJ_ARRAY_SIZE (uri));
 
-	g_cb.on_incoming_call(disp, uri);
+        g_cb.on_incoming_call (disp, uri);
     }
 }
 
 /* Callback called by the library when call's state has changed */
-static void on_call_state(pjsua_call_id call_id, pjsip_event *e)
+static void on_call_state (pjsua_call_id call_id, pjsip_event *e)
 {
     pjsua_call_info ci;
 
-    PJ_UNUSED_ARG(e);
+    PJ_UNUSED_ARG (e);
+
+    pjsua_call_get_info (call_id, &ci);
 
-    pjsua_call_get_info(call_id, &ci);
-    
     if (ci.state == PJSIP_INV_STATE_DISCONNECTED) {
-    	if (call_id == g_call_id)
-    	    g_call_id = PJSUA_INVALID_ID;
-	if (g_cb.on_call_end) {
-	    static wchar_t reason[256];
-	    pj_ansi_to_unicode(ci.last_status_text.ptr, ci.last_status_text.slen, 
-		    reason, PJ_ARRAY_SIZE(reason));
-	    g_cb.on_call_end(reason);
-	}
+        if (call_id == g_call_id)
+            g_call_id = PJSUA_INVALID_ID;
+
+        if (g_cb.on_call_end) {
+            static wchar_t reason[256];
+            pj_ansi_to_unicode (ci.last_status_text.ptr, ci.last_status_text.slen,
+                                reason, PJ_ARRAY_SIZE (reason));
+            g_cb.on_call_end (reason);
+        }
 
     } else if (ci.state != PJSIP_INV_STATE_INCOMING) {
-    	if (g_call_id == PJSUA_INVALID_ID)
-    	    g_call_id = call_id;
+        if (g_call_id == PJSUA_INVALID_ID)
+            g_call_id = call_id;
     }
-    
-    PJ_LOG(3,(THIS_FILE, "Call %d state=%.*s", call_id,
-			 (int)ci.state_text.slen,
-			 ci.state_text.ptr));
+
+    PJ_LOG (3, (THIS_FILE, "Call %d state=%.*s", call_id,
+                (int) ci.state_text.slen,
+                ci.state_text.ptr));
 }
 
 /* Callback called by the library when call's media state has changed */
-static void on_call_media_state(pjsua_call_id call_id)
+static void on_call_media_state (pjsua_call_id call_id)
 {
     pjsua_call_info ci;
 
-    pjsua_call_get_info(call_id, &ci);
+    pjsua_call_get_info (call_id, &ci);
 
     if (ci.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
-	// When media is active, connect call to sound device.
-	pjsua_conf_connect(ci.conf_slot, 0);
-	pjsua_conf_connect(0, ci.conf_slot);
+        // When media is active, connect call to sound device.
+        pjsua_conf_connect (ci.conf_slot, 0);
+        pjsua_conf_connect (0, ci.conf_slot);
     }
 }
 
 
 /* Handler on buddy state changed. */
-static void on_buddy_state(pjsua_buddy_id buddy_id)
+static void on_buddy_state (pjsua_buddy_id buddy_id)
 {
     pjsua_buddy_info info;
-    pjsua_buddy_get_info(buddy_id, &info);
+    pjsua_buddy_get_info (buddy_id, &info);
 
-    PJ_LOG(3,(THIS_FILE, "%.*s status is %.*s",
-	      (int)info.uri.slen,
-	      info.uri.ptr,
-	      (int)info.status_text.slen,
-	      info.status_text.ptr));
+    PJ_LOG (3, (THIS_FILE, "%.*s status is %.*s",
+                (int) info.uri.slen,
+                info.uri.ptr,
+                (int) info.status_text.slen,
+                info.status_text.ptr));
 }
 
 
 /* Incoming IM message (i.e. MESSAGE request)!  */
-static void on_pager(pjsua_call_id call_id, const pj_str_t *from, 
-		     const pj_str_t *to, const pj_str_t *contact,
-		     const pj_str_t *mime_type, const pj_str_t *text)
+static void on_pager (pjsua_call_id call_id, const pj_str_t *from,
+                      const pj_str_t *to, const pj_str_t *contact,
+                      const pj_str_t *mime_type, const pj_str_t *text)
 {
     /* Note: call index may be -1 */
-    PJ_UNUSED_ARG(call_id);
-    PJ_UNUSED_ARG(to);
-    PJ_UNUSED_ARG(contact);
-    PJ_UNUSED_ARG(mime_type);
-
-    PJ_LOG(3,(THIS_FILE,"MESSAGE from %.*s: %.*s",
-	      (int)from->slen, from->ptr,
-	      (int)text->slen, text->ptr));
+    PJ_UNUSED_ARG (call_id);
+    PJ_UNUSED_ARG (to);
+    PJ_UNUSED_ARG (contact);
+    PJ_UNUSED_ARG (mime_type);
+
+    PJ_LOG (3, (THIS_FILE,"MESSAGE from %.*s: %.*s",
+                (int) from->slen, from->ptr,
+                (int) text->slen, text->ptr));
 }
 
 
 /* Received typing indication  */
-static void on_typing(pjsua_call_id call_id, const pj_str_t *from,
-		      const pj_str_t *to, const pj_str_t *contact,
-		      pj_bool_t is_typing)
+static void on_typing (pjsua_call_id call_id, const pj_str_t *from,
+                       const pj_str_t *to, const pj_str_t *contact,
+                       pj_bool_t is_typing)
 {
-    PJ_UNUSED_ARG(call_id);
-    PJ_UNUSED_ARG(to);
-    PJ_UNUSED_ARG(contact);
+    PJ_UNUSED_ARG (call_id);
+    PJ_UNUSED_ARG (to);
+    PJ_UNUSED_ARG (contact);
 
-    PJ_LOG(3,(THIS_FILE, "IM indication: %.*s %s",
-	      (int)from->slen, from->ptr,
-	      (is_typing?"is typing..":"has stopped typing")));
+    PJ_LOG (3, (THIS_FILE, "IM indication: %.*s %s",
+                (int) from->slen, from->ptr,
+                (is_typing?"is typing..":"has stopped typing")));
 }
 
 
 /* Call transfer request status. */
-static void on_call_transfer_status(pjsua_call_id call_id,
-				    int status_code,
-				    const pj_str_t *status_text,
-				    pj_bool_t final,
-				    pj_bool_t *p_cont)
+static void on_call_transfer_status (pjsua_call_id call_id,
+                                     int status_code,
+                                     const pj_str_t *status_text,
+                                     pj_bool_t final,
+                                     pj_bool_t *p_cont)
 {
-    PJ_LOG(3,(THIS_FILE, "Call %d: transfer status=%d (%.*s) %s",
-	      call_id, status_code,
-	      (int)status_text->slen, status_text->ptr,
-	      (final ? "[final]" : "")));
+    PJ_LOG (3, (THIS_FILE, "Call %d: transfer status=%d (%.*s) %s",
+                call_id, status_code,
+                (int) status_text->slen, status_text->ptr,
+                (final ? "[final]" : "")));
 
     if (status_code/100 == 2) {
-	PJ_LOG(3,(THIS_FILE, 
-	          "Call %d: call transfered successfully, disconnecting call",
-		  call_id));
-	pjsua_call_hangup(call_id, PJSIP_SC_GONE, NULL, NULL);
-	*p_cont = PJ_FALSE;
+        PJ_LOG (3, (THIS_FILE,
+                    "Call %d: call transfered successfully, disconnecting call",
+                    call_id));
+        pjsua_call_hangup (call_id, PJSIP_SC_GONE, NULL, NULL);
+        *p_cont = PJ_FALSE;
     }
 }
 
 
 /* NAT detection result */
-static void on_nat_detect(const pj_stun_nat_detect_result *res) 
+static void on_nat_detect (const pj_stun_nat_detect_result *res)
 {
     if (res->status != PJ_SUCCESS) {
-	pjsua_perror(THIS_FILE, "NAT detection failed", res->status);
+        pjsua_perror (THIS_FILE, "NAT detection failed", res->status);
     } else {
-	PJ_LOG(3, (THIS_FILE, "NAT detected as %s", res->nat_type_name));
-    }    
+        PJ_LOG (3, (THIS_FILE, "NAT detected as %s", res->nat_type_name));
+    }
 }
 
 /* Notification that call is being replaced. */
-static void on_call_replaced(pjsua_call_id old_call_id,
-			     pjsua_call_id new_call_id)
+static void on_call_replaced (pjsua_call_id old_call_id,
+                              pjsua_call_id new_call_id)
 {
     pjsua_call_info old_ci, new_ci;
 
-    pjsua_call_get_info(old_call_id, &old_ci);
-    pjsua_call_get_info(new_call_id, &new_ci);
+    pjsua_call_get_info (old_call_id, &old_ci);
+    pjsua_call_get_info (new_call_id, &new_ci);
 
-    PJ_LOG(3,(THIS_FILE, "Call %d with %.*s is being replaced by "
-			 "call %d with %.*s",
-			 old_call_id, 
-			 (int)old_ci.remote_info.slen, old_ci.remote_info.ptr,
-			 new_call_id,
-			 (int)new_ci.remote_info.slen, new_ci.remote_info.ptr));
+    PJ_LOG (3, (THIS_FILE, "Call %d with %.*s is being replaced by "
+                "call %d with %.*s",
+                old_call_id,
+                (int) old_ci.remote_info.slen, old_ci.remote_info.ptr,
+                new_call_id,
+                (int) new_ci.remote_info.slen, new_ci.remote_info.ptr));
 }
 
 int symbian_ua_init()
@@ -261,47 +267,48 @@ int symbian_ua_init()
     TInt err;
     pj_symbianos_params sym_params;
     pj_status_t status;
-    
+
     // Initialize RSocketServ
-    if ((err=aSocketServer.Connect()) != KErrNone)
-    	return PJ_STATUS_FROM_OS(err);
-    
+    if ( (err=aSocketServer.Connect()) != KErrNone)
+        return PJ_STATUS_FROM_OS (err);
+
     // Open up a connection
-    if ((err=aConn.Open(aSocketServer)) != KErrNone) {
-	    aSocketServer.Close();
-		return PJ_STATUS_FROM_OS(err);
+    if ( (err=aConn.Open (aSocketServer)) != KErrNone) {
+        aSocketServer.Close();
+        return PJ_STATUS_FROM_OS (err);
     }
-    
-    if ((err=aConn.Start()) != KErrNone) {
-	aConn.Close();
-    	aSocketServer.Close();
-    	return PJ_STATUS_FROM_OS(err);
+
+    if ( (err=aConn.Start()) != KErrNone) {
+        aConn.Close();
+        aSocketServer.Close();
+        return PJ_STATUS_FROM_OS (err);
     }
-    
+
     // Set Symbian OS parameters in pjlib.
     // This must be done before pj_init() is called.
-    pj_bzero(&sym_params, sizeof(sym_params));
+    pj_bzero (&sym_params, sizeof (sym_params));
     sym_params.rsocketserv = &aSocketServer;
     sym_params.rconnection = &aConn;
-    pj_symbianos_set_params(&sym_params);
+    pj_symbianos_set_params (&sym_params);
 
     /* Redirect log before pjsua_init() */
-    pj_log_set_log_func(&log_writer);
-    
+    pj_log_set_log_func (&log_writer);
+
     /* Set log level */
-    pj_log_set_level(LOG_LEVEL);
+    pj_log_set_level (LOG_LEVEL);
 
     /* Create pjsua first! */
     status = pjsua_create();
+
     if (status != PJ_SUCCESS) {
-    	pjsua_perror(THIS_FILE, "pjsua_create() error", status);
-    	return status;
+        pjsua_perror (THIS_FILE, "pjsua_create() error", status);
+        return status;
     }
 
     /* Init pjsua */
     pjsua_config cfg;
 
-    pjsua_config_default(&cfg);
+    pjsua_config_default (&cfg);
     cfg.max_calls = 2;
     cfg.thread_cnt = 0; // Disable threading on Symbian
     cfg.use_srtp = USE_SRTP;
@@ -320,7 +327,7 @@ int symbian_ua_init()
 
     pjsua_media_config med_cfg;
 
-    pjsua_media_config_default(&med_cfg);
+    pjsua_media_config_default (&med_cfg);
     med_cfg.thread_cnt = 0; // Disable threading on Symbian
     med_cfg.has_ioqueue = PJ_FALSE;
     med_cfg.clock_rate = 8000;
@@ -335,58 +342,61 @@ int symbian_ua_init()
 
     pjsua_logging_config log_cfg;
 
-    pjsua_logging_config_default(&log_cfg);
+    pjsua_logging_config_default (&log_cfg);
     log_cfg.console_level = LOG_LEVEL;
     log_cfg.cb = &log_writer;
     log_cfg.decor = 0;
 
-    status = pjsua_init(&cfg, &log_cfg, &med_cfg);
+    status = pjsua_init (&cfg, &log_cfg, &med_cfg);
+
     if (status != PJ_SUCCESS) {
-	    pjsua_perror(THIS_FILE, "pjsua_init() error", status);
-	    pjsua_destroy();
-	    return status;
+        pjsua_perror (THIS_FILE, "pjsua_init() error", status);
+        pjsua_destroy();
+        return status;
     }
 
     /* Add UDP transport. */
     pjsua_transport_config tcfg;
     pjsua_transport_id tid;
 
-    pjsua_transport_config_default(&tcfg);
+    pjsua_transport_config_default (&tcfg);
     tcfg.port = SIP_PORT;
-    status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &tcfg, &tid);
+    status = pjsua_transport_create (PJSIP_TRANSPORT_UDP, &tcfg, &tid);
+
     if (status != PJ_SUCCESS) {
-	    pjsua_perror(THIS_FILE, "Error creating transport", status);
-	    pjsua_destroy();
-	    return status;
+        pjsua_perror (THIS_FILE, "Error creating transport", status);
+        pjsua_destroy();
+        return status;
     }
 
     /* Add account for the transport */
-    pjsua_acc_add_local(tid, PJ_TRUE, &g_acc_id);
+    pjsua_acc_add_local (tid, PJ_TRUE, &g_acc_id);
 
     /* Initialization is done, now start pjsua */
     status = pjsua_start();
+
     if (status != PJ_SUCCESS) {
-    	pjsua_perror(THIS_FILE, "Error starting pjsua", status);
-    	pjsua_destroy();
-    	return status;
+        pjsua_perror (THIS_FILE, "Error starting pjsua", status);
+        pjsua_destroy();
+        return status;
     }
 
     /* Adjust Speex priority and enable only the narrowband */
     {
-        pj_str_t codec_id = pj_str("speex/8000");
-        pjmedia_codec_mgr_set_codec_priority( 
-        	pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt),
-        	&codec_id, PJMEDIA_CODEC_PRIO_NORMAL+1);
-
-        codec_id = pj_str("speex/16000");
-        pjmedia_codec_mgr_set_codec_priority( 
-        	pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt),
-        	&codec_id, PJMEDIA_CODEC_PRIO_DISABLED);
-
-        codec_id = pj_str("speex/32000");
-        pjmedia_codec_mgr_set_codec_priority( 
-        	pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt),
-        	&codec_id, PJMEDIA_CODEC_PRIO_DISABLED);
+        pj_str_t codec_id = pj_str ("speex/8000");
+        pjmedia_codec_mgr_set_codec_priority (
+            pjmedia_endpt_get_codec_mgr (pjsua_var.med_endpt),
+            &codec_id, PJMEDIA_CODEC_PRIO_NORMAL+1);
+
+        codec_id = pj_str ("speex/16000");
+        pjmedia_codec_mgr_set_codec_priority (
+            pjmedia_endpt_get_codec_mgr (pjsua_var.med_endpt),
+            &codec_id, PJMEDIA_CODEC_PRIO_DISABLED);
+
+        codec_id = pj_str ("speex/32000");
+        pjmedia_codec_mgr_set_codec_priority (
+            pjmedia_endpt_get_codec_mgr (pjsua_var.med_endpt),
+            &codec_id, PJMEDIA_CODEC_PRIO_DISABLED);
     }
 
     return PJ_SUCCESS;
@@ -397,97 +407,102 @@ int symbian_ua_destroy()
 {
     // Shutdown pjsua
     pjsua_destroy();
-    
+
     // Close connection and socket server
     aConn.Close();
     aSocketServer.Close();
-    
+
     CloseSTDLIB();
 
     return PJ_SUCCESS;
 }
 
-void symbian_ua_set_info_callback(const symbian_ua_info_cb_t *cb)
+void symbian_ua_set_info_callback (const symbian_ua_info_cb_t *cb)
 {
     if (cb)
-	g_cb = *cb;
+        g_cb = *cb;
     else
-	pj_bzero(&g_cb, sizeof(g_cb));
+        pj_bzero (&g_cb, sizeof (g_cb));
 }
 
-int symbian_ua_set_account(const char *domain, const char *username, 
-			   const char *password,
-			   bool use_srtp, bool use_ice)
+int symbian_ua_set_account (const char *domain, const char *username,
+                            const char *password,
+                            bool use_srtp, bool use_ice)
 {
     pj_status_t status;
 
-    PJ_ASSERT_RETURN(username && password && domain, PJ_EINVAL);
-    PJ_UNUSED_ARG(use_srtp);
-    PJ_UNUSED_ARG(use_ice);
+    PJ_ASSERT_RETURN (username && password && domain, PJ_EINVAL);
+    PJ_UNUSED_ARG (use_srtp);
+    PJ_UNUSED_ARG (use_ice);
 
     if (domain[0] == 0) {
-	    pjsua_acc_info acc_info;
-	    pj_status_t status;
-
-	    status = pjsua_acc_get_info(g_acc_id, &acc_info);
-	    if (status != PJ_SUCCESS)
-		return status;
-
-	    if (acc_info.status == 200) {
-			PJ_LOG(3,(THIS_FILE, "Unregistering.."));
-			pjsua_acc_set_registration(g_acc_id, PJ_FALSE);
-			g_acc_id = 0;
-	    }
-	    return PJ_SUCCESS;
+        pjsua_acc_info acc_info;
+        pj_status_t status;
+
+        status = pjsua_acc_get_info (g_acc_id, &acc_info);
+
+        if (status != PJ_SUCCESS)
+            return status;
+
+        if (acc_info.status == 200) {
+            PJ_LOG (3, (THIS_FILE, "Unregistering.."));
+            pjsua_acc_set_registration (g_acc_id, PJ_FALSE);
+            g_acc_id = 0;
+        }
+
+        return PJ_SUCCESS;
     }
 
     if (pjsua_acc_get_count() > 1) {
-	status = pjsua_acc_del(g_acc_id);
-	if (status != PJ_SUCCESS) {
-	    pjsua_perror(THIS_FILE, "Error removing account", status);
-	    return status;
-	}
-	g_acc_id = 0;
+        status = pjsua_acc_del (g_acc_id);
+
+        if (status != PJ_SUCCESS) {
+            pjsua_perror (THIS_FILE, "Error removing account", status);
+            return status;
+        }
+
+        g_acc_id = 0;
     }
 
     pjsua_acc_config cfg;
     char tmp_id[PJSIP_MAX_URL_SIZE];
     char tmp_reg_uri[PJSIP_MAX_URL_SIZE];
 
-    if (!pj_ansi_strnicmp(domain, "sip:", 4)) {
-	domain += 4;
+    if (!pj_ansi_strnicmp (domain, "sip:", 4)) {
+        domain += 4;
     }
 
-    pjsua_acc_config_default(&cfg);
-    pj_ansi_sprintf(tmp_id, "sip:%s@%s", username, domain);
-    cfg.id = pj_str(tmp_id);
-    pj_ansi_sprintf(tmp_reg_uri, "sip:%s", domain);
-    cfg.reg_uri = pj_str(tmp_reg_uri);
+    pjsua_acc_config_default (&cfg);
+    pj_ansi_sprintf (tmp_id, "sip:%s@%s", username, domain);
+    cfg.id = pj_str (tmp_id);
+    pj_ansi_sprintf (tmp_reg_uri, "sip:%s", domain);
+    cfg.reg_uri = pj_str (tmp_reg_uri);
     cfg.cred_count = 1;
-    cfg.cred_info[0].realm = pj_str("*");
-    cfg.cred_info[0].scheme = pj_str("digest");
-    cfg.cred_info[0].username = pj_str((char*)username);
+    cfg.cred_info[0].realm = pj_str ("*");
+    cfg.cred_info[0].scheme = pj_str ("digest");
+    cfg.cred_info[0].username = pj_str ( (char*) username);
     cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
-    cfg.cred_info[0].data = pj_str((char*)password);
+    cfg.cred_info[0].data = pj_str ( (char*) password);
+
+    status = pjsua_acc_add (&cfg, PJ_TRUE, &g_acc_id);
 
-    status = pjsua_acc_add(&cfg, PJ_TRUE, &g_acc_id);
     if (status != PJ_SUCCESS) {
-	    pjsua_perror(THIS_FILE, "Error setting account", status);
-	    pjsua_destroy();
-	    return status;
+        pjsua_perror (THIS_FILE, "Error setting account", status);
+        pjsua_destroy();
+        return status;
     }
 
     return PJ_SUCCESS;
 }
 
-int symbian_ua_makecall(const char* dest_url)
+int symbian_ua_makecall (const char* dest_url)
 {
-    if (pjsua_verify_sip_url(dest_url) == PJ_SUCCESS) {
-	    pj_str_t dst = pj_str((char*)dest_url);
-	    pjsua_call_make_call(g_acc_id, &dst, 0, NULL,
-				 NULL, &g_call_id);
+    if (pjsua_verify_sip_url (dest_url) == PJ_SUCCESS) {
+        pj_str_t dst = pj_str ( (char*) dest_url);
+        pjsua_call_make_call (g_acc_id, &dst, 0, NULL,
+                              NULL, &g_call_id);
 
-	    return PJ_SUCCESS;
+        return PJ_SUCCESS;
     }
 
     return PJ_EINVAL;
@@ -502,13 +517,13 @@ int symbian_ua_endcall()
 
 bool symbian_ua_anycall()
 {
-    return (pjsua_call_get_count()>0);
+    return (pjsua_call_get_count() >0);
 }
 
 int symbian_ua_answercall()
 {
     PJ_ASSERT_RETURN (g_call_id != PJSUA_INVALID_ID, PJ_EINVAL);
 
-    return pjsua_call_answer(g_call_id, 200, NULL, NULL);
+    return pjsua_call_answer (g_call_id, 200, NULL, NULL);
 }
 
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiAppUi.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiAppUi.cpp
index ac399510b2bb98b03fe0b34dbf21a021b4be41ec..af9e5f0573cac51108b9e7c337e1cf1059445fe4 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiAppUi.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiAppUi.cpp
@@ -3,7 +3,7 @@
  Name        : symbian_ua_guiAppUi.cpp
  Author      : nanang
  Copyright   : (c) 2008-2009 Teluu Inc.
- Description : 
+ Description :
 ========================================================================
 */
 // [[[ begin generated region: do not modify [Generated System Includes]
@@ -29,167 +29,166 @@
 
 /**
  * Construct the Csymbian_ua_guiAppUi instance
- */ 
-Csymbian_ua_guiAppUi::Csymbian_ua_guiAppUi() : CTimer(0)
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
+ */
+Csymbian_ua_guiAppUi::Csymbian_ua_guiAppUi() : CTimer (0)
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
 
-	}
+}
 
-/** 
+/**
  * The appui's destructor removes the container from the control
  * stack and destroys it.
  */
 Csymbian_ua_guiAppUi::~Csymbian_ua_guiAppUi()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	TRAPD( err_Dlg_wait_init, RemoveDlg_wait_initL() );
-	// ]]] end generated region [Generated Contents]
-	}
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    TRAPD (err_Dlg_wait_init, RemoveDlg_wait_initL());
+    // ]]] end generated region [Generated Contents]
+}
 
 // [[[ begin generated function: do not modify
 void Csymbian_ua_guiAppUi::InitializeContainersL()
-	{
-	iSymbian_ua_guiContainerView = Csymbian_ua_guiContainerView::NewL();
-	AddViewL( iSymbian_ua_guiContainerView );
-	iSymbian_ua_guiSettingItemListView = Csymbian_ua_guiSettingItemListView::NewL();
-	AddViewL( iSymbian_ua_guiSettingItemListView );
-	SetDefaultViewL( *iSymbian_ua_guiSettingItemListView );
-	}
+{
+    iSymbian_ua_guiContainerView = Csymbian_ua_guiContainerView::NewL();
+    AddViewL (iSymbian_ua_guiContainerView);
+    iSymbian_ua_guiSettingItemListView = Csymbian_ua_guiSettingItemListView::NewL();
+    AddViewL (iSymbian_ua_guiSettingItemListView);
+    SetDefaultViewL (*iSymbian_ua_guiSettingItemListView);
+}
 // ]]] end generated function
 
 /**
  * Handle a command for this appui (override)
  * @param aCommand command id to be handled
  */
-void Csymbian_ua_guiAppUi::HandleCommandL( TInt aCommand )
-	{
-	// [[[ begin generated region: do not modify [Generated Code]
-	TBool commandHandled = EFalse;
-	switch ( aCommand )
-		{ // code to dispatch to the AppUi's menu and CBA commands is generated here
-		default:
-			break;
-		}
-	
-		
-	if ( !commandHandled ) 
-		{
-		if ( aCommand == EAknSoftkeyExit || aCommand == EEikCmdExit )
-			{
-		    	symbian_ua_destroy();
-			Exit();
-			}
-		}
-	// ]]] end generated region [Generated Code]
-	
-	}
-
-/** 
+void Csymbian_ua_guiAppUi::HandleCommandL (TInt aCommand)
+{
+    // [[[ begin generated region: do not modify [Generated Code]
+    TBool commandHandled = EFalse;
+
+    switch (aCommand) { // code to dispatch to the AppUi's menu and CBA commands is generated here
+        default:
+            break;
+    }
+
+
+    if (!commandHandled) {
+        if (aCommand == EAknSoftkeyExit || aCommand == EEikCmdExit) {
+            symbian_ua_destroy();
+            Exit();
+        }
+    }
+
+    // ]]] end generated region [Generated Code]
+
+}
+
+/**
  * Override of the HandleResourceChangeL virtual function
  */
-void Csymbian_ua_guiAppUi::HandleResourceChangeL( TInt aType )
-	{
-	CAknViewAppUi::HandleResourceChangeL( aType );
-	// [[[ begin generated region: do not modify [Generated Code]
-	// ]]] end generated region [Generated Code]
-	
-	}
-				
-/** 
+void Csymbian_ua_guiAppUi::HandleResourceChangeL (TInt aType)
+{
+    CAknViewAppUi::HandleResourceChangeL (aType);
+    // [[[ begin generated region: do not modify [Generated Code]
+    // ]]] end generated region [Generated Code]
+
+}
+
+/**
  * Override of the HandleKeyEventL virtual function
  * @return EKeyWasConsumed if event was handled, EKeyWasNotConsumed if not
- * @param aKeyEvent 
- * @param aType 
+ * @param aKeyEvent
+ * @param aType
  */
-TKeyResponse Csymbian_ua_guiAppUi::HandleKeyEventL(
-		const TKeyEvent& aKeyEvent,
-		TEventCode aType )
-	{
-	// The inherited HandleKeyEventL is private and cannot be called
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
-	
-	return EKeyWasNotConsumed;
-	}
-
-/** 
+TKeyResponse Csymbian_ua_guiAppUi::HandleKeyEventL (
+    const TKeyEvent& aKeyEvent,
+    TEventCode aType)
+{
+    // The inherited HandleKeyEventL is private and cannot be called
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
+
+    return EKeyWasNotConsumed;
+}
+
+/**
  * Override of the HandleViewDeactivation virtual function
  *
- * @param aViewIdToBeDeactivated 
- * @param aNewlyActivatedViewId 
+ * @param aViewIdToBeDeactivated
+ * @param aNewlyActivatedViewId
  */
-void Csymbian_ua_guiAppUi::HandleViewDeactivation( 
-		const TVwsViewId& aViewIdToBeDeactivated, 
-		const TVwsViewId& aNewlyActivatedViewId )
-	{
-	CAknViewAppUi::HandleViewDeactivation( 
-			aViewIdToBeDeactivated, 
-			aNewlyActivatedViewId );
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
-	
-	}
+void Csymbian_ua_guiAppUi::HandleViewDeactivation (
+    const TVwsViewId& aViewIdToBeDeactivated,
+    const TVwsViewId& aNewlyActivatedViewId)
+{
+    CAknViewAppUi::HandleViewDeactivation (
+        aViewIdToBeDeactivated,
+        aNewlyActivatedViewId);
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
+
+}
 
 /**
- * @brief Completes the second phase of Symbian object construction. 
- * Put initialization code that could leave here. 
- */ 
+ * @brief Completes the second phase of Symbian object construction.
+ * Put initialization code that could leave here.
+ */
 void Csymbian_ua_guiAppUi::ConstructL()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	BaseConstructL( EAknEnableSkin );
-	InitializeContainersL();
-	// ]]] end generated region [Generated Contents]
-
-	// Create private folder
-	RProcess process;
-	TFileName path;
-	
-	path.Copy( process.FileName().Left(2) );
-	
-	if(path.Compare(_L("c")) || path.Compare(_L("C")))
-		CEikonEnv::Static()->FsSession().CreatePrivatePath(EDriveC);
-	else if(path.Compare(_L("e")) || path.Compare(_L("E")))
-		CEikonEnv::Static()->FsSession().CreatePrivatePath(EDriveE);	
-	
-	// Init PJSUA
-	if (symbian_ua_init() != 0) {
-	    symbian_ua_destroy();
-	    Exit();
-	}
-	
-	ExecuteDlg_wait_initLD();
-
-	CTimer::ConstructL();
-	CActiveScheduler::Add( this );
-	After(4000000);
-	}
-
-/** 
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    BaseConstructL (EAknEnableSkin);
+    InitializeContainersL();
+    // ]]] end generated region [Generated Contents]
+
+    // Create private folder
+    RProcess process;
+    TFileName path;
+
+    path.Copy (process.FileName().Left (2));
+
+    if (path.Compare (_L ("c")) || path.Compare (_L ("C")))
+        CEikonEnv::Static()->FsSession().CreatePrivatePath (EDriveC);
+    else if (path.Compare (_L ("e")) || path.Compare (_L ("E")))
+        CEikonEnv::Static()->FsSession().CreatePrivatePath (EDriveE);
+
+    // Init PJSUA
+    if (symbian_ua_init() != 0) {
+        symbian_ua_destroy();
+        Exit();
+    }
+
+    ExecuteDlg_wait_initLD();
+
+    CTimer::ConstructL();
+    CActiveScheduler::Add (this);
+    After (4000000);
+}
+
+/**
  * Override of the HandleApplicationSpecificEventL virtual function
  */
-void Csymbian_ua_guiAppUi::HandleApplicationSpecificEventL( 
-		TInt aType, 
-		const TWsEvent& anEvent )
-	{
-	CAknViewAppUi::HandleApplicationSpecificEventL( aType, anEvent );
-	// [[[ begin generated region: do not modify [Generated Code]
-	// ]]] end generated region [Generated Code]
-	
-	}
-				
-/** 
+void Csymbian_ua_guiAppUi::HandleApplicationSpecificEventL (
+    TInt aType,
+    const TWsEvent& anEvent)
+{
+    CAknViewAppUi::HandleApplicationSpecificEventL (aType, anEvent);
+    // [[[ begin generated region: do not modify [Generated Code]
+    // ]]] end generated region [Generated Code]
+
+}
+
+/**
  * Handle the applicationSpecificEvent event.
  */
-void Csymbian_ua_guiAppUi::HandleSymbian_ua_guiAppUiApplicationSpecificEventL( 
-		TInt /* aType */, 
-		const TWsEvent& /* anEvent */ )
-	{
-	// TODO: implement applicationSpecificEvent event handler
-	}
-				
+void Csymbian_ua_guiAppUi::HandleSymbian_ua_guiAppUiApplicationSpecificEventL (
+    TInt /* aType */,
+    const TWsEvent& /* anEvent */)
+{
+    // TODO: implement applicationSpecificEvent event handler
+}
+
 // [[[ begin generated function: do not modify
 /**
  * Execute the wait dialog for dlg_wait_init. This routine returns
@@ -198,19 +197,20 @@ void Csymbian_ua_guiAppUi::HandleSymbian_ua_guiAppUiApplicationSpecificEventL(
  * @param aOverrideText optional override text. When null the text configured
  * in the UI Designer is used.
  */
-void Csymbian_ua_guiAppUi::ExecuteDlg_wait_initLD( const TDesC* aOverrideText )
-	{
-	iDlg_wait_init = new ( ELeave ) CAknWaitDialog( 
-			reinterpret_cast< CEikDialog** >( &iDlg_wait_init ), EFalse );
-	if ( aOverrideText != NULL )
-		{
-		iDlg_wait_init->SetTextL( *aOverrideText );
-		}
-	iDlg_wait_init->ExecuteLD( R_APPLICATION_DLG_WAIT_INIT );
-	iDlg_wait_initCallback = new ( ELeave ) CProgressDialogCallback( 
-		this, iDlg_wait_init, &Csymbian_ua_guiAppUi::HandleDlg_wait_initCanceledL );
-	iDlg_wait_init->SetCallback( iDlg_wait_initCallback );
-	}
+void Csymbian_ua_guiAppUi::ExecuteDlg_wait_initLD (const TDesC* aOverrideText)
+{
+    iDlg_wait_init = new (ELeave) CAknWaitDialog (
+        reinterpret_cast< CEikDialog** > (&iDlg_wait_init), EFalse);
+
+    if (aOverrideText != NULL) {
+        iDlg_wait_init->SetTextL (*aOverrideText);
+    }
+
+    iDlg_wait_init->ExecuteLD (R_APPLICATION_DLG_WAIT_INIT);
+    iDlg_wait_initCallback = new (ELeave) CProgressDialogCallback (
+        this, iDlg_wait_init, &Csymbian_ua_guiAppUi::HandleDlg_wait_initCanceledL);
+    iDlg_wait_init->SetCallback (iDlg_wait_initCallback);
+}
 // ]]] end generated function
 
 // [[[ begin generated function: do not modify
@@ -218,30 +218,30 @@ void Csymbian_ua_guiAppUi::ExecuteDlg_wait_initLD( const TDesC* aOverrideText )
  * Close and dispose of the wait dialog for dlg_wait_init
  */
 void Csymbian_ua_guiAppUi::RemoveDlg_wait_initL()
-	{
-	if ( iDlg_wait_init != NULL )
-		{
-		iDlg_wait_init->SetCallback( NULL );
-		iDlg_wait_init->ProcessFinishedL();    // deletes the dialog
-		iDlg_wait_init = NULL;
-		}
-	delete iDlg_wait_initCallback;
-	iDlg_wait_initCallback = NULL;
-	
-	}
+{
+    if (iDlg_wait_init != NULL) {
+        iDlg_wait_init->SetCallback (NULL);
+        iDlg_wait_init->ProcessFinishedL();    // deletes the dialog
+        iDlg_wait_init = NULL;
+    }
+
+    delete iDlg_wait_initCallback;
+    iDlg_wait_initCallback = NULL;
+
+}
 // ]]] end generated function
 
-/** 
+/**
  * Handle the canceled event.
  */
-void Csymbian_ua_guiAppUi::HandleDlg_wait_initCanceledL( CAknProgressDialog* /* aDialog */ )
-	{
-	// TODO: implement canceled event handler
-	
-	}
-				
+void Csymbian_ua_guiAppUi::HandleDlg_wait_initCanceledL (CAknProgressDialog* /* aDialog */)
+{
+    // TODO: implement canceled event handler
+
+}
+
 void Csymbian_ua_guiAppUi::RunL()
-	{
-	RemoveDlg_wait_initL();
-	iSymbian_ua_guiSettingItemListView->HandleCommandL(EAknSoftkeySave);
-	}
+{
+    RemoveDlg_wait_initL();
+    iSymbian_ua_guiSettingItemListView->HandleCommandL (EAknSoftkeySave);
+}
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiApplication.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiApplication.cpp
index dc60fecd64d1cab99afdbb61aa15b9f49921935b..d32c672d6c7e08becc4bab7c0a2fe005a0d5948a 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiApplication.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiApplication.cpp
@@ -3,7 +3,7 @@
  Name        : symbian_ua_guiApplication.cpp
  Author      : nanang
  Copyright   : (c) 2008-2009 Teluu Inc.
- Description : 
+ Description :
 ========================================================================
 */
 // [[[ begin generated region: do not modify [Generated System Includes]
@@ -19,50 +19,50 @@
 
 
 // Needed by APS
-TPtrC APP_UID = _L("EBD12EE4");
+TPtrC APP_UID = _L ("EBD12EE4");
 
 /**
  * @brief Returns the application's UID (override from CApaApplication::AppDllUid())
  * @return UID for this application (KUidsymbian_ua_guiApplication)
  */
 TUid Csymbian_ua_guiApplication::AppDllUid() const
-	{
-	return KUidsymbian_ua_guiApplication;
-	}
+{
+    return KUidsymbian_ua_guiApplication;
+}
 
 /**
  * @brief Creates the application's document (override from CApaApplication::CreateDocumentL())
  * @return Pointer to the created document object (Csymbian_ua_guiDocument)
  */
 CApaDocument* Csymbian_ua_guiApplication::CreateDocumentL()
-	{
-	return Csymbian_ua_guiDocument::NewL( *this );
-	}
+{
+    return Csymbian_ua_guiDocument::NewL (*this);
+}
 
 #ifdef EKA2
 
 /**
  *	@brief Called by the application framework to construct the application object
  *  @return The application (Csymbian_ua_guiApplication)
- */	
+ */
 LOCAL_C CApaApplication* NewApplication()
-	{
-	return new Csymbian_ua_guiApplication;
-	}
+{
+    return new Csymbian_ua_guiApplication;
+}
 
 /**
 * @brief This standard export is the entry point for all Series 60 applications
 * @return error code
- */	
+ */
 GLDEF_C TInt E32Main()
-	{
-	TInt err;
-	
-	err = EikStart::RunApplication( NewApplication );
+{
+    TInt err;
+
+    err = EikStart::RunApplication (NewApplication);
+
+    return err;
+}
 
-	return err;
-	}
-	
 #else 	// Series 60 2.x main DLL program code
 
 /**
@@ -70,17 +70,17 @@ GLDEF_C TInt E32Main()
 * @return The application (Csymbian_ua_guiApplication)
 */
 EXPORT_C CApaApplication* NewApplication()
-	{
-	return new Csymbian_ua_guiApplication;
-	}
+{
+    return new Csymbian_ua_guiApplication;
+}
 
 /**
 * @brief This standard export is the entry point for all Series 60 applications
 * @return error code
 */
-GLDEF_C TInt E32Dll(TDllReason /*reason*/)
-	{
-	return KErrNone;
-	}
+GLDEF_C TInt E32Dll (TDllReason /*reason*/)
+{
+    return KErrNone;
+}
 
 #endif // EKA2
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiContainer.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiContainer.cpp
index 777217c7de802bbeee708c77d062236f1961d719..ca73e109c76ce330e48e354923706b759630ea2f 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiContainer.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiContainer.cpp
@@ -3,7 +3,7 @@
  Name        : symbian_ua_guiContainer.cpp
  Author      : nanang
  Copyright   : (c) 2008-2009 Teluu Inc.
- Description : 
+ Description :
 ========================================================================
 */
 // [[[ begin generated region: do not modify [Generated System Includes]
@@ -30,34 +30,34 @@
 // ]]] end generated region [Generated Constants]
 
 /**
- * First phase of Symbian two-phase construction. Should not 
+ * First phase of Symbian two-phase construction. Should not
  * contain any code that could leave.
  */
 CSymbian_ua_guiContainer::CSymbian_ua_guiContainer()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	iLabel1 = NULL;
-	iEd_url = NULL;
-	iEd_info = NULL;
-	// ]]] end generated region [Generated Contents]
-	
-	}
-/** 
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    iLabel1 = NULL;
+    iEd_url = NULL;
+    iEd_info = NULL;
+    // ]]] end generated region [Generated Contents]
+
+}
+/**
  * Destroy child controls.
  */
 CSymbian_ua_guiContainer::~CSymbian_ua_guiContainer()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	delete iLabel1;
-	iLabel1 = NULL;
-	delete iEd_url;
-	iEd_url = NULL;
-	delete iEd_info;
-	iEd_info = NULL;
-	// ]]] end generated region [Generated Contents]
-	
-	}
-				
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    delete iLabel1;
+    iLabel1 = NULL;
+    delete iEd_url;
+    iEd_url = NULL;
+    delete iEd_info;
+    iEd_info = NULL;
+    // ]]] end generated region [Generated Contents]
+
+}
+
 /**
  * Construct the control (first phase).
  *  Creates an instance and initializes it.
@@ -67,18 +67,18 @@ CSymbian_ua_guiContainer::~CSymbian_ua_guiContainer()
  * @param aCommandObserver command observer
  * @return initialized instance of CSymbian_ua_guiContainer
  */
-CSymbian_ua_guiContainer* CSymbian_ua_guiContainer::NewL( 
-		const TRect& aRect, 
-		const CCoeControl* aParent, 
-		MEikCommandObserver* aCommandObserver )
-	{
-	CSymbian_ua_guiContainer* self = CSymbian_ua_guiContainer::NewLC( 
-			aRect, 
-			aParent, 
-			aCommandObserver );
-	CleanupStack::Pop( self );
-	return self;
-	}
+CSymbian_ua_guiContainer* CSymbian_ua_guiContainer::NewL (
+    const TRect& aRect,
+    const CCoeControl* aParent,
+    MEikCommandObserver* aCommandObserver)
+{
+    CSymbian_ua_guiContainer* self = CSymbian_ua_guiContainer::NewLC (
+                                         aRect,
+                                         aParent,
+                                         aCommandObserver);
+    CleanupStack::Pop (self);
+    return self;
+}
 
 /**
  * Construct the control (first phase).
@@ -89,197 +89,195 @@ CSymbian_ua_guiContainer* CSymbian_ua_guiContainer::NewL(
  * @param aCommandObserver command observer
  * @return new instance of CSymbian_ua_guiContainer
  */
-CSymbian_ua_guiContainer* CSymbian_ua_guiContainer::NewLC( 
-		const TRect& aRect, 
-		const CCoeControl* aParent, 
-		MEikCommandObserver* aCommandObserver )
-	{
-	CSymbian_ua_guiContainer* self = new ( ELeave ) CSymbian_ua_guiContainer();
-	CleanupStack::PushL( self );
-	self->ConstructL( aRect, aParent, aCommandObserver );
-	return self;
-	}
-			
+CSymbian_ua_guiContainer* CSymbian_ua_guiContainer::NewLC (
+    const TRect& aRect,
+    const CCoeControl* aParent,
+    MEikCommandObserver* aCommandObserver)
+{
+    CSymbian_ua_guiContainer* self = new (ELeave) CSymbian_ua_guiContainer();
+    CleanupStack::PushL (self);
+    self->ConstructL (aRect, aParent, aCommandObserver);
+    return self;
+}
+
 /**
  * Construct the control (second phase).
  *  Creates a window to contain the controls and activates it.
  * @param aRect bounding rectangle
  * @param aCommandObserver command observer
  * @param aParent owning parent, or NULL
- */ 
-void CSymbian_ua_guiContainer::ConstructL( 
-		const TRect& aRect, 
-		const CCoeControl* aParent, 
-		MEikCommandObserver* aCommandObserver )
-	{
-	if ( aParent == NULL )
-	    {
-		CreateWindowL();
-	    }
-	else
-	    {
-	    SetContainerWindowL( *aParent );
-	    }
-	iFocusControl = NULL;
-	iCommandObserver = aCommandObserver;
-	InitializeControlsL();
-	SetRect( aRect );
-	ActivateL();
-	// [[[ begin generated region: do not modify [Post-ActivateL initializations]
-	// ]]] end generated region [Post-ActivateL initializations]
-	
-	}
-			
+ */
+void CSymbian_ua_guiContainer::ConstructL (
+    const TRect& aRect,
+    const CCoeControl* aParent,
+    MEikCommandObserver* aCommandObserver)
+{
+    if (aParent == NULL) {
+        CreateWindowL();
+    } else {
+        SetContainerWindowL (*aParent);
+    }
+
+    iFocusControl = NULL;
+    iCommandObserver = aCommandObserver;
+    InitializeControlsL();
+    SetRect (aRect);
+    ActivateL();
+    // [[[ begin generated region: do not modify [Post-ActivateL initializations]
+    // ]]] end generated region [Post-ActivateL initializations]
+
+}
+
 /**
 * Return the number of controls in the container (override)
 * @return count
 */
 TInt CSymbian_ua_guiContainer::CountComponentControls() const
-	{
-	return ( int ) ELastControl;
-	}
-				
+{
+    return (int) ELastControl;
+}
+
 /**
 * Get the control with the given index (override)
 * @param aIndex Control index [0...n) (limited by #CountComponentControls)
 * @return Pointer to control
 */
-CCoeControl* CSymbian_ua_guiContainer::ComponentControl( TInt aIndex ) const
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	switch ( aIndex )
-		{
-		case ELabel1:
-			return iLabel1;
-		case EEd_url:
-			return iEd_url;
-		case EEd_info:
-			return iEd_info;
-		}
-	// ]]] end generated region [Generated Contents]
-	
-	// handle any user controls here...
-	
-	return NULL;
-	}
-				
+CCoeControl* CSymbian_ua_guiContainer::ComponentControl (TInt aIndex) const
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    switch (aIndex) {
+        case ELabel1:
+            return iLabel1;
+        case EEd_url:
+            return iEd_url;
+        case EEd_info:
+            return iEd_info;
+    }
+
+    // ]]] end generated region [Generated Contents]
+
+    // handle any user controls here...
+
+    return NULL;
+}
+
 /**
  *	Handle resizing of the container. This implementation will lay out
  *  full-sized controls like list boxes for any screen size, and will layout
  *  labels, editors, etc. to the size they were given in the UI designer.
  *  This code will need to be modified to adjust arbitrary controls to
  *  any screen size.
- */				
+ */
 void CSymbian_ua_guiContainer::SizeChanged()
-	{
-	CCoeControl::SizeChanged();
-	LayoutControls();
-	// [[[ begin generated region: do not modify [Generated Contents]
-			
-	// ]]] end generated region [Generated Contents]
-	
-	}
-				
+{
+    CCoeControl::SizeChanged();
+    LayoutControls();
+    // [[[ begin generated region: do not modify [Generated Contents]
+
+    // ]]] end generated region [Generated Contents]
+
+}
+
 // [[[ begin generated function: do not modify
 /**
  * Layout components as specified in the UI Designer
  */
 void CSymbian_ua_guiContainer::LayoutControls()
-	{
-	iLabel1->SetExtent( TPoint( 2, 23 ), TSize( 32, 28 ) );
-	iEd_url->SetExtent( TPoint( 49, 25 ), TSize( 197, 28 ) );
-	iEd_info->SetExtent( TPoint( 3, 78 ), TSize( 235, 143 ) );
-	}
+{
+    iLabel1->SetExtent (TPoint (2, 23), TSize (32, 28));
+    iEd_url->SetExtent (TPoint (49, 25), TSize (197, 28));
+    iEd_info->SetExtent (TPoint (3, 78), TSize (235, 143));
+}
 // ]]] end generated function
 
 /**
  *	Handle key events.
- */				
-TKeyResponse CSymbian_ua_guiContainer::OfferKeyEventL( 
-		const TKeyEvent& aKeyEvent, 
-		TEventCode aType )
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	
-	// ]]] end generated region [Generated Contents]
-	
-	if ( iFocusControl != NULL
-		&& iFocusControl->OfferKeyEventL( aKeyEvent, aType ) == EKeyWasConsumed )
-		{
-		return EKeyWasConsumed;
-		}
-	return CCoeControl::OfferKeyEventL( aKeyEvent, aType );
-	}
-				
+ */
+TKeyResponse CSymbian_ua_guiContainer::OfferKeyEventL (
+    const TKeyEvent& aKeyEvent,
+    TEventCode aType)
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+
+    // ]]] end generated region [Generated Contents]
+
+    if (iFocusControl != NULL
+            && iFocusControl->OfferKeyEventL (aKeyEvent, aType) == EKeyWasConsumed) {
+        return EKeyWasConsumed;
+    }
+
+    return CCoeControl::OfferKeyEventL (aKeyEvent, aType);
+}
+
 // [[[ begin generated function: do not modify
 /**
  *	Initialize each control upon creation.
- */				
+ */
 void CSymbian_ua_guiContainer::InitializeControlsL()
-	{
-	iLabel1 = new ( ELeave ) CEikLabel;
-	iLabel1->SetContainerWindowL( *this );
-		{
-		TResourceReader reader;
-		iEikonEnv->CreateResourceReaderLC( reader, R_SYMBIAN_UA_GUI_CONTAINER_LABEL1 );
-		iLabel1->ConstructFromResourceL( reader );
-		CleanupStack::PopAndDestroy(); // reader internal state
-		}
-	iEd_url = new ( ELeave ) CEikEdwin;
-	iEd_url->SetContainerWindowL( *this );
-		{
-		TResourceReader reader;
-		iEikonEnv->CreateResourceReaderLC( reader, R_SYMBIAN_UA_GUI_CONTAINER_ED_URL );
-		iEd_url->ConstructFromResourceL( reader );
-		CleanupStack::PopAndDestroy(); // reader internal state
-		}
-		{
-		HBufC* text = StringLoader::LoadLC( R_SYMBIAN_UA_GUI_CONTAINER_ED_URL_2 );
-		iEd_url->SetTextL( text );
-		CleanupStack::PopAndDestroy( text );
-		}
-	iEd_info = new ( ELeave ) CEikEdwin;
-	iEd_info->SetContainerWindowL( *this );
-		{
-		TResourceReader reader;
-		iEikonEnv->CreateResourceReaderLC( reader, R_SYMBIAN_UA_GUI_CONTAINER_ED_INFO );
-		iEd_info->ConstructFromResourceL( reader );
-		CleanupStack::PopAndDestroy(); // reader internal state
-		}
-		{
-		HBufC* text = StringLoader::LoadLC( R_SYMBIAN_UA_GUI_CONTAINER_ED_INFO_2 );
-		iEd_info->SetTextL( text );
-		CleanupStack::PopAndDestroy( text );
-		}
-	
-	iEd_url->SetFocus( ETrue );
-	iFocusControl = iEd_url;
-	
-	}
+{
+    iLabel1 = new (ELeave) CEikLabel;
+    iLabel1->SetContainerWindowL (*this);
+    {
+        TResourceReader reader;
+        iEikonEnv->CreateResourceReaderLC (reader, R_SYMBIAN_UA_GUI_CONTAINER_LABEL1);
+        iLabel1->ConstructFromResourceL (reader);
+        CleanupStack::PopAndDestroy(); // reader internal state
+    }
+    iEd_url = new (ELeave) CEikEdwin;
+    iEd_url->SetContainerWindowL (*this);
+    {
+        TResourceReader reader;
+        iEikonEnv->CreateResourceReaderLC (reader, R_SYMBIAN_UA_GUI_CONTAINER_ED_URL);
+        iEd_url->ConstructFromResourceL (reader);
+        CleanupStack::PopAndDestroy(); // reader internal state
+    }
+    {
+        HBufC* text = StringLoader::LoadLC (R_SYMBIAN_UA_GUI_CONTAINER_ED_URL_2);
+        iEd_url->SetTextL (text);
+        CleanupStack::PopAndDestroy (text);
+    }
+    iEd_info = new (ELeave) CEikEdwin;
+    iEd_info->SetContainerWindowL (*this);
+    {
+        TResourceReader reader;
+        iEikonEnv->CreateResourceReaderLC (reader, R_SYMBIAN_UA_GUI_CONTAINER_ED_INFO);
+        iEd_info->ConstructFromResourceL (reader);
+        CleanupStack::PopAndDestroy(); // reader internal state
+    }
+    {
+        HBufC* text = StringLoader::LoadLC (R_SYMBIAN_UA_GUI_CONTAINER_ED_INFO_2);
+        iEd_info->SetTextL (text);
+        CleanupStack::PopAndDestroy (text);
+    }
+
+    iEd_url->SetFocus (ETrue);
+    iFocusControl = iEd_url;
+
+}
 // ]]] end generated function
 
-/** 
+/**
  * Handle global resource changes, such as scalable UI or skin events (override)
  */
-void CSymbian_ua_guiContainer::HandleResourceChange( TInt aType )
-	{
-	CCoeControl::HandleResourceChange( aType );
-	SetRect( iAvkonViewAppUi->View( TUid::Uid( ESymbian_ua_guiContainerViewId ) )->ClientRect() );
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
-	
-	}
-				
+void CSymbian_ua_guiContainer::HandleResourceChange (TInt aType)
+{
+    CCoeControl::HandleResourceChange (aType);
+    SetRect (iAvkonViewAppUi->View (TUid::Uid (ESymbian_ua_guiContainerViewId))->ClientRect());
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
+
+}
+
 /**
  *	Draw container contents.
- */				
-void CSymbian_ua_guiContainer::Draw( const TRect& aRect ) const
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	CWindowGc& gc = SystemGc();
-	gc.Clear( aRect );
-	
-	// ]]] end generated region [Generated Contents]
-	
-	}
-				
+ */
+void CSymbian_ua_guiContainer::Draw (const TRect& aRect) const
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    CWindowGc& gc = SystemGc();
+    gc.Clear (aRect);
+
+    // ]]] end generated region [Generated Contents]
+
+}
+
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiContainerView.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiContainerView.cpp
index 661c210eac8ada40713cc3b7bbe0defd198b57e5..4a597893113304f12d32b56d2adee5b5797bff19 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiContainerView.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiContainerView.cpp
@@ -3,7 +3,7 @@
  Name        : symbian_ua_guiContainerView.cpp
  Author      : nanang
  Copyright   : (c) 2008-2009 Teluu Inc.
- Description : 
+ Description :
 ========================================================================
 */
 // [[[ begin generated region: do not modify [Generated System Includes]
@@ -39,106 +39,109 @@
 // ]]] end generated region [Generated Constants]
 
 Csymbian_ua_guiContainerView *myinstance = NULL;
-_LIT(KStCall, "Call");
-_LIT(KStHangUp, "Hang Up");
+_LIT (KStCall, "Call");
+_LIT (KStHangUp, "Hang Up");
 
-void on_info(const wchar_t* buf)
+void on_info (const wchar_t* buf)
 {
-	TPtrC aBuf((const TUint16*)buf);
-	
-	if (myinstance)
-		myinstance->PutMessage(aBuf);
+    TPtrC aBuf ( (const TUint16*) buf);
+
+    if (myinstance)
+        myinstance->PutMessage (aBuf);
 }
 
-void on_incoming_call(const wchar_t* caller_disp, const wchar_t* caller_uri)
+void on_incoming_call (const wchar_t* caller_disp, const wchar_t* caller_uri)
 {
-	TBuf<512> buf;
-	TPtrC aDisp((const TUint16*)caller_disp);
-	TPtrC aUri((const TUint16*)caller_uri);
-	_LIT(KFormat, "Incoming call from %S, accept?");
-	
-	buf.Format(KFormat, &aDisp);
-	if (Csymbian_ua_guiContainerView::RunQry_accept_callL(&buf) == EAknSoftkeyYes)
-	{
-		CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
-		if (cba != NULL) {
-			TRAPD(result, cba->SetCommandL(ESymbian_ua_guiContainerViewControlPaneRightId, KStHangUp));
-			cba->DrawDeferred();
-		}
-		symbian_ua_answercall();
-	} else {
-		symbian_ua_endcall();	
-	}
+    TBuf<512> buf;
+    TPtrC aDisp ( (const TUint16*) caller_disp);
+    TPtrC aUri ( (const TUint16*) caller_uri);
+    _LIT (KFormat, "Incoming call from %S, accept?");
+
+    buf.Format (KFormat, &aDisp);
+
+    if (Csymbian_ua_guiContainerView::RunQry_accept_callL (&buf) == EAknSoftkeyYes) {
+        CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+
+        if (cba != NULL) {
+            TRAPD (result, cba->SetCommandL (ESymbian_ua_guiContainerViewControlPaneRightId, KStHangUp));
+            cba->DrawDeferred();
+        }
+
+        symbian_ua_answercall();
+    } else {
+        symbian_ua_endcall();
+    }
 }
 
-void on_call_end(const wchar_t* reason)
+void on_call_end (const wchar_t* reason)
 {
-	TPtrC aReason((const TUint16*)reason);
-	
-	CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
-	if (cba != NULL) {
-		TRAPD(result, cba->SetCommandL(ESymbian_ua_guiContainerViewControlPaneRightId, KStCall));
-		cba->DrawDeferred();
-	}
-	
-	Csymbian_ua_guiContainerView::RunNote_infoL(&aReason);
+    TPtrC aReason ( (const TUint16*) reason);
+
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+
+    if (cba != NULL) {
+        TRAPD (result, cba->SetCommandL (ESymbian_ua_guiContainerViewControlPaneRightId, KStCall));
+        cba->DrawDeferred();
+    }
+
+    Csymbian_ua_guiContainerView::RunNote_infoL (&aReason);
 }
 
-void on_reg_state(bool success)
+void on_reg_state (bool success)
 {
-	if (success)
-		Csymbian_ua_guiContainerView::RunNote_infoL();
-	else
-		Csymbian_ua_guiContainerView::RunNote_warningL();
+    if (success)
+        Csymbian_ua_guiContainerView::RunNote_infoL();
+    else
+        Csymbian_ua_guiContainerView::RunNote_warningL();
 }
 
-void on_unreg_state(bool success)
+void on_unreg_state (bool success)
 {
-	TPtrC st_success(_L("Unregistration Success!"));
-	TPtrC st_failed(_L("Unregistration Failed!"));
-	
-	if (success)
-		Csymbian_ua_guiContainerView::RunNote_infoL(&st_success);
-	else
-		Csymbian_ua_guiContainerView::RunNote_warningL(&st_failed);
+    TPtrC st_success (_L ("Unregistration Success!"));
+    TPtrC st_failed (_L ("Unregistration Failed!"));
+
+    if (success)
+        Csymbian_ua_guiContainerView::RunNote_infoL (&st_success);
+    else
+        Csymbian_ua_guiContainerView::RunNote_warningL (&st_failed);
 }
 
-void Csymbian_ua_guiContainerView::PutMessage(const TDesC &msg)
-	{
-	if (!iSymbian_ua_guiContainer)
-		return;
-	
-	CEikEdwin *obj_info = (CEikEdwin*) iSymbian_ua_guiContainer->ComponentControl(iSymbian_ua_guiContainer->EEd_info);
+void Csymbian_ua_guiContainerView::PutMessage (const TDesC &msg)
+{
+    if (!iSymbian_ua_guiContainer)
+        return;
+
+    CEikEdwin *obj_info = (CEikEdwin*) iSymbian_ua_guiContainer->ComponentControl (iSymbian_ua_guiContainer->EEd_info);
 
-	obj_info->SetTextL(&msg);
-	obj_info->DrawDeferred();
-	}
+    obj_info->SetTextL (&msg);
+    obj_info->DrawDeferred();
+}
 
 /**
  * First phase of Symbian two-phase construction. Should not contain any
  * code that could leave.
  */
 Csymbian_ua_guiContainerView::Csymbian_ua_guiContainerView()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	iSymbian_ua_guiContainer = NULL;
-	// ]]] end generated region [Generated Contents]
-	
-	}
-/** 
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    iSymbian_ua_guiContainer = NULL;
+    // ]]] end generated region [Generated Contents]
+
+}
+/**
  * The view's destructor removes the container from the control
  * stack and destroys it.
  */
 Csymbian_ua_guiContainerView::~Csymbian_ua_guiContainerView()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	delete iSymbian_ua_guiContainer;
-	iSymbian_ua_guiContainer = NULL;
-	// ]]] end generated region [Generated Contents]
-	
-	symbian_ua_set_info_callback(NULL);
-	myinstance = NULL;
-	}
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    delete iSymbian_ua_guiContainer;
+    iSymbian_ua_guiContainer = NULL;
+    // ]]] end generated region [Generated Contents]
+
+    symbian_ua_set_info_callback (NULL);
+    myinstance = NULL;
+}
 
 /**
  * Symbian two-phase constructor.
@@ -147,11 +150,11 @@ Csymbian_ua_guiContainerView::~Csymbian_ua_guiContainerView()
  * @return new instance of Csymbian_ua_guiContainerView
  */
 Csymbian_ua_guiContainerView* Csymbian_ua_guiContainerView::NewL()
-	{
-	Csymbian_ua_guiContainerView* self = Csymbian_ua_guiContainerView::NewLC();
-	CleanupStack::Pop( self );
-	return self;
-	}
+{
+    Csymbian_ua_guiContainerView* self = Csymbian_ua_guiContainerView::NewLC();
+    CleanupStack::Pop (self);
+    return self;
+}
 
 /**
  * Symbian two-phase constructor.
@@ -160,259 +163,259 @@ Csymbian_ua_guiContainerView* Csymbian_ua_guiContainerView::NewL()
  * @return new instance of Csymbian_ua_guiContainerView
  */
 Csymbian_ua_guiContainerView* Csymbian_ua_guiContainerView::NewLC()
-	{
-	Csymbian_ua_guiContainerView* self = new ( ELeave ) Csymbian_ua_guiContainerView();
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	return self;
-	}
+{
+    Csymbian_ua_guiContainerView* self = new (ELeave) Csymbian_ua_guiContainerView();
+    CleanupStack::PushL (self);
+    self->ConstructL();
+    return self;
+}
 
 
 /**
- * Second-phase constructor for view.  
+ * Second-phase constructor for view.
  * Initialize contents from resource.
- */ 
+ */
 void Csymbian_ua_guiContainerView::ConstructL()
-	{
-	// [[[ begin generated region: do not modify [Generated Code]
-	BaseConstructL( R_SYMBIAN_UA_GUI_CONTAINER_SYMBIAN_UA_GUI_CONTAINER_VIEW );
-	// ]]] end generated region [Generated Code]
-	
-	// add your own initialization code here
-	symbian_ua_info_cb_t cb;
-	Mem::FillZ(&cb, sizeof(cb));
-
-	cb.on_info = &on_info;
-	cb.on_incoming_call = &on_incoming_call;
-	cb.on_reg_state = &on_reg_state;
-	cb.on_unreg_state = &on_unreg_state;
-	cb.on_call_end = &on_call_end;
-	
-	symbian_ua_set_info_callback(&cb);
-	myinstance = this;
-	}
-	
+{
+    // [[[ begin generated region: do not modify [Generated Code]
+    BaseConstructL (R_SYMBIAN_UA_GUI_CONTAINER_SYMBIAN_UA_GUI_CONTAINER_VIEW);
+    // ]]] end generated region [Generated Code]
+
+    // add your own initialization code here
+    symbian_ua_info_cb_t cb;
+    Mem::FillZ (&cb, sizeof (cb));
+
+    cb.on_info = &on_info;
+    cb.on_incoming_call = &on_incoming_call;
+    cb.on_reg_state = &on_reg_state;
+    cb.on_unreg_state = &on_unreg_state;
+    cb.on_call_end = &on_call_end;
+
+    symbian_ua_set_info_callback (&cb);
+    myinstance = this;
+}
+
 /**
  * @return The UID for this view
  */
 TUid Csymbian_ua_guiContainerView::Id() const
-	{
-	return TUid::Uid( ESymbian_ua_guiContainerViewId );
-	}
+{
+    return TUid::Uid (ESymbian_ua_guiContainerViewId);
+}
 
 /**
  * Handle a command for this view (override)
  * @param aCommand command id to be handled
  */
-void Csymbian_ua_guiContainerView::HandleCommandL( TInt aCommand )
-	{   
-	// [[[ begin generated region: do not modify [Generated Code]
-	TBool commandHandled = EFalse;
-	switch ( aCommand )
-		{	// code to dispatch to the AknView's menu and CBA commands is generated here
-	
-		case ESymbian_ua_guiContainerViewControlPaneRightId:
-			commandHandled = CallSoftKeyPressedL( aCommand );
-			break;
-		case ESymbian_ua_guiContainerViewSettingMenuItemCommand:
-			commandHandled = HandleSettingMenuItemSelectedL( aCommand );
-			break;
-		default:
-			break;
-		}
-	
-		
-	if ( !commandHandled ) 
-		{
-	
-		if ( aCommand == ESymbian_ua_guiContainerViewControlPaneRightId )
-			{
-			AppUi()->HandleCommandL( EEikCmdExit );
-			}
-	
-		}
-	// ]]] end generated region [Generated Code]
-	
-	}
+void Csymbian_ua_guiContainerView::HandleCommandL (TInt aCommand)
+{
+    // [[[ begin generated region: do not modify [Generated Code]
+    TBool commandHandled = EFalse;
+
+    switch (aCommand) {	// code to dispatch to the AknView's menu and CBA commands is generated here
+
+        case ESymbian_ua_guiContainerViewControlPaneRightId:
+            commandHandled = CallSoftKeyPressedL (aCommand);
+            break;
+        case ESymbian_ua_guiContainerViewSettingMenuItemCommand:
+            commandHandled = HandleSettingMenuItemSelectedL (aCommand);
+            break;
+        default:
+            break;
+    }
+
+
+    if (!commandHandled) {
+
+        if (aCommand == ESymbian_ua_guiContainerViewControlPaneRightId) {
+            AppUi()->HandleCommandL (EEikCmdExit);
+        }
+
+    }
+
+    // ]]] end generated region [Generated Code]
+
+}
 
 /**
- *	Handles user actions during activation of the view, 
+ *	Handles user actions during activation of the view,
  *	such as initializing the content.
  */
-void Csymbian_ua_guiContainerView::DoActivateL(
-		const TVwsViewId& /*aPrevViewId*/,
-		TUid /*aCustomMessageId*/,
-		const TDesC8& /*aCustomMessage*/ )
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	SetupStatusPaneL();
-	
-	CEikButtonGroupContainer* cba = AppUi()->Cba();
-	if ( cba != NULL ) 
-		{
-		cba->MakeVisible( EFalse );
-		}
-	
-	if ( iSymbian_ua_guiContainer == NULL )
-		{
-		iSymbian_ua_guiContainer = CSymbian_ua_guiContainer::NewL( ClientRect(), NULL, this );
-		iSymbian_ua_guiContainer->SetMopParent( this );
-		AppUi()->AddToStackL( *this, iSymbian_ua_guiContainer );
-		} 
-	// ]]] end generated region [Generated Contents]
-	
-	cba = CEikButtonGroupContainer::Current();
-	if (cba != NULL) {
-		if (symbian_ua_anycall())
-			cba->SetCommandL(ESymbian_ua_guiContainerViewControlPaneRightId, KStHangUp);
-		else
-			cba->SetCommandL(ESymbian_ua_guiContainerViewControlPaneRightId, KStCall);
-	}
-	
-	}
+void Csymbian_ua_guiContainerView::DoActivateL (
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid /*aCustomMessageId*/,
+    const TDesC8& /*aCustomMessage*/)
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    SetupStatusPaneL();
+
+    CEikButtonGroupContainer* cba = AppUi()->Cba();
+
+    if (cba != NULL) {
+        cba->MakeVisible (EFalse);
+    }
+
+    if (iSymbian_ua_guiContainer == NULL) {
+        iSymbian_ua_guiContainer = CSymbian_ua_guiContainer::NewL (ClientRect(), NULL, this);
+        iSymbian_ua_guiContainer->SetMopParent (this);
+        AppUi()->AddToStackL (*this, iSymbian_ua_guiContainer);
+    }
+
+    // ]]] end generated region [Generated Contents]
+
+    cba = CEikButtonGroupContainer::Current();
+
+    if (cba != NULL) {
+        if (symbian_ua_anycall())
+            cba->SetCommandL (ESymbian_ua_guiContainerViewControlPaneRightId, KStHangUp);
+        else
+            cba->SetCommandL (ESymbian_ua_guiContainerViewControlPaneRightId, KStCall);
+    }
+
+}
 
 /**
  */
 void Csymbian_ua_guiContainerView::DoDeactivate()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	CleanupStatusPane();
-	
-	CEikButtonGroupContainer* cba = AppUi()->Cba();
-	if ( cba != NULL ) 
-		{
-		cba->MakeVisible( ETrue );
-		cba->DrawDeferred();
-		}
-	
-	if ( iSymbian_ua_guiContainer != NULL )
-		{
-		AppUi()->RemoveFromViewStack( *this, iSymbian_ua_guiContainer );
-		delete iSymbian_ua_guiContainer;
-		iSymbian_ua_guiContainer = NULL;
-		}
-	// ]]] end generated region [Generated Contents]
-	
-	}
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    CleanupStatusPane();
+
+    CEikButtonGroupContainer* cba = AppUi()->Cba();
+
+    if (cba != NULL) {
+        cba->MakeVisible (ETrue);
+        cba->DrawDeferred();
+    }
+
+    if (iSymbian_ua_guiContainer != NULL) {
+        AppUi()->RemoveFromViewStack (*this, iSymbian_ua_guiContainer);
+        delete iSymbian_ua_guiContainer;
+        iSymbian_ua_guiContainer = NULL;
+    }
+
+    // ]]] end generated region [Generated Contents]
+
+}
 
 // [[[ begin generated function: do not modify
 void Csymbian_ua_guiContainerView::SetupStatusPaneL()
-	{
-	// reset the context pane
-	TUid contextPaneUid = TUid::Uid( EEikStatusPaneUidContext );
-	CEikStatusPaneBase::TPaneCapabilities subPaneContext = 
-		StatusPane()->PaneCapabilities( contextPaneUid );
-	if ( subPaneContext.IsPresent() && subPaneContext.IsAppOwned() )
-		{
-		CAknContextPane* context = static_cast< CAknContextPane* > ( 
-			StatusPane()->ControlL( contextPaneUid ) );
-		context->SetPictureToDefaultL();
-		}
-	
-	// setup the title pane
-	TUid titlePaneUid = TUid::Uid( EEikStatusPaneUidTitle );
-	CEikStatusPaneBase::TPaneCapabilities subPaneTitle = 
-		StatusPane()->PaneCapabilities( titlePaneUid );
-	if ( subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned() )
-		{
-		CAknTitlePane* title = static_cast< CAknTitlePane* >( 
-			StatusPane()->ControlL( titlePaneUid ) );
-		TResourceReader reader;
-		iEikonEnv->CreateResourceReaderLC( reader, R_SYMBIAN_UA_GUI_CONTAINER_TITLE_RESOURCE );
-		title->SetFromResourceL( reader );
-		CleanupStack::PopAndDestroy(); // reader internal state
-		}
-				
-	}
+{
+    // reset the context pane
+    TUid contextPaneUid = TUid::Uid (EEikStatusPaneUidContext);
+    CEikStatusPaneBase::TPaneCapabilities subPaneContext =
+        StatusPane()->PaneCapabilities (contextPaneUid);
+
+    if (subPaneContext.IsPresent() && subPaneContext.IsAppOwned()) {
+        CAknContextPane* context = static_cast< CAknContextPane* > (
+                                       StatusPane()->ControlL (contextPaneUid));
+        context->SetPictureToDefaultL();
+    }
+
+    // setup the title pane
+    TUid titlePaneUid = TUid::Uid (EEikStatusPaneUidTitle);
+    CEikStatusPaneBase::TPaneCapabilities subPaneTitle =
+        StatusPane()->PaneCapabilities (titlePaneUid);
+
+    if (subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned()) {
+        CAknTitlePane* title = static_cast< CAknTitlePane* > (
+                                   StatusPane()->ControlL (titlePaneUid));
+        TResourceReader reader;
+        iEikonEnv->CreateResourceReaderLC (reader, R_SYMBIAN_UA_GUI_CONTAINER_TITLE_RESOURCE);
+        title->SetFromResourceL (reader);
+        CleanupStack::PopAndDestroy(); // reader internal state
+    }
+
+}
 // ]]] end generated function
 
 // [[[ begin generated function: do not modify
 void Csymbian_ua_guiContainerView::CleanupStatusPane()
-	{
-	}
+{
+}
 // ]]] end generated function
 
-/** 
+/**
  * Handle status pane size change for this view (override)
  */
 void Csymbian_ua_guiContainerView::HandleStatusPaneSizeChange()
-	{
-	CAknView::HandleStatusPaneSizeChange();
-	
-	// this may fail, but we're not able to propagate exceptions here
-	TInt result;
-	TRAP( result, SetupStatusPaneL() ); 
-	}
-	
-/** 
+{
+    CAknView::HandleStatusPaneSizeChange();
+
+    // this may fail, but we're not able to propagate exceptions here
+    TInt result;
+    TRAP (result, SetupStatusPaneL());
+}
+
+/**
  * Handle the rightSoftKeyPressed event.
  * @return ETrue if the command was handled, EFalse if not
  */
-TBool Csymbian_ua_guiContainerView::CallSoftKeyPressedL( TInt aCommand )
-	{
-	CEikEdwin *obj_url = (CEikEdwin*) iSymbian_ua_guiContainer->ComponentControl(iSymbian_ua_guiContainer->EEd_url);
-	CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
-	
-	if (symbian_ua_anycall()) {
-		symbian_ua_endcall();
-		return ETrue;
-	}
-
-	PutMessage(_L("Making call..."));
-	if ( cba != NULL ) {
-		cba->SetCommandL(aCommand, KStHangUp);
-		cba->DrawDeferred();
-	}
-	
-
-	TUint8 url[256];
-	TPtr8 aUrl(url, 256);
-
-	HBufC *buf = obj_url->GetTextInHBufL();
-	CnvUtfConverter::ConvertFromUnicodeToUtf8(aUrl, *buf);
-	delete buf;
-
-	if (symbian_ua_makecall((char *)aUrl.PtrZ()) != 0) {
-		PutMessage(_L("Making call failed!"));
-		if ( cba != NULL ) {
-			cba->SetCommandL(aCommand, KStCall);
-			cba->DrawDeferred();
-		}
-	}
-	
-	return ETrue;
-	}
-				
-/** 
+TBool Csymbian_ua_guiContainerView::CallSoftKeyPressedL (TInt aCommand)
+{
+    CEikEdwin *obj_url = (CEikEdwin*) iSymbian_ua_guiContainer->ComponentControl (iSymbian_ua_guiContainer->EEd_url);
+    CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
+
+    if (symbian_ua_anycall()) {
+        symbian_ua_endcall();
+        return ETrue;
+    }
+
+    PutMessage (_L ("Making call..."));
+
+    if (cba != NULL) {
+        cba->SetCommandL (aCommand, KStHangUp);
+        cba->DrawDeferred();
+    }
+
+
+    TUint8 url[256];
+    TPtr8 aUrl (url, 256);
+
+    HBufC *buf = obj_url->GetTextInHBufL();
+    CnvUtfConverter::ConvertFromUnicodeToUtf8 (aUrl, *buf);
+    delete buf;
+
+    if (symbian_ua_makecall ( (char *) aUrl.PtrZ()) != 0) {
+        PutMessage (_L ("Making call failed!"));
+
+        if (cba != NULL) {
+            cba->SetCommandL (aCommand, KStCall);
+            cba->DrawDeferred();
+        }
+    }
+
+    return ETrue;
+}
+
+/**
  * Handle the selected event.
  * @param aCommand the command id invoked
  * @return ETrue if the command was handled, EFalse if not
  */
-TBool Csymbian_ua_guiContainerView::HandleSettingMenuItemSelectedL( TInt aCommand )
-	{
-	AppUi()->ActivateLocalViewL(TUid::Uid(ESymbian_ua_guiSettingItemListViewId));
-	return ETrue;
-	}
-				
+TBool Csymbian_ua_guiContainerView::HandleSettingMenuItemSelectedL (TInt aCommand)
+{
+    AppUi()->ActivateLocalViewL (TUid::Uid (ESymbian_ua_guiSettingItemListViewId));
+    return ETrue;
+}
+
 // [[[ begin generated function: do not modify
 /**
  * Show the popup note for note_error
  * @param aOverrideText optional override text
  */
-void Csymbian_ua_guiContainerView::RunNote_errorL( const TDesC* aOverrideText )
-	{
-	CAknErrorNote* note = new ( ELeave ) CAknErrorNote();
-	if ( aOverrideText == NULL )
-		{
-		HBufC* noteText = StringLoader::LoadLC( R_SYMBIAN_UA_GUI_CONTAINER_NOTE_ERROR );
-		note->ExecuteLD( *noteText );
-		CleanupStack::PopAndDestroy( noteText );
-		}
-	else
-		{
-		note->ExecuteLD( *aOverrideText );
-		}
-	}
+void Csymbian_ua_guiContainerView::RunNote_errorL (const TDesC* aOverrideText)
+{
+    CAknErrorNote* note = new (ELeave) CAknErrorNote();
+
+    if (aOverrideText == NULL) {
+        HBufC* noteText = StringLoader::LoadLC (R_SYMBIAN_UA_GUI_CONTAINER_NOTE_ERROR);
+        note->ExecuteLD (*noteText);
+        CleanupStack::PopAndDestroy (noteText);
+    } else {
+        note->ExecuteLD (*aOverrideText);
+    }
+}
 // ]]] end generated function
 
 // [[[ begin generated function: do not modify
@@ -420,20 +423,18 @@ void Csymbian_ua_guiContainerView::RunNote_errorL( const TDesC* aOverrideText )
  * Show the popup note for note_info
  * @param aOverrideText optional override text
  */
-void Csymbian_ua_guiContainerView::RunNote_infoL( const TDesC* aOverrideText )
-	{
-	CAknInformationNote* note = new ( ELeave ) CAknInformationNote();
-	if ( aOverrideText == NULL )
-		{
-		HBufC* noteText = StringLoader::LoadLC( R_SYMBIAN_UA_GUI_CONTAINER_NOTE_INFO );
-		note->ExecuteLD( *noteText );
-		CleanupStack::PopAndDestroy( noteText );
-		}
-	else
-		{
-		note->ExecuteLD( *aOverrideText );
-		}
-	}
+void Csymbian_ua_guiContainerView::RunNote_infoL (const TDesC* aOverrideText)
+{
+    CAknInformationNote* note = new (ELeave) CAknInformationNote();
+
+    if (aOverrideText == NULL) {
+        HBufC* noteText = StringLoader::LoadLC (R_SYMBIAN_UA_GUI_CONTAINER_NOTE_INFO);
+        note->ExecuteLD (*noteText);
+        CleanupStack::PopAndDestroy (noteText);
+    } else {
+        note->ExecuteLD (*aOverrideText);
+    }
+}
 // ]]] end generated function
 
 // [[[ begin generated function: do not modify
@@ -441,20 +442,18 @@ void Csymbian_ua_guiContainerView::RunNote_infoL( const TDesC* aOverrideText )
  * Show the popup note for note_warning
  * @param aOverrideText optional override text
  */
-void Csymbian_ua_guiContainerView::RunNote_warningL( const TDesC* aOverrideText )
-	{
-	CAknWarningNote* note = new ( ELeave ) CAknWarningNote();
-	if ( aOverrideText == NULL )
-		{
-		HBufC* noteText = StringLoader::LoadLC( R_SYMBIAN_UA_GUI_CONTAINER_NOTE_WARNING );
-		note->ExecuteLD( *noteText );
-		CleanupStack::PopAndDestroy( noteText );
-		}
-	else
-		{
-		note->ExecuteLD( *aOverrideText );
-		}
-	}
+void Csymbian_ua_guiContainerView::RunNote_warningL (const TDesC* aOverrideText)
+{
+    CAknWarningNote* note = new (ELeave) CAknWarningNote();
+
+    if (aOverrideText == NULL) {
+        HBufC* noteText = StringLoader::LoadLC (R_SYMBIAN_UA_GUI_CONTAINER_NOTE_WARNING);
+        note->ExecuteLD (*noteText);
+        CleanupStack::PopAndDestroy (noteText);
+    } else {
+        note->ExecuteLD (*aOverrideText);
+    }
+}
 // ]]] end generated function
 
 // [[[ begin generated function: do not modify
@@ -463,16 +462,16 @@ void Csymbian_ua_guiContainerView::RunNote_warningL( const TDesC* aOverrideText
  * @param aOverrideText optional override text
  * @return EAknSoftkeyYes (left soft key id) or 0
  */
-TInt Csymbian_ua_guiContainerView::RunQry_accept_callL( const TDesC* aOverrideText )
-	{
-				
-	CAknQueryDialog* queryDialog = CAknQueryDialog::NewL();	
-	
-	if ( aOverrideText != NULL )
-		{
-		queryDialog->SetPromptL( *aOverrideText );
-		}
-	return queryDialog->ExecuteLD( R_SYMBIAN_UA_GUI_CONTAINER_QRY_ACCEPT_CALL );
-	}
+TInt Csymbian_ua_guiContainerView::RunQry_accept_callL (const TDesC* aOverrideText)
+{
+
+    CAknQueryDialog* queryDialog = CAknQueryDialog::NewL();
+
+    if (aOverrideText != NULL) {
+        queryDialog->SetPromptL (*aOverrideText);
+    }
+
+    return queryDialog->ExecuteLD (R_SYMBIAN_UA_GUI_CONTAINER_QRY_ACCEPT_CALL);
+}
 // ]]] end generated function
 
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiDocument.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiDocument.cpp
index 8eb54f8d74fed49b685ad511827c23256e1d61f4..209c9ebcec9f9a653241e1340be8fb8b382c2949 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiDocument.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiDocument.cpp
@@ -3,7 +3,7 @@
  Name        : symbian_ua_guiDocument.cpp
  Author      : nanang
  Copyright   : (c) 2008-2009 Teluu Inc.
- Description : 
+ Description :
 ========================================================================
 */
 // [[[ begin generated region: do not modify [Generated User Includes]
@@ -15,19 +15,19 @@
  * @brief Constructs the document class for the application.
  * @param anApplication the application instance
  */
-Csymbian_ua_guiDocument::Csymbian_ua_guiDocument( CEikApplication& anApplication )
-	: CAknDocument( anApplication )
-	{
-	}
+Csymbian_ua_guiDocument::Csymbian_ua_guiDocument (CEikApplication& anApplication)
+        : CAknDocument (anApplication)
+{
+}
 
 /**
- * @brief Completes the second phase of Symbian object construction. 
- * Put initialization code that could leave here.  
- */ 
+ * @brief Completes the second phase of Symbian object construction.
+ * Put initialization code that could leave here.
+ */
 void Csymbian_ua_guiDocument::ConstructL()
-	{
-	}
-	
+{
+}
+
 /**
  * Symbian OS two-phase constructor.
  *
@@ -37,21 +37,21 @@ void Csymbian_ua_guiDocument::ConstructL()
  * @param aApp the application instance
  * @return the new Csymbian_ua_guiDocument
  */
-Csymbian_ua_guiDocument* Csymbian_ua_guiDocument::NewL( CEikApplication& aApp )
-	{
-	Csymbian_ua_guiDocument* self = new ( ELeave ) Csymbian_ua_guiDocument( aApp );
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( self );
-	return self;
-	}
+Csymbian_ua_guiDocument* Csymbian_ua_guiDocument::NewL (CEikApplication& aApp)
+{
+    Csymbian_ua_guiDocument* self = new (ELeave) Csymbian_ua_guiDocument (aApp);
+    CleanupStack::PushL (self);
+    self->ConstructL();
+    CleanupStack::Pop (self);
+    return self;
+}
 
 /**
  * @brief Creates the application UI object for this document.
  * @return the new instance
- */	
+ */
 CEikAppUi* Csymbian_ua_guiDocument::CreateAppUiL()
-	{
-	return new ( ELeave ) Csymbian_ua_guiAppUi;
-	}
-				
+{
+    return new (ELeave) Csymbian_ua_guiAppUi;
+}
+
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiSettingItemList.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiSettingItemList.cpp
index 27f3d6e5ce3c2793c376ae827d531342cea8e787..f9a72fc296c81098e8f4f0bed1dbd748ace85ddd 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiSettingItemList.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiSettingItemList.cpp
@@ -3,7 +3,7 @@
  Name        : symbian_ua_guiSettingItemList.cpp
  Author      : nanang
  Copyright   : (c) 2008-2009 Teluu Inc.
- Description : 
+ Description :
 ========================================================================
 */
 
@@ -22,7 +22,7 @@
 #include <aknpopupfieldtext.h>
 #include <eikappui.h>
 #include <aknviewappui.h>
-#include <akntextsettingpage.h> 
+#include <akntextsettingpage.h>
 #include <symbian_ua_gui.rsg>
 // ]]] end generated region [Generated System Includes]
 
@@ -43,8 +43,8 @@
 // ]]] end generated region [Generated Constants]
 
 
-_LIT(KtxDicFileName			,"settings.ini" );
- 
+_LIT (KtxDicFileName			,"settings.ini");
+
 const TInt KRegistrar		= 2;
 const TInt KUsername		= 3;
 const TInt KPassword		= 4;
@@ -55,36 +55,35 @@ const TInt KIce				= 7;
 /**
  * Construct the CSymbian_ua_guiSettingItemList instance
  * @param aCommandObserver command observer
- */ 
-CSymbian_ua_guiSettingItemList::CSymbian_ua_guiSettingItemList( 
-		TSymbian_ua_guiSettingItemListSettings& aSettings, 
-		MEikCommandObserver* aCommandObserver )
-	: iSettings( aSettings ), iCommandObserver( aCommandObserver )
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
-	
-	}
-/** 
+ */
+CSymbian_ua_guiSettingItemList::CSymbian_ua_guiSettingItemList (
+    TSymbian_ua_guiSettingItemListSettings& aSettings,
+    MEikCommandObserver* aCommandObserver)
+        : iSettings (aSettings), iCommandObserver (aCommandObserver)
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
+
+}
+/**
  * Destroy any instance variables
  */
 CSymbian_ua_guiSettingItemList::~CSymbian_ua_guiSettingItemList()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
-	
-	}
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
+
+}
 
 /**
  * Handle system notification that the container's size has changed.
  */
 void CSymbian_ua_guiSettingItemList::SizeChanged()
-	{
-	if ( ListBox() ) 
-		{
-		ListBox()->SetRect( Rect() );
-		}
-	}
+{
+    if (ListBox()) {
+        ListBox()->SetRect (Rect());
+    }
+}
 
 /**
  * Create one setting item at a time, identified by id.
@@ -93,73 +92,66 @@ void CSymbian_ua_guiSettingItemList::SizeChanged()
  * a reference to the underlying data, which EditItemL() uses
  * to edit and store the value.
  */
-CAknSettingItem* CSymbian_ua_guiSettingItemList::CreateSettingItemL( TInt aId )
-	{
-	switch ( aId )
-		{
-	// [[[ begin generated region: do not modify [Initializers]
-		case ESymbian_ua_guiSettingItemListViewEd_registrar:
-			{			
-			CAknTextSettingItem* item = new ( ELeave ) 
-				CAknTextSettingItem( 
-					aId,
-					iSettings.Ed_registrar() );
-			item->SetSettingPageFlags(CAknTextSettingPage::EZeroLengthAllowed);
-			return item;
-			}
-		case ESymbian_ua_guiSettingItemListViewEd_user:
-			{			
-			CAknTextSettingItem* item = new ( ELeave ) 
-				CAknTextSettingItem( 
-					aId,
-					iSettings.Ed_user() );
-			item->SetSettingPageFlags(CAknTextSettingPage::EZeroLengthAllowed);
-			return item;
-			}
-		case ESymbian_ua_guiSettingItemListViewEd_password:
-			{			
-			CAknPasswordSettingItem* item = new ( ELeave ) 
-				CAknPasswordSettingItem( 
-					aId,
-					CAknPasswordSettingItem::EAlpha,
-					iSettings.Ed_password() );
-			item->SetSettingPageFlags(CAknTextSettingPage::EZeroLengthAllowed);
-			return item;
-			}
-		case ESymbian_ua_guiSettingItemListViewB_srtp:
-			{			
-			CAknBinaryPopupSettingItem* item = new ( ELeave ) 
-				CAknBinaryPopupSettingItem( 
-					aId,
-					iSettings.B_srtp() );
-			item->SetHidden( ETrue ); 
-			return item;
-			}
-		case ESymbian_ua_guiSettingItemListViewB_ice:
-			{			
-			CAknBinaryPopupSettingItem* item = new ( ELeave ) 
-				CAknBinaryPopupSettingItem( 
-					aId,
-					iSettings.B_ice() );
-			item->SetHidden( ETrue ); 
-			return item;
-			}
-		case ESymbian_ua_guiSettingItemListViewEd_stun_server:
-			{			
-			CAknTextSettingItem* item = new ( ELeave ) 
-				CAknTextSettingItem( 
-					aId,
-					iSettings.Ed_stun_server() );
-			item->SetHidden( ETrue ); 
-			return item;
-			}
-	// ]]] end generated region [Initializers]
-	
-		}
-		
-	return NULL;
-	}
-	
+CAknSettingItem* CSymbian_ua_guiSettingItemList::CreateSettingItemL (TInt aId)
+{
+    switch (aId) {
+            // [[[ begin generated region: do not modify [Initializers]
+        case ESymbian_ua_guiSettingItemListViewEd_registrar: {
+            CAknTextSettingItem* item = new (ELeave)
+            CAknTextSettingItem (
+                aId,
+                iSettings.Ed_registrar());
+            item->SetSettingPageFlags (CAknTextSettingPage::EZeroLengthAllowed);
+            return item;
+        }
+        case ESymbian_ua_guiSettingItemListViewEd_user: {
+            CAknTextSettingItem* item = new (ELeave)
+            CAknTextSettingItem (
+                aId,
+                iSettings.Ed_user());
+            item->SetSettingPageFlags (CAknTextSettingPage::EZeroLengthAllowed);
+            return item;
+        }
+        case ESymbian_ua_guiSettingItemListViewEd_password: {
+            CAknPasswordSettingItem* item = new (ELeave)
+            CAknPasswordSettingItem (
+                aId,
+                CAknPasswordSettingItem::EAlpha,
+                iSettings.Ed_password());
+            item->SetSettingPageFlags (CAknTextSettingPage::EZeroLengthAllowed);
+            return item;
+        }
+        case ESymbian_ua_guiSettingItemListViewB_srtp: {
+            CAknBinaryPopupSettingItem* item = new (ELeave)
+            CAknBinaryPopupSettingItem (
+                aId,
+                iSettings.B_srtp());
+            item->SetHidden (ETrue);
+            return item;
+        }
+        case ESymbian_ua_guiSettingItemListViewB_ice: {
+            CAknBinaryPopupSettingItem* item = new (ELeave)
+            CAknBinaryPopupSettingItem (
+                aId,
+                iSettings.B_ice());
+            item->SetHidden (ETrue);
+            return item;
+        }
+        case ESymbian_ua_guiSettingItemListViewEd_stun_server: {
+            CAknTextSettingItem* item = new (ELeave)
+            CAknTextSettingItem (
+                aId,
+                iSettings.Ed_stun_server());
+            item->SetHidden (ETrue);
+            return item;
+        }
+        // ]]] end generated region [Initializers]
+
+    }
+
+    return NULL;
+}
+
 /**
  * Edit the setting item identified by the given id and store
  * the changes into the store.
@@ -168,256 +160,254 @@ CAknSettingItem* CSymbian_ua_guiSettingItemList::CreateSettingItemL( TInt aId )
  *	always show the edit page and interactively edit the item;
  *	false: change the item in place if possible, else show the edit page
  */
-void CSymbian_ua_guiSettingItemList::EditItemL ( TInt aIndex, TBool aCalledFromMenu )
-	{
-	CAknSettingItem* item = ( *SettingItemArray() )[aIndex];
-	switch ( item->Identifier() )
-		{
-	// [[[ begin generated region: do not modify [Editing Started Invoker]
-	// ]]] end generated region [Editing Started Invoker]
-	
-		}
-	
-	CAknSettingItemList::EditItemL( aIndex, aCalledFromMenu );
-	
-	TBool storeValue = ETrue;
-	switch ( item->Identifier() )
-		{
-	// [[[ begin generated region: do not modify [Editing Stopped Invoker]
-	// ]]] end generated region [Editing Stopped Invoker]
-	
-		}
-		
-	if ( storeValue )
-		{
-		item->StoreL();
-		SaveSettingValuesL();
-		}	
-	}
+void CSymbian_ua_guiSettingItemList::EditItemL (TInt aIndex, TBool aCalledFromMenu)
+{
+    CAknSettingItem* item = (*SettingItemArray()) [aIndex];
+
+    switch (item->Identifier()) {
+            // [[[ begin generated region: do not modify [Editing Started Invoker]
+            // ]]] end generated region [Editing Started Invoker]
+
+    }
+
+    CAknSettingItemList::EditItemL (aIndex, aCalledFromMenu);
+
+    TBool storeValue = ETrue;
+
+    switch (item->Identifier()) {
+            // [[[ begin generated region: do not modify [Editing Stopped Invoker]
+            // ]]] end generated region [Editing Stopped Invoker]
+
+    }
+
+    if (storeValue) {
+        item->StoreL();
+        SaveSettingValuesL();
+    }
+}
 /**
  *	Handle the "Change" option on the Options menu.  This is an
  *	alternative to the Selection key that forces the settings page
  *	to come up rather than changing the value in place (if possible).
  */
 void CSymbian_ua_guiSettingItemList::ChangeSelectedItemL()
-	{
-	if ( ListBox()->CurrentItemIndex() >= 0 )
-		{
-		EditItemL( ListBox()->CurrentItemIndex(), ETrue );
-		}
-	}
+{
+    if (ListBox()->CurrentItemIndex() >= 0) {
+        EditItemL (ListBox()->CurrentItemIndex(), ETrue);
+    }
+}
 
 /**
  *	Load the initial contents of the setting items.  By default,
  *	the setting items are populated with the default values from
  * 	the design.  You can override those values here.
  *	<p>
- *	Note: this call alone does not update the UI.  
+ *	Note: this call alone does not update the UI.
  *	LoadSettingsL() must be called afterwards.
  */
 void CSymbian_ua_guiSettingItemList::LoadSettingValuesL()
-	{
-	// load values into iSettings
+{
+    // load values into iSettings
 
-	TFileName path;
-	TFileName pathWithoutDrive;
-	CEikonEnv::Static()->FsSession().PrivatePath( pathWithoutDrive );
+    TFileName path;
+    TFileName pathWithoutDrive;
+    CEikonEnv::Static()->FsSession().PrivatePath (pathWithoutDrive);
 
-	// Extract drive letter into appDrive:
+    // Extract drive letter into appDrive:
 #ifdef __WINS__
-	path.Copy( _L("c:") );
+    path.Copy (_L ("c:"));
 #else
-	RProcess process;
-	path.Copy( process.FileName().Left(2) );
+    RProcess process;
+    path.Copy (process.FileName().Left (2));
 #endif
 
-	path.Append( pathWithoutDrive );
-	path.Append( KtxDicFileName );
-	
-	TFindFile AufFolder(CCoeEnv::Static()->FsSession());
-	if(KErrNone == AufFolder.FindByDir(path, KNullDesC))
-	{
-		CDictionaryFileStore* MyDStore = CDictionaryFileStore::OpenLC(CCoeEnv::Static()->FsSession(),AufFolder.File(), TUid::Uid(1));
-		TUid FileUid;
-		
-		FileUid.iUid = KRegistrar;
-		if(MyDStore->IsPresentL(FileUid))
-		{
-			RDictionaryReadStream in;
-			in.OpenLC(*MyDStore,FileUid);
-			in >> iSettings.Ed_registrar();
-			CleanupStack::PopAndDestroy(1);// in
-		}
-			
-		FileUid.iUid = KUsername;
-		if(MyDStore->IsPresentL(FileUid))
-		{
-			RDictionaryReadStream in;
-			in.OpenLC(*MyDStore,FileUid);
-			in >> iSettings.Ed_user();
-			CleanupStack::PopAndDestroy(1);// in
-		}
-
-		FileUid.iUid = KPassword;
-		if(MyDStore->IsPresentL(FileUid))
-		{
-			RDictionaryReadStream in;
-			in.OpenLC(*MyDStore,FileUid);
-			in >> iSettings.Ed_password();
-			CleanupStack::PopAndDestroy(1);// in
-		}
-
-		FileUid.iUid = KStunServer;
-		if(MyDStore->IsPresentL(FileUid))
-		{
-			RDictionaryReadStream in;
-			in.OpenLC(*MyDStore,FileUid);
-			in >> iSettings.Ed_stun_server();
-			CleanupStack::PopAndDestroy(1);// in
-		}
-
-		FileUid.iUid = KSrtp;
-		if(MyDStore->IsPresentL(FileUid))
-		{
-			RDictionaryReadStream in;
-			in.OpenLC(*MyDStore,FileUid);
-			iSettings.SetB_srtp((TBool)in.ReadInt32L());
-			CleanupStack::PopAndDestroy(1);// in
-		}
-		
-		FileUid.iUid = KIce;
-		if(MyDStore->IsPresentL(FileUid))
-		{
-			RDictionaryReadStream in;
-			in.OpenLC(*MyDStore,FileUid);
-			iSettings.SetB_ice((TBool)in.ReadInt32L());
-			CleanupStack::PopAndDestroy(1);// in
-		}
-
-		CleanupStack::PopAndDestroy(1);// Store		
-	}
-
-	}
-	
+    path.Append (pathWithoutDrive);
+    path.Append (KtxDicFileName);
+
+    TFindFile AufFolder (CCoeEnv::Static()->FsSession());
+
+    if (KErrNone == AufFolder.FindByDir (path, KNullDesC)) {
+        CDictionaryFileStore* MyDStore = CDictionaryFileStore::OpenLC (CCoeEnv::Static()->FsSession(),AufFolder.File(), TUid::Uid (1));
+        TUid FileUid;
+
+        FileUid.iUid = KRegistrar;
+
+        if (MyDStore->IsPresentL (FileUid)) {
+            RDictionaryReadStream in;
+            in.OpenLC (*MyDStore,FileUid);
+            in >> iSettings.Ed_registrar();
+            CleanupStack::PopAndDestroy (1);// in
+        }
+
+        FileUid.iUid = KUsername;
+
+        if (MyDStore->IsPresentL (FileUid)) {
+            RDictionaryReadStream in;
+            in.OpenLC (*MyDStore,FileUid);
+            in >> iSettings.Ed_user();
+            CleanupStack::PopAndDestroy (1);// in
+        }
+
+        FileUid.iUid = KPassword;
+
+        if (MyDStore->IsPresentL (FileUid)) {
+            RDictionaryReadStream in;
+            in.OpenLC (*MyDStore,FileUid);
+            in >> iSettings.Ed_password();
+            CleanupStack::PopAndDestroy (1);// in
+        }
+
+        FileUid.iUid = KStunServer;
+
+        if (MyDStore->IsPresentL (FileUid)) {
+            RDictionaryReadStream in;
+            in.OpenLC (*MyDStore,FileUid);
+            in >> iSettings.Ed_stun_server();
+            CleanupStack::PopAndDestroy (1);// in
+        }
+
+        FileUid.iUid = KSrtp;
+
+        if (MyDStore->IsPresentL (FileUid)) {
+            RDictionaryReadStream in;
+            in.OpenLC (*MyDStore,FileUid);
+            iSettings.SetB_srtp ( (TBool) in.ReadInt32L());
+            CleanupStack::PopAndDestroy (1);// in
+        }
+
+        FileUid.iUid = KIce;
+
+        if (MyDStore->IsPresentL (FileUid)) {
+            RDictionaryReadStream in;
+            in.OpenLC (*MyDStore,FileUid);
+            iSettings.SetB_ice ( (TBool) in.ReadInt32L());
+            CleanupStack::PopAndDestroy (1);// in
+        }
+
+        CleanupStack::PopAndDestroy (1);// Store
+    }
+
+}
+
 /**
  *	Save the contents of the setting items.  Note, this is called
  *	whenever an item is changed and stored to the model, so it
  *	may be called multiple times or not at all.
  */
 void CSymbian_ua_guiSettingItemList::SaveSettingValuesL()
-	{
-	// store values from iSettings
+{
+    // store values from iSettings
 
-	TFileName path;
-	TFileName pathWithoutDrive;
-	CEikonEnv::Static()->FsSession().PrivatePath( pathWithoutDrive );
+    TFileName path;
+    TFileName pathWithoutDrive;
+    CEikonEnv::Static()->FsSession().PrivatePath (pathWithoutDrive);
 
-	// Extract drive letter into appDrive:
+    // Extract drive letter into appDrive:
 #ifdef __WINS__
-	path.Copy( _L("c:") );
+    path.Copy (_L ("c:"));
 #else
-	RProcess process;
-	path.Copy( process.FileName().Left(2) );
-	
-	if(path.Compare(_L("c")) || path.Compare(_L("C")))
-		CEikonEnv::Static()->FsSession().CreatePrivatePath(EDriveC);
-	else if(path.Compare(_L("e")) || path.Compare(_L("E")))
-		CEikonEnv::Static()->FsSession().CreatePrivatePath(EDriveE);	
+    RProcess process;
+    path.Copy (process.FileName().Left (2));
+
+    if (path.Compare (_L ("c")) || path.Compare (_L ("C")))
+        CEikonEnv::Static()->FsSession().CreatePrivatePath (EDriveC);
+    else if (path.Compare (_L ("e")) || path.Compare (_L ("E")))
+        CEikonEnv::Static()->FsSession().CreatePrivatePath (EDriveE);
+
 #endif
 
-	path.Append( pathWithoutDrive );
-	path.Append( KtxDicFileName );
-	
-	TFindFile AufFolder(CCoeEnv::Static()->FsSession());
-	if(KErrNone == AufFolder.FindByDir(path, KNullDesC))
-	{
-		User::LeaveIfError(CCoeEnv::Static()->FsSession().Delete(AufFolder.File()));
-	}
- 
-	CDictionaryFileStore* MyDStore = CDictionaryFileStore::OpenLC(CCoeEnv::Static()->FsSession(),path, TUid::Uid(1));
- 
-	TUid FileUid = {0x0};
-		
-	FileUid.iUid = KRegistrar;
-	RDictionaryWriteStream out1;
-	out1.AssignLC(*MyDStore,FileUid);
-	out1 << iSettings.Ed_registrar();
-	out1.CommitL(); 	
-	CleanupStack::PopAndDestroy(1);// out2	
-	
-	FileUid.iUid = KUsername;
-	RDictionaryWriteStream out2;
-	out2.AssignLC(*MyDStore,FileUid);
-	out2 << iSettings.Ed_user();
-	out2.CommitL(); 	
-	CleanupStack::PopAndDestroy(1);// out2	
-	
-	FileUid.iUid = KPassword;
-	RDictionaryWriteStream out3;
-	out3.AssignLC(*MyDStore,FileUid);
-	out3 << iSettings.Ed_password();
-	out3.CommitL(); 	
-	CleanupStack::PopAndDestroy(1);// out2	
-	
-	FileUid.iUid = KStunServer;
-	RDictionaryWriteStream out4;
-	out4.AssignLC(*MyDStore,FileUid);
-	out4 << iSettings.Ed_stun_server();
-	out4.CommitL(); 	
-	CleanupStack::PopAndDestroy(1);// out2	
-	
-	FileUid.iUid = KSrtp;
-	RDictionaryWriteStream out5;
-	out5.AssignLC(*MyDStore,FileUid);
-	out5.WriteInt32L(iSettings.B_srtp());
-	out5.CommitL(); 	
-	CleanupStack::PopAndDestroy(1);// out1
-	
-	FileUid.iUid = KIce;
-	RDictionaryWriteStream out6;
-	out6.AssignLC(*MyDStore,FileUid);
-	out6.WriteInt32L(iSettings.B_ice());
-	out6.CommitL(); 	
-	CleanupStack::PopAndDestroy(1);// out1
-	 
-	MyDStore->CommitL();
-	CleanupStack::PopAndDestroy(1);// Store
-
-	}
-
-
-/** 
+    path.Append (pathWithoutDrive);
+    path.Append (KtxDicFileName);
+
+    TFindFile AufFolder (CCoeEnv::Static()->FsSession());
+
+    if (KErrNone == AufFolder.FindByDir (path, KNullDesC)) {
+        User::LeaveIfError (CCoeEnv::Static()->FsSession().Delete (AufFolder.File()));
+    }
+
+    CDictionaryFileStore* MyDStore = CDictionaryFileStore::OpenLC (CCoeEnv::Static()->FsSession(),path, TUid::Uid (1));
+
+    TUid FileUid = {0x0};
+
+    FileUid.iUid = KRegistrar;
+    RDictionaryWriteStream out1;
+    out1.AssignLC (*MyDStore,FileUid);
+    out1 << iSettings.Ed_registrar();
+    out1.CommitL();
+    CleanupStack::PopAndDestroy (1);// out2
+
+    FileUid.iUid = KUsername;
+    RDictionaryWriteStream out2;
+    out2.AssignLC (*MyDStore,FileUid);
+    out2 << iSettings.Ed_user();
+    out2.CommitL();
+    CleanupStack::PopAndDestroy (1);// out2
+
+    FileUid.iUid = KPassword;
+    RDictionaryWriteStream out3;
+    out3.AssignLC (*MyDStore,FileUid);
+    out3 << iSettings.Ed_password();
+    out3.CommitL();
+    CleanupStack::PopAndDestroy (1);// out2
+
+    FileUid.iUid = KStunServer;
+    RDictionaryWriteStream out4;
+    out4.AssignLC (*MyDStore,FileUid);
+    out4 << iSettings.Ed_stun_server();
+    out4.CommitL();
+    CleanupStack::PopAndDestroy (1);// out2
+
+    FileUid.iUid = KSrtp;
+    RDictionaryWriteStream out5;
+    out5.AssignLC (*MyDStore,FileUid);
+    out5.WriteInt32L (iSettings.B_srtp());
+    out5.CommitL();
+    CleanupStack::PopAndDestroy (1);// out1
+
+    FileUid.iUid = KIce;
+    RDictionaryWriteStream out6;
+    out6.AssignLC (*MyDStore,FileUid);
+    out6.WriteInt32L (iSettings.B_ice());
+    out6.CommitL();
+    CleanupStack::PopAndDestroy (1);// out1
+
+    MyDStore->CommitL();
+    CleanupStack::PopAndDestroy (1);// Store
+
+}
+
+
+/**
  * Handle global resource changes, such as scalable UI or skin events (override)
  */
-void CSymbian_ua_guiSettingItemList::HandleResourceChange( TInt aType )
-	{
-	CAknSettingItemList::HandleResourceChange( aType );
-	SetRect( iAvkonViewAppUi->View( TUid::Uid( ESymbian_ua_guiSettingItemListViewId ) )->ClientRect() );
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
-	
-	}
-				
-/** 
+void CSymbian_ua_guiSettingItemList::HandleResourceChange (TInt aType)
+{
+    CAknSettingItemList::HandleResourceChange (aType);
+    SetRect (iAvkonViewAppUi->View (TUid::Uid (ESymbian_ua_guiSettingItemListViewId))->ClientRect());
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
+
+}
+
+/**
  * Handle key event (override)
  * @param aKeyEvent key event
  * @param aType event code
  * @return EKeyWasConsumed if the event was handled, else EKeyWasNotConsumed
  */
-TKeyResponse CSymbian_ua_guiSettingItemList::OfferKeyEventL( 
-		const TKeyEvent& aKeyEvent, 
-		TEventCode aType )
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
-	
-	if ( aKeyEvent.iCode == EKeyLeftArrow 
-		|| aKeyEvent.iCode == EKeyRightArrow )
-		{
-		// allow the tab control to get the arrow keys
-		return EKeyWasNotConsumed;
-		}
-	
-	return CAknSettingItemList::OfferKeyEventL( aKeyEvent, aType );
-	}
-				
+TKeyResponse CSymbian_ua_guiSettingItemList::OfferKeyEventL (
+    const TKeyEvent& aKeyEvent,
+    TEventCode aType)
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
+
+    if (aKeyEvent.iCode == EKeyLeftArrow
+            || aKeyEvent.iCode == EKeyRightArrow) {
+        // allow the tab control to get the arrow keys
+        return EKeyWasNotConsumed;
+    }
+
+    return CAknSettingItemList::OfferKeyEventL (aKeyEvent, aType);
+}
+
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiSettingItemListView.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiSettingItemListView.cpp
index 243ff994c57092b657a7f86bcee643b8393be22e..656c761e89d464b35160cbf723354d7a03932622 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiSettingItemListView.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symbian_ua_gui/src/symbian_ua_guiSettingItemListView.cpp
@@ -3,7 +3,7 @@
  Name        : symbian_ua_guiSettingItemListView.cpp
  Author      : nanang
  Copyright   : (c) 2008-2009 Teluu Inc.
- Description : 
+ Description :
 ========================================================================
 */
 // [[[ begin generated region: do not modify [Generated System Includes]
@@ -36,21 +36,21 @@
  * code that could leave.
  */
 Csymbian_ua_guiSettingItemListView::Csymbian_ua_guiSettingItemListView()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
-	
-	}
-/** 
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
+
+}
+/**
  * The view's destructor removes the container from the control
  * stack and destroys it.
  */
 Csymbian_ua_guiSettingItemListView::~Csymbian_ua_guiSettingItemListView()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	// ]]] end generated region [Generated Contents]
-	
-	}
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    // ]]] end generated region [Generated Contents]
+
+}
 
 /**
  * Symbian two-phase constructor.
@@ -59,11 +59,11 @@ Csymbian_ua_guiSettingItemListView::~Csymbian_ua_guiSettingItemListView()
  * @return new instance of Csymbian_ua_guiSettingItemListView
  */
 Csymbian_ua_guiSettingItemListView* Csymbian_ua_guiSettingItemListView::NewL()
-	{
-	Csymbian_ua_guiSettingItemListView* self = Csymbian_ua_guiSettingItemListView::NewLC();
-	CleanupStack::Pop( self );
-	return self;
-	}
+{
+    Csymbian_ua_guiSettingItemListView* self = Csymbian_ua_guiSettingItemListView::NewLC();
+    CleanupStack::Pop (self);
+    return self;
+}
 
 /**
  * Symbian two-phase constructor.
@@ -72,214 +72,214 @@ Csymbian_ua_guiSettingItemListView* Csymbian_ua_guiSettingItemListView::NewL()
  * @return new instance of Csymbian_ua_guiSettingItemListView
  */
 Csymbian_ua_guiSettingItemListView* Csymbian_ua_guiSettingItemListView::NewLC()
-	{
-	Csymbian_ua_guiSettingItemListView* self = new ( ELeave ) Csymbian_ua_guiSettingItemListView();
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	return self;
-	}
+{
+    Csymbian_ua_guiSettingItemListView* self = new (ELeave) Csymbian_ua_guiSettingItemListView();
+    CleanupStack::PushL (self);
+    self->ConstructL();
+    return self;
+}
 
 
 /**
- * Second-phase constructor for view.  
+ * Second-phase constructor for view.
  * Initialize contents from resource.
- */ 
+ */
 void Csymbian_ua_guiSettingItemListView::ConstructL()
-	{
-	// [[[ begin generated region: do not modify [Generated Code]
-	BaseConstructL( R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_VIEW );
-	// ]]] end generated region [Generated Code]
-	
-	// add your own initialization code here
-	}
-	
+{
+    // [[[ begin generated region: do not modify [Generated Code]
+    BaseConstructL (R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_VIEW);
+    // ]]] end generated region [Generated Code]
+
+    // add your own initialization code here
+}
+
 /**
  * @return The UID for this view
  */
 TUid Csymbian_ua_guiSettingItemListView::Id() const
-	{
-	return TUid::Uid( ESymbian_ua_guiSettingItemListViewId );
-	}
+{
+    return TUid::Uid (ESymbian_ua_guiSettingItemListViewId);
+}
 
 /**
  * Handle a command for this view (override)
  * @param aCommand command id to be handled
  */
-void Csymbian_ua_guiSettingItemListView::HandleCommandL( TInt aCommand )
-	{   
-	// [[[ begin generated region: do not modify [Generated Code]
-	TBool commandHandled = EFalse;
-	switch ( aCommand )
-		{	// code to dispatch to the AknView's menu and CBA commands is generated here
-	
-		case EAknSoftkeySave:
-			commandHandled = HandleControlPaneRightSoftKeyPressedL( aCommand );
-			break;
-		case ESymbian_ua_guiSettingItemListViewMenuItem1Command:
-			commandHandled = HandleChangeSelectedSettingItemL( aCommand );
-			break;
-		default:
-			break;
-		}
-	
-		
-	if ( !commandHandled ) 
-		{
-	
-		}
-	// ]]] end generated region [Generated Code]
-	
-	}
+void Csymbian_ua_guiSettingItemListView::HandleCommandL (TInt aCommand)
+{
+    // [[[ begin generated region: do not modify [Generated Code]
+    TBool commandHandled = EFalse;
+
+    switch (aCommand) {	// code to dispatch to the AknView's menu and CBA commands is generated here
+
+        case EAknSoftkeySave:
+            commandHandled = HandleControlPaneRightSoftKeyPressedL (aCommand);
+            break;
+        case ESymbian_ua_guiSettingItemListViewMenuItem1Command:
+            commandHandled = HandleChangeSelectedSettingItemL (aCommand);
+            break;
+        default:
+            break;
+    }
+
+
+    if (!commandHandled) {
+
+    }
+
+    // ]]] end generated region [Generated Code]
+
+}
 
 /**
- *	Handles user actions during activation of the view, 
+ *	Handles user actions during activation of the view,
  *	such as initializing the content.
  */
-void Csymbian_ua_guiSettingItemListView::DoActivateL(
-		const TVwsViewId& /*aPrevViewId*/,
-		TUid /*aCustomMessageId*/,
-		const TDesC8& /*aCustomMessage*/ )
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	SetupStatusPaneL();
-	
-	CEikButtonGroupContainer* cba = AppUi()->Cba();
-	if ( cba != NULL ) 
-		{
-		cba->MakeVisible( EFalse );
-		}
-	
-	if ( iSymbian_ua_guiSettingItemList == NULL )
-		{
-		iSettings = TSymbian_ua_guiSettingItemListSettings::NewL();
-		iSymbian_ua_guiSettingItemList = new ( ELeave ) CSymbian_ua_guiSettingItemList( *iSettings, this );
-		iSymbian_ua_guiSettingItemList->SetMopParent( this );
-		iSymbian_ua_guiSettingItemList->ConstructFromResourceL( R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_SYMBIAN_UA_GUI_SETTING_ITEM_LIST );
-		iSymbian_ua_guiSettingItemList->ActivateL();
-		iSymbian_ua_guiSettingItemList->LoadSettingValuesL();
-		iSymbian_ua_guiSettingItemList->LoadSettingsL();
-		AppUi()->AddToStackL( *this, iSymbian_ua_guiSettingItemList );
-		} 
-	// ]]] end generated region [Generated Contents]
-	
-	}
+void Csymbian_ua_guiSettingItemListView::DoActivateL (
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid /*aCustomMessageId*/,
+    const TDesC8& /*aCustomMessage*/)
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    SetupStatusPaneL();
+
+    CEikButtonGroupContainer* cba = AppUi()->Cba();
+
+    if (cba != NULL) {
+        cba->MakeVisible (EFalse);
+    }
+
+    if (iSymbian_ua_guiSettingItemList == NULL) {
+        iSettings = TSymbian_ua_guiSettingItemListSettings::NewL();
+        iSymbian_ua_guiSettingItemList = new (ELeave) CSymbian_ua_guiSettingItemList (*iSettings, this);
+        iSymbian_ua_guiSettingItemList->SetMopParent (this);
+        iSymbian_ua_guiSettingItemList->ConstructFromResourceL (R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_SYMBIAN_UA_GUI_SETTING_ITEM_LIST);
+        iSymbian_ua_guiSettingItemList->ActivateL();
+        iSymbian_ua_guiSettingItemList->LoadSettingValuesL();
+        iSymbian_ua_guiSettingItemList->LoadSettingsL();
+        AppUi()->AddToStackL (*this, iSymbian_ua_guiSettingItemList);
+    }
+
+    // ]]] end generated region [Generated Contents]
+
+}
 
 /**
  */
 void Csymbian_ua_guiSettingItemListView::DoDeactivate()
-	{
-	// [[[ begin generated region: do not modify [Generated Contents]
-	CleanupStatusPane();
-	
-	CEikButtonGroupContainer* cba = AppUi()->Cba();
-	if ( cba != NULL ) 
-		{
-		cba->MakeVisible( ETrue );
-		cba->DrawDeferred();
-		}
-	
-	if ( iSymbian_ua_guiSettingItemList != NULL )
-		{
-		AppUi()->RemoveFromStack( iSymbian_ua_guiSettingItemList );
-		delete iSymbian_ua_guiSettingItemList;
-		iSymbian_ua_guiSettingItemList = NULL;
-		delete iSettings;
-		iSettings = NULL;
-		}
-	// ]]] end generated region [Generated Contents]
-	
-	}
+{
+    // [[[ begin generated region: do not modify [Generated Contents]
+    CleanupStatusPane();
+
+    CEikButtonGroupContainer* cba = AppUi()->Cba();
+
+    if (cba != NULL) {
+        cba->MakeVisible (ETrue);
+        cba->DrawDeferred();
+    }
+
+    if (iSymbian_ua_guiSettingItemList != NULL) {
+        AppUi()->RemoveFromStack (iSymbian_ua_guiSettingItemList);
+        delete iSymbian_ua_guiSettingItemList;
+        iSymbian_ua_guiSettingItemList = NULL;
+        delete iSettings;
+        iSettings = NULL;
+    }
+
+    // ]]] end generated region [Generated Contents]
+
+}
 
 // [[[ begin generated function: do not modify
 void Csymbian_ua_guiSettingItemListView::SetupStatusPaneL()
-	{
-	// reset the context pane
-	TUid contextPaneUid = TUid::Uid( EEikStatusPaneUidContext );
-	CEikStatusPaneBase::TPaneCapabilities subPaneContext = 
-		StatusPane()->PaneCapabilities( contextPaneUid );
-	if ( subPaneContext.IsPresent() && subPaneContext.IsAppOwned() )
-		{
-		CAknContextPane* context = static_cast< CAknContextPane* > ( 
-			StatusPane()->ControlL( contextPaneUid ) );
-		context->SetPictureToDefaultL();
-		}
-	
-	// setup the title pane
-	TUid titlePaneUid = TUid::Uid( EEikStatusPaneUidTitle );
-	CEikStatusPaneBase::TPaneCapabilities subPaneTitle = 
-		StatusPane()->PaneCapabilities( titlePaneUid );
-	if ( subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned() )
-		{
-		CAknTitlePane* title = static_cast< CAknTitlePane* >( 
-			StatusPane()->ControlL( titlePaneUid ) );
-		TResourceReader reader;
-		iEikonEnv->CreateResourceReaderLC( reader, R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_TITLE_RESOURCE );
-		title->SetFromResourceL( reader );
-		CleanupStack::PopAndDestroy(); // reader internal state
-		}
-				
-	}
+{
+    // reset the context pane
+    TUid contextPaneUid = TUid::Uid (EEikStatusPaneUidContext);
+    CEikStatusPaneBase::TPaneCapabilities subPaneContext =
+        StatusPane()->PaneCapabilities (contextPaneUid);
+
+    if (subPaneContext.IsPresent() && subPaneContext.IsAppOwned()) {
+        CAknContextPane* context = static_cast< CAknContextPane* > (
+                                       StatusPane()->ControlL (contextPaneUid));
+        context->SetPictureToDefaultL();
+    }
+
+    // setup the title pane
+    TUid titlePaneUid = TUid::Uid (EEikStatusPaneUidTitle);
+    CEikStatusPaneBase::TPaneCapabilities subPaneTitle =
+        StatusPane()->PaneCapabilities (titlePaneUid);
+
+    if (subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned()) {
+        CAknTitlePane* title = static_cast< CAknTitlePane* > (
+                                   StatusPane()->ControlL (titlePaneUid));
+        TResourceReader reader;
+        iEikonEnv->CreateResourceReaderLC (reader, R_SYMBIAN_UA_GUI_SETTING_ITEM_LIST_TITLE_RESOURCE);
+        title->SetFromResourceL (reader);
+        CleanupStack::PopAndDestroy(); // reader internal state
+    }
+
+}
 // ]]] end generated function
 
 // [[[ begin generated function: do not modify
 void Csymbian_ua_guiSettingItemListView::CleanupStatusPane()
-	{
-	}
+{
+}
 // ]]] end generated function
 
-/** 
+/**
  * Handle status pane size change for this view (override)
  */
 void Csymbian_ua_guiSettingItemListView::HandleStatusPaneSizeChange()
-	{
-	CAknView::HandleStatusPaneSizeChange();
-	
-	// this may fail, but we're not able to propagate exceptions here
-	TInt result;
-	TRAP( result, SetupStatusPaneL() ); 
-	}
-	
-/** 
+{
+    CAknView::HandleStatusPaneSizeChange();
+
+    // this may fail, but we're not able to propagate exceptions here
+    TInt result;
+    TRAP (result, SetupStatusPaneL());
+}
+
+/**
  * Handle the selected event.
  * @param aCommand the command id invoked
  * @return ETrue if the command was handled, EFalse if not
  */
-TBool Csymbian_ua_guiSettingItemListView::HandleChangeSelectedSettingItemL( TInt aCommand )
-	{
-	iSymbian_ua_guiSettingItemList->ChangeSelectedItemL();
-	return ETrue;
-	}
-								
-/** 
+TBool Csymbian_ua_guiSettingItemListView::HandleChangeSelectedSettingItemL (TInt aCommand)
+{
+    iSymbian_ua_guiSettingItemList->ChangeSelectedItemL();
+    return ETrue;
+}
+
+/**
  * Handle the rightSoftKeyPressed event.
  * @return ETrue if the command was handled, EFalse if not
  */
-TBool Csymbian_ua_guiSettingItemListView::HandleControlPaneRightSoftKeyPressedL( TInt aCommand )
-	{
-	TUint8 domain[256] = {0};
-	TPtr8 cDomain(domain, sizeof(domain));
-	TUint8 user[64] = {0};
-	TPtr8 cUser(user, sizeof(user));
-	TUint8 pass[64] = {0};
-	TPtr8 cPass(pass, sizeof(pass));
-	
-	cDomain.Copy(iSettings->Ed_registrar());
-	cUser.Copy(iSettings->Ed_user());
-	cPass.Copy(iSettings->Ed_password());
-	symbian_ua_set_account((char*)domain, (char*)user, (char*)pass, false, false);
-	
-	AppUi()->ActivateLocalViewL(TUid::Uid(ESymbian_ua_guiContainerViewId));
-	return ETrue;
-	}
-
-/** 
+TBool Csymbian_ua_guiSettingItemListView::HandleControlPaneRightSoftKeyPressedL (TInt aCommand)
+{
+    TUint8 domain[256] = {0};
+    TPtr8 cDomain (domain, sizeof (domain));
+    TUint8 user[64] = {0};
+    TPtr8 cUser (user, sizeof (user));
+    TUint8 pass[64] = {0};
+    TPtr8 cPass (pass, sizeof (pass));
+
+    cDomain.Copy (iSettings->Ed_registrar());
+    cUser.Copy (iSettings->Ed_user());
+    cPass.Copy (iSettings->Ed_password());
+    symbian_ua_set_account ( (char*) domain, (char*) user, (char*) pass, false, false);
+
+    AppUi()->ActivateLocalViewL (TUid::Uid (ESymbian_ua_guiContainerViewId));
+    return ETrue;
+}
+
+/**
  * Handle the selected event.
  * @param aCommand the command id invoked
  * @return ETrue if the command was handled, EFalse if not
  */
-TBool Csymbian_ua_guiSettingItemListView::HandleCancelMenuItemSelectedL( TInt aCommand )
-	{
-	AppUi()->ActivateLocalViewL(TUid::Uid(ESymbian_ua_guiContainerViewId));
-	return ETrue;
-	}
-				
+TBool Csymbian_ua_guiSettingItemListView::HandleCancelMenuItemSelectedL (TInt aCommand)
+{
+    AppUi()->ActivateLocalViewL (TUid::Uid (ESymbian_ua_guiContainerViewId));
+    return ETrue;
+}
+
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symsndtest/app_main.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symsndtest/app_main.cpp
index b270fa71b2efca391ffd58cc25f9875f6252fd26..f31db07f1098ec5f0cf544ddc1977e801117ccad 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symsndtest/app_main.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symsndtest/app_main.cpp
@@ -1,5 +1,5 @@
 /* $Id: app_main.cpp 2821 2009-06-30 13:37:26Z nanang $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include <pjmedia-audiodev/audiodev.h>
 #include <pjmedia/delaybuf.h>
@@ -45,24 +45,24 @@ pj_pool_t *pool;
 pjmedia_delay_buf *delaybuf;
 
 /* Logging callback */
-static void log_writer(int level, const char *buf, unsigned len)
+static void log_writer (int level, const char *buf, unsigned len)
 {
     static wchar_t buf16[PJ_LOG_MAX_SIZE];
 
-    PJ_UNUSED_ARG(level);
+    PJ_UNUSED_ARG (level);
 
-    pj_ansi_to_unicode(buf, len, buf16, PJ_ARRAY_SIZE(buf16));
+    pj_ansi_to_unicode (buf, len, buf16, PJ_ARRAY_SIZE (buf16));
 
-    TPtrC16 aBuf((const TUint16*)buf16, (TInt)len);
-    console->Write(aBuf);
+    TPtrC16 aBuf ( (const TUint16*) buf16, (TInt) len);
+    console->Write (aBuf);
 }
 
 /* perror util */
-static void app_perror(const char *title, pj_status_t status)
+static void app_perror (const char *title, pj_status_t status)
 {
     char errmsg[PJ_ERR_MSG_SIZE];
-    pj_strerror(status, errmsg, sizeof(errmsg));
-    PJ_LOG(1,(THIS_FILE, "Error: %s: %s", title, errmsg));
+    pj_strerror (status, errmsg, sizeof (errmsg));
+    PJ_LOG (1, (THIS_FILE, "Error: %s: %s", title, errmsg));
 }
 
 /* Application init */
@@ -72,59 +72,64 @@ static pj_status_t app_init()
     pj_status_t status;
 
     /* Redirect log */
-    pj_log_set_log_func((void (*)(int,const char*,int)) &log_writer);
-    pj_log_set_decor(PJ_LOG_HAS_NEWLINE);
-    pj_log_set_level(3);
+    pj_log_set_log_func ( (void (*) (int,const char*,int)) &log_writer);
+    pj_log_set_decor (PJ_LOG_HAS_NEWLINE);
+    pj_log_set_level (3);
 
     /* Init pjlib */
     status = pj_init();
+
     if (status != PJ_SUCCESS) {
-    	app_perror("pj_init()", status);
-    	return status;
+        app_perror ("pj_init()", status);
+        return status;
     }
 
-    pj_caching_pool_init(&cp, NULL, 0);
+    pj_caching_pool_init (&cp, NULL, 0);
 
     /* Init sound subsystem */
-    status = pjmedia_aud_subsys_init(&cp.factory);
+    status = pjmedia_aud_subsys_init (&cp.factory);
+
     if (status != PJ_SUCCESS) {
-    	app_perror("pjmedia_snd_init()", status);
-        pj_caching_pool_destroy(&cp);
-    	pj_shutdown();
-    	return status;
+        app_perror ("pjmedia_snd_init()", status);
+        pj_caching_pool_destroy (&cp);
+        pj_shutdown();
+        return status;
     }
 
     count = pjmedia_aud_dev_count();
-    PJ_LOG(3,(THIS_FILE, "Device count: %d", count));
+    PJ_LOG (3, (THIS_FILE, "Device count: %d", count));
+
     for (i=0; i<count; ++i) {
-    	pjmedia_aud_dev_info info;
-    	pj_status_t status;
-
-    	status = pjmedia_aud_dev_get_info(i, &info);
-    	pj_assert(status == PJ_SUCCESS);
-    	PJ_LOG(3, (THIS_FILE, "%d: %s %d/%d %dHz",
-    		   i, info.name, info.input_count, info.output_count,
-    		   info.default_samples_per_sec));
+        pjmedia_aud_dev_info info;
+        pj_status_t status;
+
+        status = pjmedia_aud_dev_get_info (i, &info);
+        pj_assert (status == PJ_SUCCESS);
+        PJ_LOG (3, (THIS_FILE, "%d: %s %d/%d %dHz",
+                    i, info.name, info.input_count, info.output_count,
+                    info.default_samples_per_sec));
     }
 
     /* Create pool */
-    pool = pj_pool_create(&cp.factory, THIS_FILE, 512, 512, NULL);
+    pool = pj_pool_create (&cp.factory, THIS_FILE, 512, 512, NULL);
+
     if (pool == NULL) {
-    	app_perror("pj_pool_create()", status);
-        pj_caching_pool_destroy(&cp);
-    	pj_shutdown();
-    	return status;
+        app_perror ("pj_pool_create()", status);
+        pj_caching_pool_destroy (&cp);
+        pj_shutdown();
+        return status;
     }
 
     /* Init delay buffer */
-    status = pjmedia_delay_buf_create(pool, THIS_FILE, CLOCK_RATE,
-				      SAMPLES_PER_FRAME, CHANNEL_COUNT,
-				      0, 0, &delaybuf);
+    status = pjmedia_delay_buf_create (pool, THIS_FILE, CLOCK_RATE,
+                                       SAMPLES_PER_FRAME, CHANNEL_COUNT,
+                                       0, 0, &delaybuf);
+
     if (status != PJ_SUCCESS) {
-    	app_perror("pjmedia_delay_buf_create()", status);
+        app_perror ("pjmedia_delay_buf_create()", status);
         //pj_caching_pool_destroy(&cp);
-    	//pj_shutdown();
-    	//return status;
+        //pj_shutdown();
+        //return status;
     }
 
     return PJ_SUCCESS;
@@ -132,16 +137,16 @@ static pj_status_t app_init()
 
 
 /* Sound capture callback */
-static pj_status_t rec_cb(void *user_data,
-			  pjmedia_frame *frame)
+static pj_status_t rec_cb (void *user_data,
+                           pjmedia_frame *frame)
 {
-    PJ_UNUSED_ARG(user_data);
+    PJ_UNUSED_ARG (user_data);
 
-    pjmedia_delay_buf_put(delaybuf, (pj_int16_t*)frame->buf);
+    pjmedia_delay_buf_put (delaybuf, (pj_int16_t*) frame->buf);
 
     if (frame->size != SAMPLES_PER_FRAME*2) {
-		PJ_LOG(3, (THIS_FILE, "Size captured = %u",
-	 		   frame->size));
+        PJ_LOG (3, (THIS_FILE, "Size captured = %u",
+                    frame->size));
     }
 
     ++rec_cnt;
@@ -149,12 +154,12 @@ static pj_status_t rec_cb(void *user_data,
 }
 
 /* Play cb */
-static pj_status_t play_cb(void *user_data,
-			   pjmedia_frame *frame)
+static pj_status_t play_cb (void *user_data,
+                            pjmedia_frame *frame)
 {
-    PJ_UNUSED_ARG(user_data);
+    PJ_UNUSED_ARG (user_data);
 
-    pjmedia_delay_buf_get(delaybuf, (pj_int16_t*)frame->buf);
+    pjmedia_delay_buf_get (delaybuf, (pj_int16_t*) frame->buf);
     frame->size = SAMPLES_PER_FRAME*2;
     frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
 
@@ -163,39 +168,41 @@ static pj_status_t play_cb(void *user_data,
 }
 
 /* Start sound */
-static pj_status_t snd_start(unsigned flag)
+static pj_status_t snd_start (unsigned flag)
 {
     pjmedia_aud_param param;
     pj_status_t status;
 
     if (strm != NULL) {
-    	app_perror("snd already open", PJ_EINVALIDOP);
-    	return PJ_EINVALIDOP;
+        app_perror ("snd already open", PJ_EINVALIDOP);
+        return PJ_EINVALIDOP;
     }
 
-    pjmedia_aud_dev_default_param(0, &param);
+    pjmedia_aud_dev_default_param (0, &param);
     param.channel_count = CHANNEL_COUNT;
     param.clock_rate = CLOCK_RATE;
     param.samples_per_frame = SAMPLES_PER_FRAME;
     param.dir = (pjmedia_dir) flag;
 
-    status = pjmedia_aud_stream_create(&param, &rec_cb, &play_cb, NULL, &strm);
+    status = pjmedia_aud_stream_create (&param, &rec_cb, &play_cb, NULL, &strm);
+
     if (status != PJ_SUCCESS) {
-    	app_perror("snd open", status);
-    	return status;
+        app_perror ("snd open", status);
+        return status;
     }
 
     rec_cnt = play_cnt = 0;
-    pj_gettimeofday(&t_start);
+    pj_gettimeofday (&t_start);
+
+    pjmedia_delay_buf_reset (delaybuf);
 
-    pjmedia_delay_buf_reset(delaybuf);
+    status = pjmedia_aud_stream_start (strm);
 
-    status = pjmedia_aud_stream_start(strm);
     if (status != PJ_SUCCESS) {
-    	app_perror("snd start", status);
-    	pjmedia_aud_stream_destroy(strm);
-    	strm = NULL;
-    	return status;
+        app_perror ("snd start", status);
+        pjmedia_aud_stream_destroy (strm);
+        strm = NULL;
+        return status;
     }
 
     return PJ_SUCCESS;
@@ -208,23 +215,25 @@ static pj_status_t snd_stop()
     pj_status_t status;
 
     if (strm == NULL) {
-    	app_perror("snd not open", PJ_EINVALIDOP);
-    	return PJ_EINVALIDOP;
+        app_perror ("snd not open", PJ_EINVALIDOP);
+        return PJ_EINVALIDOP;
     }
 
-    status = pjmedia_aud_stream_stop(strm);
+    status = pjmedia_aud_stream_stop (strm);
+
     if (status != PJ_SUCCESS) {
-    	app_perror("snd failed to stop", status);
+        app_perror ("snd failed to stop", status);
     }
-    status = pjmedia_aud_stream_destroy(strm);
+
+    status = pjmedia_aud_stream_destroy (strm);
     strm = NULL;
 
-    pj_gettimeofday(&now);
-    PJ_TIME_VAL_SUB(now, t_start);
+    pj_gettimeofday (&now);
+    PJ_TIME_VAL_SUB (now, t_start);
 
-    PJ_LOG(3,(THIS_FILE, "Duration: %d.%03d", now.sec, now.msec));
-    PJ_LOG(3,(THIS_FILE, "Captured: %d", rec_cnt));
-    PJ_LOG(3,(THIS_FILE, "Played: %d", play_cnt));
+    PJ_LOG (3, (THIS_FILE, "Duration: %d.%03d", now.sec, now.msec));
+    PJ_LOG (3, (THIS_FILE, "Captured: %d", rec_cnt));
+    PJ_LOG (3, (THIS_FILE, "Played: %d", play_cnt));
 
     return status;
 }
@@ -233,12 +242,12 @@ static pj_status_t snd_stop()
 static void app_fini()
 {
     if (strm)
-    	snd_stop();
+        snd_stop();
 
     pjmedia_aud_subsys_shutdown();
-    pjmedia_delay_buf_destroy(delaybuf);
-    pj_pool_release(pool);
-    pj_caching_pool_destroy(&cp);
+    pjmedia_delay_buf_destroy (delaybuf);
+    pj_pool_release (pool);
+    pj_caching_pool_destroy (&cp);
     pj_shutdown();
 }
 
@@ -251,37 +260,37 @@ static void app_fini()
 
 class ConsoleUI : public CActive
 {
-public:
-    ConsoleUI(CConsoleBase *con);
+    public:
+        ConsoleUI (CConsoleBase *con);
 
-    // Run console UI
-    void Run();
+        // Run console UI
+        void Run();
 
-    // Stop
-    void Stop();
+        // Stop
+        void Stop();
 
-protected:
-    // Cancel asynchronous read.
-    void DoCancel();
+    protected:
+        // Cancel asynchronous read.
+        void DoCancel();
 
-    // Implementation: called when read has completed.
-    void RunL();
+        // Implementation: called when read has completed.
+        void RunL();
 
-private:
-    CConsoleBase *con_;
+    private:
+        CConsoleBase *con_;
 };
 
 
-ConsoleUI::ConsoleUI(CConsoleBase *con)
-: CActive(EPriorityUserInput), con_(con)
+ConsoleUI::ConsoleUI (CConsoleBase *con)
+        : CActive (EPriorityUserInput), con_ (con)
 {
-    CActiveScheduler::Add(this);
+    CActiveScheduler::Add (this);
 }
 
 // Run console UI
 void ConsoleUI::Run()
 {
-    con_->Read(iStatus);
+    con_->Read (iStatus);
     SetActive();
 }
 
@@ -299,13 +308,13 @@ void ConsoleUI::DoCancel()
 
 static void PrintMenu()
 {
-    PJ_LOG(3, (THIS_FILE, "\n\n"
-	    "Menu:\n"
-	    "  a    Start bidir sound\n"
-	    "  t    Start recorder\n"
-	    "  p    Start player\n"
-	    "  d    Stop & close sound\n"
-	    "  w    Quit\n"));
+    PJ_LOG (3, (THIS_FILE, "\n\n"
+                "Menu:\n"
+                "  a    Start bidir sound\n"
+                "  t    Start recorder\n"
+                "  p    Start player\n"
+                "  d    Stop & close sound\n"
+                "  w    Quit\n"));
 }
 
 // Implementation: called when read has completed.
@@ -315,33 +324,33 @@ void ConsoleUI::RunL()
     pj_bool_t reschedule = PJ_TRUE;
 
     switch (kc) {
-    case 'w':
-	    snd_stop();
-	    CActiveScheduler::Stop();
-	    reschedule = PJ_FALSE;
-	    break;
-    case 'a':
-    	snd_start(PJMEDIA_DIR_CAPTURE_PLAYBACK);
-	break;
-    case 't':
-    	snd_start(PJMEDIA_DIR_CAPTURE);
-	break;
-    case 'p':
-    	snd_start(PJMEDIA_DIR_PLAYBACK);
-    break;
-    case 'd':
-    	snd_stop();
-	break;
-    default:
-	    PJ_LOG(3,(THIS_FILE, "Keycode '%c' (%d) is pressed",
-		      kc, kc));
-	    break;
+        case 'w':
+            snd_stop();
+            CActiveScheduler::Stop();
+            reschedule = PJ_FALSE;
+            break;
+        case 'a':
+            snd_start (PJMEDIA_DIR_CAPTURE_PLAYBACK);
+            break;
+        case 't':
+            snd_start (PJMEDIA_DIR_CAPTURE);
+            break;
+        case 'p':
+            snd_start (PJMEDIA_DIR_PLAYBACK);
+            break;
+        case 'd':
+            snd_stop();
+            break;
+        default:
+            PJ_LOG (3, (THIS_FILE, "Keycode '%c' (%d) is pressed",
+                        kc, kc));
+            break;
     }
 
     PrintMenu();
 
     if (reschedule)
-	Run();
+        Run();
 }
 
 
@@ -352,7 +361,7 @@ int app_main()
         return -1;
 
     // Run the UI
-    ConsoleUI *con = new ConsoleUI(console);
+    ConsoleUI *con = new ConsoleUI (console);
 
     con->Run();
 
diff --git a/sflphone-common/libs/pjproject/pjsip-apps/src/symsndtest/main_symbian.cpp b/sflphone-common/libs/pjproject/pjsip-apps/src/symsndtest/main_symbian.cpp
index 5ed4eb83ee1f7cd6a95611455129221fb5f881a9..5c6f1fec3bb1abf417fabb2788ac90ab748b47c2 100644
--- a/sflphone-common/libs/pjproject/pjsip-apps/src/symsndtest/main_symbian.cpp
+++ b/sflphone-common/libs/pjproject/pjsip-apps/src/symsndtest/main_symbian.cpp
@@ -1,5 +1,5 @@
 /* $Id: main_symbian.cpp 2506 2009-03-12 18:11:37Z bennylp $ */
-/* 
+/*
  * Copyright (C) 2008-2009 Teluu Inc. (http://www.teluu.com)
  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
  *
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include <e32std.h>
@@ -29,7 +29,7 @@
 CConsoleBase* console;
 
 // Needed by APS
-TPtrC APP_UID = _L("A000000E");
+TPtrC APP_UID = _L ("A000000E");
 
 int app_main();
 
@@ -39,13 +39,13 @@ int app_main();
 LOCAL_C void DoStartL()
 {
     CActiveScheduler *scheduler = new (ELeave) CActiveScheduler;
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
+    CleanupStack::PushL (scheduler);
+    CActiveScheduler::Install (scheduler);
 
     app_main();
 
-    CActiveScheduler::Install(NULL);
-    CleanupStack::Pop(scheduler);
+    CActiveScheduler::Install (NULL);
+    CleanupStack::Pop (scheduler);
     delete scheduler;
 }
 
@@ -62,11 +62,12 @@ GLDEF_C TInt E32Main()
     CTrapCleanup* cleanup = CTrapCleanup::New();
 
     // Create output console
-    TRAPD(createError, console = Console::NewL(_L("Console"), TSize(KConsFullScreen,KConsFullScreen)));
+    TRAPD (createError, console = Console::NewL (_L ("Console"), TSize (KConsFullScreen,KConsFullScreen)));
+
     if (createError)
         return createError;
 
-    TRAPD(startError, DoStartL());
+    TRAPD (startError, DoStartL());
 
     //console->Printf(_L("[press any key to close]\n"));
     //console->Getch();
diff --git a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_auth_parser_wrap.cpp b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_auth_parser_wrap.cpp
index bf9d1c2954a93a8037b41c16bfed88337955862e..4636188df2dfd366049b1d3face4d96bd4779e9c 100644
--- a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_auth_parser_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_auth_parser_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: sip_auth_parser_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_dialog_wrap.cpp b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_dialog_wrap.cpp
index ace0c93ac9d35291644ef89155df284b2e4614b0..7ecfe9b618ee3c7299be6cb74f58ff657d20d731 100644
--- a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_dialog_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_dialog_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: sip_dialog_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_endpoint_wrap.cpp b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_endpoint_wrap.cpp
index dd16a70be1921b2b4800d7416cba5a213e9bf8df..583dd0556a4ffc3b014b51723ad351ccace96e0a 100644
--- a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_endpoint_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_endpoint_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: sip_endpoint_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_parser_wrap.cpp b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_parser_wrap.cpp
index 31a09b6f98ffdd64ba2fcfe1c43e9e55581ed0a5..eb88b03079308382c1a0ece912e48eed64a9439b 100644
--- a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_parser_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_parser_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: sip_parser_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_tel_uri_wrap.cpp b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_tel_uri_wrap.cpp
index a65c880b85295c93af9034a11f2d6ef3530f7634..ab1e8836992412c6558421cde688fae566dd67c9 100644
--- a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_tel_uri_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_tel_uri_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: sip_tel_uri_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_transport_wrap.cpp b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_transport_wrap.cpp
index 94185c157f7194c56ecc4601a3f4e12c8c5e791c..347fc38ac323b7217126b1f03d0c1f156305b175 100644
--- a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_transport_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_transport_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: sip_transport_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_util_proxy_wrap.cpp b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_util_proxy_wrap.cpp
index 177a9c16f110ad0afd3d5d9fee0626310436810e..a78aad5f54ee2c88163f681d7b5e602839adc49a 100644
--- a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_util_proxy_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_util_proxy_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: sip_util_proxy_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_util_wrap.cpp b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_util_wrap.cpp
index 10b481d29791ac83342702a5a7be8209e262e124..488447ec42b4b73db2679af87364a20926a95841 100644
--- a/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_util_wrap.cpp
+++ b/sflphone-common/libs/pjproject/pjsip/src/pjsip/sip_util_wrap.cpp
@@ -1,5 +1,5 @@
 /* $Id: sip_util_wrap.cpp 2873 2009-08-13 11:54:35Z nanang $ */
-/* 
+/*
  * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  *  Additional permission under GNU GPL version 3 section 7:
  *
diff --git a/sflphone-common/libs/pjproject/third_party/build/speex/config.h b/sflphone-common/libs/pjproject/third_party/build/speex/config.h
index ba7be7a6e21d233da490e2274094580c6d416459..e04c40be4f7383fdda6c17ec53d4369e70989492 100644
--- a/sflphone-common/libs/pjproject/third_party/build/speex/config.h
+++ b/sflphone-common/libs/pjproject/third_party/build/speex/config.h
@@ -4,7 +4,7 @@
 #if !defined(PJ_HAS_FLOATING_POINT) || PJ_HAS_FLOATING_POINT==0
 #   define FIXED_POINT
 #   define USE_KISS_FFT
-#else 
+#else
 #   define FLOATING_POINT
 #   define USE_SMALLFT
 #endif
@@ -12,7 +12,7 @@
 #define EXPORT
 
 #if (defined(PJ_WIN32) && PJ_WIN32!=0) || \
-    (defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0) 
+    (defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0)
 #   include "../../speex/win32/config.h"
 #else
 #define inline __inline
diff --git a/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/asio/iasiothiscallresolver.cpp b/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/asio/iasiothiscallresolver.cpp
index 8dfefbd67b95ffc0d64194ab75ab7a05e1b1f72f..1b4b33781f155d3eb78dbbfe53dba83bee14ac08 100644
--- a/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/asio/iasiothiscallresolver.cpp
+++ b/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/asio/iasiothiscallresolver.cpp
@@ -71,7 +71,7 @@
     (IUnknown functions)
     0   virtual HRESULT STDMETHODCALLTYPE (*QueryInterface)(REFIID riid, void **ppv) = 0;
     4   virtual ULONG STDMETHODCALLTYPE (*AddRef)() = 0;
-    8   virtual ULONG STDMETHODCALLTYPE (*Release)() = 0;      
+    8   virtual ULONG STDMETHODCALLTYPE (*Release)() = 0;
 
     (IASIO functions)
     12	virtual ASIOBool (*init)(void *sysHandle) = 0;
@@ -128,7 +128,7 @@
     with MSVC, and requires that you ship the OpenASIO DLL with your
     application.
 
-    
+
     ACKNOWLEDGEMENTS
 
     Ross Bencina: worked out the thiscall details above, wrote the original
@@ -186,7 +186,7 @@ extern IASIO* theAsioDriver;
 
 // The following macros define the inline assembler for BORLAND first then gcc
 
-#if defined(__BCPLUSPLUS__) || defined(__BORLANDC__)          
+#if defined(__BCPLUSPLUS__) || defined(__BORLANDC__)
 
 
 #define CALL_THISCALL_0( resultName, thisPtr, funcOffset )\
@@ -277,7 +277,7 @@ extern IASIO* theAsioDriver;
                           :"=a"(resultName) /* Output Operands */           \
                           :"c"(thisPtr)     /* Input Operands */            \
                          );                                                 \
-
+ 
 
 #define CALL_VOID_THISCALL_1( thisPtr, funcOffset, param1 )                 \
     __asm__ __volatile__ ("pushl %0\n\t"                                    \
@@ -287,7 +287,7 @@ extern IASIO* theAsioDriver;
                           :"r"(param1),     /* Input Operands */            \
                            "c"(thisPtr)                                     \
                          );                                                 \
-
+ 
 
 #define CALL_THISCALL_1( resultName, thisPtr, funcOffset, param1 )          \
     __asm__ __volatile__ ("pushl %1\n\t"                                    \
@@ -297,7 +297,7 @@ extern IASIO* theAsioDriver;
                           :"r"(param1),     /* Input Operands */            \
                            "c"(thisPtr)                                     \
                           );                                                \
-
+ 
 
 #define CALL_THISCALL_1_DOUBLE( resultName, thisPtr, funcOffset, param1 )   \
     __asm__ __volatile__ ("pushl 4(%1)\n\t"                                 \
@@ -310,7 +310,7 @@ extern IASIO* theAsioDriver;
                            /* when using GCC 3.3.3, and maybe later versions*/\
                            "c"(thisPtr)                                     \
                           );                                                \
-
+ 
 
 #define CALL_THISCALL_2( resultName, thisPtr, funcOffset, param1, param2 )  \
     __asm__ __volatile__ ("pushl %1\n\t"                                    \
@@ -322,7 +322,7 @@ extern IASIO* theAsioDriver;
                            "r"(param1),                                     \
                            "c"(thisPtr)                                     \
                           );                                                \
-
+ 
 
 #define CALL_THISCALL_4( resultName, thisPtr, funcOffset, param1, param2, param3, param4 )\
     __asm__ __volatile__ ("pushl %1\n\t"                                    \
@@ -338,7 +338,7 @@ extern IASIO* theAsioDriver;
                            "r"(param1),                                     \
                            "c"(thisPtr)                                     \
                           );                                                \
-
+ 
 #endif
 
 
@@ -354,8 +354,8 @@ IASIOThiscallResolver::IASIOThiscallResolver()
 }
 
 // Constructor called from ASIOInit() below
-IASIOThiscallResolver::IASIOThiscallResolver(IASIO* that)
-: that_( that )
+IASIOThiscallResolver::IASIOThiscallResolver (IASIO* that)
+        : that_ (that)
 {
 }
 
@@ -363,11 +363,11 @@ IASIOThiscallResolver::IASIOThiscallResolver(IASIO* that)
 // really a COM object, just a wrapper which will work with the ASIO SDK.
 // If you wanted to use ASIO without the SDK you might want to implement COM
 // aggregation in these methods.
-HRESULT STDMETHODCALLTYPE IASIOThiscallResolver::QueryInterface(REFIID riid, void **ppv)
+HRESULT STDMETHODCALLTYPE IASIOThiscallResolver::QueryInterface (REFIID riid, void **ppv)
 {
-    (void)riid;     // suppress unused variable warning
+    (void) riid;    // suppress unused variable warning
 
-    assert( false ); // this function should never be called by the ASIO SDK.
+    assert (false);  // this function should never be called by the ASIO SDK.
 
     *ppv = NULL;
     return E_NOINTERFACE;
@@ -375,176 +375,176 @@ HRESULT STDMETHODCALLTYPE IASIOThiscallResolver::QueryInterface(REFIID riid, voi
 
 ULONG STDMETHODCALLTYPE IASIOThiscallResolver::AddRef()
 {
-    assert( false ); // this function should never be called by the ASIO SDK.
+    assert (false);  // this function should never be called by the ASIO SDK.
 
     return 1;
 }
 
 ULONG STDMETHODCALLTYPE IASIOThiscallResolver::Release()
 {
-    assert( false ); // this function should never be called by the ASIO SDK.
-    
+    assert (false);  // this function should never be called by the ASIO SDK.
+
     return 1;
 }
 
 
 // Implement the IASIO interface methods by performing the vptr manipulation
 // described above then delegating to the real implementation.
-ASIOBool IASIOThiscallResolver::init(void *sysHandle)
+ASIOBool IASIOThiscallResolver::init (void *sysHandle)
 {
     ASIOBool result;
-    CALL_THISCALL_1( result, that_, 12, sysHandle );
+    CALL_THISCALL_1 (result, that_, 12, sysHandle);
     return result;
 }
 
-void IASIOThiscallResolver::getDriverName(char *name)
+void IASIOThiscallResolver::getDriverName (char *name)
 {
-    CALL_VOID_THISCALL_1( that_, 16, name );
+    CALL_VOID_THISCALL_1 (that_, 16, name);
 }
 
 long IASIOThiscallResolver::getDriverVersion()
 {
     ASIOBool result;
-    CALL_THISCALL_0( result, that_, 20 );
+    CALL_THISCALL_0 (result, that_, 20);
     return result;
 }
 
-void IASIOThiscallResolver::getErrorMessage(char *string)
+void IASIOThiscallResolver::getErrorMessage (char *string)
 {
-     CALL_VOID_THISCALL_1( that_, 24, string );
+    CALL_VOID_THISCALL_1 (that_, 24, string);
 }
 
 ASIOError IASIOThiscallResolver::start()
 {
     ASIOBool result;
-    CALL_THISCALL_0( result, that_, 28 );
+    CALL_THISCALL_0 (result, that_, 28);
     return result;
 }
 
 ASIOError IASIOThiscallResolver::stop()
 {
     ASIOBool result;
-    CALL_THISCALL_0( result, that_, 32 );
+    CALL_THISCALL_0 (result, that_, 32);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::getChannels(long *numInputChannels, long *numOutputChannels)
+ASIOError IASIOThiscallResolver::getChannels (long *numInputChannels, long *numOutputChannels)
 {
     ASIOBool result;
-    CALL_THISCALL_2( result, that_, 36, numInputChannels, numOutputChannels );
+    CALL_THISCALL_2 (result, that_, 36, numInputChannels, numOutputChannels);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::getLatencies(long *inputLatency, long *outputLatency)
+ASIOError IASIOThiscallResolver::getLatencies (long *inputLatency, long *outputLatency)
 {
     ASIOBool result;
-    CALL_THISCALL_2( result, that_, 40, inputLatency, outputLatency );
+    CALL_THISCALL_2 (result, that_, 40, inputLatency, outputLatency);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::getBufferSize(long *minSize, long *maxSize,
+ASIOError IASIOThiscallResolver::getBufferSize (long *minSize, long *maxSize,
         long *preferredSize, long *granularity)
 {
     ASIOBool result;
-    CALL_THISCALL_4( result, that_, 44, minSize, maxSize, preferredSize, granularity );
+    CALL_THISCALL_4 (result, that_, 44, minSize, maxSize, preferredSize, granularity);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::canSampleRate(ASIOSampleRate sampleRate)
+ASIOError IASIOThiscallResolver::canSampleRate (ASIOSampleRate sampleRate)
 {
     ASIOBool result;
-    CALL_THISCALL_1_DOUBLE( result, that_, 48, sampleRate );
+    CALL_THISCALL_1_DOUBLE (result, that_, 48, sampleRate);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::getSampleRate(ASIOSampleRate *sampleRate)
+ASIOError IASIOThiscallResolver::getSampleRate (ASIOSampleRate *sampleRate)
 {
     ASIOBool result;
-    CALL_THISCALL_1( result, that_, 52, sampleRate );
+    CALL_THISCALL_1 (result, that_, 52, sampleRate);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::setSampleRate(ASIOSampleRate sampleRate)
-{    
+ASIOError IASIOThiscallResolver::setSampleRate (ASIOSampleRate sampleRate)
+{
     ASIOBool result;
-    CALL_THISCALL_1_DOUBLE( result, that_, 56, sampleRate );
+    CALL_THISCALL_1_DOUBLE (result, that_, 56, sampleRate);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::getClockSources(ASIOClockSource *clocks, long *numSources)
+ASIOError IASIOThiscallResolver::getClockSources (ASIOClockSource *clocks, long *numSources)
 {
     ASIOBool result;
-    CALL_THISCALL_2( result, that_, 60, clocks, numSources );
+    CALL_THISCALL_2 (result, that_, 60, clocks, numSources);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::setClockSource(long reference)
+ASIOError IASIOThiscallResolver::setClockSource (long reference)
 {
     ASIOBool result;
-    CALL_THISCALL_1( result, that_, 64, reference );
+    CALL_THISCALL_1 (result, that_, 64, reference);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp)
+ASIOError IASIOThiscallResolver::getSamplePosition (ASIOSamples *sPos, ASIOTimeStamp *tStamp)
 {
     ASIOBool result;
-    CALL_THISCALL_2( result, that_, 68, sPos, tStamp );
+    CALL_THISCALL_2 (result, that_, 68, sPos, tStamp);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::getChannelInfo(ASIOChannelInfo *info)
+ASIOError IASIOThiscallResolver::getChannelInfo (ASIOChannelInfo *info)
 {
     ASIOBool result;
-    CALL_THISCALL_1( result, that_, 72, info );
+    CALL_THISCALL_1 (result, that_, 72, info);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::createBuffers(ASIOBufferInfo *bufferInfos,
+ASIOError IASIOThiscallResolver::createBuffers (ASIOBufferInfo *bufferInfos,
         long numChannels, long bufferSize, ASIOCallbacks *callbacks)
 {
     ASIOBool result;
-    CALL_THISCALL_4( result, that_, 76, bufferInfos, numChannels, bufferSize, callbacks );
+    CALL_THISCALL_4 (result, that_, 76, bufferInfos, numChannels, bufferSize, callbacks);
     return result;
 }
 
 ASIOError IASIOThiscallResolver::disposeBuffers()
 {
     ASIOBool result;
-    CALL_THISCALL_0( result, that_, 80 );
+    CALL_THISCALL_0 (result, that_, 80);
     return result;
 }
 
 ASIOError IASIOThiscallResolver::controlPanel()
 {
     ASIOBool result;
-    CALL_THISCALL_0( result, that_, 84 );
+    CALL_THISCALL_0 (result, that_, 84);
     return result;
 }
 
-ASIOError IASIOThiscallResolver::future(long selector,void *opt)
+ASIOError IASIOThiscallResolver::future (long selector,void *opt)
 {
     ASIOBool result;
-    CALL_THISCALL_2( result, that_, 88, selector, opt );
+    CALL_THISCALL_2 (result, that_, 88, selector, opt);
     return result;
 }
 
 ASIOError IASIOThiscallResolver::outputReady()
 {
     ASIOBool result;
-    CALL_THISCALL_0( result, that_, 92 );
+    CALL_THISCALL_0 (result, that_, 92);
     return result;
 }
 
 
 // Implement our substitute ASIOInit() method
-ASIOError IASIOThiscallResolver::ASIOInit(ASIODriverInfo *info)
+ASIOError IASIOThiscallResolver::ASIOInit (ASIODriverInfo *info)
 {
     // To ensure that our instance's vptr is correctly constructed, even if
     // ASIOInit is called prior to main(), we explicitly call its constructor
     // (potentially over the top of an existing instance). Note that this is
     // pretty ugly, and is only safe because IASIOThiscallResolver has no
     // destructor and contains no objects with destructors.
-    new((void*)&instance) IASIOThiscallResolver( theAsioDriver );
+    new ( (void*) &instance) IASIOThiscallResolver (theAsioDriver);
 
     // Interpose between ASIO client code and the real driver.
     theAsioDriver = &instance;
@@ -553,7 +553,7 @@ ASIOError IASIOThiscallResolver::ASIOInit(ASIODriverInfo *info)
     // real driver because theAsioDriver is reset to zero in ASIOExit().
 
     // Delegate to the real ASIOInit
-	return ::ASIOInit(info);
+    return ::ASIOInit (info);
 }
 
 
diff --git a/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/asio/pa_asio.cpp b/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/asio/pa_asio.cpp
index 84d1c5117946f2d2d9af24c5a1e1aa2e6afd9923..7d0298104124c3e88b58af34ecffe839e5ed3267 100644
--- a/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/asio/pa_asio.cpp
+++ b/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/asio/pa_asio.cpp
@@ -29,13 +29,13 @@
  */
 
 /*
- * The text above constitutes the entire PortAudio license; however, 
+ * The text above constitutes the entire PortAudio license; however,
  * the PortAudio community also makes the following non-binding requests:
  *
  * Any person wishing to distribute modifications to the Software is
  * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
+ * they can be incorporated into the canonical version. It is also
+ * requested that these non-binding requests be included along with the
  * license above.
  */
 
@@ -83,7 +83,7 @@
 
     @todo review ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable
 
-    @todo review Blocking i/o latency computations in OpenStream(), changing ring 
+    @todo review Blocking i/o latency computations in OpenStream(), changing ring
           buffer to a non-power-of-two structure could reduce blocking i/o latency.
 
     @todo implement IsFormatSupported
@@ -171,8 +171,8 @@
 
 /* external reference to ASIO SDK's asioDrivers.
 
- This is a bit messy because we want to explicitly manage 
- allocation/deallocation of this structure, but some layers of the SDK 
+ This is a bit messy because we want to explicitly manage
+ allocation/deallocation of this structure, but some layers of the SDK
  which we currently use (eg the implementation in asio.cpp) still
  use this global version.
 
@@ -190,9 +190,9 @@ extern AsioDrivers* asioDrivers;
 
 /* prototypes for functions declared in this file */
 
-extern "C" PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex );
-static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+extern "C" PaError PaAsio_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex);
+static void Terminate (struct PaUtilHostApiRepresentation *hostApi);
+static PaError OpenStream (struct PaUtilHostApiRepresentation *hostApi,
                            PaStream** s,
                            const PaStreamParameters *inputParameters,
                            const PaStreamParameters *outputParameters,
@@ -200,82 +200,99 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
                            unsigned long framesPerBuffer,
                            PaStreamFlags streamFlags,
                            PaStreamCallback *streamCallback,
-                           void *userData );
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                           void *userData);
+static PaError IsFormatSupported (struct PaUtilHostApiRepresentation *hostApi,
                                   const PaStreamParameters *inputParameters,
                                   const PaStreamParameters *outputParameters,
-                                  double sampleRate );
-static PaError CloseStream( PaStream* stream );
-static PaError StartStream( PaStream *stream );
-static PaError StopStream( PaStream *stream );
-static PaError AbortStream( PaStream *stream );
-static PaError IsStreamStopped( PaStream *s );
-static PaError IsStreamActive( PaStream *stream );
-static PaTime GetStreamTime( PaStream *stream );
-static double GetStreamCpuLoad( PaStream* stream );
-static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
-static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
-static signed long GetStreamReadAvailable( PaStream* stream );
-static signed long GetStreamWriteAvailable( PaStream* stream );
+                                  double sampleRate);
+static PaError CloseStream (PaStream* stream);
+static PaError StartStream (PaStream *stream);
+static PaError StopStream (PaStream *stream);
+static PaError AbortStream (PaStream *stream);
+static PaError IsStreamStopped (PaStream *s);
+static PaError IsStreamActive (PaStream *stream);
+static PaTime GetStreamTime (PaStream *stream);
+static double GetStreamCpuLoad (PaStream* stream);
+static PaError ReadStream (PaStream* stream, void *buffer, unsigned long frames);
+static PaError WriteStream (PaStream* stream, const void *buffer, unsigned long frames);
+static signed long GetStreamReadAvailable (PaStream* stream);
+static signed long GetStreamWriteAvailable (PaStream* stream);
 
 /* Blocking i/o callback function. */
-static int BlockingIoPaCallback(const void                     *inputBuffer    ,
-                                      void                     *outputBuffer   ,
-                                      unsigned long             framesPerBuffer,
-                                const PaStreamCallbackTimeInfo *timeInfo       ,
-                                      PaStreamCallbackFlags     statusFlags    ,
-                                      void                     *userData       );
+static int BlockingIoPaCallback (const void                     *inputBuffer    ,
+                                 void                     *outputBuffer   ,
+                                 unsigned long             framesPerBuffer,
+                                 const PaStreamCallbackTimeInfo *timeInfo       ,
+                                 PaStreamCallbackFlags     statusFlags    ,
+                                 void                     *userData);
 
 /* our ASIO callback functions */
 
-static void bufferSwitch(long index, ASIOBool processNow);
-static ASIOTime *bufferSwitchTimeInfo(ASIOTime *timeInfo, long index, ASIOBool processNow);
-static void sampleRateChanged(ASIOSampleRate sRate);
-static long asioMessages(long selector, long value, void* message, double* opt);
+static void bufferSwitch (long index, ASIOBool processNow);
+static ASIOTime *bufferSwitchTimeInfo (ASIOTime *timeInfo, long index, ASIOBool processNow);
+static void sampleRateChanged (ASIOSampleRate sRate);
+static long asioMessages (long selector, long value, void* message, double* opt);
 
-static ASIOCallbacks asioCallbacks_ =
-    { bufferSwitch, sampleRateChanged, asioMessages, bufferSwitchTimeInfo };
+static ASIOCallbacks asioCallbacks_ = { bufferSwitch, sampleRateChanged, asioMessages, bufferSwitchTimeInfo };
 
 
 #define PA_ASIO_SET_LAST_HOST_ERROR( errorCode, errorText ) \
     PaUtil_SetLastHostErrorInfo( paASIO, errorCode, errorText )
 
 
-static void PaAsio_SetLastSystemError( DWORD errorCode )
+static void PaAsio_SetLastSystemError (DWORD errorCode)
 {
     LPVOID lpMsgBuf;
-    FormatMessage(
+    FormatMessage (
         FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
         NULL,
         errorCode,
-        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+        MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT),
         (LPTSTR) &lpMsgBuf,
         0,
         NULL
     );
-    PaUtil_SetLastHostErrorInfo( paASIO, errorCode, (const char*)lpMsgBuf );
-    LocalFree( lpMsgBuf );
+    PaUtil_SetLastHostErrorInfo (paASIO, errorCode, (const char*) lpMsgBuf);
+    LocalFree (lpMsgBuf);
 }
 
 #define PA_ASIO_SET_LAST_SYSTEM_ERROR( errorCode ) \
     PaAsio_SetLastSystemError( errorCode )
 
 
-static const char* PaAsio_GetAsioErrorText( ASIOError asioError )
+static const char* PaAsio_GetAsioErrorText (ASIOError asioError)
 {
     const char *result;
 
-    switch( asioError ){
+    switch (asioError) {
         case ASE_OK:
-        case ASE_SUCCESS:           result = "Success"; break;
-        case ASE_NotPresent:        result = "Hardware input or output is not present or available"; break;
-        case ASE_HWMalfunction:     result = "Hardware is malfunctioning"; break;
-        case ASE_InvalidParameter:  result = "Input parameter invalid"; break;
-        case ASE_InvalidMode:       result = "Hardware is in a bad mode or used in a bad mode"; break;
-        case ASE_SPNotAdvancing:    result = "Hardware is not running when sample position is inquired"; break;
-        case ASE_NoClock:           result = "Sample clock or rate cannot be determined or is not present"; break;
-        case ASE_NoMemory:          result = "Not enough memory for completing the request"; break;
-        default:                    result = "Unknown ASIO error"; break;
+        case ASE_SUCCESS:
+            result = "Success";
+            break;
+        case ASE_NotPresent:
+            result = "Hardware input or output is not present or available";
+            break;
+        case ASE_HWMalfunction:
+            result = "Hardware is malfunctioning";
+            break;
+        case ASE_InvalidParameter:
+            result = "Input parameter invalid";
+            break;
+        case ASE_InvalidMode:
+            result = "Hardware is in a bad mode or used in a bad mode";
+            break;
+        case ASE_SPNotAdvancing:
+            result = "Hardware is not running when sample position is inquired";
+            break;
+        case ASE_NoClock:
+            result = "Sample clock or rate cannot be determined or is not present";
+            break;
+        case ASE_NoMemory:
+            result = "Not enough memory for completing the request";
+            break;
+        default:
+            result = "Unknown ASIO error";
+            break;
     }
 
     return result;
@@ -290,18 +307,29 @@ static const char* PaAsio_GetAsioErrorText( ASIOError asioError )
 
 // Atomic increment and decrement operations
 #if MAC
-    /* need to be implemented on Mac */
-    inline long PaAsio_AtomicIncrement(volatile long* v) {return ++(*const_cast<long*>(v));}
-    inline long PaAsio_AtomicDecrement(volatile long* v) {return --(*const_cast<long*>(v));}
+/* need to be implemented on Mac */
+inline long PaAsio_AtomicIncrement (volatile long* v)
+{
+    return ++ (*const_cast<long*> (v));
+}
+inline long PaAsio_AtomicDecrement (volatile long* v)
+{
+    return -- (*const_cast<long*> (v));
+}
 #elif WINDOWS
-    inline long PaAsio_AtomicIncrement(volatile long* v) {return InterlockedIncrement(const_cast<long*>(v));}
-    inline long PaAsio_AtomicDecrement(volatile long* v) {return InterlockedDecrement(const_cast<long*>(v));}
+inline long PaAsio_AtomicIncrement (volatile long* v)
+{
+    return InterlockedIncrement (const_cast<long*> (v));
+}
+inline long PaAsio_AtomicDecrement (volatile long* v)
+{
+    return InterlockedDecrement (const_cast<long*> (v));
+}
 #endif
 
 
 
-typedef struct PaAsioDriverInfo
-{
+typedef struct PaAsioDriverInfo {
     ASIODriverInfo asioDriverInfo;
     long inputChannelCount, outputChannelCount;
     long bufferMinSize, bufferMaxSize, bufferPreferredSize, bufferGranularity;
@@ -312,8 +340,7 @@ PaAsioDriverInfo;
 
 /* PaAsioHostApiRepresentation - host api datastructure specific to this implementation */
 
-typedef struct
-{
+typedef struct {
     PaUtilHostApiRepresentation inheritedHostApiRep;
     PaUtilStreamInterface callbackStreamInterface;
     PaUtilStreamInterface blockingStreamInterface;
@@ -322,7 +349,7 @@ typedef struct
 
     AsioDrivers *asioDrivers;
     void *systemSpecific;
-    
+
     /* the ASIO C API only allows one ASIO driver to be open at a time,
         so we keep track of whether we have the driver open here, and
         use this information to return errors from OpenStream if the
@@ -344,43 +371,45 @@ PaAsioHostApiRepresentation;
     Retrieve <driverCount> driver names from ASIO, returned in a char**
     allocated in <group>.
 */
-static char **GetAsioDriverNames( PaAsioHostApiRepresentation *asioHostApi, PaUtilAllocationGroup *group, long driverCount )
+static char **GetAsioDriverNames (PaAsioHostApiRepresentation *asioHostApi, PaUtilAllocationGroup *group, long driverCount)
 {
     char **result = 0;
     int i;
 
-    result =(char**)PaUtil_GroupAllocateMemory(
-            group, sizeof(char*) * driverCount );
-    if( !result )
+    result = (char**) PaUtil_GroupAllocateMemory (
+                 group, sizeof (char*) * driverCount);
+
+    if (!result)
         goto error;
 
-    result[0] = (char*)PaUtil_GroupAllocateMemory(
-            group, 32 * driverCount );
-    if( !result[0] )
+    result[0] = (char*) PaUtil_GroupAllocateMemory (
+                    group, 32 * driverCount);
+
+    if (!result[0])
         goto error;
 
-    for( i=0; i<driverCount; ++i )
+    for (i=0; i<driverCount; ++i)
         result[i] = result[0] + (32 * i);
 
-    asioHostApi->asioDrivers->getDriverNames( result, driverCount );
+    asioHostApi->asioDrivers->getDriverNames (result, driverCount);
 
 error:
     return result;
 }
 
 
-static PaSampleFormat AsioSampleTypeToPaNativeSampleFormat(ASIOSampleType type)
+static PaSampleFormat AsioSampleTypeToPaNativeSampleFormat (ASIOSampleType type)
 {
     switch (type) {
         case ASIOSTInt16MSB:
         case ASIOSTInt16LSB:
-                return paInt16;
+            return paInt16;
 
         case ASIOSTFloat32MSB:
         case ASIOSTFloat32LSB:
         case ASIOSTFloat64MSB:
         case ASIOSTFloat64LSB:
-                return paFloat32;
+            return paFloat32;
 
         case ASIOSTInt32MSB:
         case ASIOSTInt32LSB:
@@ -392,44 +421,82 @@ static PaSampleFormat AsioSampleTypeToPaNativeSampleFormat(ASIOSampleType type)
         case ASIOSTInt32LSB18:
         case ASIOSTInt32LSB20:
         case ASIOSTInt32LSB24:
-                return paInt32;
+            return paInt32;
 
         case ASIOSTInt24MSB:
         case ASIOSTInt24LSB:
-                return paInt24;
+            return paInt24;
 
         default:
-                return paCustomFormat;
+            return paCustomFormat;
     }
 }
 
-void AsioSampleTypeLOG(ASIOSampleType type)
+void AsioSampleTypeLOG (ASIOSampleType type)
 {
     switch (type) {
-        case ASIOSTInt16MSB:  PA_DEBUG(("ASIOSTInt16MSB\n"));  break;
-        case ASIOSTInt16LSB:  PA_DEBUG(("ASIOSTInt16LSB\n"));  break;
-        case ASIOSTFloat32MSB:PA_DEBUG(("ASIOSTFloat32MSB\n"));break;
-        case ASIOSTFloat32LSB:PA_DEBUG(("ASIOSTFloat32LSB\n"));break;
-        case ASIOSTFloat64MSB:PA_DEBUG(("ASIOSTFloat64MSB\n"));break;
-        case ASIOSTFloat64LSB:PA_DEBUG(("ASIOSTFloat64LSB\n"));break;
-        case ASIOSTInt32MSB:  PA_DEBUG(("ASIOSTInt32MSB\n"));  break;
-        case ASIOSTInt32LSB:  PA_DEBUG(("ASIOSTInt32LSB\n"));  break;
-        case ASIOSTInt32MSB16:PA_DEBUG(("ASIOSTInt32MSB16\n"));break;
-        case ASIOSTInt32LSB16:PA_DEBUG(("ASIOSTInt32LSB16\n"));break;
-        case ASIOSTInt32MSB18:PA_DEBUG(("ASIOSTInt32MSB18\n"));break;
-        case ASIOSTInt32MSB20:PA_DEBUG(("ASIOSTInt32MSB20\n"));break;
-        case ASIOSTInt32MSB24:PA_DEBUG(("ASIOSTInt32MSB24\n"));break;
-        case ASIOSTInt32LSB18:PA_DEBUG(("ASIOSTInt32LSB18\n"));break;
-        case ASIOSTInt32LSB20:PA_DEBUG(("ASIOSTInt32LSB20\n"));break;
-        case ASIOSTInt32LSB24:PA_DEBUG(("ASIOSTInt32LSB24\n"));break;
-        case ASIOSTInt24MSB:  PA_DEBUG(("ASIOSTInt24MSB\n"));  break;
-        case ASIOSTInt24LSB:  PA_DEBUG(("ASIOSTInt24LSB\n"));  break;
-        default:              PA_DEBUG(("Custom Format%d\n",type));break;
+        case ASIOSTInt16MSB:
+            PA_DEBUG ( ("ASIOSTInt16MSB\n"));
+            break;
+        case ASIOSTInt16LSB:
+            PA_DEBUG ( ("ASIOSTInt16LSB\n"));
+            break;
+        case ASIOSTFloat32MSB:
+            PA_DEBUG ( ("ASIOSTFloat32MSB\n"));
+            break;
+        case ASIOSTFloat32LSB:
+            PA_DEBUG ( ("ASIOSTFloat32LSB\n"));
+            break;
+        case ASIOSTFloat64MSB:
+            PA_DEBUG ( ("ASIOSTFloat64MSB\n"));
+            break;
+        case ASIOSTFloat64LSB:
+            PA_DEBUG ( ("ASIOSTFloat64LSB\n"));
+            break;
+        case ASIOSTInt32MSB:
+            PA_DEBUG ( ("ASIOSTInt32MSB\n"));
+            break;
+        case ASIOSTInt32LSB:
+            PA_DEBUG ( ("ASIOSTInt32LSB\n"));
+            break;
+        case ASIOSTInt32MSB16:
+            PA_DEBUG ( ("ASIOSTInt32MSB16\n"));
+            break;
+        case ASIOSTInt32LSB16:
+            PA_DEBUG ( ("ASIOSTInt32LSB16\n"));
+            break;
+        case ASIOSTInt32MSB18:
+            PA_DEBUG ( ("ASIOSTInt32MSB18\n"));
+            break;
+        case ASIOSTInt32MSB20:
+            PA_DEBUG ( ("ASIOSTInt32MSB20\n"));
+            break;
+        case ASIOSTInt32MSB24:
+            PA_DEBUG ( ("ASIOSTInt32MSB24\n"));
+            break;
+        case ASIOSTInt32LSB18:
+            PA_DEBUG ( ("ASIOSTInt32LSB18\n"));
+            break;
+        case ASIOSTInt32LSB20:
+            PA_DEBUG ( ("ASIOSTInt32LSB20\n"));
+            break;
+        case ASIOSTInt32LSB24:
+            PA_DEBUG ( ("ASIOSTInt32LSB24\n"));
+            break;
+        case ASIOSTInt24MSB:
+            PA_DEBUG ( ("ASIOSTInt24MSB\n"));
+            break;
+        case ASIOSTInt24LSB:
+            PA_DEBUG ( ("ASIOSTInt24LSB\n"));
+            break;
+        default:
+            PA_DEBUG ( ("Custom Format%d\n",type));
+            break;
 
     }
 }
 
-static int BytesPerAsioSample( ASIOSampleType sampleType )
+static int BytesPerAsioSample (ASIOSampleType sampleType)
 {
     switch (sampleType) {
         case ASIOSTInt16MSB:
@@ -464,93 +531,86 @@ static int BytesPerAsioSample( ASIOSampleType sampleType )
 }
 
 
-static void Swap16( void *buffer, long shift, long count )
+static void Swap16 (void *buffer, long shift, long count)
 {
-    unsigned short *p = (unsigned short*)buffer;
+    unsigned short *p = (unsigned short*) buffer;
     unsigned short temp;
     (void) shift; /* unused parameter */
 
-    while( count-- )
-    {
+    while (count--) {
         temp = *p;
-        *p++ = (unsigned short)((temp<<8) | (temp>>8));
+        *p++ = (unsigned short) ( (temp<<8) | (temp>>8));
     }
 }
 
-static void Swap24( void *buffer, long shift, long count )
+static void Swap24 (void *buffer, long shift, long count)
 {
-    unsigned char *p = (unsigned char*)buffer;
+    unsigned char *p = (unsigned char*) buffer;
     unsigned char temp;
     (void) shift; /* unused parameter */
 
-    while( count-- )
-    {
+    while (count--) {
         temp = *p;
-        *p = *(p+2);
-        *(p+2) = temp;
+        *p = * (p+2);
+        * (p+2) = temp;
         p += 3;
     }
 }
 
 #define PA_SWAP32_( x ) ((x>>24) | ((x>>8)&0xFF00) | ((x<<8)&0xFF0000) | (x<<24));
 
-static void Swap32( void *buffer, long shift, long count )
+static void Swap32 (void *buffer, long shift, long count)
 {
-    unsigned long *p = (unsigned long*)buffer;
+    unsigned long *p = (unsigned long*) buffer;
     unsigned long temp;
     (void) shift; /* unused parameter */
 
-    while( count-- )
-    {
+    while (count--) {
         temp = *p;
-        *p++ = PA_SWAP32_( temp);
+        *p++ = PA_SWAP32_ (temp);
     }
 }
 
-static void SwapShiftLeft32( void *buffer, long shift, long count )
+static void SwapShiftLeft32 (void *buffer, long shift, long count)
 {
-    unsigned long *p = (unsigned long*)buffer;
+    unsigned long *p = (unsigned long*) buffer;
     unsigned long temp;
 
-    while( count-- )
-    {
+    while (count--) {
         temp = *p;
-        temp = PA_SWAP32_( temp);
+        temp = PA_SWAP32_ (temp);
         *p++ = temp << shift;
     }
 }
 
-static void ShiftRightSwap32( void *buffer, long shift, long count )
+static void ShiftRightSwap32 (void *buffer, long shift, long count)
 {
-    unsigned long *p = (unsigned long*)buffer;
+    unsigned long *p = (unsigned long*) buffer;
     unsigned long temp;
 
-    while( count-- )
-    {
+    while (count--) {
         temp = *p >> shift;
-        *p++ = PA_SWAP32_( temp);
+        *p++ = PA_SWAP32_ (temp);
     }
 }
 
-static void ShiftLeft32( void *buffer, long shift, long count )
+static void ShiftLeft32 (void *buffer, long shift, long count)
 {
-    unsigned long *p = (unsigned long*)buffer;
+    unsigned long *p = (unsigned long*) buffer;
     unsigned long temp;
 
-    while( count-- )
-    {
+    while (count--) {
         temp = *p;
         *p++ = temp << shift;
     }
 }
 
-static void ShiftRight32( void *buffer, long shift, long count )
+static void ShiftRight32 (void *buffer, long shift, long count)
 {
-    unsigned long *p = (unsigned long*)buffer;
+    unsigned long *p = (unsigned long*) buffer;
     unsigned long temp;
 
-    while( count-- )
-    {
+    while (count--) {
         temp = *p;
         *p++ = temp >> shift;
     }
@@ -558,65 +618,63 @@ static void ShiftRight32( void *buffer, long shift, long count )
 
 #define PA_SWAP_( x, y ) temp=x; x = y; y = temp;
 
-static void Swap64ConvertFloat64ToFloat32( void *buffer, long shift, long count )
+static void Swap64ConvertFloat64ToFloat32 (void *buffer, long shift, long count)
 {
-    double *in = (double*)buffer;
-    float *out = (float*)buffer;
+    double *in = (double*) buffer;
+    float *out = (float*) buffer;
     unsigned char *p;
     unsigned char temp;
     (void) shift; /* unused parameter */
 
-    while( count-- )
-    {
-        p = (unsigned char*)in;
-        PA_SWAP_( p[0], p[7] );
-        PA_SWAP_( p[1], p[6] );
-        PA_SWAP_( p[2], p[5] );
-        PA_SWAP_( p[3], p[4] );
+    while (count--) {
+        p = (unsigned char*) in;
+        PA_SWAP_ (p[0], p[7]);
+        PA_SWAP_ (p[1], p[6]);
+        PA_SWAP_ (p[2], p[5]);
+        PA_SWAP_ (p[3], p[4]);
 
         *out++ = (float) (*in++);
     }
 }
 
-static void ConvertFloat64ToFloat32( void *buffer, long shift, long count )
+static void ConvertFloat64ToFloat32 (void *buffer, long shift, long count)
 {
-    double *in = (double*)buffer;
-    float *out = (float*)buffer;
+    double *in = (double*) buffer;
+    float *out = (float*) buffer;
     (void) shift; /* unused parameter */
 
-    while( count-- )
+    while (count--)
         *out++ = (float) (*in++);
 }
 
-static void ConvertFloat32ToFloat64Swap64( void *buffer, long shift, long count )
+static void ConvertFloat32ToFloat64Swap64 (void *buffer, long shift, long count)
 {
-    float *in = ((float*)buffer) + (count-1);
-    double *out = ((double*)buffer) + (count-1);
+    float *in = ( (float*) buffer) + (count-1);
+    double *out = ( (double*) buffer) + (count-1);
     unsigned char *p;
     unsigned char temp;
     (void) shift; /* unused parameter */
 
-    while( count-- )
-    {
+    while (count--) {
         *out = *in--;
 
-        p = (unsigned char*)out;
-        PA_SWAP_( p[0], p[7] );
-        PA_SWAP_( p[1], p[6] );
-        PA_SWAP_( p[2], p[5] );
-        PA_SWAP_( p[3], p[4] );
+        p = (unsigned char*) out;
+        PA_SWAP_ (p[0], p[7]);
+        PA_SWAP_ (p[1], p[6]);
+        PA_SWAP_ (p[2], p[5]);
+        PA_SWAP_ (p[3], p[4]);
 
         out--;
     }
 }
 
-static void ConvertFloat32ToFloat64( void *buffer, long shift, long count )
+static void ConvertFloat32ToFloat64 (void *buffer, long shift, long count)
 {
-    float *in = ((float*)buffer) + (count-1);
-    double *out = ((double*)buffer) + (count-1);
+    float *in = ( (float*) buffer) + (count-1);
+    double *out = ( (double*) buffer) + (count-1);
     (void) shift; /* unused parameter */
 
-    while( count-- )
+    while (count--)
         *out-- = *in--;
 }
 
@@ -630,9 +688,9 @@ static void ConvertFloat32ToFloat64( void *buffer, long shift, long count )
 #define PA_LSB_IS_NATIVE_
 #endif
 
-typedef void PaAsioBufferConverter( void *, long, long );
+typedef void PaAsioBufferConverter (void *, long, long);
 
-static void SelectAsioToPaConverter( ASIOSampleType type, PaAsioBufferConverter **converter, long *shift )
+static void SelectAsioToPaConverter (ASIOSampleType type, PaAsioBufferConverter **converter, long *shift)
 {
     *shift = 0;
     *converter = 0;
@@ -640,145 +698,145 @@ static void SelectAsioToPaConverter( ASIOSampleType type, PaAsioBufferConverter
     switch (type) {
         case ASIOSTInt16MSB:
             /* dest: paInt16, no conversion necessary, possible byte swap*/
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = Swap16;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = Swap16;
+#endif
             break;
         case ASIOSTInt16LSB:
             /* dest: paInt16, no conversion necessary, possible byte swap*/
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = Swap16;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = Swap16;
+#endif
             break;
         case ASIOSTFloat32MSB:
             /* dest: paFloat32, no conversion necessary, possible byte swap*/
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = Swap32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = Swap32;
+#endif
             break;
         case ASIOSTFloat32LSB:
             /* dest: paFloat32, no conversion necessary, possible byte swap*/
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = Swap32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = Swap32;
+#endif
             break;
         case ASIOSTFloat64MSB:
             /* dest: paFloat32, in-place conversion to/from float32, possible byte swap*/
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = Swap64ConvertFloat64ToFloat32;
-            #else
-                *converter = ConvertFloat64ToFloat32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = Swap64ConvertFloat64ToFloat32;
+#else
+            *converter = ConvertFloat64ToFloat32;
+#endif
             break;
         case ASIOSTFloat64LSB:
             /* dest: paFloat32, in-place conversion to/from float32, possible byte swap*/
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = Swap64ConvertFloat64ToFloat32;
-            #else
-                *converter = ConvertFloat64ToFloat32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = Swap64ConvertFloat64ToFloat32;
+#else
+            *converter = ConvertFloat64ToFloat32;
+#endif
             break;
         case ASIOSTInt32MSB:
             /* dest: paInt32, no conversion necessary, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = Swap32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = Swap32;
+#endif
             break;
         case ASIOSTInt32LSB:
             /* dest: paInt32, no conversion necessary, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = Swap32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = Swap32;
+#endif
             break;
         case ASIOSTInt32MSB16:
             /* dest: paInt32, 16 bit shift, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = SwapShiftLeft32;
-            #else
-                *converter = ShiftLeft32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = SwapShiftLeft32;
+#else
+            *converter = ShiftLeft32;
+#endif
             *shift = 16;
             break;
         case ASIOSTInt32MSB18:
             /* dest: paInt32, 14 bit shift, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = SwapShiftLeft32;
-            #else
-                *converter = ShiftLeft32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = SwapShiftLeft32;
+#else
+            *converter = ShiftLeft32;
+#endif
             *shift = 14;
             break;
         case ASIOSTInt32MSB20:
             /* dest: paInt32, 12 bit shift, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = SwapShiftLeft32;
-            #else
-                *converter = ShiftLeft32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = SwapShiftLeft32;
+#else
+            *converter = ShiftLeft32;
+#endif
             *shift = 12;
             break;
         case ASIOSTInt32MSB24:
             /* dest: paInt32, 8 bit shift, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = SwapShiftLeft32;
-            #else
-                *converter = ShiftLeft32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = SwapShiftLeft32;
+#else
+            *converter = ShiftLeft32;
+#endif
             *shift = 8;
             break;
         case ASIOSTInt32LSB16:
             /* dest: paInt32, 16 bit shift, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = SwapShiftLeft32;
-            #else
-                *converter = ShiftLeft32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = SwapShiftLeft32;
+#else
+            *converter = ShiftLeft32;
+#endif
             *shift = 16;
             break;
         case ASIOSTInt32LSB18:
             /* dest: paInt32, 14 bit shift, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = SwapShiftLeft32;
-            #else
-                *converter = ShiftLeft32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = SwapShiftLeft32;
+#else
+            *converter = ShiftLeft32;
+#endif
             *shift = 14;
             break;
         case ASIOSTInt32LSB20:
             /* dest: paInt32, 12 bit shift, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = SwapShiftLeft32;
-            #else
-                *converter = ShiftLeft32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = SwapShiftLeft32;
+#else
+            *converter = ShiftLeft32;
+#endif
             *shift = 12;
             break;
         case ASIOSTInt32LSB24:
             /* dest: paInt32, 8 bit shift, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = SwapShiftLeft32;
-            #else
-                *converter = ShiftLeft32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = SwapShiftLeft32;
+#else
+            *converter = ShiftLeft32;
+#endif
             *shift = 8;
             break;
         case ASIOSTInt24MSB:
             /* dest: paInt24, no conversion necessary, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = Swap24;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = Swap24;
+#endif
             break;
         case ASIOSTInt24LSB:
             /* dest: paInt24, no conversion necessary, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = Swap24;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = Swap24;
+#endif
             break;
     }
 }
 
 
-static void SelectPaToAsioConverter( ASIOSampleType type, PaAsioBufferConverter **converter, long *shift )
+static void SelectPaToAsioConverter (ASIOSampleType type, PaAsioBufferConverter **converter, long *shift)
 {
     *shift = 0;
     *converter = 0;
@@ -786,146 +844,145 @@ static void SelectPaToAsioConverter( ASIOSampleType type, PaAsioBufferConverter
     switch (type) {
         case ASIOSTInt16MSB:
             /* src: paInt16, no conversion necessary, possible byte swap*/
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = Swap16;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = Swap16;
+#endif
             break;
         case ASIOSTInt16LSB:
             /* src: paInt16, no conversion necessary, possible byte swap*/
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = Swap16;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = Swap16;
+#endif
             break;
         case ASIOSTFloat32MSB:
             /* src: paFloat32, no conversion necessary, possible byte swap*/
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = Swap32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = Swap32;
+#endif
             break;
         case ASIOSTFloat32LSB:
             /* src: paFloat32, no conversion necessary, possible byte swap*/
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = Swap32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = Swap32;
+#endif
             break;
         case ASIOSTFloat64MSB:
             /* src: paFloat32, in-place conversion to/from float32, possible byte swap*/
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = ConvertFloat32ToFloat64Swap64;
-            #else
-                *converter = ConvertFloat32ToFloat64;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = ConvertFloat32ToFloat64Swap64;
+#else
+            *converter = ConvertFloat32ToFloat64;
+#endif
             break;
         case ASIOSTFloat64LSB:
             /* src: paFloat32, in-place conversion to/from float32, possible byte swap*/
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = ConvertFloat32ToFloat64Swap64;
-            #else
-                *converter = ConvertFloat32ToFloat64;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = ConvertFloat32ToFloat64Swap64;
+#else
+            *converter = ConvertFloat32ToFloat64;
+#endif
             break;
         case ASIOSTInt32MSB:
             /* src: paInt32, no conversion necessary, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = Swap32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = Swap32;
+#endif
             break;
         case ASIOSTInt32LSB:
             /* src: paInt32, no conversion necessary, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = Swap32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = Swap32;
+#endif
             break;
         case ASIOSTInt32MSB16:
             /* src: paInt32, 16 bit shift, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = ShiftRightSwap32;
-            #else
-                *converter = ShiftRight32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = ShiftRightSwap32;
+#else
+            *converter = ShiftRight32;
+#endif
             *shift = 16;
             break;
         case ASIOSTInt32MSB18:
             /* src: paInt32, 14 bit shift, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = ShiftRightSwap32;
-            #else
-                *converter = ShiftRight32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = ShiftRightSwap32;
+#else
+            *converter = ShiftRight32;
+#endif
             *shift = 14;
             break;
         case ASIOSTInt32MSB20:
             /* src: paInt32, 12 bit shift, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = ShiftRightSwap32;
-            #else
-                *converter = ShiftRight32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = ShiftRightSwap32;
+#else
+            *converter = ShiftRight32;
+#endif
             *shift = 12;
             break;
         case ASIOSTInt32MSB24:
             /* src: paInt32, 8 bit shift, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = ShiftRightSwap32;
-            #else
-                *converter = ShiftRight32;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = ShiftRightSwap32;
+#else
+            *converter = ShiftRight32;
+#endif
             *shift = 8;
             break;
         case ASIOSTInt32LSB16:
             /* src: paInt32, 16 bit shift, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = ShiftRightSwap32;
-            #else
-                *converter = ShiftRight32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = ShiftRightSwap32;
+#else
+            *converter = ShiftRight32;
+#endif
             *shift = 16;
             break;
         case ASIOSTInt32LSB18:
             /* src: paInt32, 14 bit shift, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = ShiftRightSwap32;
-            #else
-                *converter = ShiftRight32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = ShiftRightSwap32;
+#else
+            *converter = ShiftRight32;
+#endif
             *shift = 14;
             break;
         case ASIOSTInt32LSB20:
             /* src: paInt32, 12 bit shift, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = ShiftRightSwap32;
-            #else
-                *converter = ShiftRight32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = ShiftRightSwap32;
+#else
+            *converter = ShiftRight32;
+#endif
             *shift = 12;
             break;
         case ASIOSTInt32LSB24:
             /* src: paInt32, 8 bit shift, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = ShiftRightSwap32;
-            #else
-                *converter = ShiftRight32;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = ShiftRightSwap32;
+#else
+            *converter = ShiftRight32;
+#endif
             *shift = 8;
             break;
         case ASIOSTInt24MSB:
             /* src: paInt24, no conversion necessary, possible byte swap */
-            #ifdef PA_LSB_IS_NATIVE_
-                *converter = Swap24;
-            #endif
+#ifdef PA_LSB_IS_NATIVE_
+            *converter = Swap24;
+#endif
             break;
         case ASIOSTInt24LSB:
             /* src: paInt24, no conversion necessary, possible byte swap */
-            #ifdef PA_MSB_IS_NATIVE_
-                *converter = Swap24;
-            #endif
+#ifdef PA_MSB_IS_NATIVE_
+            *converter = Swap24;
+#endif
             break;
     }
 }
 
 
-typedef struct PaAsioDeviceInfo
-{
+typedef struct PaAsioDeviceInfo {
     PaDeviceInfo commonDeviceInfo;
     long minBufferSize;
     long maxBufferSize;
@@ -937,23 +994,21 @@ typedef struct PaAsioDeviceInfo
 PaAsioDeviceInfo;
 
 
-PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
-        long *minLatency, long *maxLatency, long *preferredLatency, long *granularity )
+PaError PaAsio_GetAvailableLatencyValues (PaDeviceIndex device,
+        long *minLatency, long *maxLatency, long *preferredLatency, long *granularity)
 {
     PaError result;
     PaUtilHostApiRepresentation *hostApi;
     PaDeviceIndex hostApiDevice;
 
-    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );
+    result = PaUtil_GetHostApiRepresentation (&hostApi, paASIO);
 
-    if( result == paNoError )
-    {
-        result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice, device, hostApi );
+    if (result == paNoError) {
+        result = PaUtil_DeviceIndexToHostApiDeviceIndex (&hostApiDevice, device, hostApi);
 
-        if( result == paNoError )
-        {
+        if (result == paNoError) {
             PaAsioDeviceInfo *asioDeviceInfo =
-                    (PaAsioDeviceInfo*)hostApi->deviceInfos[hostApiDevice];
+                (PaAsioDeviceInfo*) hostApi->deviceInfos[hostApiDevice];
 
             *minLatency = asioDeviceInfo->minBufferSize;
             *maxLatency = asioDeviceInfo->maxBufferSize;
@@ -968,10 +1023,10 @@ PaError PaAsio_GetAvailableLatencyValues( PaDeviceIndex device,
 /* Unload whatever we loaded in LoadAsioDriver().
    Also balance the call to CoInitialize(0).
 */
-static void UnloadAsioDriver( void )
+static void UnloadAsioDriver (void)
 {
-	ASIOExit();
-	CoUninitialize();
+    ASIOExit();
+    CoUninitialize();
 }
 
 /*
@@ -980,67 +1035,62 @@ static void UnloadAsioDriver( void )
     and must be closed by the called by calling UnloadAsioDriver() - if an error
     is returned the driver will already be unloaded.
 */
-static PaError LoadAsioDriver( PaAsioHostApiRepresentation *asioHostApi, const char *driverName,
-        PaAsioDriverInfo *driverInfo, void *systemSpecific )
+static PaError LoadAsioDriver (PaAsioHostApiRepresentation *asioHostApi, const char *driverName,
+                               PaAsioDriverInfo *driverInfo, void *systemSpecific)
 {
     PaError result = paNoError;
     ASIOError asioError;
     int asioIsInitialized = 0;
 
-    /* 
-	ASIO uses CoCreateInstance() to load a driver. That requires that
-	CoInitialize(0) be called for every thread that loads a driver.
-	It is OK to call CoInitialize(0) multiple times form one thread as long
-	as it is balanced by a call to CoUninitialize(). See UnloadAsioDriver().
-
-	The V18 version called CoInitialize() starting on 2/19/02.
-	That was removed from PA V19 for unknown reasons.
-	Phil Burk added it back on 6/27/08 so that JSyn would work.
+    /*
+    ASIO uses CoCreateInstance() to load a driver. That requires that
+    CoInitialize(0) be called for every thread that loads a driver.
+    It is OK to call CoInitialize(0) multiple times form one thread as long
+    as it is balanced by a call to CoUninitialize(). See UnloadAsioDriver().
+
+    The V18 version called CoInitialize() starting on 2/19/02.
+    That was removed from PA V19 for unknown reasons.
+    Phil Burk added it back on 6/27/08 so that JSyn would work.
     */
-	CoInitialize( 0 );
+    CoInitialize (0);
 
-    if( !asioHostApi->asioDrivers->loadDriver( const_cast<char*>(driverName) ) )
-    {
-		/* If this returns an error then it might be because CoInitialize(0) was removed.
-		  It should be called right before this.
-	    */
+    if (!asioHostApi->asioDrivers->loadDriver (const_cast<char*> (driverName))) {
+        /* If this returns an error then it might be because CoInitialize(0) was removed.
+          It should be called right before this.
+        */
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_HOST_ERROR( 0, "Failed to load ASIO driver" );
+        PA_ASIO_SET_LAST_HOST_ERROR (0, "Failed to load ASIO driver");
         goto error;
     }
 
-    memset( &driverInfo->asioDriverInfo, 0, sizeof(ASIODriverInfo) );
+    memset (&driverInfo->asioDriverInfo, 0, sizeof (ASIODriverInfo));
     driverInfo->asioDriverInfo.asioVersion = 2;
     driverInfo->asioDriverInfo.sysRef = systemSpecific;
-    if( (asioError = ASIOInit( &driverInfo->asioDriverInfo )) != ASE_OK )
-    {
+
+    if ( (asioError = ASIOInit (&driverInfo->asioDriverInfo)) != ASE_OK) {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
         goto error;
-    }
-    else
-    {
+    } else {
         asioIsInitialized = 1;
     }
 
-    if( (asioError = ASIOGetChannels(&driverInfo->inputChannelCount,
-            &driverInfo->outputChannelCount)) != ASE_OK )
-    {
+    if ( (asioError = ASIOGetChannels (&driverInfo->inputChannelCount,
+                                       &driverInfo->outputChannelCount)) != ASE_OK) {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
         goto error;
     }
 
-    if( (asioError = ASIOGetBufferSize(&driverInfo->bufferMinSize,
-            &driverInfo->bufferMaxSize, &driverInfo->bufferPreferredSize,
-            &driverInfo->bufferGranularity)) != ASE_OK )
-    {
+    if ( (asioError = ASIOGetBufferSize (&driverInfo->bufferMinSize,
+                                         &driverInfo->bufferMaxSize, &driverInfo->bufferPreferredSize,
+                                         &driverInfo->bufferGranularity)) != ASE_OK) {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
         goto error;
     }
 
-    if( ASIOOutputReady() == ASE_OK )
+    if (ASIOOutputReady() == ASE_OK)
         driverInfo->postOutput = true;
     else
         driverInfo->postOutput = false;
@@ -1048,27 +1098,29 @@ static PaError LoadAsioDriver( PaAsioHostApiRepresentation *asioHostApi, const c
     return result;
 
 error:
-    if( asioIsInitialized )
-	{
-		ASIOExit();
-	}
-	CoUninitialize();
+
+    if (asioIsInitialized) {
+        ASIOExit();
+    }
+
+    CoUninitialize();
     return result;
 }
 
 
 #define PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_     13   /* must be the same number of elements as in the array below */
 static ASIOSampleRate defaultSampleRateSearchOrder_[]
-     = {44100.0, 48000.0, 32000.0, 24000.0, 22050.0, 88200.0, 96000.0,
-        192000.0, 16000.0, 12000.0, 11025.0, 9600.0, 8000.0 };
+= {44100.0, 48000.0, 32000.0, 24000.0, 22050.0, 88200.0, 96000.0,
+   192000.0, 16000.0, 12000.0, 11025.0, 9600.0, 8000.0
+  };
 
 
 /* we look up IsDebuggerPresent at runtime incase it isn't present (on Win95 for example) */
-typedef BOOL (WINAPI *IsDebuggerPresentPtr)(VOID);
+typedef BOOL (WINAPI *IsDebuggerPresentPtr) (VOID);
 IsDebuggerPresentPtr IsDebuggerPresent_ = 0;
 //FARPROC IsDebuggerPresent_ = 0; // this is the current way to do it apparently according to davidv
 
-PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+PaError PaAsio_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex)
 {
     PaError result = paNoError;
     int i, driverCount;
@@ -1077,9 +1129,9 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
     char **names;
     PaAsioDriverInfo paAsioDriverInfo;
 
-    asioHostApi = (PaAsioHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaAsioHostApiRepresentation) );
-    if( !asioHostApi )
-    {
+    asioHostApi = (PaAsioHostApiRepresentation*) PaUtil_AllocateMemory (sizeof (PaAsioHostApiRepresentation));
+
+    if (!asioHostApi) {
         result = paInsufficientMemory;
         goto error;
     }
@@ -1087,25 +1139,22 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
     asioHostApi->asioDrivers = 0; /* avoid surprises in our error handler below */
 
     asioHostApi->allocations = PaUtil_CreateAllocationGroup();
-    if( !asioHostApi->allocations )
-    {
+
+    if (!asioHostApi->allocations) {
         result = paInsufficientMemory;
         goto error;
     }
 
     /* Allocate the AsioDrivers() driver list (class from ASIO SDK) */
-    try
-    {
+    try {
         asioHostApi->asioDrivers = new AsioDrivers(); /* calls CoInitialize(0) */
-    } 
-    catch (std::bad_alloc)
-    {
+    } catch (std::bad_alloc) {
         asioHostApi->asioDrivers = 0;
     }
+
     /* some implementations of new (ie MSVC, see http://support.microsoft.com/?kbid=167733)
        don't throw std::bad_alloc, so we also explicitly test for a null return. */
-    if( asioHostApi->asioDrivers == 0 )
-    {
+    if (asioHostApi->asioDrivers == 0) {
         result = paInsufficientMemory;
         goto error;
     }
@@ -1122,24 +1171,23 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
     (*hostApi)->info.name = "ASIO";
     (*hostApi)->info.deviceCount = 0;
 
-    #ifdef WINDOWS
-        /* use desktop window as system specific ptr */
-        asioHostApi->systemSpecific = GetDesktopWindow();
-    #endif
+#ifdef WINDOWS
+    /* use desktop window as system specific ptr */
+    asioHostApi->systemSpecific = GetDesktopWindow();
+#endif
 
     /* driverCount is the number of installed drivers - not necessarily
         the number of installed physical devices. */
-    #if MAC
-        driverCount = asioHostApi->asioDrivers->getNumFragments();
-    #elif WINDOWS
-        driverCount = asioHostApi->asioDrivers->asioGetNumDev();
-    #endif
-
-    if( driverCount > 0 )
-    {
-        names = GetAsioDriverNames( asioHostApi, asioHostApi->allocations, driverCount );
-        if( !names )
-        {
+#if MAC
+    driverCount = asioHostApi->asioDrivers->getNumFragments();
+#elif WINDOWS
+    driverCount = asioHostApi->asioDrivers->asioGetNumDev();
+#endif
+
+    if (driverCount > 0) {
+        names = GetAsioDriverNames (asioHostApi, asioHostApi->allocations, driverCount);
+
+        if (!names) {
             result = paInsufficientMemory;
             goto error;
         }
@@ -1147,63 +1195,58 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
 
         /* allocate enough space for all drivers, even if some aren't installed */
 
-        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
-                asioHostApi->allocations, sizeof(PaDeviceInfo*) * driverCount );
-        if( !(*hostApi)->deviceInfos )
-        {
+        (*hostApi)->deviceInfos = (PaDeviceInfo**) PaUtil_GroupAllocateMemory (
+                                      asioHostApi->allocations, sizeof (PaDeviceInfo*) * driverCount);
+
+        if (! (*hostApi)->deviceInfos) {
             result = paInsufficientMemory;
             goto error;
         }
 
         /* allocate all device info structs in a contiguous block */
-        deviceInfoArray = (PaAsioDeviceInfo*)PaUtil_GroupAllocateMemory(
-                asioHostApi->allocations, sizeof(PaAsioDeviceInfo) * driverCount );
-        if( !deviceInfoArray )
-        {
+        deviceInfoArray = (PaAsioDeviceInfo*) PaUtil_GroupAllocateMemory (
+                              asioHostApi->allocations, sizeof (PaAsioDeviceInfo) * driverCount);
+
+        if (!deviceInfoArray) {
             result = paInsufficientMemory;
             goto error;
         }
 
-        IsDebuggerPresent_ = GetProcAddress( LoadLibrary( "Kernel32.dll" ), "IsDebuggerPresent" );
+        IsDebuggerPresent_ = GetProcAddress (LoadLibrary ("Kernel32.dll"), "IsDebuggerPresent");
 
-        for( i=0; i < driverCount; ++i )
-        {
+        for (i=0; i < driverCount; ++i) {
 
-            PA_DEBUG(("ASIO names[%d]:%s\n",i,names[i]));
+            PA_DEBUG ( ("ASIO names[%d]:%s\n",i,names[i]));
 
             // Since portaudio opens ALL ASIO drivers, and no one else does that,
             // we face fact that some drivers were not meant for it, drivers which act
             // like shells on top of REAL drivers, for instance.
             // so we get duplicate handles, locks and other problems.
-            // so lets NOT try to load any such wrappers. 
+            // so lets NOT try to load any such wrappers.
             // The ones i [davidv] know of so far are:
 
-            if (   strcmp (names[i],"ASIO DirectX Full Duplex Driver") == 0
-                || strcmp (names[i],"ASIO Multimedia Driver")          == 0
-                || strncmp(names[i],"Premiere",8)                      == 0   //"Premiere Elements Windows Sound 1.0"
-                || strncmp(names[i],"Adobe",5)                         == 0   //"Adobe Default Windows Sound 1.5"
-               )
-            {
-                PA_DEBUG(("BLACKLISTED!!!\n"));
+            if (strcmp (names[i],"ASIO DirectX Full Duplex Driver") == 0
+                    || strcmp (names[i],"ASIO Multimedia Driver")          == 0
+                    || strncmp (names[i],"Premiere",8)                      == 0  //"Premiere Elements Windows Sound 1.0"
+                    || strncmp (names[i],"Adobe",5)                         == 0  //"Adobe Default Windows Sound 1.5"
+               ) {
+                PA_DEBUG ( ("BLACKLISTED!!!\n"));
                 continue;
             }
 
 
-            if( IsDebuggerPresent_ && IsDebuggerPresent_() )  
-            {
+            if (IsDebuggerPresent_ && IsDebuggerPresent_()) {
                 /* ASIO Digidesign Driver uses PACE copy protection which quits out
                    if a debugger is running. So we don't load it if a debugger is running. */
-                if( strcmp(names[i], "ASIO Digidesign Driver") == 0 )  
-                {
-                    PA_DEBUG(("BLACKLISTED!!! ASIO Digidesign Driver would quit the debugger\n"));  
-                    continue;  
-                }  
-            }  
+                if (strcmp (names[i], "ASIO Digidesign Driver") == 0) {
+                    PA_DEBUG ( ("BLACKLISTED!!! ASIO Digidesign Driver would quit the debugger\n"));
+                    continue;
+                }
+            }
 
 
             /* Attempt to load the asio driver... */
-            if( LoadAsioDriver( asioHostApi, names[i], &paAsioDriverInfo, asioHostApi->systemSpecific ) == paNoError )
-            {
+            if (LoadAsioDriver (asioHostApi, names[i], &paAsioDriverInfo, asioHostApi->systemSpecific) == paNoError) {
                 PaAsioDeviceInfo *asioDeviceInfo = &deviceInfoArray[ (*hostApi)->info.deviceCount ];
                 PaDeviceInfo *deviceInfo = &asioDeviceInfo->commonDeviceInfo;
 
@@ -1211,33 +1254,33 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
                 deviceInfo->hostApi = hostApiIndex;
 
                 deviceInfo->name = names[i];
-                PA_DEBUG(("PaAsio_Initialize: drv:%d name = %s\n",  i,deviceInfo->name));
-                PA_DEBUG(("PaAsio_Initialize: drv:%d inputChannels       = %d\n", i, paAsioDriverInfo.inputChannelCount));
-                PA_DEBUG(("PaAsio_Initialize: drv:%d outputChannels      = %d\n", i, paAsioDriverInfo.outputChannelCount));
-                PA_DEBUG(("PaAsio_Initialize: drv:%d bufferMinSize       = %d\n", i, paAsioDriverInfo.bufferMinSize));
-                PA_DEBUG(("PaAsio_Initialize: drv:%d bufferMaxSize       = %d\n", i, paAsioDriverInfo.bufferMaxSize));
-                PA_DEBUG(("PaAsio_Initialize: drv:%d bufferPreferredSize = %d\n", i, paAsioDriverInfo.bufferPreferredSize));
-                PA_DEBUG(("PaAsio_Initialize: drv:%d bufferGranularity   = %d\n", i, paAsioDriverInfo.bufferGranularity));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d name = %s\n",  i,deviceInfo->name));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d inputChannels       = %d\n", i, paAsioDriverInfo.inputChannelCount));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d outputChannels      = %d\n", i, paAsioDriverInfo.outputChannelCount));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d bufferMinSize       = %d\n", i, paAsioDriverInfo.bufferMinSize));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d bufferMaxSize       = %d\n", i, paAsioDriverInfo.bufferMaxSize));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d bufferPreferredSize = %d\n", i, paAsioDriverInfo.bufferPreferredSize));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d bufferGranularity   = %d\n", i, paAsioDriverInfo.bufferGranularity));
 
                 deviceInfo->maxInputChannels  = paAsioDriverInfo.inputChannelCount;
                 deviceInfo->maxOutputChannels = paAsioDriverInfo.outputChannelCount;
 
                 deviceInfo->defaultSampleRate = 0.;
                 bool foundDefaultSampleRate = false;
-                for( int j=0; j < PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_; ++j )
-                {
-                    ASIOError asioError = ASIOCanSampleRate( defaultSampleRateSearchOrder_[j] );
-                    if( asioError != ASE_NoClock && asioError != ASE_NotPresent )
-                    {
+
+                for (int j=0; j < PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_; ++j) {
+                    ASIOError asioError = ASIOCanSampleRate (defaultSampleRateSearchOrder_[j]);
+
+                    if (asioError != ASE_NoClock && asioError != ASE_NotPresent) {
                         deviceInfo->defaultSampleRate = defaultSampleRateSearchOrder_[j];
                         foundDefaultSampleRate = true;
                         break;
                     }
                 }
 
-                PA_DEBUG(("PaAsio_Initialize: drv:%d defaultSampleRate = %f\n", i, deviceInfo->defaultSampleRate));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d defaultSampleRate = %f\n", i, deviceInfo->defaultSampleRate));
 
-                if( foundDefaultSampleRate ){
+                if (foundDefaultSampleRate) {
 
                     /* calculate default latency values from bufferPreferredSize
                         for default low latency, and bufferPreferredSize * 3
@@ -1248,27 +1291,27 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
                     */
 
                     double defaultLowLatency =
-                            paAsioDriverInfo.bufferPreferredSize / deviceInfo->defaultSampleRate;
+                        paAsioDriverInfo.bufferPreferredSize / deviceInfo->defaultSampleRate;
 
                     deviceInfo->defaultLowInputLatency = defaultLowLatency;
                     deviceInfo->defaultLowOutputLatency = defaultLowLatency;
 
                     long defaultHighLatencyBufferSize =
-                            paAsioDriverInfo.bufferPreferredSize * 3;
+                        paAsioDriverInfo.bufferPreferredSize * 3;
 
-                    if( defaultHighLatencyBufferSize > paAsioDriverInfo.bufferMaxSize )
+                    if (defaultHighLatencyBufferSize > paAsioDriverInfo.bufferMaxSize)
                         defaultHighLatencyBufferSize = paAsioDriverInfo.bufferMaxSize;
 
                     double defaultHighLatency =
-                            defaultHighLatencyBufferSize / deviceInfo->defaultSampleRate;
+                        defaultHighLatencyBufferSize / deviceInfo->defaultSampleRate;
+
+                    if (defaultHighLatency < defaultLowLatency)
+                        defaultHighLatency = defaultLowLatency; /* just incase the driver returns something strange */
 
-                    if( defaultHighLatency < defaultLowLatency )
-                        defaultHighLatency = defaultLowLatency; /* just incase the driver returns something strange */ 
-                            
                     deviceInfo->defaultHighInputLatency = defaultHighLatency;
                     deviceInfo->defaultHighOutputLatency = defaultHighLatency;
-                    
-                }else{
+
+                } else {
 
                     deviceInfo->defaultLowInputLatency = 0.;
                     deviceInfo->defaultLowOutputLatency = 0.;
@@ -1276,10 +1319,10 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
                     deviceInfo->defaultHighOutputLatency = 0.;
                 }
 
-                PA_DEBUG(("PaAsio_Initialize: drv:%d defaultLowInputLatency = %f\n", i, deviceInfo->defaultLowInputLatency));
-                PA_DEBUG(("PaAsio_Initialize: drv:%d defaultLowOutputLatency = %f\n", i, deviceInfo->defaultLowOutputLatency));
-                PA_DEBUG(("PaAsio_Initialize: drv:%d defaultHighInputLatency = %f\n", i, deviceInfo->defaultHighInputLatency));
-                PA_DEBUG(("PaAsio_Initialize: drv:%d defaultHighOutputLatency = %f\n", i, deviceInfo->defaultHighOutputLatency));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d defaultLowInputLatency = %f\n", i, deviceInfo->defaultLowInputLatency));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d defaultLowOutputLatency = %f\n", i, deviceInfo->defaultLowOutputLatency));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d defaultHighInputLatency = %f\n", i, deviceInfo->defaultHighInputLatency));
+                PA_DEBUG ( ("PaAsio_Initialize: drv:%d defaultHighOutputLatency = %f\n", i, deviceInfo->defaultHighOutputLatency));
 
                 asioDeviceInfo->minBufferSize = paAsioDriverInfo.bufferMinSize;
                 asioDeviceInfo->maxBufferSize = paAsioDriverInfo.bufferMaxSize;
@@ -1287,39 +1330,39 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
                 asioDeviceInfo->bufferGranularity = paAsioDriverInfo.bufferGranularity;
 
 
-                asioDeviceInfo->asioChannelInfos = (ASIOChannelInfo*)PaUtil_GroupAllocateMemory(
-                        asioHostApi->allocations,
-                        sizeof(ASIOChannelInfo) * (deviceInfo->maxInputChannels
-                                + deviceInfo->maxOutputChannels) );
-                if( !asioDeviceInfo->asioChannelInfos )
-                {
+                asioDeviceInfo->asioChannelInfos = (ASIOChannelInfo*) PaUtil_GroupAllocateMemory (
+                                                       asioHostApi->allocations,
+                                                       sizeof (ASIOChannelInfo) * (deviceInfo->maxInputChannels
+                                                                                   + deviceInfo->maxOutputChannels));
+
+                if (!asioDeviceInfo->asioChannelInfos) {
                     result = paInsufficientMemory;
                     goto error_unload;
                 }
 
                 int a;
 
-                for( a=0; a < deviceInfo->maxInputChannels; ++a ){
+                for (a=0; a < deviceInfo->maxInputChannels; ++a) {
                     asioDeviceInfo->asioChannelInfos[a].channel = a;
                     asioDeviceInfo->asioChannelInfos[a].isInput = ASIOTrue;
-                    ASIOError asioError = ASIOGetChannelInfo( &asioDeviceInfo->asioChannelInfos[a] );
-                    if( asioError != ASE_OK )
-                    {
+                    ASIOError asioError = ASIOGetChannelInfo (&asioDeviceInfo->asioChannelInfos[a]);
+
+                    if (asioError != ASE_OK) {
                         result = paUnanticipatedHostError;
-                        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+                        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
                         goto error_unload;
                     }
                 }
 
-                for( a=0; a < deviceInfo->maxOutputChannels; ++a ){
+                for (a=0; a < deviceInfo->maxOutputChannels; ++a) {
                     int b = deviceInfo->maxInputChannels + a;
                     asioDeviceInfo->asioChannelInfos[b].channel = a;
                     asioDeviceInfo->asioChannelInfos[b].isInput = ASIOFalse;
-                    ASIOError asioError = ASIOGetChannelInfo( &asioDeviceInfo->asioChannelInfos[b] );
-                    if( asioError != ASE_OK )
-                    {
+                    ASIOError asioError = ASIOGetChannelInfo (&asioDeviceInfo->asioChannelInfos[b]);
+
+                    if (asioError != ASE_OK) {
                         result = paUnanticipatedHostError;
-                        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+                        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
                         goto error_unload;
                     }
                 }
@@ -1329,18 +1372,15 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
                 UnloadAsioDriver();
 
                 (*hostApi)->deviceInfos[ (*hostApi)->info.deviceCount ] = deviceInfo;
-                ++(*hostApi)->info.deviceCount;
+                ++ (*hostApi)->info.deviceCount;
             }
         }
     }
 
-    if( (*hostApi)->info.deviceCount > 0 )
-    {
+    if ( (*hostApi)->info.deviceCount > 0) {
         (*hostApi)->info.defaultInputDevice = 0;
         (*hostApi)->info.defaultOutputDevice = 0;
-    }
-    else
-    {
+    } else {
         (*hostApi)->info.defaultInputDevice = paNoDevice;
         (*hostApi)->info.defaultOutputDevice = paNoDevice;
     }
@@ -1350,97 +1390,94 @@ PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex
     (*hostApi)->OpenStream = OpenStream;
     (*hostApi)->IsFormatSupported = IsFormatSupported;
 
-    PaUtil_InitializeStreamInterface( &asioHostApi->callbackStreamInterface, CloseStream, StartStream,
+    PaUtil_InitializeStreamInterface (&asioHostApi->callbackStreamInterface, CloseStream, StartStream,
                                       StopStream, AbortStream, IsStreamStopped, IsStreamActive,
                                       GetStreamTime, GetStreamCpuLoad,
                                       PaUtil_DummyRead, PaUtil_DummyWrite,
-                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable);
 
-    PaUtil_InitializeStreamInterface( &asioHostApi->blockingStreamInterface, CloseStream, StartStream,
+    PaUtil_InitializeStreamInterface (&asioHostApi->blockingStreamInterface, CloseStream, StartStream,
                                       StopStream, AbortStream, IsStreamStopped, IsStreamActive,
                                       GetStreamTime, PaUtil_DummyGetCpuLoad,
-                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable);
 
     return result;
 
 error_unload:
-	UnloadAsioDriver();
+    UnloadAsioDriver();
 
 error:
-    if( asioHostApi )
-    {
-        if( asioHostApi->allocations )
-        {
-            PaUtil_FreeAllAllocations( asioHostApi->allocations );
-            PaUtil_DestroyAllocationGroup( asioHostApi->allocations );
+
+    if (asioHostApi) {
+        if (asioHostApi->allocations) {
+            PaUtil_FreeAllAllocations (asioHostApi->allocations);
+            PaUtil_DestroyAllocationGroup (asioHostApi->allocations);
         }
 
         delete asioHostApi->asioDrivers;
         asioDrivers = 0; /* keep SDK global in sync until we stop depending on it */
 
-        PaUtil_FreeMemory( asioHostApi );
+        PaUtil_FreeMemory (asioHostApi);
     }
+
     return result;
 }
 
 
-static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+static void Terminate (struct PaUtilHostApiRepresentation *hostApi)
 {
-    PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*)hostApi;
+    PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*) hostApi;
 
     /*
         IMPLEMENT ME:
             - clean up any resources not handled by the allocation group (need to review if there are any)
     */
 
-    if( asioHostApi->allocations )
-    {
-        PaUtil_FreeAllAllocations( asioHostApi->allocations );
-        PaUtil_DestroyAllocationGroup( asioHostApi->allocations );
+    if (asioHostApi->allocations) {
+        PaUtil_FreeAllAllocations (asioHostApi->allocations);
+        PaUtil_DestroyAllocationGroup (asioHostApi->allocations);
     }
 
     delete asioHostApi->asioDrivers; /* calls CoUninitialize() */
     asioDrivers = 0; /* keep SDK global in sync until we stop depending on it */
 
-    PaUtil_FreeMemory( asioHostApi );
+    PaUtil_FreeMemory (asioHostApi);
 }
 
 
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+static PaError IsFormatSupported (struct PaUtilHostApiRepresentation *hostApi,
                                   const PaStreamParameters *inputParameters,
                                   const PaStreamParameters *outputParameters,
-                                  double sampleRate )
+                                  double sampleRate)
 {
     PaError result = paNoError;
-    PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*)hostApi;
+    PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*) hostApi;
     PaAsioDriverInfo *driverInfo = &asioHostApi->openAsioDriverInfo;
     int inputChannelCount, outputChannelCount;
     PaSampleFormat inputSampleFormat, outputSampleFormat;
-    PaDeviceIndex asioDeviceIndex;                                  
+    PaDeviceIndex asioDeviceIndex;
     ASIOError asioError;
-    
-    if( inputParameters && outputParameters )
-    {
+
+    if (inputParameters && outputParameters) {
         /* full duplex ASIO stream must use the same device for input and output */
 
-        if( inputParameters->device != outputParameters->device )
+        if (inputParameters->device != outputParameters->device)
             return paBadIODeviceCombination;
     }
-    
-    if( inputParameters )
-    {
+
+    if (inputParameters) {
         inputChannelCount = inputParameters->channelCount;
         inputSampleFormat = inputParameters->sampleFormat;
 
         /* all standard sample formats are supported by the buffer adapter,
             this implementation doesn't support any custom sample formats */
-        if( inputSampleFormat & paCustomFormat )
+        if (inputSampleFormat & paCustomFormat)
             return paSampleFormatNotSupported;
-            
+
         /* unless alternate device specification is supported, reject the use of
             paUseHostApiSpecificDeviceSpecification */
 
-        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+        if (inputParameters->device == paUseHostApiSpecificDeviceSpecification)
             return paInvalidDevice;
 
         asioDeviceIndex = inputParameters->device;
@@ -1449,26 +1486,23 @@ static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
         /** @todo do more validation here */
         // if( inputParameters->hostApiSpecificStreamInfo )
         //    return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
-    }
-    else
-    {
+    } else {
         inputChannelCount = 0;
     }
 
-    if( outputParameters )
-    {
+    if (outputParameters) {
         outputChannelCount = outputParameters->channelCount;
         outputSampleFormat = outputParameters->sampleFormat;
 
         /* all standard sample formats are supported by the buffer adapter,
             this implementation doesn't support any custom sample formats */
-        if( outputSampleFormat & paCustomFormat )
+        if (outputSampleFormat & paCustomFormat)
             return paSampleFormatNotSupported;
-            
+
         /* unless alternate device specification is supported, reject the use of
             paUseHostApiSpecificDeviceSpecification */
 
-        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+        if (outputParameters->device == paUseHostApiSpecificDeviceSpecification)
             return paInvalidDevice;
 
         asioDeviceIndex = outputParameters->device;
@@ -1477,9 +1511,7 @@ static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
         /** @todo do more validation here */
         // if( outputParameters->hostApiSpecificStreamInfo )
         //    return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
-    }
-    else
-    {
+    } else {
         outputChannelCount = 0;
     }
 
@@ -1487,9 +1519,8 @@ static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
 
     /* if an ASIO device is open we can only get format information for the currently open device */
 
-    if( asioHostApi->openAsioDeviceIndex != paNoDevice 
-            && asioHostApi->openAsioDeviceIndex != asioDeviceIndex )
-    {
+    if (asioHostApi->openAsioDeviceIndex != paNoDevice
+            && asioHostApi->openAsioDeviceIndex != asioDeviceIndex) {
         return paDeviceUnavailable;
     }
 
@@ -1498,50 +1529,46 @@ static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
         rather than the ones in our device info structure which may be stale */
 
     /* open the device if it's not already open */
-    if( asioHostApi->openAsioDeviceIndex == paNoDevice )
-    {
-        result = LoadAsioDriver( asioHostApi, asioHostApi->inheritedHostApiRep.deviceInfos[ asioDeviceIndex ]->name,
-                driverInfo, asioHostApi->systemSpecific );
-        if( result != paNoError )
+    if (asioHostApi->openAsioDeviceIndex == paNoDevice) {
+        result = LoadAsioDriver (asioHostApi, asioHostApi->inheritedHostApiRep.deviceInfos[ asioDeviceIndex ]->name,
+                                 driverInfo, asioHostApi->systemSpecific);
+
+        if (result != paNoError)
             return result;
     }
 
     /* check that input device can support inputChannelCount */
-    if( inputChannelCount > 0 )
-    {
-        if( inputChannelCount > driverInfo->inputChannelCount )
-        {
+    if (inputChannelCount > 0) {
+        if (inputChannelCount > driverInfo->inputChannelCount) {
             result = paInvalidChannelCount;
             goto done;
         }
     }
 
     /* check that output device can support outputChannelCount */
-    if( outputChannelCount )
-    {
-        if( outputChannelCount > driverInfo->outputChannelCount )
-        {
+    if (outputChannelCount) {
+        if (outputChannelCount > driverInfo->outputChannelCount) {
             result = paInvalidChannelCount;
             goto done;
         }
     }
-    
+
     /* query for sample rate support */
-    asioError = ASIOCanSampleRate( sampleRate );
-    if( asioError == ASE_NoClock || asioError == ASE_NotPresent )
-    {
+    asioError = ASIOCanSampleRate (sampleRate);
+
+    if (asioError == ASE_NoClock || asioError == ASE_NotPresent) {
         result = paInvalidSampleRate;
         goto done;
     }
 
 done:
+
     /* close the device if it wasn't already open */
-    if( asioHostApi->openAsioDeviceIndex == paNoDevice )
-    {
+    if (asioHostApi->openAsioDeviceIndex == paNoDevice) {
         UnloadAsioDriver(); /* not sure if we should check for errors here */
     }
 
-    if( result == paNoError )
+    if (result == paNoError)
         return paFormatIsSupported;
     else
         return result;
@@ -1550,8 +1577,7 @@ done:
 
 
 /** A data structure specifically for storing blocking i/o related data. */
-typedef struct PaAsioStreamBlockingState
-{
+typedef struct PaAsioStreamBlockingState {
     int stopFlag; /**< Flag indicating that block processing is to be stopped. */
 
     unsigned long writeBuffersRequested; /**< The number of available output buffers, requested by the #WriteStream() function. */
@@ -1585,8 +1611,7 @@ PaAsioStreamBlockingState;
 
 /* PaAsioStream - a stream data structure specifically for this implementation */
 
-typedef struct PaAsioStream
-{
+typedef struct PaAsioStream {
     PaUtilStreamRepresentation streamRepresentation;
     PaUtilCpuLoadMeasurer cpuLoadMeasurer;
     PaUtilBufferProcessor bufferProcessor;
@@ -1635,81 +1660,65 @@ PaAsioStream;
 static PaAsioStream *theAsioStream = 0; /* due to ASIO sdk limitations there can be only one stream */
 
 
-static void ZeroOutputBuffers( PaAsioStream *stream, long index )
+static void ZeroOutputBuffers (PaAsioStream *stream, long index)
 {
     int i;
 
-    for( i=0; i < stream->outputChannelCount; ++i )
-    {
+    for (i=0; i < stream->outputChannelCount; ++i) {
         void *buffer = stream->asioBufferInfos[ i + stream->inputChannelCount ].buffers[index];
 
-        int bytesPerSample = BytesPerAsioSample( stream->asioChannelInfos[ i + stream->inputChannelCount ].type );
+        int bytesPerSample = BytesPerAsioSample (stream->asioChannelInfos[ i + stream->inputChannelCount ].type);
 
-        memset( buffer, 0, stream->framesPerHostCallback * bytesPerSample );
+        memset (buffer, 0, stream->framesPerHostCallback * bytesPerSample);
     }
 }
 
 
-static unsigned long SelectHostBufferSize( unsigned long suggestedLatencyFrames,
-        PaAsioDriverInfo *driverInfo )
+static unsigned long SelectHostBufferSize (unsigned long suggestedLatencyFrames,
+        PaAsioDriverInfo *driverInfo)
 {
     unsigned long result;
 
-    if( suggestedLatencyFrames == 0 )
-    {
+    if (suggestedLatencyFrames == 0) {
         result = driverInfo->bufferPreferredSize;
-    }
-    else{
-        if( suggestedLatencyFrames <= (unsigned long)driverInfo->bufferMinSize )
-        {
+    } else {
+        if (suggestedLatencyFrames <= (unsigned long) driverInfo->bufferMinSize) {
             result = driverInfo->bufferMinSize;
-        }
-        else if( suggestedLatencyFrames >= (unsigned long)driverInfo->bufferMaxSize )
-        {
+        } else if (suggestedLatencyFrames >= (unsigned long) driverInfo->bufferMaxSize) {
             result = driverInfo->bufferMaxSize;
-        }
-        else
-        {
-            if( driverInfo->bufferGranularity == -1 )
-            {
+        } else {
+            if (driverInfo->bufferGranularity == -1) {
                 /* power-of-two */
                 result = 2;
 
-                while( result < suggestedLatencyFrames )
+                while (result < suggestedLatencyFrames)
                     result *= 2;
 
-                if( result < (unsigned long)driverInfo->bufferMinSize )
+                if (result < (unsigned long) driverInfo->bufferMinSize)
                     result = driverInfo->bufferMinSize;
 
-                if( result > (unsigned long)driverInfo->bufferMaxSize )
+                if (result > (unsigned long) driverInfo->bufferMaxSize)
                     result = driverInfo->bufferMaxSize;
-            }
-            else if( driverInfo->bufferGranularity == 0 )
-            {
+            } else if (driverInfo->bufferGranularity == 0) {
                 /* the documentation states that bufferGranularity should be
                     zero when bufferMinSize, bufferMaxSize and
                     bufferPreferredSize are the same. We assume that is the case.
                 */
 
                 result = driverInfo->bufferPreferredSize;
-            }
-            else
-            {
+            } else {
                 /* modulo granularity */
 
                 unsigned long remainder =
-                        suggestedLatencyFrames % driverInfo->bufferGranularity;
+                    suggestedLatencyFrames % driverInfo->bufferGranularity;
 
-                if( remainder == 0 )
-                {
+                if (remainder == 0) {
                     result = suggestedLatencyFrames;
-                }
-                else
-                {
+                } else {
                     result = suggestedLatencyFrames
-                            + (driverInfo->bufferGranularity - remainder);
+                             + (driverInfo->bufferGranularity - remainder);
 
-                    if( result > (unsigned long)driverInfo->bufferMaxSize )
+                    if (result > (unsigned long) driverInfo->bufferMaxSize)
                         result = driverInfo->bufferMaxSize;
                 }
             }
@@ -1722,31 +1731,29 @@ static unsigned long SelectHostBufferSize( unsigned long suggestedLatencyFrames,
 
 /* returns channelSelectors if present */
 
-static PaError ValidateAsioSpecificStreamInfo(
-        const PaStreamParameters *streamParameters,
-        const PaAsioStreamInfo *streamInfo,
-        int deviceChannelCount,
-        int **channelSelectors )
+static PaError ValidateAsioSpecificStreamInfo (
+    const PaStreamParameters *streamParameters,
+    const PaAsioStreamInfo *streamInfo,
+    int deviceChannelCount,
+    int **channelSelectors)
 {
-    if( streamInfo )
-    {
-        if( streamInfo->size != sizeof( PaAsioStreamInfo )
-                || streamInfo->version != 1 )
-        {
+    if (streamInfo) {
+        if (streamInfo->size != sizeof (PaAsioStreamInfo)
+                || streamInfo->version != 1) {
             return paIncompatibleHostApiSpecificStreamInfo;
         }
 
-        if( streamInfo->flags & paAsioUseChannelSelectors )
+        if (streamInfo->flags & paAsioUseChannelSelectors)
             *channelSelectors = streamInfo->channelSelectors;
 
-        if( !(*channelSelectors) )
+        if (! (*channelSelectors))
             return paIncompatibleHostApiSpecificStreamInfo;
 
-        for( int i=0; i < streamParameters->channelCount; ++i ){
-             if( (*channelSelectors)[i] < 0
-                    || (*channelSelectors)[i] >= deviceChannelCount ){
+        for (int i=0; i < streamParameters->channelCount; ++i) {
+            if ( (*channelSelectors) [i] < 0
+                    || (*channelSelectors) [i] >= deviceChannelCount) {
                 return paInvalidChannelCount;
-             }           
+            }
         }
     }
 
@@ -1764,15 +1771,17 @@ static bool IsUsingExternalClockSource()
     /* davidv: listing ASIO Clock sources. there is an ongoing investigation by
        me about whether or not to call ASIOSetSampleRate if an external Clock is
        used. A few drivers expected different things here */
-    
-    asioError = ASIOGetClockSources(clocks, &numSources);
-    if( asioError != ASE_OK ){
-        PA_DEBUG(("ERROR: ASIOGetClockSources: %s\n", PaAsio_GetAsioErrorText(asioError) ));
-    }else{
-        PA_DEBUG(("INFO ASIOGetClockSources listing %d clocks\n", numSources ));
-        for (int i=0;i<numSources;++i){
-            PA_DEBUG(("ASIOClockSource%d %s current:%d\n", i, clocks[i].name, clocks[i].isCurrentSource ));
-           
+
+    asioError = ASIOGetClockSources (clocks, &numSources);
+
+    if (asioError != ASE_OK) {
+        PA_DEBUG ( ("ERROR: ASIOGetClockSources: %s\n", PaAsio_GetAsioErrorText (asioError)));
+    } else {
+        PA_DEBUG ( ("INFO ASIOGetClockSources listing %d clocks\n", numSources));
+
+        for (int i=0; i<numSources; ++i) {
+            PA_DEBUG ( ("ASIOClockSource%d %s current:%d\n", i, clocks[i].name, clocks[i].isCurrentSource));
+
             if (clocks[i].isCurrentSource)
                 result = true;
         }
@@ -1782,20 +1791,19 @@ static bool IsUsingExternalClockSource()
 }
 
 
-static PaError ValidateAndSetSampleRate( double sampleRate )
+static PaError ValidateAndSetSampleRate (double sampleRate)
 {
     PaError result = paNoError;
     ASIOError asioError;
 
-    // check that the device supports the requested sample rate 
+    // check that the device supports the requested sample rate
 
-    asioError = ASIOCanSampleRate( sampleRate );
-    PA_DEBUG(("ASIOCanSampleRate(%f):%d\n", sampleRate, asioError ));
+    asioError = ASIOCanSampleRate (sampleRate);
+    PA_DEBUG ( ("ASIOCanSampleRate(%f):%d\n", sampleRate, asioError));
 
-    if( asioError != ASE_OK )
-    {
+    if (asioError != ASE_OK) {
         result = paInvalidSampleRate;
-        PA_DEBUG(("ERROR: ASIOCanSampleRate: %s\n", PaAsio_GetAsioErrorText(asioError) ));
+        PA_DEBUG ( ("ERROR: ASIOCanSampleRate: %s\n", PaAsio_GetAsioErrorText (asioError)));
         goto error;
     }
 
@@ -1803,42 +1811,43 @@ static PaError ValidateAndSetSampleRate( double sampleRate )
     // sample rate if the device is not already in that rate.
 
     ASIOSampleRate oldRate;
-    asioError = ASIOGetSampleRate(&oldRate);
-    if( asioError != ASE_OK )
-    {
+    asioError = ASIOGetSampleRate (&oldRate);
+
+    if (asioError != ASE_OK) {
         result = paInvalidSampleRate;
-        PA_DEBUG(("ERROR: ASIOGetSampleRate: %s\n", PaAsio_GetAsioErrorText(asioError) ));
+        PA_DEBUG ( ("ERROR: ASIOGetSampleRate: %s\n", PaAsio_GetAsioErrorText (asioError)));
         goto error;
     }
-    PA_DEBUG(("ASIOGetSampleRate:%f\n",oldRate));
 
-    if (oldRate != sampleRate){
+    PA_DEBUG ( ("ASIOGetSampleRate:%f\n",oldRate));
+
+    if (oldRate != sampleRate) {
         /* Set sample rate */
 
-        PA_DEBUG(("before ASIOSetSampleRate(%f)\n",sampleRate));
+        PA_DEBUG ( ("before ASIOSetSampleRate(%f)\n",sampleRate));
 
         /*
-            If you have problems with some drivers when externally clocked, 
+            If you have problems with some drivers when externally clocked,
             try switching on the following line and commenting out the one after it.
             See IsUsingExternalClockSource() for more info.
         */
+
         //if( IsUsingExternalClockSource() ){
-        if( false ){
-            asioError = ASIOSetSampleRate( 0 );
-        }else{
-            asioError = ASIOSetSampleRate( sampleRate );
+        if (false) {
+            asioError = ASIOSetSampleRate (0);
+        } else {
+            asioError = ASIOSetSampleRate (sampleRate);
         }
-        if( asioError != ASE_OK )
-        {
+
+        if (asioError != ASE_OK) {
             result = paInvalidSampleRate;
-            PA_DEBUG(("ERROR: ASIOSetSampleRate: %s\n", PaAsio_GetAsioErrorText(asioError) ));
+            PA_DEBUG ( ("ERROR: ASIOSetSampleRate: %s\n", PaAsio_GetAsioErrorText (asioError)));
             goto error;
         }
-        PA_DEBUG(("after ASIOSetSampleRate(%f)\n",sampleRate));
-    }
-    else
-    {
-        PA_DEBUG(("No Need to change SR\n"));
+
+        PA_DEBUG ( ("after ASIOSetSampleRate(%f)\n",sampleRate));
+    } else {
+        PA_DEBUG ( ("No Need to change SR\n"));
     }
 
 error:
@@ -1848,7 +1857,7 @@ error:
 
 /* see pa_hostapi.h for a list of validity guarantees made about OpenStream  parameters */
 
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+static PaError OpenStream (struct PaUtilHostApiRepresentation *hostApi,
                            PaStream** s,
                            const PaStreamParameters *inputParameters,
                            const PaStreamParameters *outputParameters,
@@ -1856,10 +1865,10 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
                            unsigned long framesPerBuffer,
                            PaStreamFlags streamFlags,
                            PaStreamCallback *streamCallback,
-                           void *userData )
+                           void *userData)
 {
     PaError result = paNoError;
-    PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*)hostApi;
+    PaAsioHostApiRepresentation *asioHostApi = (PaAsioHostApiRepresentation*) hostApi;
     PaAsioStream *stream = 0;
     PaAsioStreamInfo *inputStreamInfo, *outputStreamInfo;
     unsigned long framesPerHostBuffer;
@@ -1879,7 +1888,7 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
     int *outputChannelSelectors = 0;
 
     /* Are we using blocking i/o interface? */
-    int usingBlockingIo = ( !streamCallback ) ? TRUE : FALSE;
+    int usingBlockingIo = (!streamCallback) ? TRUE : FALSE;
     /* Blocking i/o stuff */
     long lBlockingBufferSize     = 0; /* Desired ring buffer size in samples. */
     long lBlockingBufferSizePow2 = 0; /* Power-of-2 rounded ring buffer size. */
@@ -1892,80 +1901,73 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
 
     /* unless we move to using lower level ASIO calls, we can only have
         one device open at a time */
-    if( asioHostApi->openAsioDeviceIndex != paNoDevice )
-    {
-        PA_DEBUG(("OpenStream paDeviceUnavailable\n"));
+    if (asioHostApi->openAsioDeviceIndex != paNoDevice) {
+        PA_DEBUG ( ("OpenStream paDeviceUnavailable\n"));
         return paDeviceUnavailable;
     }
 
-    assert( theAsioStream == 0 );
+    assert (theAsioStream == 0);
 
-    if( inputParameters && outputParameters )
-    {
+    if (inputParameters && outputParameters) {
         /* full duplex ASIO stream must use the same device for input and output */
 
-        if( inputParameters->device != outputParameters->device )
-        {
-            PA_DEBUG(("OpenStream paBadIODeviceCombination\n"));
+        if (inputParameters->device != outputParameters->device) {
+            PA_DEBUG ( ("OpenStream paBadIODeviceCombination\n"));
             return paBadIODeviceCombination;
         }
     }
 
-    if( inputParameters )
-    {
+    if (inputParameters) {
         inputChannelCount = inputParameters->channelCount;
         inputSampleFormat = inputParameters->sampleFormat;
-        suggestedInputLatencyFrames = (unsigned long)((inputParameters->suggestedLatency * sampleRate)+0.5f);
+        suggestedInputLatencyFrames = (unsigned long) ( (inputParameters->suggestedLatency * sampleRate) +0.5f);
 
         /* unless alternate device specification is supported, reject the use of
             paUseHostApiSpecificDeviceSpecification */
-        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+        if (inputParameters->device == paUseHostApiSpecificDeviceSpecification)
             return paInvalidDevice;
 
         asioDeviceIndex = inputParameters->device;
 
-        PaAsioDeviceInfo *asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[asioDeviceIndex];
+        PaAsioDeviceInfo *asioDeviceInfo = (PaAsioDeviceInfo*) hostApi->deviceInfos[asioDeviceIndex];
 
         /* validate hostApiSpecificStreamInfo */
-        inputStreamInfo = (PaAsioStreamInfo*)inputParameters->hostApiSpecificStreamInfo;
-        result = ValidateAsioSpecificStreamInfo( inputParameters, inputStreamInfo,
-            asioDeviceInfo->commonDeviceInfo.maxInputChannels,
-            &inputChannelSelectors
-        );
-        if( result != paNoError ) return result;
-    }
-    else
-    {
+        inputStreamInfo = (PaAsioStreamInfo*) inputParameters->hostApiSpecificStreamInfo;
+        result = ValidateAsioSpecificStreamInfo (inputParameters, inputStreamInfo,
+                 asioDeviceInfo->commonDeviceInfo.maxInputChannels,
+                 &inputChannelSelectors
+                                                );
+
+        if (result != paNoError) return result;
+    } else {
         inputChannelCount = 0;
         inputSampleFormat = 0;
         suggestedInputLatencyFrames = 0;
     }
 
-    if( outputParameters )
-    {
+    if (outputParameters) {
         outputChannelCount = outputParameters->channelCount;
         outputSampleFormat = outputParameters->sampleFormat;
-        suggestedOutputLatencyFrames = (unsigned long)((outputParameters->suggestedLatency * sampleRate)+0.5f);
+        suggestedOutputLatencyFrames = (unsigned long) ( (outputParameters->suggestedLatency * sampleRate) +0.5f);
 
         /* unless alternate device specification is supported, reject the use of
             paUseHostApiSpecificDeviceSpecification */
-        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+        if (outputParameters->device == paUseHostApiSpecificDeviceSpecification)
             return paInvalidDevice;
 
         asioDeviceIndex = outputParameters->device;
 
-        PaAsioDeviceInfo *asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[asioDeviceIndex];
+        PaAsioDeviceInfo *asioDeviceInfo = (PaAsioDeviceInfo*) hostApi->deviceInfos[asioDeviceIndex];
 
         /* validate hostApiSpecificStreamInfo */
-        outputStreamInfo = (PaAsioStreamInfo*)outputParameters->hostApiSpecificStreamInfo;
-        result = ValidateAsioSpecificStreamInfo( outputParameters, outputStreamInfo,
-            asioDeviceInfo->commonDeviceInfo.maxOutputChannels,
-            &outputChannelSelectors
-        );
-        if( result != paNoError ) return result;
-    }
-    else
-    {
+        outputStreamInfo = (PaAsioStreamInfo*) outputParameters->hostApiSpecificStreamInfo;
+        result = ValidateAsioSpecificStreamInfo (outputParameters, outputStreamInfo,
+                 asioDeviceInfo->commonDeviceInfo.maxOutputChannels,
+                 &outputChannelSelectors
+                                                );
+
+        if (result != paNoError) return result;
+    } else {
         outputChannelCount = 0;
         outputSampleFormat = 0;
         suggestedOutputLatencyFrames = 0;
@@ -1976,39 +1978,37 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
     /* NOTE: we load the driver and use its current settings
         rather than the ones in our device info structure which may be stale */
 
-    result = LoadAsioDriver( asioHostApi, asioHostApi->inheritedHostApiRep.deviceInfos[ asioDeviceIndex ]->name,
-            driverInfo, asioHostApi->systemSpecific );
-    if( result == paNoError )
+    result = LoadAsioDriver (asioHostApi, asioHostApi->inheritedHostApiRep.deviceInfos[ asioDeviceIndex ]->name,
+                             driverInfo, asioHostApi->systemSpecific);
+
+    if (result == paNoError)
         asioIsInitialized = 1;
-    else{
-        PA_DEBUG(("OpenStream ERROR1 - LoadAsioDriver returned %d\n", result));
+    else {
+        PA_DEBUG ( ("OpenStream ERROR1 - LoadAsioDriver returned %d\n", result));
         goto error;
     }
 
     /* check that input device can support inputChannelCount */
-    if( inputChannelCount > 0 )
-    {
-        if( inputChannelCount > driverInfo->inputChannelCount )
-        {
+    if (inputChannelCount > 0) {
+        if (inputChannelCount > driverInfo->inputChannelCount) {
             result = paInvalidChannelCount;
-            PA_DEBUG(("OpenStream ERROR2\n"));
+            PA_DEBUG ( ("OpenStream ERROR2\n"));
             goto error;
         }
     }
 
     /* check that output device can support outputChannelCount */
-    if( outputChannelCount )
-    {
-        if( outputChannelCount > driverInfo->outputChannelCount )
-        {
+    if (outputChannelCount) {
+        if (outputChannelCount > driverInfo->outputChannelCount) {
             result = paInvalidChannelCount;
-            PA_DEBUG(("OpenStream ERROR3\n"));
+            PA_DEBUG ( ("OpenStream ERROR3\n"));
             goto error;
         }
     }
 
-    result = ValidateAndSetSampleRate( sampleRate );
-    if( result != paNoError )
+    result = ValidateAndSetSampleRate (sampleRate);
+
+    if (result != paNoError)
         goto error;
 
     /*
@@ -2018,30 +2018,32 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
     */
 
     /* validate platform specific flags */
-    if( (streamFlags & paPlatformSpecificFlags) != 0 ){
-        PA_DEBUG(("OpenStream invalid flags!!\n"));
+    if ( (streamFlags & paPlatformSpecificFlags) != 0) {
+        PA_DEBUG ( ("OpenStream invalid flags!!\n"));
         return paInvalidFlag; /* unexpected platform specific flag */
     }
 
 
-    stream = (PaAsioStream*)PaUtil_AllocateMemory( sizeof(PaAsioStream) );
-    if( !stream )
-    {
+    stream = (PaAsioStream*) PaUtil_AllocateMemory (sizeof (PaAsioStream));
+
+    if (!stream) {
         result = paInsufficientMemory;
-        PA_DEBUG(("OpenStream ERROR5\n"));
+        PA_DEBUG ( ("OpenStream ERROR5\n"));
         goto error;
     }
+
     stream->blockingState = NULL; /* Blocking i/o not initialized, yet. */
 
 
-    stream->completedBuffersPlayedEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
-    if( stream->completedBuffersPlayedEvent == NULL )
-    {
+    stream->completedBuffersPlayedEvent = CreateEvent (NULL, TRUE, FALSE, NULL);
+
+    if (stream->completedBuffersPlayedEvent == NULL) {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );
-        PA_DEBUG(("OpenStream ERROR6\n"));
+        PA_ASIO_SET_LAST_SYSTEM_ERROR (GetLastError());
+        PA_DEBUG ( ("OpenStream ERROR6\n"));
         goto error;
     }
+
     completedBuffersPlayedEventInited = 1;
 
 
@@ -2050,95 +2052,87 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
     stream->bufferPtrs = 0; /* for deallocation in error */
 
     /* Using blocking i/o interface... */
-    if( usingBlockingIo )
-    {
+    if (usingBlockingIo) {
         /* Blocking i/o is implemented by running callback mode, using a special blocking i/o callback. */
         streamCallback = BlockingIoPaCallback; /* Setup PA to use the ASIO blocking i/o callback. */
         userData       = &theAsioStream;       /* The callback user data will be the PA ASIO stream. */
-        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
-                                               &asioHostApi->blockingStreamInterface, streamCallback, userData );
-    }
-    else /* Using callback interface... */
-    {
-        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
-                                               &asioHostApi->callbackStreamInterface, streamCallback, userData );
+        PaUtil_InitializeStreamRepresentation (&stream->streamRepresentation,
+                                               &asioHostApi->blockingStreamInterface, streamCallback, userData);
+    } else { /* Using callback interface... */
+        PaUtil_InitializeStreamRepresentation (&stream->streamRepresentation,
+                                               &asioHostApi->callbackStreamInterface, streamCallback, userData);
     }
 
 
-    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );
+    PaUtil_InitializeCpuLoadMeasurer (&stream->cpuLoadMeasurer, sampleRate);
 
 
-    stream->asioBufferInfos = (ASIOBufferInfo*)PaUtil_AllocateMemory(
-            sizeof(ASIOBufferInfo) * (inputChannelCount + outputChannelCount) );
-    if( !stream->asioBufferInfos )
-    {
+    stream->asioBufferInfos = (ASIOBufferInfo*) PaUtil_AllocateMemory (
+                                  sizeof (ASIOBufferInfo) * (inputChannelCount + outputChannelCount));
+
+    if (!stream->asioBufferInfos) {
         result = paInsufficientMemory;
-        PA_DEBUG(("OpenStream ERROR7\n"));
+        PA_DEBUG ( ("OpenStream ERROR7\n"));
         goto error;
     }
 
 
-    for( i=0; i < inputChannelCount; ++i )
-    {
+    for (i=0; i < inputChannelCount; ++i) {
         ASIOBufferInfo *info = &stream->asioBufferInfos[i];
 
         info->isInput = ASIOTrue;
 
-        if( inputChannelSelectors ){
+        if (inputChannelSelectors) {
             // inputChannelSelectors values have already been validated in
             // ValidateAsioSpecificStreamInfo() above
             info->channelNum = inputChannelSelectors[i];
-        }else{
+        } else {
             info->channelNum = i;
         }
 
         info->buffers[0] = info->buffers[1] = 0;
     }
 
-    for( i=0; i < outputChannelCount; ++i ){
+    for (i=0; i < outputChannelCount; ++i) {
         ASIOBufferInfo *info = &stream->asioBufferInfos[inputChannelCount+i];
 
         info->isInput = ASIOFalse;
 
-        if( outputChannelSelectors ){
+        if (outputChannelSelectors) {
             // outputChannelSelectors values have already been validated in
             // ValidateAsioSpecificStreamInfo() above
             info->channelNum = outputChannelSelectors[i];
-        }else{
+        } else {
             info->channelNum = i;
         }
-        
+
         info->buffers[0] = info->buffers[1] = 0;
     }
 
 
     /* Using blocking i/o interface... */
-    if( usingBlockingIo )
-    {
-/** @todo REVIEW selection of host buffer size for blocking i/o */
+    if (usingBlockingIo) {
+        /** @todo REVIEW selection of host buffer size for blocking i/o */
         /* Use default host latency for blocking i/o. */
-        framesPerHostBuffer = SelectHostBufferSize( 0, driverInfo );
+        framesPerHostBuffer = SelectHostBufferSize (0, driverInfo);
 
-    }
-    else /* Using callback interface... */
-    {
-        framesPerHostBuffer = SelectHostBufferSize(
-                (( suggestedInputLatencyFrames > suggestedOutputLatencyFrames )
-                        ? suggestedInputLatencyFrames : suggestedOutputLatencyFrames),
-                driverInfo );
+    } else { /* Using callback interface... */
+        framesPerHostBuffer = SelectHostBufferSize (
+                                  ( (suggestedInputLatencyFrames > suggestedOutputLatencyFrames)
+                                    ? suggestedInputLatencyFrames : suggestedOutputLatencyFrames),
+                                  driverInfo);
     }
 
 
-    PA_DEBUG(("PaAsioOpenStream: framesPerHostBuffer :%d\n",  framesPerHostBuffer));
+    PA_DEBUG ( ("PaAsioOpenStream: framesPerHostBuffer :%d\n",  framesPerHostBuffer));
 
-    asioError = ASIOCreateBuffers( stream->asioBufferInfos,
-            inputChannelCount+outputChannelCount,
-            framesPerHostBuffer, &asioCallbacks_ );
+    asioError = ASIOCreateBuffers (stream->asioBufferInfos,
+                                   inputChannelCount+outputChannelCount,
+                                   framesPerHostBuffer, &asioCallbacks_);
 
-    if( asioError != ASE_OK
-            && framesPerHostBuffer != (unsigned long)driverInfo->bufferPreferredSize )
-    {
-        PA_DEBUG(("ERROR: ASIOCreateBuffers: %s\n", PaAsio_GetAsioErrorText(asioError) ));
+    if (asioError != ASE_OK
+            && framesPerHostBuffer != (unsigned long) driverInfo->bufferPreferredSize) {
+        PA_DEBUG ( ("ERROR: ASIOCreateBuffers: %s\n", PaAsio_GetAsioErrorText (asioError)));
         /*
             Some buggy drivers (like the Hoontech DSP24) give incorrect
             [min, preferred, max] values They should work with the preferred size
@@ -2148,138 +2142,122 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
 
         framesPerHostBuffer = driverInfo->bufferPreferredSize;
 
-        PA_DEBUG(("PaAsioOpenStream: CORRECTED framesPerHostBuffer :%d\n",  framesPerHostBuffer));
+        PA_DEBUG ( ("PaAsioOpenStream: CORRECTED framesPerHostBuffer :%d\n",  framesPerHostBuffer));
 
-        ASIOError asioError2 = ASIOCreateBuffers( stream->asioBufferInfos,
-                inputChannelCount+outputChannelCount,
-                 framesPerHostBuffer, &asioCallbacks_ );
-        if( asioError2 == ASE_OK )
+        ASIOError asioError2 = ASIOCreateBuffers (stream->asioBufferInfos,
+                               inputChannelCount+outputChannelCount,
+                               framesPerHostBuffer, &asioCallbacks_);
+
+        if (asioError2 == ASE_OK)
             asioError = ASE_OK;
     }
 
-    if( asioError != ASE_OK )
-    {
+    if (asioError != ASE_OK) {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
-        PA_DEBUG(("OpenStream ERROR9\n"));
+        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
+        PA_DEBUG ( ("OpenStream ERROR9\n"));
         goto error;
     }
 
     asioBuffersCreated = 1;
 
-    stream->asioChannelInfos = (ASIOChannelInfo*)PaUtil_AllocateMemory(
-            sizeof(ASIOChannelInfo) * (inputChannelCount + outputChannelCount) );
-    if( !stream->asioChannelInfos )
-    {
+    stream->asioChannelInfos = (ASIOChannelInfo*) PaUtil_AllocateMemory (
+                                   sizeof (ASIOChannelInfo) * (inputChannelCount + outputChannelCount));
+
+    if (!stream->asioChannelInfos) {
         result = paInsufficientMemory;
-        PA_DEBUG(("OpenStream ERROR10\n"));
+        PA_DEBUG ( ("OpenStream ERROR10\n"));
         goto error;
     }
 
-    for( i=0; i < inputChannelCount + outputChannelCount; ++i )
-    {
+    for (i=0; i < inputChannelCount + outputChannelCount; ++i) {
         stream->asioChannelInfos[i].channel = stream->asioBufferInfos[i].channelNum;
         stream->asioChannelInfos[i].isInput = stream->asioBufferInfos[i].isInput;
-        asioError = ASIOGetChannelInfo( &stream->asioChannelInfos[i] );
-        if( asioError != ASE_OK )
-        {
+        asioError = ASIOGetChannelInfo (&stream->asioChannelInfos[i]);
+
+        if (asioError != ASE_OK) {
             result = paUnanticipatedHostError;
-            PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
-            PA_DEBUG(("OpenStream ERROR11\n"));
+            PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
+            PA_DEBUG ( ("OpenStream ERROR11\n"));
             goto error;
         }
     }
 
-    stream->bufferPtrs = (void**)PaUtil_AllocateMemory(
-            2 * sizeof(void*) * (inputChannelCount + outputChannelCount) );
-    if( !stream->bufferPtrs )
-    {
+    stream->bufferPtrs = (void**) PaUtil_AllocateMemory (
+                             2 * sizeof (void*) * (inputChannelCount + outputChannelCount));
+
+    if (!stream->bufferPtrs) {
         result = paInsufficientMemory;
-        PA_DEBUG(("OpenStream ERROR12\n"));
+        PA_DEBUG ( ("OpenStream ERROR12\n"));
         goto error;
     }
 
-    if( inputChannelCount > 0 )
-    {
+    if (inputChannelCount > 0) {
         stream->inputBufferPtrs[0] = stream-> bufferPtrs;
         stream->inputBufferPtrs[1] = &stream->bufferPtrs[inputChannelCount];
 
-        for( i=0; i<inputChannelCount; ++i )
-        {
+        for (i=0; i<inputChannelCount; ++i) {
             stream->inputBufferPtrs[0][i] = stream->asioBufferInfos[i].buffers[0];
             stream->inputBufferPtrs[1][i] = stream->asioBufferInfos[i].buffers[1];
         }
-    }
-    else
-    {
+    } else {
         stream->inputBufferPtrs[0] = 0;
         stream->inputBufferPtrs[1] = 0;
     }
 
-    if( outputChannelCount > 0 )
-    {
+    if (outputChannelCount > 0) {
         stream->outputBufferPtrs[0] = &stream->bufferPtrs[inputChannelCount*2];
         stream->outputBufferPtrs[1] = &stream->bufferPtrs[inputChannelCount*2 + outputChannelCount];
 
-        for( i=0; i<outputChannelCount; ++i )
-        {
+        for (i=0; i<outputChannelCount; ++i) {
             stream->outputBufferPtrs[0][i] = stream->asioBufferInfos[inputChannelCount+i].buffers[0];
             stream->outputBufferPtrs[1][i] = stream->asioBufferInfos[inputChannelCount+i].buffers[1];
         }
-    }
-    else
-    {
+    } else {
         stream->outputBufferPtrs[0] = 0;
         stream->outputBufferPtrs[1] = 0;
     }
 
-    if( inputChannelCount > 0 )
-    {
+    if (inputChannelCount > 0) {
         /* FIXME: assume all channels use the same type for now */
         ASIOSampleType inputType = stream->asioChannelInfos[0].type;
 
-        PA_DEBUG(("ASIO Input  type:%d",inputType));
-        AsioSampleTypeLOG(inputType);
-        hostInputSampleFormat = AsioSampleTypeToPaNativeSampleFormat( inputType );
+        PA_DEBUG ( ("ASIO Input  type:%d",inputType));
+        AsioSampleTypeLOG (inputType);
+        hostInputSampleFormat = AsioSampleTypeToPaNativeSampleFormat (inputType);
 
-        SelectAsioToPaConverter( inputType, &stream->inputBufferConverter, &stream->inputShift );
-    }
-    else
-    {
+        SelectAsioToPaConverter (inputType, &stream->inputBufferConverter, &stream->inputShift);
+    } else {
         hostInputSampleFormat = 0;
         stream->inputBufferConverter = 0;
     }
 
-    if( outputChannelCount > 0 )
-    {
+    if (outputChannelCount > 0) {
         /* FIXME: assume all channels use the same type for now */
         ASIOSampleType outputType = stream->asioChannelInfos[inputChannelCount].type;
 
-        PA_DEBUG(("ASIO Output type:%d",outputType));
-        AsioSampleTypeLOG(outputType);
-        hostOutputSampleFormat = AsioSampleTypeToPaNativeSampleFormat( outputType );
+        PA_DEBUG ( ("ASIO Output type:%d",outputType));
+        AsioSampleTypeLOG (outputType);
+        hostOutputSampleFormat = AsioSampleTypeToPaNativeSampleFormat (outputType);
 
-        SelectPaToAsioConverter( outputType, &stream->outputBufferConverter, &stream->outputShift );
-    }
-    else
-    {
+        SelectPaToAsioConverter (outputType, &stream->outputBufferConverter, &stream->outputShift);
+    } else {
         hostOutputSampleFormat = 0;
         stream->outputBufferConverter = 0;
     }
 
 
-    ASIOGetLatencies( &stream->inputLatency, &stream->outputLatency );
+    ASIOGetLatencies (&stream->inputLatency, &stream->outputLatency);
 
 
     /* Using blocking i/o interface... */
-    if( usingBlockingIo )
-    {
+    if (usingBlockingIo) {
         /* Allocate the blocking i/o input ring buffer memory. */
-        stream->blockingState = (PaAsioStreamBlockingState*)PaUtil_AllocateMemory( sizeof(PaAsioStreamBlockingState) );
-        if( !stream->blockingState )
-        {
+        stream->blockingState = (PaAsioStreamBlockingState*) PaUtil_AllocateMemory (sizeof (PaAsioStreamBlockingState));
+
+        if (!stream->blockingState) {
             result = paInsufficientMemory;
-            PA_DEBUG(("ERROR! Blocking i/o interface struct allocation failed in OpenStream()\n"));
+            PA_DEBUG ( ("ERROR! Blocking i/o interface struct allocation failed in OpenStream()\n"));
             goto error;
         }
 
@@ -2294,75 +2272,78 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
 
 
         /* If the user buffer is unspecified */
-        if( framesPerBuffer == paFramesPerBufferUnspecified )
-        {
+        if (framesPerBuffer == paFramesPerBufferUnspecified) {
             /* Make the user buffer the same size as the host buffer. */
             framesPerBuffer = framesPerHostBuffer;
         }
 
 
         /* Initialize callback buffer processor. */
-        result = PaUtil_InitializeBufferProcessor( &stream->bufferProcessor               ,
-                                                    inputChannelCount                     ,
-                                                    inputSampleFormat & ~paNonInterleaved , /* Ring buffer. */
-                                                    hostInputSampleFormat                 , /* Host format. */
-                                                    outputChannelCount                    ,
-                                                    outputSampleFormat & ~paNonInterleaved, /* Ring buffer. */
-                                                    hostOutputSampleFormat                , /* Host format. */
-                                                    sampleRate                            ,
-                                                    streamFlags                           ,
-                                                    framesPerBuffer                       , /* Frames per ring buffer block. */
-                                                    framesPerHostBuffer                   , /* Frames per asio buffer. */
-                                                    paUtilFixedHostBufferSize             ,
-                                                    streamCallback                        ,
-                                                    userData                               );
-        if( result != paNoError ){
-            PA_DEBUG(("OpenStream ERROR13\n"));
+        result = PaUtil_InitializeBufferProcessor (&stream->bufferProcessor               ,
+                 inputChannelCount                     ,
+                 inputSampleFormat & ~paNonInterleaved , /* Ring buffer. */
+                 hostInputSampleFormat                 , /* Host format. */
+                 outputChannelCount                    ,
+                 outputSampleFormat & ~paNonInterleaved, /* Ring buffer. */
+                 hostOutputSampleFormat                , /* Host format. */
+                 sampleRate                            ,
+                 streamFlags                           ,
+                 framesPerBuffer                       , /* Frames per ring buffer block. */
+                 framesPerHostBuffer                   , /* Frames per asio buffer. */
+                 paUtilFixedHostBufferSize             ,
+                 streamCallback                        ,
+                 userData);
+
+        if (result != paNoError) {
+            PA_DEBUG ( ("OpenStream ERROR13\n"));
             goto error;
         }
+
         callbackBufferProcessorInited = TRUE;
 
         /* Initialize the blocking i/o buffer processor. */
-        result = PaUtil_InitializeBufferProcessor(&stream->blockingState->bufferProcessor,
-                                                   inputChannelCount                     ,
-                                                   inputSampleFormat                     , /* User format. */
-                                                   inputSampleFormat & ~paNonInterleaved , /* Ring buffer. */
-                                                   outputChannelCount                    ,
-                                                   outputSampleFormat                    , /* User format. */
-                                                   outputSampleFormat & ~paNonInterleaved, /* Ring buffer. */
-                                                   sampleRate                            ,
-                                                   paClipOff | paDitherOff               , /* Don't use dither nor clipping. */
-                                                   framesPerBuffer                       , /* Frames per user buffer. */
-                                                   framesPerBuffer                       , /* Frames per ring buffer block. */
-                                                   paUtilBoundedHostBufferSize           ,
-                                                   NULL, NULL                            );/* No callback! */
-        if( result != paNoError ){
-            PA_DEBUG(("ERROR! Blocking i/o buffer processor initialization failed in OpenStream()\n"));
+        result = PaUtil_InitializeBufferProcessor (&stream->blockingState->bufferProcessor,
+                 inputChannelCount                     ,
+                 inputSampleFormat                     , /* User format. */
+                 inputSampleFormat & ~paNonInterleaved , /* Ring buffer. */
+                 outputChannelCount                    ,
+                 outputSampleFormat                    , /* User format. */
+                 outputSampleFormat & ~paNonInterleaved, /* Ring buffer. */
+                 sampleRate                            ,
+                 paClipOff | paDitherOff               , /* Don't use dither nor clipping. */
+                 framesPerBuffer                       , /* Frames per user buffer. */
+                 framesPerBuffer                       , /* Frames per ring buffer block. */
+                 paUtilBoundedHostBufferSize           ,
+                 NULL, NULL);                            /* No callback! */
+
+        if (result != paNoError) {
+            PA_DEBUG ( ("ERROR! Blocking i/o buffer processor initialization failed in OpenStream()\n"));
             goto error;
         }
+
         blockingBufferProcessorInited = TRUE;
 
         /* If input is requested. */
-        if( inputChannelCount )
-        {
+        if (inputChannelCount) {
             /* Create the callback sync-event. */
-            stream->blockingState->readFramesReadyEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
-            if( stream->blockingState->readFramesReadyEvent == NULL )
-            {
+            stream->blockingState->readFramesReadyEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
+
+            if (stream->blockingState->readFramesReadyEvent == NULL) {
                 result = paUnanticipatedHostError;
-                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );
-                PA_DEBUG(("ERROR! Blocking i/o \"read frames ready\" event creation failed in OpenStream()\n"));
+                PA_ASIO_SET_LAST_SYSTEM_ERROR (GetLastError());
+                PA_DEBUG ( ("ERROR! Blocking i/o \"read frames ready\" event creation failed in OpenStream()\n"));
                 goto error;
             }
+
             blockingReadFramesReadyEventInitialized = 1;
 
 
             /* Create pointer buffer to access non-interleaved data in ReadStream() */
-            stream->blockingState->readStreamBuffer = (void**)PaUtil_AllocateMemory( sizeof(void*) * inputChannelCount );
-            if( !stream->blockingState->readStreamBuffer )
-            {
+            stream->blockingState->readStreamBuffer = (void**) PaUtil_AllocateMemory (sizeof (void*) * inputChannelCount);
+
+            if (!stream->blockingState->readStreamBuffer) {
                 result = paInsufficientMemory;
-                PA_DEBUG(("ERROR! Blocking i/o read stream buffer allocation failed in OpenStream()\n"));
+                PA_DEBUG ( ("ERROR! Blocking i/o read stream buffer allocation failed in OpenStream()\n"));
                 goto error;
             }
 
@@ -2387,68 +2368,70 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
 
             /* Get the next larger or equal power-of-two buffersize. */
             lBlockingBufferSizePow2 = 1;
-            while( lBlockingBufferSize > (lBlockingBufferSizePow2<<=1) );
+
+            while (lBlockingBufferSize > (lBlockingBufferSizePow2<<=1));
+
             lBlockingBufferSize = lBlockingBufferSizePow2;
 
             /* Compute total intput latency in seconds */
             stream->streamRepresentation.streamInfo.inputLatency =
-                (double)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor               )
-                        + PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor)
-                        + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer
-                        + stream->inputLatency )
+                (double) (PaUtil_GetBufferProcessorInputLatency (&stream->bufferProcessor)
+                          + PaUtil_GetBufferProcessorInputLatency (&stream->blockingState->bufferProcessor)
+                          + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer
+                          + stream->inputLatency)
                 / sampleRate;
 
             /* The code below prints the ASIO latency which doesn't include
                the buffer processor latency nor the blocking i/o latency. It
                reports the added latency separately.
             */
-            PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms),\n         added buffProc:%ld (%ld ms),\n         added blocking:%ld (%ld ms)\n",
-                stream->inputLatency,
-                (long)( stream->inputLatency * (1000.0 / sampleRate) ),
-                PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor),
-                (long)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
-                PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
-                (long)( (PaUtil_GetBufferProcessorInputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate) )
-                ));
+            PA_DEBUG ( ("PaAsio : ASIO InputLatency = %ld (%ld ms),\n         added buffProc:%ld (%ld ms),\n         added blocking:%ld (%ld ms)\n",
+                        stream->inputLatency,
+                        (long) (stream->inputLatency * (1000.0 / sampleRate)),
+                        PaUtil_GetBufferProcessorInputLatency (&stream->bufferProcessor),
+                        (long) (PaUtil_GetBufferProcessorInputLatency (&stream->bufferProcessor) * (1000.0 / sampleRate)),
+                        PaUtil_GetBufferProcessorInputLatency (&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
+                        (long) ( (PaUtil_GetBufferProcessorInputLatency (&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate))
+                       ));
 
             /* Determine the size of ring buffer in bytes. */
-            lBytesPerFrame = inputChannelCount * Pa_GetSampleSize(inputSampleFormat );
+            lBytesPerFrame = inputChannelCount * Pa_GetSampleSize (inputSampleFormat);
 
             /* Allocate the blocking i/o input ring buffer memory. */
-            stream->blockingState->readRingBufferData = (void*)PaUtil_AllocateMemory( lBlockingBufferSize * lBytesPerFrame );
-            if( !stream->blockingState->readRingBufferData )
-            {
+            stream->blockingState->readRingBufferData = (void*) PaUtil_AllocateMemory (lBlockingBufferSize * lBytesPerFrame);
+
+            if (!stream->blockingState->readRingBufferData) {
                 result = paInsufficientMemory;
-                PA_DEBUG(("ERROR! Blocking i/o input ring buffer allocation failed in OpenStream()\n"));
+                PA_DEBUG ( ("ERROR! Blocking i/o input ring buffer allocation failed in OpenStream()\n"));
                 goto error;
             }
 
             /* Initialize the input ring buffer struct. */
-            PaUtil_InitializeRingBuffer( &stream->blockingState->readRingBuffer    ,
-                                          lBytesPerFrame                           ,
-                                          lBlockingBufferSize                      ,
-                                          stream->blockingState->readRingBufferData );
+            PaUtil_InitializeRingBuffer (&stream->blockingState->readRingBuffer    ,
+                                         lBytesPerFrame                           ,
+                                         lBlockingBufferSize                      ,
+                                         stream->blockingState->readRingBufferData);
         }
 
         /* If output is requested. */
-        if( outputChannelCount )
-        {
-            stream->blockingState->writeBuffersReadyEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
-            if( stream->blockingState->writeBuffersReadyEvent == NULL )
-            {
+        if (outputChannelCount) {
+            stream->blockingState->writeBuffersReadyEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
+
+            if (stream->blockingState->writeBuffersReadyEvent == NULL) {
                 result = paUnanticipatedHostError;
-                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );
-                PA_DEBUG(("ERROR! Blocking i/o \"write buffers ready\" event creation failed in OpenStream()\n"));
+                PA_ASIO_SET_LAST_SYSTEM_ERROR (GetLastError());
+                PA_DEBUG ( ("ERROR! Blocking i/o \"write buffers ready\" event creation failed in OpenStream()\n"));
                 goto error;
             }
+
             blockingWriteBuffersReadyEventInitialized = 1;
 
             /* Create pointer buffer to access non-interleaved data in WriteStream() */
-            stream->blockingState->writeStreamBuffer = (const void**)PaUtil_AllocateMemory( sizeof(const void*) * outputChannelCount );
-            if( !stream->blockingState->writeStreamBuffer )
-            {
+            stream->blockingState->writeStreamBuffer = (const void**) PaUtil_AllocateMemory (sizeof (const void*) * outputChannelCount);
+
+            if (!stream->blockingState->writeStreamBuffer) {
                 result = paInsufficientMemory;
-                PA_DEBUG(("ERROR! Blocking i/o write stream buffer allocation failed in OpenStream()\n"));
+                PA_DEBUG ( ("ERROR! Blocking i/o write stream buffer allocation failed in OpenStream()\n"));
                 goto error;
             }
 
@@ -2478,90 +2461,92 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
 
             /* Get the next larger or equal power-of-two buffersize. */
             lBlockingBufferSizePow2 = 1;
-            while( lBlockingBufferSize > (lBlockingBufferSizePow2<<=1) );
+
+            while (lBlockingBufferSize > (lBlockingBufferSizePow2<<=1));
+
             lBlockingBufferSize = lBlockingBufferSizePow2;
 
             /* Compute total output latency in seconds */
             stream->streamRepresentation.streamInfo.outputLatency =
-                (double)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor               )
-                        + PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor)
-                        + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer
-                        + stream->outputLatency )
+                (double) (PaUtil_GetBufferProcessorOutputLatency (&stream->bufferProcessor)
+                          + PaUtil_GetBufferProcessorOutputLatency (&stream->blockingState->bufferProcessor)
+                          + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer
+                          + stream->outputLatency)
                 / sampleRate;
 
             /* The code below prints the ASIO latency which doesn't include
                the buffer processor latency nor the blocking i/o latency. It
                reports the added latency separately.
             */
-            PA_DEBUG(("PaAsio : ASIO OutputLatency = %ld (%ld ms),\n         added buffProc:%ld (%ld ms),\n         added blocking:%ld (%ld ms)\n",
-                stream->outputLatency,
-                (long)( stream->inputLatency * (1000.0 / sampleRate) ),
-                PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor),
-                (long)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor) * (1000.0 / sampleRate) ),
-                PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
-                (long)( (PaUtil_GetBufferProcessorOutputLatency(&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate) )
-                ));
+            PA_DEBUG ( ("PaAsio : ASIO OutputLatency = %ld (%ld ms),\n         added buffProc:%ld (%ld ms),\n         added blocking:%ld (%ld ms)\n",
+                        stream->outputLatency,
+                        (long) (stream->inputLatency * (1000.0 / sampleRate)),
+                        PaUtil_GetBufferProcessorOutputLatency (&stream->bufferProcessor),
+                        (long) (PaUtil_GetBufferProcessorOutputLatency (&stream->bufferProcessor) * (1000.0 / sampleRate)),
+                        PaUtil_GetBufferProcessorOutputLatency (&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer,
+                        (long) ( (PaUtil_GetBufferProcessorOutputLatency (&stream->blockingState->bufferProcessor) + (lBlockingBufferSize / framesPerBuffer - 1) * framesPerBuffer) * (1000.0 / sampleRate))
+                       ));
 
             /* Determine the size of ring buffer in bytes. */
-            lBytesPerFrame = outputChannelCount * Pa_GetSampleSize(outputSampleFormat);
+            lBytesPerFrame = outputChannelCount * Pa_GetSampleSize (outputSampleFormat);
 
             /* Allocate the blocking i/o output ring buffer memory. */
-            stream->blockingState->writeRingBufferData = (void*)PaUtil_AllocateMemory( lBlockingBufferSize * lBytesPerFrame );
-            if( !stream->blockingState->writeRingBufferData )
-            {
+            stream->blockingState->writeRingBufferData = (void*) PaUtil_AllocateMemory (lBlockingBufferSize * lBytesPerFrame);
+
+            if (!stream->blockingState->writeRingBufferData) {
                 result = paInsufficientMemory;
-                PA_DEBUG(("ERROR! Blocking i/o output ring buffer allocation failed in OpenStream()\n"));
+                PA_DEBUG ( ("ERROR! Blocking i/o output ring buffer allocation failed in OpenStream()\n"));
                 goto error;
             }
 
             /* Initialize the output ring buffer struct. */
-            PaUtil_InitializeRingBuffer( &stream->blockingState->writeRingBuffer    ,
-                                          lBytesPerFrame                            ,
-                                          lBlockingBufferSize                       ,
-                                          stream->blockingState->writeRingBufferData );
+            PaUtil_InitializeRingBuffer (&stream->blockingState->writeRingBuffer    ,
+                                         lBytesPerFrame                            ,
+                                         lBlockingBufferSize                       ,
+                                         stream->blockingState->writeRingBufferData);
         }
 
         stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
 
 
-    }
-    else /* Using callback interface... */
-    {
-        result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
-                        inputChannelCount, inputSampleFormat, hostInputSampleFormat,
-                        outputChannelCount, outputSampleFormat, hostOutputSampleFormat,
-                        sampleRate, streamFlags, framesPerBuffer,
-                        framesPerHostBuffer, paUtilFixedHostBufferSize,
-                        streamCallback, userData );
-        if( result != paNoError ){
-            PA_DEBUG(("OpenStream ERROR13\n"));
+    } else { /* Using callback interface... */
+        result =  PaUtil_InitializeBufferProcessor (&stream->bufferProcessor,
+                  inputChannelCount, inputSampleFormat, hostInputSampleFormat,
+                  outputChannelCount, outputSampleFormat, hostOutputSampleFormat,
+                  sampleRate, streamFlags, framesPerBuffer,
+                  framesPerHostBuffer, paUtilFixedHostBufferSize,
+                  streamCallback, userData);
+
+        if (result != paNoError) {
+            PA_DEBUG ( ("OpenStream ERROR13\n"));
             goto error;
         }
+
         callbackBufferProcessorInited = TRUE;
 
         stream->streamRepresentation.streamInfo.inputLatency =
-                (double)( PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)
-                    + stream->inputLatency) / sampleRate;   // seconds
+            (double) (PaUtil_GetBufferProcessorInputLatency (&stream->bufferProcessor)
+                      + stream->inputLatency) / sampleRate;   // seconds
         stream->streamRepresentation.streamInfo.outputLatency =
-                (double)( PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)
-                    + stream->outputLatency) / sampleRate; // seconds
+            (double) (PaUtil_GetBufferProcessorOutputLatency (&stream->bufferProcessor)
+                      + stream->outputLatency) / sampleRate; // seconds
         stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
 
         // the code below prints the ASIO latency which doesn't include the
         // buffer processor latency. it reports the added latency separately
-        PA_DEBUG(("PaAsio : ASIO InputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
-                stream->inputLatency,
-                (long)((stream->inputLatency*1000)/ sampleRate),  
-                PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor),
-                (long)((PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)*1000)/ sampleRate)
-                ));
+        PA_DEBUG ( ("PaAsio : ASIO InputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
+                    stream->inputLatency,
+                    (long) ( (stream->inputLatency*1000) / sampleRate),
+                    PaUtil_GetBufferProcessorInputLatency (&stream->bufferProcessor),
+                    (long) ( (PaUtil_GetBufferProcessorInputLatency (&stream->bufferProcessor) *1000) / sampleRate)
+                   ));
 
-        PA_DEBUG(("PaAsio : ASIO OuputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
-                stream->outputLatency,
-                (long)((stream->outputLatency*1000)/ sampleRate), 
-                PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor),
-                (long)((PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)*1000)/ sampleRate)
-                ));
+        PA_DEBUG ( ("PaAsio : ASIO OuputLatency = %ld (%ld ms), added buffProc:%ld (%ld ms)\n",
+                    stream->outputLatency,
+                    (long) ( (stream->outputLatency*1000) / sampleRate),
+                    PaUtil_GetBufferProcessorOutputLatency (&stream->bufferProcessor),
+                    (long) ( (PaUtil_GetBufferProcessorOutputLatency (&stream->bufferProcessor) *1000) / sampleRate)
+                   ));
     }
 
     stream->asioHostApi = asioHostApi;
@@ -2572,65 +2557,68 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
     stream->postOutput = driverInfo->postOutput;
     stream->isStopped = 1;
     stream->isActive = 0;
-    
+
     asioHostApi->openAsioDeviceIndex = asioDeviceIndex;
 
     theAsioStream = stream;
-    *s = (PaStream*)stream;
+    *s = (PaStream*) stream;
 
     return result;
 
 error:
-    PA_DEBUG(("goto errored\n"));
-    if( stream )
-    {
-        if( stream->blockingState )
-        {
-            if( blockingBufferProcessorInited )
-                PaUtil_TerminateBufferProcessor( &stream->blockingState->bufferProcessor );
-
-            if( stream->blockingState->writeRingBufferData )
-                PaUtil_FreeMemory( stream->blockingState->writeRingBufferData );
-            if( stream->blockingState->writeStreamBuffer )
-                PaUtil_FreeMemory( stream->blockingState->writeStreamBuffer );
-            if( blockingWriteBuffersReadyEventInitialized )
-                CloseHandle( stream->blockingState->writeBuffersReadyEvent );
-
-            if( stream->blockingState->readRingBufferData )
-                PaUtil_FreeMemory( stream->blockingState->readRingBufferData );
-            if( stream->blockingState->readStreamBuffer )
-                PaUtil_FreeMemory( stream->blockingState->readStreamBuffer );
-            if( blockingReadFramesReadyEventInitialized )
-                CloseHandle( stream->blockingState->readFramesReadyEvent );
-
-            PaUtil_FreeMemory( stream->blockingState );
+    PA_DEBUG ( ("goto errored\n"));
+
+    if (stream) {
+        if (stream->blockingState) {
+            if (blockingBufferProcessorInited)
+                PaUtil_TerminateBufferProcessor (&stream->blockingState->bufferProcessor);
+
+            if (stream->blockingState->writeRingBufferData)
+                PaUtil_FreeMemory (stream->blockingState->writeRingBufferData);
+
+            if (stream->blockingState->writeStreamBuffer)
+                PaUtil_FreeMemory (stream->blockingState->writeStreamBuffer);
+
+            if (blockingWriteBuffersReadyEventInitialized)
+                CloseHandle (stream->blockingState->writeBuffersReadyEvent);
+
+            if (stream->blockingState->readRingBufferData)
+                PaUtil_FreeMemory (stream->blockingState->readRingBufferData);
+
+            if (stream->blockingState->readStreamBuffer)
+                PaUtil_FreeMemory (stream->blockingState->readStreamBuffer);
+
+            if (blockingReadFramesReadyEventInitialized)
+                CloseHandle (stream->blockingState->readFramesReadyEvent);
+
+            PaUtil_FreeMemory (stream->blockingState);
         }
 
-        if( callbackBufferProcessorInited )
-            PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+        if (callbackBufferProcessorInited)
+            PaUtil_TerminateBufferProcessor (&stream->bufferProcessor);
 
-        if( completedBuffersPlayedEventInited )
-            CloseHandle( stream->completedBuffersPlayedEvent );
+        if (completedBuffersPlayedEventInited)
+            CloseHandle (stream->completedBuffersPlayedEvent);
 
-        if( stream->asioBufferInfos )
-            PaUtil_FreeMemory( stream->asioBufferInfos );
+        if (stream->asioBufferInfos)
+            PaUtil_FreeMemory (stream->asioBufferInfos);
 
-        if( stream->asioChannelInfos )
-            PaUtil_FreeMemory( stream->asioChannelInfos );
+        if (stream->asioChannelInfos)
+            PaUtil_FreeMemory (stream->asioChannelInfos);
 
-        if( stream->bufferPtrs )
-            PaUtil_FreeMemory( stream->bufferPtrs );
+        if (stream->bufferPtrs)
+            PaUtil_FreeMemory (stream->bufferPtrs);
 
-        PaUtil_FreeMemory( stream );
+        PaUtil_FreeMemory (stream);
     }
 
-    if( asioBuffersCreated )
+    if (asioBuffersCreated)
         ASIODisposeBuffers();
 
-    if( asioIsInitialized )
-	{
-		UnloadAsioDriver();
-	}
+    if (asioIsInitialized) {
+        UnloadAsioDriver();
+    }
+
     return result;
 }
 
@@ -2639,46 +2627,46 @@ error:
     When CloseStream() is called, the multi-api layer ensures that
     the stream has already been stopped or aborted.
 */
-static PaError CloseStream( PaStream* s )
+static PaError CloseStream (PaStream* s)
 {
     PaError result = paNoError;
-    PaAsioStream *stream = (PaAsioStream*)s;
+    PaAsioStream *stream = (PaAsioStream*) s;
 
     /*
         IMPLEMENT ME:
             - additional stream closing + cleanup
     */
 
-    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
-    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
+    PaUtil_TerminateBufferProcessor (&stream->bufferProcessor);
+    PaUtil_TerminateStreamRepresentation (&stream->streamRepresentation);
 
     stream->asioHostApi->openAsioDeviceIndex = paNoDevice;
 
-    CloseHandle( stream->completedBuffersPlayedEvent );
+    CloseHandle (stream->completedBuffersPlayedEvent);
 
     /* Using blocking i/o interface... */
-    if( stream->blockingState )
-    {
-        PaUtil_TerminateBufferProcessor( &stream->blockingState->bufferProcessor );
-
-        if( stream->inputChannelCount ) {
-            PaUtil_FreeMemory( stream->blockingState->readRingBufferData );
-            PaUtil_FreeMemory( stream->blockingState->readStreamBuffer  );
-            CloseHandle( stream->blockingState->readFramesReadyEvent );
+    if (stream->blockingState) {
+        PaUtil_TerminateBufferProcessor (&stream->blockingState->bufferProcessor);
+
+        if (stream->inputChannelCount) {
+            PaUtil_FreeMemory (stream->blockingState->readRingBufferData);
+            PaUtil_FreeMemory (stream->blockingState->readStreamBuffer);
+            CloseHandle (stream->blockingState->readFramesReadyEvent);
         }
-        if( stream->outputChannelCount ) {
-            PaUtil_FreeMemory( stream->blockingState->writeRingBufferData );
-            PaUtil_FreeMemory( stream->blockingState->writeStreamBuffer );
-            CloseHandle( stream->blockingState->writeBuffersReadyEvent );
+
+        if (stream->outputChannelCount) {
+            PaUtil_FreeMemory (stream->blockingState->writeRingBufferData);
+            PaUtil_FreeMemory (stream->blockingState->writeStreamBuffer);
+            CloseHandle (stream->blockingState->writeBuffersReadyEvent);
         }
 
-        PaUtil_FreeMemory( stream->blockingState );
+        PaUtil_FreeMemory (stream->blockingState);
     }
 
-    PaUtil_FreeMemory( stream->asioBufferInfos );
-    PaUtil_FreeMemory( stream->asioChannelInfos );
-    PaUtil_FreeMemory( stream->bufferPtrs );
-    PaUtil_FreeMemory( stream );
+    PaUtil_FreeMemory (stream->asioBufferInfos);
+    PaUtil_FreeMemory (stream->asioChannelInfos);
+    PaUtil_FreeMemory (stream->bufferPtrs);
+    PaUtil_FreeMemory (stream);
 
     ASIODisposeBuffers();
     UnloadAsioDriver();
@@ -2689,7 +2677,7 @@ static PaError CloseStream( PaStream* s )
 }
 
 
-static void bufferSwitch(long index, ASIOBool directProcess)
+static void bufferSwitch (long index, ASIOBool directProcess)
 {
 //TAKEN FROM THE ASIO SDK
 
@@ -2703,27 +2691,27 @@ static void bufferSwitch(long index, ASIOBool directProcess)
     // timeInfo.systemTime fields and the according flags
 
     ASIOTime  timeInfo;
-    memset( &timeInfo, 0, sizeof (timeInfo) );
+    memset (&timeInfo, 0, sizeof (timeInfo));
 
     // get the time stamp of the buffer, not necessary if no
     // synchronization to other media is required
-    if( ASIOGetSamplePosition(&timeInfo.timeInfo.samplePosition, &timeInfo.timeInfo.systemTime) == ASE_OK)
-            timeInfo.timeInfo.flags = kSystemTimeValid | kSamplePositionValid;
+    if (ASIOGetSamplePosition (&timeInfo.timeInfo.samplePosition, &timeInfo.timeInfo.systemTime) == ASE_OK)
+        timeInfo.timeInfo.flags = kSystemTimeValid | kSamplePositionValid;
 
     // Call the real callback
-    bufferSwitchTimeInfo( &timeInfo, index, directProcess );
+    bufferSwitchTimeInfo (&timeInfo, index, directProcess);
 }
 
 
 // conversion from 64 bit ASIOSample/ASIOTimeStamp to double float
 #if NATIVE_INT64
-    #define ASIO64toDouble(a)  (a)
+#define ASIO64toDouble(a)  (a)
 #else
-    const double twoRaisedTo32 = 4294967296.;
-    #define ASIO64toDouble(a)  ((a).lo + (a).hi * twoRaisedTo32)
+const double twoRaisedTo32 = 4294967296.;
+#define ASIO64toDouble(a)  ((a).lo + (a).hi * twoRaisedTo32)
 #endif
 
-static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool directProcess )
+static ASIOTime *bufferSwitchTimeInfo (ASIOTime *timeInfo, long index, ASIOBool directProcess)
 {
     // the actual processing callback.
     // Beware that this is normally in a seperate thread, hence be sure that
@@ -2752,19 +2740,19 @@ static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool
     // synchronization to other media is required
 
     if (timeInfo->timeInfo.flags & kSystemTimeValid)
-            asioDriverInfo.nanoSeconds = ASIO64toDouble(timeInfo->timeInfo.systemTime);
+        asioDriverInfo.nanoSeconds = ASIO64toDouble (timeInfo->timeInfo.systemTime);
     else
-            asioDriverInfo.nanoSeconds = 0;
+        asioDriverInfo.nanoSeconds = 0;
 
     if (timeInfo->timeInfo.flags & kSamplePositionValid)
-            asioDriverInfo.samples = ASIO64toDouble(timeInfo->timeInfo.samplePosition);
+        asioDriverInfo.samples = ASIO64toDouble (timeInfo->timeInfo.samplePosition);
     else
-            asioDriverInfo.samples = 0;
+        asioDriverInfo.samples = 0;
 
     if (timeInfo->timeCode.flags & kTcValid)
-            asioDriverInfo.tcSamples = ASIO64toDouble(timeInfo->timeCode.timeCodeSamples);
+        asioDriverInfo.tcSamples = ASIO64toDouble (timeInfo->timeCode.timeCodeSamples);
     else
-            asioDriverInfo.tcSamples = 0;
+        asioDriverInfo.tcSamples = 0;
 
     // get the system reference time
     asioDriverInfo.sysRefTime = get_sys_reference_time();
@@ -2776,13 +2764,13 @@ static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool
     // the event notification.
     static double last_samples = 0;
     char tmp[128];
-    sprintf (tmp, "diff: %d / %d ms / %d ms / %d samples                 \n", asioDriverInfo.sysRefTime - (long)(asioDriverInfo.nanoSeconds / 1000000.0), asioDriverInfo.sysRefTime, (long)(asioDriverInfo.nanoSeconds / 1000000.0), (long)(asioDriverInfo.samples - last_samples));
+    sprintf (tmp, "diff: %d / %d ms / %d ms / %d samples                 \n", asioDriverInfo.sysRefTime - (long) (asioDriverInfo.nanoSeconds / 1000000.0), asioDriverInfo.sysRefTime, (long) (asioDriverInfo.nanoSeconds / 1000000.0), (long) (asioDriverInfo.samples - last_samples));
     OutputDebugString (tmp);
     last_samples = asioDriverInfo.samples;
 #endif
 
 
-    if( !theAsioStream )
+    if (!theAsioStream)
         return 0L;
 
     // Keep sample position
@@ -2790,57 +2778,49 @@ static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool
 
 
     // protect against reentrancy
-    if( PaAsio_AtomicIncrement(&theAsioStream->reenterCount) )
-    {
+    if (PaAsio_AtomicIncrement (&theAsioStream->reenterCount)) {
         theAsioStream->reenterError++;
         //DBUG(("bufferSwitchTimeInfo : reentrancy detection = %d\n", asioDriverInfo.reenterError));
         return 0L;
     }
 
     int buffersDone = 0;
-    
-    do
-    {
-        if( buffersDone > 0 )
-        {
+
+    do {
+        if (buffersDone > 0) {
             // this is a reentered buffer, we missed processing it on time
             // set the input overflow and output underflow flags as appropriate
-            
-            if( theAsioStream->inputChannelCount > 0 )
+
+            if (theAsioStream->inputChannelCount > 0)
                 theAsioStream->callbackFlags |= paInputOverflow;
-                
-            if( theAsioStream->outputChannelCount > 0 )
+
+            if (theAsioStream->outputChannelCount > 0)
                 theAsioStream->callbackFlags |= paOutputUnderflow;
-        }
-        else
-        {
-            if( theAsioStream->zeroOutput )
-            {
-                ZeroOutputBuffers( theAsioStream, index );
+        } else {
+            if (theAsioStream->zeroOutput) {
+                ZeroOutputBuffers (theAsioStream, index);
 
                 // Finally if the driver supports the ASIOOutputReady() optimization,
                 // do it here, all data are in place
-                if( theAsioStream->postOutput )
+                if (theAsioStream->postOutput)
                     ASIOOutputReady();
 
-                if( theAsioStream->stopProcessing )
-                {
-                    if( theAsioStream->stopPlayoutCount < 2 )
-                    {
+                if (theAsioStream->stopProcessing) {
+                    if (theAsioStream->stopPlayoutCount < 2) {
                         ++theAsioStream->stopPlayoutCount;
-                        if( theAsioStream->stopPlayoutCount == 2 )
-                        {
+
+                        if (theAsioStream->stopPlayoutCount == 2) {
                             theAsioStream->isActive = 0;
-                            if( theAsioStream->streamRepresentation.streamFinishedCallback != 0 )
-                                theAsioStream->streamRepresentation.streamFinishedCallback( theAsioStream->streamRepresentation.userData );
+
+                            if (theAsioStream->streamRepresentation.streamFinishedCallback != 0)
+                                theAsioStream->streamRepresentation.streamFinishedCallback (theAsioStream->streamRepresentation.userData);
+
                             theAsioStream->streamFinishedCallbackCalled = true;
-                            SetEvent( theAsioStream->completedBuffersPlayedEvent );
+                            SetEvent (theAsioStream->completedBuffersPlayedEvent);
                         }
                     }
                 }
-            }
-            else
-            {
+            } else {
 
 #if 0
 // test code to try to detect slip conditions... these may work on some systems
@@ -2848,165 +2828,163 @@ static ASIOTime *bufferSwitchTimeInfo( ASIOTime *timeInfo, long index, ASIOBool
 
 // check that sample delta matches buffer size (otherwise we must have skipped
 // a buffer.
-static double last_samples = -512;
-double samples;
+                static double last_samples = -512;
+                double samples;
 //if( timeInfo->timeCode.flags & kTcValid )
 //    samples = ASIO64toDouble(timeInfo->timeCode.timeCodeSamples);
 //else
-    samples = ASIO64toDouble(timeInfo->timeInfo.samplePosition);
-int delta = samples - last_samples;
+                samples = ASIO64toDouble (timeInfo->timeInfo.samplePosition);
+                int delta = samples - last_samples;
 //printf( "%d\n", delta);
-last_samples = samples;
+                last_samples = samples;
 
-if( delta > theAsioStream->framesPerHostCallback )
-{
-    if( theAsioStream->inputChannelCount > 0 )
-        theAsioStream->callbackFlags |= paInputOverflow;
+                if (delta > theAsioStream->framesPerHostCallback) {
+                    if (theAsioStream->inputChannelCount > 0)
+                        theAsioStream->callbackFlags |= paInputOverflow;
 
-    if( theAsioStream->outputChannelCount > 0 )
-        theAsioStream->callbackFlags |= paOutputUnderflow;
-}
+                    if (theAsioStream->outputChannelCount > 0)
+                        theAsioStream->callbackFlags |= paOutputUnderflow;
+                }
 
 // check that the buffer index is not the previous index (which would indicate
 // that a buffer was skipped.
-static int previousIndex = 1;
-if( index == previousIndex )
-{
-    if( theAsioStream->inputChannelCount > 0 )
-        theAsioStream->callbackFlags |= paInputOverflow;
+                static int previousIndex = 1;
 
-    if( theAsioStream->outputChannelCount > 0 )
-        theAsioStream->callbackFlags |= paOutputUnderflow;
-}
-previousIndex = index;
+                if (index == previousIndex) {
+                    if (theAsioStream->inputChannelCount > 0)
+                        theAsioStream->callbackFlags |= paInputOverflow;
+
+                    if (theAsioStream->outputChannelCount > 0)
+                        theAsioStream->callbackFlags |= paOutputUnderflow;
+                }
+
+                previousIndex = index;
 #endif
 
                 int i;
 
-                PaUtil_BeginCpuLoadMeasurement( &theAsioStream->cpuLoadMeasurer );
+                PaUtil_BeginCpuLoadMeasurement (&theAsioStream->cpuLoadMeasurer);
 
                 PaStreamCallbackTimeInfo paTimeInfo;
 
                 // asio systemTime is supposed to be measured according to the same
                 // clock as timeGetTime
-                paTimeInfo.currentTime = (ASIO64toDouble( timeInfo->timeInfo.systemTime ) * .000000001);
+                paTimeInfo.currentTime = (ASIO64toDouble (timeInfo->timeInfo.systemTime) * .000000001);
 
                 /* patch from Paul Boege */
                 paTimeInfo.inputBufferAdcTime = paTimeInfo.currentTime -
-                    ((double)theAsioStream->inputLatency/theAsioStream->streamRepresentation.streamInfo.sampleRate);
+                                                ( (double) theAsioStream->inputLatency/theAsioStream->streamRepresentation.streamInfo.sampleRate);
 
                 paTimeInfo.outputBufferDacTime = paTimeInfo.currentTime +
-                    ((double)theAsioStream->outputLatency/theAsioStream->streamRepresentation.streamInfo.sampleRate);
+                                                 ( (double) theAsioStream->outputLatency/theAsioStream->streamRepresentation.streamInfo.sampleRate);
 
                 /* old version is buggy because the buffer processor also adds in its latency to the time parameters
                 paTimeInfo.inputBufferAdcTime = paTimeInfo.currentTime - theAsioStream->streamRepresentation.streamInfo.inputLatency;
                 paTimeInfo.outputBufferDacTime = paTimeInfo.currentTime + theAsioStream->streamRepresentation.streamInfo.outputLatency;
                 */
 
-/* Disabled! Stopping and re-starting the stream causes an input overflow / output undeflow. S.Fischer */
+                /* Disabled! Stopping and re-starting the stream causes an input overflow / output undeflow. S.Fischer */
 #if 0
 // detect underflows by checking inter-callback time > 2 buffer period
-static double previousTime = -1;
-if( previousTime > 0 ){
+                static double previousTime = -1;
 
-    double delta = paTimeInfo.currentTime - previousTime;
+                if (previousTime > 0) {
 
-    if( delta >= 2. * (theAsioStream->framesPerHostCallback / theAsioStream->streamRepresentation.streamInfo.sampleRate) ){
-        if( theAsioStream->inputChannelCount > 0 )
-            theAsioStream->callbackFlags |= paInputOverflow;
+                    double delta = paTimeInfo.currentTime - previousTime;
 
-        if( theAsioStream->outputChannelCount > 0 )
-            theAsioStream->callbackFlags |= paOutputUnderflow;
-    }
-}
-previousTime = paTimeInfo.currentTime;
+                    if (delta >= 2. * (theAsioStream->framesPerHostCallback / theAsioStream->streamRepresentation.streamInfo.sampleRate)) {
+                        if (theAsioStream->inputChannelCount > 0)
+                            theAsioStream->callbackFlags |= paInputOverflow;
+
+                        if (theAsioStream->outputChannelCount > 0)
+                            theAsioStream->callbackFlags |= paOutputUnderflow;
+                    }
+                }
+
+                previousTime = paTimeInfo.currentTime;
 #endif
 
                 // note that the above input and output times do not need to be
                 // adjusted for the latency of the buffer processor -- the buffer
                 // processor handles that.
 
-                if( theAsioStream->inputBufferConverter )
-                {
-                    for( i=0; i<theAsioStream->inputChannelCount; i++ )
-                    {
-                        theAsioStream->inputBufferConverter( theAsioStream->inputBufferPtrs[index][i],
-                                theAsioStream->inputShift, theAsioStream->framesPerHostCallback );
+                if (theAsioStream->inputBufferConverter) {
+                    for (i=0; i<theAsioStream->inputChannelCount; i++) {
+                        theAsioStream->inputBufferConverter (theAsioStream->inputBufferPtrs[index][i],
+                                                             theAsioStream->inputShift, theAsioStream->framesPerHostCallback);
                     }
                 }
 
-                PaUtil_BeginBufferProcessing( &theAsioStream->bufferProcessor, &paTimeInfo, theAsioStream->callbackFlags );
+                PaUtil_BeginBufferProcessing (&theAsioStream->bufferProcessor, &paTimeInfo, theAsioStream->callbackFlags);
 
                 /* reset status flags once they've been passed to the callback */
                 theAsioStream->callbackFlags = 0;
 
-                PaUtil_SetInputFrameCount( &theAsioStream->bufferProcessor, 0 /* default to host buffer size */ );
-                for( i=0; i<theAsioStream->inputChannelCount; ++i )
-                    PaUtil_SetNonInterleavedInputChannel( &theAsioStream->bufferProcessor, i, theAsioStream->inputBufferPtrs[index][i] );
+                PaUtil_SetInputFrameCount (&theAsioStream->bufferProcessor, 0 /* default to host buffer size */);
 
-                PaUtil_SetOutputFrameCount( &theAsioStream->bufferProcessor, 0 /* default to host buffer size */ );
-                for( i=0; i<theAsioStream->outputChannelCount; ++i )
-                    PaUtil_SetNonInterleavedOutputChannel( &theAsioStream->bufferProcessor, i, theAsioStream->outputBufferPtrs[index][i] );
+                for (i=0; i<theAsioStream->inputChannelCount; ++i)
+                    PaUtil_SetNonInterleavedInputChannel (&theAsioStream->bufferProcessor, i, theAsioStream->inputBufferPtrs[index][i]);
+
+                PaUtil_SetOutputFrameCount (&theAsioStream->bufferProcessor, 0 /* default to host buffer size */);
+
+                for (i=0; i<theAsioStream->outputChannelCount; ++i)
+                    PaUtil_SetNonInterleavedOutputChannel (&theAsioStream->bufferProcessor, i, theAsioStream->outputBufferPtrs[index][i]);
 
                 int callbackResult;
-                if( theAsioStream->stopProcessing )
+
+                if (theAsioStream->stopProcessing)
                     callbackResult = paComplete;
                 else
                     callbackResult = paContinue;
-                unsigned long framesProcessed = PaUtil_EndBufferProcessing( &theAsioStream->bufferProcessor, &callbackResult );
-
-                if( theAsioStream->outputBufferConverter )
-                {
-                    for( i=0; i<theAsioStream->outputChannelCount; i++ )
-                    {
-                        theAsioStream->outputBufferConverter( theAsioStream->outputBufferPtrs[index][i],
-                                theAsioStream->outputShift, theAsioStream->framesPerHostCallback );
+
+                unsigned long framesProcessed = PaUtil_EndBufferProcessing (&theAsioStream->bufferProcessor, &callbackResult);
+
+                if (theAsioStream->outputBufferConverter) {
+                    for (i=0; i<theAsioStream->outputChannelCount; i++) {
+                        theAsioStream->outputBufferConverter (theAsioStream->outputBufferPtrs[index][i],
+                                                              theAsioStream->outputShift, theAsioStream->framesPerHostCallback);
                     }
                 }
 
-                PaUtil_EndCpuLoadMeasurement( &theAsioStream->cpuLoadMeasurer, framesProcessed );
+                PaUtil_EndCpuLoadMeasurement (&theAsioStream->cpuLoadMeasurer, framesProcessed);
 
                 // Finally if the driver supports the ASIOOutputReady() optimization,
                 // do it here, all data are in place
-                if( theAsioStream->postOutput )
+                if (theAsioStream->postOutput)
                     ASIOOutputReady();
 
-                if( callbackResult == paContinue )
-                {
+                if (callbackResult == paContinue) {
                     /* nothing special to do */
-                }
-                else if( callbackResult == paAbort )
-                {
+                } else if (callbackResult == paAbort) {
                     /* finish playback immediately  */
                     theAsioStream->isActive = 0;
-                    if( theAsioStream->streamRepresentation.streamFinishedCallback != 0 )
-                        theAsioStream->streamRepresentation.streamFinishedCallback( theAsioStream->streamRepresentation.userData );
+
+                    if (theAsioStream->streamRepresentation.streamFinishedCallback != 0)
+                        theAsioStream->streamRepresentation.streamFinishedCallback (theAsioStream->streamRepresentation.userData);
+
                     theAsioStream->streamFinishedCallbackCalled = true;
-                    SetEvent( theAsioStream->completedBuffersPlayedEvent );
+                    SetEvent (theAsioStream->completedBuffersPlayedEvent);
                     theAsioStream->zeroOutput = true;
-                }
-                else /* paComplete or other non-zero value indicating complete */
-                {
+                } else { /* paComplete or other non-zero value indicating complete */
                     /* Finish playback once currently queued audio has completed. */
                     theAsioStream->stopProcessing = true;
 
-                    if( PaUtil_IsBufferProcessorOutputEmpty( &theAsioStream->bufferProcessor ) )
-                    {
+                    if (PaUtil_IsBufferProcessorOutputEmpty (&theAsioStream->bufferProcessor)) {
                         theAsioStream->zeroOutput = true;
                         theAsioStream->stopPlayoutCount = 0;
                     }
                 }
             }
         }
-        
+
         ++buffersDone;
-    }while( PaAsio_AtomicDecrement(&theAsioStream->reenterCount) >= 0 );
+    } while (PaAsio_AtomicDecrement (&theAsioStream->reenterCount) >= 0);
 
     return 0L;
 }
 
 
-static void sampleRateChanged(ASIOSampleRate sRate)
+static void sampleRateChanged (ASIOSampleRate sRate)
 {
     // TAKEN FROM THE ASIO SDK
     // do whatever you need to do if the sample rate changed
@@ -3017,10 +2995,10 @@ static void sampleRateChanged(ASIOSampleRate sRate)
     // You might have to update time/sample related conversion routines, etc.
 
     (void) sRate; /* unused parameter */
-    PA_DEBUG( ("sampleRateChanged : %d \n", sRate));
+    PA_DEBUG ( ("sampleRateChanged : %d \n", sRate));
 }
 
-static long asioMessages(long selector, long value, void* message, double* opt)
+static long asioMessages (long selector, long value, void* message, double* opt)
 {
 // TAKEN FROM THE ASIO SDK
     // currently the parameters "value", "message" and "opt" are not used.
@@ -3029,20 +3007,21 @@ static long asioMessages(long selector, long value, void* message, double* opt)
     (void) message; /* unused parameters */
     (void) opt;
 
-    PA_DEBUG( ("asioMessages : %d , %d \n", selector, value));
+    PA_DEBUG ( ("asioMessages : %d , %d \n", selector, value));
 
-    switch(selector)
-    {
+    switch (selector) {
         case kAsioSelectorSupported:
-            if(value == kAsioResetRequest
-            || value == kAsioEngineVersion
-            || value == kAsioResyncRequest
-            || value == kAsioLatenciesChanged
-            // the following three were added for ASIO 2.0, you don't necessarily have to support them
-            || value == kAsioSupportsTimeInfo
-            || value == kAsioSupportsTimeCode
-            || value == kAsioSupportsInputMonitor)
-                    ret = 1L;
+
+            if (value == kAsioResetRequest
+                    || value == kAsioEngineVersion
+                    || value == kAsioResyncRequest
+                    || value == kAsioLatenciesChanged
+                    // the following three were added for ASIO 2.0, you don't necessarily have to support them
+                    || value == kAsioSupportsTimeInfo
+                    || value == kAsioSupportsTimeCode
+                    || value == kAsioSupportsInputMonitor)
+                ret = 1L;
+
             break;
 
         case kAsioBufferSizeChange:
@@ -3100,24 +3079,24 @@ static long asioMessages(long selector, long value, void* message, double* opt)
             ret = 0;
             break;
     }
+
     return ret;
 }
 
 
-static PaError StartStream( PaStream *s )
+static PaError StartStream (PaStream *s)
 {
     PaError result = paNoError;
-    PaAsioStream *stream = (PaAsioStream*)s;
+    PaAsioStream *stream = (PaAsioStream*) s;
     PaAsioStreamBlockingState *blockingState = stream->blockingState;
     ASIOError asioError;
 
-    if( stream->outputChannelCount > 0 )
-    {
-        ZeroOutputBuffers( stream, 0 );
-        ZeroOutputBuffers( stream, 1 );
+    if (stream->outputChannelCount > 0) {
+        ZeroOutputBuffers (stream, 0);
+        ZeroOutputBuffers (stream, 1);
     }
 
-    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
+    PaUtil_ResetBufferProcessor (&stream->bufferProcessor);
     stream->stopProcessing = false;
     stream->zeroOutput = false;
 
@@ -3127,50 +3106,44 @@ static PaError StartStream( PaStream *s )
 
     stream->callbackFlags = 0;
 
-    if( ResetEvent( stream->completedBuffersPlayedEvent ) == 0 )
-    {
+    if (ResetEvent (stream->completedBuffersPlayedEvent) == 0) {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );
+        PA_ASIO_SET_LAST_SYSTEM_ERROR (GetLastError());
     }
 
 
     /* Using blocking i/o interface... */
-    if( blockingState )
-    {
+    if (blockingState) {
         /* Reset blocking i/o buffer processor. */
-        PaUtil_ResetBufferProcessor( &blockingState->bufferProcessor );
+        PaUtil_ResetBufferProcessor (&blockingState->bufferProcessor);
 
         /* If we're about to process some input data. */
-        if( stream->inputChannelCount )
-        {
+        if (stream->inputChannelCount) {
             /* Reset callback-ReadStream sync event. */
-            if( ResetEvent( blockingState->readFramesReadyEvent ) == 0 )
-            {
+            if (ResetEvent (blockingState->readFramesReadyEvent) == 0) {
                 result = paUnanticipatedHostError;
-                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );
+                PA_ASIO_SET_LAST_SYSTEM_ERROR (GetLastError());
             }
 
             /* Flush blocking i/o ring buffer. */
-            PaUtil_FlushRingBuffer( &blockingState->readRingBuffer );
-            (*blockingState->bufferProcessor.inputZeroer)( blockingState->readRingBuffer.buffer, 1, blockingState->bufferProcessor.inputChannelCount * blockingState->readRingBuffer.bufferSize );
+            PaUtil_FlushRingBuffer (&blockingState->readRingBuffer);
+            (*blockingState->bufferProcessor.inputZeroer) (blockingState->readRingBuffer.buffer, 1, blockingState->bufferProcessor.inputChannelCount * blockingState->readRingBuffer.bufferSize);
         }
 
         /* If we're about to process some output data. */
-        if( stream->outputChannelCount )
-        {
+        if (stream->outputChannelCount) {
             /* Reset callback-WriteStream sync event. */
-            if( ResetEvent( blockingState->writeBuffersReadyEvent ) == 0 )
-            {
+            if (ResetEvent (blockingState->writeBuffersReadyEvent) == 0) {
                 result = paUnanticipatedHostError;
-                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );
+                PA_ASIO_SET_LAST_SYSTEM_ERROR (GetLastError());
             }
 
             /* Flush blocking i/o ring buffer. */
-            PaUtil_FlushRingBuffer( &blockingState->writeRingBuffer );
-            (*blockingState->bufferProcessor.outputZeroer)( blockingState->writeRingBuffer.buffer, 1, blockingState->bufferProcessor.outputChannelCount * blockingState->writeRingBuffer.bufferSize );
+            PaUtil_FlushRingBuffer (&blockingState->writeRingBuffer);
+            (*blockingState->bufferProcessor.outputZeroer) (blockingState->writeRingBuffer.buffer, 1, blockingState->bufferProcessor.outputChannelCount * blockingState->writeRingBuffer.bufferSize);
 
             /* Initialize the output ring buffer to "silence". */
-            PaUtil_AdvanceRingBufferWriteIndex( &blockingState->writeRingBuffer, blockingState->writeRingBufferInitialFrames );
+            PaUtil_AdvanceRingBufferWriteIndex (&blockingState->writeRingBuffer, blockingState->writeRingBufferInitialFrames);
         }
 
         /* Clear requested frames / buffers count. */
@@ -3184,9 +3157,8 @@ static PaError StartStream( PaStream *s )
     }
 
 
-    if( result == paNoError )
-    {
-        assert( theAsioStream == stream ); /* theAsioStream should be set correctly in OpenStream */
+    if (result == paNoError) {
+        assert (theAsioStream == stream);  /* theAsioStream should be set correctly in OpenStream */
 
         /* initialize these variables before the callback has a chance to be invoked */
         stream->isStopped = 0;
@@ -3194,44 +3166,42 @@ static PaError StartStream( PaStream *s )
         stream->streamFinishedCallbackCalled = false;
 
         asioError = ASIOStart();
-        if( asioError != ASE_OK )
-        {
+
+        if (asioError != ASE_OK) {
             stream->isStopped = 1;
             stream->isActive = 0;
 
             result = paUnanticipatedHostError;
-            PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+            PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
         }
     }
 
     return result;
 }
 
-static void EnsureCallbackHasCompleted( PaAsioStream *stream )
+static void EnsureCallbackHasCompleted (PaAsioStream *stream)
 {
     // make sure that the callback is not still in-flight after ASIOStop()
     // returns. This has been observed to happen on the Hoontech DSP24 for
     // example.
     int count = 2000;  // only wait for 2 seconds, rather than hanging.
-    while( stream->reenterCount != -1 && count > 0 )
-    {
-        Sleep(1);
+
+    while (stream->reenterCount != -1 && count > 0) {
+        Sleep (1);
         --count;
     }
 }
 
-static PaError StopStream( PaStream *s )
+static PaError StopStream (PaStream *s)
 {
     PaError result = paNoError;
-    PaAsioStream *stream = (PaAsioStream*)s;
+    PaAsioStream *stream = (PaAsioStream*) s;
     PaAsioStreamBlockingState *blockingState = stream->blockingState;
     ASIOError asioError;
 
-    if( stream->isActive )
-    {
+    if (stream->isActive) {
         /* If blocking i/o output is in use */
-        if( blockingState && stream->outputChannelCount )
-        {
+        if (blockingState && stream->outputChannelCount) {
             /* Request the whole output buffer to be available. */
             blockingState->writeBuffersRequested = blockingState->writeRingBuffer.bufferSize;
             /* Signalize that additional buffers are need. */
@@ -3242,20 +3212,17 @@ static PaError StopStream( PaStream *s )
             /* Wait until requested number of buffers has been freed. Time
                out after twice the blocking i/o ouput buffer could have
                been consumed. */
-            DWORD timeout = (DWORD)( 2 * blockingState->writeRingBuffer.bufferSize * 1000
-                                       / stream->streamRepresentation.streamInfo.sampleRate );
-            DWORD waitResult = WaitForSingleObject( blockingState->writeBuffersReadyEvent, timeout );
+            DWORD timeout = (DWORD) (2 * blockingState->writeRingBuffer.bufferSize * 1000
+                                     / stream->streamRepresentation.streamInfo.sampleRate);
+            DWORD waitResult = WaitForSingleObject (blockingState->writeBuffersReadyEvent, timeout);
 
             /* If something seriously went wrong... */
-            if( waitResult == WAIT_FAILED )
-            {
-                PA_DEBUG(("WaitForSingleObject() failed in StopStream()\n"));
+            if (waitResult == WAIT_FAILED) {
+                PA_DEBUG ( ("WaitForSingleObject() failed in StopStream()\n"));
                 result = paUnanticipatedHostError;
-                PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );
-            }
-            else if( waitResult == WAIT_TIMEOUT )
-            {
-                PA_DEBUG(("WaitForSingleObject() timed out in StopStream()\n"));
+                PA_ASIO_SET_LAST_SYSTEM_ERROR (GetLastError());
+            } else if (waitResult == WAIT_TIMEOUT) {
+                PA_DEBUG ( ("WaitForSingleObject() timed out in StopStream()\n"));
                 result = paTimedOut;
             }
         }
@@ -3269,97 +3236,90 @@ static PaError StopStream( PaStream *s )
             length is longer than the asio buffer size then that should
             be taken into account.
         */
-        if( WaitForSingleObject( stream->completedBuffersPlayedEvent,
-                (DWORD)(stream->streamRepresentation.streamInfo.outputLatency * 1000. * 4.) )
-                    == WAIT_TIMEOUT )
-        {
-            PA_DEBUG(("WaitForSingleObject() timed out in StopStream()\n" ));
+        if (WaitForSingleObject (stream->completedBuffersPlayedEvent,
+                                 (DWORD) (stream->streamRepresentation.streamInfo.outputLatency * 1000. * 4.))
+                == WAIT_TIMEOUT) {
+            PA_DEBUG ( ("WaitForSingleObject() timed out in StopStream()\n"));
         }
     }
 
     asioError = ASIOStop();
-    if( asioError == ASE_OK )
-    {
-        EnsureCallbackHasCompleted( stream );
-    }
-    else
-    {
+
+    if (asioError == ASE_OK) {
+        EnsureCallbackHasCompleted (stream);
+    } else {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
     }
 
     stream->isStopped = 1;
     stream->isActive = 0;
 
-    if( !stream->streamFinishedCallbackCalled )
-    {
-        if( stream->streamRepresentation.streamFinishedCallback != 0 )
-            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+    if (!stream->streamFinishedCallbackCalled) {
+        if (stream->streamRepresentation.streamFinishedCallback != 0)
+            stream->streamRepresentation.streamFinishedCallback (stream->streamRepresentation.userData);
     }
 
     return result;
 }
 
-static PaError AbortStream( PaStream *s )
+static PaError AbortStream (PaStream *s)
 {
     PaError result = paNoError;
-    PaAsioStream *stream = (PaAsioStream*)s;
+    PaAsioStream *stream = (PaAsioStream*) s;
     ASIOError asioError;
 
     stream->zeroOutput = true;
 
     asioError = ASIOStop();
-    if( asioError == ASE_OK )
-    {
-        EnsureCallbackHasCompleted( stream );
-    }
-    else
-    {
+
+    if (asioError == ASE_OK) {
+        EnsureCallbackHasCompleted (stream);
+    } else {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
     }
 
     stream->isStopped = 1;
     stream->isActive = 0;
 
-    if( !stream->streamFinishedCallbackCalled )
-    {
-        if( stream->streamRepresentation.streamFinishedCallback != 0 )
-            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+    if (!stream->streamFinishedCallbackCalled) {
+        if (stream->streamRepresentation.streamFinishedCallback != 0)
+            stream->streamRepresentation.streamFinishedCallback (stream->streamRepresentation.userData);
     }
 
     return result;
 }
 
 
-static PaError IsStreamStopped( PaStream *s )
+static PaError IsStreamStopped (PaStream *s)
 {
-    PaAsioStream *stream = (PaAsioStream*)s;
-    
+    PaAsioStream *stream = (PaAsioStream*) s;
+
     return stream->isStopped;
 }
 
 
-static PaError IsStreamActive( PaStream *s )
+static PaError IsStreamActive (PaStream *s)
 {
-    PaAsioStream *stream = (PaAsioStream*)s;
+    PaAsioStream *stream = (PaAsioStream*) s;
 
     return stream->isActive;
 }
 
 
-static PaTime GetStreamTime( PaStream *s )
+static PaTime GetStreamTime (PaStream *s)
 {
     (void) s; /* unused parameter */
-    return (double)timeGetTime() * .001;
+    return (double) timeGetTime() * .001;
 }
 
 
-static double GetStreamCpuLoad( PaStream* s )
+static double GetStreamCpuLoad (PaStream* s)
 {
-    PaAsioStream *stream = (PaAsioStream*)s;
+    PaAsioStream *stream = (PaAsioStream*) s;
 
-    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+    return PaUtil_GetCpuLoad (&stream->cpuLoadMeasurer);
 }
 
 
@@ -3369,12 +3329,12 @@ static double GetStreamCpuLoad( PaStream* s )
     for blocking streams.
 */
 
-static PaError ReadStream( PaStream      *s     ,
+static PaError ReadStream (PaStream      *s     ,
                            void          *buffer,
-                           unsigned long  frames )
+                           unsigned long  frames)
 {
     PaError result = paNoError; /* Initial return value. */
-    PaAsioStream *stream = (PaAsioStream*)s; /* The PA ASIO stream. */
+    PaAsioStream *stream = (PaAsioStream*) s; /* The PA ASIO stream. */
 
     /* Pointer to the blocking i/o data struct. */
     PaAsioStreamBlockingState *blockingState = stream->blockingState;
@@ -3403,45 +3363,42 @@ static PaError ReadStream( PaStream      *s     ,
     unsigned int i; /* Just a counter. */
 
     /* About the time, needed to process 8 data blocks. */
-    DWORD timeout = (DWORD)( 8 * lFramesPerBlock * 1000 / stream->streamRepresentation.streamInfo.sampleRate );
+    DWORD timeout = (DWORD) (8 * lFramesPerBlock * 1000 / stream->streamRepresentation.streamInfo.sampleRate);
     DWORD waitResult = 0;
 
 
     /* Check if the stream is still available ready to gather new data. */
-    if( blockingState->stopFlag || !stream->isActive )
-    {
-        PA_DEBUG(("Warning! Stream no longer available for reading in ReadStream()\n"));
+    if (blockingState->stopFlag || !stream->isActive) {
+        PA_DEBUG ( ("Warning! Stream no longer available for reading in ReadStream()\n"));
         result = paStreamIsStopped;
         return result;
     }
 
     /* If the stream is a input stream. */
-    if( stream->inputChannelCount )
-    {
+    if (stream->inputChannelCount) {
         /* Prepare buffer access. */
-        if( !pBp->userOutputIsInterleaved )
-        {
+        if (!pBp->userOutputIsInterleaved) {
             userBuffer = blockingState->readStreamBuffer;
-            for( i = 0; i<pBp->inputChannelCount; ++i )
-            {
-                ((void**)userBuffer)[i] = ((void**)buffer)[i];
+
+            for (i = 0; i<pBp->inputChannelCount; ++i) {
+                ( (void**) userBuffer) [i] = ( (void**) buffer) [i];
             }
         } /* Use the unchanged buffer. */
-        else { userBuffer = buffer; }
+        else {
+            userBuffer = buffer;
+        }
 
-        do /* Internal block processing for too large user data buffers. */
-        {
+        do { /* Internal block processing for too large user data buffers. */
             /* Get the size of the current data block to be processed. */
-            lFramesPerBlock =(lFramesPerBlock < lFramesRemaining)
-                            ? lFramesPerBlock : lFramesRemaining;
+            lFramesPerBlock = (lFramesPerBlock < lFramesRemaining)
+                              ? lFramesPerBlock : lFramesRemaining;
             /* Use predefined block size for as long there are enough
                buffers available, thereafter reduce the processing block
                size to match the number of remaining buffers. So the final
                data block is processed although it may be incomplete. */
 
             /* If the available amount of data frames is insufficient. */
-            if( PaUtil_GetRingBufferReadAvailable(pRb) < (long) lFramesPerBlock )
-            {
+            if (PaUtil_GetRingBufferReadAvailable (pRb) < (long) lFramesPerBlock) {
                 /* Make sure, the event isn't already set! */
                 /* ResetEvent( blockingState->readFramesReadyEvent ); */
 
@@ -3452,27 +3409,27 @@ static PaError ReadStream( PaStream      *s     ,
                 blockingState->readFramesRequestedFlag = TRUE;
 
                 /* Wait until requested number of buffers has been freed. */
-                waitResult = WaitForSingleObject( blockingState->readFramesReadyEvent, timeout );
+                waitResult = WaitForSingleObject (blockingState->readFramesReadyEvent, timeout);
 
                 /* If something seriously went wrong... */
-                if( waitResult == WAIT_FAILED )
-                {
-                    PA_DEBUG(("WaitForSingleObject() failed in ReadStream()\n"));
+                if (waitResult == WAIT_FAILED) {
+                    PA_DEBUG ( ("WaitForSingleObject() failed in ReadStream()\n"));
                     result = paUnanticipatedHostError;
-                    PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );
+                    PA_ASIO_SET_LAST_SYSTEM_ERROR (GetLastError());
                     return result;
-                }
-                else if( waitResult == WAIT_TIMEOUT )
-                {
-                    PA_DEBUG(("WaitForSingleObject() timed out in ReadStream()\n"));
+                } else if (waitResult == WAIT_TIMEOUT) {
+                    PA_DEBUG ( ("WaitForSingleObject() timed out in ReadStream()\n"));
 
                     /* If block processing has stopped, abort! */
-                    if( blockingState->stopFlag ) { return result = paStreamIsStopped; }
+                    if (blockingState->stopFlag) {
+                        return result = paStreamIsStopped;
+                    }
 
                     /* If a timeout is encountered, give up eventually. */
                     return result = paTimedOut;
                 }
             }
+
             /* Now, the ring buffer contains the required amount of data
                frames.
                (Therefor we don't need to check the return argument of
@@ -3485,47 +3442,47 @@ static PaError ReadStream( PaStream      *s     ,
                segment is returned. Otherwise, i.e. if the first segment
                is large enough, the second segment's pointer will be NULL.
             */
-            PaUtil_GetRingBufferReadRegions(pRb                ,
-                                            lFramesPerBlock    ,
-                                            &pRingBufferData1st,
-                                            &lRingBufferSize1st,
-                                            &pRingBufferData2nd,
-                                            &lRingBufferSize2nd);
+            PaUtil_GetRingBufferReadRegions (pRb                ,
+                                             lFramesPerBlock    ,
+                                             &pRingBufferData1st,
+                                             &lRingBufferSize1st,
+                                             &pRingBufferData2nd,
+                                             &lRingBufferSize2nd);
 
             /* Set number of frames to be copied from the ring buffer. */
-            PaUtil_SetInputFrameCount( pBp, lRingBufferSize1st ); 
+            PaUtil_SetInputFrameCount (pBp, lRingBufferSize1st);
             /* Setup ring buffer access. */
-            PaUtil_SetInterleavedInputChannels(pBp               ,  /* Buffer processor. */
-                                               0                 ,  /* The first channel's index. */
-                                               pRingBufferData1st,  /* First ring buffer segment. */
-                                               0                 ); /* Use all available channels. */
+            PaUtil_SetInterleavedInputChannels (pBp               , /* Buffer processor. */
+                                                0                 ,  /* The first channel's index. */
+                                                pRingBufferData1st,  /* First ring buffer segment. */
+                                                0);                  /* Use all available channels. */
 
             /* If a second ring buffer segment is required. */
-            if( lRingBufferSize2nd ) {
+            if (lRingBufferSize2nd) {
                 /* Set number of frames to be copied from the ring buffer. */
-                PaUtil_Set2ndInputFrameCount( pBp, lRingBufferSize2nd );
+                PaUtil_Set2ndInputFrameCount (pBp, lRingBufferSize2nd);
                 /* Setup ring buffer access. */
-                PaUtil_Set2ndInterleavedInputChannels(pBp               ,  /* Buffer processor. */
-                                                      0                 ,  /* The first channel's index. */
-                                                      pRingBufferData2nd,  /* Second ring buffer segment. */
-                                                      0                 ); /* Use all available channels. */
+                PaUtil_Set2ndInterleavedInputChannels (pBp               , /* Buffer processor. */
+                                                       0                 ,  /* The first channel's index. */
+                                                       pRingBufferData2nd,  /* Second ring buffer segment. */
+                                                       0);                  /* Use all available channels. */
             }
 
             /* Let the buffer processor handle "copy and conversion" and
                update the ring buffer indices manually. */
-            lFramesCopied = PaUtil_CopyInput( pBp, &buffer, lFramesPerBlock );
-            PaUtil_AdvanceRingBufferReadIndex( pRb, lFramesCopied );
+            lFramesCopied = PaUtil_CopyInput (pBp, &buffer, lFramesPerBlock);
+            PaUtil_AdvanceRingBufferReadIndex (pRb, lFramesCopied);
 
             /* Decrease number of unprocessed frames. */
             lFramesRemaining -= lFramesCopied;
 
         } /* Continue with the next data chunk. */
-        while( lFramesRemaining );
+
+        while (lFramesRemaining);
 
 
         /* If there has been an input overflow within the callback */
-        if( blockingState->inputOverflowFlag )
-        {
+        if (blockingState->inputOverflowFlag) {
             blockingState->inputOverflowFlag = FALSE;
 
             /* Return the corresponding error code. */
@@ -3540,12 +3497,12 @@ static PaError ReadStream( PaStream      *s     ,
     return result;
 }
 
-static PaError WriteStream( PaStream      *s     ,
+static PaError WriteStream (PaStream      *s     ,
                             const void    *buffer,
-                            unsigned long  frames )
+                            unsigned long  frames)
 {
     PaError result = paNoError; /* Initial return value. */
-    PaAsioStream *stream = (PaAsioStream*)s; /* The PA ASIO stream. */
+    PaAsioStream *stream = (PaAsioStream*) s; /* The PA ASIO stream. */
 
     /* Pointer to the blocking i/o data struct. */
     PaAsioStreamBlockingState *blockingState = stream->blockingState;
@@ -3570,7 +3527,7 @@ static PaError WriteStream( PaStream      *s     ,
     unsigned long lFramesRemaining = frames;
 
     /* About the time, needed to process 8 data blocks. */
-    DWORD timeout = (DWORD)( 8 * lFramesPerBlock * 1000 / stream->streamRepresentation.streamInfo.sampleRate );
+    DWORD timeout = (DWORD) (8 * lFramesPerBlock * 1000 / stream->streamRepresentation.streamInfo.sampleRate);
     DWORD waitResult = 0;
 
     /* Copy the input argument to avoid pointer increment! */
@@ -3579,41 +3536,38 @@ static PaError WriteStream( PaStream      *s     ,
 
 
     /* Check if the stream ist still available ready to recieve new data. */
-    if( blockingState->stopFlag || !stream->isActive )
-    {
-        PA_DEBUG(("Warning! Stream no longer available for writing in WriteStream()\n"));
+    if (blockingState->stopFlag || !stream->isActive) {
+        PA_DEBUG ( ("Warning! Stream no longer available for writing in WriteStream()\n"));
         result = paStreamIsStopped;
         return result;
     }
 
     /* If the stream is a output stream. */
-    if( stream->outputChannelCount )
-    {
+    if (stream->outputChannelCount) {
         /* Prepare buffer access. */
-        if( !pBp->userOutputIsInterleaved )
-        {
+        if (!pBp->userOutputIsInterleaved) {
             userBuffer = blockingState->writeStreamBuffer;
-            for( i = 0; i<pBp->outputChannelCount; ++i )
-            {
-                ((const void**)userBuffer)[i] = ((const void**)buffer)[i];
+
+            for (i = 0; i<pBp->outputChannelCount; ++i) {
+                ( (const void**) userBuffer) [i] = ( (const void**) buffer) [i];
             }
         } /* Use the unchanged buffer. */
-        else { userBuffer = buffer; }
+        else {
+            userBuffer = buffer;
+        }
 
 
-        do /* Internal block processing for too large user data buffers. */
-        {
+        do { /* Internal block processing for too large user data buffers. */
             /* Get the size of the current data block to be processed. */
-            lFramesPerBlock =(lFramesPerBlock < lFramesRemaining)
-                            ? lFramesPerBlock : lFramesRemaining;
+            lFramesPerBlock = (lFramesPerBlock < lFramesRemaining)
+                              ? lFramesPerBlock : lFramesRemaining;
             /* Use predefined block size for as long there are enough
                frames available, thereafter reduce the processing block
                size to match the number of remaining frames. So the final
                data block is processed although it may be incomplete. */
 
             /* If the available amount of buffers is insufficient. */
-            if( PaUtil_GetRingBufferWriteAvailable(pRb) < (long) lFramesPerBlock )
-            {
+            if (PaUtil_GetRingBufferWriteAvailable (pRb) < (long) lFramesPerBlock) {
                 /* Make sure, the event isn't already set! */
                 /* ResetEvent( blockingState->writeBuffersReadyEvent ); */
 
@@ -3624,27 +3578,27 @@ static PaError WriteStream( PaStream      *s     ,
                 blockingState->writeBuffersRequestedFlag = TRUE;
 
                 /* Wait until requested number of buffers has been freed. */
-                waitResult = WaitForSingleObject( blockingState->writeBuffersReadyEvent, timeout );
+                waitResult = WaitForSingleObject (blockingState->writeBuffersReadyEvent, timeout);
 
                 /* If something seriously went wrong... */
-                if( waitResult == WAIT_FAILED )
-                {
-                    PA_DEBUG(("WaitForSingleObject() failed in WriteStream()\n"));
+                if (waitResult == WAIT_FAILED) {
+                    PA_DEBUG ( ("WaitForSingleObject() failed in WriteStream()\n"));
                     result = paUnanticipatedHostError;
-                    PA_ASIO_SET_LAST_SYSTEM_ERROR( GetLastError() );
+                    PA_ASIO_SET_LAST_SYSTEM_ERROR (GetLastError());
                     return result;
-                }
-                else if( waitResult == WAIT_TIMEOUT )
-                {
-                    PA_DEBUG(("WaitForSingleObject() timed out in WriteStream()\n"));
+                } else if (waitResult == WAIT_TIMEOUT) {
+                    PA_DEBUG ( ("WaitForSingleObject() timed out in WriteStream()\n"));
 
                     /* If block processing has stopped, abort! */
-                    if( blockingState->stopFlag ) { return result = paStreamIsStopped; }
-                    
+                    if (blockingState->stopFlag) {
+                        return result = paStreamIsStopped;
+                    }
+
                     /* If a timeout is encountered, give up eventually. */
                     return result = paTimedOut;
                 }
             }
+
             /* Now, the ring buffer contains the required amount of free
                space to store the provided number of data frames.
                (Therefor we don't need to check the return argument of
@@ -3657,47 +3611,47 @@ static PaError WriteStream( PaStream      *s     ,
                segment is returned. Otherwise, i.e. if the first segment
                is large enough, the second segment's pointer will be NULL.
             */
-            PaUtil_GetRingBufferWriteRegions(pRb                ,
-                                             lFramesPerBlock    ,
-                                             &pRingBufferData1st,
-                                             &lRingBufferSize1st,
-                                             &pRingBufferData2nd,
-                                             &lRingBufferSize2nd);
+            PaUtil_GetRingBufferWriteRegions (pRb                ,
+                                              lFramesPerBlock    ,
+                                              &pRingBufferData1st,
+                                              &lRingBufferSize1st,
+                                              &pRingBufferData2nd,
+                                              &lRingBufferSize2nd);
 
             /* Set number of frames to be copied to the ring buffer. */
-            PaUtil_SetOutputFrameCount( pBp, lRingBufferSize1st ); 
+            PaUtil_SetOutputFrameCount (pBp, lRingBufferSize1st);
             /* Setup ring buffer access. */
-            PaUtil_SetInterleavedOutputChannels(pBp               ,  /* Buffer processor. */
-                                                0                 ,  /* The first channel's index. */
-                                                pRingBufferData1st,  /* First ring buffer segment. */
-                                                0                 ); /* Use all available channels. */
+            PaUtil_SetInterleavedOutputChannels (pBp               , /* Buffer processor. */
+                                                 0                 ,  /* The first channel's index. */
+                                                 pRingBufferData1st,  /* First ring buffer segment. */
+                                                 0);                  /* Use all available channels. */
 
             /* If a second ring buffer segment is required. */
-            if( lRingBufferSize2nd ) {
+            if (lRingBufferSize2nd) {
                 /* Set number of frames to be copied to the ring buffer. */
-                PaUtil_Set2ndOutputFrameCount( pBp, lRingBufferSize2nd );
+                PaUtil_Set2ndOutputFrameCount (pBp, lRingBufferSize2nd);
                 /* Setup ring buffer access. */
-                PaUtil_Set2ndInterleavedOutputChannels(pBp               ,  /* Buffer processor. */
-                                                       0                 ,  /* The first channel's index. */
-                                                       pRingBufferData2nd,  /* Second ring buffer segment. */
-                                                       0                 ); /* Use all available channels. */
+                PaUtil_Set2ndInterleavedOutputChannels (pBp               , /* Buffer processor. */
+                                                        0                 ,  /* The first channel's index. */
+                                                        pRingBufferData2nd,  /* Second ring buffer segment. */
+                                                        0);                  /* Use all available channels. */
             }
 
             /* Let the buffer processor handle "copy and conversion" and
                update the ring buffer indices manually. */
-            lFramesCopied = PaUtil_CopyOutput( pBp, &userBuffer, lFramesPerBlock );
-            PaUtil_AdvanceRingBufferWriteIndex( pRb, lFramesCopied );
+            lFramesCopied = PaUtil_CopyOutput (pBp, &userBuffer, lFramesPerBlock);
+            PaUtil_AdvanceRingBufferWriteIndex (pRb, lFramesCopied);
 
             /* Decrease number of unprocessed frames. */
             lFramesRemaining -= lFramesCopied;
 
         } /* Continue with the next data chunk. */
-        while( lFramesRemaining );
+
+        while (lFramesRemaining);
 
 
         /* If there has been an output underflow within the callback */
-        if( blockingState->outputUnderflowFlag )
-        {
+        if (blockingState->outputUnderflowFlag) {
             blockingState->outputUnderflowFlag = FALSE;
 
             /* Return the corresponding error code. */
@@ -3705,8 +3659,7 @@ static PaError WriteStream( PaStream      *s     ,
         }
 
     } /* If this is not an output stream. */
-    else
-    {
+    else {
         result = paCanNotWriteToAnInputOnlyStream;
     }
 
@@ -3714,21 +3667,21 @@ static PaError WriteStream( PaStream      *s     ,
 }
 
 
-static signed long GetStreamReadAvailable( PaStream* s )
+static signed long GetStreamReadAvailable (PaStream* s)
 {
-    PaAsioStream *stream = (PaAsioStream*)s;
+    PaAsioStream *stream = (PaAsioStream*) s;
 
     /* Call buffer utility routine to get the number of available frames. */
-    return PaUtil_GetRingBufferReadAvailable( &stream->blockingState->readRingBuffer );
+    return PaUtil_GetRingBufferReadAvailable (&stream->blockingState->readRingBuffer);
 }
 
 
-static signed long GetStreamWriteAvailable( PaStream* s )
+static signed long GetStreamWriteAvailable (PaStream* s)
 {
-    PaAsioStream *stream = (PaAsioStream*)s;
+    PaAsioStream *stream = (PaAsioStream*) s;
 
     /* Call buffer utility routine to get the number of empty buffers. */
-    return PaUtil_GetRingBufferWriteAvailable( &stream->blockingState->writeRingBuffer );
+    return PaUtil_GetRingBufferWriteAvailable (&stream->blockingState->writeRingBuffer);
 }
 
 
@@ -3736,15 +3689,15 @@ static signed long GetStreamWriteAvailable( PaStream* s )
 ** It may called at interrupt level on some machines so don't do anything
 ** that could mess up the system like calling malloc() or free().
 */
-static int BlockingIoPaCallback(const void                     *inputBuffer    ,
-                                      void                     *outputBuffer   ,
-                                      unsigned long             framesPerBuffer,
-                                const PaStreamCallbackTimeInfo *timeInfo       ,
-                                      PaStreamCallbackFlags     statusFlags    ,
-                                      void                     *userData       )
+static int BlockingIoPaCallback (const void                     *inputBuffer    ,
+                                 void                     *outputBuffer   ,
+                                 unsigned long             framesPerBuffer,
+                                 const PaStreamCallbackTimeInfo *timeInfo       ,
+                                 PaStreamCallbackFlags     statusFlags    ,
+                                 void                     *userData)
 {
     PaError result = paNoError; /* Initial return value. */
-    PaAsioStream *stream = *(PaAsioStream**)userData; /* The PA ASIO stream. */
+    PaAsioStream *stream = * (PaAsioStream**) userData; /* The PA ASIO stream. */
     PaAsioStreamBlockingState *blockingState = stream->blockingState; /* Persume blockingState is valid, otherwise the callback wouldn't be running. */
 
     /* Get a pointer to the stream's blocking i/o buffer processor. */
@@ -3752,11 +3705,10 @@ static int BlockingIoPaCallback(const void                     *inputBuffer    ,
     PaUtilRingBuffer      *pRb = NULL;
 
     /* If output data has been requested. */
-    if( stream->outputChannelCount )
-    {
+    if (stream->outputChannelCount) {
         /* If the callback input argument signalizes a output underflow,
            make sure the WriteStream() function knows about it, too! */
-        if( statusFlags & paOutputUnderflowed ) {
+        if (statusFlags & paOutputUnderflowed) {
             blockingState->outputUnderflowFlag = TRUE;
         }
 
@@ -3764,36 +3716,31 @@ static int BlockingIoPaCallback(const void                     *inputBuffer    ,
         pRb = &blockingState->writeRingBuffer;
 
         /* If the blocking i/o buffer contains enough output data, */
-        if( PaUtil_GetRingBufferReadAvailable(pRb) >= (long) framesPerBuffer )
-        {
+        if (PaUtil_GetRingBufferReadAvailable (pRb) >= (long) framesPerBuffer) {
             /* Extract the requested data from the ring buffer. */
-            PaUtil_ReadRingBuffer( pRb, outputBuffer, framesPerBuffer );
-        }
-        else /* If no output data is available :-( */
-        {
+            PaUtil_ReadRingBuffer (pRb, outputBuffer, framesPerBuffer);
+        } else { /* If no output data is available :-( */
             /* Signalize a write-buffer underflow. */
             blockingState->outputUnderflowFlag = TRUE;
 
             /* Fill the output buffer with silence. */
-            (*pBp->outputZeroer)( outputBuffer, 1, pBp->outputChannelCount * framesPerBuffer );
+            (*pBp->outputZeroer) (outputBuffer, 1, pBp->outputChannelCount * framesPerBuffer);
 
             /* If playback is to be stopped */
-            if( blockingState->stopFlag && PaUtil_GetRingBufferReadAvailable(pRb) < (long) framesPerBuffer )
-            {
+            if (blockingState->stopFlag && PaUtil_GetRingBufferReadAvailable (pRb) < (long) framesPerBuffer) {
                 /* Extract all the remaining data from the ring buffer,
                    whether it is a complete data block or not. */
-                PaUtil_ReadRingBuffer( pRb, outputBuffer, PaUtil_GetRingBufferReadAvailable(pRb) );
+                PaUtil_ReadRingBuffer (pRb, outputBuffer, PaUtil_GetRingBufferReadAvailable (pRb));
             }
         }
 
         /* Set blocking i/o event? */
-        if( blockingState->writeBuffersRequestedFlag && PaUtil_GetRingBufferWriteAvailable(pRb) >= (long) blockingState->writeBuffersRequested )
-        {
+        if (blockingState->writeBuffersRequestedFlag && PaUtil_GetRingBufferWriteAvailable (pRb) >= (long) blockingState->writeBuffersRequested) {
             /* Reset buffer request. */
             blockingState->writeBuffersRequestedFlag = FALSE;
             blockingState->writeBuffersRequested     = 0;
             /* Signalize that requested buffers are ready. */
-            SetEvent( blockingState->writeBuffersReadyEvent );
+            SetEvent (blockingState->writeBuffersReadyEvent);
             /* What do we do if SetEvent() returns zero, i.e. the event
                could not be set? How to return errors from within the
                callback? - S.Fischer */
@@ -3801,11 +3748,10 @@ static int BlockingIoPaCallback(const void                     *inputBuffer    ,
     }
 
     /* If input data has been supplied. */
-    if( stream->inputChannelCount )
-    {
+    if (stream->inputChannelCount) {
         /* If the callback input argument signalizes a input overflow,
            make sure the ReadStream() function knows about it, too! */
-        if( statusFlags & paInputOverflowed ) {
+        if (statusFlags & paInputOverflowed) {
             blockingState->inputOverflowFlag = TRUE;
         }
 
@@ -3813,26 +3759,24 @@ static int BlockingIoPaCallback(const void                     *inputBuffer    ,
         pRb = &blockingState->readRingBuffer;
 
         /* If the blocking i/o buffer contains not enough input buffers */
-        if( PaUtil_GetRingBufferWriteAvailable(pRb) < (long) framesPerBuffer )
-        {
+        if (PaUtil_GetRingBufferWriteAvailable (pRb) < (long) framesPerBuffer) {
             /* Signalize a read-buffer overflow. */
             blockingState->inputOverflowFlag = TRUE;
 
             /* Remove some old data frames from the buffer. */
-            PaUtil_AdvanceRingBufferReadIndex( pRb, framesPerBuffer );
+            PaUtil_AdvanceRingBufferReadIndex (pRb, framesPerBuffer);
         }
 
         /* Insert the current input data into the ring buffer. */
-        PaUtil_WriteRingBuffer( pRb, inputBuffer, framesPerBuffer );
+        PaUtil_WriteRingBuffer (pRb, inputBuffer, framesPerBuffer);
 
         /* Set blocking i/o event? */
-        if( blockingState->readFramesRequestedFlag && PaUtil_GetRingBufferReadAvailable(pRb) >= (long) blockingState->readFramesRequested )
-        {
+        if (blockingState->readFramesRequestedFlag && PaUtil_GetRingBufferReadAvailable (pRb) >= (long) blockingState->readFramesRequested) {
             /* Reset buffer request. */
             blockingState->readFramesRequestedFlag = FALSE;
             blockingState->readFramesRequested     = 0;
             /* Signalize that requested buffers are ready. */
-            SetEvent( blockingState->readFramesReadyEvent );
+            SetEvent (blockingState->readFramesReadyEvent);
             /* What do we do if SetEvent() returns zero, i.e. the event
                could not be set? How to return errors from within the
                callback? - S.Fischer */
@@ -3844,7 +3788,7 @@ static int BlockingIoPaCallback(const void                     *inputBuffer    ,
 }
 
 
-PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific )
+PaError PaAsio_ShowControlPanel (PaDeviceIndex device, void* systemSpecific)
 {
     PaError result = paNoError;
     PaUtilHostApiRepresentation *hostApi;
@@ -3856,12 +3800,14 @@ PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific )
     PaAsioDeviceInfo *asioDeviceInfo;
 
 
-    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );
-    if( result != paNoError )
+    result = PaUtil_GetHostApiRepresentation (&hostApi, paASIO);
+
+    if (result != paNoError)
         goto error;
 
-    result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice, device, hostApi );
-    if( result != paNoError )
+    result = PaUtil_DeviceIndexToHostApiDeviceIndex (&hostApiDevice, device, hostApi);
+
+    if (result != paNoError)
         goto error;
 
     /*
@@ -3872,84 +3818,82 @@ PaError PaAsio_ShowControlPanel( PaDeviceIndex device, void* systemSpecific )
         done safely while a stream is open.
     */
 
-    asioHostApi = (PaAsioHostApiRepresentation*)hostApi;
-    if( asioHostApi->openAsioDeviceIndex != paNoDevice )
-    {
+    asioHostApi = (PaAsioHostApiRepresentation*) hostApi;
+
+    if (asioHostApi->openAsioDeviceIndex != paNoDevice) {
         result = paDeviceUnavailable;
         goto error;
     }
 
-    asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[hostApiDevice];
+    asioDeviceInfo = (PaAsioDeviceInfo*) hostApi->deviceInfos[hostApiDevice];
 
     /* See notes about CoInitialize(0) in LoadAsioDriver(). */
-	CoInitialize(0);
+    CoInitialize (0);
 
-    if( !asioHostApi->asioDrivers->loadDriver( const_cast<char*>(asioDeviceInfo->commonDeviceInfo.name) ) )
-    {
+    if (!asioHostApi->asioDrivers->loadDriver (const_cast<char*> (asioDeviceInfo->commonDeviceInfo.name))) {
         result = paUnanticipatedHostError;
         goto error;
     }
 
     /* CRUCIAL!!! */
-    memset( &asioDriverInfo, 0, sizeof(ASIODriverInfo) );
+    memset (&asioDriverInfo, 0, sizeof (ASIODriverInfo));
     asioDriverInfo.asioVersion = 2;
     asioDriverInfo.sysRef = systemSpecific;
-    asioError = ASIOInit( &asioDriverInfo );
-    if( asioError != ASE_OK )
-    {
+    asioError = ASIOInit (&asioDriverInfo);
+
+    if (asioError != ASE_OK) {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
         goto error;
-    }
-    else
-    {
+    } else {
         asioIsInitialized = 1;
     }
 
-PA_DEBUG(("PaAsio_ShowControlPanel: ASIOInit(): %s\n", PaAsio_GetAsioErrorText(asioError) ));
-PA_DEBUG(("asioVersion: ASIOInit(): %ld\n",   asioDriverInfo.asioVersion )); 
-PA_DEBUG(("driverVersion: ASIOInit(): %ld\n", asioDriverInfo.driverVersion )); 
-PA_DEBUG(("Name: ASIOInit(): %s\n",           asioDriverInfo.name )); 
-PA_DEBUG(("ErrorMessage: ASIOInit(): %s\n",   asioDriverInfo.errorMessage )); 
+    PA_DEBUG ( ("PaAsio_ShowControlPanel: ASIOInit(): %s\n", PaAsio_GetAsioErrorText (asioError)));
+    PA_DEBUG ( ("asioVersion: ASIOInit(): %ld\n",   asioDriverInfo.asioVersion));
+    PA_DEBUG ( ("driverVersion: ASIOInit(): %ld\n", asioDriverInfo.driverVersion));
+    PA_DEBUG ( ("Name: ASIOInit(): %s\n",           asioDriverInfo.name));
+    PA_DEBUG ( ("ErrorMessage: ASIOInit(): %s\n",   asioDriverInfo.errorMessage));
 
     asioError = ASIOControlPanel();
-    if( asioError != ASE_OK )
-    {
-        PA_DEBUG(("PaAsio_ShowControlPanel: ASIOControlPanel(): %s\n", PaAsio_GetAsioErrorText(asioError) ));
+
+    if (asioError != ASE_OK) {
+        PA_DEBUG ( ("PaAsio_ShowControlPanel: ASIOControlPanel(): %s\n", PaAsio_GetAsioErrorText (asioError)));
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
         goto error;
     }
 
-PA_DEBUG(("PaAsio_ShowControlPanel: ASIOControlPanel(): %s\n", PaAsio_GetAsioErrorText(asioError) ));
+    PA_DEBUG ( ("PaAsio_ShowControlPanel: ASIOControlPanel(): %s\n", PaAsio_GetAsioErrorText (asioError)));
 
     asioError = ASIOExit();
-    if( asioError != ASE_OK )
-    {
+
+    if (asioError != ASE_OK) {
         result = paUnanticipatedHostError;
-        PA_ASIO_SET_LAST_ASIO_ERROR( asioError );
+        PA_ASIO_SET_LAST_ASIO_ERROR (asioError);
         asioIsInitialized = 0;
         goto error;
     }
 
-	CoUninitialize();
-PA_DEBUG(("PaAsio_ShowControlPanel: ASIOExit(): %s\n", PaAsio_GetAsioErrorText(asioError) ));
+    CoUninitialize();
+    PA_DEBUG ( ("PaAsio_ShowControlPanel: ASIOExit(): %s\n", PaAsio_GetAsioErrorText (asioError)));
 
     return result;
 
 error:
-    if( asioIsInitialized )
-	{
-		ASIOExit();
-	}
-	CoUninitialize();
+
+    if (asioIsInitialized) {
+        ASIOExit();
+    }
+
+    CoUninitialize();
 
     return result;
 }
 
 
-PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
-        const char** channelName )
+PaError PaAsio_GetInputChannelName (PaDeviceIndex device, int channelIndex,
+                                    const char** channelName)
 {
     PaError result = paNoError;
     PaUtilHostApiRepresentation *hostApi;
@@ -3957,17 +3901,19 @@ PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
     PaAsioDeviceInfo *asioDeviceInfo;
 
 
-    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );
-    if( result != paNoError )
+    result = PaUtil_GetHostApiRepresentation (&hostApi, paASIO);
+
+    if (result != paNoError)
         goto error;
 
-    result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice, device, hostApi );
-    if( result != paNoError )
+    result = PaUtil_DeviceIndexToHostApiDeviceIndex (&hostApiDevice, device, hostApi);
+
+    if (result != paNoError)
         goto error;
 
-    asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[hostApiDevice];
+    asioDeviceInfo = (PaAsioDeviceInfo*) hostApi->deviceInfos[hostApiDevice];
 
-    if( channelIndex < 0 || channelIndex >= asioDeviceInfo->commonDeviceInfo.maxInputChannels ){
+    if (channelIndex < 0 || channelIndex >= asioDeviceInfo->commonDeviceInfo.maxInputChannels) {
         result = paInvalidChannelCount;
         goto error;
     }
@@ -3975,14 +3921,14 @@ PaError PaAsio_GetInputChannelName( PaDeviceIndex device, int channelIndex,
     *channelName = asioDeviceInfo->asioChannelInfos[channelIndex].name;
 
     return paNoError;
-    
+
 error:
     return result;
 }
 
 
-PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
-        const char** channelName )
+PaError PaAsio_GetOutputChannelName (PaDeviceIndex device, int channelIndex,
+                                     const char** channelName)
 {
     PaError result = paNoError;
     PaUtilHostApiRepresentation *hostApi;
@@ -3990,26 +3936,28 @@ PaError PaAsio_GetOutputChannelName( PaDeviceIndex device, int channelIndex,
     PaAsioDeviceInfo *asioDeviceInfo;
 
 
-    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );
-    if( result != paNoError )
+    result = PaUtil_GetHostApiRepresentation (&hostApi, paASIO);
+
+    if (result != paNoError)
         goto error;
 
-    result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice, device, hostApi );
-    if( result != paNoError )
+    result = PaUtil_DeviceIndexToHostApiDeviceIndex (&hostApiDevice, device, hostApi);
+
+    if (result != paNoError)
         goto error;
 
-    asioDeviceInfo = (PaAsioDeviceInfo*)hostApi->deviceInfos[hostApiDevice];
+    asioDeviceInfo = (PaAsioDeviceInfo*) hostApi->deviceInfos[hostApiDevice];
 
-    if( channelIndex < 0 || channelIndex >= asioDeviceInfo->commonDeviceInfo.maxOutputChannels ){
+    if (channelIndex < 0 || channelIndex >= asioDeviceInfo->commonDeviceInfo.maxOutputChannels) {
         result = paInvalidChannelCount;
         goto error;
     }
 
     *channelName = asioDeviceInfo->asioChannelInfos[
-            asioDeviceInfo->commonDeviceInfo.maxInputChannels + channelIndex].name;
+                       asioDeviceInfo->commonDeviceInfo.maxInputChannels + channelIndex].name;
 
     return paNoError;
-    
+
 error:
     return result;
 }
@@ -4020,46 +3968,46 @@ error:
     we don't have the benefit of pa_front.c's parameter checking.
 */
 
-static PaError GetAsioStreamPointer( PaAsioStream **stream, PaStream *s )
+static PaError GetAsioStreamPointer (PaAsioStream **stream, PaStream *s)
 {
     PaError result;
     PaUtilHostApiRepresentation *hostApi;
     PaAsioHostApiRepresentation *asioHostApi;
-    
-    result = PaUtil_ValidateStreamPointer( s );
-    if( result != paNoError )
+
+    result = PaUtil_ValidateStreamPointer (s);
+
+    if (result != paNoError)
         return result;
 
-    result = PaUtil_GetHostApiRepresentation( &hostApi, paASIO );
-    if( result != paNoError )
+    result = PaUtil_GetHostApiRepresentation (&hostApi, paASIO);
+
+    if (result != paNoError)
         return result;
 
-    asioHostApi = (PaAsioHostApiRepresentation*)hostApi;
-    
-    if( PA_STREAM_REP( s )->streamInterface == &asioHostApi->callbackStreamInterface
-            || PA_STREAM_REP( s )->streamInterface == &asioHostApi->blockingStreamInterface )
-    {
+    asioHostApi = (PaAsioHostApiRepresentation*) hostApi;
+
+    if (PA_STREAM_REP (s)->streamInterface == &asioHostApi->callbackStreamInterface
+            || PA_STREAM_REP (s)->streamInterface == &asioHostApi->blockingStreamInterface) {
         /* s is an ASIO  stream */
-        *stream = (PaAsioStream *)s;
+        *stream = (PaAsioStream *) s;
         return paNoError;
-    }
-    else
-    {
+    } else {
         return paIncompatibleStreamHostApi;
     }
 }
 
 
-PaError PaAsio_SetStreamSampleRate( PaStream* s, double sampleRate )
+PaError PaAsio_SetStreamSampleRate (PaStream* s, double sampleRate)
 {
     PaAsioStream *stream;
-    PaError result = GetAsioStreamPointer( &stream, s );
-    if( result != paNoError )
+    PaError result = GetAsioStreamPointer (&stream, s);
+
+    if (result != paNoError)
         return result;
 
-    if( stream != theAsioStream )
+    if (stream != theAsioStream)
         return paBadStreamPtr;
 
-    return ValidateAndSetSampleRate( sampleRate );
+    return ValidateAndSetSampleRate (sampleRate);
 }
 
diff --git a/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/wasapi/pa_win_wasapi.cpp b/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/wasapi/pa_win_wasapi.cpp
index 498fc6c442d629146256fb025d6e2b42bada30cc..d5663f839d5e893adf40767b68400124eadc819b 100644
--- a/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/wasapi/pa_win_wasapi.cpp
+++ b/sflphone-common/libs/pjproject/third_party/portaudio/src/hostapi/wasapi/pa_win_wasapi.cpp
@@ -26,13 +26,13 @@
  */
 
 /*
- * The text above constitutes the entire PortAudio license; however, 
+ * The text above constitutes the entire PortAudio license; however,
  * the PortAudio community also makes the following non-binding requests:
  *
  * Any person wishing to distribute modifications to the Software is
  * requested to send the modifications to the original developer so that
- * they can be incorporated into the canonical version. It is also 
- * requested that these non-binding requests be included along with the 
+ * they can be incorporated into the canonical version. It is also
+ * requested that these non-binding requests be included along with the
  * license above.
  */
 
@@ -85,11 +85,10 @@
 /* prototypes for functions declared in this file */
 
 #ifdef __cplusplus
-extern "C"
-{
+extern "C" {
 #endif /* __cplusplus */
 
-PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+    PaError PaWinWasapi_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index);
 
 #ifdef __cplusplus
 }
@@ -98,12 +97,12 @@ PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApi
 
 
 
-static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+static void Terminate (struct PaUtilHostApiRepresentation *hostApi);
+static PaError IsFormatSupported (struct PaUtilHostApiRepresentation *hostApi,
                                   const PaStreamParameters *inputParameters,
                                   const PaStreamParameters *outputParameters,
-                                  double sampleRate );
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                                  double sampleRate);
+static PaError OpenStream (struct PaUtilHostApiRepresentation *hostApi,
                            PaStream** s,
                            const PaStreamParameters *inputParameters,
                            const PaStreamParameters *outputParameters,
@@ -111,19 +110,19 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
                            unsigned long framesPerBuffer,
                            PaStreamFlags streamFlags,
                            PaStreamCallback *streamCallback,
-                           void *userData );
-static PaError CloseStream( PaStream* stream );
-static PaError StartStream( PaStream *stream );
-static PaError StopStream( PaStream *stream );
-static PaError AbortStream( PaStream *stream );
-static PaError IsStreamStopped( PaStream *s );
-static PaError IsStreamActive( PaStream *stream );
-static PaTime GetStreamTime( PaStream *stream );
-static double GetStreamCpuLoad( PaStream* stream );
-static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
-static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
-static signed long GetStreamReadAvailable( PaStream* stream );
-static signed long GetStreamWriteAvailable( PaStream* stream );
+                           void *userData);
+static PaError CloseStream (PaStream* stream);
+static PaError StartStream (PaStream *stream);
+static PaError StopStream (PaStream *stream);
+static PaError AbortStream (PaStream *stream);
+static PaError IsStreamStopped (PaStream *s);
+static PaError IsStreamActive (PaStream *stream);
+static PaTime GetStreamTime (PaStream *stream);
+static double GetStreamCpuLoad (PaStream* stream);
+static PaError ReadStream (PaStream* stream, void *buffer, unsigned long frames);
+static PaError WriteStream (PaStream* stream, const void *buffer, unsigned long frames);
+static signed long GetStreamReadAvailable (PaStream* stream);
+static signed long GetStreamWriteAvailable (PaStream* stream);
 
 
 /* IMPLEMENT ME: a macro like the following one should be used for reporting
@@ -139,7 +138,8 @@ static signed long GetStreamWriteAvailable( PaStream* stream );
 //currently built using RC1 SDK (5600)
 #if _MSC_VER < 1400
 
-PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex ){
+PaError PaWinWasapi_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex)
+{
     return paNoError;
 }
 
@@ -156,8 +156,7 @@ PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApi
  i assume that neither of these will cause the Driver to "load",
  but again, who knows how they implement their stuff
  */
-typedef struct PaWinWasapiDeviceInfo
-{
+typedef struct PaWinWasapiDeviceInfo {
     //hmm is it wise to keep a reference until Terminate?
     //TODO Check if that interface requires the driver to be loaded!
     IMMDevice * device;
@@ -181,8 +180,7 @@ typedef struct PaWinWasapiDeviceInfo
 } PaWinWasapiDeviceInfo;
 
 
-typedef struct
-{
+typedef struct {
     PaUtilHostApiRepresentation inheritedHostApiRep;
     PaUtilStreamInterface callbackStreamInterface;
     PaUtilStreamInterface blockingStreamInterface;
@@ -201,22 +199,21 @@ typedef struct
     WCHAR defaultCapturer [MAX_STR_LEN];
 
     PaWinWasapiDeviceInfo   *devInfo;
-}PaWinWasapiHostApiRepresentation;
+} PaWinWasapiHostApiRepresentation;
 
 
 /* PaWinWasapiStream - a stream data structure specifically for this implementation */
 
-typedef struct PaWinWasapiSubStream{
+typedef struct PaWinWasapiSubStream {
     IAudioClient        *client;
     WAVEFORMATEXTENSIBLE wavex;
     UINT32               bufferSize;
     REFERENCE_TIME       latency;
     REFERENCE_TIME       period;
     unsigned long framesPerHostCallback; /* just an example */
-}PaWinWasapiSubStream;
+} PaWinWasapiSubStream;
 
-typedef struct PaWinWasapiStream
-{ /* IMPLEMENT ME: rename this */
+typedef struct PaWinWasapiStream { /* IMPLEMENT ME: rename this */
     PaUtilStreamRepresentation streamRepresentation;
     PaUtilCpuLoadMeasurer cpuLoadMeasurer;
     PaUtilBufferProcessor bufferProcessor;
@@ -227,84 +224,141 @@ typedef struct PaWinWasapiStream
 
 
     //input
-	PaWinWasapiSubStream in;
+    PaWinWasapiSubStream in;
     IAudioCaptureClient *cclient;
     IAudioEndpointVolume *inVol;
-	//output
-	PaWinWasapiSubStream out;
+    //output
+    PaWinWasapiSubStream out;
     IAudioRenderClient  *rclient;
-	IAudioEndpointVolume *outVol;
+    IAudioEndpointVolume *outVol;
 
     bool running;
     bool closeRequest;
 
     DWORD dwThreadId;
     HANDLE hThread;
-	HANDLE hNotificationEvent; 
+    HANDLE hNotificationEvent;
 
     GUID  session;
 
-}PaWinWasapiStream;
+} PaWinWasapiStream;
 
 #define PRINT(x) PA_DEBUG(x);
 
 void
-logAUDCLNT_E(HRESULT res){
+logAUDCLNT_E (HRESULT res)
+{
 
     char *text = 0;
-    switch(res){
-        case S_OK: return; break;
-        case E_POINTER                              :text ="E_POINTER"; break;
-        case E_INVALIDARG                           :text ="E_INVALIDARG"; break;
-
-        case AUDCLNT_E_NOT_INITIALIZED              :text ="AUDCLNT_E_NOT_INITIALIZED"; break;
-        case AUDCLNT_E_ALREADY_INITIALIZED          :text ="AUDCLNT_E_ALREADY_INITIALIZED"; break;
-        case AUDCLNT_E_WRONG_ENDPOINT_TYPE          :text ="AUDCLNT_E_WRONG_ENDPOINT_TYPE"; break;
-        case AUDCLNT_E_DEVICE_INVALIDATED           :text ="AUDCLNT_E_DEVICE_INVALIDATED"; break;
-        case AUDCLNT_E_NOT_STOPPED                  :text ="AUDCLNT_E_NOT_STOPPED"; break;
-        case AUDCLNT_E_BUFFER_TOO_LARGE             :text ="AUDCLNT_E_BUFFER_TOO_LARGE"; break;
-        case AUDCLNT_E_OUT_OF_ORDER                 :text ="AUDCLNT_E_OUT_OF_ORDER"; break;
-        case AUDCLNT_E_UNSUPPORTED_FORMAT           :text ="AUDCLNT_E_UNSUPPORTED_FORMAT"; break;
-        case AUDCLNT_E_INVALID_SIZE                 :text ="AUDCLNT_E_INVALID_SIZE"; break;
-        case AUDCLNT_E_DEVICE_IN_USE                :text ="AUDCLNT_E_DEVICE_IN_USE"; break;
-        case AUDCLNT_E_BUFFER_OPERATION_PENDING     :text ="AUDCLNT_E_BUFFER_OPERATION_PENDING"; break;
-        case AUDCLNT_E_THREAD_NOT_REGISTERED        :text ="AUDCLNT_E_THREAD_NOT_REGISTERED"; break;      
-		case AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED   :text ="AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED"; break;
-        case AUDCLNT_E_ENDPOINT_CREATE_FAILED       :text ="AUDCLNT_E_ENDPOINT_CREATE_FAILED"; break;
-        case AUDCLNT_E_SERVICE_NOT_RUNNING          :text ="AUDCLNT_E_SERVICE_NOT_RUNNING"; break;
-     //  case AUDCLNT_E_CPUUSAGE_EXCEEDED            :text ="AUDCLNT_E_CPUUSAGE_EXCEEDED"; break;
-     //Header error?
-        case AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED     :text ="AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED"; break;
-        case AUDCLNT_E_EXCLUSIVE_MODE_ONLY          :text ="AUDCLNT_E_EXCLUSIVE_MODE_ONLY"; break;
-        case AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL :text ="AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL"; break;
-        case AUDCLNT_E_EVENTHANDLE_NOT_SET          :text ="AUDCLNT_E_EVENTHANDLE_NOT_SET"; break;
-        case AUDCLNT_E_INCORRECT_BUFFER_SIZE        :text ="AUDCLNT_E_INCORRECT_BUFFER_SIZE"; break;
-        case AUDCLNT_E_BUFFER_SIZE_ERROR            :text ="AUDCLNT_E_BUFFER_SIZE_ERROR"; break;
-        case AUDCLNT_S_BUFFER_EMPTY                 :text ="AUDCLNT_S_BUFFER_EMPTY"; break;
-        case AUDCLNT_S_THREAD_ALREADY_REGISTERED    :text ="AUDCLNT_S_THREAD_ALREADY_REGISTERED"; break;
+
+    switch (res) {
+        case S_OK:
+            return;
+            break;
+        case E_POINTER                              :
+            text ="E_POINTER";
+            break;
+        case E_INVALIDARG                           :
+            text ="E_INVALIDARG";
+            break;
+
+        case AUDCLNT_E_NOT_INITIALIZED              :
+            text ="AUDCLNT_E_NOT_INITIALIZED";
+            break;
+        case AUDCLNT_E_ALREADY_INITIALIZED          :
+            text ="AUDCLNT_E_ALREADY_INITIALIZED";
+            break;
+        case AUDCLNT_E_WRONG_ENDPOINT_TYPE          :
+            text ="AUDCLNT_E_WRONG_ENDPOINT_TYPE";
+            break;
+        case AUDCLNT_E_DEVICE_INVALIDATED           :
+            text ="AUDCLNT_E_DEVICE_INVALIDATED";
+            break;
+        case AUDCLNT_E_NOT_STOPPED                  :
+            text ="AUDCLNT_E_NOT_STOPPED";
+            break;
+        case AUDCLNT_E_BUFFER_TOO_LARGE             :
+            text ="AUDCLNT_E_BUFFER_TOO_LARGE";
+            break;
+        case AUDCLNT_E_OUT_OF_ORDER                 :
+            text ="AUDCLNT_E_OUT_OF_ORDER";
+            break;
+        case AUDCLNT_E_UNSUPPORTED_FORMAT           :
+            text ="AUDCLNT_E_UNSUPPORTED_FORMAT";
+            break;
+        case AUDCLNT_E_INVALID_SIZE                 :
+            text ="AUDCLNT_E_INVALID_SIZE";
+            break;
+        case AUDCLNT_E_DEVICE_IN_USE                :
+            text ="AUDCLNT_E_DEVICE_IN_USE";
+            break;
+        case AUDCLNT_E_BUFFER_OPERATION_PENDING     :
+            text ="AUDCLNT_E_BUFFER_OPERATION_PENDING";
+            break;
+        case AUDCLNT_E_THREAD_NOT_REGISTERED        :
+            text ="AUDCLNT_E_THREAD_NOT_REGISTERED";
+            break;
+        case AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED   :
+            text ="AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED";
+            break;
+        case AUDCLNT_E_ENDPOINT_CREATE_FAILED       :
+            text ="AUDCLNT_E_ENDPOINT_CREATE_FAILED";
+            break;
+        case AUDCLNT_E_SERVICE_NOT_RUNNING          :
+            text ="AUDCLNT_E_SERVICE_NOT_RUNNING";
+            break;
+            //  case AUDCLNT_E_CPUUSAGE_EXCEEDED            :text ="AUDCLNT_E_CPUUSAGE_EXCEEDED"; break;
+            //Header error?
+        case AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED     :
+            text ="AUDCLNT_E_EVENTHANDLE_NOT_EXPECTED";
+            break;
+        case AUDCLNT_E_EXCLUSIVE_MODE_ONLY          :
+            text ="AUDCLNT_E_EXCLUSIVE_MODE_ONLY";
+            break;
+        case AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL :
+            text ="AUDCLNT_E_BUFDURATION_PERIOD_NOT_EQUAL";
+            break;
+        case AUDCLNT_E_EVENTHANDLE_NOT_SET          :
+            text ="AUDCLNT_E_EVENTHANDLE_NOT_SET";
+            break;
+        case AUDCLNT_E_INCORRECT_BUFFER_SIZE        :
+            text ="AUDCLNT_E_INCORRECT_BUFFER_SIZE";
+            break;
+        case AUDCLNT_E_BUFFER_SIZE_ERROR            :
+            text ="AUDCLNT_E_BUFFER_SIZE_ERROR";
+            break;
+        case AUDCLNT_S_BUFFER_EMPTY                 :
+            text ="AUDCLNT_S_BUFFER_EMPTY";
+            break;
+        case AUDCLNT_S_THREAD_ALREADY_REGISTERED    :
+            text ="AUDCLNT_S_THREAD_ALREADY_REGISTERED";
+            break;
         default:
             text =" dunno!";
             return ;
-        break;
+            break;
 
     }
-    PRINT(("WASAPI ERROR HRESULT: 0x%X : %s\n",res,text));
+
+    PRINT ( ("WASAPI ERROR HRESULT: 0x%X : %s\n",res,text));
 }
 
 inline double
-nano100ToMillis(const REFERENCE_TIME &ref){
+nano100ToMillis (const REFERENCE_TIME &ref)
+{
     //  1 nano = 0.000000001 seconds
     //100 nano = 0.0000001   seconds
     //100 nano = 0.0001   milliseconds
-    return ((double)ref)*0.0001;
+    return ( (double) ref) *0.0001;
 }
 
 inline double
-nano100ToSeconds(const REFERENCE_TIME &ref){
+nano100ToSeconds (const REFERENCE_TIME &ref)
+{
     //  1 nano = 0.000000001 seconds
     //100 nano = 0.0000001   seconds
     //100 nano = 0.0001   milliseconds
-    return ((double)ref)*0.0000001;
+    return ( (double) ref) *0.0000001;
 }
 
 #ifndef IF_FAILED_JUMP
@@ -315,11 +369,11 @@ nano100ToSeconds(const REFERENCE_TIME &ref){
 
 //AVRT is the new "multimedia schedulling stuff"
 
-typedef BOOL   (WINAPI *FAvRtCreateThreadOrderingGroup) (PHANDLE,PLARGE_INTEGER,GUID*,PLARGE_INTEGER);
-typedef BOOL   (WINAPI *FAvRtDeleteThreadOrderingGroup) (HANDLE);
-typedef BOOL   (WINAPI *FAvRtWaitOnThreadOrderingGroup) (HANDLE);
-typedef HANDLE (WINAPI *FAvSetMmThreadCharacteristics)  (LPCTSTR,LPDWORD);
-typedef BOOL   (WINAPI *FAvSetMmThreadPriority)         (HANDLE,AVRT_PRIORITY);
+typedef BOOL (WINAPI *FAvRtCreateThreadOrderingGroup) (PHANDLE,PLARGE_INTEGER,GUID*,PLARGE_INTEGER);
+typedef BOOL (WINAPI *FAvRtDeleteThreadOrderingGroup) (HANDLE);
+typedef BOOL (WINAPI *FAvRtWaitOnThreadOrderingGroup) (HANDLE);
+typedef HANDLE (WINAPI *FAvSetMmThreadCharacteristics) (LPCTSTR,LPDWORD);
+typedef BOOL (WINAPI *FAvSetMmThreadPriority) (HANDLE,AVRT_PRIORITY);
 
 HMODULE  hDInputDLL = 0;
 FAvRtCreateThreadOrderingGroup pAvRtCreateThreadOrderingGroup=0;
@@ -337,46 +391,50 @@ FAvSetMmThreadPriority         pAvSetMmThreadPriority=0;
                                             return false;                                   \
                                         }                                                   \
                                     }                                                       \
-
+ 
 bool
-setupAVRT(){
+setupAVRT()
+{
+
+    hDInputDLL = LoadLibraryA ("avrt.dll");
 
-    hDInputDLL = LoadLibraryA("avrt.dll");
-    if(hDInputDLL == NULL)
+    if (hDInputDLL == NULL)
         return false;
 
-    setupPTR(pAvRtCreateThreadOrderingGroup, FAvRtCreateThreadOrderingGroup, "AvRtCreateThreadOrderingGroup");
-    setupPTR(pAvRtDeleteThreadOrderingGroup, FAvRtDeleteThreadOrderingGroup, "AvRtDeleteThreadOrderingGroup");
-    setupPTR(pAvRtWaitOnThreadOrderingGroup, FAvRtWaitOnThreadOrderingGroup, "AvRtWaitOnThreadOrderingGroup");
-    setupPTR(pAvSetMmThreadCharacteristics,  FAvSetMmThreadCharacteristics,  "AvSetMmThreadCharacteristicsA");
-    setupPTR(pAvSetMmThreadPriority,         FAvSetMmThreadPriority,         "AvSetMmThreadPriority");
+    setupPTR (pAvRtCreateThreadOrderingGroup, FAvRtCreateThreadOrderingGroup, "AvRtCreateThreadOrderingGroup");
+    setupPTR (pAvRtDeleteThreadOrderingGroup, FAvRtDeleteThreadOrderingGroup, "AvRtDeleteThreadOrderingGroup");
+    setupPTR (pAvRtWaitOnThreadOrderingGroup, FAvRtWaitOnThreadOrderingGroup, "AvRtWaitOnThreadOrderingGroup");
+    setupPTR (pAvSetMmThreadCharacteristics,  FAvSetMmThreadCharacteristics,  "AvSetMmThreadCharacteristicsA");
+    setupPTR (pAvSetMmThreadPriority,         FAvSetMmThreadPriority,         "AvSetMmThreadPriority");
 
     return true;
 }
 
 
 
-PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+PaError PaWinWasapi_Initialize (PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex)
 {
-    if (!setupAVRT()){
-        PRINT(("Windows WASAPI : No AVRT! (not VISTA?)"));
+    if (!setupAVRT()) {
+        PRINT ( ("Windows WASAPI : No AVRT! (not VISTA?)"));
         return paNoError;
     }
 
-    CoInitialize(NULL);
+    CoInitialize (NULL);
 
     PaError result = paNoError;
     PaWinWasapiHostApiRepresentation *paWasapi;
     PaDeviceInfo *deviceInfoArray;
 
-    paWasapi = (PaWinWasapiHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaWinWasapiHostApiRepresentation) );
-    if( !paWasapi ){
+    paWasapi = (PaWinWasapiHostApiRepresentation*) PaUtil_AllocateMemory (sizeof (PaWinWasapiHostApiRepresentation));
+
+    if (!paWasapi) {
         result = paInsufficientMemory;
         goto error;
     }
 
     paWasapi->allocations = PaUtil_CreateAllocationGroup();
-    if( !paWasapi->allocations ){
+
+    if (!paWasapi->allocations) {
         result = paInsufficientMemory;
         goto error;
     }
@@ -394,168 +452,172 @@ PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApi
     IMMDeviceCollection* spEndpoints=0;
     paWasapi->enumerator = 0;
 
-    hResult = CoCreateInstance(
-             __uuidof(MMDeviceEnumerator), NULL,CLSCTX_INPROC_SERVER,
-             __uuidof(IMMDeviceEnumerator),
-             (void**)&paWasapi->enumerator);
+    hResult = CoCreateInstance (
+                  __uuidof (MMDeviceEnumerator), NULL,CLSCTX_INPROC_SERVER,
+                  __uuidof (IMMDeviceEnumerator),
+                  (void**) &paWasapi->enumerator);
 
-    IF_FAILED_JUMP(hResult, error);
+    IF_FAILED_JUMP (hResult, error);
 
     //getting default device ids in the eMultimedia "role"
     {
         {
             IMMDevice* defaultRenderer=0;
-            hResult = paWasapi->enumerator->GetDefaultAudioEndpoint(eRender, eMultimedia, &defaultRenderer);
-            IF_FAILED_JUMP(hResult, error);
+            hResult = paWasapi->enumerator->GetDefaultAudioEndpoint (eRender, eMultimedia, &defaultRenderer);
+            IF_FAILED_JUMP (hResult, error);
             WCHAR* pszDeviceId = NULL;
-            hResult = defaultRenderer->GetId(&pszDeviceId);
-            IF_FAILED_JUMP(hResult, error);
-            StringCchCopyW(paWasapi->defaultRenderer, MAX_STR_LEN-1, pszDeviceId);
-            CoTaskMemFree(pszDeviceId);
+            hResult = defaultRenderer->GetId (&pszDeviceId);
+            IF_FAILED_JUMP (hResult, error);
+            StringCchCopyW (paWasapi->defaultRenderer, MAX_STR_LEN-1, pszDeviceId);
+            CoTaskMemFree (pszDeviceId);
             defaultRenderer->Release();
         }
 
         {
             IMMDevice* defaultCapturer=0;
-            hResult = paWasapi->enumerator->GetDefaultAudioEndpoint(eCapture, eMultimedia, &defaultCapturer);
-            IF_FAILED_JUMP(hResult, error);
+            hResult = paWasapi->enumerator->GetDefaultAudioEndpoint (eCapture, eMultimedia, &defaultCapturer);
+            IF_FAILED_JUMP (hResult, error);
             WCHAR* pszDeviceId = NULL;
-            hResult = defaultCapturer->GetId(&pszDeviceId);
-            IF_FAILED_JUMP(hResult, error);
-            StringCchCopyW(paWasapi->defaultCapturer, MAX_STR_LEN-1, pszDeviceId);
-            CoTaskMemFree(pszDeviceId);
+            hResult = defaultCapturer->GetId (&pszDeviceId);
+            IF_FAILED_JUMP (hResult, error);
+            StringCchCopyW (paWasapi->defaultCapturer, MAX_STR_LEN-1, pszDeviceId);
+            CoTaskMemFree (pszDeviceId);
             defaultCapturer->Release();
         }
     }
 
 
-    hResult = paWasapi->enumerator->EnumAudioEndpoints(eAll, DEVICE_STATE_ACTIVE, &spEndpoints);
-    IF_FAILED_JUMP(hResult, error);
+    hResult = paWasapi->enumerator->EnumAudioEndpoints (eAll, DEVICE_STATE_ACTIVE, &spEndpoints);
+    IF_FAILED_JUMP (hResult, error);
 
-    hResult = spEndpoints->GetCount(&paWasapi->deviceCount);
-    IF_FAILED_JUMP(hResult, error);
+    hResult = spEndpoints->GetCount (&paWasapi->deviceCount);
+    IF_FAILED_JUMP (hResult, error);
 
     paWasapi->devInfo = new PaWinWasapiDeviceInfo[paWasapi->deviceCount];
     {
-        for (size_t step=0;step<paWasapi->deviceCount;++step)
-            memset(&paWasapi->devInfo[step],0,sizeof(PaWinWasapiDeviceInfo));
+        for (size_t step=0; step<paWasapi->deviceCount; ++step)
+            memset (&paWasapi->devInfo[step],0,sizeof (PaWinWasapiDeviceInfo));
     }
 
 
 
-    if( paWasapi->deviceCount > 0 )
-    {
-        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
-                paWasapi->allocations, sizeof(PaDeviceInfo*) * paWasapi->deviceCount );
-        if( !(*hostApi)->deviceInfos ){
+    if (paWasapi->deviceCount > 0) {
+        (*hostApi)->deviceInfos = (PaDeviceInfo**) PaUtil_GroupAllocateMemory (
+                                      paWasapi->allocations, sizeof (PaDeviceInfo*) * paWasapi->deviceCount);
+
+        if (! (*hostApi)->deviceInfos) {
             result = paInsufficientMemory;
             goto error;
         }
 
         /* allocate all device info structs in a contiguous block */
-        deviceInfoArray = (PaDeviceInfo*)PaUtil_GroupAllocateMemory(
-                paWasapi->allocations, sizeof(PaDeviceInfo) * paWasapi->deviceCount );
-        if( !deviceInfoArray ){
+        deviceInfoArray = (PaDeviceInfo*) PaUtil_GroupAllocateMemory (
+                              paWasapi->allocations, sizeof (PaDeviceInfo) * paWasapi->deviceCount);
+
+        if (!deviceInfoArray) {
             result = paInsufficientMemory;
             goto error;
         }
 
-        for( UINT i=0; i < paWasapi->deviceCount; ++i ){
+        for (UINT i=0; i < paWasapi->deviceCount; ++i) {
 
-			PA_DEBUG(("i:%d\n",i));
+            PA_DEBUG ( ("i:%d\n",i));
             PaDeviceInfo *deviceInfo = &deviceInfoArray[i];
             deviceInfo->structVersion = 2;
             deviceInfo->hostApi = hostApiIndex;
 
-            hResult = spEndpoints->Item(i, &paWasapi->devInfo[i].device);
-            IF_FAILED_JUMP(hResult, error);
+            hResult = spEndpoints->Item (i, &paWasapi->devInfo[i].device);
+            IF_FAILED_JUMP (hResult, error);
 
             //getting ID
             {
                 WCHAR* pszDeviceId = NULL;
-                hResult = paWasapi->devInfo[i].device->GetId(&pszDeviceId);
-                IF_FAILED_JUMP(hResult, error);
-                StringCchCopyW(paWasapi->devInfo[i].szDeviceID, MAX_STR_LEN-1, pszDeviceId);
-                CoTaskMemFree(pszDeviceId);
+                hResult = paWasapi->devInfo[i].device->GetId (&pszDeviceId);
+                IF_FAILED_JUMP (hResult, error);
+                StringCchCopyW (paWasapi->devInfo[i].szDeviceID, MAX_STR_LEN-1, pszDeviceId);
+                CoTaskMemFree (pszDeviceId);
 
-                if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultCapturer)==0){
+                if (lstrcmpW (paWasapi->devInfo[i].szDeviceID, paWasapi->defaultCapturer) ==0) {
                     //we found the default input!
                     (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;
                 }
-                if (lstrcmpW(paWasapi->devInfo[i].szDeviceID, paWasapi->defaultRenderer)==0){
+
+                if (lstrcmpW (paWasapi->devInfo[i].szDeviceID, paWasapi->defaultRenderer) ==0) {
                     //we found the default output!
                     (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;
                 }
             }
 
             DWORD state=0;
-            hResult = paWasapi->devInfo[i].device->GetState(&paWasapi->devInfo[i].state);
-            IF_FAILED_JUMP(hResult, error);
+            hResult = paWasapi->devInfo[i].device->GetState (&paWasapi->devInfo[i].state);
+            IF_FAILED_JUMP (hResult, error);
 
-            if (paWasapi->devInfo[i].state != DEVICE_STATE_ACTIVE){
-                PRINT(("WASAPI device:%d is not currently available (state:%d)\n",i,state));
+            if (paWasapi->devInfo[i].state != DEVICE_STATE_ACTIVE) {
+                PRINT ( ("WASAPI device:%d is not currently available (state:%d)\n",i,state));
                 //spDevice->Release();
                 //continue;
             }
 
             {
                 IPropertyStore* spProperties;
-                hResult = paWasapi->devInfo[i].device->OpenPropertyStore(STGM_READ, &spProperties);
-                IF_FAILED_JUMP(hResult, error);
+                hResult = paWasapi->devInfo[i].device->OpenPropertyStore (STGM_READ, &spProperties);
+                IF_FAILED_JUMP (hResult, error);
 
                 //getting "Friendly" Name
                 {
                     PROPVARIANT value;
-                    PropVariantInit(&value);
-                    hResult = spProperties->GetValue(PKEY_Device_FriendlyName, &value);
-                    IF_FAILED_JUMP(hResult, error);
+                    PropVariantInit (&value);
+                    hResult = spProperties->GetValue (PKEY_Device_FriendlyName, &value);
+                    IF_FAILED_JUMP (hResult, error);
                     deviceInfo->name = 0;
-                    char* deviceName = (char*)PaUtil_GroupAllocateMemory( paWasapi->allocations, MAX_STR_LEN + 1 );
-                    if( !deviceName ){
+                    char* deviceName = (char*) PaUtil_GroupAllocateMemory (paWasapi->allocations, MAX_STR_LEN + 1);
+
+                    if (!deviceName) {
                         result = paInsufficientMemory;
                         goto error;
                     }
-					if (value.pwszVal)
-						wcstombs(deviceName,   value.pwszVal,MAX_STR_LEN-1); //todo proper size	
-					else{
-						_snprintf_s(deviceName,MAX_STR_LEN-1,MAX_STR_LEN-1,"baddev%d",i);
-					}
+
+                    if (value.pwszVal)
+                        wcstombs (deviceName,   value.pwszVal,MAX_STR_LEN-1); //todo proper size
+                    else {
+                        _snprintf_s (deviceName,MAX_STR_LEN-1,MAX_STR_LEN-1,"baddev%d",i);
+                    }
 
                     deviceInfo->name = deviceName;
-                    PropVariantClear(&value);
+                    PropVariantClear (&value);
                 }
 
 #if 0
                 DWORD numProps = 0;
-                hResult = spProperties->GetCount(&numProps);
-                IF_FAILED_JUMP(hResult, error);
+                hResult = spProperties->GetCount (&numProps);
+                IF_FAILED_JUMP (hResult, error);
                 {
-                    for (DWORD i=0;i<numProps;++i){
+                    for (DWORD i=0; i<numProps; ++i) {
                         PROPERTYKEY pkey;
-                        hResult = spProperties->GetAt(i,&pkey);
+                        hResult = spProperties->GetAt (i,&pkey);
 
                         PROPVARIANT value;
-                        PropVariantInit(&value);
-                        hResult = spProperties->GetValue(pkey, &value);
+                        PropVariantInit (&value);
+                        hResult = spProperties->GetValue (pkey, &value);
 
-                        switch(value.vt){
+                        switch (value.vt) {
                             case 11:
-                                PRINT(("property*%u*\n",value.ulVal));
-                            break;
+                                PRINT ( ("property*%u*\n",value.ulVal));
+                                break;
                             case 19:
-                                PRINT(("property*%d*\n",value.boolVal));
-                            break;
-                            case 31:
-                            {
+                                PRINT ( ("property*%d*\n",value.boolVal));
+                                break;
+                            case 31: {
                                 char temp[512];
-                                wcstombs(temp,    value.pwszVal,MAX_STR_LEN-1);
-                                PRINT(("property*%s*\n",temp));
+                                wcstombs (temp,    value.pwszVal,MAX_STR_LEN-1);
+                                PRINT ( ("property*%s*\n",temp));
                             }
                             break;
-                            default:break;
+                            default:
+                                break;
                         }
 
-                        PropVariantClear(&value);
+                        PropVariantClear (&value);
                     }
                 }
 #endif
@@ -574,9 +636,10 @@ PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApi
             //getting the Endpoint data
             {
                 IMMEndpoint *endpoint=0;
-                hResult = paWasapi->devInfo[i].device->QueryInterface(__uuidof(IMMEndpoint),(void **)&endpoint);
-                if (SUCCEEDED(hResult)){
-                    hResult = endpoint->GetDataFlow(&paWasapi->devInfo[i].flow);
+                hResult = paWasapi->devInfo[i].device->QueryInterface (__uuidof (IMMEndpoint), (void **) &endpoint);
+
+                if (SUCCEEDED (hResult)) {
+                    hResult = endpoint->GetDataFlow (&paWasapi->devInfo[i].flow);
                     endpoint->Release();
                 }
             }
@@ -586,23 +649,23 @@ PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApi
             {
                 IAudioClient *myClient=0;
 
-                hResult = paWasapi->devInfo[i].device->Activate(__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL, (void**)&myClient);
-                IF_FAILED_JUMP(hResult, error);
+                hResult = paWasapi->devInfo[i].device->Activate (__uuidof (IAudioClient), CLSCTX_INPROC_SERVER, NULL, (void**) &myClient);
+                IF_FAILED_JUMP (hResult, error);
 
-                hResult = myClient->GetDevicePeriod(
-                    &paWasapi->devInfo[i].DefaultDevicePeriod,
-                    &paWasapi->devInfo[i].MinimumDevicePeriod);
-                IF_FAILED_JUMP(hResult, error);
+                hResult = myClient->GetDevicePeriod (
+                              &paWasapi->devInfo[i].DefaultDevicePeriod,
+                              &paWasapi->devInfo[i].MinimumDevicePeriod);
+                IF_FAILED_JUMP (hResult, error);
 
-                hResult = myClient->GetMixFormat(&paWasapi->devInfo[i].MixFormat);
+                hResult = myClient->GetMixFormat (&paWasapi->devInfo[i].MixFormat);
 
-				if (hResult != S_OK){
-					/*davidv: this happened with my hardware, previously for that same device in DirectSound:
-					  Digital Output (Realtek AC'97 Audio)'s GUID: {0x38f2cf50,0x7b4c,0x4740,0x86,0xeb,0xd4,0x38,0x66,0xd8,0xc8, 0x9f} 
-					  so something must be _really_ wrong with this device, TODO handle this better. We kind of need GetMixFormat*/
-					logAUDCLNT_E(hResult);
-					goto error;
-				}
+                if (hResult != S_OK) {
+                    /*davidv: this happened with my hardware, previously for that same device in DirectSound:
+                      Digital Output (Realtek AC'97 Audio)'s GUID: {0x38f2cf50,0x7b4c,0x4740,0x86,0xeb,0xd4,0x38,0x66,0xd8,0xc8, 0x9f}
+                      so something must be _really_ wrong with this device, TODO handle this better. We kind of need GetMixFormat*/
+                    logAUDCLNT_E (hResult);
+                    goto error;
+                }
 
                 myClient->Release();
             }
@@ -611,31 +674,31 @@ PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApi
             deviceInfo->maxInputChannels  = 0;  //for now
             deviceInfo->maxOutputChannels = 0;  //for now
 
-            switch(paWasapi->devInfo[i].flow){
+            switch (paWasapi->devInfo[i].flow) {
                 case eRender:
                     //hum not exaclty maximum, more like "default"
                     deviceInfo->maxOutputChannels = paWasapi->devInfo[i].MixFormat->nChannels;
 
-                    deviceInfo->defaultHighOutputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);
-                    deviceInfo->defaultLowOutputLatency  = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);
-                break;
+                    deviceInfo->defaultHighOutputLatency = nano100ToSeconds (paWasapi->devInfo[i].DefaultDevicePeriod);
+                    deviceInfo->defaultLowOutputLatency  = nano100ToSeconds (paWasapi->devInfo[i].MinimumDevicePeriod);
+                    break;
                 case eCapture:
                     //hum not exaclty maximum, more like "default"
                     deviceInfo->maxInputChannels  = paWasapi->devInfo[i].MixFormat->nChannels;
 
-                    deviceInfo->defaultHighInputLatency = nano100ToSeconds(paWasapi->devInfo[i].DefaultDevicePeriod);
-                    deviceInfo->defaultLowInputLatency  = nano100ToSeconds(paWasapi->devInfo[i].MinimumDevicePeriod);
-                break;
+                    deviceInfo->defaultHighInputLatency = nano100ToSeconds (paWasapi->devInfo[i].DefaultDevicePeriod);
+                    deviceInfo->defaultLowInputLatency  = nano100ToSeconds (paWasapi->devInfo[i].MinimumDevicePeriod);
+                    break;
                 default:
-                    PRINT(("WASAPI device:%d bad Data FLow! \n",i));
+                    PRINT ( ("WASAPI device:%d bad Data FLow! \n",i));
                     goto error;
-                break;
+                    break;
             }
 
-            deviceInfo->defaultSampleRate = (double)paWasapi->devInfo[i].MixFormat->nSamplesPerSec;
+            deviceInfo->defaultSampleRate = (double) paWasapi->devInfo[i].MixFormat->nSamplesPerSec;
 
             (*hostApi)->deviceInfos[i] = deviceInfo;
-            ++(*hostApi)->info.deviceCount;
+            ++ (*hostApi)->info.deviceCount;
         }
     }
 
@@ -645,16 +708,16 @@ PaError PaWinWasapi_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApi
     (*hostApi)->OpenStream = OpenStream;
     (*hostApi)->IsFormatSupported = IsFormatSupported;
 
-    PaUtil_InitializeStreamInterface( &paWasapi->callbackStreamInterface, CloseStream, StartStream,
+    PaUtil_InitializeStreamInterface (&paWasapi->callbackStreamInterface, CloseStream, StartStream,
                                       StopStream, AbortStream, IsStreamStopped, IsStreamActive,
                                       GetStreamTime, GetStreamCpuLoad,
                                       PaUtil_DummyRead, PaUtil_DummyWrite,
-                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable);
 
-    PaUtil_InitializeStreamInterface( &paWasapi->blockingStreamInterface, CloseStream, StartStream,
+    PaUtil_InitializeStreamInterface (&paWasapi->blockingStreamInterface, CloseStream, StartStream,
                                       StopStream, AbortStream, IsStreamStopped, IsStreamActive,
                                       GetStreamTime, PaUtil_DummyGetCpuLoad,
-                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable);
 
     return result;
 
@@ -666,92 +729,99 @@ error:
     if (paWasapi->enumerator)
         paWasapi->enumerator->Release();
 
-    if( paWasapi )
-    {
-        if( paWasapi->allocations )
-        {
-            PaUtil_FreeAllAllocations( paWasapi->allocations );
-            PaUtil_DestroyAllocationGroup( paWasapi->allocations );
+    if (paWasapi) {
+        if (paWasapi->allocations) {
+            PaUtil_FreeAllAllocations (paWasapi->allocations);
+            PaUtil_DestroyAllocationGroup (paWasapi->allocations);
         }
 
-        PaUtil_FreeMemory( paWasapi );
+        PaUtil_FreeMemory (paWasapi);
     }
+
     return result;
 }
 
 
-static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+static void Terminate (struct PaUtilHostApiRepresentation *hostApi)
 {
-    PaWinWasapiHostApiRepresentation *paWasapi = (PaWinWasapiHostApiRepresentation*)hostApi;
+    PaWinWasapiHostApiRepresentation *paWasapi = (PaWinWasapiHostApiRepresentation*) hostApi;
 
     paWasapi->enumerator->Release();
 
-    for (UINT i=0;i<paWasapi->deviceCount;++i){
+    for (UINT i=0; i<paWasapi->deviceCount; ++i) {
         PaWinWasapiDeviceInfo *info = &paWasapi->devInfo[i];
 
         if (info->device)
             info->device->Release();
 
         if (info->MixFormat)
-            CoTaskMemFree(info->MixFormat);
+            CoTaskMemFree (info->MixFormat);
     }
+
     delete [] paWasapi->devInfo;
 
     CoUninitialize();
 
-    if( paWasapi->allocations ){
-        PaUtil_FreeAllAllocations( paWasapi->allocations );
-        PaUtil_DestroyAllocationGroup( paWasapi->allocations );
+    if (paWasapi->allocations) {
+        PaUtil_FreeAllAllocations (paWasapi->allocations);
+        PaUtil_DestroyAllocationGroup (paWasapi->allocations);
     }
 
-    PaUtil_FreeMemory( paWasapi );
+    PaUtil_FreeMemory (paWasapi);
 }
 
 static void
-LogWAVEFORMATEXTENSIBLE(const WAVEFORMATEXTENSIBLE *in){
-
-    const WAVEFORMATEX *old = (WAVEFORMATEX *)in;
-
-	switch (old->wFormatTag){
-		case WAVE_FORMAT_EXTENSIBLE:{
-
-			PRINT(("wFormatTag=WAVE_FORMAT_EXTENSIBLE\n"));
-
-			if (in->SubFormat == KSDATAFORMAT_SUBTYPE_IEEE_FLOAT){
-				PRINT(("SubFormat=KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\n"));
-			}
-			else if (in->SubFormat == KSDATAFORMAT_SUBTYPE_PCM){
-				PRINT(("SubFormat=KSDATAFORMAT_SUBTYPE_PCM\n"));
-			}
-			else{
-				PRINT(("SubFormat=CUSTOM GUID{%d:%d:%d:%d%d%d%d%d%d%d%d}\n",	
-											in->SubFormat.Data1,
-											in->SubFormat.Data2,
-											in->SubFormat.Data3,
-											(int)in->SubFormat.Data4[0],
-											(int)in->SubFormat.Data4[1],
-											(int)in->SubFormat.Data4[2],
-											(int)in->SubFormat.Data4[3],
-											(int)in->SubFormat.Data4[4],
-											(int)in->SubFormat.Data4[5],
-											(int)in->SubFormat.Data4[6],
-											(int)in->SubFormat.Data4[7]));
-			}
-			PRINT(("Samples.wValidBitsPerSample=%d\n",  in->Samples.wValidBitsPerSample));
-			PRINT(("dwChannelMask=0x%X\n",in->dwChannelMask));
-		}break;
-		
-		case WAVE_FORMAT_PCM:        PRINT(("wFormatTag=WAVE_FORMAT_PCM\n")); break;
-		case WAVE_FORMAT_IEEE_FLOAT: PRINT(("wFormatTag=WAVE_FORMAT_IEEE_FLOAT\n")); break;
-		default : PRINT(("wFormatTag=UNKNOWN(%d)\n",old->wFormatTag)); break;
-	}
-
-	PRINT(("nChannels      =%d\n",old->nChannels)); 
-	PRINT(("nSamplesPerSec =%d\n",old->nSamplesPerSec));  
-	PRINT(("nAvgBytesPerSec=%d\n",old->nAvgBytesPerSec));  
-	PRINT(("nBlockAlign    =%d\n",old->nBlockAlign));  
-	PRINT(("wBitsPerSample =%d\n",old->wBitsPerSample));  
-	PRINT(("cbSize         =%d\n",old->cbSize));  
+LogWAVEFORMATEXTENSIBLE (const WAVEFORMATEXTENSIBLE *in)
+{
+
+    const WAVEFORMATEX *old = (WAVEFORMATEX *) in;
+
+    switch (old->wFormatTag) {
+        case WAVE_FORMAT_EXTENSIBLE: {
+
+            PRINT ( ("wFormatTag=WAVE_FORMAT_EXTENSIBLE\n"));
+
+            if (in->SubFormat == KSDATAFORMAT_SUBTYPE_IEEE_FLOAT) {
+                PRINT ( ("SubFormat=KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\n"));
+            } else if (in->SubFormat == KSDATAFORMAT_SUBTYPE_PCM) {
+                PRINT ( ("SubFormat=KSDATAFORMAT_SUBTYPE_PCM\n"));
+            } else {
+                PRINT ( ("SubFormat=CUSTOM GUID{%d:%d:%d:%d%d%d%d%d%d%d%d}\n",
+                         in->SubFormat.Data1,
+                         in->SubFormat.Data2,
+                         in->SubFormat.Data3,
+                         (int) in->SubFormat.Data4[0],
+                         (int) in->SubFormat.Data4[1],
+                         (int) in->SubFormat.Data4[2],
+                         (int) in->SubFormat.Data4[3],
+                         (int) in->SubFormat.Data4[4],
+                         (int) in->SubFormat.Data4[5],
+                         (int) in->SubFormat.Data4[6],
+                         (int) in->SubFormat.Data4[7]));
+            }
+
+            PRINT ( ("Samples.wValidBitsPerSample=%d\n",  in->Samples.wValidBitsPerSample));
+            PRINT ( ("dwChannelMask=0x%X\n",in->dwChannelMask));
+        }
+        break;
+
+        case WAVE_FORMAT_PCM:
+            PRINT ( ("wFormatTag=WAVE_FORMAT_PCM\n"));
+            break;
+        case WAVE_FORMAT_IEEE_FLOAT:
+            PRINT ( ("wFormatTag=WAVE_FORMAT_IEEE_FLOAT\n"));
+            break;
+        default :
+            PRINT ( ("wFormatTag=UNKNOWN(%d)\n",old->wFormatTag));
+            break;
+    }
+
+    PRINT ( ("nChannels      =%d\n",old->nChannels));
+    PRINT ( ("nSamplesPerSec =%d\n",old->nSamplesPerSec));
+    PRINT ( ("nAvgBytesPerSec=%d\n",old->nAvgBytesPerSec));
+    PRINT ( ("nBlockAlign    =%d\n",old->nBlockAlign));
+    PRINT ( ("wBitsPerSample =%d\n",old->wBitsPerSample));
+    PRINT ( ("cbSize         =%d\n",old->cbSize));
 }
 
 
@@ -760,53 +830,70 @@ LogWAVEFORMATEXTENSIBLE(const WAVEFORMATEXTENSIBLE *in){
  WAVEFORMATXXX is always interleaved
  */
 static PaSampleFormat
-waveformatToPaFormat(const WAVEFORMATEXTENSIBLE *in){
+waveformatToPaFormat (const WAVEFORMATEXTENSIBLE *in)
+{
 
-    const WAVEFORMATEX *old = (WAVEFORMATEX*)in;
+    const WAVEFORMATEX *old = (WAVEFORMATEX*) in;
 
-    switch (old->wFormatTag){
+    switch (old->wFormatTag) {
 
-        case WAVE_FORMAT_EXTENSIBLE:
-        {
-            if (in->SubFormat == KSDATAFORMAT_SUBTYPE_IEEE_FLOAT){
+        case WAVE_FORMAT_EXTENSIBLE: {
+            if (in->SubFormat == KSDATAFORMAT_SUBTYPE_IEEE_FLOAT) {
                 if (in->Samples.wValidBitsPerSample == 32)
                     return paFloat32;
                 else
                     return paCustomFormat;
-            }
-            else if (in->SubFormat == KSDATAFORMAT_SUBTYPE_PCM){
-                switch (old->wBitsPerSample){
-                    case 32: return paInt32; break;
-                    case 24: return paInt24;break;
-                    case  8: return paUInt8;break;
-                    case 16: return paInt16;break;
-                    default: return paCustomFormat;break;
+            } else if (in->SubFormat == KSDATAFORMAT_SUBTYPE_PCM) {
+                switch (old->wBitsPerSample) {
+                    case 32:
+                        return paInt32;
+                        break;
+                    case 24:
+                        return paInt24;
+                        break;
+                    case  8:
+                        return paUInt8;
+                        break;
+                    case 16:
+                        return paInt16;
+                        break;
+                    default:
+                        return paCustomFormat;
+                        break;
                 }
-            }
-            else
+            } else
                 return paCustomFormat;
         }
         break;
 
         case WAVE_FORMAT_IEEE_FLOAT:
             return paFloat32;
-        break;
-
-        case WAVE_FORMAT_PCM:
-        {
-            switch (old->wBitsPerSample){
-                case 32: return paInt32; break;
-                case 24: return paInt24;break;
-                case  8: return paUInt8;break;
-                case 16: return paInt16;break;
-                default: return paCustomFormat;break;
+            break;
+
+        case WAVE_FORMAT_PCM: {
+            switch (old->wBitsPerSample) {
+                case 32:
+                    return paInt32;
+                    break;
+                case 24:
+                    return paInt24;
+                    break;
+                case  8:
+                    return paUInt8;
+                    break;
+                case 16:
+                    return paInt16;
+                    break;
+                default:
+                    return paCustomFormat;
+                    break;
             }
         }
         break;
 
         default:
             return paCustomFormat;
-        break;
+            break;
     }
 
     return paCustomFormat;
@@ -815,56 +902,80 @@ waveformatToPaFormat(const WAVEFORMATEXTENSIBLE *in){
 
 
 static PaError
-waveformatFromParams(WAVEFORMATEXTENSIBLE*wavex,
-                          const PaStreamParameters * params,
-                          double sampleRate){
+waveformatFromParams (WAVEFORMATEXTENSIBLE*wavex,
+                      const PaStreamParameters * params,
+                      double sampleRate)
+{
 
     size_t bytesPerSample = 0;
-    switch( params->sampleFormat & ~paNonInterleaved ){
+
+    switch (params->sampleFormat & ~paNonInterleaved) {
         case paFloat32:
-        case paInt32: bytesPerSample=4;break;
-        case paInt16: bytesPerSample=2;break;
-        case paInt24: bytesPerSample=3;break;
+        case paInt32:
+            bytesPerSample=4;
+            break;
+        case paInt16:
+            bytesPerSample=2;
+            break;
+        case paInt24:
+            bytesPerSample=3;
+            break;
         case paInt8:
-        case paUInt8: bytesPerSample=1;break;
+        case paUInt8:
+            bytesPerSample=1;
+            break;
         case paCustomFormat:
-        default: return paSampleFormatNotSupported;break;
+        default:
+            return paSampleFormatNotSupported;
+            break;
     }
 
-    memset(wavex,0,sizeof(WAVEFORMATEXTENSIBLE));
+    memset (wavex,0,sizeof (WAVEFORMATEXTENSIBLE));
 
-    WAVEFORMATEX *old    = (WAVEFORMATEX *)wavex;
-    old->nChannels       = (WORD)params->channelCount;
-    old->nSamplesPerSec  = (DWORD)sampleRate;
-    old->wBitsPerSample  = (WORD)(bytesPerSample*8);
-    old->nAvgBytesPerSec = (DWORD)(old->nSamplesPerSec * old->nChannels * bytesPerSample);
-    old->nBlockAlign     = (WORD)(old->nChannels * bytesPerSample);
+    WAVEFORMATEX *old    = (WAVEFORMATEX *) wavex;
+    old->nChannels       = (WORD) params->channelCount;
+    old->nSamplesPerSec  = (DWORD) sampleRate;
+    old->wBitsPerSample  = (WORD) (bytesPerSample*8);
+    old->nAvgBytesPerSec = (DWORD) (old->nSamplesPerSec * old->nChannels * bytesPerSample);
+    old->nBlockAlign     = (WORD) (old->nChannels * bytesPerSample);
 
     //WAVEFORMATEX
-    if (params->channelCount <=2 && (bytesPerSample == 2 || bytesPerSample == 1)){
+    if (params->channelCount <=2 && (bytesPerSample == 2 || bytesPerSample == 1)) {
         old->cbSize          = 0;
         old->wFormatTag      = WAVE_FORMAT_PCM;
     }
     //WAVEFORMATEXTENSIBLE
-    else{
+    else {
         old->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
 
         old->cbSize = sizeof (WAVEFORMATEXTENSIBLE) - sizeof (WAVEFORMATEX);
 
-        if ((params->sampleFormat & ~paNonInterleaved) == paFloat32)
+        if ( (params->sampleFormat & ~paNonInterleaved) == paFloat32)
             wavex->SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
         else
             wavex->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
 
         wavex->Samples.wValidBitsPerSample = old->wBitsPerSample; //no extra padding!
 
-        switch(params->channelCount){
-            case 1:  wavex->dwChannelMask = SPEAKER_FRONT_CENTER; break;
-            case 2:  wavex->dwChannelMask = 0x1 | 0x2; break;
-            case 4:  wavex->dwChannelMask = 0x1 | 0x2 | 0x10 | 0x20; break;
-            case 6:  wavex->dwChannelMask = 0x1 | 0x2 | 0x4 | 0x8 | 0x10 | 0x20; break;
-            case 8:  wavex->dwChannelMask = 0x1 | 0x2 | 0x4 | 0x8 | 0x10 | 0x20 | 0x40 | 0x80; break;
-            default: wavex->dwChannelMask = 0; break;
+        switch (params->channelCount) {
+            case 1:
+                wavex->dwChannelMask = SPEAKER_FRONT_CENTER;
+                break;
+            case 2:
+                wavex->dwChannelMask = 0x1 | 0x2;
+                break;
+            case 4:
+                wavex->dwChannelMask = 0x1 | 0x2 | 0x10 | 0x20;
+                break;
+            case 6:
+                wavex->dwChannelMask = 0x1 | 0x2 | 0x4 | 0x8 | 0x10 | 0x20;
+                break;
+            case 8:
+                wavex->dwChannelMask = 0x1 | 0x2 | 0x4 | 0x8 | 0x10 | 0x20 | 0x40 | 0x80;
+                break;
+            default:
+                wavex->dwChannelMask = 0;
+                break;
         }
     }
 
@@ -883,51 +994,47 @@ waveformatFromParams(WAVEFORMATEXTENSIBLE*wavex,
 #define paInt16          ((PaSampleFormat) 0x00000008) 
 */
 //lifted from pa_wdmks
-static void wasapiFillWFEXT( WAVEFORMATEXTENSIBLE* pwfext, PaSampleFormat sampleFormat, double sampleRate, int channelCount)
+static void wasapiFillWFEXT (WAVEFORMATEXTENSIBLE* pwfext, PaSampleFormat sampleFormat, double sampleRate, int channelCount)
 {
-    PA_DEBUG(( "sampleFormat = %lx\n" , sampleFormat ));
-    PA_DEBUG(( "sampleRate = %f\n" , sampleRate ));
-    PA_DEBUG(( "chanelCount = %d\n", channelCount ));
+    PA_DEBUG ( ("sampleFormat = %lx\n" , sampleFormat));
+    PA_DEBUG ( ("sampleRate = %f\n" , sampleRate));
+    PA_DEBUG ( ("chanelCount = %d\n", channelCount));
 
     pwfext->Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
     pwfext->Format.nChannels = channelCount;
-    pwfext->Format.nSamplesPerSec = (int)sampleRate;
-    if(channelCount == 1)
+    pwfext->Format.nSamplesPerSec = (int) sampleRate;
+
+    if (channelCount == 1)
         pwfext->dwChannelMask = KSAUDIO_SPEAKER_DIRECTOUT;
     else
         pwfext->dwChannelMask = KSAUDIO_SPEAKER_STEREO;
-    if(sampleFormat == paFloat32)
-    {
+
+    if (sampleFormat == paFloat32) {
         pwfext->Format.nBlockAlign = channelCount * 4;
         pwfext->Format.wBitsPerSample = 32;
-        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+        pwfext->Format.cbSize = sizeof (WAVEFORMATEXTENSIBLE)-sizeof (WAVEFORMATEX);
         pwfext->Samples.wValidBitsPerSample = 32;
         pwfext->SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
-    }
-    else if(sampleFormat == paInt32)
-    {
+    } else if (sampleFormat == paInt32) {
         pwfext->Format.nBlockAlign = channelCount * 4;
         pwfext->Format.wBitsPerSample = 32;
-        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+        pwfext->Format.cbSize = sizeof (WAVEFORMATEXTENSIBLE)-sizeof (WAVEFORMATEX);
         pwfext->Samples.wValidBitsPerSample = 32;
         pwfext->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
-    }
-    else if(sampleFormat == paInt24)
-    {
+    } else if (sampleFormat == paInt24) {
         pwfext->Format.nBlockAlign = channelCount * 3;
         pwfext->Format.wBitsPerSample = 24;
-        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+        pwfext->Format.cbSize = sizeof (WAVEFORMATEXTENSIBLE)-sizeof (WAVEFORMATEX);
         pwfext->Samples.wValidBitsPerSample = 24;
         pwfext->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
-    }
-    else if(sampleFormat == paInt16)
-    {
+    } else if (sampleFormat == paInt16) {
         pwfext->Format.nBlockAlign = channelCount * 2;
         pwfext->Format.wBitsPerSample = 16;
-        pwfext->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX);
+        pwfext->Format.cbSize = sizeof (WAVEFORMATEXTENSIBLE)-sizeof (WAVEFORMATEX);
         pwfext->Samples.wValidBitsPerSample = 16;
         pwfext->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
     }
+
     pwfext->Format.nAvgBytesPerSec = pwfext->Format.nSamplesPerSec * pwfext->Format.nBlockAlign;
 }
 
@@ -943,198 +1050,195 @@ const int BestToWorst[FORMATTESTS]={paFloat32,paInt24,paInt16};
 
 
 static PaError
-GetClosestFormat(IAudioClient * myClient, double sampleRate,const  PaStreamParameters * params, 
-				 AUDCLNT_SHAREMODE *shareMode, WAVEFORMATEXTENSIBLE *outWavex)
+GetClosestFormat (IAudioClient * myClient, double sampleRate,const  PaStreamParameters * params,
+                  AUDCLNT_SHAREMODE *shareMode, WAVEFORMATEXTENSIBLE *outWavex)
 {
-	//TODO we should try exclusive first and shared after
-	*shareMode = PORTAUDIO_SHAREMODE;
-
-	PaError answer = paInvalidSampleRate;
-
-    waveformatFromParams(outWavex,params,sampleRate);
-	WAVEFORMATEX *sharedClosestMatch=0;
-	HRESULT hResult=!S_OK;
-
-	if (*shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
-		hResult = myClient->IsFormatSupported(AUDCLNT_SHAREMODE_EXCLUSIVE,&outWavex->Format,NULL);
-	else
-		hResult = myClient->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED,   &outWavex->Format,&sharedClosestMatch);
-
-	if (hResult == S_OK)
-		answer = paFormatIsSupported;
-    else if (sharedClosestMatch){
-        WAVEFORMATEXTENSIBLE* ext = (WAVEFORMATEXTENSIBLE*)sharedClosestMatch;
-		
-		int closestMatchSR = (int)sharedClosestMatch->nSamplesPerSec;
-
-		if (sharedClosestMatch->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
-			memcpy(outWavex,sharedClosestMatch,sizeof(WAVEFORMATEXTENSIBLE));
-		else
-			memcpy(outWavex,sharedClosestMatch,sizeof(WAVEFORMATEX));
-
-        CoTaskMemFree(sharedClosestMatch);
-
-		if ((int)sampleRate == closestMatchSR)
-		answer = paFormatIsSupported;
-		else
-			answer = paInvalidSampleRate;
-	
-	}else {
-
-		//it doesnt suggest anything?? ok lets show it the MENU!
-
-		//ok fun time as with pa_win_mme, we know only a refusal of the user-requested
-		//sampleRate+num Channel is disastrous, as the portaudio buffer processor converts between anything
-		//so lets only use the number 
-		for (int i=0;i<FORMATTESTS;++i){
-			WAVEFORMATEXTENSIBLE ext;
-			wasapiFillWFEXT(&ext,BestToWorst[i],sampleRate,params->channelCount);		
-			if (*shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
-				hResult = myClient->IsFormatSupported(AUDCLNT_SHAREMODE_EXCLUSIVE,&ext.Format,NULL);
-			else
-				hResult = myClient->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED,   &ext.Format,&sharedClosestMatch);
-
-			if (hResult == S_OK){
-				memcpy(outWavex,&ext,sizeof(WAVEFORMATEXTENSIBLE));
-				answer = paFormatIsSupported;
-				break;
-			}
-		}
-
-		if (answer!=paFormatIsSupported) {
-			//try MIX format?
-			//why did it HAVE to come to this ....
-			WAVEFORMATEX pcm16WaveFormat;
-			memset(&pcm16WaveFormat,0,sizeof(WAVEFORMATEX));
-			pcm16WaveFormat.wFormatTag = WAVE_FORMAT_PCM; 
-			pcm16WaveFormat.nChannels = 2; 
-			pcm16WaveFormat.nSamplesPerSec = (DWORD)sampleRate; 
-			pcm16WaveFormat.nBlockAlign = 4; 
-			pcm16WaveFormat.nAvgBytesPerSec = pcm16WaveFormat.nSamplesPerSec*pcm16WaveFormat.nBlockAlign; 
-			pcm16WaveFormat.wBitsPerSample = 16; 
-			pcm16WaveFormat.cbSize = 0;
-
-			if (*shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
-				hResult = myClient->IsFormatSupported(AUDCLNT_SHAREMODE_EXCLUSIVE,&pcm16WaveFormat,NULL);
-			else
-				hResult = myClient->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED,   &pcm16WaveFormat,&sharedClosestMatch);
-
-			if (hResult == S_OK){
-				memcpy(outWavex,&pcm16WaveFormat,sizeof(WAVEFORMATEX));
-				answer = paFormatIsSupported;
-			}
-		}
-
-		logAUDCLNT_E(hResult);
-	}
-
-	return answer;
+    //TODO we should try exclusive first and shared after
+    *shareMode = PORTAUDIO_SHAREMODE;
+
+    PaError answer = paInvalidSampleRate;
+
+    waveformatFromParams (outWavex,params,sampleRate);
+    WAVEFORMATEX *sharedClosestMatch=0;
+    HRESULT hResult=!S_OK;
+
+    if (*shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
+        hResult = myClient->IsFormatSupported (AUDCLNT_SHAREMODE_EXCLUSIVE,&outWavex->Format,NULL);
+    else
+        hResult = myClient->IsFormatSupported (AUDCLNT_SHAREMODE_SHARED,   &outWavex->Format,&sharedClosestMatch);
+
+    if (hResult == S_OK)
+        answer = paFormatIsSupported;
+    else if (sharedClosestMatch) {
+        WAVEFORMATEXTENSIBLE* ext = (WAVEFORMATEXTENSIBLE*) sharedClosestMatch;
+
+        int closestMatchSR = (int) sharedClosestMatch->nSamplesPerSec;
+
+        if (sharedClosestMatch->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
+            memcpy (outWavex,sharedClosestMatch,sizeof (WAVEFORMATEXTENSIBLE));
+        else
+            memcpy (outWavex,sharedClosestMatch,sizeof (WAVEFORMATEX));
+
+        CoTaskMemFree (sharedClosestMatch);
+
+        if ( (int) sampleRate == closestMatchSR)
+            answer = paFormatIsSupported;
+        else
+            answer = paInvalidSampleRate;
+
+    } else {
+
+        //it doesnt suggest anything?? ok lets show it the MENU!
+
+        //ok fun time as with pa_win_mme, we know only a refusal of the user-requested
+        //sampleRate+num Channel is disastrous, as the portaudio buffer processor converts between anything
+        //so lets only use the number
+        for (int i=0; i<FORMATTESTS; ++i) {
+            WAVEFORMATEXTENSIBLE ext;
+            wasapiFillWFEXT (&ext,BestToWorst[i],sampleRate,params->channelCount);
+
+            if (*shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
+                hResult = myClient->IsFormatSupported (AUDCLNT_SHAREMODE_EXCLUSIVE,&ext.Format,NULL);
+            else
+                hResult = myClient->IsFormatSupported (AUDCLNT_SHAREMODE_SHARED,   &ext.Format,&sharedClosestMatch);
+
+            if (hResult == S_OK) {
+                memcpy (outWavex,&ext,sizeof (WAVEFORMATEXTENSIBLE));
+                answer = paFormatIsSupported;
+                break;
+            }
+        }
+
+        if (answer!=paFormatIsSupported) {
+            //try MIX format?
+            //why did it HAVE to come to this ....
+            WAVEFORMATEX pcm16WaveFormat;
+            memset (&pcm16WaveFormat,0,sizeof (WAVEFORMATEX));
+            pcm16WaveFormat.wFormatTag = WAVE_FORMAT_PCM;
+            pcm16WaveFormat.nChannels = 2;
+            pcm16WaveFormat.nSamplesPerSec = (DWORD) sampleRate;
+            pcm16WaveFormat.nBlockAlign = 4;
+            pcm16WaveFormat.nAvgBytesPerSec = pcm16WaveFormat.nSamplesPerSec*pcm16WaveFormat.nBlockAlign;
+            pcm16WaveFormat.wBitsPerSample = 16;
+            pcm16WaveFormat.cbSize = 0;
+
+            if (*shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE)
+                hResult = myClient->IsFormatSupported (AUDCLNT_SHAREMODE_EXCLUSIVE,&pcm16WaveFormat,NULL);
+            else
+                hResult = myClient->IsFormatSupported (AUDCLNT_SHAREMODE_SHARED,   &pcm16WaveFormat,&sharedClosestMatch);
+
+            if (hResult == S_OK) {
+                memcpy (outWavex,&pcm16WaveFormat,sizeof (WAVEFORMATEX));
+                answer = paFormatIsSupported;
+            }
+        }
+
+        logAUDCLNT_E (hResult);
+    }
+
+    return answer;
 }
 
 
-static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+static PaError IsFormatSupported (struct PaUtilHostApiRepresentation *hostApi,
                                   const  PaStreamParameters *inputParameters,
                                   const  PaStreamParameters *outputParameters,
-                                  double sampleRate )
+                                  double sampleRate)
 {
 
     int inputChannelCount, outputChannelCount;
     PaSampleFormat inputSampleFormat, outputSampleFormat;
 
-    if( inputParameters )
-    {
+    if (inputParameters) {
         inputChannelCount = inputParameters->channelCount;
         inputSampleFormat = inputParameters->sampleFormat;
 
         /* all standard sample formats are supported by the buffer adapter,
             this implementation doesn't support any custom sample formats */
-        if( inputSampleFormat & paCustomFormat )
+        if (inputSampleFormat & paCustomFormat)
             return paSampleFormatNotSupported;
 
         /* unless alternate device specification is supported, reject the use of
             paUseHostApiSpecificDeviceSpecification */
 
-        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+        if (inputParameters->device == paUseHostApiSpecificDeviceSpecification)
             return paInvalidDevice;
 
         /* check that input device can support inputChannelCount */
-        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )
+        if (inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels)
             return paInvalidChannelCount;
 
         /* validate inputStreamInfo */
-        if( inputParameters->hostApiSpecificStreamInfo )
+        if (inputParameters->hostApiSpecificStreamInfo)
             return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
 
 
-        PaWinWasapiHostApiRepresentation *paWasapi = (PaWinWasapiHostApiRepresentation*)hostApi;
+        PaWinWasapiHostApiRepresentation *paWasapi = (PaWinWasapiHostApiRepresentation*) hostApi;
+
 
+        IAudioClient *myClient=0;
+        HRESULT hResult = paWasapi->devInfo[inputParameters->device].device->Activate (
+                              __uuidof (IAudioClient), CLSCTX_INPROC_SERVER, NULL, (void**) &myClient);
 
-		IAudioClient *myClient=0;
-		HRESULT hResult = paWasapi->devInfo[inputParameters->device].device->Activate(
-			__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL, (void**)&myClient);
-		if (hResult != S_OK){
-			logAUDCLNT_E(hResult);
-			return paInvalidDevice;
-		}
+        if (hResult != S_OK) {
+            logAUDCLNT_E (hResult);
+            return paInvalidDevice;
+        }
 
         WAVEFORMATEXTENSIBLE wavex;
-		AUDCLNT_SHAREMODE shareMode;
-		PaError answer = GetClosestFormat(myClient,sampleRate,inputParameters,&shareMode,&wavex);
-		myClient->Release();
+        AUDCLNT_SHAREMODE shareMode;
+        PaError answer = GetClosestFormat (myClient,sampleRate,inputParameters,&shareMode,&wavex);
+        myClient->Release();
 
-		if (answer !=paFormatIsSupported)
-			return answer;
-    }
-    else
-    {
+        if (answer !=paFormatIsSupported)
+            return answer;
+    } else {
         inputChannelCount = 0;
     }
 
-    if( outputParameters )
-    {
+    if (outputParameters) {
         outputChannelCount = outputParameters->channelCount;
         outputSampleFormat = outputParameters->sampleFormat;
 
         /* all standard sample formats are supported by the buffer adapter,
             this implementation doesn't support any custom sample formats */
-        if( outputSampleFormat & paCustomFormat )
+        if (outputSampleFormat & paCustomFormat)
             return paSampleFormatNotSupported;
 
         /* unless alternate device specification is supported, reject the use of
             paUseHostApiSpecificDeviceSpecification */
 
-        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+        if (outputParameters->device == paUseHostApiSpecificDeviceSpecification)
             return paInvalidDevice;
 
         /* check that output device can support outputChannelCount */
-        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )
+        if (outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels)
             return paInvalidChannelCount;
 
         /* validate outputStreamInfo */
-        if( outputParameters->hostApiSpecificStreamInfo )
+        if (outputParameters->hostApiSpecificStreamInfo)
             return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
 
 
-        PaWinWasapiHostApiRepresentation *paWasapi = (PaWinWasapiHostApiRepresentation*)hostApi;
+        PaWinWasapiHostApiRepresentation *paWasapi = (PaWinWasapiHostApiRepresentation*) hostApi;
+
+        IAudioClient *myClient=0;
+        HRESULT hResult = paWasapi->devInfo[outputParameters->device].device->Activate (
+                              __uuidof (IAudioClient), CLSCTX_INPROC_SERVER, NULL, (void**) &myClient);
 
-		IAudioClient *myClient=0;
-		HRESULT hResult = paWasapi->devInfo[outputParameters->device].device->Activate(
-			__uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL, (void**)&myClient);
-		if (hResult != S_OK){
-			logAUDCLNT_E(hResult);
-			return paInvalidDevice;
-		}
+        if (hResult != S_OK) {
+            logAUDCLNT_E (hResult);
+            return paInvalidDevice;
+        }
 
         WAVEFORMATEXTENSIBLE wavex;
-		AUDCLNT_SHAREMODE shareMode;
-		PaError answer = GetClosestFormat(myClient,sampleRate,outputParameters,&shareMode,&wavex);
-		myClient->Release();
+        AUDCLNT_SHAREMODE shareMode;
+        PaError answer = GetClosestFormat (myClient,sampleRate,outputParameters,&shareMode,&wavex);
+        myClient->Release();
 
-		if (answer !=paFormatIsSupported)
-			return answer;		
-    }
-    else
-    {
+        if (answer !=paFormatIsSupported)
+            return answer;
+    } else {
         outputChannelCount = 0;
     }
 
@@ -1146,7 +1250,7 @@ static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
 
 /* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */
 
-static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+static PaError OpenStream (struct PaUtilHostApiRepresentation *hostApi,
                            PaStream** s,
                            const PaStreamParameters *inputParameters,
                            const PaStreamParameters *outputParameters,
@@ -1154,200 +1258,199 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
                            unsigned long framesPerBuffer,
                            PaStreamFlags streamFlags,
                            PaStreamCallback *streamCallback,
-                           void *userData )
+                           void *userData)
 {
     PaError result = paNoError;
-    PaWinWasapiHostApiRepresentation *paWasapi = (PaWinWasapiHostApiRepresentation*)hostApi;
+    PaWinWasapiHostApiRepresentation *paWasapi = (PaWinWasapiHostApiRepresentation*) hostApi;
     PaWinWasapiStream *stream = 0;
     int inputChannelCount, outputChannelCount;
     PaSampleFormat inputSampleFormat, outputSampleFormat;
     PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;
 
 
-    stream = (PaWinWasapiStream*)PaUtil_AllocateMemory( sizeof(PaWinWasapiStream) );
-    if( !stream ){
+    stream = (PaWinWasapiStream*) PaUtil_AllocateMemory (sizeof (PaWinWasapiStream));
+
+    if (!stream) {
         result = paInsufficientMemory;
         goto error;
     }
 
-    if( inputParameters )
-    {
+    if (inputParameters) {
         inputChannelCount = inputParameters->channelCount;
         inputSampleFormat = inputParameters->sampleFormat;
 
         /* unless alternate device specification is supported, reject the use of
             paUseHostApiSpecificDeviceSpecification */
 
-        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+        if (inputParameters->device == paUseHostApiSpecificDeviceSpecification)
             return paInvalidDevice;
 
         /* check that input device can support inputChannelCount */
-        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )
+        if (inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels)
             return paInvalidChannelCount;
 
         /* validate inputStreamInfo */
-        if( inputParameters->hostApiSpecificStreamInfo )
+        if (inputParameters->hostApiSpecificStreamInfo)
             return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
 
 
         PaWinWasapiDeviceInfo &info = paWasapi->devInfo[inputParameters->device];
 
-        HRESULT hResult = info.device->Activate(
-            __uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL,
-            (void**)&stream->in.client);
+        HRESULT hResult = info.device->Activate (
+                              __uuidof (IAudioClient), CLSCTX_INPROC_SERVER, NULL,
+                              (void**) &stream->in.client);
 
         if (hResult != S_OK)
             return paInvalidDevice;
 
-        hResult = info.device->Activate(
-            __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
-            (void**)&stream->inVol);
+        hResult = info.device->Activate (
+                      __uuidof (IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
+                      (void**) &stream->inVol);
 
         if (hResult != S_OK)
             return paInvalidDevice;
-	
-		AUDCLNT_SHAREMODE shareMode;
-		PaError answer = GetClosestFormat(stream->in.client,sampleRate,inputParameters,&shareMode,&stream->in.wavex);
-		
-		if (answer !=paFormatIsSupported)
-			return answer;
+
+        AUDCLNT_SHAREMODE shareMode;
+        PaError answer = GetClosestFormat (stream->in.client,sampleRate,inputParameters,&shareMode,&stream->in.wavex);
+
+        if (answer !=paFormatIsSupported)
+            return answer;
 
         //stream->out.period = info.DefaultDevicePeriod;
         stream->in.period = info.MinimumDevicePeriod;
 
-        hResult = stream->in.client->Initialize(
-            shareMode,
-            0,  //no flags
-            stream->in.period,
-            0,//stream->out.period,
-            (WAVEFORMATEX*)&stream->in.wavex,
-            &stream->session
-            );
-
-        if (hResult != S_OK){
-            logAUDCLNT_E(hResult);
+        hResult = stream->in.client->Initialize (
+                      shareMode,
+                      0,  //no flags
+                      stream->in.period,
+                      0,//stream->out.period,
+                      (WAVEFORMATEX*) &stream->in.wavex,
+                      &stream->session
+                  );
+
+        if (hResult != S_OK) {
+            logAUDCLNT_E (hResult);
             return paInvalidDevice;
         }
 
-        hResult = stream->in.client->GetBufferSize(&stream->in.bufferSize);
+        hResult = stream->in.client->GetBufferSize (&stream->in.bufferSize);
+
         if (hResult != S_OK)
             return paInvalidDevice;
 
-        hResult = stream->in.client->GetStreamLatency(&stream->in.latency);
+        hResult = stream->in.client->GetStreamLatency (&stream->in.latency);
+
         if (hResult != S_OK)
             return paInvalidDevice;
 
-        double periodsPerSecond = 1.0/nano100ToSeconds(stream->in.period);
-        double samplesPerPeriod = (double)(stream->in.wavex.Format.nSamplesPerSec)/periodsPerSecond;
+        double periodsPerSecond = 1.0/nano100ToSeconds (stream->in.period);
+        double samplesPerPeriod = (double) (stream->in.wavex.Format.nSamplesPerSec) /periodsPerSecond;
 
         //this is the number of samples that are required at each period
-        stream->in.framesPerHostCallback = (unsigned long)samplesPerPeriod;//unrelated to channels
+        stream->in.framesPerHostCallback = (unsigned long) samplesPerPeriod;//unrelated to channels
 
         /* IMPLEMENT ME - establish which  host formats are available */
         hostInputSampleFormat =
-            PaUtil_SelectClosestAvailableFormat( waveformatToPaFormat(&stream->in.wavex), inputSampleFormat );
-	}
-    else
-    {
+            PaUtil_SelectClosestAvailableFormat (waveformatToPaFormat (&stream->in.wavex), inputSampleFormat);
+    } else {
         inputChannelCount = 0;
         inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */
     }
 
-    if( outputParameters )
-    {
+    if (outputParameters) {
         outputChannelCount = outputParameters->channelCount;
         outputSampleFormat = outputParameters->sampleFormat;
 
         /* unless alternate device specification is supported, reject the use of
             paUseHostApiSpecificDeviceSpecification */
 
-        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+        if (outputParameters->device == paUseHostApiSpecificDeviceSpecification)
             return paInvalidDevice;
 
         /* check that output device can support inputChannelCount */
-        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )
+        if (outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels)
             return paInvalidChannelCount;
 
         /* validate outputStreamInfo */
-        if( outputParameters->hostApiSpecificStreamInfo )
+        if (outputParameters->hostApiSpecificStreamInfo)
             return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
 
 
         PaWinWasapiDeviceInfo &info = paWasapi->devInfo[outputParameters->device];
 
-        HRESULT hResult = info.device->Activate(
-            __uuidof(IAudioClient), CLSCTX_INPROC_SERVER, NULL,
-            (void**)&stream->out.client);
+        HRESULT hResult = info.device->Activate (
+                              __uuidof (IAudioClient), CLSCTX_INPROC_SERVER, NULL,
+                              (void**) &stream->out.client);
 
         if (hResult != S_OK)
             return paInvalidDevice;
 
-		AUDCLNT_SHAREMODE shareMode;
-		PaError answer = GetClosestFormat(stream->out.client,sampleRate,outputParameters,&shareMode,&stream->out.wavex);
-		
-		if (answer !=paFormatIsSupported)
-			return answer;
-		LogWAVEFORMATEXTENSIBLE(&stream->out.wavex);
+        AUDCLNT_SHAREMODE shareMode;
+        PaError answer = GetClosestFormat (stream->out.client,sampleRate,outputParameters,&shareMode,&stream->out.wavex);
+
+        if (answer !=paFormatIsSupported)
+            return answer;
 
-       // stream->out.period = info.DefaultDevicePeriod;
+        LogWAVEFORMATEXTENSIBLE (&stream->out.wavex);
+
+        // stream->out.period = info.DefaultDevicePeriod;
         stream->out.period = info.MinimumDevicePeriod;
 
-		/*For an exclusive-mode stream that uses event-driven buffering, 
-		the caller must specify nonzero values for hnsPeriodicity and hnsBufferDuration, 
-		and the values of these two parameters must be equal */
-		if (shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE){
-			hResult = stream->out.client->Initialize(
-				shareMode,
-				AUDCLNT_STREAMFLAGS_EVENTCALLBACK, 
-				stream->out.period,
-				stream->out.period,
-				(WAVEFORMATEX*)&stream->out.wavex,
-				&stream->session
-				);
-		}
-		else{
-			hResult = stream->out.client->Initialize(
-				shareMode,
-				AUDCLNT_STREAMFLAGS_EVENTCALLBACK, 
-				0,
-				0,
-				(WAVEFORMATEX*)&stream->out.wavex,
-				&stream->session
-				);
-		}
-	
-
-        if (hResult != S_OK){
-            logAUDCLNT_E(hResult);
+        /*For an exclusive-mode stream that uses event-driven buffering,
+        the caller must specify nonzero values for hnsPeriodicity and hnsBufferDuration,
+        and the values of these two parameters must be equal */
+        if (shareMode == AUDCLNT_SHAREMODE_EXCLUSIVE) {
+            hResult = stream->out.client->Initialize (
+                          shareMode,
+                          AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
+                          stream->out.period,
+                          stream->out.period,
+                          (WAVEFORMATEX*) &stream->out.wavex,
+                          &stream->session
+                      );
+        } else {
+            hResult = stream->out.client->Initialize (
+                          shareMode,
+                          AUDCLNT_STREAMFLAGS_EVENTCALLBACK,
+                          0,
+                          0,
+                          (WAVEFORMATEX*) &stream->out.wavex,
+                          &stream->session
+                      );
+        }
+
+
+        if (hResult != S_OK) {
+            logAUDCLNT_E (hResult);
             return paInvalidDevice;
         }
 
-        hResult = info.device->Activate(
-            __uuidof(IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
-            (void**)&stream->outVol);
+        hResult = info.device->Activate (
+                      __uuidof (IAudioEndpointVolume), CLSCTX_INPROC_SERVER, NULL,
+                      (void**) &stream->outVol);
 
         if (hResult != S_OK)
             return paInvalidDevice;
 
-        hResult = stream->out.client->GetBufferSize(&stream->out.bufferSize);
+        hResult = stream->out.client->GetBufferSize (&stream->out.bufferSize);
+
         if (hResult != S_OK)
             return paInvalidDevice;
 
-        hResult = stream->out.client->GetStreamLatency(&stream->out.latency);
+        hResult = stream->out.client->GetStreamLatency (&stream->out.latency);
+
         if (hResult != S_OK)
             return paInvalidDevice;
-		
-        double periodsPerSecond = 1.0/nano100ToSeconds(stream->out.period);
-        double samplesPerPeriod = (double)(stream->out.wavex.Format.nSamplesPerSec)/periodsPerSecond;
+
+        double periodsPerSecond = 1.0/nano100ToSeconds (stream->out.period);
+        double samplesPerPeriod = (double) (stream->out.wavex.Format.nSamplesPerSec) /periodsPerSecond;
 
         //this is the number of samples that are required at each period
         stream->out.framesPerHostCallback = stream->out.bufferSize; //(unsigned long)samplesPerPeriod;//unrelated to channels
 
         /* IMPLEMENT ME - establish which  host formats are available */
-        hostOutputSampleFormat = PaUtil_SelectClosestAvailableFormat( waveformatToPaFormat(&stream->out.wavex), outputSampleFormat );
-    }
-    else
-    {
+        hostOutputSampleFormat = PaUtil_SelectClosestAvailableFormat (waveformatToPaFormat (&stream->out.wavex), outputSampleFormat);
+    } else {
         outputChannelCount = 0;
         outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */
     }
@@ -1381,56 +1484,54 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
 
 
     /* validate platform specific flags */
-    if( (streamFlags & paPlatformSpecificFlags) != 0 )
+    if ( (streamFlags & paPlatformSpecificFlags) != 0)
         return paInvalidFlag; /* unexpected platform specific flag */
 
 
 
-    if( streamCallback )
-    {
-        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
-                                               &paWasapi->callbackStreamInterface, streamCallback, userData );
-    }
-    else
-    {
-        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
-                                               &paWasapi->blockingStreamInterface, streamCallback, userData );
+    if (streamCallback) {
+        PaUtil_InitializeStreamRepresentation (&stream->streamRepresentation,
+                                               &paWasapi->callbackStreamInterface, streamCallback, userData);
+    } else {
+        PaUtil_InitializeStreamRepresentation (&stream->streamRepresentation,
+                                               &paWasapi->blockingStreamInterface, streamCallback, userData);
     }
 
-    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );
+    PaUtil_InitializeCpuLoadMeasurer (&stream->cpuLoadMeasurer, sampleRate);
 
 
-	if (outputParameters && inputParameters){
+    if (outputParameters && inputParameters) {
 
-		//serious problem #1
-		if (stream->in.period != stream->out.period){
-			PRINT(("OpenStream: period discrepancy\n"));
-			goto error;
-		}
+        //serious problem #1
+        if (stream->in.period != stream->out.period) {
+            PRINT ( ("OpenStream: period discrepancy\n"));
+            goto error;
+        }
 
-		//serious problem #2
-		if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback){
-			PRINT(("OpenStream: framesPerHostCallback discrepancy\n"));
-			goto error;
-		}
-	}
+        //serious problem #2
+        if (stream->out.framesPerHostCallback != stream->in.framesPerHostCallback) {
+            PRINT ( ("OpenStream: framesPerHostCallback discrepancy\n"));
+            goto error;
+        }
+    }
 
-	unsigned long framesPerHostCallback = (outputParameters)?
-		stream->out.framesPerHostCallback: 
-		stream->in.framesPerHostCallback;
+    unsigned long framesPerHostCallback = (outputParameters) ?
+                                          stream->out.framesPerHostCallback:
+                                          stream->in.framesPerHostCallback;
 
     /* we assume a fixed host buffer size in this example, but the buffer processor
         can also support bounded and unknown host buffer sizes by passing
         paUtilBoundedHostBufferSize or paUtilUnknownHostBufferSize instead of
         paUtilFixedHostBufferSize below. */
 
-    result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
+    result =  PaUtil_InitializeBufferProcessor (&stream->bufferProcessor,
               inputChannelCount, inputSampleFormat, hostInputSampleFormat,
               outputChannelCount, outputSampleFormat, hostOutputSampleFormat,
               sampleRate, streamFlags, framesPerBuffer,
               framesPerHostCallback, paUtilFixedHostBufferSize,
-              streamCallback, userData );
-    if( result != paNoError )
+              streamCallback, userData);
+
+    if (result != paNoError)
         goto error;
 
 
@@ -1439,24 +1540,25 @@ static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
         values.
     */
     stream->streamRepresentation.streamInfo.inputLatency =
-            PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)
-			+ ((inputParameters)?nano100ToSeconds(stream->in.latency) :0);
+        PaUtil_GetBufferProcessorInputLatency (&stream->bufferProcessor)
+        + ( (inputParameters) ?nano100ToSeconds (stream->in.latency) :0);
 
     stream->streamRepresentation.streamInfo.outputLatency =
-            PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)
-			+ ((outputParameters)?nano100ToSeconds(stream->out.latency) :0);
+        PaUtil_GetBufferProcessorOutputLatency (&stream->bufferProcessor)
+        + ( (outputParameters) ?nano100ToSeconds (stream->out.latency) :0);
 
     stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
 
 
-    *s = (PaStream*)stream;
+    *s = (PaStream*) stream;
 
 
     return result;
 
 error:
-    if( stream )
-        PaUtil_FreeMemory( stream );
+
+    if (stream)
+        PaUtil_FreeMemory (stream);
 
     return result;
 }
@@ -1472,60 +1574,62 @@ error:
               if ((punk) != NULL)  \
                 { (punk)->Release(); (punk) = NULL; }
 
-static PaError CloseStream( PaStream* s )
+static PaError CloseStream (PaStream* s)
 {
     PaError result = paNoError;
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
     /*
         IMPLEMENT ME:
             - additional stream closing + cleanup
     */
 
-    SAFE_RELEASE(stream->out.client);
-    SAFE_RELEASE(stream->in.client);
-    SAFE_RELEASE(stream->cclient);
-    SAFE_RELEASE(stream->rclient);
-	SAFE_RELEASE(stream->inVol);
-	SAFE_RELEASE(stream->outVol);
-    CloseHandle(stream->hThread);
-	CloseHandle(stream->hNotificationEvent);
+    SAFE_RELEASE (stream->out.client);
+    SAFE_RELEASE (stream->in.client);
+    SAFE_RELEASE (stream->cclient);
+    SAFE_RELEASE (stream->rclient);
+    SAFE_RELEASE (stream->inVol);
+    SAFE_RELEASE (stream->outVol);
+    CloseHandle (stream->hThread);
+    CloseHandle (stream->hNotificationEvent);
 
-    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
-    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
-    PaUtil_FreeMemory( stream );
+    PaUtil_TerminateBufferProcessor (&stream->bufferProcessor);
+    PaUtil_TerminateStreamRepresentation (&stream->streamRepresentation);
+    PaUtil_FreeMemory (stream);
 
     return result;
 }
 
-DWORD WINAPI ProcThread(void *client);
+DWORD WINAPI ProcThread (void *client);
 
-static PaError StartStream( PaStream *s )
+static PaError StartStream (PaStream *s)
 {
     PaError result = paNoError;
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
-
-    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
-	
-	HRESULT hResult=S_OK;
-
-	if (stream->out.client){
-		hResult = stream->out.client->GetService(__uuidof(IAudioRenderClient),(void**)&stream->rclient);
-		logAUDCLNT_E(hResult);
-		if (hResult!=S_OK)
-			return paUnanticipatedHostError;
-	}
-	
-	if (stream->in.client){
-	 hResult = stream->in.client->GetService(__uuidof(IAudioCaptureClient),(void**)&stream->cclient);
-		logAUDCLNT_E(hResult);
-		if (hResult!=S_OK)
-			return paUnanticipatedHostError;
-	}
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
+
+    PaUtil_ResetBufferProcessor (&stream->bufferProcessor);
+
+    HRESULT hResult=S_OK;
+
+    if (stream->out.client) {
+        hResult = stream->out.client->GetService (__uuidof (IAudioRenderClient), (void**) &stream->rclient);
+        logAUDCLNT_E (hResult);
+
+        if (hResult!=S_OK)
+            return paUnanticipatedHostError;
+    }
+
+    if (stream->in.client) {
+        hResult = stream->in.client->GetService (__uuidof (IAudioCaptureClient), (void**) &stream->cclient);
+        logAUDCLNT_E (hResult);
+
+        if (hResult!=S_OK)
+            return paUnanticipatedHostError;
+    }
 
     // Create a thread for this client.
     stream->hThread = CREATE_THREAD;
-        
+
     if (stream->hThread == NULL)
         return paUnanticipatedHostError;
 
@@ -1533,16 +1637,17 @@ static PaError StartStream( PaStream *s )
 }
 
 
-static PaError StopStream( PaStream *s )
+static PaError StopStream (PaStream *s)
 {
     PaError result = paNoError;
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
     /* suppress unused variable warnings */
     stream->closeRequest = true;
+
     //todo something MUCH better than this
-    while(stream->closeRequest)
-        Sleep(100);
+    while (stream->closeRequest)
+        Sleep (100);
 
     /* IMPLEMENT ME, see portaudio.h for required behavior */
 
@@ -1552,16 +1657,17 @@ static PaError StopStream( PaStream *s )
 }
 
 
-static PaError AbortStream( PaStream *s )
+static PaError AbortStream (PaStream *s)
 {
     PaError result = paNoError;
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
     /* suppress unused variable warnings */
     stream->closeRequest = true;
+
     //todo something MUCH better than this
-    while(stream->closeRequest)
-        Sleep(100);
+    while (stream->closeRequest)
+        Sleep (100);
 
     /* IMPLEMENT ME, see portaudio.h for required behavior */
 
@@ -1569,42 +1675,42 @@ static PaError AbortStream( PaStream *s )
 }
 
 
-static PaError IsStreamStopped( PaStream *s )
+static PaError IsStreamStopped (PaStream *s)
 {
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
     return !stream->running;
 }
 
 
-static PaError IsStreamActive( PaStream *s )
+static PaError IsStreamActive (PaStream *s)
 {
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
     return stream->running;
 }
 
 
-static PaTime GetStreamTime( PaStream *s )
+static PaTime GetStreamTime (PaStream *s)
 {
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
     /* suppress unused variable warnings */
     (void) stream;
 
     /* IMPLEMENT ME, see portaudio.h for required behavior*/
 
-	//this is lame ds and mme does the same thing, quite useless method imho
-	//why dont we fetch the time in the pa callbacks?
-	//at least its doing to be clocked to something
+    //this is lame ds and mme does the same thing, quite useless method imho
+    //why dont we fetch the time in the pa callbacks?
+    //at least its doing to be clocked to something
     return PaUtil_GetTime();
 }
 
 
-static double GetStreamCpuLoad( PaStream* s )
+static double GetStreamCpuLoad (PaStream* s)
 {
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
-    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+    return PaUtil_GetCpuLoad (&stream->cpuLoadMeasurer);
 }
 
 
@@ -1614,11 +1720,11 @@ static double GetStreamCpuLoad( PaStream* s )
     for blocking streams.
 */
 
-static PaError ReadStream( PaStream* s,
+static PaError ReadStream (PaStream* s,
                            void *buffer,
-                           unsigned long frames )
+                           unsigned long frames)
 {
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
     /* suppress unused variable warnings */
     (void) buffer;
@@ -1631,11 +1737,11 @@ static PaError ReadStream( PaStream* s,
 }
 
 
-static PaError WriteStream( PaStream* s,
+static PaError WriteStream (PaStream* s,
                             const void *buffer,
-                            unsigned long frames )
+                            unsigned long frames)
 {
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
     /* suppress unused variable warnings */
     (void) buffer;
@@ -1648,9 +1754,9 @@ static PaError WriteStream( PaStream* s,
 }
 
 
-static signed long GetStreamReadAvailable( PaStream* s )
+static signed long GetStreamReadAvailable (PaStream* s)
 {
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
     /* suppress unused variable warnings */
     (void) stream;
@@ -1661,9 +1767,9 @@ static signed long GetStreamReadAvailable( PaStream* s )
 }
 
 
-static signed long GetStreamWriteAvailable( PaStream* s )
+static signed long GetStreamWriteAvailable (PaStream* s)
 {
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)s;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) s;
 
     /* suppress unused variable warnings */
     (void) stream;
@@ -1680,16 +1786,16 @@ static signed long GetStreamWriteAvailable( PaStream* s )
     occur in a host implementation.
 
 */
-static void WaspiHostProcessingLoop( void *inputBuffer,  long inputFrames,
+static void WaspiHostProcessingLoop (void *inputBuffer,  long inputFrames,
                                      void *outputBuffer, long outputFrames,
-                                     void *userData )
+                                     void *userData)
 {
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)userData;
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) userData;
     PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /* IMPLEMENT ME */
     int callbackResult;
     unsigned long framesProcessed;
 
-    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+    PaUtil_BeginCpuLoadMeasurement (&stream->cpuLoadMeasurer);
 
 
     /*
@@ -1705,7 +1811,7 @@ static void WaspiHostProcessingLoop( void *inputBuffer,  long inputFrames,
 
 
 
-    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, 0 /* IMPLEMENT ME: pass underflow/overflow flags when necessary */ );
+    PaUtil_BeginBufferProcessing (&stream->bufferProcessor, &timeInfo, 0 /* IMPLEMENT ME: pass underflow/overflow flags when necessary */);
 
     /*
         depending on whether the host buffers are interleaved, non-interleaved
@@ -1713,22 +1819,20 @@ static void WaspiHostProcessingLoop( void *inputBuffer,  long inputFrames,
         PaUtil_SetNonInterleaved*Channel() or PaUtil_Set*Channel() here.
     */
 
-    if( stream->bufferProcessor.inputChannelCount > 0 )
-    {
-        PaUtil_SetInputFrameCount( &stream->bufferProcessor, inputFrames );
-        PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,
-            0, /* first channel of inputBuffer is channel 0 */
-            inputBuffer,
-            0 ); /* 0 - use inputChannelCount passed to init buffer processor */
+    if (stream->bufferProcessor.inputChannelCount > 0) {
+        PaUtil_SetInputFrameCount (&stream->bufferProcessor, inputFrames);
+        PaUtil_SetInterleavedInputChannels (&stream->bufferProcessor,
+                                            0, /* first channel of inputBuffer is channel 0 */
+                                            inputBuffer,
+                                            0);  /* 0 - use inputChannelCount passed to init buffer processor */
     }
 
-    if( stream->bufferProcessor.outputChannelCount > 0 )
-    {
-        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, outputFrames);
-        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,
-            0, /* first channel of outputBuffer is channel 0 */
-            outputBuffer,
-            0 ); /* 0 - use outputChannelCount passed to init buffer processor */
+    if (stream->bufferProcessor.outputChannelCount > 0) {
+        PaUtil_SetOutputFrameCount (&stream->bufferProcessor, outputFrames);
+        PaUtil_SetInterleavedOutputChannels (&stream->bufferProcessor,
+                                             0, /* first channel of outputBuffer is channel 0 */
+                                             outputBuffer,
+                                             0);  /* 0 - use outputChannelCount passed to init buffer processor */
     }
 
     /* you must pass a valid value of callback result to PaUtil_EndBufferProcessing()
@@ -1738,7 +1842,7 @@ static void WaspiHostProcessingLoop( void *inputBuffer,  long inputFrames,
         using PaUtil_IsBufferProcessorOuputEmpty( bufferProcessor )
     */
     callbackResult = paContinue;
-    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );
+    framesProcessed = PaUtil_EndBufferProcessing (&stream->bufferProcessor, &callbackResult);
 
 
     /*
@@ -1746,134 +1850,143 @@ static void WaspiHostProcessingLoop( void *inputBuffer,  long inputFrames,
         host format, do it here.
     */
 
-    PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
+    PaUtil_EndCpuLoadMeasurement (&stream->cpuLoadMeasurer, framesProcessed);
 
 
-    if( callbackResult == paContinue )
-    {
+    if (callbackResult == paContinue) {
         /* nothing special to do */
-    }
-    else if( callbackResult == paAbort )
-    {
+    } else if (callbackResult == paAbort) {
         /* IMPLEMENT ME - finish playback immediately  */
 
         /* once finished, call the finished callback */
-        if( stream->streamRepresentation.streamFinishedCallback != 0 )
-            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
-    }
-    else
-    {
+        if (stream->streamRepresentation.streamFinishedCallback != 0)
+            stream->streamRepresentation.streamFinishedCallback (stream->streamRepresentation.userData);
+    } else {
         /* User callback has asked us to stop with paComplete or other non-zero value */
 
         /* IMPLEMENT ME - finish playback once currently queued audio has completed  */
 
         /* once finished, call the finished callback */
-        if( stream->streamRepresentation.streamFinishedCallback != 0 )
-            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+        if (stream->streamRepresentation.streamFinishedCallback != 0)
+            stream->streamRepresentation.streamFinishedCallback (stream->streamRepresentation.userData);
     }
 }
 
 
-void 
-MMCSS_activate(){
+void
+MMCSS_activate()
+{
 
     DWORD stuff=0;
-    HANDLE thCarac = pAvSetMmThreadCharacteristics("Pro Audio",&stuff);
-    if (!thCarac){
-        PRINT(("AvSetMmThreadCharacteristics failed!\n"));
+    HANDLE thCarac = pAvSetMmThreadCharacteristics ("Pro Audio",&stuff);
+
+    if (!thCarac) {
+        PRINT ( ("AvSetMmThreadCharacteristics failed!\n"));
     }
 
-    BOOL prio = pAvSetMmThreadPriority(thCarac,AVRT_PRIORITY_NORMAL);
-    if (!prio){
-        PRINT(("AvSetMmThreadPriority failed!\n"));
+    BOOL prio = pAvSetMmThreadPriority (thCarac,AVRT_PRIORITY_NORMAL);
+
+    if (!prio) {
+        PRINT ( ("AvSetMmThreadPriority failed!\n"));
     }
 
-	//debug
+    //debug
     {
         HANDLE hh       = GetCurrentThread();
-        int  currprio   = GetThreadPriority(hh);
-        DWORD currclass = GetPriorityClass(GetCurrentProcess());
-        PRINT(("currprio 0x%X currclass 0x%X\n",currprio,currclass));
+        int  currprio   = GetThreadPriority (hh);
+        DWORD currclass = GetPriorityClass (GetCurrentProcess());
+        PRINT ( ("currprio 0x%X currclass 0x%X\n",currprio,currclass));
     }
 }
 
 
 DWORD WINAPI
-ProcThread(void* param){
-	HRESULT hResult;
-	MMCSS_activate();
-
-    PaWinWasapiStream *stream = (PaWinWasapiStream*)param;
-
-	stream->hNotificationEvent = CreateEvent(NULL, 
-	                                         FALSE,  //bManualReset are we sure??
-											 FALSE, 
-											 "PAWASA");
-	hResult = stream->out.client->SetEventHandle(stream->hNotificationEvent);
-	if (hResult != S_OK)
-		logAUDCLNT_E(hResult);
-
-	if (stream->out.client){
-		hResult = stream->out.client->Start();
-		if (hResult != S_OK)
-			logAUDCLNT_E(hResult);
-	}
-
-	stream->running = true;
-	bool bOne = false;
-
-	while( !stream->closeRequest ) 
-    { 
-	    //lets wait but have a 1 second timeout
-        DWORD dwResult = WaitForSingleObject(stream->hNotificationEvent, 1000);
-        switch( dwResult ) {
-		case WAIT_OBJECT_0: {
-
-			unsigned long usingBS = stream->out.framesPerHostCallback;
-
-			BYTE* indata  = 0;
-			BYTE* outdata = 0;
-
-			hResult = stream->rclient->GetBuffer(usingBS, &outdata);
-
-			if (hResult != S_OK || !outdata) {
-				//logAUDCLNT_E(hResult);
-				//most probably shared mode and hResult=AUDCLNT_E_BUFFER_TOO_LARGE
-				UINT32 padding = 0;
-				hResult = stream->out.client->GetCurrentPadding(&padding);
-				if (padding == 0)
-					break;	
-				usingBS = usingBS-padding;
-				if (usingBS == 0)
-					break;//huh?
-				hResult = stream->rclient->GetBuffer(usingBS, &outdata);
-				if (hResult != S_OK)//what can we do NOW??
-					break;
-				//logAUDCLNT_E(hResult);			
-			}
-	
-			WaspiHostProcessingLoop(indata, usingBS ,outdata, usingBS, stream);
-
-			hResult = stream->rclient->ReleaseBuffer(usingBS, 0);
-			if (hResult != S_OK)
-				logAUDCLNT_E(hResult);
-
-			 /*	This was suggested, but in my tests it doesnt seem to improve the 
-                locking behaviour some drivers have running in exclusive mode.
-                if(!ResetEvent(stream->hNotificationEvent)){
-					logAUDCLNT_E(hResult);
-				}
-             */
-
-		} 
-		break;
+ProcThread (void* param)
+{
+    HRESULT hResult;
+    MMCSS_activate();
+
+    PaWinWasapiStream *stream = (PaWinWasapiStream*) param;
+
+    stream->hNotificationEvent = CreateEvent (NULL,
+                                 FALSE,  //bManualReset are we sure??
+                                 FALSE,
+                                 "PAWASA");
+    hResult = stream->out.client->SetEventHandle (stream->hNotificationEvent);
+
+    if (hResult != S_OK)
+        logAUDCLNT_E (hResult);
+
+    if (stream->out.client) {
+        hResult = stream->out.client->Start();
+
+        if (hResult != S_OK)
+            logAUDCLNT_E (hResult);
+    }
+
+    stream->running = true;
+    bool bOne = false;
+
+    while (!stream->closeRequest) {
+        //lets wait but have a 1 second timeout
+        DWORD dwResult = WaitForSingleObject (stream->hNotificationEvent, 1000);
+
+        switch (dwResult) {
+            case WAIT_OBJECT_0: {
+
+                unsigned long usingBS = stream->out.framesPerHostCallback;
+
+                BYTE* indata  = 0;
+                BYTE* outdata = 0;
+
+                hResult = stream->rclient->GetBuffer (usingBS, &outdata);
+
+                if (hResult != S_OK || !outdata) {
+                    //logAUDCLNT_E(hResult);
+                    //most probably shared mode and hResult=AUDCLNT_E_BUFFER_TOO_LARGE
+                    UINT32 padding = 0;
+                    hResult = stream->out.client->GetCurrentPadding (&padding);
+
+                    if (padding == 0)
+                        break;
+
+                    usingBS = usingBS-padding;
+
+                    if (usingBS == 0)
+                        break;//huh?
+
+                    hResult = stream->rclient->GetBuffer (usingBS, &outdata);
+
+                    if (hResult != S_OK) //what can we do NOW??
+                        break;
+
+                    //logAUDCLNT_E(hResult);
+                }
+
+                WaspiHostProcessingLoop (indata, usingBS ,outdata, usingBS, stream);
+
+                hResult = stream->rclient->ReleaseBuffer (usingBS, 0);
+
+                if (hResult != S_OK)
+                    logAUDCLNT_E (hResult);
+
+                /*	This was suggested, but in my tests it doesnt seem to improve the
+                   locking behaviour some drivers have running in exclusive mode.
+                   if(!ResetEvent(stream->hNotificationEvent)){
+                   	logAUDCLNT_E(hResult);
+                   }
+                */
+
+            }
+            break;
 
         }
     }
-	stream->out.client->Stop();
+
+    stream->out.client->Stop();
     stream->closeRequest = false;
-    
-	return 0; 
+
+    return 0;
 }
 
 
@@ -1885,28 +1998,36 @@ ProcThread(void* param){
 
 
 #if 0
-			if(bFirst) {			
-				float masteur;
-				hResult = stream->outVol->GetMasterVolumeLevelScalar(&masteur);
-				if (hResult != S_OK)
-					logAUDCLNT_E(hResult);
-				float chan1, chan2;
-				hResult = stream->outVol->GetChannelVolumeLevelScalar(0, &chan1);
-				if (hResult != S_OK)
-					logAUDCLNT_E(hResult);
-				hResult = stream->outVol->GetChannelVolumeLevelScalar(1, &chan2);
-				if (hResult != S_OK)
-					logAUDCLNT_E(hResult);
-
-				BOOL bMute;
-				hResult = stream->outVol->GetMute(&bMute);
-				if (hResult != S_OK)
-					logAUDCLNT_E(hResult);
-
-				stream->outVol->SetMasterVolumeLevelScalar(0.5, NULL);
-				stream->outVol->SetChannelVolumeLevelScalar(0, 0.5, NULL);
-				stream->outVol->SetChannelVolumeLevelScalar(1, 0.5, NULL);
-				stream->outVol->SetMute(FALSE, NULL);
-				bFirst = false;
-			}
+
+if (bFirst)
+{
+    float masteur;
+    hResult = stream->outVol->GetMasterVolumeLevelScalar (&masteur);
+
+    if (hResult != S_OK)
+        logAUDCLNT_E (hResult);
+
+    float chan1, chan2;
+    hResult = stream->outVol->GetChannelVolumeLevelScalar (0, &chan1);
+
+    if (hResult != S_OK)
+        logAUDCLNT_E (hResult);
+
+    hResult = stream->outVol->GetChannelVolumeLevelScalar (1, &chan2);
+
+    if (hResult != S_OK)
+        logAUDCLNT_E (hResult);
+
+    BOOL bMute;
+    hResult = stream->outVol->GetMute (&bMute);
+
+    if (hResult != S_OK)
+        logAUDCLNT_E (hResult);
+
+    stream->outVol->SetMasterVolumeLevelScalar (0.5, NULL);
+    stream->outVol->SetChannelVolumeLevelScalar (0, 0.5, NULL);
+    stream->outVol->SetChannelVolumeLevelScalar (1, 0.5, NULL);
+    stream->outVol->SetMute (FALSE, NULL);
+    bFirst = false;
+}
 #endif
\ No newline at end of file
diff --git a/sflphone-common/libs/utilspp/singleton/LifetimeLibrary.cpp b/sflphone-common/libs/utilspp/singleton/LifetimeLibrary.cpp
index 6e71baddaad90bc1922457fcae4791c3b53cea3d..6722e91c301921ffbe73d6d48cc5015d43bcc9db 100644
--- a/sflphone-common/libs/utilspp/singleton/LifetimeLibrary.cpp
+++ b/sflphone-common/libs/utilspp/singleton/LifetimeLibrary.cpp
@@ -6,12 +6,14 @@ utilspp::LifetimeLibraryImpl::LifetimeLibraryImpl()
         mTrackerArray (NULL),
         mNbElements (0) {}
 
-utilspp::LifetimeLibraryImpl::~LifetimeLibraryImpl() {
+utilspp::LifetimeLibraryImpl::~LifetimeLibraryImpl()
+{
     terminate();
 }
 
 void
-utilspp::LifetimeLibraryImpl::add (utilspp::PrivateMembers::LifetimeTracker *tracker) {
+utilspp::LifetimeLibraryImpl::add (utilspp::PrivateMembers::LifetimeTracker *tracker)
+{
     utilspp::PrivateMembers::TrackerArray newArray = static_cast<
             utilspp::PrivateMembers::TrackerArray > (std::realloc (mTrackerArray,
                     mNbElements + 1));
@@ -36,7 +38,8 @@ utilspp::LifetimeLibraryImpl::add (utilspp::PrivateMembers::LifetimeTracker *tra
 };
 
 void
-utilspp::LifetimeLibraryImpl::terminate() {
+utilspp::LifetimeLibraryImpl::terminate()
+{
     //The number of elements MUST always be equal or over zero.
     assert (mNbElements >= 0);
 
@@ -60,7 +63,8 @@ utilspp::LifetimeLibraryImpl::terminate() {
 }
 
 unsigned int
-utilspp::getLongevity (utilspp::LifetimeLibraryImpl *) {
+utilspp::getLongevity (utilspp::LifetimeLibraryImpl *)
+{
     return 0;
 }
 
diff --git a/sflphone-common/libs/utilspp/singleton/PrivateMembers.cpp b/sflphone-common/libs/utilspp/singleton/PrivateMembers.cpp
index a033e0c54c6255fca5144b7963c50ea2ace9ab07..004517f494fd3e42447bd7a2530ec98c431651ce 100644
--- a/sflphone-common/libs/utilspp/singleton/PrivateMembers.cpp
+++ b/sflphone-common/libs/utilspp/singleton/PrivateMembers.cpp
@@ -18,12 +18,14 @@ bool
 utilspp::PrivateMembers::LifetimeTracker::compare (
     const LifetimeTracker *l,
     const LifetimeTracker *r
-) {
+)
+{
     return l->mLongevity < r->mLongevity;
 }
 
 void
-utilspp::PrivateMembers::atExitFunc() {
+utilspp::PrivateMembers::atExitFunc()
+{
     assert ( (mTrackerArray != NULL) &&
              (mNbElements > 0));
 
diff --git a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
index 03f10d5317011cd1124aeff44405a25926bb5fd0..9bdf2ee0b760d8642817e2aac28e603a4787bf7f 100644
--- a/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
+++ b/sflphone-common/src/audio/pulseaudio/pulselayer.cpp
@@ -87,12 +87,12 @@ static void latency_update_callback (pa_stream *p, void *userdata)
 
     pa_stream_get_latency (p, &r_usec, NULL);
 
-    _debug ("Audio: Stream letency update %0.0f ms for device %s", (float) r_usec/1000, pa_stream_get_device_name (p));
-    _debug ("Audio: maxlength %u", pa_stream_get_buffer_attr (p)->maxlength);
-    _debug ("Audio: tlength %u", pa_stream_get_buffer_attr (p)->tlength);
-    _debug ("Audio: prebuf %u", pa_stream_get_buffer_attr (p)->prebuf);
-    _debug ("Audio: minreq %u", pa_stream_get_buffer_attr (p)->minreq);
-    _debug ("Audio: fragsize %u", pa_stream_get_buffer_attr (p)->fragsize);
+    // _debug ("Audio: Stream letency update %0.0f ms for device %s", (float) r_usec/1000, pa_stream_get_device_name (p));
+    // _debug ("Audio: maxlength %u", pa_stream_get_buffer_attr (p)->maxlength);
+    // _debug ("Audio: tlength %u", pa_stream_get_buffer_attr (p)->tlength);
+    // _debug ("Audio: prebuf %u", pa_stream_get_buffer_attr (p)->prebuf);
+    // _debug ("Audio: minreq %u", pa_stream_get_buffer_attr (p)->minreq);
+    // _debug ("Audio: fragsize %u", pa_stream_get_buffer_attr (p)->fragsize);
 
 }
 
diff --git a/sflphone-common/src/sip/im/InstantMessaging.cpp b/sflphone-common/src/sip/im/InstantMessaging.cpp
index badbc09738158166beaea17f9c23c9f16a5c8cde..2c7b3d360b3a9a113d6840f0c6d84d68bcff7669 100644
--- a/sflphone-common/src/sip/im/InstantMessaging.cpp
+++ b/sflphone-common/src/sip/im/InstantMessaging.cpp
@@ -3,174 +3,175 @@
 namespace sfl
 {
 
-	InstantMessaging::InstantMessaging()
-		: imFiles () {}
+InstantMessaging::InstantMessaging()
+        : imFiles () {}
 
 
-	InstantMessaging::~InstantMessaging() {}
+InstantMessaging::~InstantMessaging() {}
 
-	bool InstantMessaging::init ()
-	{
-		return true;
-	}
+bool InstantMessaging::init ()
+{
+    return true;
+}
 
-	int InstantMessaging::openArchive (CallID& id)
-	{
+int InstantMessaging::openArchive (CallID& id)
+{
 
-		// Create a new file stream
-		std::ofstream File (id.c_str (), std::ios::out | std::ios::app);
-		imFiles[id] = &File;
+    // Create a new file stream
+    std::ofstream File (id.c_str (), std::ios::out | std::ios::app);
+    imFiles[id] = &File;
 
-		// Attach it to the call ID
-		return (int) imFiles.size ();
-	}
+    // Attach it to the call ID
+    return (int) imFiles.size ();
+}
 
-	int InstantMessaging::closeArchive (CallID& id)
-	{
+int InstantMessaging::closeArchive (CallID& id)
+{
 
-		// Erase it from the map
-		imFiles.erase (id);
-		return (int) imFiles.size ();
-	}
+    // Erase it from the map
+    imFiles.erase (id);
+    return (int) imFiles.size ();
+}
 
-	bool InstantMessaging::saveMessage (const std::string& message, const std::string& author, CallID& id, int mode)
-	{
+bool InstantMessaging::saveMessage (const std::string& message, const std::string& author, CallID& id, int mode)
+{
 
-		// We need here to write the text message in the right file.
-		// We will use the Call ID
+    // We need here to write the text message in the right file.
+    // We will use the Call ID
 
-		std::ofstream File;
-		std::string filename = "sip:";
+    std::ofstream File;
+    std::string filename = "sip:";
 
-		filename.append (id);
-		File.open (filename.c_str (), (std::_Ios_Openmode) mode);
+    filename.append (id);
+    File.open (filename.c_str (), (std::_Ios_Openmode) mode);
 
-		if (!File.good () || !File.is_open ())
-			return false;
+    if (!File.good () || !File.is_open ())
+        return false;
 
-		File << "[" << author << "] " << message << '\n';
-		File.close ();
+    File << "[" << author << "] " << message << '\n';
+    File.close ();
 
-		return true;
-	}
+    return true;
+}
 
-	std::string InstantMessaging::receive (const std::string& message, const std::string& author, CallID& id)
-	{
+std::string InstantMessaging::receive (const std::string& message, const std::string& author, CallID& id)
+{
 
-		// We just receive a TEXT message. Before sent it to the recipient, we must assure that the message is complete.
-		// We should use a queue to push these messages in
+    // We just receive a TEXT message. Before sent it to the recipient, we must assure that the message is complete.
+    // We should use a queue to push these messages in
 
-		_debug ("New message : %s", message.c_str ());
+    _debug ("New message : %s", message.c_str ());
 
-		// TODO Security check
-		// TODO String cleaning
+    // TODO Security check
+    // TODO String cleaning
 
-		// Archive the message
-		this->saveMessage (message, author, id);
+    // Archive the message
+    this->saveMessage (message, author, id);
 
 
-		return message;
+    return message;
 
-	}
+}
 
-	pj_status_t InstantMessaging::notify (CallID& id)
-	{
-		// Notify the clients through a D-Bus signal
-		return PJ_SUCCESS;
-	}
+pj_status_t InstantMessaging::notify (CallID& id)
+{
+    // Notify the clients through a D-Bus signal
+    return PJ_SUCCESS;
+}
 
-	pj_status_t InstantMessaging::send (pjsip_inv_session *session, CallID& id, const std::string& text)
-	{
+pj_status_t InstantMessaging::send (pjsip_inv_session *session, CallID& id, const std::string& text)
+{
 
-		pjsip_method msg_method;
-		const pj_str_t type =  STR_TEXT;
-		const pj_str_t subtype = STR_PLAIN;
-		pjsip_tx_data *tdata;
-		pj_status_t status;
-		pjsip_dialog* dialog;
-		pj_str_t message;
+    pjsip_method msg_method;
+    const pj_str_t type =  STR_TEXT;
+    const pj_str_t subtype = STR_PLAIN;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+    pjsip_dialog* dialog;
+    pj_str_t message;
 
-		msg_method.id = PJSIP_OTHER_METHOD;
-		msg_method.name = METHOD_NAME ;
+    msg_method.id = PJSIP_OTHER_METHOD;
+    msg_method.name = METHOD_NAME ;
 
 
-		// Get the dialog associated to the call
-		dialog = session->dlg;
-		// Convert the text into a format readable by pjsip
-		message = pj_str ( (char*) text.c_str ());
+    // Get the dialog associated to the call
+    dialog = session->dlg;
+    // Convert the text into a format readable by pjsip
+    message = pj_str ( (char*) text.c_str ());
 
-		// Must lock dialog
-		pjsip_dlg_inc_lock (dialog);
+    // Must lock dialog
+    pjsip_dlg_inc_lock (dialog);
 
-		// Create the message request
-		status = pjsip_dlg_create_request (dialog, &msg_method, -1, &tdata);
-		PJ_ASSERT_RETURN (status == PJ_SUCCESS, 1);
+    // Create the message request
+    status = pjsip_dlg_create_request (dialog, &msg_method, -1, &tdata);
+    PJ_ASSERT_RETURN (status == PJ_SUCCESS, 1);
 
-		// Attach "text/plain" body
-		tdata->msg->body = pjsip_msg_body_create (tdata->pool, &type, &subtype, &message);
+    // Attach "text/plain" body
+    tdata->msg->body = pjsip_msg_body_create (tdata->pool, &type, &subtype, &message);
 
-		// Send the request
-		status = pjsip_dlg_send_request (dialog, tdata, -1, NULL);
-		PJ_ASSERT_RETURN (status == PJ_SUCCESS, 1);
+    // Send the request
+    status = pjsip_dlg_send_request (dialog, tdata, -1, NULL);
+    // PJ_ASSERT_RETURN (status == PJ_SUCCESS, 1);
 
-		// Done
-		pjsip_dlg_dec_lock (dialog);
+    // Done
+    pjsip_dlg_dec_lock (dialog);
 
-		// Archive the message
-		this->saveMessage (text, "Me", id);
+    // Archive the message
+    this->saveMessage (text, "Me", id);
 
-		printf ("SIPVoIPLink::sendTextMessage %s %s\n", id.c_str(), text.c_str());
-		return PJ_SUCCESS;
-	}
+    printf ("SIPVoIPLink::sendTextMessage %s %s\n", id.c_str(), text.c_str());
+    return PJ_SUCCESS;
+}
 
-	pj_status_t InstantMessaging::send_message (pjsip_inv_session *session, CallID& id, const std::string& message) 
-	{
+pj_status_t InstantMessaging::send_message (pjsip_inv_session *session, CallID& id, const std::string& message)
+{
 
-		/* Check the length of the message */
-		if (message.length() < MAXIMUM_MESSAGE_LENGTH) {
-			/* No problem here */
-			send (session, id, message);
-		}
+    /* Check the length of the message */
+    if (message.length() < MAXIMUM_MESSAGE_LENGTH) {
+        /* No problem here */
+        send (session, id, message);
+    }
+
+    else {
+        /* It exceeds the size limit of a SIP MESSAGE (1300 bytes), o plit it and send multiple messages */
+        std::vector<std::string> multiple_messages = split_message (message);
+        /* Send multiple messages */
+        int size = multiple_messages.size();
+        int i = 0;
+
+        for (i=0; i<size; i++) {
+            send (session, id, multiple_messages[i]);
+        }
+    }
+
+    return PJ_SUCCESS;
+}
 
-		else {
-			/* It exceeds the size limit of a SIP MESSAGE (1300 bytes), o plit it and send multiple messages */
-			std::vector<std::string> multiple_messages = split_message (message);
-			/* Send multiple messages */
-			int size = multiple_messages.size();
-			int i = 0;
-			for (i=0; i<size; i++) {
-				send (session, id, multiple_messages[i]);
-			}
-		}
-		return PJ_SUCCESS;
-	}
 
+std::vector<std::string> InstantMessaging::split_message (const std::string& text)
+{
 
-	std::vector<std::string> InstantMessaging::split_message (const std::string& text)
-	{
+    std::vector<std::string> messages;
+    std::string text_to_split = text;
 
-		std::vector<std::string> messages;
-		std::string text_to_split = text;
+    /* Iterate over the message length */
+    while (text_to_split.length() > MAXIMUM_MESSAGE_LENGTH) {
+        /* The remaining string is still too long */
 
-		/* Iterate over the message length */
-		while (text_to_split.length() > MAXIMUM_MESSAGE_LENGTH)
-		{
-			/* The remaining string is still too long */
+        /* Compute the substring */
+        std::string split_message = text_to_split.substr (0, (size_t) MAXIMUM_MESSAGE_LENGTH);
+        /* Append our split character \n\n */
+        split_message.append (DELIMITER_CHAR);
+        /* Append in the vector */
+        messages.push_back (split_message);
+        /* Use the remaining string to not loop forever */
+        text_to_split = text_to_split.substr ( (size_t) MAXIMUM_MESSAGE_LENGTH);
+    }
 
-			/* Compute the substring */
-			std::string split_message = text_to_split.substr (0, (size_t)MAXIMUM_MESSAGE_LENGTH);
-			/* Append our split character \n\n */
-			split_message.append (DELIMITER_CHAR);
-			/* Append in the vector */
-			messages.push_back (split_message);
-			/* Use the remaining string to not loop forever */
-			text_to_split = text_to_split.substr ((size_t) MAXIMUM_MESSAGE_LENGTH);
-		}
+    /* Push the last message */
+    /* If the message length does not exceed the maximum size of a SIP MESSAGE, we go directly here */
+    messages.push_back (text_to_split);
 
-		/* Push the last message */
-		/* If the message length does not exceed the maximum size of a SIP MESSAGE, we go directly here */
-		messages.push_back (text_to_split);
-
-		return messages;
-	}
+    return messages;
+}
 }
diff --git a/sflphone-common/test/instantmessagingtest.cpp b/sflphone-common/test/instantmessagingtest.cpp
index 028fdffcf2510b985c13dba9c77217af73911d8e..75a74ce5b20afba021c49f77c2a0924693049623 100644
--- a/sflphone-common/test/instantmessagingtest.cpp
+++ b/sflphone-common/test/instantmessagingtest.cpp
@@ -42,96 +42,98 @@ using std::endl;
 
 void InstantMessagingTest::setUp()
 {
-	_im = new sfl::InstantMessaging ();
-	_im->init ();
+    _im = new sfl::InstantMessaging ();
+    _im->init ();
 }
 
 void InstantMessagingTest::testSaveSingleMessage ()
 {
-	_debug ("-------------------- InstantMessagingTest::testSaveSingleMessage --------------------\n");
+    _debug ("-------------------- InstantMessagingTest::testSaveSingleMessage --------------------\n");
 
-	std::string input, tmp;
-	std::string callID = "testfile1.txt";
+    std::string input, tmp;
+    std::string callID = "testfile1.txt";
 
-	// Open a file stream and try to write in it
-	CPPUNIT_ASSERT (_im->saveMessage ("Bonjour, c'est un test d'archivage de message", "Manu", callID, std::ios::out)  == true);
+    // Open a file stream and try to write in it
+    CPPUNIT_ASSERT (_im->saveMessage ("Bonjour, c'est un test d'archivage de message", "Manu", callID, std::ios::out)  == true);
 
-	// Read it to check it has been successfully written
-	std::ifstream testfile (callID.c_str (), std::ios::in);
-	CPPUNIT_ASSERT (testfile.is_open () == true);
+    // Read it to check it has been successfully written
+    std::ifstream testfile (callID.c_str (), std::ios::in);
+    CPPUNIT_ASSERT (testfile.is_open () == true);
 
-	while (!testfile.eof ()) {
-		std::getline (testfile, tmp);
-		input.append (tmp);
-	}
+    while (!testfile.eof ()) {
+        std::getline (testfile, tmp);
+        input.append (tmp);
+    }
 
-	testfile.close ();
-	CPPUNIT_ASSERT (input == "[Manu] Bonjour, c'est un test d'archivage de message");
+    testfile.close ();
+    CPPUNIT_ASSERT (input == "[Manu] Bonjour, c'est un test d'archivage de message");
 }
 
 void InstantMessagingTest::testSaveMultipleMessage ()
 {
-	_debug ("-------------------- InstantMessagingTest::testSaveMultipleMessage --------------------\n");
+    _debug ("-------------------- InstantMessagingTest::testSaveMultipleMessage --------------------\n");
 
-	std::string input, tmp;
-	std::string callID = "testfile2.txt";
+    std::string input, tmp;
+    std::string callID = "testfile2.txt";
 
-	// Open a file stream and try to write in it
-	CPPUNIT_ASSERT (_im->saveMessage ("Bonjour, c'est un test d'archivage de message", "Manu", callID, std::ios::out)  == true);
-	CPPUNIT_ASSERT (_im->saveMessage ("Cool", "Alex", callID, std::ios::out || std::ios::app)  == true);
+    // Open a file stream and try to write in it
+    CPPUNIT_ASSERT (_im->saveMessage ("Bonjour, c'est un test d'archivage de message", "Manu", callID, std::ios::out)  == true);
+    CPPUNIT_ASSERT (_im->saveMessage ("Cool", "Alex", callID, std::ios::out || std::ios::app)  == true);
 
-	// Read it to check it has been successfully written
-	std::ifstream testfile (callID.c_str (), std::ios::in);
-	CPPUNIT_ASSERT (testfile.is_open () == true);
+    // Read it to check it has been successfully written
+    std::ifstream testfile (callID.c_str (), std::ios::in);
+    CPPUNIT_ASSERT (testfile.is_open () == true);
 
-	while (!testfile.eof ()) {
-		std::getline (testfile, tmp);
-		input.append (tmp);
-	}
+    while (!testfile.eof ()) {
+        std::getline (testfile, tmp);
+        input.append (tmp);
+    }
 
-	testfile.close ();
-	printf ("%s\n", input.c_str());
-	CPPUNIT_ASSERT (input == "[Manu] Bonjour, c'est un test d'archivage de message[Alex] Cool");
+    testfile.close ();
+    printf ("%s\n", input.c_str());
+    CPPUNIT_ASSERT (input == "[Manu] Bonjour, c'est un test d'archivage de message[Alex] Cool");
 }
 
 void InstantMessagingTest::testSplitMessage ()
 {
 
-	/* A message that does not need to be split */
-	std::string short_message = "Salut";
-	std::vector<std::string> messages = _im->split_message (short_message);
-	CPPUNIT_ASSERT (messages.size() == short_message.length()/MAXIMUM_SIZE + 1);
-	CPPUNIT_ASSERT (messages[0] == short_message);
-
-	/* A message that needs to be split into two messages */ 
-	std::string long_message = "A message too long";
-	messages = _im->split_message (long_message);
-	int size = messages.size ();
-	int i = 0;
-	CPPUNIT_ASSERT (size == (int)long_message.length()/MAXIMUM_SIZE + 1);
-	/* If only one element, do not enter the loop */
-	for (i = 0; i < size - 1; i++) {
-		CPPUNIT_ASSERT (messages[i] == long_message.substr ((MAXIMUM_SIZE * i), MAXIMUM_SIZE)+ DELIMITER_CHAR);
-	}
-
-	/* Works for the last element, or for the only element */
-	CPPUNIT_ASSERT (messages[size- 1] == long_message.substr (MAXIMUM_SIZE * (size-1)));
-
-	/* A message that needs to be split into four messages */ 
-	std::string very_long_message = "A message that needs to be split into many messages";
-	messages = _im->split_message (very_long_message);
-	size = messages.size ();
-	/* If only one element, do not enter the loop */
-	for (i = 0; i < size - 1; i++) {
-		CPPUNIT_ASSERT (messages[i] ==very_long_message.substr ((MAXIMUM_SIZE * i), MAXIMUM_SIZE)+ DELIMITER_CHAR);
-	}
-
-	/* Works for the last element, or for the only element */
-	CPPUNIT_ASSERT (messages[size- 1] == very_long_message.substr (MAXIMUM_SIZE * (size-1)));
+    /* A message that does not need to be split */
+    std::string short_message = "Salut";
+    std::vector<std::string> messages = _im->split_message (short_message);
+    CPPUNIT_ASSERT (messages.size() == short_message.length() /MAXIMUM_SIZE + 1);
+    CPPUNIT_ASSERT (messages[0] == short_message);
+
+    /* A message that needs to be split into two messages */
+    std::string long_message = "A message too long";
+    messages = _im->split_message (long_message);
+    int size = messages.size ();
+    int i = 0;
+    CPPUNIT_ASSERT (size == (int) long_message.length() /MAXIMUM_SIZE + 1);
+
+    /* If only one element, do not enter the loop */
+    for (i = 0; i < size - 1; i++) {
+        CPPUNIT_ASSERT (messages[i] == long_message.substr ( (MAXIMUM_SIZE * i), MAXIMUM_SIZE) + DELIMITER_CHAR);
+    }
+
+    /* Works for the last element, or for the only element */
+    CPPUNIT_ASSERT (messages[size- 1] == long_message.substr (MAXIMUM_SIZE * (size-1)));
+
+    /* A message that needs to be split into four messages */
+    std::string very_long_message = "A message that needs to be split into many messages";
+    messages = _im->split_message (very_long_message);
+    size = messages.size ();
+
+    /* If only one element, do not enter the loop */
+    for (i = 0; i < size - 1; i++) {
+        CPPUNIT_ASSERT (messages[i] ==very_long_message.substr ( (MAXIMUM_SIZE * i), MAXIMUM_SIZE) + DELIMITER_CHAR);
+    }
+
+    /* Works for the last element, or for the only element */
+    CPPUNIT_ASSERT (messages[size- 1] == very_long_message.substr (MAXIMUM_SIZE * (size-1)));
 }
 
 void InstantMessagingTest::tearDown()
 {
-	delete _im;
-	_im = 0;
+    delete _im;
+    _im = 0;
 }