comparison src/account.c @ 9971:ab5db2c5da79

[gaim-migrate @ 10882] Remove the default prpl, patch from datallah Patch from nosnilmot that might make recent buddies work Someone check my get_proto_smileys function. I feel like it could be better committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 08 Sep 2004 02:33:53 +0000
parents e4a27c9aec4c
children d770673338f4
comparison
equal deleted inserted replaced
9970:837dc736e84f 9971:ab5db2c5da79
126 gaim_account_new(const char *username, const char *protocol_id) 126 gaim_account_new(const char *username, const char *protocol_id)
127 { 127 {
128 GaimAccount *account = NULL; 128 GaimAccount *account = NULL;
129 129
130 g_return_val_if_fail(username != NULL, NULL); 130 g_return_val_if_fail(username != NULL, NULL);
131 131 g_return_val_if_fail(protocol_id != NULL, NULL);
132 if (protocol_id != NULL) 132
133 account = gaim_accounts_find(username, protocol_id); 133 account = gaim_accounts_find(username, protocol_id);
134 134
135 if (account != NULL) 135 if (account != NULL)
136 return account; 136 return account;
137 137
138 account = g_new0(GaimAccount, 1); 138 account = g_new0(GaimAccount, 1);
139 139
140 gaim_account_set_username(account, username); 140 gaim_account_set_username(account, username);
141 141
142 gaim_account_set_protocol_id(account, 142 gaim_account_set_protocol_id(account, protocol_id);
143 (protocol_id ? protocol_id : GAIM_PROTO_DEFAULT));
144 143
145 account->settings = g_hash_table_new_full(g_str_hash, g_str_equal, 144 account->settings = g_hash_table_new_full(g_str_hash, g_str_equal,
146 g_free, delete_setting); 145 g_free, delete_setting);
147 account->ui_settings = g_hash_table_new_full(g_str_hash, g_str_equal, 146 account->ui_settings = g_hash_table_new_full(g_str_hash, g_str_equal,
148 g_free, (GDestroyNotify)g_hash_table_destroy); 147 g_free, (GDestroyNotify)g_hash_table_destroy);