process_theme_info(xmlnode *node, gchar **info) { child = xmlnode_get_child(node, "name"); info[0] = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(node, "version"); info[1] = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(node, "description"); info[2] = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(node, "author"); info[3] = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(node, "website"); info[4] = g_strdup(xmlnode_get_attrib(child, "value")); process_basic_theme(xmlnode *node, gf_basic_theme *basic) { parent = xmlnode_get_child(node, "image"); basic->image = g_strdup(xmlnode_get_attrib(parent, "value")); parent = xmlnode_get_child(node, "text"); child = xmlnode_get_child(parent, "font"); basic->text_custom_font = atoi(xmlnode_get_attrib(child, "custom")); basic->text_font = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "color"); basic->text_custom_color = atoi(xmlnode_get_attrib(child, "custom")); basic->text_color = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "clipping"); basic->text_clipping = atoi(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "position"); basic->text_position = atoi(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "offset"); basic->text_horz_offset = atoi(xmlnode_get_attrib(child, "horizontal")); basic->text_vert_offset = atoi(xmlnode_get_attrib(child, "vertical")); parent = xmlnode_get_child(node, "icon"); child = xmlnode_get_child(parent, "position"); basic->proto_position = atoi(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "size"); basic->proto_size = atoi(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "offset"); basic->proto_horz_offset = atoi(xmlnode_get_attrib(child, "horizontal")); basic->proto_vert_offset = atoi(xmlnode_get_attrib(child, "vertical")); parent = xmlnode_get_child(node, "messages"); child = xmlnode_get_child(parent, "signon"); basic->messages[0] = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "signoff"); basic->messages[1] = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "away"); basic->messages[2] = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "back"); basic->messages[3] = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "idle"); basic->messages[4] = g_strdup(xmlnode_get_attrib(child, "value")); child = xmlnode_get_child(parent, "unidle"); basic->messages[5] = g_strdup(xmlnode_get_attrib(child, "value")); read_theme(gchar *path, gf_theme *theme, gchar **error) { xmlnode *node, *parent, *child; file = g_strdup_printf("%s%stheme.xml", path, G_DIR_SEPARATOR_S); if (!g_file_get_contents(file, &contents, &length, &gerror)) { (*error) = g_strdup(gerror->message); node = xmlnode_from_str(contents, length); (*error) = g_strdup("Error parsing theme"); parent = xmlnode_get_child(node, "info"); child = xmlnode_get_child(parent, "type"); theme->type = atoi(xmlnode_get_attrib(child, "value")); process_theme_info(parent, theme->info); if (theme->type == gf_theme_type_basic) { parent = xmlnode_get_child(node, "basic"); process_basic_theme(parent, &theme->data.basic); else if (theme->type == gf_theme_type_advanced) {