]> git.sesse.net Git - vlc/commitdiff
Add a close button. Put "-" instead of nothing when there is no info
authorClément Stenac <zorglub@videolan.org>
Tue, 21 Feb 2006 21:19:54 +0000 (21:19 +0000)
committerClément Stenac <zorglub@videolan.org>
Tue, 21 Feb 2006 21:19:54 +0000 (21:19 +0000)
modules/gui/wxwidgets/dialogs/fileinfo.cpp
modules/gui/wxwidgets/dialogs/infopanels.cpp

index a591801ef0c78e99ea52bb6d70c2cb84a8b9209f..1296a9d00e61449ecf305e5ac54e224c45b6425c 100644 (file)
@@ -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 );
 
index a5217de177ee22029e04f003ae1081af7dcc1bc7..b73ccf54334408ebf254d01d12cd3854f67add61 100644 (file)
@@ -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 );