diff options
-rw-r--r-- | shell/ChangeLog | 10 | ||||
-rw-r--r-- | shell/e-setup.c | 9 | ||||
-rw-r--r-- | shell/e-shell-user-creatable-items-handler.c | 10 | ||||
-rw-r--r-- | shell/e-shell.c | 5 |
4 files changed, 29 insertions, 5 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 556428e0f6..711a05fff9 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,13 @@ +2003-04-15 Hans Petter Jansson <hpj@ximian.com> + + * e-setup.c (e_setup_check_config): Free the temporary string. + + * e-shell-user-creatable-items-handler.c (append_xml_for_menu_item): + Free the icon xml string. + + * e-shell.c (parse_default_uri): Free the component name, the + configuration path and the temporary path. + 2003-04-15 Dan Winship <danw@ximian.com> * e-folder.c (e_folder_get_has_subfolders, diff --git a/shell/e-setup.c b/shell/e-setup.c index 6cd0726b2f..ce9389b781 100644 --- a/shell/e-setup.c +++ b/shell/e-setup.c @@ -303,11 +303,18 @@ e_setup_check_config (const char *evolution_directory) { GConfClient *client; char *tmp; + gboolean present = FALSE; client = gconf_client_get_default (); tmp = gconf_client_get_string (client, "/apps/evolution/shell/default_folders/mail_uri", NULL); - if (tmp != NULL && *tmp != 0) { + if (tmp != NULL) { + if (*tmp != 0) + present = TRUE; + g_free (tmp); + } + + if (present) { g_object_unref (client); return; } diff --git a/shell/e-shell-user-creatable-items-handler.c b/shell/e-shell-user-creatable-items-handler.c index ebd5be0911..efc1b24f5f 100644 --- a/shell/e-shell-user-creatable-items-handler.c +++ b/shell/e-shell-user-creatable-items-handler.c @@ -307,9 +307,13 @@ append_xml_for_menu_item (GString *xml, else if (item->shortcut != '\0') g_string_append_printf (xml, " accel=\"*Control**Shift*%c\"", item->shortcut); - if (item->icon != NULL) - g_string_append_printf (xml, " pixtype=\"pixbuf\" pixname=\"%s\"", - bonobo_ui_util_pixbuf_to_xml (item->icon)); + if (item->icon != NULL) { + char *icon_xml; + + icon_xml = bonobo_ui_util_pixbuf_to_xml (item->icon); + g_string_append_printf (xml, " pixtype=\"pixbuf\" pixname=\"%s\"", icon_xml); + g_free (icon_xml); + } encoded_tooltip = bonobo_ui_util_encode_str (item->tooltip); g_string_append_printf (xml, " tip=\"%s\"", encoded_tooltip); diff --git a/shell/e-shell.c b/shell/e-shell.c index f8b1f2df89..8985f42661 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -2152,7 +2152,7 @@ parse_default_uri (EShell *shell, { GConfClient *client; const char *component_start; - const char *component; + char *component; const char *p; char *config_path; char *path; @@ -2170,6 +2170,8 @@ parse_default_uri (EShell *shell, config_path = g_strdup_printf ("/apps/evolution/shell/default_folders/%s_path", component); path = gconf_client_get_string (client, config_path, NULL); g_object_unref (client); + g_free (component); + g_free (config_path); /* We expect an evolution: URI here, if we don't get it then something is messed up. */ @@ -2192,6 +2194,7 @@ parse_default_uri (EShell *shell, *extra_return = g_strdup (p + 1); } + g_free (path); return TRUE; } |