Commit 6996bfd0 authored by ipkiss's avatar ipkiss
Browse files

* Dropped files and files added using the playlist are now enqueued

   according to the "enqueue" config option
parent 5a0a657b
......@@ -178,6 +178,13 @@ void __fastcall TMainFrameDlg::NetworkStreamActionExecute( TObject *Sender )
p_network->Show();
}
//---------------------------------------------------------------------------
void __fastcall TMainFrameDlg::StreamOutputActionExecute( TObject *Sender )
{
TSoutDlg *p_sout = new TSoutDlg( this, p_intf );
p_sout->ShowModal();
delete p_sout;
}
//---------------------------------------------------------------------------
void __fastcall TMainFrameDlg::ExitActionExecute( TObject *Sender )
{
Close();
......@@ -380,8 +387,16 @@ void __fastcall TMainFrameDlg::OnDrop( TMessage &Msg )
DragQueryFile( (HDROP)Msg.WParam, i, FileName, name_length );
/* add the new file to the playlist */
p_intf->p_sys->p_playwin->Add( FileName, PLAYLIST_APPEND | PLAYLIST_GO,
PLAYLIST_END );
if( config_GetInt( p_intf, "enqueue" ) )
{
p_intf->p_sys->p_playwin->Add( FileName,
PLAYLIST_APPEND, PLAYLIST_END );
}
else
{
p_intf->p_sys->p_playwin->Add( FileName,
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
}
delete[] FileName;
}
......@@ -698,11 +713,4 @@ void __fastcall TMainFrameDlg::CreatePreferences( AnsiString Name )
Preferences->Show();
}
//---------------------------------------------------------------------------
void __fastcall TMainFrameDlg::StreamOutputActionExecute( TObject *Sender )
{
TSoutDlg *p_sout = new TSoutDlg( this, p_intf );
p_sout->ShowModal();
delete p_sout;
}
//---------------------------------------------------------------------------
......@@ -197,6 +197,7 @@ __published: // IDE-managed Components
void __fastcall OpenFileActionExecute( TObject *Sender );
void __fastcall OpenDiscActionExecute( TObject *Sender );
void __fastcall NetworkStreamActionExecute( TObject *Sender );
void __fastcall StreamOutputActionExecute( TObject *Sender );
void __fastcall ExitActionExecute( TObject *Sender );
void __fastcall PlaylistActionExecute( TObject *Sender );
void __fastcall MessagesActionExecute( TObject *Sender );
......@@ -219,7 +220,6 @@ __published: // IDE-managed Components
void __fastcall NextTitleActionExecute( TObject *Sender );
void __fastcall PrevChapterActionExecute( TObject *Sender );
void __fastcall NextChapterActionExecute( TObject *Sender );
void __fastcall StreamOutputActionExecute( TObject *Sender );
private: // User declarations
intf_thread_t *p_intf;
/* drag and drop handling */
......
......@@ -189,23 +189,27 @@ void __fastcall TPlaylistDlg::ListViewPlaylistCustomDrawItem(
****************************************************************************/
void __fastcall TPlaylistDlg::MenuAddFileClick( TObject *Sender )
{
p_intf->p_sys->b_play_when_adding = false;
p_intf->p_sys->b_play_when_adding =
(vlc_bool_t)config_GetInt( p_intf, "enqueue" );
p_intf->p_sys->p_window->OpenFileActionExecute( Sender );
p_intf->p_sys->b_play_when_adding = true;
p_intf->p_sys->b_play_when_adding = VLC_TRUE;
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuAddDiscClick( TObject *Sender )
{
p_intf->p_sys->b_play_when_adding = false;
p_intf->p_sys->b_play_when_adding =
(vlc_bool_t)config_GetInt( p_intf, "enqueue" );
p_intf->p_sys->p_window->OpenDiscActionExecute( Sender );
p_intf->p_sys->b_play_when_adding = true;
p_intf->p_sys->b_play_when_adding = VLC_TRUE;
(vlc_bool_t)config_GetInt( p_intf, "enqueue" );
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuAddNetClick( TObject *Sender )
{
p_intf->p_sys->b_play_when_adding = false;
p_intf->p_sys->b_play_when_adding =
(vlc_bool_t)config_GetInt( p_intf, "enqueue" );
p_intf->p_sys->p_window->NetworkStreamActionExecute( Sender );
p_intf->p_sys->b_play_when_adding = true;
p_intf->p_sys->b_play_when_adding = VLC_TRUE;
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuAddUrlClick( TObject *Sender )
......@@ -416,29 +420,26 @@ void __fastcall TPlaylistDlg::Next()
playlist_Next( p_playlist );
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuFileCloseClick(TObject *Sender)
void __fastcall TPlaylistDlg::MenuFileCloseClick( TObject *Sender )
{
Hide();
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuFileOpenClick(TObject *Sender)
void __fastcall TPlaylistDlg::MenuFileOpenClick( TObject *Sender )
{
if ( PlaylistOpenDlg->Execute() )
if( PlaylistOpenDlg->Execute() )
{
// playlist_LoadFile ( p_playlist , PlaylistOpenDlg->FileName.c_str() );
// playlist_LoadFile( p_playlist , PlaylistOpenDlg->FileName.c_str() );
UpdateGrid();
}
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuFileSaveClick(TObject *Sender)
void __fastcall TPlaylistDlg::MenuFileSaveClick( TObject *Sender )
{
if ( PlaylistSaveDlg->Execute() )
if( PlaylistSaveDlg->Execute() )
{
// playlist_SaveFile ( p_playlist , PlaylistSaveDlg->FileName.c_str() );
// playlist_SaveFile( p_playlist , PlaylistSaveDlg->FileName.c_str() );
}
}
//---------------------------------------------------------------------------
......
......@@ -91,9 +91,9 @@ __published: // IDE-managed Components
void __fastcall DeleteSelectionActionExecute( TObject *Sender );
void __fastcall DeleteAllActionExecute( TObject *Sender );
void __fastcall PlayStreamActionExecute( TObject *Sender );
void __fastcall MenuFileCloseClick(TObject *Sender);
void __fastcall MenuFileOpenClick(TObject *Sender);
void __fastcall MenuFileSaveClick(TObject *Sender);
void __fastcall MenuFileCloseClick( TObject *Sender );
void __fastcall MenuFileOpenClick( TObject *Sender );
void __fastcall MenuFileSaveClick( TObject *Sender );
private: // User declarations
char * __fastcall rindex( char *s, char c );
intf_thread_t *p_intf;
......
......@@ -2,7 +2,7 @@
* win32.cpp : Win32 interface plugin for vlc
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: win32.cpp,v 1.8 2003/01/13 17:11:14 ipkiss Exp $
* $Id: win32.cpp,v 1.9 2003/01/21 21:20:54 ipkiss Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
*
......@@ -76,9 +76,18 @@ static int Open ( vlc_object_t *p_this )
p_intf->p_sys->p_input = NULL;
p_intf->p_sys->i_playing = -1;
p_intf->p_sys->b_play_when_adding = true;
p_intf->p_sys->b_play_when_adding = VLC_TRUE;
p_intf->p_sys->b_slider_free = 1;
p_intf->p_sys->b_aout_update = VLC_FALSE;
p_intf->p_sys->b_vout_update = VLC_FALSE;
p_intf->p_sys->b_program_update = VLC_FALSE;
p_intf->p_sys->b_title_update = VLC_FALSE;
p_intf->p_sys->b_chapter_update = VLC_FALSE;
p_intf->p_sys->b_audio_update = VLC_FALSE;
p_intf->p_sys->b_spu_update = VLC_FALSE;
return( 0 );
}
......@@ -152,7 +161,7 @@ int Win32Manage( intf_thread_t *p_intf )
if( p_intf->p_sys->p_input == NULL )
{
p_intf->p_sys->p_input = (input_thread_t *)
vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
vlc_object_find( p_intf, VLC_OBJECT_INPUT, FIND_ANYWHERE );
}
else if( p_intf->p_sys->p_input->b_dead )
{
......
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