aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-menu.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2006-01-02 17:55:09 +0800
committerTor Lillqvist <tml@src.gnome.org>2006-01-02 17:55:09 +0800
commitaedfb5445a0b8b54455864bfa44163260a01fef1 (patch)
tree4c84b8f2624783f86ef19b5e58baa1d43d4002f3 /e-util/e-menu.c
parent66e80f9db9830957723f2d76479f564627d0357f (diff)
downloadgsoc2013-evolution-aedfb5445a0b8b54455864bfa44163260a01fef1.tar.gz
gsoc2013-evolution-aedfb5445a0b8b54455864bfa44163260a01fef1.tar.zst
gsoc2013-evolution-aedfb5445a0b8b54455864bfa44163260a01fef1.zip
Don't eventually free a return value from xmlGetProp() with g_free().
2006-01-02 Tor Lillqvist <tml@novell.com> * 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
Diffstat (limited to 'e-util/e-menu.c')
-rw-r--r--e-util/e-menu.c20
1 files changed, 15 insertions, 5 deletions
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 <glib.h>
-#include "e-menu.h"
-
-#include <e-util/e-icon-factory.h>
-
#include <libgnome/gnome-i18n.h>
#include <bonobo/bonobo-ui-util.h>
+#include <libedataserver/e-util.h>
+
+#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);