Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
83602675
Commit
83602675
authored
Mar 16, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: probe the complete names for Volume in Disc open
This gets quite useful, when you have many drives
parent
77360d65
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+16
-5
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
83602675
...
@@ -37,6 +37,9 @@
...
@@ -37,6 +37,9 @@
#include "util/qt_dirs.hpp"
#include "util/qt_dirs.hpp"
#include <vlc_intf_strings.h>
#include <vlc_intf_strings.h>
#include <vlc_modules.h>
#include <vlc_modules.h>
#ifdef WIN32
#include <vlc_charset.h>
/* FromWide for Win32 */
#endif
#include <QFileDialog>
#include <QFileDialog>
#include <QDialogButtonBox>
#include <QDialogButtonBox>
...
@@ -346,17 +349,25 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -346,17 +349,25 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
ui
.
deviceCombo
->
setToolTip
(
qtr
(
I_DEVICE_TOOLTIP
)
);
ui
.
deviceCombo
->
setToolTip
(
qtr
(
I_DEVICE_TOOLTIP
)
);
#ifdef WIN32
/* Disc drives probing for Windows */
#ifdef WIN32
/* Disc drives probing for Windows */
char
szDrives
[
512
];
wchar_t
szDrives
[
512
];
szDrives
[
0
]
=
'\0'
;
szDrives
[
0
]
=
'\0'
;
if
(
GetLogicalDriveStrings
A
(
sizeof
(
szDrives
)
-
1
,
szDrives
)
)
if
(
GetLogicalDriveStrings
W
(
sizeof
(
szDrives
)
-
1
,
szDrives
)
)
{
{
char
*
drive
=
szDrives
;
wchar_t
*
drive
=
szDrives
;
UINT
oldMode
=
SetErrorMode
(
SEM_FAILCRITICALERRORS
);
UINT
oldMode
=
SetErrorMode
(
SEM_FAILCRITICALERRORS
);
while
(
*
drive
)
while
(
*
drive
)
{
{
if
(
GetDriveType
A
(
drive
)
==
DRIVE_CDROM
)
if
(
GetDriveType
W
(
drive
)
==
DRIVE_CDROM
)
{
{
ui
.
deviceCombo
->
addItem
(
drive
);
wchar_t
psz_name
[
512
]
=
L""
;
GetVolumeInformationW
(
drive
,
psz_name
,
511
,
NULL
,
NULL
,
NULL
,
NULL
,
0
);
QString
displayName
=
FromWide
(
drive
);
if
(
!
EMPTY_STR
(
psz_name
)
)
{
displayName
=
displayName
+
" - "
+
FromWide
(
psz_name
);
}
ui
.
deviceCombo
->
addItem
(
displayName
,
FromWide
(
drive
)
);
}
}
/* go to next drive */
/* go to next drive */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment