Commit 2ff05ab8 authored by zorglub's avatar zorglub

Add a close button. Put "-" instead of nothing when there is no info

parent 71b544d6
......@@ -40,7 +40,7 @@ enum
BEGIN_EVENT_TABLE(FileInfo, wxFrame)
/* Button events */
EVT_BUTTON(wxID_OK, FileInfo::OnButtonClose)
EVT_BUTTON(wxID_CLOSE, FileInfo::OnButtonClose)
/* Hide the window when the user closes the window */
EVT_CLOSE(FileInfo::OnClose)
......@@ -83,6 +83,9 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, wxWindow *p_parent ):
panel_sizer->Add( notebook, 1, wxEXPAND | wxALL, 5 );
#endif
panel_sizer->Add( new wxButton( this, wxID_CLOSE, wxU(_("Close") )) ,
0, wxALL|wxALIGN_RIGHT, 5 );
panel_sizer->Layout();
SetSizerAndFit( panel_sizer );
......
......@@ -122,10 +122,11 @@ void MetaDataPanel::Update( input_item_t *p_item )
#define UPDATE_META( meta, widget ) { \
char *psz_meta = vlc_input_item_GetInfo( p_item, _(VLC_META_INFO_CAT), \
_(meta) ); \
if( psz_meta != NULL ) \
if( psz_meta != NULL && *psz_meta) \
{ \
widget->SetLabel( wxU( psz_meta ) ); \
} \
else { widget->SetLabel( wxU( "-" ) ); } \
}
UPDATE_META( VLC_META_ARTIST, artist_text );
......
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