From 5525e1d983124ed0612665614b6841bb6b87118b Mon Sep 17 00:00:00 2001 From: Dennis Tomas Date: Wed, 18 Jul 2007 20:18:33 +0200 Subject: [PATCH] Label unlabeled icons in pan/pb config files when adding them. --- ROX-Filer/src/panel.c | 5 ++--- ROX-Filer/src/pinboard.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ROX-Filer/src/panel.c b/ROX-Filer/src/panel.c index cdec3f11..72041d4c 100644 --- a/ROX-Filer/src/panel.c +++ b/ROX-Filer/src/panel.c @@ -597,8 +597,6 @@ static void panel_load_side(Panel *panel, xmlNodePtr side, gboolean after) continue; label = xmlGetProp(node, "label"); - if (!label) - label = g_strdup(""); path = xmlNodeGetContent(node); if (!path) path = g_strdup(""); @@ -616,7 +614,8 @@ static void panel_load_side(Panel *panel, xmlNodePtr side, gboolean after) panel_add_item(panel, path, label, after, shortcut, args, locked); g_free(path); - g_free(label); + if (label) + g_free(label); g_free(shortcut); g_free(args); } diff --git a/ROX-Filer/src/pinboard.c b/ROX-Filer/src/pinboard.c index dfbdc8ba..055ef4c5 100644 --- a/ROX-Filer/src/pinboard.c +++ b/ROX-Filer/src/pinboard.c @@ -1527,8 +1527,6 @@ static void pinboard_load_from_xml(xmlDocPtr doc) g_free(tmp); label = xmlGetProp(node, "label"); - if (!label) - label = g_strdup(""); path = xmlNodeGetContent(node); if (!path) path = g_strdup(""); @@ -1547,7 +1545,8 @@ static void pinboard_load_from_xml(xmlDocPtr doc) pinboard_pin_with_args(path, label, x, y, shortcut, args, locked, FALSE); g_free(path); - g_free(label); + if (label) + g_free(label); g_free(shortcut); g_free(args); } -- 2.11.4.GIT