Esempio n. 1
0
IconsPlugin::IconsPlugin(unsigned base, const char *config)
        : Plugin(base)
{
    load_data(iconsData, &data, config);
	smiles = NULL;
	if (!getSmiles().isEmpty()){
		smiles = new Smiles;
		if (!smiles->load(getSmiles())){
			delete smiles;
			smiles = NULL;
			setSmiles(NULL);
		}
	}
    setIcons();
}
Esempio n. 2
0
EXPORT const char *defaultSmiles(unsigned n)
{
	if (pDefaultSmiles == NULL){
		pDefaultSmiles = new vector<string>;
		for (const char *p = _smiles; *p; ){
			string s;
			for (; *p; ){
				s += p;
				s += '\x00';
				p += strlen(p) + 1;
			}
			s += '\x00';
			pDefaultSmiles->push_back(s);
			p++;
		}
	}
	return getSmiles(n, pDefaultSmiles);
}
Esempio n. 3
0
EXPORT const char *smiles(unsigned n)
{
	if (pSmiles == NULL)
		setSmiles(NULL);
	return getSmiles(n, pSmiles);
}