Revision: 18058
http://svn.sourceforge.net/gaim/?rev=18058&view=rev
Author: evands
Date: 2006-12-26 11:22:03 -0800 (Tue, 26 Dec 2006)
Log Message:
-----------
* 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.
Modified Paths:
--------------
trunk/libgaim/notify.c
Modified: trunk/libgaim/notify.c
===================================================================
--- trunk/libgaim/notify.c 2006-12-26 03:39:37 UTC (rev 18057)
+++ trunk/libgaim/notify.c 2006-12-26 19:22:03 UTC (rev 18058)
@@ -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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|