From: Mart Raudsepp Date: Sat, 11 Feb 2006 11:47:12 +0000 (+0000) Subject: I like if things compile with --enable-unicode + --enable-mediactrl. Code shamelessly... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/27ef4b9b2963557ed5b6592b72e916e5d1c40124 I like if things compile with --enable-unicode + --enable-mediactrl. Code shamelessly stolen from src/gtk/app.cpp. gst backend of wxMediaCtrl doesn't seem to be able to load files (at least in unicode) though... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index b461f9d965..d637d4cf3b 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -990,7 +990,30 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, // //init gstreamer // +#if wxUSE_UNICODE + int i; + char **argvGST = new char*[wxTheApp->argc + 1]; + for ( i = 0; i < wxTheApp->argc; i++ ) + { + argvGST[i] = wxStrdupA(wxConvUTF8.cWX2MB(wxTheApp->argv[i])); + } + + argvGST[wxTheApp->argc] = NULL; + + int argcGST = wxTheApp->argc; + + gst_init(&argcGST, &argvGST); + + // free our copy + for ( i = 0; i < argcGST; i++ ) + { + free(argvGST[i]); + } + + delete [] argvGST; +#else gst_init(&wxTheApp->argc, &wxTheApp->argv); +#endif // // wxControl creation