Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
20bab27a
Commit
20bab27a
authored
Oct 03, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Added delay and alignment to wx subtitles dialog
* Fixed a tooltip * Removed a debug message
parent
c2b1baa3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
10 deletions
+73
-10
modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/open.cpp
+6
-0
modules/gui/wxwindows/subtitles.cpp
modules/gui/wxwindows/subtitles.cpp
+64
-9
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+2
-0
src/input/input.c
src/input/input.c
+1
-1
No files found.
modules/gui/wxwindows/open.cpp
View file @
20bab27a
...
@@ -1280,11 +1280,17 @@ void OpenDialog::OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) )
...
@@ -1280,11 +1280,17 @@ void OpenDialog::OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) )
if
(
subsfile_dialog
->
encoding_combo
)
if
(
subsfile_dialog
->
encoding_combo
)
subsfile_mrl
.
Add
(
wxString
(
wxT
(
"subsdec-encoding="
))
+
subsfile_mrl
.
Add
(
wxString
(
wxT
(
"subsdec-encoding="
))
+
subsfile_dialog
->
encoding_combo
->
GetValue
()
);
subsfile_dialog
->
encoding_combo
->
GetValue
()
);
subsfile_mrl
.
Add
(
wxString
::
Format
(
wxT
(
"subsdec-align=%i"
),
(
int
)
subsfile_dialog
->
align_combo
->
GetClientData
(
subsfile_dialog
->
align_combo
->
GetSelection
())
)
);
subsfile_mrl
.
Add
(
wxString
::
Format
(
wxT
(
"freetype-rel-fontsize=%i"
),
subsfile_mrl
.
Add
(
wxString
::
Format
(
wxT
(
"freetype-rel-fontsize=%i"
),
(
int
)
subsfile_dialog
->
size_combo
->
GetClientData
(
(
int
)
subsfile_dialog
->
size_combo
->
GetClientData
(
subsfile_dialog
->
size_combo
->
GetSelection
())
)
);
subsfile_dialog
->
size_combo
->
GetSelection
())
)
);
subsfile_mrl
.
Add
(
wxString
::
Format
(
wxT
(
"sub-fps=%i"
),
subsfile_mrl
.
Add
(
wxString
::
Format
(
wxT
(
"sub-fps=%i"
),
subsfile_dialog
->
fps_spinctrl
->
GetValue
()
)
);
subsfile_dialog
->
fps_spinctrl
->
GetValue
()
)
);
subsfile_mrl
.
Add
(
wxString
::
Format
(
wxT
(
"sub-delay=%i"
),
subsfile_dialog
->
delay_spinctrl
->
GetValue
()
)
);
}
}
}
}
...
...
modules/gui/wxwindows/subtitles.cpp
View file @
20bab27a
...
@@ -126,7 +126,7 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
...
@@ -126,7 +126,7 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
encoding_combo
->
SetToolTip
(
wxU
(
p_item
->
psz_longtext
)
);
encoding_combo
->
SetToolTip
(
wxU
(
p_item
->
psz_longtext
)
);
enc_sizer
->
Add
(
label
,
0
,
wxALL
|
wxALIGN_CENTER
,
5
);
enc_sizer
->
Add
(
label
,
0
,
wxALL
|
wxALIGN_CENTER
,
5
);
enc_sizer
->
Add
(
encoding_combo
,
0
,
wxALL
|
wxALIGN_CENTER
,
5
);
enc_sizer
->
Add
(
encoding_combo
,
0
,
wx
EXPAND
|
wx
ALL
|
wxALIGN_CENTER
,
5
);
enc_sizer_sizer
->
Add
(
enc_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
enc_sizer_sizer
->
Add
(
enc_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
enc_sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
enc_sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
}
}
...
@@ -137,7 +137,9 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
...
@@ -137,7 +137,9 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
wxU
(
_
(
"Subtitles options"
))
);
wxU
(
_
(
"Subtitles options"
))
);
wxStaticBoxSizer
*
misc_sizer
=
new
wxStaticBoxSizer
(
misc_box
,
wxStaticBoxSizer
*
misc_sizer
=
new
wxStaticBoxSizer
(
misc_box
,
wxHORIZONTAL
);
wxVERTICAL
);
wxFlexGridSizer
*
grid_sizer
=
new
wxFlexGridSizer
(
2
,
1
,
20
);
/* Font size */
/* Font size */
p_item
=
p_item
=
...
@@ -163,13 +165,47 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
...
@@ -163,13 +165,47 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
}
}
}
}
encoding_combo
->
SetToolTip
(
wxU
(
p_item
->
psz_longtext
)
);
size_combo
->
SetToolTip
(
wxU
(
p_item
->
psz_longtext
)
);
size_sizer
->
Add
(
label
,
0
,
wxRIGHT
|
wxALIGN_CENTER
,
5
);
size_sizer
->
Add
(
size_combo
,
0
,
wxLEFT
|
wxALIGN_CENTER
,
5
);
grid_sizer
->
Add
(
size_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
}
p_item
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"subsdec-align"
);
if
(
p_item
)
{
wxBoxSizer
*
align_sizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
wxStaticText
*
label
=
new
wxStaticText
(
panel
,
-
1
,
wxU
(
p_item
->
psz_text
));
align_combo
=
new
wxComboBox
(
panel
,
-
1
,
wxT
(
""
),
wxDefaultPosition
,
wxDefaultSize
,
0
,
NULL
,
wxCB_READONLY
);
/* build a list of available options */
for
(
int
i_index
=
0
;
i_index
<
p_item
->
i_list
;
i_index
++
)
{
align_combo
->
Append
(
wxU
(
p_item
->
ppsz_list_text
[
i_index
]),
(
void
*
)
p_item
->
pi_list
[
i_index
]
);
if
(
p_item
->
i_value
==
p_item
->
pi_list
[
i_index
]
)
{
align_combo
->
SetSelection
(
i_index
);
align_combo
->
SetValue
(
wxU
(
p_item
->
ppsz_list_text
[
i_index
]));
}
}
align_combo
->
SetToolTip
(
wxU
(
p_item
->
psz_longtext
)
);
size_sizer
->
Add
(
label
,
0
,
wxALL
|
wxALIGN_CENTER
,
5
);
align_sizer
->
Add
(
label
,
0
,
wxRIGHT
|
wxALIGN_CENTER
,
5
);
size_sizer
->
Add
(
size_combo
,
0
,
wxALL
|
wxALIGN_CENTER
,
5
);
align_sizer
->
Add
(
align_combo
,
0
,
wxLEFT
|
wxALIGN_CENTER
,
5
);
misc_sizer
->
Add
(
size
_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
grid_sizer
->
Add
(
align
_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
}
}
misc_sizer
->
Add
(
grid_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
grid_sizer
=
new
wxFlexGridSizer
(
4
,
1
,
20
);
wxStaticText
*
label
=
wxStaticText
*
label
=
new
wxStaticText
(
panel
,
-
1
,
wxU
(
_
(
"Frames per second"
)));
new
wxStaticText
(
panel
,
-
1
,
wxU
(
_
(
"Frames per second"
)));
...
@@ -181,11 +217,30 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
...
@@ -181,11 +217,30 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *_p_intf, wxWindow* _p_parent ):
wxSP_ARROW_KEYS
,
wxSP_ARROW_KEYS
,
0
,
16000
,
(
int
)
f_fps
);
0
,
16000
,
(
int
)
f_fps
);
fps_spinctrl
->
SetToolTip
(
wxU
(
_
(
"Override frames per second. "
fps_spinctrl
->
SetToolTip
(
wxU
(
_
(
"Override frames per second. "
"It will only work with MicroDVD subtitles."
))
);
"It will only work with MicroDVD and SubRIP subtitles."
))
);
misc_sizer
->
Add
(
label
,
0
,
wxALL
|
wxALIGN_CENTER
,
5
);
grid_sizer
->
Add
(
label
,
0
,
wxALIGN_CENTER
,
5
);
misc_sizer
->
Add
(
fps_spinctrl
,
0
,
wxALL
|
wxALIGN_CENTER
,
5
);
grid_sizer
->
Add
(
fps_spinctrl
,
0
,
wxALIGN_CENTER
,
5
);
wxStaticText
*
label_delay
=
new
wxStaticText
(
panel
,
-
1
,
wxU
(
_
(
"Delay"
)));
int
i_delay
=
config_GetInt
(
p_intf
,
"sub-delay"
);
/* Outside the new wxSpinCtrl to avoid an internal error in gcc2.95 ! */
wxString
format_delay
(
wxString
::
Format
(
wxT
(
"%i"
),
i_delay
));
delay_spinctrl
=
new
wxSpinCtrl
(
panel
,
-
1
,
format_delay
,
wxDefaultPosition
,
wxDefaultSize
,
wxSP_ARROW_KEYS
,
0
,
16000
,
i_delay
);
delay_spinctrl
->
SetToolTip
(
wxU
(
_
(
"Set subtitle delay (in 1/10s)"
)
)
);
grid_sizer
->
Add
(
label_delay
,
0
,
wxALIGN_CENTER
,
5
);
grid_sizer
->
Add
(
delay_spinctrl
,
0
,
wxALIGN_CENTER
,
5
);
misc_sizer
->
Add
(
grid_sizer
,
0
,
wxALL
,
5
);
misc_sizer_sizer
->
Add
(
misc_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
misc_sizer_sizer
->
Add
(
misc_sizer
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
misc_sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
misc_sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
/* Separation */
/* Separation */
...
...
modules/gui/wxwindows/wxwindows.h
View file @
20bab27a
...
@@ -630,7 +630,9 @@ public:
...
@@ -630,7 +630,9 @@ public:
wxComboBox
*
file_combo
;
wxComboBox
*
file_combo
;
wxComboBox
*
encoding_combo
;
wxComboBox
*
encoding_combo
;
wxComboBox
*
size_combo
;
wxComboBox
*
size_combo
;
wxComboBox
*
align_combo
;
wxSpinCtrl
*
fps_spinctrl
;
wxSpinCtrl
*
fps_spinctrl
;
wxSpinCtrl
*
delay_spinctrl
;
private:
private:
/* Event handlers (these functions should _not_ be virtual) */
/* Event handlers (these functions should _not_ be virtual) */
...
...
src/input/input.c
View file @
20bab27a
...
@@ -160,7 +160,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
...
@@ -160,7 +160,7 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
vlc_mutex_lock
(
&
p_item
->
lock
);
vlc_mutex_lock
(
&
p_item
->
lock
);
for
(
i
=
0
;
i
<
p_item
->
i_options
;
i
++
)
for
(
i
=
0
;
i
<
p_item
->
i_options
;
i
++
)
{
{
msg_Dbg
(
p_input
,
"option: %s"
,
p_item
->
ppsz_options
[
i
]
);
//
msg_Dbg( p_input, "option: %s", p_item->ppsz_options[i] );
ParseOption
(
p_input
,
p_item
->
ppsz_options
[
i
]
);
ParseOption
(
p_input
,
p_item
->
ppsz_options
[
i
]
);
}
}
vlc_mutex_unlock
(
&
p_item
->
lock
);
vlc_mutex_unlock
(
&
p_item
->
lock
);
...
...
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