aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/ChangeLog5
-rw-r--r--widgets/menus/gal-view-menus.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog
index bf376501c8..f822dc8399 100644
--- a/widgets/ChangeLog
+++ b/widgets/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-12 Dan Winship <danw@ximian.com>
+
+ * menus/gal-view-menus.c (build_menus): Fix a memory leak.
+ (Doesn't anyone ever change any other file in this directory? :)
+
2001-04-10 Gediminas Paulauskas <menesis@delfi.lt>
* menus/gal-view-menus.c: convert label to utf8.
diff --git a/widgets/menus/gal-view-menus.c b/widgets/menus/gal-view-menus.c
index 01fbdc3b51..7f97b71531 100644
--- a/widgets/menus/gal-view-menus.c
+++ b/widgets/menus/gal-view-menus.c
@@ -161,8 +161,7 @@ build_menus(GalViewMenus *menus)
int length;
int i;
GalViewCollection *collection = menus->priv->collection;
-
-
+ char *label;
root = bonobo_ui_node_new("Root");
menu = bonobo_ui_node_new_child(root, "menu");
@@ -194,8 +193,9 @@ build_menus(GalViewMenus *menus)
menuitem = bonobo_ui_node_new_child(submenu, "menuitem");
bonobo_ui_node_set_attr(menuitem, "name", "DefineViews");
- bonobo_ui_node_set_attr(menuitem, "_label",
- e_utf8_from_locale_string(_("Define Views")));
+ label = e_utf8_from_locale_string(_("Define Views"));
+ bonobo_ui_node_set_attr(menuitem, "_label", label);
+ g_free (label);
bonobo_ui_node_set_attr(menuitem, "verb", "DefineViews");
string = bonobo_ui_node_to_string(root, TRUE);