Mercurial > pidgin
comparison src/account.c @ 5703:cee14870644c
[gaim-migrate @ 6124]
Added some niceties, like the OK, Delete, and Modify buttons only being
clickable when something is selected or entered or whatever. Also, some bug
fixes. I had too many sanity checks. Some I did not want.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 03 Jun 2003 10:15:29 +0000 |
parents | e42535701e25 |
children | b69400aa008e |
comparison
equal
deleted
inserted
replaced
5702:05858c215226 | 5703:cee14870644c |
---|---|
177 | 177 |
178 void | 178 void |
179 gaim_account_set_username(GaimAccount *account, const char *username) | 179 gaim_account_set_username(GaimAccount *account, const char *username) |
180 { | 180 { |
181 g_return_if_fail(account != NULL); | 181 g_return_if_fail(account != NULL); |
182 g_return_if_fail(username != NULL); | |
183 | 182 |
184 if (account->username != NULL) | 183 if (account->username != NULL) |
185 g_free(account->username); | 184 g_free(account->username); |
186 | 185 |
187 account->username = (username == NULL ? NULL : g_strdup(username)); | 186 account->username = (username == NULL ? NULL : g_strdup(username)); |
191 | 190 |
192 void | 191 void |
193 gaim_account_set_password(GaimAccount *account, const char *password) | 192 gaim_account_set_password(GaimAccount *account, const char *password) |
194 { | 193 { |
195 g_return_if_fail(account != NULL); | 194 g_return_if_fail(account != NULL); |
196 g_return_if_fail(password != NULL); | |
197 | 195 |
198 if (account->password != NULL) | 196 if (account->password != NULL) |
199 g_free(account->password); | 197 g_free(account->password); |
200 | 198 |
201 account->password = (password == NULL ? NULL : g_strdup(password)); | 199 account->password = (password == NULL ? NULL : g_strdup(password)); |
205 | 203 |
206 void | 204 void |
207 gaim_account_set_alias(GaimAccount *account, const char *alias) | 205 gaim_account_set_alias(GaimAccount *account, const char *alias) |
208 { | 206 { |
209 g_return_if_fail(account != NULL); | 207 g_return_if_fail(account != NULL); |
210 g_return_if_fail(alias != NULL); | |
211 | 208 |
212 if (account->alias != NULL) | 209 if (account->alias != NULL) |
213 g_free(account->alias); | 210 g_free(account->alias); |
214 | 211 |
215 account->alias = (alias == NULL ? NULL : g_strdup(alias)); | 212 account->alias = (alias == NULL ? NULL : g_strdup(alias)); |
219 | 216 |
220 void | 217 void |
221 gaim_account_set_user_info(GaimAccount *account, const char *user_info) | 218 gaim_account_set_user_info(GaimAccount *account, const char *user_info) |
222 { | 219 { |
223 g_return_if_fail(account != NULL); | 220 g_return_if_fail(account != NULL); |
224 g_return_if_fail(user_info != NULL); | |
225 | 221 |
226 if (account->user_info != NULL) | 222 if (account->user_info != NULL) |
227 g_free(account->user_info); | 223 g_free(account->user_info); |
228 | 224 |
229 account->user_info = (user_info == NULL ? NULL : g_strdup(user_info)); | 225 account->user_info = (user_info == NULL ? NULL : g_strdup(user_info)); |
233 | 229 |
234 void | 230 void |
235 gaim_account_set_buddy_icon(GaimAccount *account, const char *icon) | 231 gaim_account_set_buddy_icon(GaimAccount *account, const char *icon) |
236 { | 232 { |
237 g_return_if_fail(account != NULL); | 233 g_return_if_fail(account != NULL); |
238 g_return_if_fail(icon != NULL); | |
239 | 234 |
240 if (account->buddy_icon != NULL) | 235 if (account->buddy_icon != NULL) |
241 g_free(account->buddy_icon); | 236 g_free(account->buddy_icon); |
242 | 237 |
243 account->buddy_icon = (icon == NULL ? NULL : g_strdup(icon)); | 238 account->buddy_icon = (icon == NULL ? NULL : g_strdup(icon)); |