]> git.sesse.net Git - vlc/commitdiff
Skins2: Cosmetics and the occasional duplicate call elimintation.
authorJP Dinger <jpd@videolan.org>
Sat, 21 Nov 2009 22:37:05 +0000 (23:37 +0100)
committerJP Dinger <jpd@videolan.org>
Sat, 5 Dec 2009 21:25:42 +0000 (22:25 +0100)
12 files changed:
modules/gui/skins2/commands/cmd_add_item.cpp
modules/gui/skins2/commands/cmd_input.cpp
modules/gui/skins2/commands/cmd_layout.cpp
modules/gui/skins2/commands/cmd_minimize.cpp
modules/gui/skins2/commands/cmd_muxer.cpp
modules/gui/skins2/commands/cmd_muxer.hpp
modules/gui/skins2/commands/cmd_playlist.cpp
modules/gui/skins2/commands/cmd_playtree.cpp
modules/gui/skins2/commands/cmd_resize.cpp
modules/gui/skins2/commands/cmd_snapshot.cpp
modules/gui/skins2/commands/cmd_vars.cpp
modules/gui/skins2/commands/cmd_voutwindow.cpp

index 90ceb5ff25053115894139f247bfcb8296929790..604a87efef6e9b92bbd0c791cdf0f07303f8c17c 100644 (file)
@@ -41,18 +41,9 @@ void CmdAddItem::execute()
     if( !psz_uri )
         return;
 
-    if( m_playNow )
-    {
-        // Enqueue and play the item
-        playlist_Add( pPlaylist, psz_uri, NULL,
-                      PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true,
-                      false );
-    }
-    else
-    {
-        // Enqueue the item only
-        playlist_Add( pPlaylist, psz_uri, NULL,
-                      PLAYLIST_APPEND, PLAYLIST_END, true, false );
-    }
+    playlist_Add( pPlaylist, psz_uri, NULL,
+                  m_playNow ? PLAYLIST_APPEND | PLAYLIST_GO : PLAYLIST_APPEND,
+                  PLAYLIST_END, true, false );
+
     free( psz_uri );
 }
index 56915df99c88fd04d71bb0f659dc46f380cf8cff..e5f01d800ac71c5f04e3ce1a5208284f36af2d72 100644 (file)
@@ -32,9 +32,7 @@ void CmdPlay::execute()
 {
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
     if( pPlaylist == NULL )
-    {
         return;
-    }
 
     playlist_Lock( pPlaylist );
     const bool b_empty = playlist_IsEmpty( pPlaylist );
@@ -47,8 +45,7 @@ void CmdPlay::execute()
     else
     {
         // If the playlist is empty, open a file requester instead
-        CmdDlgFile cmd( getIntf() );
-        cmd.execute();
+        CmdDlgFile( getIntf() ).execute();
     }
 }
 
@@ -56,24 +53,16 @@ void CmdPlay::execute()
 void CmdPause::execute()
 {
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
-    if( pPlaylist == NULL )
-    {
-        return;
-    }
-
-    playlist_Pause( pPlaylist );
+    if( pPlaylist != NULL )
+        playlist_Pause( pPlaylist );
 }
 
 
 void CmdStop::execute()
 {
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
-    if( pPlaylist == NULL )
-    {
-        return;
-    }
-
-    playlist_Stop( pPlaylist );
+    if( pPlaylist != NULL )
+        playlist_Stop( pPlaylist );
 }
 
 
@@ -105,24 +94,18 @@ void CmdFaster::execute()
 
 void CmdMute::execute()
 {
-    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
-
-    aout_ToggleMute( pPlaylist, NULL );
+    aout_ToggleMute( getIntf()->p_sys->p_playlist, NULL );
 }
 
 
 void CmdVolumeUp::execute()
 {
-    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
-
-    aout_VolumeUp( pPlaylist, 1, NULL );
+    aout_VolumeUp( getIntf()->p_sys->p_playlist, 1, NULL );
 }
 
 
 void CmdVolumeDown::execute()
 {
-    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
-
-    aout_VolumeDown( pPlaylist, 1, NULL );
+    aout_VolumeDown( getIntf()->p_sys->p_playlist, 1, NULL );
 }
 
