Commit 15d01be8 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: reverted last --wxwin-keep-size patch for now...

* modules/gui/wxwindows/*: reverted last --wxwin-keep-size patch for now because it doesn't work on wxGTK.
parent 5be283c1
......@@ -69,13 +69,10 @@ private:
wxWindow *p_child_window;
vlc_bool_t b_remember_size;
wxSize video_size;
void UpdateSize( wxSizeEvent & );
void UpdateHide( wxSizeEvent & );
void OnControlEvent( wxCommandEvent & );
void OnSizeEvent( wxSizeEvent& );
DECLARE_EVENT_TABLE();
};
......@@ -84,7 +81,6 @@ DEFINE_LOCAL_EVENT_TYPE( wxEVT_VLC_VIDEO );
BEGIN_EVENT_TABLE(VideoWindow, wxWindow)
EVT_CUSTOM( wxEVT_SIZE, UpdateSize_Event, VideoWindow::UpdateSize )
EVT_CUSTOM( wxEVT_SIZE, UpdateHide_Event, VideoWindow::UpdateHide )
EVT_SIZE( VideoWindow::OnSizeEvent )
EVT_COMMAND( SetStayOnTop_Event, wxEVT_VLC_VIDEO,
VideoWindow::OnControlEvent )
END_EVENT_TABLE()
......@@ -123,10 +119,7 @@ VideoWindow::VideoWindow( intf_thread_t *_p_intf, wxWindow *_p_parent ):
p_intf->p_sys->p_video_sizer = new wxBoxSizer( wxHORIZONTAL );
p_intf->p_sys->p_video_sizer->Add( this, 1, wxEXPAND );
b_remember_size = VLC_FALSE;
ReleaseWindow( NULL );
b_remember_size = config_GetInt( p_intf, "wxwin-keep-size" );
}
VideoWindow::~VideoWindow()
......@@ -183,14 +176,6 @@ void *VideoWindow::GetWindow( vout_thread_t *_p_vout,
p_vout = _p_vout;
/* Force old size */
if( b_remember_size &&
video_size.GetWidth() && video_size.GetHeight() )
{
*pi_width_hint = video_size.GetWidth();
*pi_height_hint = video_size.GetHeight();
}
wxSizeEvent event( wxSize(*pi_width_hint, *pi_height_hint),
UpdateSize_Event );
AddPendingEvent( event );
......@@ -229,8 +214,6 @@ void VideoWindow::ReleaseWindow( void *p_window )
p_vout = NULL;
if( b_remember_size ) video_size = GetClientSize();
#if defined(__WXGTK__) || defined(WIN32)
wxSizeEvent event( wxSize(0, 0), UpdateHide_Event );
AddPendingEvent( event );
......@@ -247,7 +230,6 @@ void VideoWindow::UpdateSize( wxSizeEvent &event )
p_intf->p_sys->p_video_sizer->Layout();
SetFocus();
}
p_intf->p_sys->p_video_sizer->SetMinSize( event.GetSize() );
wxCommandEvent intf_event( wxEVT_INTF, 0 );
......@@ -279,18 +261,6 @@ void VideoWindow::OnControlEvent( wxCommandEvent &event )
}
}
void VideoWindow::OnSizeEvent( wxSizeEvent &event )
{
/* Ignore if no vout */
if( p_vout )
p_intf->p_sys->p_video_sizer->SetMinSize( event.GetSize() );
if( b_remember_size )
video_size = GetClientSize();
event.Skip();
}
static int ControlWindow( intf_thread_t *p_intf, void *p_window,
int i_query, va_list args )
{
......
......@@ -83,10 +83,6 @@ private:
#define EMBED_TEXT N_("Embed video in interface")
#define EMBED_LONGTEXT N_("Embed the video inside the interface instead " \
"of having it in a separate window.")
#define KEEP_SIZE_TEXT N_("Remember the size of the embedded video")
#define KEEP_SIZE_LONGTEXT N_("Remember the size of the last embedded " \
"video and apply it to new videos. The default behaviour is to adjust " \
"the size of the embedded video to match the resolution of the video.")
#define BOOKMARKS_TEXT N_("Show bookmarks dialog")
#define BOOKMARKS_LONGTEXT N_("Show bookmarks dialog when the interface " \
"starts.")
......@@ -107,8 +103,6 @@ vlc_module_begin();
add_bool( "wxwin-embed", 1, NULL,
EMBED_TEXT, EMBED_LONGTEXT, VLC_FALSE );
add_bool( "wxwin-keep-size", 0, NULL,
KEEP_SIZE_TEXT, KEEP_SIZE_LONGTEXT, VLC_FALSE );
add_bool( "wxwin-bookmarks", 0, NULL,
BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_FALSE );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment