1 /*****************************************************************************
\r
2 * mainframe.cpp: Win32 interface plugin for vlc
\r
3 *****************************************************************************
\r
4 * Copyright (C) 2002 VideoLAN
\r
6 * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
\r
8 * This program is free software; you can redistribute it and/or modify
\r
9 * it under the terms of the GNU General Public License as published by
\r
10 * the Free Software Foundation; either version 2 of the License, or
\r
11 * (at your option) any later version.
\r
13 * This program is distributed in the hope that it will be useful,
\r
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
16 * GNU General Public License for more details.
\r
18 * You should have received a copy of the GNU General Public License
\r
19 * along with this program; if not, write to the Free Software
\r
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
\r
21 *****************************************************************************/
\r
26 #include <videolan/vlc.h>
\r
28 #include "stream_control.h"
\r
29 #include "input_ext-intf.h"
\r
32 #include "video_output.h"
\r
34 #include "interface.h"
\r
35 #include "intf_playlist.h"
\r
36 #include "intf_eject.h"
\r
38 #include "mainframe.h"
\r
40 #include "control.h"
\r
42 #include "network.h"
\r
44 #include "preferences.h"
\r
45 #include "messages.h"
\r
46 #include "playlist.h"
\r
47 #include "win32_common.h"
\r
49 #include "netutils.h"
\r
51 //---------------------------------------------------------------------------
\r
52 //#pragma package(smart_init)
\r
53 #pragma resource "*.dfm"
\r
55 extern struct intf_thread_s *p_intfGlobal;
\r
56 extern int Win32Manage( intf_thread_t *p_intf );
\r
58 //---------------------------------------------------------------------------
\r
59 __fastcall TMainFrameDlg::TMainFrameDlg( TComponent* Owner )
\r
62 Application->ShowHint = true;
\r
63 Application->OnHint = DisplayHint;
\r
65 TimerManage->Interval = INTF_IDLE_SLEEP / 1000;
\r
67 TrackBar->Max = SLIDER_MAX_VALUE;
\r
69 /* default height */
\r
72 //---------------------------------------------------------------------------
\r
75 /*****************************************************************************
\r
77 ****************************************************************************/
\r
78 void __fastcall TMainFrameDlg::TimerManageTimer( TObject *Sender )
\r
80 Win32Manage( p_intfGlobal );
\r
82 //---------------------------------------------------------------------------
\r
83 void __fastcall TMainFrameDlg::DisplayHint( TObject *Sender )
\r
85 StatusBar->SimpleText = GetLongHint( Application->Hint );
\r
87 //---------------------------------------------------------------------------
\r
88 void __fastcall TMainFrameDlg::TrackBarChange( TObject *Sender )
\r
90 /* This function displays the current date related to the position in
\r
91 * the stream. It is called whenever the slider changes its value.
\r
92 * The lock has to be taken before the function is called */
\r
94 // vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
96 if( p_input_bank->pp_input[0] != NULL )
\r
98 #define p_area p_input_bank->pp_input[0]->stream.p_selected_area
\r
99 char psz_time[ OFFSETTOTIME_MAX_SIZE ];
\r
100 off_t Value = TrackBar->Position;
\r
102 GroupBoxSlider->Caption =
\r
103 input_OffsetToTime( p_input_bank->pp_input[0], psz_time,
\r
104 ( p_area->i_size * Value ) / (off_t)SLIDER_MAX_VALUE );
\r
108 // vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
110 //---------------------------------------------------------------------------
\r
111 void __fastcall TMainFrameDlg::FormClose( TObject *Sender,
\r
112 TCloseAction &Action )
\r
114 intf_thread_t *p_intf = p_intfGlobal;
\r
116 vlc_mutex_lock( &p_intf->change_lock );
\r
118 vlc_mutex_unlock( &p_intf->change_lock );
\r
120 /* we don't destroy the form immediatly */
\r
123 //---------------------------------------------------------------------------
\r
126 /*****************************************************************************
\r
128 ****************************************************************************/
\r
129 void __fastcall TMainFrameDlg::MenuOpenFileClick( TObject *Sender )
\r
131 int i_end = p_main->p_playlist->i_size;
\r
132 AnsiString FileName;
\r
133 if( OpenDialog1->Execute() )
\r
135 /* add the new file to the interface playlist */
\r
136 FileName = OpenDialog1->FileName;
\r
137 intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,
\r
138 (char*)FileName.c_str() );
\r
140 /* update the plugin display */
\r
141 p_intfGlobal->p_sys->p_playlist->UpdateGrid( p_main->p_playlist );
\r
143 /* end current item, select added item */
\r
144 if( p_input_bank->pp_input[0] != NULL )
\r
146 p_input_bank->pp_input[0]->b_eof = 1;
\r
149 intf_PlaylistJumpto( p_main->p_playlist, i_end - 1 );
\r
152 //---------------------------------------------------------------------------
\r
153 void __fastcall TMainFrameDlg::MenuOpenDiscClick( TObject *Sender )
\r
155 TDiscDlg *p_disc = p_intfGlobal->p_sys->p_disc;
\r
156 if( p_disc == NULL )
\r
158 p_disc = new TDiscDlg( this );
\r
159 p_intfGlobal->p_sys->p_disc = p_disc;
\r
163 //---------------------------------------------------------------------------
\r
164 void __fastcall TMainFrameDlg::MenuNetworkStreamClick( TObject *Sender )
\r
166 TNetworkDlg *p_network = p_intfGlobal->p_sys->p_network;
\r
167 if( p_network == NULL )
\r
169 p_network = new TNetworkDlg( this );
\r
170 p_intfGlobal->p_sys->p_network = p_network;
\r
174 //---------------------------------------------------------------------------
\r
175 void __fastcall TMainFrameDlg::MenuExitClick( TObject *Sender )
\r
179 //---------------------------------------------------------------------------
\r
180 void __fastcall TMainFrameDlg::MenuFullscreenClick( TObject *Sender )
\r
182 if( p_vout_bank->i_count )
\r
184 vlc_mutex_lock( &p_vout_bank->pp_vout[0]->change_lock );
\r
186 p_vout_bank->pp_vout[0]->i_changes |= VOUT_FULLSCREEN_CHANGE;
\r
188 vlc_mutex_unlock( &p_vout_bank->pp_vout[0]->change_lock );
\r
191 //---------------------------------------------------------------------------
\r
192 void __fastcall TMainFrameDlg::MenuPlaylistClick( TObject *Sender )
\r
194 TPlaylistDlg *p_playlist = p_intfGlobal->p_sys->p_playlist;
\r
195 if( p_playlist->Visible )
\r
197 p_playlist->Hide();
\r
201 p_playlist->UpdateGrid( p_main->p_playlist );
\r
202 p_playlist->Show();
\r
205 //---------------------------------------------------------------------------
\r
206 void __fastcall TMainFrameDlg::MenuMessagesClick( TObject *Sender )
\r
208 p_intfGlobal->p_sys->p_messages->Show();
\r
210 //---------------------------------------------------------------------------
\r
211 void __fastcall TMainFrameDlg::MenuPreferencesClick( TObject *Sender )
\r
213 TPreferencesDlg *p_preferences = p_intfGlobal->p_sys->p_preferences;
\r
214 if( p_preferences == NULL )
\r
216 p_preferences = new TPreferencesDlg( this );
\r
217 p_preferences->CreateConfigDialog( "main" );
\r
218 p_intfGlobal->p_sys->p_preferences = p_preferences;
\r
222 p_preferences->Show();
\r
225 //---------------------------------------------------------------------------
\r
226 void __fastcall TMainFrameDlg::MenuAboutClick( TObject *Sender )
\r
228 p_intfGlobal->p_sys->p_about = new TAboutDlg( this );
\r
229 p_intfGlobal->p_sys->p_about->ShowModal();
\r
230 delete p_intfGlobal->p_sys->p_about;
\r
232 //---------------------------------------------------------------------------
\r
235 /*****************************************************************************
\r
236 * Toolbar callbacks
\r
237 ****************************************************************************/
\r
238 void __fastcall TMainFrameDlg::ToolButtonFileClick( TObject *Sender )
\r
240 MenuOpenFileClick( Sender );
\r
242 //---------------------------------------------------------------------------
\r
243 void __fastcall TMainFrameDlg::ToolButtonDiscClick( TObject *Sender )
\r
245 MenuOpenDiscClick( Sender );
\r
247 //---------------------------------------------------------------------------
\r
248 void __fastcall TMainFrameDlg::ToolButtonNetClick( TObject *Sender )
\r
250 MenuNetworkStreamClick( Sender );
\r
252 //---------------------------------------------------------------------------
\r
253 void __fastcall TMainFrameDlg::ToolButtonPlaylistClick( TObject *Sender )
\r
255 MenuPlaylistClick( Sender );
\r
257 //---------------------------------------------------------------------------
\r
258 void __fastcall TMainFrameDlg::ToolButtonBackClick( TObject *Sender )
\r
260 ControlBack( Sender );
\r
262 //---------------------------------------------------------------------------
\r
263 void __fastcall TMainFrameDlg::ToolButtonStopClick( TObject *Sender )
\r
265 ControlStop( Sender );
\r
267 //---------------------------------------------------------------------------
\r
268 void __fastcall TMainFrameDlg::ToolButtonPlayClick( TObject *Sender )
\r
270 ControlPlay( Sender );
\r
272 //---------------------------------------------------------------------------
\r
273 void __fastcall TMainFrameDlg::ToolButtonPauseClick( TObject *Sender )
\r
275 ControlPause( Sender );
\r
277 //---------------------------------------------------------------------------
\r
278 void __fastcall TMainFrameDlg::ToolButtonSlowClick( TObject *Sender )
\r
280 ControlSlow( Sender );
\r
282 //---------------------------------------------------------------------------
\r
283 void __fastcall TMainFrameDlg::ToolButtonFastClick( TObject *Sender )
\r
285 ControlFast( Sender );
\r
287 //---------------------------------------------------------------------------
\r
288 void __fastcall TMainFrameDlg::ToolButtonPrevClick( TObject *Sender )
\r
290 p_intfGlobal->p_sys->p_playlist->Previous();
\r
292 //---------------------------------------------------------------------------
\r
293 void __fastcall TMainFrameDlg::ToolButtonNextClick( TObject *Sender )
\r
295 p_intfGlobal->p_sys->p_playlist->Next();
\r
297 //---------------------------------------------------------------------------
\r
298 void __fastcall TMainFrameDlg::ToolButtonEjectClick( TObject *Sender )
\r
300 AnsiString Device = "";
\r
303 * Get the active input
\r
304 * Determine whether we can eject a media, ie it's a VCD or DVD
\r
305 * If it's neither a VCD nor a DVD, then return
\r
308 if( p_main->p_playlist->current.psz_name != NULL )
\r
310 if( strncmp( p_main->p_playlist->current.psz_name, "dvd", 3 )
\r
311 || strncmp( p_main->p_playlist->current.psz_name, "vcd", 3 ) )
\r
313 /* Determine the device name by omitting the first 4 characters
\r
314 * and keeping 3 characters */
\r
315 Device = strdup( ( p_main->p_playlist->current.psz_name + 4 ) );
\r
316 Device = Device.SubString( 1, 2 );
\r
325 /* If there's a stream playing, we aren't allowed to eject ! */
\r
326 if( p_input_bank->pp_input[0] == NULL )
\r
328 intf_WarnMsg( 4, "intf: ejecting %s", Device.c_str() );
\r
330 intf_Eject( Device.c_str() );
\r
333 //--------------------------------------------------------------------------
\r
336 /*****************************************************************************
\r
338 ****************************************************************************/
\r
339 void __fastcall TMainFrameDlg::PopupCloseClick( TObject *Sender )
\r
341 /* We do nothing, we just need a click on a menu item
\r
342 * to close the popup. Don't ask me why... */
\r
345 //---------------------------------------------------------------------------
\r
346 void __fastcall TMainFrameDlg::PopupPlayClick( TObject *Sender )
\r
348 ToolButtonPlayClick( Sender );
\r
350 //---------------------------------------------------------------------------
\r
351 void __fastcall TMainFrameDlg::PopupPauseClick( TObject *Sender )
\r
353 ToolButtonPauseClick( Sender );
\r
355 //---------------------------------------------------------------------------
\r
356 void __fastcall TMainFrameDlg::PopupStopClick( TObject *Sender )
\r
358 ToolButtonStopClick( Sender );
\r
360 //---------------------------------------------------------------------------
\r
361 void __fastcall TMainFrameDlg::PopupBackClick( TObject *Sender )
\r
363 ToolButtonBackClick( Sender );
\r
365 //---------------------------------------------------------------------------
\r
366 void __fastcall TMainFrameDlg::PopupSlowClick( TObject *Sender )
\r
368 ToolButtonSlowClick( Sender );
\r
370 //---------------------------------------------------------------------------
\r
371 void __fastcall TMainFrameDlg::PopupFastClick( TObject *Sender )
\r
373 ToolButtonFastClick( Sender );
\r
375 //---------------------------------------------------------------------------
\r
376 void __fastcall TMainFrameDlg::PopupToggleInterfaceClick( TObject *Sender )
\r
378 this->BringToFront();
\r
380 //---------------------------------------------------------------------------
\r
381 void __fastcall TMainFrameDlg::PopupFullscreenClick( TObject *Sender )
\r
383 MenuFullscreenClick( Sender );
\r
385 //---------------------------------------------------------------------------
\r
386 void __fastcall TMainFrameDlg::PopupNextClick( TObject *Sender )
\r
388 ToolButtonNextClick( Sender );
\r
390 //---------------------------------------------------------------------------
\r
391 void __fastcall TMainFrameDlg::PopupPrevClick( TObject *Sender )
\r
393 ToolButtonPrevClick( Sender );
\r
395 //---------------------------------------------------------------------------
\r
396 void __fastcall TMainFrameDlg::PopupJumpClick( TObject *Sender )
\r
400 //---------------------------------------------------------------------------
\r
401 void __fastcall TMainFrameDlg::PopupPlaylistClick( TObject *Sender )
\r
403 MenuPlaylistClick( Sender );
\r
405 //---------------------------------------------------------------------------
\r
406 void __fastcall TMainFrameDlg::PopupPreferencesClick( TObject *Sender )
\r
408 MenuPreferencesClick( Sender );
\r
410 //---------------------------------------------------------------------------
\r
411 void __fastcall TMainFrameDlg::PopupExitClick( TObject *Sender )
\r
413 MenuExitClick( Sender );
\r
415 //---------------------------------------------------------------------------
\r
416 void __fastcall TMainFrameDlg::PopupOpenFileClick( TObject *Sender )
\r
418 MenuOpenFileClick( Sender );
\r
420 //---------------------------------------------------------------------------
\r
421 void __fastcall TMainFrameDlg::PopupOpenDiscClick( TObject *Sender )
\r
423 MenuOpenDiscClick( Sender );
\r
425 //---------------------------------------------------------------------------
\r
426 void __fastcall TMainFrameDlg::PopupNetworkStreamClick( TObject *Sender )
\r
428 MenuNetworkStreamClick( Sender );
\r
430 //---------------------------------------------------------------------------
\r
433 /*****************************************************************************
\r
434 * Callbacks for DVD/VCD navigation
\r
435 ****************************************************************************/
\r
436 void __fastcall TMainFrameDlg::ButtonTitlePrevClick( TObject *Sender )
\r
438 intf_thread_t * p_intf;
\r
439 input_area_t * p_area;
\r
442 p_intf = p_intfGlobal;
\r
443 i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id - 1;
\r
445 /* Disallow area 0 since it is used for video_ts.vob */
\r
448 p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id];
\r
449 input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
\r
451 input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
\r
453 p_intf->p_sys->b_title_update = 1;
\r
454 vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
455 SetupMenus( p_intf );
\r
456 vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
459 //---------------------------------------------------------------------------
\r
460 void __fastcall TMainFrameDlg::ButtonTitleNextClick( TObject *Sender )
\r
462 intf_thread_t * p_intf;
\r
463 input_area_t * p_area;
\r
466 p_intf = p_intfGlobal;
\r
467 i_id = p_input_bank->pp_input[0]->stream.p_selected_area->i_id + 1;
\r
469 if( i_id < p_input_bank->pp_input[0]->stream.i_area_nb )
\r
471 p_area = p_input_bank->pp_input[0]->stream.pp_areas[i_id];
\r
472 input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
\r
474 input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
\r
476 p_intf->p_sys->b_title_update = 1;
\r
477 vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
478 SetupMenus( p_intf );
\r
479 vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
482 //---------------------------------------------------------------------------
\r
483 void __fastcall TMainFrameDlg::ButtonChapterPrevClick( TObject *Sender )
\r
485 intf_thread_t * p_intf = p_intfGlobal;
\r
486 input_area_t * p_area;
\r
488 p_area = p_input_bank->pp_input[0]->stream.p_selected_area;
\r
490 if( p_area->i_part > 0 )
\r
493 input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
\r
495 input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
\r
497 p_intf->p_sys->b_chapter_update = 1;
\r
498 vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
499 SetupMenus( p_intf );
\r
500 vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
503 //---------------------------------------------------------------------------
\r
504 void __fastcall TMainFrameDlg::ButtonChapterNextClick( TObject *Sender )
\r
506 intf_thread_t * p_intf = p_intfGlobal;
\r
507 input_area_t * p_area;
\r
509 p_area = p_input_bank->pp_input[0]->stream.p_selected_area;
\r
511 if( p_area->i_part < p_area->i_part_nb )
\r
514 input_ChangeArea( p_input_bank->pp_input[0], (input_area_t*)p_area );
\r
516 input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
\r
518 p_intf->p_sys->b_chapter_update = 1;
\r
519 vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
520 SetupMenus( p_intf );
\r
521 vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
\r
524 //---------------------------------------------------------------------------
\r
527 /*****************************************************************************
\r
528 * Callback for the 'go!' button
\r
529 ****************************************************************************/
\r
530 void __fastcall TMainFrameDlg::ButtonGoClick( TObject *Sender )
\r
532 intf_thread_t *p_intf = p_intfGlobal;
\r
535 i_channel = UpDownChannel->Position;
\r
536 intf_WarnMsg( 3, "intf info: joining channel %d", i_channel );
\r
538 vlc_mutex_lock( &p_intf->change_lock );
\r
539 if( p_input_bank->pp_input[0] != NULL )
\r
541 /* end playing item */
\r
542 p_input_bank->pp_input[0]->b_eof = 1;
\r
544 /* update playlist */
\r
545 vlc_mutex_lock( &p_main->p_playlist->change_lock );
\r
547 p_main->p_playlist->i_index--;
\r
548 p_main->p_playlist->b_stopped = 1;
\r
550 vlc_mutex_unlock( &p_main->p_playlist->change_lock );
\r
552 /* FIXME: ugly hack to close input and outputs */
\r
553 p_intf->pf_manage( p_intf );
\r
556 network_ChannelJoin( i_channel );
\r
559 p_main->p_playlist->b_stopped = 0;
\r
560 p_intf->pf_manage( p_intf );
\r
562 vlc_mutex_unlock( &p_intf->change_lock );
\r
564 // input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
\r
566 //---------------------------------------------------------------------------
\r
569 /*****************************************************************************
\r
570 * ModeManage: actualise the aspect of the interface whenever the input
\r
572 *****************************************************************************
\r
573 * The lock has to be taken before you call the function.
\r
574 *****************************************************************************/
\r
575 void __fastcall TMainFrameDlg::ModeManage()
\r
577 intf_thread_t * p_intf = p_intfGlobal;
\r
578 TGroupBox * ActiveGB;
\r
582 /* hide all boxes */
\r
583 GroupBoxFile->Visible = false;
\r
584 GroupBoxNetwork->Visible = false;
\r
585 GroupBoxDisc->Visible = false;
\r
588 GroupBoxSlider->Hide();
\r
590 /* controls unavailable */
\r
593 /* show the box related to current input mode */
\r
594 if( p_input_bank->pp_input[0] != NULL )
\r
596 switch( p_input_bank->pp_input[0]->stream.i_method & 0xf0 )
\r
598 case INPUT_METHOD_FILE:
\r
599 GroupBoxFile->Visible = true;
\r
600 ActiveGB = GroupBoxFile;
\r
601 LabelFileName->Caption = p_input_bank->pp_input[0]->psz_source;
\r
603 case INPUT_METHOD_DISC:
\r
604 GroupBoxDisc->Visible = true;
\r
605 ActiveGB = GroupBoxDisc;
\r
607 case INPUT_METHOD_NETWORK:
\r
608 GroupBoxNetwork->Visible = true;
\r
609 ActiveGB = GroupBoxNetwork;
\r
610 LabelServer->Caption = p_input_bank->pp_input[0]->psz_source;
\r
611 if( config_GetIntVariable( "network_channel" ) )
\r
613 LabelChannel->Visible = true;
\r
617 LabelChannel->Visible = false;
\r
621 intf_WarnMsg( 3, "intf: can't determine input method" );
\r
622 GroupBoxFile->Visible = true;
\r
623 ActiveGB = GroupBoxFile;
\r
624 LabelFileName->Caption = p_input_bank->pp_input[0]->psz_source;
\r
628 i_Height = StatusBar->Height + ActiveGB->Height + 72;
\r
630 /* initialize and show slider for seekable streams */
\r
631 if( p_input_bank->pp_input[0]->stream.b_seekable )
\r
633 TrackBar->Position = p_intf->p_sys->OldValue = 0;
\r
634 GroupBoxSlider->Show();
\r
635 i_Height += GroupBoxSlider->Height;
\r
638 /* resize main window */
\r
639 this->Height = i_Height;
\r
641 /* control buttons for free pace streams */
\r
642 b_control = p_input_bank->pp_input[0]->stream.b_pace_control;
\r
644 /* get ready for menu regeneration */
\r
645 p_intf->p_sys->b_program_update = 1;
\r
646 p_intf->p_sys->b_title_update = 1;
\r
647 p_intf->p_sys->b_chapter_update = 1;
\r
648 p_intf->p_sys->b_audio_update = 1;
\r
649 p_intf->p_sys->b_spu_update = 1;
\r
650 p_intf->p_sys->i_part = 0;
\r
652 p_input_bank->pp_input[0]->stream.b_changed = 0;
\r
653 intf_WarnMsg( 3, "intf: stream has changed, refreshing interface" );
\r
657 if( config_GetIntVariable( "network_channel" ) )
\r
659 GroupBoxNetwork->Visible = true;
\r
660 LabelChannel->Visible = true;
\r
667 /* unsensitize menus */
\r
668 MenuProgram->Enabled = false;
\r
669 MenuTitle->Enabled = false;
\r
670 MenuChapter->Enabled = false;
\r
671 MenuAudio->Enabled = false;
\r
672 MenuSubtitles->Enabled = false;
\r
673 PopupNavigation->Enabled = false;
\r
674 PopupAudio->Enabled = false;
\r
675 PopupSubtitles->Enabled = false;
\r
679 /* set control items */
\r
680 ToolButtonBack->Enabled = false;
\r
681 ToolButtonStop->Enabled = true;
\r
682 ToolButtonEject->Enabled = !b_control;
\r
683 ToolButtonPause->Enabled = b_control;
\r
684 ToolButtonSlow->Enabled = b_control;
\r
685 ToolButtonFast->Enabled = b_control;
\r
686 PopupBack->Enabled = false;
\r
687 PopupPause->Enabled = b_control;
\r
688 PopupSlow->Enabled = b_control;
\r
689 PopupFast->Enabled = b_control;
\r