# endif
# endif
-# if defined( _MSC_VER )
+/*
+# if (defined( _MSC_VER ) && (!defined(__WXMSW__)))
# if !defined( _OFF_T_DEFINED )
typedef __int64 off_t;
# define _OFF_T_DEFINED
# else
# define off_t __int64
- /* for wx compatibility typedef long off_t; */
+ // for wx compatibility typedef long off_t;
# endif
# endif
+*/
# if defined( __BORLANDC__ )
# undef off_t
#define VIEW_ALL 3
#define VIEW_FIRST_SORTED 4
#define VIEW_S_AUTHOR 4
+#define VIEW_S_GENRE 5
-#define VIEW_LAST_SORTED 4
+#define VIEW_LAST_SORTED 10
#define VIEW_FIRST_CUSTOM 100
#define SORT_TITLE 1
#define SORT_TITLE_NODES_FIRST 2
#define SORT_AUTHOR 3
-#define SORT_RANDOM 4
-#define SORT_DURATION 5
-#define SORT_TITLE_NUMERIC 6
+#define SORT_GENRE 4
+#define SORT_RANDOM 5
+#define SORT_DURATION 6
+#define SORT_TITLE_NUMERIC 7
#define ORDER_NORMAL 0
#define ORDER_REVERSE 1
void Update();
/* Event handlers (these functions should _not_ be virtual) */
- void OnClose( wxCommandEvent& event );
+ void OnClose( wxCloseEvent& event );
void OnAdd( wxCommandEvent& event );
void OnDel( wxCommandEvent& event );
void OnClear( wxCommandEvent& event );
return wxFrame::Show( show );
}
-void BookmarksDialog::OnClose( wxCommandEvent& event )
+void BookmarksDialog::OnClose( wxCloseEvent& event )
{
Hide();
}
notebook = new wxNotebook( this, Notebook_Event );
+#if (!wxCHECK_VERSION(2,5,0))
wxNotebookSizer *notebook_sizer = new wxNotebookSizer( notebook );
+#endif
notebook->AddPage( VideoPanel( notebook ), wxU(_("Video")) );
notebook->AddPage( EqzPanel( notebook ), wxU(_("Equalizer")) );
notebook->AddPage( AudioPanel( notebook ), wxU(_("Audio")) );
+#if (!wxCHECK_VERSION(2,5,0))
extra_sizer->Add( notebook_sizer, 1, wxEXPAND, 0 );
+#else
+ extra_sizer->Add( notebook, 1, wxEXPAND, 0 );
+#endif
SetSizerAndFit( extra_sizer );
extra_sizer->Layout();
BEGIN_EVENT_TABLE(FileInfo, wxFrame)
/* Button events */
- EVT_BUTTON(wxID_OK, FileInfo::OnClose)
+ EVT_BUTTON(wxID_OK, FileInfo::OnButtonClose)
/* Hide the window when the user closes the window */
EVT_CLOSE(FileInfo::OnClose)
{
}
-void FileInfo::OnClose( wxCloseEvent& event )
+void FileInfo::OnButtonClose( wxCommandEvent& event )
+{
+ wxCloseEvent cevent;
+ OnClose(cevent);
+}
+
+void FileInfo::OnClose( wxCloseEvent& WXUNUSED(event) )
{
Hide();
}
/* Custom events */
EVT_COMMAND(0, wxEVT_INTF, Interface::OnControlEvent)
EVT_COMMAND(1, wxEVT_INTF, Interface::OnControlEvent)
-
END_EVENT_TABLE()
/*****************************************************************************
b_extra = VLC_FALSE;
// b_undock = VLC_FALSE;
+
extra_window = NULL;
/* Give our interface a nice little icon */
p_systray = NULL;
if ( config_GetInt( p_intf, "wxwin-systray" ) )
{
- p_systray = new Systray(this);
+ p_systray = new Systray(this, p_intf);
p_systray->SetIcon( wxIcon( vlc16x16_xpm ), wxT("VLC media player") );
if ( (! p_systray->IsOk()) || (! p_systray->IsIconInstalled()) )
{
*****************************************************************************/
void Interface::CreateOurMenuBar()
{
+ int minimal = config_GetInt( p_intf, "wxwin-minimal" );
+
/* Create the "File" menu */
wxMenu *file_menu = new wxMenu;
+
+ if (!minimal)
+ {
file_menu->Append( OpenFileSimple_Event,
wxU(_("Quick &Open File...\tCtrl-O")) );
file_menu->AppendSeparator();
file_menu->Append( Wizard_Event, wxU(_("&Wizard...\tCtrl-W")) );
file_menu->AppendSeparator();
+ }
file_menu->Append( Exit_Event, wxU(_("E&xit\tCtrl-X")) );
/* Create the "View" menu */
wxMenu *view_menu = new wxMenu;
+ if (!minimal)
+ {
view_menu->Append( Playlist_Event, wxU(_("&Playlist...\tCtrl-P")) );
+ }
view_menu->Append( Logs_Event, wxU(_("&Messages...\tCtrl-M")) );
view_menu->Append( FileInfo_Event,
wxU(_("Stream and Media &info...\tCtrl-I")) );
#define HELP_SLOW N_("Play slower")
#define HELP_FAST N_("Play faster")
+ int minimal = config_GetInt( p_intf, "wxwin-minimal" );
+
wxLogNull LogDummy; /* Hack to suppress annoying log message on the win32
* version because we don't include wx.rc */
toolbar->SetToolBitmapSize( wxSize(TOOLBAR_BMP_WIDTH,TOOLBAR_BMP_HEIGHT) );
+ if (!minimal)
+ {
toolbar->AddTool( OpenFile_Event, wxT(""),
wxBitmap( eject_xpm ), wxU(_(HELP_OPEN)) );
toolbar->AddSeparator();
+ }
wxToolBarToolBase *p_tool = toolbar->AddTool( PlayStream_Event, wxT(""),
wxBitmap( play_xpm ), wxU(_(HELP_PLAY)) );
p_tool->SetClientData( p_tool );
+ if (!minimal)
+ {
toolbar->AddTool( StopStream_Event, wxT(""), wxBitmap( stop_xpm ),
wxU(_(HELP_STOP)) );
toolbar->AddSeparator();
+
toolbar->AddTool( PrevStream_Event, wxT(""),
wxBitmap( prev_xpm ), wxU(_(HELP_PLP)) );
toolbar->AddTool( SlowStream_Event, wxT(""),
toolbar->AddSeparator();
toolbar->AddTool( Playlist_Event, wxT(""), wxBitmap( playlist_xpm ),
wxU(_(HELP_PLO)) );
+ }
wxControl *p_dummy_ctrl =
new wxControl( toolbar, -1, wxDefaultPosition,
EVT_TASKBAR_LEFT_DOWN(Systray::OnLeftClick)
#endif
/* Menu events */
- EVT_MENU(Iconize_Event, Systray::OnLeftClick)
+ EVT_MENU(Iconize_Event, Systray::OnMenuIconize)
EVT_MENU(Exit_Event, Systray::OnExit)
EVT_MENU(PlayStream_Event, Systray::OnPlayStream)
EVT_MENU(NextStream_Event, Systray::OnNextStream)
EVT_MENU(StopStream_Event, Systray::OnStopStream)
END_EVENT_TABLE()
-Systray::Systray( Interface *_p_main_interface )
+Systray::Systray( Interface *_p_main_interface, intf_thread_t *_p_intf )
{
p_main_interface = _p_main_interface;
+ p_intf = _p_intf;
}
/* Event handlers */
-void Systray::OnLeftClick( wxTaskBarIconEvent& event )
+void Systray::OnMenuIconize( wxCommandEvent& event )
{
p_main_interface->Show( ! p_main_interface->IsShown() );
if ( p_main_interface->IsShown() ) p_main_interface->Raise();
}
+void Systray::OnLeftClick( wxTaskBarIconEvent& event )
+{
+ wxCommandEvent cevent;
+ OnMenuIconize(cevent);
+}
+
void Systray::OnExit( wxCommandEvent& event )
{
p_main_interface->Close(TRUE);
/* Systray popup menu */
wxMenu* Systray::CreatePopupMenu()
{
+ int minimal = config_GetInt( p_intf, "wxwin-minimal" );
+
wxMenu* systray_menu = new wxMenu;
systray_menu->Append( Exit_Event, wxU(_("Quit VLC")) );
systray_menu->AppendSeparator();
systray_menu->Append( PlayStream_Event, wxU(_("Play/Pause")) );
+
+ if (!minimal)
+ {
systray_menu->Append( PrevStream_Event, wxU(_("Previous")) );
systray_menu->Append( NextStream_Event, wxU(_("Next")) );
systray_menu->Append( StopStream_Event, wxU(_("Stop")) );
+ }
systray_menu->AppendSeparator();
systray_menu->Append( Iconize_Event, wxU(_("Show/Hide interface")) );
return systray_menu;
{
#define MAX_POPUP_ITEMS 45
+ int minimal = config_GetInt( p_intf, "wxwin-minimal" );
+
vlc_object_t *p_object, *p_input;
char *ppsz_varnames[MAX_POPUP_ITEMS];
int pi_objects[MAX_POPUP_ITEMS];
{
vlc_value_t val;
popupmenu.InsertSeparator( 0 );
+ if (!minimal)
+ {
popupmenu.Insert( 0, Stop_Event, wxU(_("Stop")) );
popupmenu.Insert( 0, Previous_Event, wxU(_("Previous")) );
popupmenu.Insert( 0, Next_Event, wxU(_("Next")) );
+ }
var_Get( p_input, "state", &val );
if( val.i_int == PAUSE_S )
popupmenu.Append( MenuDummy_Event, wxU(_("Miscellaneous")),
MiscMenu( p_intf ), wxT("") );
+ if (!minimal)
+ {
popupmenu.Append( MenuDummy_Event, wxU(_("Open")),
OpenStreamMenu( p_intf ), wxT("") );
+ }
p_intf->p_sys->p_popup_menu = &popupmenu;
p_parent->PopupMenu( &popupmenu, pos.x, pos.y );
wxMutexGuiLeave(); // We don't want deadlocks
var_Set( p_object, p_menuitemext->psz_var, p_menuitemext->val );
- wxMutexGuiEnter();
+ //wxMutexGuiEnter();
vlc_object_release( p_object );
}
BEGIN_EVENT_TABLE(Messages, wxFrame)
/* Button events */
- EVT_BUTTON(wxID_OK, Messages::OnClose)
+ EVT_BUTTON(wxID_OK, Messages::OnButtonClose)
EVT_BUTTON(wxID_CLEAR, Messages::OnClear)
EVT_BUTTON(wxID_SAVEAS, Messages::OnSaveLog)
/*****************************************************************************
* Private methods.
*****************************************************************************/
-void Messages::OnClose( wxEvent& WXUNUSED(event) )
+void Messages::OnButtonClose( wxCommandEvent& WXUNUSED(event) )
+{
+ wxCloseEvent cevent;
+ OnClose(cevent);
+}
+
+void Messages::OnClose( wxCloseEvent& WXUNUSED(event) )
{
Hide();
}
EVT_TEXT(DiscDevice_Event, OpenDialog::OnDiscDeviceChange)
EVT_TEXT(DiscDevice_Event, OpenDialog::OnDiscPanelChange)
EVT_TEXT(DiscTitle_Event, OpenDialog::OnDiscPanelChange)
- EVT_SPINCTRL(DiscTitle_Event, OpenDialog::OnDiscPanelChange)
+ EVT_SPINCTRL(DiscTitle_Event, OpenDialog::OnDiscPanelChangeSpin)
EVT_TEXT(DiscChapter_Event, OpenDialog::OnDiscPanelChange)
- EVT_SPINCTRL(DiscChapter_Event, OpenDialog::OnDiscPanelChange)
+ EVT_SPINCTRL(DiscChapter_Event, OpenDialog::OnDiscPanelChangeSpin)
EVT_TEXT(DiscSub_Event, OpenDialog::OnDiscPanelChange)
- EVT_SPINCTRL(DiscSub_Event, OpenDialog::OnDiscPanelChange)
+ EVT_SPINCTRL(DiscSub_Event, OpenDialog::OnDiscPanelChangeSpin)
/* Events generated by the net panel */
EVT_RADIOBUTTON(NetRadio1_Event, OpenDialog::OnNetTypeChange)
EVT_RADIOBUTTON(NetRadio3_Event, OpenDialog::OnNetTypeChange)
EVT_RADIOBUTTON(NetRadio4_Event, OpenDialog::OnNetTypeChange)
EVT_TEXT(NetPort1_Event, OpenDialog::OnNetPanelChange)
- EVT_SPINCTRL(NetPort1_Event, OpenDialog::OnNetPanelChange)
+ EVT_SPINCTRL(NetPort1_Event, OpenDialog::OnNetPanelChangeSpin)
EVT_TEXT(NetPort2_Event, OpenDialog::OnNetPanelChange)
- EVT_SPINCTRL(NetPort2_Event, OpenDialog::OnNetPanelChange)
+ EVT_SPINCTRL(NetPort2_Event, OpenDialog::OnNetPanelChangeSpin)
EVT_TEXT(NetPort3_Event, OpenDialog::OnNetPanelChange)
- EVT_SPINCTRL(NetPort3_Event, OpenDialog::OnNetPanelChange)
+ EVT_SPINCTRL(NetPort3_Event, OpenDialog::OnNetPanelChangeSpin)
EVT_TEXT(NetAddr2_Event, OpenDialog::OnNetPanelChange)
EVT_TEXT(NetAddr3_Event, OpenDialog::OnNetPanelChange)
EVT_TEXT(NetAddr4_Event, OpenDialog::OnNetPanelChange)
/* Events generated by the caching button */
EVT_CHECKBOX(CachingEnable_Event, OpenDialog::OnCachingEnable)
EVT_TEXT(CachingChange_Event, OpenDialog::OnCachingChange)
- EVT_SPINCTRL(CachingChange_Event, OpenDialog::OnCachingChange)
+ EVT_SPINCTRL(CachingChange_Event, OpenDialog::OnCachingChangeSpin)
/* Hide the window when the user closes the window */
- EVT_CLOSE(OpenDialog::OnCancel)
+ EVT_CLOSE(OpenDialog::OnClose)
END_EVENT_TABLE()
/* Create notebook */
notebook = new wxNotebook( panel, Notebook_Event );
+
+//#if (!wxCHECK_VERSION(2,5,0))
wxNotebookSizer *notebook_sizer = new wxNotebookSizer( notebook );
+//#endif
notebook->AddPage( FilePanel( notebook ), wxU(_("File")),
i_access_method == FILE_ACCESS );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( mrl_sizer_sizer, 0, wxEXPAND, 5 );
panel_sizer->Add( label, 0, wxEXPAND | wxALL, 5 );
+//#if (!wxCHECK_VERSION(2,5,0))
panel_sizer->Add( notebook_sizer, 1, wxEXPAND | wxALL, 5 );
+//#endif
panel_sizer->Add( common_opt_sizer, 0, wxALIGN_LEFT | wxALL, 5 );
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALL, 5 );
}
void OpenDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
+{
+ wxCloseEvent cevent;
+ OnClose(cevent);
+}
+
+void OpenDialog::OnClose( wxCloseEvent& WXUNUSED(event) )
{
Hide();
/*****************************************************************************
* Disc panel event methods.
*****************************************************************************/
+void OpenDialog::OnDiscPanelChangeSpin( wxSpinEvent& event )
+{
+ wxCommandEvent cevent;
+ cevent.SetId(event.GetId());
+ cevent.SetInt(event.GetPosition());
+ OnDiscPanelChange(cevent);
+}
+
void OpenDialog::OnDiscPanelChange( wxCommandEvent& event )
{
if( event.GetId() == DiscTitle_Event ) i_disc_title = event.GetInt();
/*****************************************************************************
* Net panel event methods.
*****************************************************************************/
+void OpenDialog::OnNetPanelChangeSpin( wxSpinEvent& event )
+{
+ wxCommandEvent cevent;
+ cevent.SetId(event.GetId());
+ cevent.SetInt(event.GetPosition());
+ OnNetPanelChange(cevent);
+}
+
void OpenDialog::OnNetPanelChange( wxCommandEvent& event )
{
if( event.GetId() >= NetPort1_Event && event.GetId() <= NetPort3_Event )
UpdateMRL();
}
+void OpenDialog::OnCachingChangeSpin( wxSpinEvent& event )
+{
+ wxCommandEvent cevent;
+ OnCachingChange(cevent);
+}
+
void OpenDialog::OnCachingChange( wxCommandEvent& event )
{
i_caching = event.GetInt();
EVT_MENU(AddFile_Event, Playlist::OnAddFile)
EVT_MENU(AddDir_Event, Playlist::OnAddDir)
EVT_MENU(AddMRL_Event, Playlist::OnAddMRL)
- EVT_MENU(Close_Event, Playlist::OnClose)
+ EVT_MENU(Close_Event, Playlist::OnMenuClose)
EVT_MENU(Open_Event, Playlist::OnOpen)
EVT_MENU(Save_Event, Playlist::OnSave)
/* Update a node */
void Playlist::UpdateNode( playlist_item_t *p_node, wxTreeItemId node )
{
- long cookie;
+ wxTreeItemIdValue cookie;
wxTreeItemId child;
for( int i = 0; i< p_node->i_children ; i++ )
{
/* Find a wxItem from a playlist id */
wxTreeItemId Playlist::FindItem( wxTreeItemId root, int i_id )
{
- long cookie;
+ wxTreeItemIdValue cookie;
PlaylistItem *p_wxcurrent;
wxTreeItemId search;
wxTreeItemId item = treectrl->GetFirstChild( root, cookie );
int Playlist::CountItems( wxTreeItemId root )
{
- long cookie;
+ wxTreeItemIdValue cookie;
int count = 0;
wxTreeItemId item = treectrl->GetFirstChild( root, cookie );
/* Find a wxItem from a name (from current) */
wxTreeItemId Playlist::FindItemByName( wxTreeItemId root, wxString search_string, wxTreeItemId current, vlc_bool_t *pb_current_found )
{
- long cookie;
+ wxTreeItemIdValue cookie;
wxTreeItemId search;
wxTreeItemId item = treectrl->GetFirstChild( root, cookie );
wxTreeItemId child;
playlist_NodeDelete( p_playlist, p_item, VLC_TRUE , VLC_FALSE );
}
+void Playlist::OnMenuClose( wxCommandEvent& event )
+{
+ wxCloseEvent cevent;
+ OnClose(cevent);
+}
void Playlist::OnClose( wxCloseEvent& WXUNUSED(event) )
{
wxMutexGuiLeave();
playlist_ServicesDiscoveryRemove( p_playlist,
pp_sds[event.GetId() - FirstSD_Event] );
- wxMutexGuiEnter();
+ //wxMutexGuiEnter();
}
}
}
EVT_CHECKBOX(Advanced_Event, PrefsDialog::OnAdvanced)
/* Don't destroy the window when the user closes it */
- EVT_CLOSE(PrefsDialog::OnCancel)
+ EVT_CLOSE(PrefsDialog::OnClose)
END_EVENT_TABLE()
// menu and control ids
prefs_tree->CleanChanges();
}
-void PrefsDialog::OnCancel( wxEvent& WXUNUSED(event) )
+void PrefsDialog::OnClose( wxCloseEvent& WXUNUSED(event) )
+{
+ wxCommandEvent cevent;
+ OnCancel(cevent);
+}
+
+void PrefsDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
{
this->Hide();
prefs_tree->CleanChanges();
b_advanced = VLC_FALSE;
root_item = AddRoot( wxT("") );
+ wxASSERT_MSG(root_item.IsOk(), "Could not add root item");
wxImageList *p_images = new wxImageList( 16,16,TRUE );
p_images->Add( wxIcon( audio_xpm ) );
if( !i_options ) continue;
/* Find the right category item */
- long cookie;
+ wxTreeItemIdValue cookie;
vlc_bool_t b_found = VLC_FALSE;
+
wxTreeItemId category_item = GetFirstChild( root_item , cookie);
while( category_item.IsOk() )
{
/* Find subcategory item */
b_found = VLC_FALSE;
- cookie = -1;
+ //cookie = -1;
wxTreeItemId subcategory_item = GetFirstChild( category_item, cookie );
while( subcategory_item.IsOk() )
{
}
/* Sort all this mess */
- long cookie; size_t i_child_index;
+ wxTreeItemIdValue cookie;
+ size_t i_child_index;
wxTreeItemId capability_item = GetFirstChild( root_item, cookie);
for( i_child_index = 0;
- i_child_index < GetChildrenCount( plugins_item, FALSE );
+ (capability_item.IsOk() &&
+ //(i_child_index < GetChildrenCount( plugins_item, FALSE )));
+ (i_child_index < GetChildrenCount( root_item, FALSE )));
i_child_index++ )
{
SortChildren( capability_item );
- capability_item = GetNextChild( plugins_item, cookie );
+ //capability_item = GetNextChild( plugins_item, cookie );
+ capability_item = GetNextChild( root_item, cookie );
}
/* Clean-up everything */
SelectItem( GetFirstChild( root_item, cookie ) );
#endif
- Expand( root_item );
+ //cannot expand hidden root item
+ //Expand( root_item );
}
-PrefsTreeCtrl::~PrefsTreeCtrl()
-{
+PrefsTreeCtrl::~PrefsTreeCtrl(){
}
void PrefsTreeCtrl::ApplyChanges()
{
- long cookie, cookie2, cookie3;
+ wxTreeItemIdValue cookie, cookie2, cookie3;
ConfigTreeData *config_data;
wxTreeItemId category = GetFirstChild( root_item, cookie );
void PrefsTreeCtrl::CleanChanges()
{
- long cookie, cookie2, cookie3;
+ wxTreeItemIdValue cookie, cookie2, cookie3;
ConfigTreeData *config_data;
config_data = !GetSelection() ? NULL :
if( config_data )
{
config_data->panel->Hide();
+#if (wxMAJOR_VERSION >= 2) && (wxMINOR_VERSION < 5 )
p_sizer->Remove( config_data->panel );
+#else
+ p_sizer->Detach( config_data->panel );
+#endif
}
wxTreeItemId category = GetFirstChild( root_item, cookie );
return config_data;
}
- long cookie, cookie2, cookie3;
+ wxTreeItemIdValue cookie, cookie2, cookie3;
ConfigTreeData *config_new;
wxTreeItemId category = GetFirstChild( root_item, cookie );
while( category.IsOk() )
if( config_data && config_data->panel )
{
config_data->panel->Hide();
+#if (wxMAJOR_VERSION >= 2) && (xwMINOR_VERSION < 5 )
p_sizer->Remove( config_data->panel );
+#else
+ p_sizer->Detach( config_data->panel );
+#endif
}
/* Don't use event.GetItem() because we also send fake events */
if( config_data )
{
config_data->panel->Hide();
+
+#if (wxMAJOR_VERSION >= 2) && (xwMINOR_VERSION < 5 )
p_sizer->Remove( config_data->panel );
+#else
+ p_sizer->Detach( config_data->panel );
+#endif
}
if( GetSelection() )
p_update_data = p_data;
}
-void ConfigControl::OnUpdate( wxEvent& WXUNUSED(event) )
+void ConfigControl::OnUpdate( wxCommandEvent& WXUNUSED(event) )
{
if( pf_update_callback )
{
}
}
+void ConfigControl::OnUpdateScroll( wxScrollEvent& WXUNUSED(event) )
+{
+ wxCommandEvent cevent;
+ OnUpdate(cevent);
+}
+
+
/*****************************************************************************
* KeyConfigControl implementation
*****************************************************************************/
*****************************************************************************/
BEGIN_EVENT_TABLE(IntegerConfigControl, wxPanel)
EVT_TEXT(-1, IntegerConfigControl::OnUpdate)
- EVT_COMMAND_SCROLL(-1, IntegerConfigControl::OnUpdate)
+ EVT_COMMAND_SCROLL(-1, IntegerConfigControl::OnUpdateScroll)
END_EVENT_TABLE()
IntegerConfigControl::IntegerConfigControl( vlc_object_t *p_this,
return i_value; //spin->GetValue();
}
-void IntegerConfigControl::OnUpdate( wxScrollEvent &event )
+void IntegerConfigControl::OnUpdate( wxCommandEvent &event )
{
i_value = event.GetInt();
ConfigControl::OnUpdate( event );
}
+void IntegerConfigControl::OnUpdateScroll( wxScrollEvent &event )
+{
+ wxCommandEvent cevent;
+ cevent.SetInt(event.GetPosition());
+ OnUpdate(cevent);
+}
/*****************************************************************************
* IntegerListConfigControl implementation
* RangedIntConfigControl implementation
*****************************************************************************/
BEGIN_EVENT_TABLE(RangedIntConfigControl, wxPanel)
- EVT_COMMAND_SCROLL(-1, RangedIntConfigControl::OnUpdate)
+ EVT_COMMAND_SCROLL(-1, RangedIntConfigControl::OnUpdateScroll)
END_EVENT_TABLE()
RangedIntConfigControl::RangedIntConfigControl( vlc_object_t *p_this,
return slider->GetValue();
}
+
/*****************************************************************************
* FloatConfigControl implementation
*****************************************************************************/
void (*pf_update_callback)( void * );
void *p_update_data;
- void OnUpdate( wxEvent& );
+ void OnUpdate( wxCommandEvent& event );
+ void OnUpdateScroll( wxScrollEvent& event );
private:
wxString name;
wxSpinCtrl *spin;
int i_value;
- void OnUpdate( wxScrollEvent& );
+ void OnUpdate( wxCommandEvent& event );
+ void OnUpdateScroll( wxScrollEvent& event );
DECLARE_EVENT_TABLE()
};
{
public:
wizHelloPage( wxWizard *parent);
- void OnActionChange(wxEvent& event);
+ void OnActionChange( wxCommandEvent& event );
void OnWizardPageChanging(wxWizardEvent& event);
void OnMoreInfo( wxCommandEvent& event );
protected:
wizInputPage( wxWizard *, wxWizardPage *, intf_thread_t *);
wizInputPage::~wizInputPage();
void OnWizardPageChanging(wxWizardEvent& event);
- void OnInputChange(wxEvent& event);
+ void OnInputChange( wxCommandEvent& event );
void OnEnablePartial(wxCommandEvent& event);
virtual wxWizardPage *GetPrev() const;
virtual wxWizardPage *GetNext() const;
wxStaticText *address_text;
wxTextCtrl *address_txtctrl;
WizardDialog * p_parent;
- void OnMethodChange(wxEvent& event);
+ void OnMethodChange( wxCommandEvent& event );
wxRadioButton *method_radios[4];
wxWizardPage *p_prev;
wxWizardPage *p_next;
int i_encap;
int i_mux;
int i_action;
- void OnEncapChange(wxEvent& event);
+ void OnEncapChange( wxCommandEvent& event );
wxRadioButton *encap_radios[MUXERS_NUMBER];
WizardDialog *p_parent;
wxWizardPage *p_prev;
wxOK | wxICON_INFORMATION, this->p_parent );
}
-void wizHelloPage::OnActionChange(wxEvent& event)
+void wizHelloPage::OnActionChange( wxCommandEvent& event )
{
i_action = event.GetId() - ActionRadio0_Event;
((wizInputPage *)GetNext())->SetAction( i_action );
{
}
-void wizInputPage::OnInputChange(wxEvent& event)
+void wizInputPage::OnInputChange( wxCommandEvent& event )
{
i_input = event.GetId() - InputRadio0_Event;
if( i_input == 0 )
void wizStreamingMethodPage::SetPrev( wxWizardPage *page) {p_prev = page; }
-void wizStreamingMethodPage::OnMethodChange(wxEvent& event)
+void wizStreamingMethodPage::OnMethodChange( wxCommandEvent& event )
{
i_method = event.GetId() - MethodRadio0_Event;
address_text->SetLabel( wxU(
}
-void wizEncapPage::OnEncapChange(wxEvent& event)
+void wizEncapPage::OnEncapChange( wxCommandEvent& event )
{
i_mux = event.GetId() - EncapRadio0_Event;
}
"starts.")
#define TASKBAR_TEXT N_("Show taskbar entry")
#define TASKBAR_LONGTEXT N_("Show taskbar entry")
+#define MINIMAL_TEXT N_("Minimal interface")
+#define MINIMAL_LONGTEXT N_("Use minimal interface, no toolbar, few menus")
#define SYSTRAY_TEXT N_("Show systray icon")
#define SYSTRAY_LONGTEXT N_("Show systray icon")
BOOKMARKS_TEXT, BOOKMARKS_LONGTEXT, VLC_FALSE );
add_bool( "wxwin-taskbar", 1, NULL,
TASKBAR_TEXT, TASKBAR_LONGTEXT, VLC_FALSE );
+ add_bool( "wxwin-minimal", 0, NULL,
+ MINIMAL_TEXT, MINIMAL_LONGTEXT, VLC_TRUE );
#ifdef wxHAS_TASK_BAR_ICON
add_bool( "wxwin-systray", 0, NULL,
SYSTRAY_TEXT, SYSTRAY_LONGTEXT, VLC_FALSE );
/*****************************************************************************
* Run: wxWindows thread
*****************************************************************************/
+
+//when is this called?
#if !defined(__BUILTIN__) && defined( WIN32 )
HINSTANCE hInstance = 0;
extern "C" BOOL WINAPI
#if defined( WIN32 )
#if !defined(__BUILTIN__)
+
+ //because no one knows when DllMain is called
+ if (hInstance == NULL)
+ hInstance = GetModuleHandle(NULL);
+
wxEntry( hInstance/*GetModuleHandle(NULL)*/, NULL, NULL, SW_SHOW );
#else
wxEntry( GetModuleHandle(NULL), NULL, NULL, SW_SHOW );
{
style = wxDEFAULT_FRAME_STYLE|wxFRAME_NO_TASKBAR;
}
+
Interface *MainInterface = new Interface( p_intf, style );
p_intf->p_sys->p_wxwindow = MainInterface;
#include <wx/taskbar.h>
#include "vlc_keys.h"
-/* Hmmm, work-around for newest wxWin */
-#ifdef wxStaticCastEvent
-# undef wxStaticCastEvent
-# define wxStaticCastEvent(type, val) ((type)(val))
+//PITA
+#if (!wxCHECK_VERSION(2,5,0))
+typedef long wxTreeItemIdValue;
#endif
+
DECLARE_LOCAL_EVENT_TYPE( wxEVT_DIALOG, 0 );
DECLARE_LOCAL_EVENT_TYPE( wxEVT_INTF, 1 );
class Systray: public wxTaskBarIcon
{
public:
- Systray( Interface* p_main_interface );
+ Systray( Interface* p_main_interface, intf_thread_t *p_intf );
virtual ~Systray() {};
wxMenu* CreatePopupMenu();
void UpdateTooltip( const wxChar* tooltip );
private:
+ void OnMenuIconize( wxCommandEvent& event );
void OnLeftClick( wxTaskBarIconEvent& event );
void OnPlayStream ( wxCommandEvent& event );
void OnStopStream ( wxCommandEvent& event );
void OnNextStream ( wxCommandEvent& event );
void OnExit( wxCommandEvent& event );
Interface* p_main_interface;
+ intf_thread_t *p_intf;
DECLARE_EVENT_TABLE()
};
#endif
/* Event handlers (these functions should _not_ be virtual) */
void OnOk( wxCommandEvent& event );
void OnCancel( wxCommandEvent& event );
+ void OnClose( wxCloseEvent& event );
void OnPageChange( wxNotebookEvent& event );
void OnMRLChange( wxCommandEvent& event );
void OnFileBrowse( wxCommandEvent& event );
/* Event handlers for the disc page */
+ void OnDiscPanelChangeSpin( wxSpinEvent& event );
void OnDiscPanelChange( wxCommandEvent& event );
void OnDiscTypeChange( wxCommandEvent& event );
void OnDiscDeviceChange( wxCommandEvent& event );
/* Event handlers for the net page */
+ void OnNetPanelChangeSpin( wxSpinEvent& event );
void OnNetPanelChange( wxCommandEvent& event );
void OnNetTypeChange( wxCommandEvent& event );
/* Event handlers for the caching option */
void OnCachingEnable( wxCommandEvent& event );
void OnCachingChange( wxCommandEvent& event );
+ void OnCachingChangeSpin( wxSpinEvent& event );
DECLARE_EVENT_TABLE();
/* Event handlers (these functions should _not_ be virtual) */
void OnOk( wxCommandEvent& event );
- void OnCancel( wxEvent& event );
+ void OnCancel( wxCommandEvent& event );
void OnSave( wxCommandEvent& event );
void OnResetAll( wxCommandEvent& event );
void OnAdvanced( wxCommandEvent& event );
+ void OnClose( wxCloseEvent& event );
DECLARE_EVENT_TABLE();
private:
/* Event handlers (these functions should _not_ be virtual) */
- void OnClose( wxEvent& event );
+ void OnButtonClose( wxCommandEvent& event );
+ void OnClose( wxCloseEvent& WXUNUSED(event) );
void OnClear( wxCommandEvent& event );
void OnSaveLog( wxCommandEvent& event );
void OnAddFile( wxCommandEvent& event );
void OnAddDir( wxCommandEvent& event );
void OnAddMRL( wxCommandEvent& event );
- void OnClose( wxCloseEvent& event );
+ void OnMenuClose( wxCommandEvent& event );
+ void OnClose( wxCloseEvent& WXUNUSED(event) );
void OnEnableSelection( wxCommandEvent& event );
void OnDisableSelection( wxCommandEvent& event );
vlc_bool_t b_need_update;
private:
- void OnClose( wxCloseEvent& event );
+ void OnButtonClose( wxCommandEvent& event );
+ void OnClose( wxCloseEvent& WXUNUSED(event) );
DECLARE_EVENT_TABLE();
psz_search = vlc_input_item_GetInfo( &pp_items[i]->input,
_("Meta-information"), _( "Artist" ) );
}
+ else if ( i_mode == SORT_GENRE )
+ {
+ psz_search = vlc_input_item_GetInfo( &pp_items[i]->input,
+ _("Meta-information"), _( "Genre" ) );
+ }
if( psz_search && !strcmp( psz_search, "" ) )
{
}
/* Handle update of sorted views here */
- if( i_view == VIEW_S_AUTHOR )
+ if( i_view >= VIEW_FIRST_SORTED )
{
+ int i_sort_type;
playlist_ViewEmpty( p_playlist, i_view, VLC_FALSE );
+ switch( i_view )
+ {
+ case VIEW_S_AUTHOR: i_sort_type = SORT_AUTHOR;break;
+ case VIEW_S_GENRE: i_sort_type = SORT_GENRE;break;
+ default: i_sort_type = SORT_AUTHOR;
+ }
playlist_NodeGroup( p_playlist, i_view, p_view->p_root,
p_playlist->pp_items,p_playlist->i_size,
- SORT_AUTHOR, ORDER_NORMAL );
+ i_sort_type, ORDER_NORMAL );
}