soc.2008.themes: f3908c5d: Fixed a few small problems with the soun...

ffdragon at soc.pidgin.im ffdragon at soc.pidgin.im
Fri Jun 27 14:11:09 EDT 2008


-----------------------------------------------------------------
Revision: f3908c5d161b03f526c0a1c37d5072fcca61f9b3
Ancestor: b318b7321108077d31f3dc735677f7f8e23b555e
Author: ffdragon at soc.pidgin.im
Date: 2008-06-27T18:04:29
Branch: im.pidgin.soc.2008.themes
URL: http://d.pidgin.im/viewmtn/revision/info/f3908c5d161b03f526c0a1c37d5072fcca61f9b3

Modified files:
        libpurple/sound-loader.c libpurple/sound-theme.c
        libpurple/theme-manager.c pidgin/gtksound.c

ChangeLog: 

Fixed a few small problems with the sound loader and sound theme

-------------- next part --------------
============================================================
--- libpurple/sound-loader.c	ea4b70da389b2a2eba8c738d3d5b0c056423fe70
+++ libpurple/sound-loader.c	020bb6c6c90b5479f5eaf7b0e31bb6d9d03a87d1
@@ -71,15 +71,15 @@ purple_sound_loader_build(const gchar *d
 			    "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);
 	}
 
============================================================
--- libpurple/sound-theme.c	5342aaa1c69757db8af503f12fe6c5688bcf091d
+++ libpurple/sound-theme.c	279e84b6510b97c6590520ad6861041b8c9f0a49
@@ -144,9 +144,6 @@ purple_sound_theme_get_file_full(PurpleS
 
 	full = g_build_filename(dir, filename, NULL);
 
-	g_free(dir);
-	g_free(filename);
-
 	return full;
 }
 
@@ -157,10 +154,10 @@ purple_sound_theme_set_file(PurpleSoundT
 {
 	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,
+
+	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);
============================================================
--- libpurple/theme-manager.c	7a5bdfb17a811ff7d3d2d18d71c0cf79f24e186c
+++ libpurple/theme-manager.c	df6a74738d8ab1192edd1bff6e81de24a7ad328a
@@ -226,8 +226,8 @@ purple_theme_manager_find_theme(const gc
 	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));
 }
 
 
============================================================
--- pidgin/gtksound.c	d9ce4c4a32f2e3cd64aafb0b49f87d2ebbb4311b
+++ pidgin/gtksound.c	8a1e3e32144a1003d1fccdeb989caec8e2205c22
@@ -560,7 +560,7 @@ pidgin_sound_play_event(PurpleSoundEvent
 {
 	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)


More information about the Commits mailing list