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
ed2ceb36
Commit
ed2ceb36
authored
Feb 13, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed QT4 teletext buttons.
The page value is not yet correctly synchronized.
parent
83010dc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
+19
-16
modules/gui/qt4/components/controller.cpp
modules/gui/qt4/components/controller.cpp
+5
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+14
-15
No files found.
modules/gui/qt4/components/controller.cpp
View file @
ed2ceb36
...
...
@@ -490,12 +490,16 @@ QFrame *AbstractController::telexFrame()
QToolButton
*
telexOn
=
new
QToolButton
;
setupButton
(
telexOn
);
BUTTON_SET_BAR2
(
telexOn
,
tv
,
qtr
(
"Teletext Activation"
)
);
telexOn
->
setEnabled
(
false
);
telexOn
->
setCheckable
(
true
);
telexLayout
->
addWidget
(
telexOn
);
/* Teletext Activation and set */
CONNECT
(
telexOn
,
clicked
(
bool
),
THEMIM
->
getIM
(),
activateTeletext
(
bool
)
);
CONNECT
(
THEMIM
->
getIM
(),
teletextPossible
(
bool
),
telexOn
,
setEnabled
(
bool
)
);
/* Transparency button */
QToolButton
*
telexTransparent
=
new
QToolButton
;
...
...
modules/gui/qt4/input_manager.cpp
View file @
ed2ceb36
...
...
@@ -196,7 +196,8 @@ void InputManager::customEvent( QEvent *event )
UpdateRate
();
break
;
case
ItemEsChanged_Type
:
// We don't do anything. Why ?
UpdateTeletext
();
// We don't do anything ES related. Why ?
break
;
case
ItemTeletextChanged_Type
:
UpdateTeletext
();
...
...
@@ -455,7 +456,7 @@ bool InputManager::hasAudio()
void
InputManager
::
UpdateTeletext
()
{
if
(
hasInput
()
)
telexActivation
(
var_
GetInteger
(
p_input
,
"teletext-es"
)
>=
0
);
telexActivation
(
var_
CountChoices
(
p_input
,
"teletext-es"
)
>
0
);
else
telexActivation
(
false
);
}
...
...
@@ -639,9 +640,8 @@ void InputManager::telexSetPage( int page )
if
(
hasInput
()
)
{
const
int
i_teletext_es
=
var_GetInteger
(
p_input
,
"teletext-es"
);
const
int
i_spu_es
=
var_GetInteger
(
p_input
,
"spu-es"
);
if
(
i_teletext_es
>=
0
&&
i_teletext_es
==
i_spu_es
)
if
(
i_teletext_es
>=
0
)
{
vlc_object_t
*
p_vbi
=
(
vlc_object_t
*
)
vlc_object_find_name
(
p_input
,
"zvbi"
,
FIND_ANYWHERE
);
...
...
@@ -664,7 +664,7 @@ void InputManager::telexSetTransparency( bool b_transparentTelextext )
"zvbi"
,
FIND_ANYWHERE
);
if
(
p_vbi
)
{
var_SetBool
(
p_vbi
,
"vbi-opaque"
,
b_transparentTelextext
);
var_SetBool
(
p_vbi
,
"vbi-opaque"
,
!
b_transparentTelextext
);
vlc_object_release
(
p_vbi
);
emit
teletextTransparencyActivated
(
b_transparentTelextext
);
}
...
...
@@ -676,18 +676,17 @@ void InputManager::telexActivation( bool b_enabled )
if
(
hasInput
()
)
{
const
int
i_teletext_es
=
var_GetInteger
(
p_input
,
"teletext-es"
);
const
int
i_spu_es
=
var_GetInteger
(
p_input
,
"spu-es"
);
/* Teletext is possible. Show the buttons */
b_enabled
=
(
i_teletext_es
>=
0
)
;
b_enabled
=
var_CountChoices
(
p_input
,
"teletext-es"
)
>
0
;
emit
teletextPossible
(
b_enabled
);
if
(
!
b_enabled
)
return
;
/* If Teletext is selected */
if
(
i_teletext_es
==
i_spu_es
)
if
(
i_teletext_es
>=
0
)
{
/* Activate the buttons */
teletextActivated
(
true
);
emit
teletextActivated
(
true
);
/* Then, find the current page */
int
i_page
=
100
;
...
...
@@ -707,13 +706,13 @@ void InputManager::telexActivation( bool b_enabled )
void
InputManager
::
activateTeletext
(
bool
b_enable
)
{
if
(
hasInput
()
)
vlc_value_t
list
;
if
(
hasInput
()
&&
!
var_Change
(
p_input
,
"teletext-es"
,
VLC_VAR_GETLIST
,
&
list
,
NULL
)
)
{
const
int
i_teletext_es
=
var_GetInteger
(
p_input
,
"teletext-es"
);
if
(
i_teletext_es
>=
0
)
{
var_SetInteger
(
p_input
,
"spu-es"
,
b_enable
?
i_teletext_es
:
-
1
);
}
if
(
list
.
p_list
->
i_count
>
0
)
var_SetInteger
(
p_input
,
"spu-es"
,
b_enable
?
list
.
p_list
->
p_values
[
0
].
i_int
:
-
1
);
var_Change
(
p_input
,
"teletext-es"
,
VLC_VAR_FREELIST
,
&
list
,
NULL
);
}
}
...
...
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