index c1f9bbf61725814e7acdc4d8b0fb41af5ebed3da..19214cb1afe39e7694c16b6d0dc51d0dd904a5ad 100644 (file)
@@ -17,9 +17,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "cmd_layout.hpp"
 
 
 CmdLayout::CmdLayout( intf_thread_t *pIntf, TopWindow &rWindow,
-                      GenericLayout &rLayout ):
-    CmdGeneric( pIntf ), m_rWindow( rWindow ), m_rLayout( rLayout )
-{
-}
+                      GenericLayout &rLayout )
+    : CmdGeneric( pIntf ), m_rWindow( rWindow ), m_rLayout( rLayout ) { }
 
 
 void CmdLayout::execute()
 {
-    if( !getIntf()->p_sys->p_theme )
-    {
-        return;
-    }
-    getIntf()->p_sys->p_theme->getWindowManager().setActiveLayout( m_rWindow,
-                                                                   m_rLayout );
+    Theme *p_theme = getIntf()->p_sys->p_theme;
+    if( p_theme )
+        p_theme->getWindowManager().setActiveLayout( m_rWindow, m_rLayout );
 }
index 043c440d087cff68b955a9cf2169393d431dd485..d9302b51936f3930ad5adfc79e52dc8b2367cf71 100644 (file)
@@ -17,9 +17,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "cmd_minimize.hpp"
 
 void CmdMinimize::execute()
 {
-    // Get the instance of OSFactory
-    OSFactory *pOsFactory = OSFactory::instance( getIntf() );
-    pOsFactory->minimize();
+    OSFactory::instance( getIntf() )->minimize();
 }
 
 
 void CmdRestore::execute()
 {
-    // Get the instance of OSFactory
-    OSFactory *pOsFactory = OSFactory::instance( getIntf() );
-    pOsFactory->restore();
+    OSFactory::instance( getIntf() )->restore();
 }
 
 
-CmdMaximize::CmdMaximize( intf_thread_t *pIntf,
-                          WindowManager &rWindowManager,
-                          TopWindow &rWindow ):
-    CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
-    m_rWindow( rWindow )
-{
-}
+CmdMaximize::CmdMaximize( intf_thread_t *pIntf, WindowManager &rWindowManager,
+                          TopWindow &rWindow )
+    : CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
+      m_rWindow( rWindow ) { }
 
 
 void CmdMaximize::execute()
@@ -61,11 +54,9 @@ void CmdMaximize::execute()
 
 CmdUnmaximize::CmdUnmaximize( intf_thread_t *pIntf,
                               WindowManager &rWindowManager,
-                              TopWindow &rWindow ):
-    CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
-    m_rWindow( rWindow )
-{
-}
+                              TopWindow &rWindow )
+    : CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
+      m_rWindow( rWindow ) { }
 
 
 void CmdUnmaximize::execute()
@@ -77,32 +68,24 @@ void CmdUnmaximize::execute()
 
 void CmdAddInTray::execute()
 {
-    // Get the instance of OSFactory
-    OSFactory *pOsFactory = OSFactory::instance( getIntf() );
-    pOsFactory->addInTray();
+    OSFactory::instance( getIntf() )->addInTray();
 }
 
 
 void CmdRemoveFromTray::execute()
 {
-    // Get the instance of OSFactory
-    OSFactory *pOsFactory = OSFactory::instance( getIntf() );
-    pOsFactory->removeFromTray();
+    OSFactory::instance( getIntf() )->removeFromTray();
 }
 
 
 void CmdAddInTaskBar::execute()
 {
-    // Get the instance of OSFactory
-    OSFactory *pOsFactory = OSFactory::instance( getIntf() );
-    pOsFactory->addInTaskBar();
+    OSFactory::instance( getIntf() )->addInTaskBar();
 }
 
 
 void CmdRemoveFromTaskBar::execute()
 {
-    // Get the instance of OSFactory
-    OSFactory *pOsFactory = OSFactory::instance( getIntf() );
-    pOsFactory->removeFromTaskBar();
+    OSFactory::instance( getIntf() )->removeFromTaskBar();
 }
 
