[vlc-commits] Qt4: refactor saving panel view

Ilkka Ollakka git at videolan.org
Wed Jul 6 15:59:42 CEST 2011


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Jul  6 16:59:08 2011 +0300| [962bd368cc50dbbe14a1d013cfcf355c62bede28] | committer: Ilkka Ollakka

Qt4: refactor saving panel view

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

 .../gui/qt4/components/playlist/standardpanel.cpp  |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index 8f9e6db..a89cd3f 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -94,14 +94,7 @@ StandardPLPanel::~StandardPLPanel()
     getSettings()->beginGroup("Playlist");
     if( treeView )
         getSettings()->setValue( "headerStateV2", treeView->header()->saveState() );
-    if( currentView == treeView )
-        getSettings()->setValue( "view-mode", TREE_VIEW );
-    else if( currentView == listView )
-        getSettings()->setValue( "view-mode", LIST_VIEW );
-    else if( currentView == iconView )
-        getSettings()->setValue( "view-mode", ICON_VIEW );
-    else if( currentView == picFlowView )
-        getSettings()->setValue( "view-mode", PICTUREFLOW_VIEW );
+    getSettings()->setValue( "view-mode", currentViewIndex() );
     getSettings()->endGroup();
 }
 



More information about the vlc-commits mailing list