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
a791789c
Commit
a791789c
authored
Apr 15, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/wxwindows: small cleanup + renamed wxwin-size-to-video into wxwin-autosize.
parent
76f22c11
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
24 deletions
+15
-24
modules/gui/wxwindows/interface.cpp
modules/gui/wxwindows/interface.cpp
+4
-12
modules/gui/wxwindows/timer.cpp
modules/gui/wxwindows/timer.cpp
+0
-3
modules/gui/wxwindows/video.cpp
modules/gui/wxwindows/video.cpp
+5
-7
modules/gui/wxwindows/wxwindows.cpp
modules/gui/wxwindows/wxwindows.cpp
+5
-2
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+1
-0
No files found.
modules/gui/wxwindows/interface.cpp
View file @
a791789c
...
...
@@ -363,9 +363,7 @@ void Interface::OnControlEvent( wxCommandEvent& event )
{
case
0
:
{
int
size_to_video
=
config_GetInt
(
p_intf
,
"wxwin-size-to-video"
);
if
(
size_to_video
)
if
(
p_intf
->
p_sys
->
b_video_autosize
)
{
frame_sizer
->
Layout
();
frame_sizer
->
Fit
(
this
);
...
...
@@ -686,8 +684,6 @@ void Interface::HideSlider(bool layout)
void
Interface
::
ShowSlider
(
bool
show
,
bool
layout
)
{
int
size_to_video
=
config_GetInt
(
p_intf
,
"wxwin-size-to-video"
);
if
(
show
)
{
//prevent the hide timers from hiding it now
...
...
@@ -719,7 +715,7 @@ void Interface::ShowSlider(bool show, bool layout)
if
(
layout
)
{
frame_sizer
->
Layout
();
if
(
size_to_video
)
if
(
p_intf
->
p_sys
->
b_video_autosize
)
{
frame_sizer
->
Fit
(
this
);
}
...
...
@@ -733,8 +729,6 @@ void Interface::HideDiscFrame(bool layout)
void
Interface
::
ShowDiscFrame
(
bool
show
,
bool
layout
)
{
int
size_to_video
=
config_GetInt
(
p_intf
,
"wxwin-size-to-video"
);
if
(
show
)
{
//prevent the hide timer from hiding it now
...
...
@@ -765,7 +759,7 @@ void Interface::ShowDiscFrame(bool show, bool layout)
if
(
layout
)
{
slider_sizer
->
Layout
();
if
(
size_to_video
)
if
(
p_intf
->
p_sys
->
b_video_autosize
)
{
slider_sizer
->
Fit
(
slider_frame
);
}
...
...
@@ -778,15 +772,13 @@ void Interface::ShowDiscFrame(bool show, bool layout)
void
Interface
::
OnControlsTimer
(
wxTimerEvent
&
WXUNUSED
(
event
))
{
int
size_to_video
=
config_GetInt
(
p_intf
,
"wxwin-size-to-video"
);
/* Hide slider and Disc Buttons */
//postpone layout, we'll do it ourselves
HideDiscFrame
(
false
);
HideSlider
(
false
);
slider_sizer
->
Layout
();
if
(
size_to_video
)
if
(
p_intf
->
p_sys
->
b_video_autosize
)
{
slider_sizer
->
Fit
(
slider_frame
);
frame_sizer
->
Fit
(
this
);
...
...
modules/gui/wxwindows/timer.cpp
View file @
a791789c
...
...
@@ -161,8 +161,6 @@ void Timer::Notify()
}
else
if
(
p_intf
->
p_sys
->
p_input
->
b_dead
)
{
int
size_to_video
=
config_GetInt
(
p_intf
,
"wxwin-size-to-video"
);
//controls auto-hide after a timer
p_main_interface
->
m_controls_timer
.
Start
(
1000
,
wxTIMER_ONE_SHOT
);
...
...
@@ -184,7 +182,6 @@ void Timer::Notify()
if
(
p_intf
->
p_sys
->
p_input
)
{
int
size_to_video
=
config_GetInt
(
p_intf
,
"wxwin-size-to-video"
);
input_thread_t
*
p_input
=
p_intf
->
p_sys
->
p_input
;
vlc_value_t
val
;
...
...
modules/gui/wxwindows/video.cpp
View file @
a791789c
...
...
@@ -111,7 +111,7 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, wxWindow *_p_parent ):
vlc_mutex_init
(
p_intf
,
&
lock
);
b_auto_size
=
config_GetInt
(
p_intf
,
"wxwin-
size-to-video
"
);
b_auto_size
=
config_GetInt
(
p_intf
,
"wxwin-
autosize
"
);
p_vout
=
NULL
;
...
...
@@ -248,18 +248,16 @@ static void ReleaseWindow( intf_thread_t *p_intf, void *p_window )
void
VideoWindow
::
ReleaseWindow
(
void
*
p_window
)
{
if
(
!
b_auto_size
)
return
;
vlc_mutex_lock
(
&
lock
);
p_vout
=
NULL
;
vlc_mutex_unlock
(
&
lock
);
if
(
!
b_auto_size
)
return
;
#if defined(__WXGTK__) || defined(WIN32)
wxSizeEvent
event
(
wxSize
(
0
,
0
),
UpdateHide_Event
);
AddPendingEvent
(
event
);
#endif
vlc_mutex_unlock
(
&
lock
);
}
void
VideoWindow
::
UpdateSize
(
wxEvent
&
_event
)
...
...
@@ -297,7 +295,7 @@ void VideoWindow::OnHideTimer( wxTimerEvent& WXUNUSED(event))
b_shown
=
VLC_FALSE
;
SetSize
(
0
,
0
);
Hide
();
Show
();
}
//ok I cheat here, but is it ever not 0,0?
p_intf
->
p_sys
->
p_video_sizer
->
SetMinSize
(
wxSize
(
0
,
0
)
);
...
...
modules/gui/wxwindows/wxwindows.cpp
View file @
a791789c
...
...
@@ -123,7 +123,7 @@ vlc_module_begin();
TASKBAR_TEXT
,
TASKBAR_LONGTEXT
,
VLC_FALSE
);
add_bool
(
"wxwin-minimal"
,
0
,
NULL
,
MINIMAL_TEXT
,
MINIMAL_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"wxwin-
size-to-video
"
,
1
,
NULL
,
add_bool
(
"wxwin-
autosize
"
,
1
,
NULL
,
SIZE_TO_VIDEO_TEXT
,
SIZE_TO_VIDEO_LONGTEXT
,
VLC_TRUE
);
#ifdef wxHAS_TASK_BAR_ICON
add_bool
(
"wxwin-systray"
,
0
,
NULL
,
...
...
@@ -178,9 +178,12 @@ static int Open( vlc_object_t *p_this )
/* We support play on start */
p_intf
->
b_play
=
VLC_TRUE
;
/* */
/*
Load saved window settings
*/
p_intf
->
p_sys
->
p_window_settings
=
new
WindowSettings
(
p_intf
);
p_intf
->
p_sys
->
b_video_autosize
=
config_GetInt
(
p_intf
,
"wxwin-autosize"
);
return
VLC_SUCCESS
;
}
...
...
modules/gui/wxwindows/wxwindows.h
View file @
a791789c
...
...
@@ -143,6 +143,7 @@ struct intf_sys_t
/* Embedded vout */
VideoWindow
*
p_video_window
;
wxBoxSizer
*
p_video_sizer
;
vlc_bool_t
b_video_autosize
;
/* Aout */
aout_instance_t
*
p_aout
;
...
...
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