comparison libpurple/sound-loader.c @ 25094:c32dd71d0658

Fixed a few small problems with the sound loader and sound theme
author Justin Rodriguez <ffdragon@soc.pidgin.im>
date Fri, 27 Jun 2008 18:04:29 +0000
parents 655a37bc0eb0
children fbf72bbd1084
comparison
equal deleted inserted replaced
25093:e8be608b6bab 25094:c32dd71d0658
69 theme = g_object_new(PURPLE_TYPE_SOUND_THEME, 69 theme = g_object_new(PURPLE_TYPE_SOUND_THEME,
70 "type", "sound", 70 "type", "sound",
71 "name", xmlnode_get_attrib(root_node, "name"), 71 "name", xmlnode_get_attrib(root_node, "name"),
72 "author", xmlnode_get_attrib(root_node, "author"), 72 "author", xmlnode_get_attrib(root_node, "author"),
73 "image", preview, 73 "image", preview,
74 "directory", dir,
74 "description", data, NULL); 75 "description", data, NULL);
75 76
76 xmlnode_free(sub_node); 77 xmlnode_free(sub_node);
77 78
78 while ((sub_node = xmlnode_get_child(root_node, "event")) != NULL){ 79 while ((sub_node = xmlnode_get_child(root_node, "event")) != NULL){
79 purple_sound_theme_set_file(theme, 80 purple_sound_theme_set_file(theme,
80 xmlnode_get_attrib(root_node, "name"), 81 xmlnode_get_attrib(sub_node, "name"),
81 xmlnode_get_attrib(root_node, "file")); 82 xmlnode_get_attrib(sub_node, "file"));
82
83 xmlnode_free(sub_node); 83 xmlnode_free(sub_node);
84 } 84 }
85 85
86 purple_imgstore_ref(preview); 86 purple_imgstore_ref(preview);
87 xmlnode_free(root_node); 87 xmlnode_free(root_node);