Skip to content
Snippets Groups Projects
Commit 10e48f7e authored by Julien Bonjean's avatar Julien Bonjean
Browse files

[#3376] Cleaned some glib and GTK criticals and warnings

parent 494f6636
Branches
Tags
No related merge requests found
......@@ -360,7 +360,9 @@ gboolean current_account_has_mailbox (void)
current = account_list_get_current ();
if (current) {
if (g_strcasecmp (g_hash_table_lookup (current->properties, ACCOUNT_MAILBOX), "") != 0)
gchar * account_mailbox = g_hash_table_lookup (current->properties, ACCOUNT_MAILBOX);
if (account_mailbox != NULL && g_strcasecmp (account_mailbox, "") != 0)
return TRUE;
}
......
......@@ -436,11 +436,14 @@ gchar* serialize_history_entry (callable_obj_t *entry)
// and the timestamps
timestamp = convert_timestamp_to_gchar (entry->_time_stop);
gchar* peer_name = (entry->_peer_name == NULL || g_strcasecmp (entry->_peer_name,"") == 0) ? "empty": entry->_peer_name;
gchar* account_id = (entry->_accountID == NULL || 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,
peer_name, separator,
timestamp, separator,
g_strcasecmp (entry->_accountID,"") ==0 ? "empty": entry->_accountID,
account_id,
NULL);
return result;
......
......@@ -122,6 +122,21 @@ enum {
COLUMN_CREDENTIAL_COUNT
};
/*
* The same window is used with different configurations
* so we need to reset some data to prevent side-effects
*/
static void reset()
{
entryAlias = NULL;
protocolComboBox = NULL;
entryHostname = NULL;
entryUsername = NULL;
entryPassword = NULL;
entryUseragent = NULL;
entryMailbox = NULL;
}
/*
* Display / Hide the password
*/
......@@ -290,6 +305,7 @@ static GtkWidget* create_basic_tab (account_t **a)
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);
curMailbox = curMailbox != NULL ? curMailbox : "";
curUseragent = g_hash_table_lookup (currentAccount->properties, ACCOUNT_USERAGENT);
}
......@@ -1268,6 +1284,10 @@ void show_account_window (account_t * a)
gint response;
account_t *currentAccount;
// Firstly we reset
reset();
// In case the published address is same than local,
// we must resolve published address from interface name
gchar * local_interface;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment