]> git.sesse.net Git - vlc/commitdiff
Fix bugs with psz_shortname
authorClément Stenac <zorglub@videolan.org>
Sun, 19 Dec 2004 11:08:18 +0000 (11:08 +0000)
committerClément Stenac <zorglub@videolan.org>
Sun, 19 Dec 2004 11:08:18 +0000 (11:08 +0000)
modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/playlist.cpp
src/interface/interface.c
src/misc/modules.c

index e789766d457d47faf89ce04a18bcc7a7beeb5ccf..075e254bac1e8ef77a692c1cf9ac6ce9ea8ffd44 100644 (file)
@@ -477,7 +477,8 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
         AutoBuiltPanel *autopanel =
             new AutoBuiltPanel( notebook, this, p_intf, p_module );
         input_tab_array.Add( autopanel );
-        notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
+        notebook->AddPage( autopanel, wxU( p_module->psz_shortname ?
+                        p_module->psz_shortname : p_module->psz_object_name ),
                            i_access_method == CAPTURE_ACCESS );
     }
 
@@ -487,7 +488,8 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
         AutoBuiltPanel *autopanel =
             new AutoBuiltPanel( notebook, this, p_intf, p_module );
         input_tab_array.Add( autopanel );
-        notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
+        notebook->AddPage( autopanel, wxU( p_module->psz_shortname ?
+                        p_module->psz_shortname : p_module->psz_object_name ),
                            i_access_method == CAPTURE_ACCESS );
     }
 
@@ -497,7 +499,8 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
         AutoBuiltPanel *autopanel =
             new AutoBuiltPanel( notebook, this, p_intf, p_module );
         input_tab_array.Add( autopanel );
-        notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
+        notebook->AddPage( autopanel, wxU( p_module->psz_shortname ?
+                        p_module->psz_shortname : p_module->psz_object_name ),
                            i_access_method == CAPTURE_ACCESS );
     }
 
@@ -507,7 +510,8 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
         AutoBuiltPanel *autopanel =
             new AutoBuiltPanel( notebook, this, p_intf, p_module );
         input_tab_array.Add( autopanel );
-        notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
+        notebook->AddPage( autopanel, wxU( p_module->psz_shortname ?
+                        p_module->psz_shortname : p_module->psz_object_name ),
                            i_access_method == CAPTURE_ACCESS );
     }
 
index d114da8addef07fb7fb727f19a651250022d9440..a51d09ea2814e5d3f646a354de9b2e48c653b1e6 100644 (file)
@@ -1383,16 +1383,17 @@ wxMenu *Playlist::SDMenu()
         {
             p_sd_menu->AppendCheckItem( FirstSD_Event + i_number ,
                        wxU( p_parser->psz_longname ? p_parser->psz_longname :
-                            p_parser->psz_shortname ) );
+                            ( p_parser->psz_shortname ?
+                            p_parser->psz_shortname :p_parser->psz_object_name)) );
 
             if( playlist_IsServicesDiscoveryLoaded( p_playlist,
-                                    p_parser->psz_shortname ) )
+                                    p_parser->psz_object_name ) )
             {
                 p_sd_menu->Check( FirstSD_Event + i_number, TRUE );
             }
 
             INSERT_ELEM( (void**)pp_sds, i_number, i_number,
-                         (void*)p_parser->psz_shortname );
+                         (void*)p_parser->psz_object_name );
         }
     }
     vlc_list_release( p_list );
@@ -1424,7 +1425,6 @@ void Playlist::OnPopup( wxContextMenuEvent& event )
         else
             Playlist::PopupMenu( node_popup,
                                  ScreenToClient( wxGetMousePosition() ) );
-            
     }
 }
 
index 9383abc2c7301a46f822b4ddd5e8de8a44ba57a5..bfb781777c608e7ed42bba0e8db7c50d5e8173e0 100644 (file)
@@ -156,13 +156,14 @@ int intf_RunThread( intf_thread_t *p_intf )
         }
     }
 
-    if( p_intf->b_block && strncmp( p_intf->p_module->psz_shortname, "clivlc", 6) )
+    if( p_intf->b_block && strncmp( p_intf->p_module->psz_object_name,
+                                    "clivlc", 6) )
     {
         o_pool = [[NSAutoreleasePool alloc] init];
-       [VLCApplication sharedApplication];
+        [VLCApplication sharedApplication];
     }
 
-    if( p_intf->b_block && ( !strncmp( p_intf->p_module->psz_shortname, "macosx" , 6 ) ||
+    if( p_intf->b_block && ( !strncmp( p_intf->p_module->psz_object_name, "macosx" , 6 ) ||
                              !strncmp( p_intf->p_vlc->psz_object_name, "clivlc", 6 ) ) )
     {
         /* VLC in normal primary interface mode */
index 51dd67dbca8985c93f505fe3e0d475d5b2cb4801..7a50dc1bd60acc50e59eede5dd0c423ec85c122f 100644 (file)
@@ -1165,7 +1165,7 @@ static void UndupModule( module_t *p_module )
 
     free( p_module->psz_object_name );
     free( p_module->psz_capability );
-    free( p_module->psz_shortname );
+    if( p_module->psz_shortname ) free( p_module->psz_shortname );
     free( p_module->psz_longname );
 
     if( p_module->psz_program != NULL )