Commit d388fc44 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: keep compatibility with wxWidgets 2.4.x + changed default playlist size.

parent f0d9d6b2
...@@ -462,12 +462,11 @@ void Interface::CreateOurToolBar() ...@@ -462,12 +462,11 @@ void Interface::CreateOurToolBar()
toolbar->AddTool( OpenFile_Event, wxT(""), toolbar->AddTool( OpenFile_Event, wxT(""),
wxBitmap( eject_xpm ), wxU(_(HELP_OPEN)) ); wxBitmap( eject_xpm ), wxU(_(HELP_OPEN)) );
toolbar->AddSeparator(); toolbar->AddSeparator();
toolbar->AddTool( PlayStream_Event, wxT(""), wxBitmap( play_xpm ),
wxU(_(HELP_PLAY)) ); wxToolBarToolBase *p_tool = toolbar->AddTool( PlayStream_Event, wxT(""),
#if 0 wxBitmap( play_xpm ), wxU(_(HELP_PLAY)) );
toolbar->AddTool( PlayStream_Event, wxT(""), wxBitmap( pause_xpm ), p_tool->SetClientData( p_tool );
wxU(_(HELP_PAUSE)) );
#endif
toolbar->AddTool( StopStream_Event, wxT(""), wxBitmap( stop_xpm ), toolbar->AddTool( StopStream_Event, wxT(""), wxBitmap( stop_xpm ),
wxU(_(HELP_STOP)) ); wxU(_(HELP_STOP)) );
toolbar->AddSeparator(); toolbar->AddSeparator();
...@@ -969,15 +968,17 @@ void Interface::OnSliderUpdate( wxScrollEvent& event ) ...@@ -969,15 +968,17 @@ void Interface::OnSliderUpdate( wxScrollEvent& event )
/* Update stream date */ /* Update stream date */
char psz_time[ MSTRTIME_MAX_SIZE ], psz_total[ MSTRTIME_MAX_SIZE ]; char psz_time[ MSTRTIME_MAX_SIZE ], psz_total[ MSTRTIME_MAX_SIZE ];
mtime_t i_seconds; mtime_t i_seconds;
vlc_value_t val;
i_seconds = var_GetTime( p_intf->p_sys->p_input, "length" ) / I64C(1000000 ); i_seconds = var_GetTime( p_intf->p_sys->p_input, "length" ) /
I64C(1000000 );
secstotimestr( psz_total, i_seconds ); secstotimestr( psz_total, i_seconds );
i_seconds = var_GetTime( p_intf->p_sys->p_input, "time" ) / I64C(1000000 ); i_seconds = var_GetTime( p_intf->p_sys->p_input, "time" ) /
I64C(1000000 );
secstotimestr( psz_time, i_seconds ); secstotimestr( psz_time, i_seconds );
statusbar->SetStatusText( wxU(psz_time)+ wxString(wxT(" / ")) + wxU(psz_total), 0 ); statusbar->SetStatusText( wxU(psz_time) + wxString(wxT(" / ") ) +
wxU(psz_total), 0 );
} }
} }
#endif #endif
...@@ -1082,7 +1083,8 @@ void Interface::TogglePlayButton( int i_playing_status ) ...@@ -1082,7 +1083,8 @@ void Interface::TogglePlayButton( int i_playing_status )
if( i_playing_status == i_old_playing_status ) if( i_playing_status == i_old_playing_status )
return; return;
wxToolBarToolBase *p_tool = GetToolBar()->FindById( PlayStream_Event ); wxToolBarToolBase *p_tool = (wxToolBarToolBase *)
GetToolBar()->GetToolClientData( PlayStream_Event );
if( !p_tool ) return; if( !p_tool ) return;
if( i_playing_status == PLAYING_S ) if( i_playing_status == PLAYING_S )
......
...@@ -197,7 +197,7 @@ friend class Playlist; ...@@ -197,7 +197,7 @@ friend class Playlist;
*****************************************************************************/ *****************************************************************************/
Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ): Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
wxFrame( p_parent, -1, wxU(_("Playlist")), wxDefaultPosition, wxFrame( p_parent, -1, wxU(_("Playlist")), wxDefaultPosition,
wxSize(345,400), wxDEFAULT_FRAME_STYLE ) wxSize(500,300), wxDEFAULT_FRAME_STYLE )
{ {
vlc_value_t val; vlc_value_t val;
......
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