Mercurial > pidgin
comparison finch/gntsound.c @ 29315:7b1cfd48beab
propagate from branch 'im.pidgin.cpw.attention_ui' (head 3d97b094123bd082b1438ea44cb25169aa41315c)
to branch 'im.pidgin.pidgin.next.minor' (head d00241305ccc36eef5bd6723980b66a2e6108856)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Mon, 16 Nov 2009 22:06:27 +0000 |
parents | d6dff41a6d4c |
children | a87764155fa5 |
comparison
equal
deleted
inserted
replaced
29314:c783f9e66171 | 29315:7b1cfd48beab |
---|---|
557 return; | 557 return; |
558 #endif /* USE_GSTREAMER */ | 558 #endif /* USE_GSTREAMER */ |
559 #else /* _WIN32 */ | 559 #else /* _WIN32 */ |
560 purple_debug_info("sound", "Playing %s\n", filename); | 560 purple_debug_info("sound", "Playing %s\n", filename); |
561 | 561 |
562 if (G_WIN32_HAVE_WIDECHAR_API ()) { | 562 { |
563 wchar_t *wc_filename = g_utf8_to_utf16(filename, | 563 wchar_t *wc_filename = g_utf8_to_utf16(filename, |
564 -1, NULL, NULL, NULL); | 564 -1, NULL, NULL, NULL); |
565 if (!PlaySoundW(wc_filename, NULL, SND_ASYNC | SND_FILENAME)) | 565 if (!PlaySoundW(wc_filename, NULL, SND_ASYNC | SND_FILENAME)) |
566 purple_debug(PURPLE_DEBUG_ERROR, "sound", "Error playing sound.\n"); | 566 purple_debug(PURPLE_DEBUG_ERROR, "sound", "Error playing sound.\n"); |
567 g_free(wc_filename); | 567 g_free(wc_filename); |
568 } else { | |
569 char *l_filename = g_locale_from_utf8(filename, | |
570 -1, NULL, NULL, NULL); | |
571 if (!PlaySoundA(l_filename, NULL, SND_ASYNC | SND_FILENAME)) | |
572 purple_debug(PURPLE_DEBUG_ERROR, "sound", "Error playing sound.\n"); | |
573 g_free(l_filename); | |
574 } | 568 } |
575 #endif /* _WIN32 */ | 569 #endif /* _WIN32 */ |
576 } | 570 } |
577 | 571 |
578 static void | 572 static void |