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",
......@@ -142,6 +142,12 @@ static char * disc_xpm[] = {
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" . . . . . . ",
" . . + @ # $ % & . . ",
" . * = - ; > $ , ' ) ! . ",
......@@ -162,4 +168,10 @@ static char * disc_xpm[] = {
" . . . . . . ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * file_xpm[] = {
"24 24 54 1",
"36 36 54 1",
" c None",
". c #000000",
"+ c #0B0B0B",
......@@ -60,6 +60,12 @@ static char * file_xpm[] = {
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" .. ",
" +..@@. ",
" .. .#.@@@@$$%... ",
......@@ -78,4 +84,10 @@ static char * file_xpm[] = {
" .. ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * net_xpm[] = {
"24 24 30 1",
"36 36 30 1",
" c None",
". c #272727",
"+ c #888888",
......@@ -35,6 +35,12 @@ static char * net_xpm[] = {
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" . ",
" .+ ",
" .@#..$ ",
......@@ -54,4 +60,10 @@ static char * net_xpm[] = {
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* 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",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ... ",
" .=%=. ",
" .>&,%*. ",
" .#,%;#. ",
" .*&>$*. ",
" .#,$;#. ",
" ...*&>$&... ",
" . .#,%-@. . ",
" . .&%>#%. . ",
" . .@*$&+. . ",
" .+@+. ",
" .#$%@&. ",
" .*%@=*. ",
" .&$#-&. ",
" .*%-=*. ",
" ...&$#-$... ",
" . .*%@;>. . ",
" . .$@#*@. . ",
" . .>&-$,. . ",
" .. ..... .. ",
" .. .. ",
" ....... ",
......@@ -38,4 +44,10 @@ static char * sat_xpm[] = {
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * stop_xpm[] = {
"24 24 7 1",
"36 36 7 1",
" c None",
". c #000000",
"+ c #C6D7C3",
......@@ -13,6 +13,12 @@ static char * stop_xpm[] = {
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ............ ",
" .++++++++++. ",
" .++++++++++. ",
......@@ -31,4 +37,10 @@ static char * stop_xpm[] = {
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "};
......@@ -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();
......@@ -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 );
}
......@@ -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