aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog9
-rw-r--r--e-util/e-menu.c20
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 <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.
+
2005-12-19 Chenthill Palanisamy <pchenthill@novell.com>
committing for David Trowbridge <trowbrds cs colorado edu>
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);