src/ThemesAddon.cpp
status_t
ThemesAddon::CompareToCurrent(BMessage &theme)
{
	FENTRY;
	BMessage current, a, b;
	BackupCurrent(current);
	status_t err;
	
	if (!MessageName())
		return B_OK;
	
	err = theme.FindMessage(MessageName(), &a);
	if (err)
		return err;
	err = current.FindMessage(MessageName(), &b);
	if (err)
		return err;
	if (!CompareMessages(a, b))
		return 1;
	
	return B_OK;
}
/* by default, try to find the addon's specific message
 * and compare them. Some addons don't add any message,
 * they'll have to do comparison by hand.
 */
by default, try to find the addon's specific message
and compare them. Some addons don't add any message,
they'll have to do comparison by hand.
by default try to find the addon ' s specific message and compare them . Some addons don ' t add any message they ' ll have to do comparison by hand .
status_t
ThemesAddon::CompareToCurrent(BMessage &theme)
{
	FENTRY;
	BMessage current, a, b;
	BackupCurrent(current);
	status_t err;
	if (!MessageName())
		return B_OK;
	err = theme.FindMessage(MessageName(), &a);
	if (err)
		return err;
	err = current.FindMessage(MessageName(), &b);
	if (err)
		return err;
	if (!CompareMessages(a, b))
		return 1;
	return B_OK;
}
status_t ThemesAddon :: CompareToCurrent ( BMessage & theme ) { FENTRY ; BMessage current , a , b ; BackupCurrent ( current ) ; status_t err ; if ( ! MessageName ( ) ) return B_OK ; err = theme . FindMessage ( MessageName ( ) , & a ) ; if ( err ) return err ; err = current . FindMessage ( MessageName ( ) , & b ) ; if ( err ) return err ; if ( ! CompareMessages ( a , b ) ) return 1 ; return B_OK ; }
by default, try to find the addon's specific message
 and compare them.
by default try to find the addon ' s specific message and compare them .