[vlc-devel] [RFC PATCH 6/7] Qt: update icon if item is browsable

Thomas Guillem thomas at gllm.fr
Fri Mar 20 17:38:37 CET 2015


Maybe we a need new set of icons to differentiate network directories from
local directories.
---
 modules/gui/qt4/components/playlist/playlist_model.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index c552609..72c9f26 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -346,7 +346,10 @@ QVariant PLModel::data( const QModelIndex &index, const int role ) const
         {
         case COLUMN_TITLE:
             /* Used to segfault here because i_type wasn't always initialized */
-            return QVariant( icons[item->inputItem()->i_type] );
+            if( item->inputItem()->i_browsable == ITEM_BROWSABLE )
+                return QVariant( icons[ITEM_TYPE_NODE] );
+            else
+                return QVariant( icons[item->inputItem()->i_type] );
         case COLUMN_COVER:
             /* !warn: changes tree item line height. Otherwise, override
              * delegate's sizehint */
-- 
2.1.3




More information about the vlc-devel mailing list