Commit 006f12b5 authored by Boris Dorès's avatar Boris Dorès

- * : start playing only when opening a stream from the main window;

  when opening it from the playlist window, add it to the list, but
  don't change anything to the playing state and current stream.

- playlist.dfm : proper resizing behaviour
parent 4552cb1e
......@@ -81,8 +81,9 @@ void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender )
/* Build source name and add it to playlist */
Source = Method + ":" + Device + "@" + Title + "," + Chapter;
p_intf->p_sys->p_playwin->Add( Source, PLAYLIST_APPEND | PLAYLIST_GO,
PLAYLIST_END );
p_intf->p_sys->p_playwin->Add( Source, PLAYLIST_APPEND
| ( p_intf->p_sys->b_play_when_adding ? PLAYLIST_GO : 0 ),
PLAYLIST_END );
}
//---------------------------------------------------------------------------
void __fastcall TDiscDlg::RadioGroupTypeClick( TObject *Sender )
......
......@@ -149,8 +149,9 @@ void __fastcall TMainFrameDlg::OpenFileActionExecute( TObject *Sender )
/* add the new file to the interface playlist */
for ( int i = 0 ; i < OpenDialog1->Files->Count ; i++ )
p_intf->p_sys->p_playwin->Add( OpenDialog1->Files->Strings[i],
PLAYLIST_APPEND,
PLAYLIST_END );
PLAYLIST_APPEND
| ( p_intf->p_sys->b_play_when_adding ? PLAYLIST_GO : 0 ),
PLAYLIST_END );
};
}
//---------------------------------------------------------------------------
......
......@@ -105,8 +105,9 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
Source = "udp:@:" + IntToStr( i_port );
p_intf->p_sys->p_playwin->Add( Source,
PLAYLIST_APPEND | PLAYLIST_GO,
PLAYLIST_END );
PLAYLIST_APPEND
| ( p_intf->p_sys->b_play_when_adding ? PLAYLIST_GO : 0 )
, PLAYLIST_END );
break;
/* UDP Multicast */
......@@ -119,8 +120,9 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
Source = "udp:@" + Address + ":" + IntToStr( i_port );
p_intf->p_sys->p_playwin->Add( Source,
PLAYLIST_APPEND | PLAYLIST_GO,
PLAYLIST_END );
PLAYLIST_APPEND
| ( p_intf->p_sys->b_play_when_adding ? PLAYLIST_GO : 0 )
, PLAYLIST_END );
/* Channel server */
case 2:
......@@ -152,8 +154,9 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
}
p_intf->p_sys->p_playwin->Add( Source,
PLAYLIST_APPEND | PLAYLIST_GO,
PLAYLIST_END );
PLAYLIST_APPEND
| ( p_intf->p_sys->b_play_when_adding ? PLAYLIST_GO : 0 )
, PLAYLIST_END );
break;
}
......
......@@ -189,17 +189,23 @@ void __fastcall TPlaylistDlg::ListViewPlaylistCustomDrawItem(
****************************************************************************/
void __fastcall TPlaylistDlg::MenuAddFileClick( TObject *Sender )
{
p_intf->p_sys->b_play_when_adding = false;
p_intf->p_sys->p_window->OpenFileActionExecute( Sender );
p_intf->p_sys->b_play_when_adding = true;
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuAddDiscClick( TObject *Sender )
{
p_intf->p_sys->b_play_when_adding = false;
p_intf->p_sys->p_window->OpenDiscActionExecute( Sender );
p_intf->p_sys->b_play_when_adding = true;
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuAddNetClick( TObject *Sender )
{
p_intf->p_sys->b_play_when_adding = false;
p_intf->p_sys->p_window->NetworkStreamActionExecute( Sender );
p_intf->p_sys->b_play_when_adding = true;
}
//---------------------------------------------------------------------------
void __fastcall TPlaylistDlg::MenuAddUrlClick( TObject *Sender )
......
......@@ -34,7 +34,7 @@ object PlaylistDlg: TPlaylistDlg
Top = 10
Width = 305
Height = 331
Anchors = [akTop, akBottom]
Anchors = [akLeft, akTop, akRight, akBottom]
Columns = <
item
Caption = 'Filename'
......
......@@ -2,7 +2,7 @@
* win32.cpp : Win32 interface plugin for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: win32.cpp,v 1.5 2002/12/13 03:52:58 videolan Exp $
* $Id: win32.cpp,v 1.6 2002/12/13 17:05:12 babal Exp $
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
*
......@@ -76,6 +76,7 @@ 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_slider_free = 1;
return( 0 );
......
......@@ -73,6 +73,7 @@ struct intf_sys_t
/* Playlist management */
int i_playing; /* playlist selected item */
vlc_bool_t b_play_when_adding;
/* The window labels for DVD mode */
TLabel * p_label_title;
......
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