index 9bc45c90ea1d9e1cc172a085079994bf7bae564f..30dec0c9254d79619150505adb7b1d2f7d1324c4 100644 (file)
@@ -16,9 +16,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "cmd_muxer.hpp"
@@ -28,7 +28,5 @@ void CmdMuxer::execute()
 {
     cmdList_t::const_iterator it;
     for( it = m_list.begin(); it != m_list.end(); ++it )
-    {
         (*it)->execute();
-    }
 }
index c3b9dd682e8b5cd19c9e01ade1b3e35de667952a..f7f4397fa74110163d202d53fb625a88615cc16c 100644 (file)
@@ -32,8 +32,8 @@
 class CmdMuxer: public CmdGeneric
 {
 public:
-    CmdMuxer( intf_thread_t *pIntf, const list<CmdGeneric*> &rList ):
-        CmdGeneric( pIntf ), m_list( rList ) { }
+    CmdMuxer( intf_thread_t *pIntf, const list<CmdGeneric*> &rList )
+        CmdGeneric( pIntf ), m_list( rList ) { }
     virtual ~CmdMuxer() { }
     virtual void execute();
     virtual string getType() const { return "muxer"; }
index 28e44abaa96cd0feb8a02e995c6dfbd3344ce479..e0f223d34b5f6a6025b0de68c31385919852d3d4 100644 (file)
@@ -17,9 +17,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "cmd_playlist.hpp"
@@ -36,9 +36,7 @@ void CmdPlaylistNext::execute()
 {
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
     if( pPlaylist != NULL )
-    {
         playlist_Next( pPlaylist );
-    }
 }
 
 
@@ -46,9 +44,7 @@ void CmdPlaylistPrevious::execute()
 {
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
     if( pPlaylist != NULL )
-    {
         playlist_Prev( pPlaylist );
-    }
 }
 
 
@@ -89,29 +85,25 @@ void CmdPlaylistSave::execute()
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
     if( pPlaylist != NULL )
     {
-        static const char psz_xspf[] = "export-xspf",
-                          psz_m3u[] = "export-m3u",
-                          psz_html[] = "export-html";
         const char *psz_module;
         if( m_file.find( ".xsp", 0 ) != string::npos )
-            psz_module = psz_xspf;
+            psz_module = "export-xspf";
         else if( m_file.find( "m3u", 0 ) != string::npos )
-            psz_module = psz_m3u;
+            psz_module = "export-m3u";
         else if( m_file.find( "html", 0 ) != string::npos )
-            psz_module = psz_html;
+            psz_module = "export-html";
         else
         {
-            msg_Err( getIntf(), "Impossible to recognise the file type" );
+            msg_Err(getIntf(),"Did not recognise playlist export file type");
             return;
         }
 
-        playlist_Export( pPlaylist, m_file.c_str(), pPlaylist->p_local_category, psz_module );
+        playlist_Export( pPlaylist, m_file.c_str(),
+                         pPlaylist->p_local_category, psz_module );
     }
 }
 
 void CmdPlaylistFirst::execute()
 {
-    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
-
-    playlist_Control( pPlaylist, PLAYLIST_PLAY, pl_Unlocked );
+    playlist_Control(getIntf()->p_sys->p_playlist,PLAYLIST_PLAY,pl_Unlocked);
 }
index a91c1e9ff63c95f9a8345a4b4811a565ab1e5d7f..6943d70548e20a5bed30710912fec21485ab07c0 100644 (file)
@@ -17,9 +17,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "cmd_playtree.hpp"
@@ -43,6 +43,5 @@ void CmdPlaytreeSort::execute()
     PL_UNLOCK;
 
     // Ask for rebuild
-    Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar();
-    rVar.onChange();
+    VlcProc::instance( getIntf() )->getPlaytreeVar().onChange();
 }
