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
ad80d3c3
Commit
ad80d3c3
authored
Jul 27, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use var_ToggleBool when applicable.
parent
9f3dc2d6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
29 deletions
+13
-29
modules/control/hotkeys.c
modules/control/hotkeys.c
+3
-6
modules/control/http/macro.c
modules/control/http/macro.c
+1
-1
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+1
-3
modules/gui/ncurses.c
modules/gui/ncurses.c
+5
-15
modules/gui/qt4/actions_manager.cpp
modules/gui/qt4/actions_manager.cpp
+2
-3
modules/gui/skins2/commands/cmd_fullscreen.cpp
modules/gui/skins2/commands/cmd_fullscreen.cpp
+1
-1
No files found.
modules/control/hotkeys.c
View file @
ad80d3c3
...
...
@@ -231,8 +231,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
{
vlc_object_t
*
obj
=
p_vout
?
VLC_OBJECT
(
p_vout
)
:
VLC_OBJECT
(
p_playlist
);
bool
b
=
var_GetBool
(
obj
,
"fullscreen"
);
var_SetBool
(
obj
,
"fullscreen"
,
!
b
);
var_ToggleBool
(
obj
,
"fullscreen"
);
break
;
}
...
...
@@ -265,8 +264,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
{
/* FIXME: this is invalid if not using DirectX output!!! */
vlc_object_t
*
obj
=
p_vout
?
VLC_OBJECT
(
p_vout
)
:
VLC_OBJECT
(
p_playlist
);
bool
b
=
var_GetBool
(
obj
,
"directx-wallpaper"
);
var_SetBool
(
obj
,
"directx-wallpaper"
,
!
b
);
var_ToggleBool
(
obj
,
"directx-wallpaper"
);
}
#endif
...
...
@@ -287,8 +285,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
case
ACTIONID_RANDOM
:
{
bool
b
=
var_GetBool
(
p_playlist
,
"random"
);
var_SetBool
(
p_playlist
,
"random"
,
!
b
);
var_ToggleBool
(
p_playlist
,
"random"
);
}
case
ACTIONID_PLAY_PAUSE
:
...
...
modules/control/http/macro.c
View file @
ad80d3c3
...
...
@@ -235,7 +235,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
p_vout
=
input_GetVout
(
p_sys
->
p_input
);
if
(
p_vout
)
{
var_
SetBool
(
p_vout
,
"fullscreen"
,
!
var_GetBool
(
p_vout
,
"fullscreen"
)
);
var_
ToggleBool
(
p_vout
,
"fullscreen"
);
vlc_object_release
(
p_vout
);
msg_Dbg
(
p_intf
,
"requested fullscreen toggle"
);
}
...
...
modules/gui/macosx/controls.m
View file @
ad80d3c3
...
...
@@ -506,9 +506,7 @@
if
(
[
o_title
isEqualToString
:
_NS
(
"Fullscreen"
)]
||
[
sender
isKindOfClass
:[
NSButton
class
]]
)
{
vlc_value_t
val
;
var_Get
(
p_playlist
,
"fullscreen"
,
&
val
);
var_Set
(
p_playlist
,
"fullscreen"
,
(
vlc_value_t
)
!
val
.
b_bool
);
var_ToggleBool
(
p_playlist
,
"fullscreen"
);
}
pl_Release
(
VLCIntf
);
...
...
modules/gui/ncurses.c
View file @
ad80d3c3
...
...
@@ -563,19 +563,13 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
vlc_value_t
val
;
/* Playlist Settings */
case
'r'
:
var_Get
(
p_playlist
,
"random"
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
var_Set
(
p_playlist
,
"random"
,
val
);
var_ToggleBool
(
p_playlist
,
"random"
);
goto
end
;
case
'l'
:
var_Get
(
p_playlist
,
"loop"
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
var_Set
(
p_playlist
,
"loop"
,
val
);
var_ToggleBool
(
p_playlist
,
"loop"
);
goto
end
;
case
'R'
:
var_Get
(
p_playlist
,
"repeat"
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
var_Set
(
p_playlist
,
"repeat"
,
val
);
var_ToggleBool
(
p_playlist
,
"repeat"
);
goto
end
;
/* Playlist sort */
...
...
@@ -1137,16 +1131,12 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
VLC_OBJECT_VOUT
,
FIND_CHILD
);
if
(
p_vout
)
{
var_Get
(
p_vout
,
"fullscreen"
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
var_Set
(
p_vout
,
"fullscreen"
,
val
);
var_ToggleBool
(
p_vout
,
"fullscreen"
);
vlc_object_release
(
p_vout
);
}
else
{
var_Get
(
p_playlist
,
"fullscreen"
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
var_Set
(
p_playlist
,
"fullscreen"
,
val
);
var_ToggleBool
(
p_playlist
,
"fullscreen"
);
}
}
i_ret
=
0
;
...
...
modules/gui/qt4/actions_manager.cpp
View file @
ad80d3c3
...
...
@@ -117,7 +117,7 @@ void ActionsManager::fullscreen()
vout_thread_t
*
p_vout
=
THEMIM
->
getVout
();
if
(
p_vout
)
{
var_
SetBool
(
p_vout
,
"fullscreen"
,
!
var_GetBool
(
p_vout
,
"fullscreen"
)
);
var_
ToggleBool
(
p_vout
,
"fullscreen"
);
vlc_object_release
(
p_vout
);
}
}
...
...
@@ -143,8 +143,7 @@ void ActionsManager::record()
if
(
p_input
)
{
/* This method won't work fine if the stream can't be cut anywhere */
const
bool
b_recording
=
var_GetBool
(
p_input
,
"record"
);
var_SetBool
(
p_input
,
"record"
,
!
b_recording
);
var_ToggleBool
(
p_input
,
"record"
);
#if 0
else
{
...
...
modules/gui/skins2/commands/cmd_fullscreen.cpp
View file @
ad80d3c3
...
...
@@ -37,7 +37,7 @@ void CmdFullscreen::execute()
if
(
pVout
)
{
// Switch to fullscreen
var_
SetBool
(
pVout
,
"fullscreen"
,
!
var_GetBool
(
pVout
,
"fullscreen"
)
);
var_
ToggleBool
(
pVout
,
"fullscreen"
);
vlc_object_release
(
pVout
);
}
}
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