From aedfb5445a0b8b54455864bfa44163260a01fef1 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 2 Jan 2006 09:55:09 +0000 Subject: Don't eventually free a return value from xmlGetProp() with g_free(). 2006-01-02 Tor Lillqvist * e-menu.c (emph_construct_menu): Don't eventually free a return value from xmlGetProp() with g_free(). g_strdup() it first, and xmlFree() what xmlGetProp() returned. On Win32, replace a configure-time prefix of the ui file with the run-time one. svn path=/trunk/; revision=31021 --- e-util/ChangeLog | 9 +++++++++ e-util/e-menu.c | 20 +++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 1519cf9bdc..c368e99af9 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,12 @@ +2006-01-02 Tor Lillqvist + + * e-menu.c (emph_construct_menu): Don't eventually free a return + value from xmlGetProp() with g_free(). g_strdup() it first, and + xmlFree() what xmlGetProp() returned. + + On Win32, replace a configure-time prefix of the ui file with the + run-time one. + 2005-12-19 Chenthill Palanisamy committing for David Trowbridge diff --git a/e-util/e-menu.c b/e-util/e-menu.c index 7ed8b12483..a19197ba7a 100644 --- a/e-util/e-menu.c +++ b/e-util/e-menu.c @@ -29,13 +29,14 @@ #include -#include "e-menu.h" - -#include - #include #include +#include + +#include "e-menu.h" +#include "e-icon-factory.h" + #define d(x) struct _EMenuFactory { @@ -784,7 +785,16 @@ emph_construct_menu(EPluginHook *eph, xmlNodePtr root) if (tmp) { EMenuUIFile *ui = g_malloc0(sizeof(*ui)); - ui->filename = tmp; + ui->filename = g_strdup(tmp); + xmlFree(tmp); +#ifdef G_OS_WIN32 + { + char *mapped_location = e_util_replace_prefix (e_util_get_prefix (), + ui->filename); + g_free (ui->filename); + ui->filename = mapped_location; + } +#endif ui->appdir = g_strdup(g_get_tmp_dir()); ui->appname = g_strdup("Evolution"); menu->uis = g_slist_append(menu->uis, ui); -- cgit v1.2.3