index 93a439d981cca5b8ef70f9248194e8655714bd83..2d98543869f13b8d2c9c1c395a93bf0d36da359e 100644 (file)
@@ -17,9 +17,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "cmd_resize.hpp"
 
 
 CmdResize::CmdResize( intf_thread_t *pIntf, const WindowManager &rWindowManager,
-                      GenericLayout &rLayout, int width, int height ):
-    CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
-    m_rLayout( rLayout ), m_width( width ), m_height( height )
-{
-}
+                      GenericLayout &rLayout, int width, int height )
+    : CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
+      m_rLayout( rLayout ), m_width( width ), m_height( height ) { }
 
 
 void CmdResize::execute()
@@ -48,9 +46,7 @@ void CmdResize::execute()
 
 CmdResizeInnerVout::CmdResizeInnerVout( intf_thread_t *pIntf,
                     CtrlVideo* pCtrlVideo )
-         : CmdGeneric( pIntf ), m_pCtrlVideo( pCtrlVideo )
-{
-}
+    : CmdGeneric( pIntf ), m_pCtrlVideo( pCtrlVideo ) { }
 
 
 void CmdResizeInnerVout::execute()
@@ -61,30 +57,23 @@ void CmdResizeInnerVout::execute()
 
 CmdResizeVout::CmdResizeVout( intf_thread_t *pIntf, vout_window_t* pWnd,
                               int width, int height )
-  : CmdGeneric( pIntf ), m_pWnd( pWnd ), m_width( width ), m_height( height )
-{
-}
+    : CmdGeneric( pIntf ), m_pWnd( pWnd ), m_width( width ),
+      m_height( height ) { }
 
 
 void CmdResizeVout::execute()
 {
-    VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager;
-
-    p_VoutManager->setSizeWnd( m_pWnd, m_width, m_height );
+    getIntf()->p_sys->p_voutManager->setSizeWnd( m_pWnd, m_width, m_height );
 }
 
 CmdSetFullscreen::CmdSetFullscreen( intf_thread_t *pIntf,
                                     vout_window_t * pWnd, bool fullscreen )
-    : CmdGeneric( pIntf ), m_pWnd( pWnd ), m_bFullscreen( fullscreen )
-{
-}
+    : CmdGeneric( pIntf ), m_pWnd( pWnd ), m_bFullscreen( fullscreen ) { }
 
 
 void CmdSetFullscreen::execute()
 {
-    VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager;
-
-    p_VoutManager->setFullscreenWnd( m_pWnd, m_bFullscreen );
+    getIntf()->p_sys->p_voutManager->setFullscreenWnd( m_pWnd, m_bFullscreen );
 }
 
 
index 43724ebd22be5906352f518bc66bd7c03c1b036a..33107c5690f24548ce56354c75456bff63237221 100644 (file)
@@ -16,9 +16,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "cmd_snapshot.hpp"
@@ -43,20 +43,16 @@ void CmdSnapshot::execute()
 void CmdToggleRecord::execute()
 {
     input_thread_t* pInput = getIntf()->p_sys->p_input;
-    if( !pInput )
-        return;
-
-    var_ToggleBool( pInput, "record" );
+    if( pInput )
+        var_ToggleBool( pInput, "record" );
 }
 
 
 void CmdNextFrame::execute()
 {
     input_thread_t* pInput = getIntf()->p_sys->p_input;
-    if( !pInput )
-        return;
-
-    var_TriggerCallback( pInput, "frame-next" );
+    if( pInput )
+        var_TriggerCallback( pInput, "frame-next" );
 }
 
 
