comparison pidgin/gtkprefs.c @ 25737:4b8c64deac5e

Simplify device API. Use gchar* instead of GValue.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Wed, 27 Aug 2008 05:52:14 +0000
parents c48f5c9600c3
children 441492fb6b61
comparison
equal deleted inserted replaced
25736:9ff63ec7d869 25737:4b8c64deac5e
2030 GList *ret = NULL; 2030 GList *ret = NULL;
2031 2031
2032 for(; devices ; devices = devices->next) { 2032 for(; devices ; devices = devices->next) {
2033 gchar *name = purple_media_get_device_name(GST_ELEMENT(element), devices->data); 2033 gchar *name = purple_media_get_device_name(GST_ELEMENT(element), devices->data);
2034 ret = g_list_append(ret, name); 2034 ret = g_list_append(ret, name);
2035 ret = g_list_append(ret, g_value_dup_string(devices->data)); 2035 ret = g_list_append(ret, g_strdup(devices->data));
2036 } 2036 }
2037 2037
2038 return ret; 2038 return ret;
2039 } 2039 }
2040 2040
2121 if (video != NULL) { 2121 if (video != NULL) {
2122 GList *video_devices = purple_media_get_devices(video); 2122 GList *video_devices = purple_media_get_devices(video);
2123 video_items = get_device_items(video, video_devices); 2123 video_items = get_device_items(video, video_devices);
2124 for(; video_devices; video_devices = g_list_delete_link( 2124 for(; video_devices; video_devices = g_list_delete_link(
2125 video_devices, video_devices)) { 2125 video_devices, video_devices)) {
2126 g_value_unset(video_devices->data);
2127 g_free(video_devices->data); 2126 g_free(video_devices->data);
2128 } 2127 }
2129 } 2128 }
2130 2129
2131 if (video_items == NULL) { 2130 if (video_items == NULL) {
2231 if (video != NULL) { 2230 if (video != NULL) {
2232 GList *video_devices = purple_media_get_devices(video); 2231 GList *video_devices = purple_media_get_devices(video);
2233 video_items = get_device_items(video, video_devices); 2232 video_items = get_device_items(video, video_devices);
2234 for(; video_devices; video_devices = g_list_delete_link( 2233 for(; video_devices; video_devices = g_list_delete_link(
2235 video_devices, video_devices)) { 2234 video_devices, video_devices)) {
2236 g_value_unset(video_devices->data);
2237 g_free(video_devices->data); 2235 g_free(video_devices->data);
2238 } 2236 }
2239 } 2237 }
2240 2238
2241 if (audio != NULL) { 2239 if (audio != NULL) {
2242 GList *audio_devices = purple_media_get_devices(audio); 2240 GList *audio_devices = purple_media_get_devices(audio);
2243 audio_items = get_device_items(audio, audio_devices); 2241 audio_items = get_device_items(audio, audio_devices);
2244 for(; audio_devices; audio_devices = g_list_delete_link( 2242 for(; audio_devices; audio_devices = g_list_delete_link(
2245 audio_devices, audio_devices)) { 2243 audio_devices, audio_devices)) {
2246 g_value_unset(audio_devices->data);
2247 g_free(audio_devices->data); 2244 g_free(audio_devices->data);
2248 } 2245 }
2249 } 2246 }
2250 2247
2251 if (video_items == NULL) { 2248 if (video_items == NULL) {