* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: interface.cpp,v 1.70 2003/10/29 18:54:45 gbazin Exp $
+ * $Id: interface.cpp,v 1.71 2003/11/21 18:55:40 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
/*****************************************************************************
* Definition of DragAndDrop class.
*****************************************************************************/
-DragAndDrop::DragAndDrop( intf_thread_t *_p_intf )
+DragAndDrop::DragAndDrop( intf_thread_t *_p_intf, vlc_bool_t _b_enqueue )
{
p_intf = _p_intf;
+ b_enqueue = _b_enqueue;
}
bool DragAndDrop::OnDropFiles( wxCoord, wxCoord,
for( size_t i = 0; i < filenames.GetCount(); i++ )
playlist_Add( p_playlist, (const char *)filenames[i].mb_str(), 0, 0,
- PLAYLIST_APPEND | (i ? 0 : PLAYLIST_GO), PLAYLIST_END );
+ PLAYLIST_APPEND | ((i | b_enqueue) ? 0 : PLAYLIST_GO),
+ PLAYLIST_END );
vlc_object_release( p_playlist );
* playlist.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: playlist.cpp,v 1.25 2003/11/21 13:20:41 zorglub Exp $
+ * $Id: playlist.cpp,v 1.26 2003/11/21 18:55:40 gbazin Exp $
*
* Authors: Olivier Teulière <ipkiss@via.ecp.fr>
*
/* Create the Random checkbox */
wxCheckBox *random_checkbox =
new wxCheckBox( playlist_panel, Random_Event, wxU(_("Random")) );
- var_Get( p_intf, "random", &val);
+ var_Get( p_intf, "random", &val );
vlc_bool_t b_random = val.b_bool;
- random_checkbox->SetValue( b_random == VLC_FALSE ? 0 : 1);
+ random_checkbox->SetValue( b_random == VLC_FALSE ? 0 : 1 );
/* Create the Loop Checkbox */
wxCheckBox *loop_checkbox =
/* Create the Search Textbox */
search_text =
new wxTextCtrl( playlist_panel, SearchText_Event, wxT(""),
- wxDefaultPosition, wxSize( 140, -1),
+ wxDefaultPosition, wxSize(140, -1),
wxTE_PROCESS_ENTER);
/* Create the search button */
wxBoxSizer *checkbox_sizer = new wxBoxSizer( wxHORIZONTAL );
checkbox_sizer->Add( random_checkbox, 0,
- wxEXPAND|wxALIGN_RIGHT, 5);
+ wxEXPAND | wxALIGN_RIGHT | wxALL, 5);
checkbox_sizer->Add( loop_checkbox, 0,
- wxEXPAND|wxALIGN_RIGHT, 5);
+ wxEXPAND | wxALIGN_RIGHT | wxALL, 5);
checkbox_sizer->Add( repeat_checkbox, 0,
- wxEXPAND|wxALIGN_RIGHT, 5);
+ wxEXPAND | wxALIGN_RIGHT | wxALL, 5);
checkbox_sizer->Layout();
wxBoxSizer *search_sizer = new wxBoxSizer( wxHORIZONTAL );
/* The top and bottom sizers */
wxBoxSizer *top_sizer = new wxBoxSizer( wxHORIZONTAL );
- top_sizer->Add( checkbox_sizer, 0, wxLEFT|wxRIGHT|wxALIGN_LEFT, 4 );
- top_sizer->Add( search_sizer, 0, wxLEFT|wxRIGHT|wxALIGN_RIGHT, 4 );
+ top_sizer->Add( checkbox_sizer, 1, wxLEFT|wxRIGHT|wxALIGN_LEFT, 4 );
+ top_sizer->Add( search_sizer, 1, wxLEFT|wxRIGHT|wxALIGN_RIGHT, 4 );
top_sizer->Layout();
wxBoxSizer *bottom_sizer = new wxBoxSizer( wxHORIZONTAL );
#if !defined(__WXX11__)
/* Associate drop targets with the playlist */
- SetDropTarget( new DragAndDrop( p_intf ) );
+ SetDropTarget( new DragAndDrop( p_intf, VLC_TRUE ) );
#endif
playlist_t *p_playlist =
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.71 2003/11/21 13:20:41 zorglub Exp $
+ * $Id: wxwindows.h,v 1.72 2003/11/21 18:55:40 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
class DragAndDrop: public wxFileDropTarget
{
public:
- DragAndDrop( intf_thread_t *_p_intf );
+ DragAndDrop( intf_thread_t *_p_intf, vlc_bool_t b_enqueue = VLC_FALSE );
virtual bool OnDropFiles( wxCoord x, wxCoord y,
const wxArrayString& filenames );
private:
intf_thread_t *p_intf;
+ vlc_bool_t b_enqueue;
};
#endif