]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/sorting.h
Typo in [1b9f9692f91dcf0659919b16551389e0dbf96412]
[vlc] / modules / gui / qt4 / components / playlist / sorting.h
index cf72337009b6126f3ccd674dc842898c086a86d7..ca2f8f241f7390a1550540e7ed641d77776fe56e 100644 (file)
 /* You can use these numbers with | and & to determine what you want to show */
 enum
 {
-    COLUMN_NUMBER       = 0x0001,
-    COLUMN_TITLE        = 0x0002,
-    COLUMN_DURATION     = 0x0004,
-    COLUMN_ARTIST       = 0x0008,
-    COLUMN_GENRE        = 0x0010,
-    COLUMN_ALBUM        = 0x0020,
-    COLUMN_TRACK_NUMBER = 0x0040,
-    COLUMN_DESCRIPTION  = 0x0080,
-    COLUMN_URI          = 0x0100,
+    COLUMN_TITLE          = 0x0001,
+    COLUMN_DURATION       = 0x0002,
+    COLUMN_ARTIST         = 0x0004,
+    COLUMN_GENRE          = 0x0008,
+    COLUMN_ALBUM          = 0x0010,
+    COLUMN_TRACK_NUMBER   = 0x0020,
+    COLUMN_DESCRIPTION    = 0x0040,
+    COLUMN_URI            = 0x0080,
+    COLUMN_NUMBER         = 0x0100,
 
     /* Add new entries here and update the COLUMN_END value*/
 
     COLUMN_END          = 0x0200
 };
 
+#define COLUMN_DEFAULT (COLUMN_TITLE|COLUMN_DURATION|COLUMN_ALBUM)
+
 /* Return the title of a column */
-static const char * psz_column_title( uint32_t i_column )
+static inline const char * psz_column_title( uint32_t i_column )
 {
     switch( i_column )
     {
@@ -59,9 +61,8 @@ static const char * psz_column_title( uint32_t i_column )
 
 /* Return the meta data associated with an item for a column
  * Returned value has to be freed */
-static char * psz_column_meta( input_item_t *p_item, uint32_t i_column )
+static inline char * psz_column_meta( input_item_t *p_item, uint32_t i_column )
 {
-    char *psz;
     int i_duration;
     char psz_duration[MSTRTIME_MAX_SIZE];
     switch( i_column )
@@ -69,10 +70,7 @@ static char * psz_column_meta( input_item_t *p_item, uint32_t i_column )
     case COLUMN_NUMBER:
         return NULL;
     case COLUMN_TITLE:
-        psz = input_item_GetTitle( p_item );
-        if( !psz )
-            psz = input_item_GetName( p_item );
-        return psz;
+        return input_item_GetTitleFbName( p_item );
     case COLUMN_DURATION:
         i_duration = input_item_GetDuration( p_item ) / 1000000;
         secstotimestr( psz_duration, i_duration );