Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
845b36f0
Commit
845b36f0
authored
Dec 13, 2003
by
Rocky Bernstein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More Open Disc range customizing/narrowing and some code cleanup.
parent
4fac715a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
48 deletions
+52
-48
modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/open.cpp
+52
-48
No files found.
modules/gui/wxwindows/open.cpp
View file @
845b36f0
/*****************************************************************************
/*****************************************************************************
* open.cpp : wxWindows plugin for vlc
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2000
-2001
VideoLAN
* Copyright (C) 2000
, 2001, 2003
VideoLAN
* $Id: open.cpp,v 1.5
2 2003/12/13 00:45:00
rocky Exp $
* $Id: open.cpp,v 1.5
3 2003/12/13 20:13:07
rocky Exp $
*
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
*
...
@@ -1017,11 +1017,11 @@ void OpenDialog::OnDiscDeviceChange( wxCommandEvent& event )
...
@@ -1017,11 +1017,11 @@ void OpenDialog::OnDiscDeviceChange( wxCommandEvent& event )
case
3
:
case
3
:
psz_device
=
config_GetPsz
(
p_intf
,
"cd-audio"
);
psz_device
=
config_GetPsz
(
p_intf
,
"cd-audio"
);
break
;
break
;
case
2
:
case
2
:
psz_device
=
config_GetPsz
(
p_intf
,
"vcd"
);
psz_device
=
config_GetPsz
(
p_intf
,
"vcd"
);
break
;
break
;
default:
default:
psz_device
=
config_GetPsz
(
p_intf
,
"dvd"
);
psz_device
=
config_GetPsz
(
p_intf
,
"dvd"
);
break
;
break
;
...
@@ -1039,73 +1039,77 @@ void OpenDialog::OnDiscDeviceChange( wxCommandEvent& event )
...
@@ -1039,73 +1039,77 @@ void OpenDialog::OnDiscDeviceChange( wxCommandEvent& event )
void
OpenDialog
::
OnDiscTypeChange
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
void
OpenDialog
::
OnDiscTypeChange
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
{
{
char
*
psz_device
;
char
*
psz_device
=
NULL
;
int
i_selection
=
1
;
/* Default Title/Track selection number*/
switch
(
disc_type
->
GetSelection
()
)
switch
(
disc_type
->
GetSelection
()
)
{
{
case
3
:
psz_device
=
config_GetPsz
(
p_intf
,
"cd-audio"
);
if
(
!
b_disc_device_changed
)
{
disc_device
->
SetValue
(
psz_device
?
wxU
(
psz_device
)
:
wxT
(
""
)
);
disc_title_label
->
SetLabel
(
wxT
(
"Track"
)
);
}
break
;
case
2
:
case
0
:
/* DVD with menues */
psz_device
=
config_GetPsz
(
p_intf
,
"vcd"
);
i_selection
=
0
;
if
(
!
b_disc_device_changed
)
/* Fall through... */
{
disc_device
->
SetValue
(
psz_device
?
wxU
(
psz_device
)
:
wxT
(
""
)
);
disc_title_label
->
SetLabel
(
config_GetInt
(
p_intf
,
"vcdx-PBC"
)
?
wxT
(
"PBC LID"
)
:
wxT
(
"Entry"
)
);
}
break
;
default:
case
1
:
/* DVD of some sort */
{
psz_device
=
config_GetPsz
(
p_intf
,
"dvd"
);
psz_device
=
config_GetPsz
(
p_intf
,
"dvd"
);
if
(
!
b_disc_device_changed
)
if
(
!
b_disc_device_changed
)
{
{
disc_device
->
SetValue
(
psz_device
?
wxU
(
psz_device
)
:
wxT
(
""
)
);
disc_device
->
SetValue
(
psz_device
?
wxU
(
psz_device
)
:
wxT
(
""
)
);
disc_title_label
->
SetLabel
(
wxT
(
"Title"
)
);
disc_title_label
->
SetLabel
(
wxT
(
"Title"
)
);
}
disc_title
->
SetRange
(
i_selection
,
255
);
disc_title
->
SetValue
(
i_selection
);
break
;
}
case
2
:
/* VCD of some sort */
psz_device
=
config_GetPsz
(
p_intf
,
"vcd"
);
if
(
!
b_disc_device_changed
)
{
disc_device
->
SetValue
(
psz_device
?
wxU
(
psz_device
)
:
wxT
(
""
)
);
}
}
break
;
}
if
(
psz_device
)
free
(
psz_device
);
/* There are at most 98, tracks in a VCD, 999 Segments, 500 entries
I don't know what the limit is for LIDs, 999 is probably safe
though.
switch
(
disc_type
->
GetSelection
()
)
FIXME: it would be better however to get the information for
{
this particular Media possibly from the General Info area.
case
0
:
*/
disc_title
->
SetRange
(
0
,
255
);
disc_title
->
SetValue
(
0
);
break
;
case
2
:
/* There are at most 100 tracks in a VCD */
disc_title
->
SetRange
(
0
,
100
);
#ifdef HAVE_VCDX
#ifdef HAVE_VCDX
disc_title
->
SetValue
(
0
);
disc_title_label
->
SetLabel
(
config_GetInt
(
p_intf
,
"vcdx-PBC"
)
?
wxT
(
"PBC LID"
)
:
wxT
(
"Entry"
)
);
disc_title
->
SetRange
(
0
,
999
);
i_selection
=
0
;
#else
#else
disc_title
->
SetValue
(
1
);
disc_title_label
->
SetLabel
(
wxT
(
"Track"
)
);
disc_title
->
SetRange
(
1
,
98
);
#endif
#endif
disc_title
->
SetValue
(
i_selection
);
break
;
break
;
case
3
:
/* There are at most 100 tracks in a CD */
case
3
:
/* CD-DA */
psz_device
=
config_GetPsz
(
p_intf
,
"cd-audio"
);
if
(
!
b_disc_device_changed
)
{
disc_device
->
SetValue
(
psz_device
?
wxU
(
psz_device
)
:
wxT
(
""
)
);
}
disc_title_label
->
SetLabel
(
wxT
(
"Track"
)
);
#ifdef HAVE_CDDAX
#ifdef HAVE_CDDAX
disc_title
->
SetRange
(
0
,
100
);
i_selection
=
0
;
disc_title
->
SetValue
(
0
);
break
;
#else
disc_title
->
SetRange
(
1
,
100
);
disc_title
->
SetValue
(
1
);
#endif
#endif
/* There are at most 99 tracks in a CD-DA */
disc_title
->
SetRange
(
i_selection
,
99
);
disc_title
->
SetValue
(
i_selection
);
break
;
break
;
default:
default:
disc_title
->
SetRange
(
1
,
255
);
msg_Err
(
p_intf
,
"invalid Disc type selection (%d)"
,
disc_title
->
SetValue
(
1
);
disc_type
->
GetSelection
()
);
break
;
break
;
}
}
if
(
psz_device
)
free
(
psz_device
);
disc_chapter
->
SetRange
(
1
,
255
);
disc_chapter
->
SetRange
(
1
,
255
);
disc_chapter
->
SetValue
(
1
);
disc_chapter
->
SetValue
(
1
);
...
...
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