changeset 5663:e9551e7d6f01

[gaim-migrate @ 6077] I messed up on those checks. Now the warnings are gone, and the correct values are being returned, except for Jabber, but I'll figure that out in a second or two. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 02 Jun 2003 10:03:03 +0000
parents 937d5554021e
children 7867ae4836ac
files src/accountopt.c src/gtkaccount.c
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/accountopt.c	Mon Jun 02 09:59:35 2003 +0000
+++ b/src/accountopt.c	Mon Jun 02 10:03:03 2003 +0000
@@ -173,7 +173,7 @@
 gaim_account_option_get_default_bool(const GaimAccountOption *option)
 {
 	g_return_val_if_fail(option != NULL, FALSE);
-	g_return_val_if_fail(option->type != GAIM_PREF_BOOLEAN, FALSE);
+	g_return_val_if_fail(option->type == GAIM_PREF_BOOLEAN, FALSE);
 
 	return option->default_value.boolean;
 }
@@ -182,7 +182,7 @@
 gaim_account_option_get_default_int(const GaimAccountOption *option)
 {
 	g_return_val_if_fail(option != NULL, -1);
-	g_return_val_if_fail(option->type != GAIM_PREF_INT, -1);
+	g_return_val_if_fail(option->type == GAIM_PREF_INT, -1);
 
 	return option->default_value.integer;
 }
@@ -191,7 +191,7 @@
 gaim_account_option_get_default_string(const GaimAccountOption *option)
 {
 	g_return_val_if_fail(option != NULL, NULL);
-	g_return_val_if_fail(option->type != GAIM_PREF_STRING, NULL);
+	g_return_val_if_fail(option->type == GAIM_PREF_STRING, NULL);
 
 	return option->default_value.string;
 }
--- a/src/gtkaccount.c	Mon Jun 02 09:59:35 2003 +0000
+++ b/src/gtkaccount.c	Mon Jun 02 10:03:03 2003 +0000
@@ -452,7 +452,9 @@
 					gaim_account_option_get_default_string(option));
 
 				entry = gtk_entry_new();
-				gtk_entry_set_text(GTK_ENTRY(entry), str_value);
+
+				if (str_value != NULL)
+					gtk_entry_set_text(GTK_ENTRY(entry), str_value);
 
 				title = g_strdup_printf("%s:",
 						gaim_account_option_get_text(option));