]> git.sesse.net Git - vlc/commitdiff
Hack to handle service discovery submodules correctly. This should maybe be changed...
authorAntoine Cellerier <dionoea@videolan.org>
Sun, 23 Apr 2006 22:52:35 +0000 (22:52 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sun, 23 Apr 2006 22:52:35 +0000 (22:52 +0000)
modules/gui/wxwidgets/dialogs/playlist.cpp

index 59733970051b45514faff220af2789bd0ab28875..a1162bde2b5d7dbd376a64f28efe3853514bd47d 100644 (file)
@@ -1450,13 +1450,19 @@ wxMenu *Playlist::SDMenu()
                      (p_parser->psz_shortname ?
                       p_parser->psz_shortname : p_parser->psz_object_name) ) );
 
+            /* hack to handle submodules properly */
+            int i = -1;
+            while( p_parser->pp_shortcuts[++i] != NULL );
+            i--;
             if( playlist_IsServicesDiscoveryLoaded( p_playlist,
-                                    p_parser->psz_object_name ) )
+                                    i>=0?p_parser->pp_shortcuts[i]
+                                    :p_parser->psz_object_name ) )
             {
                 p_sd_menu->Check( FirstSD_Event + i_number, TRUE );
             }
 
-            pp_sds[i_number++] = p_parser->psz_object_name;
+            pp_sds[i_number++] = i>=0?p_parser->pp_shortcuts[i]
+                                 :p_parser->psz_object_name;
         }
     }
     vlc_list_release( p_list );