[vlc-commits] Qt: PLSelector: Make effectless root entries not selectable

Francois Cartegnie git at videolan.org
Tue Jun 12 13:44:28 CEST 2012


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jun 12 13:43:54 2012 +0200| [c2e5c08a4b4a3b38e2efed072d40e1501444dd4d] | committer: Francois Cartegnie

Qt: PLSelector: Make effectless root entries not selectable

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

 modules/gui/qt4/components/playlist/selector.cpp |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp
index 07897ce..64831a1 100644
--- a/modules/gui/qt4/components/playlist/selector.cpp
+++ b/modules/gui/qt4/components/playlist/selector.cpp
@@ -211,6 +211,13 @@ void PLSelector::createItems()
     QTreeWidgetItem *lan = addItem( CATEGORY_TYPE, N_("Local Network") )->treeItem();
     QTreeWidgetItem *internet = addItem( CATEGORY_TYPE, N_("Internet") )->treeItem();
 
+#define NOT_SELECTABLE(w) w->setFlags( w->flags() ^ Qt::ItemIsSelectable );
+    NOT_SELECTABLE( mycomp );
+    NOT_SELECTABLE( devices );
+    NOT_SELECTABLE( lan );
+    NOT_SELECTABLE( internet );
+#undef NOT_SELECTABLE
+
     /* SD subnodes */
     char **ppsz_longnames;
     int *p_categories;



More information about the vlc-commits mailing list