Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
970fb944
Commit
970fb944
authored
Mar 18, 2004
by
Rocky Bernstein
Browse files
Allow setting the subtitle track from the VCD tab (by usurping the
"Chapter" entry).
parent
e5a7499f
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/gui/wxwindows/open.cpp
View file @
970fb944
...
...
@@ -679,7 +679,7 @@ void OpenDialog::UpdateMRL( int i_access_method )
switch
(
i_disc_type_selection
)
{
case
0
:
case
0
:
/* DVD with menues */
disc_chapter
->
Enable
();
disc_chapter_label
->
Enable
();
mrltemp
=
wxT
(
"dvd://"
)
...
...
@@ -688,7 +688,8 @@ void OpenDialog::UpdateMRL( int i_access_method )
disc_title
->
GetValue
(),
disc_chapter
->
GetValue
()
);
break
;
case
1
:
case
1
:
/* DVD of some sort */
disc_chapter
->
Enable
();
disc_chapter_label
->
Enable
();
mrltemp
=
wxT
(
"dvdsimple://"
)
...
...
@@ -697,9 +698,16 @@ void OpenDialog::UpdateMRL( int i_access_method )
disc_title
->
GetValue
(),
disc_chapter
->
GetValue
()
);
break
;
case
2
:
disc_chapter
->
Disable
();
disc_chapter_label
->
Disable
();
case
2
:
/* VCD of some sort */
{
/* The chapter object is used for subtitles */
int
i_subtitle
=
disc_chapter
->
GetValue
();
config_PutInt
(
p_intf
,
"spu-channel"
,
i_subtitle
);
disc_chapter
->
Enable
();
disc_chapter_label
->
Enable
();
#ifdef HAVE_VCDX
if
(
disc_title
->
GetValue
()
)
mrltemp
=
wxT
(
"vcdx://"
)
...
...
@@ -711,15 +719,18 @@ void OpenDialog::UpdateMRL( int i_access_method )
);
else
mrltemp
=
wxT
(
"vcdx://"
)
+
disc_device
->
GetValue
();
+
disc_device
->
GetValue
();
#else
mrltemp
=
wxT
(
"vcd://"
)
+
disc_device
->
GetValue
()
+
wxString
::
Format
(
wxT
(
"@%d"
),
disc_title
->
GetValue
()
);
+
disc_device
->
GetValue
()
+
wxString
::
Format
(
wxT
(
"@%d"
),
disc_title
->
GetValue
()
);
#endif
break
;
case
3
:
}
case
3
:
/* CD-DA */
disc_chapter
->
Disable
();
disc_chapter_label
->
Disable
();
#ifdef HAVE_CDDAX
...
...
@@ -1050,6 +1061,11 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) )
}
disc_title
->
SetRange
(
i_selection
,
255
);
disc_title
->
SetValue
(
i_selection
);
disc_chapter
->
SetRange
(
1
,
255
);
disc_chapter
->
SetValue
(
1
);
disc_chapter_label
->
SetLabel
(
wxU
(
_
(
"Chapter"
))
);
break
;
case
2
:
/* VCD of some sort */
...
...
@@ -1079,6 +1095,11 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) )
disc_title
->
SetRange
(
1
,
98
);
#endif
disc_title
->
SetValue
(
i_selection
);
/* We use the chapter to set subtitle number */
disc_chapter_label
->
SetLabel
(
wxU
(
_
(
"Subtitle"
))
);
disc_chapter
->
SetRange
(
-
1
,
4
);
disc_chapter
->
SetValue
(
config_GetInt
(
p_intf
,
"spu-channel"
)
);
break
;
case
3
:
/* CD-DA */
...
...
@@ -1106,9 +1127,6 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) )
if
(
psz_device
)
free
(
psz_device
);
disc_chapter
->
SetRange
(
1
,
255
);
disc_chapter
->
SetValue
(
1
);
UpdateMRL
(
DISC_ACCESS
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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