diff options
author | Tor Lillqvist <tml@novell.com> | 2006-01-02 17:55:09 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2006-01-02 17:55:09 +0800 |
commit | aedfb5445a0b8b54455864bfa44163260a01fef1 (patch) | |
tree | 4c84b8f2624783f86ef19b5e58baa1d43d4002f3 /e-util | |
parent | 66e80f9db9830957723f2d76479f564627d0357f (diff) | |
download | gsoc2013-evolution-aedfb5445a0b8b54455864bfa44163260a01fef1.tar gsoc2013-evolution-aedfb5445a0b8b54455864bfa44163260a01fef1.tar.gz gsoc2013-evolution-aedfb5445a0b8b54455864bfa44163260a01fef1.tar.bz2 gsoc2013-evolution-aedfb5445a0b8b54455864bfa44163260a01fef1.tar.lz gsoc2013-evolution-aedfb5445a0b8b54455864bfa44163260a01fef1.tar.xz 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')
-rw-r--r-- | e-util/ChangeLog | 9 | ||||
-rw-r--r-- | 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 <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); |