* InterfaceWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: InterfaceWindow.cpp,v 1.15 2003/01/12 02:08:38 titer Exp $
+ * $Id: InterfaceWindow.cpp,v 1.16 2003/01/14 14:48:55 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
B_NOT_ZOOMABLE | B_WILL_ACCEPT_FIRST_CLICK | B_ASYNCHRONOUS_CONTROLS ),
p_intf( p_interface ),
fFilePanel( NULL ),
+ fSubtitlesPanel( NULL ),
fLastUpdateTime( system_time() ),
fSettings( new BMessage( 'sett' ) )
{
new BMessage( OPEN_FILE ), 'O') );
fileMenu->AddItem( new CDMenu( "Open Disc" ) );
+
+ fileMenu->AddItem( new BMenuItem( "Load a subtitle file" B_UTF8_ELLIPSIS,
+ new BMessage( LOAD_SUBFILE ) ) );
fileMenu->AddSeparatorItem();
fileMenu->AddItem( new BMenuItem( "Play List" B_UTF8_ELLIPSIS,
_UpdatePlaylist();
}
break;
+
+ case LOAD_SUBFILE:
+ if( fSubtitlesPanel )
+ {
+ fSubtitlesPanel->Show();
+ break;
+ }
+ fSubtitlesPanel = new BFilePanel();
+ fSubtitlesPanel->SetTarget( this );
+ fSubtitlesPanel->SetMessage( new BMessage( SUBFILE_RECEIVED ) );
+ fSubtitlesPanel->Show();
+ break;
+
+ case SUBFILE_RECEIVED:
+ {
+ entry_ref ref;
+ if( p_message->FindRef( "refs", 0, &ref ) == B_OK )
+ {
+ BPath path( &ref );
+ if ( path.InitCheck() == B_OK )
+ p_wrapper->LoadSubFile( (char*)path.Path() );
+ }
+ break;
+ }
case STOP_PLAYBACK:
// this currently stops playback not nicely
* InterfaceWindow.h: BeOS interface window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: InterfaceWindow.h,v 1.7 2003/01/08 02:09:15 titer Exp $
+ * $Id: InterfaceWindow.h,v 1.8 2003/01/14 14:48:55 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
bool fPlaylistIsEmpty;
BFilePanel* fFilePanel;
+ BFilePanel* fSubtitlesPanel;
PlayListWindow* fPlaylistWindow;
PreferencesWindow* fPreferencesWindow;
BMenuBar* fMenuBar;
* MsgVals.h
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: MsgVals.h,v 1.3 2002/10/28 16:55:05 titer Exp $
+ * $Id: MsgVals.h,v 1.4 2003/01/14 14:48:55 titer Exp $
*
* Authors: Tony Castley <tcastley@mail.powerup.com.au>
* Stephan Aßmus <stippi@yellowbites.com>
const uint32 OPEN_FILE = 'opfl';
const uint32 OPEN_DVD = 'opdv';
+const uint32 LOAD_SUBFILE = 'losu';
+const uint32 SUBFILE_RECEIVED = 'sure';
const uint32 OPEN_PLAYLIST = 'oppl';
const uint32 STOP_PLAYBACK = 'stpl';
const uint32 START_PLAYBACK = 'play';
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.cpp,v 1.17 2003/01/12 02:08:39 titer Exp $
+ * $Id: VlcWrapper.cpp,v 1.18 2003/01/14 14:48:55 titer Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
}
-
+void VlcWrapper::LoadSubFile( char * psz_file )
+{
+ config_PutPsz( p_intf, "sub-file", strdup( psz_file ) );
+}
void VlcWrapper::ToggleLanguage( int i_language )
{
* VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.h,v 1.12 2003/01/12 02:08:39 titer Exp $
+ * $Id: VlcWrapper.h,v 1.13 2003/01/14 14:48:55 titer Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
void openFiles( BList *o_files, bool replace = true );
void openDisc( BString o_type, BString o_device,
int i_title, int i_chapter );
+ void LoadSubFile( char * psz_file );
void ToggleLanguage( int i_language );
void ToggleSubtitle( int i_subtitle );
const char* getTimeAsString();