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
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()
...
@@ -490,12 +490,16 @@ QFrame *AbstractController::telexFrame()
QToolButton
*
telexOn
=
new
QToolButton
;
QToolButton
*
telexOn
=
new
QToolButton
;
setupButton
(
telexOn
);
setupButton
(
telexOn
);
BUTTON_SET_BAR2
(
telexOn
,
tv
,
qtr
(
"Teletext Activation"
)
);
BUTTON_SET_BAR2
(
telexOn
,
tv
,
qtr
(
"Teletext Activation"
)
);
telexOn
->
setEnabled
(
false
);
telexOn
->
setCheckable
(
true
);
telexLayout
->
addWidget
(
telexOn
);
telexLayout
->
addWidget
(
telexOn
);
/* Teletext Activation and set */
/* Teletext Activation and set */
CONNECT
(
telexOn
,
clicked
(
bool
),
CONNECT
(
telexOn
,
clicked
(
bool
),
THEMIM
->
getIM
(),
activateTeletext
(
bool
)
);
THEMIM
->
getIM
(),
activateTeletext
(
bool
)
);
CONNECT
(
THEMIM
->
getIM
(),
teletextPossible
(
bool
),
telexOn
,
setEnabled
(
bool
)
);
/* Transparency button */
/* Transparency button */
QToolButton
*
telexTransparent
=
new
QToolButton
;
QToolButton
*
telexTransparent
=
new
QToolButton
;
...
...
modules/gui/qt4/input_manager.cpp
View file @
ed2ceb36
...
@@ -196,7 +196,8 @@ void InputManager::customEvent( QEvent *event )
...
@@ -196,7 +196,8 @@ void InputManager::customEvent( QEvent *event )
UpdateRate
();
UpdateRate
();
break
;
break
;
case
ItemEsChanged_Type
:
case
ItemEsChanged_Type
:
// We don't do anything. Why ?
UpdateTeletext
();
// We don't do anything ES related. Why ?
break
;
break
;
case
ItemTeletextChanged_Type
:
case
ItemTeletextChanged_Type
:
UpdateTeletext
();
UpdateTeletext
();
...
@@ -455,7 +456,7 @@ bool InputManager::hasAudio()
...
@@ -455,7 +456,7 @@ bool InputManager::hasAudio()
void
InputManager
::
UpdateTeletext
()
void
InputManager
::
UpdateTeletext
()
{
{
if
(
hasInput
()
)
if
(
hasInput
()
)
telexActivation
(
var_
GetInteger
(
p_input
,
"teletext-es"
)
>=
0
);
telexActivation
(
var_
CountChoices
(
p_input
,
"teletext-es"
)
>
0
);
else
else
telexActivation
(
false
);
telexActivation
(
false
);
}
}
...
@@ -639,9 +640,8 @@ void InputManager::telexSetPage( int page )
...
@@ -639,9 +640,8 @@ void InputManager::telexSetPage( int page )
if
(
hasInput
()
)
if
(
hasInput
()
)
{
{
const
int
i_teletext_es
=
var_GetInteger
(
p_input
,
"teletext-es"
);
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
,
vlc_object_t
*
p_vbi
=
(
vlc_object_t
*
)
vlc_object_find_name
(
p_input
,
"zvbi"
,
FIND_ANYWHERE
);
"zvbi"
,
FIND_ANYWHERE
);
...
@@ -664,7 +664,7 @@ void InputManager::telexSetTransparency( bool b_transparentTelextext )
...
@@ -664,7 +664,7 @@ void InputManager::telexSetTransparency( bool b_transparentTelextext )
"zvbi"
,
FIND_ANYWHERE
);
"zvbi"
,
FIND_ANYWHERE
);
if
(
p_vbi
)
if
(
p_vbi
)
{
{
var_SetBool
(
p_vbi
,
"vbi-opaque"
,
b_transparentTelextext
);
var_SetBool
(
p_vbi
,
"vbi-opaque"
,
!
b_transparentTelextext
);
vlc_object_release
(
p_vbi
);
vlc_object_release
(
p_vbi
);
emit
teletextTransparencyActivated
(
b_transparentTelextext
);
emit
teletextTransparencyActivated
(
b_transparentTelextext
);
}
}
...
@@ -676,18 +676,17 @@ void InputManager::telexActivation( bool b_enabled )
...
@@ -676,18 +676,17 @@ void InputManager::telexActivation( bool b_enabled )
if
(
hasInput
()
)
if
(
hasInput
()
)
{
{
const
int
i_teletext_es
=
var_GetInteger
(
p_input
,
"teletext-es"
);
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 */
/* 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
);
emit
teletextPossible
(
b_enabled
);
if
(
!
b_enabled
)
return
;
if
(
!
b_enabled
)
return
;
/* If Teletext is selected */
/* If Teletext is selected */
if
(
i_teletext_es
==
i_spu_es
)
if
(
i_teletext_es
>=
0
)
{
{
/* Activate the buttons */
/* Activate the buttons */
teletextActivated
(
true
);
emit
teletextActivated
(
true
);
/* Then, find the current page */
/* Then, find the current page */
int
i_page
=
100
;
int
i_page
=
100
;
...
@@ -707,13 +706,13 @@ void InputManager::telexActivation( bool b_enabled )
...
@@ -707,13 +706,13 @@ void InputManager::telexActivation( bool b_enabled )
void
InputManager
::
activateTeletext
(
bool
b_enable
)
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
(
list
.
p_list
->
i_count
>
0
)
if
(
i_teletext_es
>=
0
)
var_SetInteger
(
p_input
,
"spu-es"
,
b_enable
?
list
.
p_list
->
p_values
[
0
].
i_int
:
-
1
);
{
var_SetInteger
(
p_input
,
"spu-es"
,
b_enable
?
i_teletext_es
:
-
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