Mercurial > pidgin.yaz
diff src/gtksound.c @ 14035:8bda65b88e49
[gaim-migrate @ 16638]
A bunch of small changes. Mostly remove "if not null" checks before
calling g_free, g_list_free, g_slist_free and g_strdup. Also use
g_list_foreach() to call g_free to free strings in an array. And
some whitespace changes here and there.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 05 Aug 2006 08:27:39 +0000 |
parents | d0128f0efe96 |
children |
line wrap: on
line diff
--- a/src/gtksound.c Sat Aug 05 05:42:28 2006 +0000 +++ b/src/gtksound.c Sat Aug 05 08:27:39 2006 +0000 @@ -342,7 +342,7 @@ static gboolean bus_call (GstBus *bus, GstMessage *msg, - gpointer data) + gpointer data) { GstElement *play = data; GError *err; @@ -443,17 +443,17 @@ uri = g_strdup_printf("file://%s", filename); play = gst_element_factory_make("playbin", "play"); - + g_object_set(G_OBJECT(play), "uri", uri, - "volume", volume, + "volume", volume, "audio-sink", sink, NULL); gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(play)), bus_call, play); gst_element_set_state(play, GST_STATE_PLAYING); - + g_free(uri); - + #else /* USE_GSTREAMER */ gdk_beep(); return; @@ -499,7 +499,7 @@ if (gaim_prefs_get_bool(enable_pref)) { char *filename = g_strdup(gaim_prefs_get_string(file_pref)); if(!filename || !strlen(filename)) { - if(filename) g_free(filename); + g_free(filename); filename = g_build_filename(DATADIR, "sounds", "gaim", sounds[event].def, NULL); }