Commit f576768c authored by Darin Adler's avatar Darin Adler

Skip over non-element nodes when walking libxml DOM tree.

	* src/nautilus-property-browser.c: (remove_color),
	(make_properties_from_xml_node),
	(nautilus_property_browser_update_contents):
	Skip over non-element nodes when walking libxml DOM tree.

	* libnautilus-private/nautilus-theme.c:
	(nautilus_theme_get_theme_data_from_theme): Whitespace tweak.
parent a238fef0
2001-11-30 Darin Adler <darin@bentspoon.com>
* src/nautilus-bookmark-list.c: (nautilus_bookmark_list_load_file):
* src/nautilus-property-browser.c: (remove_color),
(make_properties_from_xml_node),
(nautilus_property_browser_update_contents):
Skip over non-element nodes when walking libxml DOM tree.
* libnautilus-private/nautilus-theme.c:
(nautilus_theme_get_theme_data_from_theme): Whitespace tweak.
2001-11-30 Darin Adler <darin@bentspoon.com>
* libnautilus-private/nautilus-directory-async.c:
......
......@@ -184,7 +184,7 @@ nautilus_theme_get_theme_data_from_theme (const char *resource_name, const char
if (theme_document != NULL) {
/* fetch the resource node */
resource_node = eel_xml_get_child_by_name (xmlDocGetRootElement (theme_document), resource_name);
if (resource_node) {
if (resource_node) {
temp_str = xmlGetProp(resource_node, property_name);
if (temp_str) {
theme_data = g_strdup (temp_str);
......
......@@ -440,6 +440,10 @@ nautilus_bookmark_list_load_file (NautilusBookmarkList *bookmarks)
node != NULL;
node = node->next) {
if (node->type != XML_ELEMENT_NODE) {
continue;
}
if (strcmp (node->name, "bookmark") == 0) {
insert_bookmark_internal (bookmarks,
nautilus_bookmark_new_from_node (node),
......
......@@ -807,6 +807,11 @@ remove_color (NautilusPropertyBrowser *property_browser, const char* color_value
for (color_node = eel_xml_get_children (cur_node);
color_node != NULL;
color_node = color_node->next) {
if (color_node->type != XML_ELEMENT_NODE) {
continue;
}
color_content = xmlNodeGetContent(color_node);
match = color_content != NULL
&& strcmp (color_content, color_value) == 0;
......@@ -1778,6 +1783,11 @@ make_properties_from_xml_node (NautilusPropertyBrowser *property_browser,
for (child_node = eel_xml_get_children (node);
child_node != NULL;
child_node = child_node->next) {
if (child_node->type != XML_ELEMENT_NODE) {
continue;
}
deleted = xmlGetProp (child_node, "deleted");
local = xmlGetProp (child_node, "local");
......@@ -1966,6 +1976,11 @@ nautilus_property_browser_update_contents (NautilusPropertyBrowser *property_bro
for (cur_node = eel_xml_get_children (xmlDocGetRootElement (document));
cur_node != NULL;
cur_node = cur_node->next) {
if (cur_node->type != XML_ELEMENT_NODE) {
continue;
}
if (strcmp (cur_node->name, "category") == 0) {
name = xmlGetProp (cur_node, "name");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment