Пример #1
0
void RecentIsoManager::Repopulate()
{
	int cnt = m_Items.size();
	if( cnt <= 0 ) return;

	m_Separator = m_Menu->AppendSeparator();
	
	// From arcum's comment on r5141
	// What was happening is that when all the radio button menu items in a group are deleted, 
	// wxwidgets deletes the group, but when you start adding radio menu items again, 
	// it trys to add them to a group that doesn't exist. Since the group doesn't exist, 
	// it starts a new group, but it also spews a couple warnings about it in Linux.
#ifdef __LINUX__
	// FIXME is it still useful on v3
#if wxMAJOR_VERSION >= 3
	m_Menu->Remove( m_Menu->Append( -1, "dummy" ) );
#else
	m_Menu->Remove( m_Menu->Append( -1 ) );
#endif
#endif
	//Note: the internal recent iso list (m_Items) has the most recent item last (also at the INI file)
	//  but the menu is composed in reverse order such that the most recent item appears at the top.
	for( int i=cnt-1; i>=0; --i )
		InsertIntoMenu( i );
}
Пример #2
0
void RecentIsoManager::Repopulate()
{
	int cnt = m_Items.size();
	if( cnt <= 0 ) return;

	m_Separator = m_Menu->AppendSeparator();
		
	//Note: the internal recent iso list (m_Items) has the most recent item last (also at the INI file)
	//  but the menu is composed in reverse order such that the most recent item appears at the top.
	for( int i=cnt-1; i>=0; --i )
		InsertIntoMenu( i );
}