index 59c5848567995ab56d75174a209815512b0c211a..60129d549e625a0724df1e922584810fd5042bc7 100644 (file)
@@ -16,9 +16,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "cmd_vars.hpp"
 
 void CmdPlaytreeChanged::execute()
 {
-    // Notify  the playtree variable
-    Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar();
-    rVar.onChange();
+    VlcProc::instance( getIntf() )->getPlaytreeVar().onChange();
 }
 
 void CmdPlaytreeUpdate::execute()
 {
-    // Notify  the playtree variable
-    Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar();
-    rVar.onUpdateItem( m_id );
+    VlcProc::instance( getIntf() )->getPlaytreeVar().onUpdateItem( m_id );
 }
 
 bool CmdPlaytreeUpdate::checkRemove( CmdGeneric *pQueuedCommand ) const
 {
     // We don't use RTTI - Use C-style cast
     CmdPlaytreeUpdate *pUpdateCommand = (CmdPlaytreeUpdate *)(pQueuedCommand);
-    if( m_id == pUpdateCommand->m_id )
-    {
-        return true;
-    }
-    return false;
+    return m_id == pUpdateCommand->m_id;
 }
 
 
 void CmdPlaytreeAppend::execute()
 {
-    // Notify  the playtree variable
-    Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar();
-    rVar.onAppend( m_pAdd );
+    VlcProc::instance( getIntf() )->getPlaytreeVar().onAppend( m_pAdd );
 }
 
 void CmdPlaytreeDelete::execute()
 {
-    // Notify  the playtree variable
-    Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar();
-    rVar.onDelete( m_id );
+    VlcProc::instance( getIntf() )->getPlaytreeVar().onDelete( m_id );
 }
 
 void CmdSetText::execute()
 {
-    // Change the text variable
     m_rText.set( m_value );
 }
 
 
 void CmdSetEqBands::execute()
 {
-    // Change the equalizer bands
     m_rEqBands.set( m_value );
 }
 
 
 void CmdSetEqPreamp::execute()
 {
-    // Change the preamp variable
     m_rPreamp.set( m_value, false );
 }
index 9f2c89db70165fc2e25f2d5949f328862ba8e792..265bdac68acc80fb9d1f9565322a86d4aab92708 100644 (file)
@@ -16,9 +16,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "cmd_voutwindow.hpp"
 
 
 CmdNewVoutWindow::CmdNewVoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd )
-   : CmdGeneric( pIntf ), m_pWnd( pWnd )
-{
-}
+    : CmdGeneric( pIntf ), m_pWnd( pWnd ) { }
 
 
 void CmdNewVoutWindow::execute()
 {
-    vlc_mutex_lock( &getIntf()->p_sys->vout_lock );
-
-    VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager;
+    intf_sys_t *p_sys = getIntf()->p_sys;
 
-    void* handle = p_VoutManager->acceptWnd( m_pWnd );
+    vlc_mutex_lock( &p_sys->vout_lock );
 
-    getIntf()->p_sys->handle = handle;
-    getIntf()->p_sys->b_vout_ready = true;
-    vlc_cond_signal( &getIntf()->p_sys->vout_wait );
+    p_sys->handle = p_sys->p_voutManager->acceptWnd( m_pWnd );
+    p_sys->b_vout_ready = true;
+    vlc_cond_signal( &p_sys->vout_wait );
 
-    vlc_mutex_unlock( &getIntf()->p_sys->vout_lock );
+    vlc_mutex_unlock( &p_sys->vout_lock );
 }
 
 
 CmdReleaseVoutWindow::CmdReleaseVoutWindow( intf_thread_t *pIntf,
                                             vout_window_t* pWnd )
-   : CmdGeneric( pIntf ), m_pWnd( pWnd )
-{
-}
+    : CmdGeneric( pIntf ), m_pWnd( pWnd ) { }
 
 
 void CmdReleaseVoutWindow::execute()
 {
-    vlc_mutex_lock( &getIntf()->p_sys->vout_lock );
-
-    VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager;
+    intf_sys_t *p_sys = getIntf()->p_sys;
 
-    p_VoutManager->releaseWnd( m_pWnd );
+    vlc_mutex_lock( &p_sys->vout_lock );
 
-    getIntf()->p_sys->b_vout_ready = true;
-    vlc_cond_signal( &getIntf()->p_sys->vout_wait );
+    p_sys->p_voutManager->releaseWnd( m_pWnd );
+    p_sys->b_vout_ready = true;
+    vlc_cond_signal( &p_sys->vout_wait );
 
-    vlc_mutex_unlock( &getIntf()->p_sys->vout_lock );
+    vlc_mutex_unlock( &p_sys->vout_lock );
 }