]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/playlist.cpp: when duration is not known, don't display ...
authorYoann Peronneau <yoann@videolan.org>
Sat, 15 Jan 2005 00:42:23 +0000 (00:42 +0000)
committerYoann Peronneau <yoann@videolan.org>
Sat, 15 Jan 2005 00:42:23 +0000 (00:42 +0000)
TODO
modules/gui/wxwindows/playlist.cpp

diff --git a/TODO b/TODO
index c6b3e62ef18b12f69a03833279605cc3cc33a3ab..35cb4e76eb7f17c0ee0d6b6e7d9ba23d97ccd47e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -45,7 +45,7 @@ Platform: any
 Urgency: Important
 Description: proper DVD controls
 Most importantly a proper button that will take you straight to the DVD menu. But also, next/prev chapter should be integrated with next/prev playlistitem.
-Status: Todo
+Status: Assigned to yoann (done)
 
 Task
 Difficulty: Easy
index 304b327376b2f8e0a57925acf9f21edebcee839c..9da7b9bc67956103d4ccb5212662c0dc0ba4ec99 100644 (file)
@@ -516,26 +516,27 @@ void Playlist::UpdateTreeItem( playlist_t *p_playlist, wxTreeItemId item )
     }
 
     wxString msg;
+    wxString duration = wxU( "" );
     char *psz_author = playlist_ItemGetInfo( p_item, _("Meta-information"),
                                                      _("Artist"));
     char psz_duration[MSTRTIME_MAX_SIZE];
     mtime_t dur = p_item->input.i_duration;
 
     if( dur != -1 )
+    {
         secstotimestr( psz_duration, dur/1000000 );
-    else
-        memcpy( psz_duration, "-:--:--", sizeof("-:--:--") );
+        duration.Append( wxU( " ( " ) +  wxString( wxU( psz_duration ) ) +
+                         wxU( ")" ) );
+    }
 
     if( !strcmp( psz_author, "" ) || p_item->input.b_fixed_name == VLC_TRUE )
     {
-        msg.Printf( wxString( wxU( p_item->input.psz_name ) ) + wxU( " ( ") +
-                    wxString(wxU(psz_duration ) ) + wxU( ")") );
+        msg.Printf( wxString( wxU( p_item->input.psz_name ) ) + duration );
     }
     else
     {
         msg.Printf( wxString(wxU( psz_author )) + wxT(" - ") +
-                    wxString(wxU(p_item->input.psz_name)) + wxU( " ( ") +
-                    wxString(wxU(psz_duration ) ) + wxU( ")") );
+                    wxString(wxU(p_item->input.psz_name)) + duration );
     }
     treectrl->SetItemText( item , msg );
     treectrl->SetItemImage( item, p_item->input.i_type );