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 */
static char * disc_xpm[] = {
"24 24 138 2",
"36 36 138 2",
" c None",
". c #000000",
"+ c #AEB3B3",
......@@ -139,27 +139,39 @@ static char * disc_xpm[] = {
"e. c #D2D7B5",
"f. c #E2BFAE",
"g. c #DBB6A8",
" ",
" ",
" ",
" . . . . . . ",
" . . + @ # $ % & . . ",
" . * = - ; > $ , ' ) ! . ",
" . ~ { ] ^ / ( $ _ : < [ } . ",
" . | 1 2 3 4 5 6 $ 7 8 9 0 a b . ",
" . c d e 2 f ^ @ $ g < h a i j . ",
" . k l m n o 2 p q q p [ a r s t u . ",
" . v w x y m p . . p j t z A B . ",
" . C D E F v q q A G H I J . ",
" . K K K K K q q L L L L L . ",
" . M N O P Q p . . p R S T U V . ",
" . W X Y Z ` .p q q p ..+.@.#.R $.. ",
" . %.` &.*.=.-.;.>.,.'...).!.@.. ",
" . ~. .{.=.].^./.>.(._.:...<.[.. ",
" . }.=.|.1.2.3.>.4.5.6.7.8.. ",
" . 9.-.^.;.0.>.a.,._.b.. ",
" . . c.d.e.>.f.g.. . ",
" . . . . . . ",
" ",
" ",
" "};
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" . . . . . . ",
" . . + @ # $ % & . . ",
" . * = - ; > $ , ' ) ! . ",
" . ~ { ] ^ / ( $ _ : < [ } . ",
" . | 1 2 3 4 5 6 $ 7 8 9 0 a b . ",
" . c d e 2 f ^ @ $ g < h a i j . ",
" . k l m n o 2 p q q p [ a r s t u . ",
" . v w x y m p . . p j t z A B . ",
" . C D E F v q q A G H I J . ",
" . K K K K K q q L L L L L . ",
" . M N O P Q p . . p R S T U V . ",
" . W X Y Z ` .p q q p ..+.@.#.R $.. ",
" . %.` &.*.=.-.;.>.,.'...).!.@.. ",
" . ~. .{.=.].^./.>.(._.:...<.[.. ",
" . }.=.|.1.2.3.>.4.5.6.7.8.. ",
" . 9.-.^.;.0.>.a.,._.b.. ",
" . . c.d.e.>.f.g.. . ",
" . . . . . . ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * file_xpm[] = {
"24 24 54 1",
"36 36 54 1",
" c None",
". c #000000",
"+ c #0B0B0B",
......@@ -55,27 +55,39 @@ static char * file_xpm[] = {
"m c #A79774",
"n c #8B7D5E",
"o c #A0906C",
" ",
" ",
" ",
" ",
" ",
" .. ",
" +..@@. ",
" .. .#.@@@@$$%... ",
" .@@..@@@@$$$$..&*. ",
" .@@@@@$$$$$..=-;@. ",
" .@@$$$$$..>,')!@. ",
" .@@$$$..~{~]]^/@. ",
" .@$$.(_:<[})|@@. ",
" .@@$.12[3456@@@. ",
" .@$.78]90)@@@a. ",
" .@@.*]b9cd@e.. ",
" .@.f]]g|@.. ",
" .@.h4ijk. ",
" ..lmn.. ",
" ..o.. ",
" .. ",
" ",
" ",
" "};
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .. ",
" +..@@. ",
" .. .#.@@@@$$%... ",
" .@@..@@@@$$$$..&*. ",
" .@@@@@$$$$$..=-;@. ",
" .@@$$$$$..>,')!@. ",
" .@@$$$..~{~]]^/@. ",
" .@$$.(_:<[})|@@. ",
" .@@$.12[3456@@@. ",
" .@$.78]90)@@@a. ",
" .@@.*]b9cd@e.. ",
" .@.f]]g|@.. ",
" .@.h4ijk. ",
" ..lmn.. ",
" ..o.. ",
" .. ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * net_xpm[] = {
"24 24 30 1",
"36 36 30 1",
" c None",
". c #272727",
"+ c #888888",
......@@ -31,27 +31,39 @@ static char * net_xpm[] = {
"} c #7A5695",
"| c #826A97",
"1 c #412D52",
" ",
" ",
" ",
" ",
" . ",
" .+ ",
" .@#..$ ",
" .%&**=-;. ",
" .>*.$,--. ",
" . .. $'). ",
" . . !'. ",
" .. ~! ",
" !{ !. ",
" .]. . . ",
" .^/. (. . ",
" ._=:!.<[. ",
" !:**}|=*. ",
" 1!.=-. ",
" .. ",
" . ",
" ",
" ",
" ",
" "};
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" . ",
" .+ ",
" .@#..$ ",
" .%&**=-;. ",
" .>*.$,--. ",
" . .. $'). ",
" . . !'. ",
" .. ~! ",
" !{ !. ",
" .]. . . ",
" .^/. (. . ",
" ._=:!.<[. ",
" !:**}|=*. ",
" 1!.=-. ",
" .. ",
" . ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * next_xpm[] = {
"24 24 25 1",
"36 36 23 1",
" c None",
". c #000000",
"+ c #181818",
"@ c #37592F",
"# c #3A5B32",
"$ c #3F6534",
"% c #445840",
"& c #4B7040",
"* c #537C49",
"= c #59814F",
"- c #5D8554",
"; c #749A6B",
"> c #7EA476",
"+ c #E4EBE2",
"@ c #E1EADF",
"# c #FCFDFC",
"$ c #F0F4EF",
"% c #D9E4D7",
"& c #EDF2EC",
"* c #CBDAC7",
"= c #181818",
"- c #B1C7AC",
"; c #9DBB90",
"> c #88AC80",
", c #83A97A",
"' c #88AC80",
") c #96B88C",
"! c #9DBB90",
"~ c #B1C7AC",
"{ c #CBDAC7",
"] c #D9E4D7",
"^ c #E1EADF",
"/ c #E4EBE2",
"( c #EDF2EC",
"_ c #F0F4EF",
": c #FCFDFC",
" ",
" ",
" ",
" ",
" ",
" .. .... ",
" ./.. .^/. ",
" .:_].. .::. ",
" .:_(_{.. .::. ",
" .::__(_{.. .::. ",
" .:__(((/_{+. .::. ",
" .:___(]]]]_~..::. ",
" .!',',,>,;-#..!!. ",
" .!,,,,,;*%.. .!!. ",
" .!,,,;*&.. .!). ",
" .',;*#.. .)). ",
" .,-#.. .,,. ",
" .$.. .$$. ",
" .. .... ",
" ",
" ",
" ",
" ",
" "};
"' c #7EA476",
") c #749A6B",
"! c #5D8554",
"~ c #3A5B32",
"{ c #537C49",
"] c #445840",
"^ c #4B7040",
"/ c #96B88C",
"( c #3F6534",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .. .... ",
" .+.. .@+. ",
" .#$%.. .##. ",
" .#$&$*.. .##. ",
" .##$$&$*.. .##. ",
" .#$$&&&+$*=. .##. ",
" .#$$$&%%%%$-..##. ",
" .;>,>,,',)!~..;;. ",
" .;,,,,,){].. .;;. ",
" .;,,,){^.. .;/. ",
" .>,){~.. .//. ",
" .,!~.. .,,. ",
" .(.. .((. ",
" .. .... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * pause_xpm[] = {
"24 24 7 1",
"36 36 7 1",
" c None",
". c #000000",
"+ c #36582E",
"@ c #5B8851",
"+ c #C6D7C3",
"@ c #67925C",
"# c #608C56",
"$ c #67925C",
"% c #C6D7C3",
" ",
" ",
" ",
" ",
" ",
" ..... ..... ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .%%%. .%%%. ",
" .$$$. .$$$. ",
" .$$$. .$$$. ",
" .$$$. .$$$. ",
" .###. .###. ",
" .@@@. .@@@. ",
" .+++. .+++. ",
" ..... ..... ",
" ",
" ",
" ",
" ",
" "};
"$ c #5B8851",
"% c #36582E",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ..... ..... ",
" .+++. .+++. ",
" .+++. .+++. ",
" .+++. .+++. ",
" .+++. .+++. ",
" .+++. .+++. ",
" .+++. .+++. ",
" .@@@. .@@@. ",
" .@@@. .@@@. ",
" .@@@. .@@@. ",
" .###. .###. ",
" .$$$. .$$$. ",
" .%%%. .%%%. ",
" ..... ..... ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * play_xpm[] = {
"24 24 26 1",
"36 36 23 1",
" c None",
". c #000000",
"+ c #181818",
"@ c #2B2B2B",
"# c #37592F",
"$ c #3A5B32",
"% c #3F6534",
"& c #445840",
"* c #4B7040",
"= c #537C49",
"- c #59814F",
"; c #5D8554",
"> c #749A6B",
", c #7EA476",
"' c #83A87A",
") c #88AC80",
"! c #96B88C",
"~ c #9DBB90",
"{ c #B1C7AC",
"] c #CBDAC7",
"^ c #D9E4D7",
"/ c #E1EADF",
"( c #E4EBE2",
"_ c #EDF2EC",
": c #F0F4EF",
"< c #F9FBF9",
" ",
" ",
" ",
" ",
" ",
" .. ",
" .(.. ",
" .<_^.. ",
" .<:__].. ",
" .<<:__:].. ",
" .<_::__(:]+. ",
" @<____(^^^:{.. ",
" .~)''''''>-$.. ",
" .~'''''>=&.. ",
" .!)''>=*.. ",
" .!'>=$.. ",
" .);$.. ",
" .%.. ",
" .. ",
" ",
" ",
" ",
" ",
" "};
"+ c #E4EBE2",
"@ c #F9FBF9",
"# c #EDF2EC",
"$ c #D9E4D7",
"% c #F0F4EF",
"& c #CBDAC7",
"* c #181818",
"= c #2B2B2B",
"- c #B1C7AC",
"; c #9DBB90",
"> c #88AC80",
", c #83A87A",
"' c #749A6B",
") c #59814F",
"! c #3A5B32",
"~ c #537C49",
"{ c #445840",
"] c #96B88C",
"^ c #4B7040",
"/ c #5D8554",
"( c #3F6534",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .. ",
" .+.. ",
" .@#$.. ",
" .@%##&.. ",
" .@@%##%&.. ",
" .@#%%##+%&*. ",
" =@####+$$$%-.. ",
" .;>,,,,,,')!.. ",
" .;,,,,,'~{.. ",
" .]>,,'~^.. ",
" .],'~!.. ",
" .>/!.. ",
" .(.. ",
" .. ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * playlist_xpm[] = {
"24 24 16 1",
"36 36 16 1",
" c None",
". c #000000",
"+ c #464233",
"@ c #5C5543",
"# c #736B54",
"$ c #7A735A",
"% c #908669",
"& c #998F70",
"* c #949C8C",
"= c #B4A884",
"- c #BBB191",
"; c #A3A5A3",
"> c #C1B89B",
", c #CAC3AA",
"' c #D3CDB8",
") c #E0E4E0",
" ",
" ",
" ",
" .................. ",
" .)))))))))))))))). ",
" .)))))..*)))))))). ",
" .)))).%#.*))))))). ",
" ......,%.......... ",
" .)))).'%.*))))))). ",
" .)))).,%...;))))). ",
" .)))).,%.$+...*)). ",
" ......-%.=$.&#.... ",
" .)).#.>%.=%.=%.%#. ",
" .)).%.--%==%====%. ",
" .)).=.>>>--=====#. ",
" ....=.=>>->=====#. ",
" .)).%&->>>->-===@. ",
" .))).%=>>>>-===%+. ",
" .))).#=->>->===%. ",
" ......%>>>>-==%#. ",
" .#==>>>==%@. ",
" .%->>-==#. ",
" .=->>==@. ",
" "};
"+ c #E0E4E0",
"@ c #949C8C",
"# c #908669",
"$ c #736B54",
"% c #CAC3AA",
"& c #D3CDB8",
"* c #A3A5A3",
"= c #7A735A",
"- c #464233",
"; c #BBB191",
"> c #B4A884",
", c #998F70",
"' c #C1B89B",
") c #5C5543",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .................. ",
" .++++++++++++++++. ",
" .+++++..@++++++++. ",
" .++++.#$.@+++++++. ",
" ......%#.......... ",
" .++++.&#.@+++++++. ",
" .++++.%#...*+++++. ",
" .++++.%#.=-...@++. ",
" ......;#.>=.,$.... ",
" .++.$.'#.>#.>#.#$. ",
" .++.#.;;#>>#>>>>#. ",
" .++.>.''';;>>>>>$. ",
" ....>.>'';'>>>>>$. ",
" .++.#,;''';';>>>). ",
" .+++.#>'''';>>>#-. ",
" .+++.$>;'';'>>>#. ",
" ......#'''';>>#$. ",
" .$>>'''>>#). ",
" .#;'';>>$. ",
" .>;''>>). ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * previous_xpm[] = {
"24 24 22 1",
"36 36 21 1",
" c None",
". c #000000",
"+ c #121B12",
"@ c #36582E",
"# c #375930",
"$ c #47733D",
"% c #4E7C44",
"& c #516F4A",
"* c #548149",
"= c #5B8851",
"- c #608C56",
"; c #67925C",
"+ c #C6D7C3",
"@ c #E5ECE4",
"# c #F8FAF8",
"$ c #EDF2EC",
"% c #DCE6DA",
"& c #121B12",
"* c #B1C7AC",
"= c #67925C",
"- c #375930",
"; c #548149",
"> c #719A67",
", c #6FA763",
", c #82A979",
"' c #7DA473",
") c #82A979",
"! c #B1C7AC",
"~ c #C6D7C3",
"{ c #DCE6DA",
"] c #E5ECE4",
"^ c #EDF2EC",
"/ c #F8FAF8",
" ",
" ",
" ",
" ",
" ",
" .... .. ",
" .~~. ..~. ",
" .~~. ..]/~. ",
" .~~. ..]//^~. ",
" .~~. ..{//^^/~. ",
" .~~. .+]/^]^^^^~. ",
" .~~..!/]{{]^^^^~. ",
" .;;..#*>)')))))>. ",
" .;;. ..&%>)))));. ",
" .;;. ..#%>)');. ",
" .--. ..$%>)-. ",
" .==. ..$,=. ",
" .##. ..#. ",
" .... .. ",
" ",
" ",
" ",
" ",
" "};
") c #516F4A",
"! c #4E7C44",
"~ c #608C56",
"{ c #47733D",
"] c #5B8851",
"^ c #6FA763",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .... .. ",
" .++. ..+. ",
" .++. ..@#+. ",
" .++. ..@##$+. ",
" .++. ..%##$$#+. ",
" .++. .&@#$@$$$$+. ",
" .++..*#@%%@$$$$+. ",
" .==..-;>,',,,,,>. ",
" .==. ..)!>,,,,,=. ",
" .==. ..-!>,',=. ",
" .~~. ..{!>,~. ",
" .]]. ..{^]. ",
" .--. ..-. ",
" .... .. ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * sat_xpm[] = {
"24 24 14 1",
"36 36 14 1",
" c None",
". c #000000",
"+ c #3C3C3C",
"@ c #4B4B4B",
"# c #525252",
"$ c #6A6A6A",
"% c #767676",
"& c #8A8A8A",
"* c #989898",
"= c #ABABAB",
"- c #BBBBBB",
"; c #CCCCCC",
"> c #D4D4D4",
", c #F7F7F7",
" ",
" ",
" ",
" ... ",
" .=%=. ",
" .>&,%*. ",
" .#,%;#. ",
" .*&>$*. ",
" .#,$;#. ",
" ...*&>$&... ",
" . .#,%-@. . ",
" . .&%>#%. . ",
" . .@*$&+. . ",
" .. ..... .. ",
" .. .. ",
" ....... ",
" ... ",
" ... ",
" ... ",
" . ",
" ",
" ",
" ",
" "};
"+ c #ABABAB",
"@ c #767676",
"# c #D4D4D4",
"$ c #8A8A8A",
"% c #F7F7F7",
"& c #989898",
"* c #525252",
"= c #CCCCCC",
"- c #6A6A6A",
"; c #BBBBBB",
"> c #4B4B4B",
", c #3C3C3C",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ... ",
" .+@+. ",
" .#$%@&. ",
" .*%@=*. ",
" .&$#-&. ",
" .*%-=*. ",
" ...&$#-$... ",
" . .*%@;>. . ",
" . .$@#*@. . ",
" . .>&-$,. . ",
" .. ..... .. ",
" .. .. ",
" ....... ",
" ... ",
" ... ",
" ... ",
" . ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * stop_xpm[] = {
"24 24 7 1",
"36 36 7 1",
" c None",
". c #000000",
"+ c #C6D7C3",
......@@ -8,27 +8,39 @@ static char * stop_xpm[] = {
"# c #608C56",
"$ c #5B8851",
"% c #36582E",
" ",
" ",
" ",
" ",
" ",
" ............ ",
" .++++++++++. ",
" .++++++++++. ",
" .++++++++++. ",
" .++++++++++. ",
" .++++++++++. ",
" .++++++++++. ",
" .@@@@@@@@@@. ",
" .@@@@@@@@@@. ",
" .@@@@@@@@@@. ",
" .##########. ",
" .$$$$$$$$$$. ",
" .%%%%%%%%%%. ",
" ............ ",
" ",
" ",
" ",
" ",
" "};
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ............ ",
" .++++++++++. ",
" .++++++++++. ",
" .++++++++++. ",
" .++++++++++. ",
" .++++++++++. ",
" .++++++++++. ",
" .@@@@@@@@@@. ",
" .@@@@@@@@@@. ",
" .@@@@@@@@@@. ",
" .##########. ",
" .$$$$$$$$$$. ",
" .%%%%%%%%%%. ",
" ............ ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
......@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* 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>
*
......@@ -60,8 +60,11 @@
#include "bitmaps/previous.xpm"
#include "bitmaps/next.xpm"
#include "bitmaps/playlist.xpm"
#define TOOLBAR_BMP_WIDTH 24
#define TOOLBAR_BMP_HEIGHT 24
#include "bitmaps/fast.xpm"
#include "bitmaps/slow.xpm"
#define TOOLBAR_BMP_WIDTH 36
#define TOOLBAR_BMP_HEIGHT 36
/* include the icon graphic */
#include "share/vlc32x32.xpm"
......@@ -115,6 +118,8 @@ enum
PlayStream_Event,
PrevStream_Event,
NextStream_Event,
SlowStream_Event,
FastStream_Event,
/* 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
......@@ -148,6 +153,8 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
EVT_MENU(PlayStream_Event, Interface::OnPlayStream)
EVT_MENU(PrevStream_Event, Interface::OnPrevStream)
EVT_MENU(NextStream_Event, Interface::OnNextStream)
EVT_MENU(SlowStream_Event, Interface::OnSlowStream)
EVT_MENU(FastStream_Event, Interface::OnFastStream)
/* Slider events */
EVT_COMMAND_SCROLL(SliderScroll_Event, Interface::OnSliderUpdate)
......@@ -188,9 +195,11 @@ Interface::Interface( intf_thread_t *_p_intf ):
/* Creation of the status bar
* Helptext for menu items and toolbar tools will automatically get
* displayed here. */
int i_status_width[2] = {-2,-3};
statusbar = CreateStatusBar( 2 ); /* 2 fields */
statusbar->SetStatusWidths( 2, i_status_width );
int i_status_width[3] = {-6, -2, -9};
statusbar = CreateStatusBar( 3 ); /* 2 fields */
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 */
SetBackgroundColour( slider_frame->GetBackgroundColour() );
......@@ -312,12 +321,14 @@ void Interface::CreateOurToolBar()
#define HELP_PLO N_("Open playlist")
#define HELP_PLP N_("Previous 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
* version because we don't include wx.rc */
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) );
......@@ -343,6 +354,10 @@ void Interface::CreateOurToolBar()
wxBitmap( previous_xpm ), wxU(_(HELP_PLP)) );
toolbar->AddTool( NextStream_Event, wxU(_("Next")), wxBitmap( next_xpm ),
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();
......@@ -427,15 +442,15 @@ void RecursiveDestroy( wxMenu *menu )
for( ; node; )
{
wxMenuItem *item = node->GetData();
node = node->GetNext();
/* Delete the submenus */
wxMenu *submenu = item->GetSubMenu();
if( submenu )
{
RecursiveDestroy( submenu );
}
menu->Delete( item );
node = node->GetNext();
/* Delete the submenus */
wxMenu *submenu = item->GetSubMenu();
if( submenu )
{
RecursiveDestroy( submenu );
}
menu->Delete( item );
}
}
......@@ -755,6 +770,30 @@ void Interface::OnNextStream( wxCommandEvent& WXUNUSED(event) )
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 )
{
if( i_playing_status == i_old_playing_status )
......
......@@ -2,7 +2,7 @@
* timer.cpp : wxWindows plugin for vlc
*****************************************************************************
* 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>
*
......@@ -57,6 +57,7 @@ Timer::Timer( intf_thread_t *_p_intf, Interface *_p_main_interface )
p_intf = _p_intf;
p_main_interface = _p_main_interface;
i_old_playing_status = PAUSE_S;
i_old_rate = DEFAULT_RATE;
Start( 100 /*milliseconds*/, wxTIMER_CONTINUOUS );
}
......@@ -130,7 +131,7 @@ void Timer::Notify()
/* Show slider */
if( p_intf->p_sys->p_input )
{
//if( p_intf->p_sys->p_input->stream.b_seekable )
//if( p_intf->p_sys->p_input->stream.b_seekable )
{
p_main_interface->slider_frame->Show();
p_main_interface->frame_sizer->Show(
......@@ -140,7 +141,7 @@ void Timer::Notify()
}
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 );
i_old_playing_status = PLAYING_S;
......@@ -165,7 +166,7 @@ void Timer::Notify()
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 );
p_intf->p_sys->p_input = NULL;
......@@ -241,6 +242,15 @@ void Timer::Notify()
}
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 );
......
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* 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>
*
......@@ -115,6 +115,7 @@ private:
intf_thread_t *p_intf;
Interface *p_main_interface;
int i_old_playing_status;
int i_old_rate;
};
/* Main Interface */
......@@ -167,6 +168,8 @@ private:
void OnSliderUpdate( wxScrollEvent& event );
void OnPrevStream( wxCommandEvent& event );
void OnNextStream( wxCommandEvent& event );
void OnSlowStream( wxCommandEvent& event );
void OnFastStream( wxCommandEvent& 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