[vlc-devel] commit: Remove the Rating column from the inteface because with don' t save any information about Rating. ( Rémi Duraffort )

git version control git at videolan.org
Tue Mar 4 19:58:29 CET 2008


vlc | branch: master | Rémi Duraffort <ivoire at via.ecp.fr> | Tue Mar  4 19:57:15 2008 +0100| [7af51d108fe596be66dccdf79ea13f44bfcf655a]

Remove the Rating column from the inteface because with don't save any information about Rating.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7af51d108fe596be66dccdf79ea13f44bfcf655a
---

 .../gui/qt4/components/playlist/playlist_item.cpp  |    6 ------
 .../gui/qt4/components/playlist/playlist_model.cpp |    6 +-----
 .../gui/qt4/components/playlist/standardpanel.cpp  |    1 -
 src/playlist/sort.c                                |    4 ----
 4 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_item.cpp b/modules/gui/qt4/components/playlist/playlist_item.cpp
index 32aa4a7..02dbc6b 100644
--- a/modules/gui/qt4/components/playlist/playlist_item.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_item.cpp
@@ -136,9 +136,6 @@ void PLItem::updateColumnHeaders()
             case VLC_META_ENGINE_SEQ_NUM:
                 item_col_strings.append( qtr( VLC_META_SEQ_NUM ) );
                 break;
-            case VLC_META_ENGINE_RATING:
-                item_col_strings.append( qtr( VLC_META_RATING ) );
-                break;
             case VLC_META_ENGINE_TRACKID:
                 item_col_strings.append( qtr( VLC_META_TRACKID ) );
                 break;
@@ -258,9 +255,6 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
             case VLC_META_ENGINE_SEQ_NUM:
                 ADD_META( p_item, TrackNum );
                 break;
-            case VLC_META_ENGINE_RATING:
-                ADD_META( p_item, Rating );
-                break;
             case VLC_META_ENGINE_TRACKID:
                 item_col_strings.append( QString::number( p_item->i_id ) );
                 break;
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index d1ab172..c7a5ff8 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -735,7 +735,6 @@ void PLModel::sort( int column, Qt::SortOrder order )
     CHECK_COLUMN( COLLECTION );
     CHECK_COLUMN( SEQ_NUM );
     CHECK_COLUMN( DESCRIPTION );
-    CHECK_COLUMN( RATING );
     CHECK_COLUMN( TRACKID );
 
 #undef CHECK_COLUMN;
@@ -756,7 +755,6 @@ next:
         case VLC_META_ENGINE_COLLECTION: i_mode = SORT_ALBUM;            break;
         case VLC_META_ENGINE_SEQ_NUM:    i_mode = SORT_TRACK_NUMBER;     break;
         case VLC_META_ENGINE_DESCRIPTION:i_mode = SORT_DESCRIPTION;      break;
-        case VLC_META_ENGINE_RATING:     i_mode = SORT_RATING;           break;
         case VLC_META_ENGINE_TRACKID:    i_mode = SORT_ID;               break;
         default:                         i_mode = SORT_TITLE_NODES_FIRST;break;
         }
@@ -849,10 +847,8 @@ void PLModel::viewchanged( int meta )
             index=6; break;
         case VLC_META_ENGINE_DESCRIPTION:
             index=7; break;
-        case VLC_META_ENGINE_RATING:
-            index=8; break;
         case VLC_META_ENGINE_TRACKID:
-            index=9; break;
+            index=8; break;
         default:
             break;
         }
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 058a533..d3e486a 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -281,7 +281,6 @@ void StandardPLPanel::popupSelectColumn( QPoint pos )
     ADD_META_ACTION( COLLECTION );
     ADD_META_ACTION( SEQ_NUM );
     ADD_META_ACTION( DESCRIPTION );
-    ADD_META_ACTION( RATING );
     ADD_META_ACTION( TRACKID );
 
 #undef ADD_META_ACTION
diff --git a/src/playlist/sort.c b/src/playlist/sort.c
index c81a2ec..34e6973 100644
--- a/src/playlist/sort.c
+++ b/src/playlist/sort.c
@@ -197,10 +197,6 @@ static int playlist_ItemArraySort( playlist_t *p_playlist, int i_items,
             {
                 DO_META_SORT( Description );
             }
-            else if( i_mode == SORT_RATING )
-            {
-                DO_META_SORT( Rating );
-            }
             else if( i_mode == SORT_ID )
             {
                 i_test = pp_items[i]->i_id - pp_items[i_small]->i_id;




More information about the vlc-devel mailing list