vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <[email protected]> | Sat Mar 31 22:20:58 2012 +0200| [aa1ea08257e16ef347a0aecbac0e953f98df084f] | committer: Jean-Baptiste Kempf
Qt: fix drive selection on Windows And close #6536 (cherry picked from commit 5a2390a78863423a6b5108debd1c6939ac5ab38a) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=aa1ea08257e16ef347a0aecbac0e953f98df084f --- modules/gui/qt4/components/open_panels.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp index 3f90eb7..5dedbdc 100644 --- a/modules/gui/qt4/components/open_panels.cpp +++ b/modules/gui/qt4/components/open_panels.cpp @@ -373,6 +373,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : void DiscOpenPanel::onFocus() { + ui.deviceCombo->clear(); #ifdef WIN32 /* Disc drives probing for Windows */ wchar_t szDrives[512]; szDrives[0] = '\0'; @@ -388,11 +389,13 @@ void DiscOpenPanel::onFocus() GetVolumeInformationW( drive, psz_name, 511, NULL, NULL, NULL, NULL, 0 ); QString displayName = FromWide( drive ); - if( !*psz_name ) { - displayName = displayName + " - " + FromWide( psz_name ); + char *psz_title = FromWide( psz_name ); + if( !EMPTY_STR(psz_title)) { + displayName = displayName + " - " + psz_title; } ui.deviceCombo->addItem( displayName, FromWide( drive ) ); + free( psz_title ); } /* go to next drive */ _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
