Mercurial > pidgin.yaz
changeset 15269:132db06150ca
[gaim-migrate @ 18058]
* Nathan and I decided that there's no reason for having the if (value != old_value) checks in the setters; it's a convention which makes sense in my 'native' Objective-C but is silly here.
* Fixed a return in g_return_val_if_fail(): gaim_notify_user_info_entry_get_type() returns a GaimNotifyUserInfoEntryType, not a pointer.
committer: Tailor Script <tailor@pidgin.im>
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Tue, 26 Dec 2006 19:22:03 +0000 |
parents | 6388c384bfac |
children | d728da06e0e8 |
files | libgaim/notify.c |
diffstat | 1 files changed, 6 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/notify.c Tue Dec 26 03:39:37 2006 +0000 +++ b/libgaim/notify.c Tue Dec 26 19:22:03 2006 +0000 @@ -585,11 +585,8 @@ { g_return_if_fail(user_info_entry != NULL); - if (label != user_info_entry->label) - { - g_free(user_info_entry->label); - user_info_entry->label = g_strdup(label); - } + g_free(user_info_entry->label); + user_info_entry->label = g_strdup(label); } gchar * @@ -605,18 +602,15 @@ { g_return_if_fail(user_info_entry != NULL); - if (value != user_info_entry->value) - { - g_free(user_info_entry->value); - user_info_entry->value = g_strdup(value); - } + g_free(user_info_entry->value); + user_info_entry->value = g_strdup(value); } GaimNotifyUserInfoEntryType gaim_notify_user_info_entry_get_type(GaimNotifyUserInfoEntry *user_info_entry) { - g_return_val_if_fail(user_info_entry != NULL, NULL); - + g_return_val_if_fail(user_info_entry != NULL, GAIM_NOTIFY_USER_INFO_ENTRY_PAIR); + return user_info_entry->type; }