From 68d175e786962a7c6f8a2f550e0fcedd2fa0a106 Mon Sep 17 00:00:00 2001 From: lvw Date: Mon, 4 Oct 2004 20:47:58 +0000 Subject: Added a patch to correct minor errors. Further, remove using namespace directives in order to remain compatible with g++ 2.95.4 git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk@200 e10066b5-e1e2-0310-b819-94efdf66514b --- muggle-plugin/vdr_menu.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'muggle-plugin/vdr_menu.c') diff --git a/muggle-plugin/vdr_menu.c b/muggle-plugin/vdr_menu.c index fe805b4..a680f9f 100644 --- a/muggle-plugin/vdr_menu.c +++ b/muggle-plugin/vdr_menu.c @@ -10,11 +10,11 @@ * $Id$ */ +#include #include #include #include - #include #include #include @@ -38,7 +38,6 @@ #include "gd_content_interface.h" -using namespace std; // ----------------------- mgMenuTreeItem ------------------ @@ -155,7 +154,7 @@ eOSState mgMainMenu::ProcessKey(eKeys key) { mgDebug( 1, "mgMainMenu: add selection %s to playlist", current->getLabel().c_str() ); // Add selection to Play - vector *tracks = current->getTracks(); + std::vector *tracks = current->getTracks(); if( tracks ) { @@ -335,7 +334,7 @@ eOSState mgMainMenu::ProcessKey(eKeys key) m_current_playlist -> clear(); delete m_current_playlist; - string selected = (*m_plists)[ Current() ]; + std::string selected = (*m_plists)[ Current() ]; m_current_playlist = m_media->loadPlaylist( selected.c_str() ); // clean the list of playlist @@ -499,9 +498,9 @@ void mgMainMenu::DisplayTree( mgSelectionTreeNode* node, int select ) SetButtons(); m_node = node; - vector children = node->getChildren(); + std::vector children = node->getChildren(); - for( vector::iterator iter = children.begin(); + for( std::vector::iterator iter = children.begin(); iter != children.end(); iter ++ ) { @@ -560,7 +559,7 @@ eOSState mgMainMenu::TreeSubmenuAction( int n ) m_current_playlist->clear(); // append current node - vector *tracks = current->getTracks(); + std::vector *tracks = current->getTracks(); if( tracks ) { @@ -594,7 +593,7 @@ void mgMainMenu::DisplayPlaylist( int index_current ) Clear(); SetButtons(); - vector* list = m_current_playlist-> getAll(); + std::vector* list = m_current_playlist-> getAll(); static char titlestr[80]; sprintf( titlestr, "Muggle - %s (%d %s)",tr("Playlist"), list->size() , @@ -603,7 +602,7 @@ void mgMainMenu::DisplayPlaylist( int index_current ) for( unsigned int i = 0; i < m_current_playlist->getNumItems(); i++) { - string label = m_current_playlist->getLabel( i, " " ); + std::string label = m_current_playlist->getLabel( i, " " ); Add( new cOsdItem( label.c_str() ) ); } @@ -632,7 +631,7 @@ void mgMainMenu::LoadPlaylist() // retrieve list of available playlists m_plists = m_media->getStoredPlaylists(); - for(vector::iterator iter = m_plists->begin(); + for(std::vector::iterator iter = m_plists->begin(); iter != m_plists->end() ; iter++) { Add( new cOsdItem( iter->c_str() ) ); @@ -730,7 +729,7 @@ eOSState mgMainMenu::ExecutePlaylistCommand( int current ) #endif free( buffer ); - string tmp_m3u_file = (char *) AddDirectory( cPlugin::ConfigDirectory("muggle"), "current.m3u" ); + std::string tmp_m3u_file = (char *) AddDirectory( cPlugin::ConfigDirectory("muggle"), "current.m3u" ); m_current_playlist->exportM3U( tmp_m3u_file ); char *result = (char *)command->Execute( tmp_m3u_file.c_str() ); @@ -752,7 +751,7 @@ eOSState mgMainMenu::ExecutePlaylistCommand( int current ) eOSState mgMainMenu::PlaylistSubmenuAction( int n ) { - cout << "mgMainMenu::PlaylistSubmenuAction: " << n << endl << flush; + std::cout << "mgMainMenu::PlaylistSubmenuAction: " << n << std::endl << std::flush; eOSState state = osContinue; switch( n ) @@ -797,7 +796,7 @@ eOSState mgMainMenu::PlaylistSubmenuAction( int n ) { // clear playlist cControl *control = cControl::Control(); - string buffer; + std::string buffer; if( control && typeid(*control) == typeid(mgPlayerControl) ) { @@ -832,7 +831,7 @@ eOSState mgMainMenu::PlaylistSubmenuAction( int n ) DisplayPlaylist( m_last_osd_index ); // confirmation - string confirm = res? "Entry deleted": "Cannot delete entry"; + std::string confirm = res? "Entry deleted": "Cannot delete entry"; #if VDRVERSNUM >= 10307 Skins.Message( mtInfo, confirm.c_str() ); @@ -844,7 +843,7 @@ eOSState mgMainMenu::PlaylistSubmenuAction( int n ) } break; case 5: { - string m3u_file = AddDirectory( cPlugin::ConfigDirectory("muggle"), + std::string m3u_file = AddDirectory( cPlugin::ConfigDirectory("muggle"), m_current_playlist->getListname().c_str() ); m_current_playlist->exportM3U( m3u_file ); } break; @@ -869,10 +868,10 @@ void mgMainMenu::DisplayFilter() SetButtons(); SetTitle( m_media->getActiveFilterTitle().c_str() ); - vector *filter_list = m_media->getActiveFilters(); + std::vector *filter_list = m_media->getActiveFilters(); int i=0; - for( vector::iterator iter = filter_list->begin(); + for( std::vector::iterator iter = filter_list->begin(); iter != filter_list->end(); iter ++ ) { @@ -912,12 +911,12 @@ void mgMainMenu::DisplayFilter() case mgFilter::CHOICE: { mgFilterChoice *fc = (mgFilterChoice *) (*iter); - vector choices = fc->getChoices(); + std::vector choices = fc->getChoices(); char **choices_str = new (char *)[ choices.size() ]; int j = 0; - for( vector::iterator iter = choices.begin(); + for( std::vector::iterator iter = choices.begin(); iter != choices.end(); iter ++, j ++ ) { -- cgit v1.2.3