@ -178,14 +178,22 @@ void pyAgeInfoStruct::SetAgeLanguage( int32_t v )
fAgeInfo . SetAgeLanguage ( v ) ;
fAgeInfo . SetAgeLanguage ( v ) ;
}
}
const char * pyAgeInfoStruct : : GetDisplayName ( ) const
plString pyAgeInfoStruct : : GetDisplayName ( ) const
{
{
const char * instance = GetAgeInstanceName ( ) ;
const char * user = GetAgeUserDefinedName ( ) ;
bool namesEqual = ( stricmp ( user , instance ) = = 0 ) ; // Ae'gura Ae'gura
if ( namesEqual )
return instance ;
else
{
int32_t seq = GetAgeSequenceNumber ( ) ;
int32_t seq = GetAgeSequenceNumber ( ) ;
if ( seq > 0 )
if ( seq > 0 )
fDisplayName = plString : : Format ( " %s (%d) %s " , GetAgeUserDefinedName ( ) , seq , GetAgeInstanceName ( ) ) ;
return plString : : Format ( " %s (%d) %s " , user , seq , instance ) ;
else
else
fDisplayName = plString : : Format ( " %s %s " , GetAgeUserDefinedName ( ) , GetAgeInstanceName ( ) ) ;
return plString : : Format ( " %s %s " , user , instance ) ;
return fDisplayName . c_str ( ) ;
}
}
}
@ -255,12 +263,20 @@ void pyAgeInfoStructRef::SetAgeSequenceNumber( int32_t v )
fAgeInfo . SetAgeSequenceNumber ( v ) ;
fAgeInfo . SetAgeSequenceNumber ( v ) ;
}
}
const char * pyAgeInfoStructRef : : GetDisplayName ( ) const
plString pyAgeInfoStructRef : : GetDisplayName ( ) const
{
{
const char * instance = GetAgeInstanceName ( ) ;
const char * user = GetAgeUserDefinedName ( ) ;
bool namesEqual = ( stricmp ( user , instance ) = = 0 ) ; // Ae'gura Ae'gura
if ( namesEqual )
return instance ;
else
{
int32_t seq = GetAgeSequenceNumber ( ) ;
int32_t seq = GetAgeSequenceNumber ( ) ;
if ( seq > 0 )
if ( seq > 0 )
fDisplayName = plString : : Format ( " %s (%d) %s " , GetAgeUserDefinedName ( ) , seq , GetAgeInstanceName ( ) ) ;
return plString : : Format ( " %s (%d) %s " , user , seq , instance ) ;
else
else
fDisplayName = plString : : Format ( " %s %s " , GetAgeUserDefinedName ( ) , GetAgeInstanceName ( ) ) ;
return plString : : Format ( " %s %s " , user , instance ) ;
return fDisplayName . c_str ( ) ;
}
}
}