panel->SetAutoLayout( TRUE );
/* Create the standard info panel */
- info_panel = new ItemInfoPanel(p_intf, panel, true );
- info_panel->Update( &(p_item->input) );
+ info_panel = new MetaDataPanel(p_intf, panel, true );
+ info_panel->Update( p_item->p_input );
/* Separation */
wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
/* Create the buttons */
- wxButton *ok_button = new wxButton( panel, wxID_OK );
+ wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("&OK")) );
ok_button->SetDefault();
- wxButton *cancel_button = new wxButton( panel, wxID_CANCEL );
+ wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
+ wxU(_("&Cancel")) );
/* Place everything in sizers */
- wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
- button_sizer->Add( ok_button, 0, wxALL, 5 );
- button_sizer->Add( cancel_button, 0, wxALL, 5 );
- button_sizer->Layout();
+ wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
+ button_sizer->AddButton( ok_button );
+ button_sizer->AddButton( cancel_button );
+ button_sizer->Realize();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( info_panel, 1, wxEXPAND | wxALL, 5 );
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
- panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALIGN_BOTTOM |
- wxALL, 5 );
+ panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 );
*****************************************************************************/
void ItemInfoDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
{
- vlc_mutex_lock( &p_item->input.lock );
- p_item->input.psz_name = info_panel->GetName();
- p_item->input.psz_uri = info_panel->GetURI();
- vlc_mutex_unlock( &p_item->input.lock );
+ vlc_mutex_lock( &p_item->p_input->lock );
+ p_item->p_input->psz_name = info_panel->GetName();
+ p_item->p_input->psz_uri = info_panel->GetURI();
+ vlc_mutex_unlock( &p_item->p_input->lock );
EndModal( wxID_OK );
}