vlc | branch: master | Ilkka Ollakka <[email protected]> | 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();
 }
 

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to