diff options
author | Justin Rodriguez <ffdragon@soc.pidgin.im> | 2008-06-27 18:04:29 +0000 |
---|---|---|
committer | Justin Rodriguez <ffdragon@soc.pidgin.im> | 2008-06-27 18:04:29 +0000 |
commit | 114460ec01586d20115337711d1307bc040d3d80 (patch) | |
tree | 340efea61be7a6c955092bbf742172a51e47679f | |
parent | cfcdc977ca045ee2f0a19e0327c9002cab5c77cf (diff) | |
download | pidgin-114460ec01586d20115337711d1307bc040d3d80.tar.gz |
Fixed a few small problems with the sound loader and sound theme
-rw-r--r-- | libpurple/sound-loader.c | 6 | ||||
-rw-r--r-- | libpurple/sound-theme.c | 9 | ||||
-rw-r--r-- | libpurple/theme-manager.c | 4 | ||||
-rw-r--r-- | pidgin/gtksound.c | 2 |
4 files changed, 9 insertions, 12 deletions
diff --git a/libpurple/sound-loader.c b/libpurple/sound-loader.c index 6b6c030700..628d3be33c 100644 --- a/libpurple/sound-loader.c +++ b/libpurple/sound-loader.c @@ -71,15 +71,15 @@ purple_sound_loader_build(const gchar *dir) "name", xmlnode_get_attrib(root_node, "name"), "author", xmlnode_get_attrib(root_node, "author"), "image", preview, + "directory", dir, "description", data, NULL); xmlnode_free(sub_node); while ((sub_node = xmlnode_get_child(root_node, "event")) != NULL){ purple_sound_theme_set_file(theme, - xmlnode_get_attrib(root_node, "name"), - xmlnode_get_attrib(root_node, "file")); - + xmlnode_get_attrib(sub_node, "name"), + xmlnode_get_attrib(sub_node, "file")); xmlnode_free(sub_node); } diff --git a/libpurple/sound-theme.c b/libpurple/sound-theme.c index 63e3088296..f7451f1295 100644 --- a/libpurple/sound-theme.c +++ b/libpurple/sound-theme.c @@ -144,9 +144,6 @@ purple_sound_theme_get_file_full(PurpleSoundTheme *theme, full = g_build_filename(dir, filename, NULL); - g_free(dir); - g_free(filename); - return full; } @@ -157,10 +154,10 @@ purple_sound_theme_set_file(PurpleSoundTheme *theme, { PurpleSoundThemePrivate *priv; g_return_if_fail(PURPLE_IS_SOUND_THEME(theme)); - - priv = PURPLE_SOUND_THEME_GET_PRIVATE(theme); - if (filename)g_hash_table_replace(priv->sound_files, + priv = PURPLE_SOUND_THEME_GET_PRIVATE(theme); + + if (filename != NULL)g_hash_table_replace(priv->sound_files, g_strdup(event), g_strdup(filename)); else g_hash_table_remove(priv->sound_files, event); diff --git a/libpurple/theme-manager.c b/libpurple/theme-manager.c index 2f43278b59..68dc658429 100644 --- a/libpurple/theme-manager.c +++ b/libpurple/theme-manager.c @@ -226,8 +226,8 @@ purple_theme_manager_find_theme(const gchar *name, g_return_val_if_fail(name, NULL); g_return_val_if_fail(type, NULL); - return g_hash_table_lookup (theme_table, - purple_theme_manager_make_key(name, type)); + return g_hash_table_lookup(theme_table, + purple_theme_manager_make_key(name, type)); } diff --git a/pidgin/gtksound.c b/pidgin/gtksound.c index 9b6ee8b4db..2e4728391b 100644 --- a/pidgin/gtksound.c +++ b/pidgin/gtksound.c @@ -560,7 +560,7 @@ pidgin_sound_play_event(PurpleSoundEventID event) { char *enable_pref; char *file_pref; - char *theme_pref, *theme_name; + char *theme_name; PurpleSoundTheme *theme; if ((event == PURPLE_SOUND_BUDDY_ARRIVE) && mute_login_sounds) |