Commit b4930d51 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: removed the text from the toolbar. Added play slower and play faster buttons.

PS: We really need nicer toolbar icons for the wxWindows interface. Anybody would like to design some ?
parent 76c5819d
/* XPM */ /* XPM */
static char * disc_xpm[] = { static char * disc_xpm[] = {
"24 24 138 2", "36 36 138 2",
" c None", " c None",
". c #000000", ". c #000000",
"+ c #AEB3B3", "+ c #AEB3B3",
...@@ -142,6 +142,12 @@ static char * disc_xpm[] = { ...@@ -142,6 +142,12 @@ static char * disc_xpm[] = {
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" . . . . . . ", " . . . . . . ",
" . . + @ # $ % & . . ", " . . + @ # $ % & . . ",
" . * = - ; > $ , ' ) ! . ", " . * = - ; > $ , ' ) ! . ",
...@@ -162,4 +168,10 @@ static char * disc_xpm[] = { ...@@ -162,4 +168,10 @@ static char * disc_xpm[] = {
" . . . . . . ", " . . . . . . ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
/* XPM */ /* XPM */
static char * file_xpm[] = { static char * file_xpm[] = {
"24 24 54 1", "36 36 54 1",
" c None", " c None",
". c #000000", ". c #000000",
"+ c #0B0B0B", "+ c #0B0B0B",
...@@ -60,6 +60,12 @@ static char * file_xpm[] = { ...@@ -60,6 +60,12 @@ static char * file_xpm[] = {
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" .. ", " .. ",
" +..@@. ", " +..@@. ",
" .. .#.@@@@$$%... ", " .. .#.@@@@$$%... ",
...@@ -78,4 +84,10 @@ static char * file_xpm[] = { ...@@ -78,4 +84,10 @@ static char * file_xpm[] = {
" .. ", " .. ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
/* XPM */ /* XPM */
static char * net_xpm[] = { static char * net_xpm[] = {
"24 24 30 1", "36 36 30 1",
" c None", " c None",
". c #272727", ". c #272727",
"+ c #888888", "+ c #888888",
...@@ -35,6 +35,12 @@ static char * net_xpm[] = { ...@@ -35,6 +35,12 @@ static char * net_xpm[] = {
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" . ", " . ",
" .+ ", " .+ ",
" .@#..$ ", " .@#..$ ",
...@@ -54,4 +60,10 @@ static char * net_xpm[] = { ...@@ -54,4 +60,10 @@ static char * net_xpm[] = {
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
/* XPM */ /* XPM */
static char * next_xpm[] = { static char * next_xpm[] = {
"24 24 25 1", "36 36 23 1",
" c None", " c None",
". c #000000", ". c #000000",
"+ c #181818", "+ c #E4EBE2",
"@ c #37592F", "@ c #E1EADF",
"# c #3A5B32", "# c #FCFDFC",
"$ c #3F6534", "$ c #F0F4EF",
"% c #445840", "% c #D9E4D7",
"& c #4B7040", "& c #EDF2EC",
"* c #537C49", "* c #CBDAC7",
"= c #59814F", "= c #181818",
"- c #5D8554", "- c #B1C7AC",
"; c #749A6B", "; c #9DBB90",
"> c #7EA476", "> c #88AC80",
", c #83A97A", ", c #83A97A",
"' c #88AC80", "' c #7EA476",
") c #96B88C", ") c #749A6B",
"! c #9DBB90", "! c #5D8554",
"~ c #B1C7AC", "~ c #3A5B32",
"{ c #CBDAC7", "{ c #537C49",
"] c #D9E4D7", "] c #445840",
"^ c #E1EADF", "^ c #4B7040",
"/ c #E4EBE2", "/ c #96B88C",
"( c #EDF2EC", "( c #3F6534",
"_ c #F0F4EF", " ",
": c #FCFDFC", " ",
" ",
" ",
" ",
" ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" .. .... ", " .. .... ",
" ./.. .^/. ", " .+.. .@+. ",
" .:_].. .::. ", " .#$%.. .##. ",
" .:_(_{.. .::. ", " .#$&$*.. .##. ",
" .::__(_{.. .::. ", " .##$$&$*.. .##. ",
" .:__(((/_{+. .::. ", " .#$$&&&+$*=. .##. ",
" .:___(]]]]_~..::. ", " .#$$$&%%%%$-..##. ",
" .!',',,>,;-#..!!. ", " .;>,>,,',)!~..;;. ",
" .!,,,,,;*%.. .!!. ", " .;,,,,,){].. .;;. ",
" .!,,,;*&.. .!). ", " .;,,,){^.. .;/. ",
" .',;*#.. .)). ", " .>,){~.. .//. ",
" .,-#.. .,,. ", " .,!~.. .,,. ",
" .$.. .$$. ", " .(.. .((. ",
" .. .... ", " .. .... ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
/* XPM */ /* XPM */
static char * pause_xpm[] = { static char * pause_xpm[] = {
"24 24 7 1", "36 36 7 1",
" c None", " c None",
". c #000000", ". c #000000",
"+ c #36582E", "+ c #C6D7C3",
"@ c #5B8851", "@ c #67925C",
"# c #608C56", "# c #608C56",
"$ c #67925C", "$ c #5B8851",
"% c #C6D7C3", "% c #36582E",
" ",
" ",
" ",
" ",
" ",
" ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ..... ..... ", " ..... ..... ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .$$$. .$$$. ",
" .$$$. .$$$. ",
" .$$$. .$$$. ",
" .###. .###. ",
" .@@@. .@@@. ",
" .+++. .+++. ", " .+++. .+++. ",
" .+++. .+++. ",
" .+++. .+++. ",
" .+++. .+++. ",
" .+++. .+++. ",
" .+++. .+++. ",
" .@@@. .@@@. ",
" .@@@. .@@@. ",
" .@@@. .@@@. ",
" .###. .###. ",
" .$$$. .$$$. ",
" .%%%. .%%%. ",
" ..... ..... ", " ..... ..... ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
/* XPM */ /* XPM */
static char * play_xpm[] = { static char * play_xpm[] = {
"24 24 26 1", "36 36 23 1",
" c None", " c None",
". c #000000", ". c #000000",
"+ c #181818", "+ c #E4EBE2",
"@ c #2B2B2B", "@ c #F9FBF9",
"# c #37592F", "# c #EDF2EC",
"$ c #3A5B32", "$ c #D9E4D7",
"% c #3F6534", "% c #F0F4EF",
"& c #445840", "& c #CBDAC7",
"* c #4B7040", "* c #181818",
"= c #537C49", "= c #2B2B2B",
"- c #59814F", "- c #B1C7AC",
"; c #5D8554", "; c #9DBB90",
"> c #749A6B", "> c #88AC80",
", c #7EA476", ", c #83A87A",
"' c #83A87A", "' c #749A6B",
") c #88AC80", ") c #59814F",
"! c #96B88C", "! c #3A5B32",
"~ c #9DBB90", "~ c #537C49",
"{ c #B1C7AC", "{ c #445840",
"] c #CBDAC7", "] c #96B88C",
"^ c #D9E4D7", "^ c #4B7040",
"/ c #E1EADF", "/ c #5D8554",
"( c #E4EBE2", "( c #3F6534",
"_ c #EDF2EC", " ",
": c #F0F4EF", " ",
"< c #F9FBF9", " ",
" ",
" ",
" ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" .. ", " .. ",
" .+.. ",
" .@#$.. ",
" .@%##&.. ",
" .@@%##%&.. ",
" .@#%%##+%&*. ",
" =@####+$$$%-.. ",
" .;>,,,,,,')!.. ",
" .;,,,,,'~{.. ",
" .]>,,'~^.. ",
" .],'~!.. ",
" .>/!.. ",
" .(.. ", " .(.. ",
" .<_^.. ",
" .<:__].. ",
" .<<:__:].. ",
" .<_::__(:]+. ",
" @<____(^^^:{.. ",
" .~)''''''>-$.. ",
" .~'''''>=&.. ",
" .!)''>=*.. ",
" .!'>=$.. ",
" .);$.. ",
" .%.. ",
" .. ", " .. ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
/* XPM */ /* XPM */
static char * playlist_xpm[] = { static char * playlist_xpm[] = {
"24 24 16 1", "36 36 16 1",
" c None", " c None",
". c #000000", ". c #000000",
"+ c #464233", "+ c #E0E4E0",
"@ c #5C5543", "@ c #949C8C",
"# c #736B54", "# c #908669",
"$ c #7A735A", "$ c #736B54",
"% c #908669", "% c #CAC3AA",
"& c #998F70", "& c #D3CDB8",
"* c #949C8C", "* c #A3A5A3",
"= c #B4A884", "= c #7A735A",
"- c #BBB191", "- c #464233",
"; c #A3A5A3", "; c #BBB191",
"> c #C1B89B", "> c #B4A884",
", c #CAC3AA", ", c #998F70",
"' c #D3CDB8", "' c #C1B89B",
") c #E0E4E0", ") c #5C5543",
" ",
" ",
" ",
" ",
" ",
" ",
" ", " ",
" ", " ",
" ", " ",
" .................. ", " .................. ",
" .)))))))))))))))). ", " .++++++++++++++++. ",
" .)))))..*)))))))). ", " .+++++..@++++++++. ",
" .)))).%#.*))))))). ", " .++++.#$.@+++++++. ",
" ......,%.......... ", " ......%#.......... ",
" .)))).'%.*))))))). ", " .++++.&#.@+++++++. ",
" .)))).,%...;))))). ", " .++++.%#...*+++++. ",
" .)))).,%.$+...*)). ", " .++++.%#.=-...@++. ",
" ......-%.=$.&#.... ", " ......;#.>=.,$.... ",
" .)).#.>%.=%.=%.%#. ", " .++.$.'#.>#.>#.#$. ",
" .)).%.--%==%====%. ", " .++.#.;;#>>#>>>>#. ",
" .)).=.>>>--=====#. ", " .++.>.''';;>>>>>$. ",
" ....=.=>>->=====#. ", " ....>.>'';'>>>>>$. ",
" .)).%&->>>->-===@. ", " .++.#,;''';';>>>). ",
" .))).%=>>>>-===%+. ", " .+++.#>'''';>>>#-. ",
" .))).#=->>->===%. ", " .+++.$>;'';'>>>#. ",
" ......%>>>>-==%#. ", " ......#'''';>>#$. ",
" .#==>>>==%@. ", " .$>>'''>>#). ",
" .%->>-==#. ", " .#;'';>>$. ",
" .=->>==@. ", " .>;''>>). ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
/* XPM */ /* XPM */
static char * previous_xpm[] = { static char * previous_xpm[] = {
"24 24 22 1", "36 36 21 1",
" c None", " c None",
". c #000000", ". c #000000",
"+ c #121B12", "+ c #C6D7C3",
"@ c #36582E", "@ c #E5ECE4",
"# c #375930", "# c #F8FAF8",
"$ c #47733D", "$ c #EDF2EC",
"% c #4E7C44", "% c #DCE6DA",
"& c #516F4A", "& c #121B12",
"* c #548149", "* c #B1C7AC",
"= c #5B8851", "= c #67925C",
"- c #608C56", "- c #375930",
"; c #67925C", "; c #548149",
"> c #719A67", "> c #719A67",
", c #6FA763", ", c #82A979",
"' c #7DA473", "' c #7DA473",
") c #82A979", ") c #516F4A",
"! c #B1C7AC", "! c #4E7C44",
"~ c #C6D7C3", "~ c #608C56",
"{ c #DCE6DA", "{ c #47733D",
"] c #E5ECE4", "] c #5B8851",
"^ c #EDF2EC", "^ c #6FA763",
"/ c #F8FAF8", " ",
" ",
" ",
" ",
" ",
" ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" .... .. ", " .... .. ",
" .~~. ..~. ", " .++. ..+. ",
" .~~. ..]/~. ", " .++. ..@#+. ",
" .~~. ..]//^~. ", " .++. ..@##$+. ",
" .~~. ..{//^^/~. ", " .++. ..%##$$#+. ",
" .~~. .+]/^]^^^^~. ", " .++. .&@#$@$$$$+. ",
" .~~..!/]{{]^^^^~. ", " .++..*#@%%@$$$$+. ",
" .;;..#*>)')))))>. ", " .==..-;>,',,,,,>. ",
" .;;. ..&%>)))));. ", " .==. ..)!>,,,,,=. ",
" .;;. ..#%>)');. ", " .==. ..-!>,',=. ",
" .--. ..$%>)-. ", " .~~. ..{!>,~. ",
" .==. ..$,=. ", " .]]. ..{^]. ",
" .##. ..#. ", " .--. ..-. ",
" .... .. ", " .... .. ",
" ", " ",
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
/* XPM */ /* XPM */
static char * sat_xpm[] = { static char * sat_xpm[] = {
"24 24 14 1", "36 36 14 1",
" c None", " c None",
". c #000000", ". c #000000",
"+ c #3C3C3C", "+ c #ABABAB",
"@ c #4B4B4B", "@ c #767676",
"# c #525252", "# c #D4D4D4",
"$ c #6A6A6A", "$ c #8A8A8A",
"% c #767676", "% c #F7F7F7",
"& c #8A8A8A", "& c #989898",
"* c #989898", "* c #525252",
"= c #ABABAB", "= c #CCCCCC",
"- c #BBBBBB", "- c #6A6A6A",
"; c #CCCCCC", "; c #BBBBBB",
"> c #D4D4D4", "> c #4B4B4B",
", c #F7F7F7", ", c #3C3C3C",
" ",
" ",
" ",
" ",
" ",
" ",
" ", " ",
" ", " ",
" ", " ",
" ... ", " ... ",
" .=%=. ", " .+@+. ",
" .>&,%*. ", " .#$%@&. ",
" .#,%;#. ", " .*%@=*. ",
" .*&>$*. ", " .&$#-&. ",
" .#,$;#. ", " .*%-=*. ",
" ...*&>$&... ", " ...&$#-$... ",
" . .#,%-@. . ", " . .*%@;>. . ",
" . .&%>#%. . ", " . .$@#*@. . ",
" . .@*$&+. . ", " . .>&-$,. . ",
" .. ..... .. ", " .. ..... .. ",
" .. .. ", " .. .. ",
" ....... ", " ....... ",
...@@ -38,4 +44,10 @@ static char * sat_xpm[] = { ...@@ -38,4 +44,10 @@ static char * sat_xpm[] = {
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
/* XPM */ /* XPM */
static char * stop_xpm[] = { static char * stop_xpm[] = {
"24 24 7 1", "36 36 7 1",
" c None", " c None",
". c #000000", ". c #000000",
"+ c #C6D7C3", "+ c #C6D7C3",
...@@ -13,6 +13,12 @@ static char * stop_xpm[] = { ...@@ -13,6 +13,12 @@ static char * stop_xpm[] = {
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" ............ ", " ............ ",
" .++++++++++. ", " .++++++++++. ",
" .++++++++++. ", " .++++++++++. ",
...@@ -31,4 +37,10 @@ static char * stop_xpm[] = { ...@@ -31,4 +37,10 @@ static char * stop_xpm[] = {
" ", " ",
" ", " ",
" ", " ",
" ",
" ",
" ",
" ",
" ",
" ",
" "}; " "};
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc * interface.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.29 2003/05/18 16:27:18 gbazin Exp $ * $Id: interface.cpp,v 1.30 2003/05/18 19:46:35 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -60,8 +60,11 @@ ...@@ -60,8 +60,11 @@
#include "bitmaps/previous.xpm" #include "bitmaps/previous.xpm"
#include "bitmaps/next.xpm" #include "bitmaps/next.xpm"
#include "bitmaps/playlist.xpm" #include "bitmaps/playlist.xpm"
#define TOOLBAR_BMP_WIDTH 24 #include "bitmaps/fast.xpm"
#define TOOLBAR_BMP_HEIGHT 24 #include "bitmaps/slow.xpm"
#define TOOLBAR_BMP_WIDTH 36
#define TOOLBAR_BMP_HEIGHT 36
/* include the icon graphic */ /* include the icon graphic */
#include "share/vlc32x32.xpm" #include "share/vlc32x32.xpm"
...@@ -115,6 +118,8 @@ enum ...@@ -115,6 +118,8 @@ enum
PlayStream_Event, PlayStream_Event,
PrevStream_Event, PrevStream_Event,
NextStream_Event, NextStream_Event,
SlowStream_Event,
FastStream_Event,
/* it is important for the id corresponding to the "About" command to have /* it is important for the id corresponding to the "About" command to have
* this standard value as otherwise it won't be handled properly under Mac * this standard value as otherwise it won't be handled properly under Mac
...@@ -148,6 +153,8 @@ BEGIN_EVENT_TABLE(Interface, wxFrame) ...@@ -148,6 +153,8 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
EVT_MENU(PlayStream_Event, Interface::OnPlayStream) EVT_MENU(PlayStream_Event, Interface::OnPlayStream)
EVT_MENU(PrevStream_Event, Interface::OnPrevStream) EVT_MENU(PrevStream_Event, Interface::OnPrevStream)
EVT_MENU(NextStream_Event, Interface::OnNextStream) EVT_MENU(NextStream_Event, Interface::OnNextStream)
EVT_MENU(SlowStream_Event, Interface::OnSlowStream)
EVT_MENU(FastStream_Event, Interface::OnFastStream)
/* Slider events */ /* Slider events */
EVT_COMMAND_SCROLL(SliderScroll_Event, Interface::OnSliderUpdate) EVT_COMMAND_SCROLL(SliderScroll_Event, Interface::OnSliderUpdate)
...@@ -188,9 +195,11 @@ Interface::Interface( intf_thread_t *_p_intf ): ...@@ -188,9 +195,11 @@ Interface::Interface( intf_thread_t *_p_intf ):
/* Creation of the status bar /* Creation of the status bar
* Helptext for menu items and toolbar tools will automatically get * Helptext for menu items and toolbar tools will automatically get
* displayed here. */ * displayed here. */
int i_status_width[2] = {-2,-3}; int i_status_width[3] = {-6, -2, -9};
statusbar = CreateStatusBar( 2 ); /* 2 fields */ statusbar = CreateStatusBar( 3 ); /* 2 fields */
statusbar->SetStatusWidths( 2, i_status_width ); statusbar->SetStatusWidths( 3, i_status_width );
statusbar->SetStatusText( wxString::Format(wxT("x%.2f"), 1.0), 1 );
/* Make sure we've got the right background colour */ /* Make sure we've got the right background colour */
SetBackgroundColour( slider_frame->GetBackgroundColour() ); SetBackgroundColour( slider_frame->GetBackgroundColour() );
...@@ -312,12 +321,14 @@ void Interface::CreateOurToolBar() ...@@ -312,12 +321,14 @@ void Interface::CreateOurToolBar()
#define HELP_PLO N_("Open playlist") #define HELP_PLO N_("Open playlist")
#define HELP_PLP N_("Previous playlist item") #define HELP_PLP N_("Previous playlist item")
#define HELP_PLN N_("Next playlist item") #define HELP_PLN N_("Next playlist item")
#define HELP_SLOW N_("Play slower")
#define HELP_FAST N_("Play faster")
wxLogNull LogDummy; /* Hack to suppress annoying log message on the win32 wxLogNull LogDummy; /* Hack to suppress annoying log message on the win32
* version because we don't include wx.rc */ * version because we don't include wx.rc */
wxToolBar *toolbar = CreateToolBar( wxToolBar *toolbar = CreateToolBar(
wxTB_HORIZONTAL | wxTB_TEXT | wxTB_FLAT | wxTB_DOCKABLE ); wxTB_HORIZONTAL | wxTB_FLAT | wxTB_DOCKABLE );
toolbar->SetToolBitmapSize( wxSize(TOOLBAR_BMP_WIDTH,TOOLBAR_BMP_HEIGHT) ); toolbar->SetToolBitmapSize( wxSize(TOOLBAR_BMP_WIDTH,TOOLBAR_BMP_HEIGHT) );
...@@ -343,6 +354,10 @@ void Interface::CreateOurToolBar() ...@@ -343,6 +354,10 @@ void Interface::CreateOurToolBar()
wxBitmap( previous_xpm ), wxU(_(HELP_PLP)) ); wxBitmap( previous_xpm ), wxU(_(HELP_PLP)) );
toolbar->AddTool( NextStream_Event, wxU(_("Next")), wxBitmap( next_xpm ), toolbar->AddTool( NextStream_Event, wxU(_("Next")), wxBitmap( next_xpm ),
wxU(_(HELP_PLN)) ); wxU(_(HELP_PLN)) );
toolbar->AddTool( SlowStream_Event, wxU(_("Slower")), wxBitmap( slow_xpm ),
wxU(_(HELP_SLOW)) );
toolbar->AddTool( FastStream_Event, wxU(_("Faster")), wxBitmap( fast_xpm ),
wxU(_(HELP_FAST)) );
toolbar->Realize(); toolbar->Realize();
...@@ -755,6 +770,30 @@ void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) ) ...@@ -755,6 +770,30 @@ void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) )
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
void Interface::OnSlowStream( wxCommandEvent& WXUNUSED(event) )
{
input_thread_t *p_input =
(input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
if( p_input )
{
input_SetStatus( p_input, INPUT_STATUS_SLOWER );
vlc_object_release( p_input );
}
}
void Interface::OnFastStream( wxCommandEvent& WXUNUSED(event) )
{
input_thread_t *p_input =
(input_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_INPUT,
FIND_ANYWHERE );
if( p_input )
{
input_SetStatus( p_input, INPUT_STATUS_FASTER );
vlc_object_release( p_input );
}
}
void Interface::TogglePlayButton( int i_playing_status ) void Interface::TogglePlayButton( int i_playing_status )
{ {
if( i_playing_status == i_old_playing_status ) if( i_playing_status == i_old_playing_status )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* timer.cpp : wxWindows plugin for vlc * timer.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: timer.cpp,v 1.17 2003/05/12 17:33:19 gbazin Exp $ * $Id: timer.cpp,v 1.18 2003/05/18 19:46:35 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -57,6 +57,7 @@ Timer::Timer( intf_thread_t *_p_intf, Interface *_p_main_interface ) ...@@ -57,6 +57,7 @@ Timer::Timer( intf_thread_t *_p_intf, Interface *_p_main_interface )
p_intf = _p_intf; p_intf = _p_intf;
p_main_interface = _p_main_interface; p_main_interface = _p_main_interface;
i_old_playing_status = PAUSE_S; i_old_playing_status = PAUSE_S;
i_old_rate = DEFAULT_RATE;
Start( 100 /*milliseconds*/, wxTIMER_CONTINUOUS ); Start( 100 /*milliseconds*/, wxTIMER_CONTINUOUS );
} }
...@@ -140,7 +141,7 @@ void Timer::Notify() ...@@ -140,7 +141,7 @@ void Timer::Notify()
} }
p_main_interface->statusbar->SetStatusText( p_main_interface->statusbar->SetStatusText(
wxU(p_intf->p_sys->p_input->psz_source), 1 ); wxU(p_intf->p_sys->p_input->psz_source), 2 );
p_main_interface->TogglePlayButton( PLAYING_S ); p_main_interface->TogglePlayButton( PLAYING_S );
i_old_playing_status = PLAYING_S; i_old_playing_status = PLAYING_S;
...@@ -165,7 +166,7 @@ void Timer::Notify() ...@@ -165,7 +166,7 @@ void Timer::Notify()
i_old_playing_status = PAUSE_S; i_old_playing_status = PAUSE_S;
} }
p_main_interface->statusbar->SetStatusText( wxT(""), 1 ); p_main_interface->statusbar->SetStatusText( wxT(""), 2 );
vlc_object_release( p_intf->p_sys->p_input ); vlc_object_release( p_intf->p_sys->p_input );
p_intf->p_sys->p_input = NULL; p_intf->p_sys->p_input = NULL;
...@@ -241,6 +242,15 @@ void Timer::Notify() ...@@ -241,6 +242,15 @@ void Timer::Notify()
} }
i_old_playing_status = p_input->stream.control.i_status; i_old_playing_status = p_input->stream.control.i_status;
} }
/* Manage Speed status */
if( i_old_rate != p_input->stream.control.i_rate )
{
p_main_interface->statusbar->SetStatusText(
wxString::Format(wxT("x%.2f"),
1000.0 / p_input->stream.control.i_rate), 1 );
i_old_rate = p_input->stream.control.i_rate;
}
} }
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description * wxwindows.h: private wxWindows interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.28 2003/05/18 16:27:18 gbazin Exp $ * $Id: wxwindows.h,v 1.29 2003/05/18 19:46:35 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -115,6 +115,7 @@ private: ...@@ -115,6 +115,7 @@ private:
intf_thread_t *p_intf; intf_thread_t *p_intf;
Interface *p_main_interface; Interface *p_main_interface;
int i_old_playing_status; int i_old_playing_status;
int i_old_rate;
}; };
/* Main Interface */ /* Main Interface */
...@@ -167,6 +168,8 @@ private: ...@@ -167,6 +168,8 @@ private:
void OnSliderUpdate( wxScrollEvent& event ); void OnSliderUpdate( wxScrollEvent& event );
void OnPrevStream( wxCommandEvent& event ); void OnPrevStream( wxCommandEvent& event );
void OnNextStream( wxCommandEvent& event ); void OnNextStream( wxCommandEvent& event );
void OnSlowStream( wxCommandEvent& event );
void OnFastStream( wxCommandEvent& event );
void OnMenuOpen( wxMenuEvent& event ); void OnMenuOpen( wxMenuEvent& event );
......
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