Commit ea1b641e authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: drag&drop on the playlist only enqueue.
   Small cosmetic change to the playlist.
parent e6a8cb4f
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -1303,9 +1303,10 @@ void Interface::TogglePlayButton( int i_playing_status )
/*****************************************************************************
* 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,
......@@ -1323,7 +1324,8 @@ 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 );
......
......@@ -2,7 +2,7 @@
* 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 Teulire <ipkiss@via.ecp.fr>
*
......@@ -222,9 +222,9 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
/* 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 =
......@@ -243,7 +243,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
/* 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 */
......@@ -292,11 +292,11 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
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 );
......@@ -306,8 +306,8 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
/* 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 );
......@@ -330,7 +330,7 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
#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 =
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -880,13 +880,14 @@ private:
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
......
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