Re: [evolution-patches] camel provider changes for connector
- From: Not Zed <notzed ximian com>
- To: Sarfraaz Ahmed <asarfraaz novell com>
- Cc: evolution-patches lists ximian com
- Subject: Re: [evolution-patches] camel provider changes for connector
- Date: Mon, 03 May 2004 16:43:22 +0800
Almost there.
if (!accepted) {
/* Since the license is not yet accepted, pop-up a
* dialog to display the license agreement and check
* if the user accepts it
*/
- if (display_license (prov->license_file)) {
- status = gconf_client_set_bool (gconf,
- gconf_license_key, TRUE, NULL);
+ if (display_license (prov)) {
+ providers_list = g_slist_append (providers_list,
+ (gpointer)prov->protocol);
+ status = gconf_client_set_list (gconf,
+ "/apps/evolution/mail/licenses",
+ GCONF_VALUE_STRING,
+ providers_list, NULL);
} else {
- g_free (gconf_license_key);
+ g_slist_free (providers_list);
return FALSE;
}
}
- g_free (gconf_license_key);
+ g_slist_free (providers_list);
}
you also have to free the strings in the slist, otherwise they leak.
I suggest instead of having the two return statements, just have one at the end, and let the logic fall through to that case. This way you only need 1 copy of the free code.
e.g. "return accepted;" at the end, and set accepted based on the display_license return.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]