[Goodies-commits] r4129 - xfbib/trunk/src
David Gustafsson
tssj at xfce.org
Sat Mar 29 21:11:43 CET 2008
Author: tssj
Date: 2008-03-29 20:11:43 +0000 (Sat, 29 Mar 2008)
New Revision: 4129
Modified:
xfbib/trunk/src/entry_edit_dialog.c
xfbib/trunk/src/node.c
xfbib/trunk/src/node.h
Log:
Fixed a bug that appeared when freeing tags
Modified: xfbib/trunk/src/entry_edit_dialog.c
===================================================================
--- xfbib/trunk/src/entry_edit_dialog.c 2008-03-29 19:51:53 UTC (rev 4128)
+++ xfbib/trunk/src/entry_edit_dialog.c 2008-03-29 20:11:43 UTC (rev 4129)
@@ -557,8 +557,7 @@
_DEBUG(("Edit old entry"));
selected->key = strdup(key);
selected->type = strdup(type);
- free_tags(selected->tags);
- selected->tags = NULL;
+ remove_tags(selected);
}
for (i = 0; i < N_ENTRIES; i++) {
if(GTK_WIDGET_IS_SENSITIVE(GTK_WIDGET(edit_entry[i].entry))) {
Modified: xfbib/trunk/src/node.c
===================================================================
--- xfbib/trunk/src/node.c 2008-03-29 19:51:53 UTC (rev 4128)
+++ xfbib/trunk/src/node.c 2008-03-29 20:11:43 UTC (rev 4129)
@@ -90,6 +90,13 @@
new_tag(&(entry->tags), name, value, sense);
}
+void remove_tags(struct entry *entry)
+{
+ _DEBUG(("remove_tags"));
+ free_tags(entry->tags);
+ entry->tags = NULL;
+}
+
void print_list(struct node *node)
{
_DEBUG(("print_list"));
Modified: xfbib/trunk/src/node.h
===================================================================
--- xfbib/trunk/src/node.h 2008-03-29 19:51:53 UTC (rev 4128)
+++ xfbib/trunk/src/node.h 2008-03-29 20:11:43 UTC (rev 4129)
@@ -34,6 +34,7 @@
void add_comment(struct node**, char*);
void add_string(struct node**, char*, char*);
void add_tag(struct entry*, char*, char*, int);
+void remove_tags(struct entry*);
void print_list(struct node*);
void write_list(struct node*, FILE*);
void free_list(struct node*);
More information about the Goodies-commits
mailing list