]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/playlist.cpp
s/informations/information/
[vlc] / modules / gui / qt4 / components / playlist / playlist.cpp
index 2d3ab03cf8d1af1e9303054b6487514b366d7084..bc2c6435464f112b6c19468b269e5a6aac9a4362 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * playlist.cpp : Custom widgets for the playlist
  ****************************************************************************
- * Copyright © 2007-2008 the VideoLAN team
+ * Copyright © 2007-2010 the VideoLAN team
  * $Id$
  *
  * Authors: Clément Stenac <zorglub@videolan.org>
@@ -51,7 +51,7 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
     /* Source Selector */
     selector = new PLSelector( this, p_intf );
 
-    QLabel *selLabel = new QLabel( "Media Browser" );
+    QLabel *selLabel = new QLabel( qtr( "Media Browser" ) );
     QFont font;
     font.setBold( true );
     selLabel->setFont( font );
@@ -114,10 +114,9 @@ PlaylistWidget::PlaylistWidget( intf_thread_t *_p_i, QWidget *_par )
     leftSplitter->setMaximumWidth( 250 );
     setCollapsible( 1, false );
 
-    /* In case we want to keep the splitter informations */
+    /* In case we want to keep the splitter information */
     // components shall never write there setting to a fixed location, may infer
     // with other uses of the same component...
-    // getSettings()->beginGroup( "playlist" );
     getSettings()->beginGroup("Playlist");
     restoreState( getSettings()->value("splitterSizes").toByteArray());
     leftSplitter->restoreState( getSettings()->value("leftSplitterGeometry").toByteArray() );
@@ -152,12 +151,27 @@ void PlaylistWidget::closeEvent( QCloseEvent *event )
 {
     if( THEDP->isDying() )
     {
-        /* FIXME is it needed ? */
+        p_intf->p_sys->p_mi->playlistVisible = true;
         event->accept();
     }
     else
     {
+        p_intf->p_sys->p_mi->playlistVisible = false;
         hide();
         event->ignore();
     }
 }
+
+void PlaylistWidget::forceHide()
+{
+    leftSplitter->hide();
+    rightPanel->hide();
+    updateGeometry();
+}
+
+void PlaylistWidget::forceShow()
+{
+    leftSplitter->show();
+    rightPanel->show();
+    updateGeometry();
+}