]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/dialogs.cpp
cosmetic: remove nullity test on free() and delete
[vlc] / modules / gui / skins2 / src / dialogs.cpp
index 57eb2af06352c9608902e0cfd32c32f8ea7b26f2..e267295c6bee88d3482c5391ae40039e9cd3ef97 100644 (file)
@@ -120,7 +120,7 @@ Dialogs::~Dialogs()
     }
 
     /* Unregister callbacks */
-    var_DelCallback( getIntf()->p_sys->p_playlist, "intf-popupmenu",
+    var_DelCallback( getIntf()->p_libvlc, "intf-popupmenu",
                      PopupMenuCB, this );
 }
 
@@ -147,11 +147,8 @@ Dialogs *Dialogs::instance( intf_thread_t *pIntf )
 
 void Dialogs::destroy( intf_thread_t *pIntf )
 {
-    if( pIntf->p_sys->p_dialogs )
-    {
-        delete pIntf->p_sys->p_dialogs;
-        pIntf->p_sys->p_dialogs = NULL;
-    }
+    delete pIntf->p_sys->p_dialogs;
+    pIntf->p_sys->p_dialogs = NULL;
 }
 
 
@@ -183,7 +180,7 @@ bool Dialogs::init()
     }
 
     /* Register callback for the intf-popupmenu variable */
-    var_AddCallback( getIntf()->p_sys->p_playlist, "intf-popupmenu",
+    var_AddCallback( getIntf()->p_libvlc, "intf-popupmenu",
                      PopupMenuCB, this );
 
     return true;
@@ -216,7 +213,7 @@ void Dialogs::showFileGeneric( const string &rTitle, const string &rExtensions,
 void Dialogs::showChangeSkin()
 {
     showFileGeneric( _("Open a skin file"),
-                     _("Skin files (*.vlt;*.wsz)|*.vlt;*.wsz|Skin files (*.xml)|*.xml"),
+                     _("Skin files |*.vlt;*.wsz;*.xml"),
                      showChangeSkinCB, kOPEN );
 }
 
@@ -224,16 +221,17 @@ void Dialogs::showChangeSkin()
 void Dialogs::showPlaylistLoad()
 {
     showFileGeneric( _("Open playlist"),
-                     _("All playlists|*.pls;*.m3u;*.asx;*.b4s;*.xspf|"
-                       "M3U files|*.m3u|"
-                       "XSPF playlist|*.xspf"),
+                     _("Playlist Files|"EXTENSIONS_PLAYLIST"|"
+                       "All Files|*"),
                      showPlaylistLoadCB, kOPEN );
 }
 
 
 void Dialogs::showPlaylistSave()
 {
-    showFileGeneric( _("Save playlist"), _("XSPF playlist|*.xspf|M3U file|*.m3u"),
+    showFileGeneric( _("Save playlist"), _("XSPF playlist|*.xspf|"
+                                           "M3U file|*.m3u|"
+                                           "HTML playlist|*.html"),
                      showPlaylistSaveCB, kSAVE );
 }