void LLInventoryItem::setDescription(const std::string& d)
{
	std::string new_desc(d);
	LLInventoryItem::correctInventoryDescription(new_desc);
	if( new_desc != mDescription )
	{
		mDescription = new_desc;
	}
}
示例#2
0
void LLInventoryItem::setDescription(const std::string& d)
{
	std::string new_desc(d);
	LLStringUtil::replaceNonstandardASCII(new_desc, ' ');
	LLStringUtil::replaceChar(new_desc, '|', ' ');
	if( new_desc != mDescription )
	{
		mDescription = new_desc;
	}
}
示例#3
0
//////////////////////////////////////////////////////////////////////////
// Private Section
//////////////////////////////////////////////////////////////////////////
void LLGroupListItem::setActive(bool active)
{
	// *BUG: setName() overrides the style params.

	// Active group should be bold.
	LLFontDescriptor new_desc(mGroupNameBox->getDefaultFont()->getFontDesc());

	// *NOTE dzaporozhan
	// On Windows LLFontGL::NORMAL will not remove LLFontGL::BOLD if font 
	// is predefined as bold (SansSerifSmallBold, for example)
	new_desc.setStyle(active ? LLFontGL::BOLD : LLFontGL::NORMAL);
	LLFontGL* new_font = LLFontGL::getFont(new_desc);
	mGroupNameStyle.font = new_font;

	// *NOTE: You cannot set the style on a text box anymore, you must
	// rebuild the text.  This will cause problems if the text contains
	// hyperlinks, as their styles will be wrong.
	mGroupNameBox->setText(mGroupName, mGroupNameStyle);
}
示例#4
0
文件: dbase.c 项目: KodersCo/hayalevi
void copyover_recover(void) {
	DESC_DATA *d;
	FILE *fp;
	char name[100];
	char host[STRING];
	char board[100];
	char user[100];
	int desc;
	bool fOld;

	log_string("Copyover: Copyover recovery initiated.");
	if (!(fp = fopen(COPYOVER_FILE, "r"))) {
		bbs_bug("Copyover_recover: Could not open to read %s", COPYOVER_FILE);
		exit(1);
	}

	unlink(COPYOVER_FILE);

	for (;;) {
		fscanf(fp, "%d %s %s %s %s\n", &desc, board, name, user, host);
		if (desc == -1)
			break;

		if (!write_to_desc(desc, "", 0)) {
			close(desc);
			continue;
		}

		d = new_desc();
		d->descr = desc;
		if (d->host)
			free_string(d->host);
		d->host = str_dup(host);
		if (d->ident)
			free_string(d->ident);
		d->ident = str_dup(user);
		d->next = desc_list;
		desc_list = d;
		d->login = CON_REBOOT_RECOVER;

		fOld = load_user(d, name);

		if (!fOld) {
			write_to_desc(
					desc,
					"\n\rSomehow, your user was lost in the reboot, sorry.\n\r",
					0);
			close_socket(d);
		} else {
			if (!d->user->pBoard)
				d->user->pBoard = board_lookup("lobby", FALSE);

			d->user->next = user_list;
			user_list = d->user;
			d->login = CON_LOGIN;
			USR(d)->logon = current_time;
			USR(d)->pBoard = board_lookup(board, FALSE);
			save_user(USR(d));
		}
	}

	system_info("Reboot recover complete");
	log_string("Copyover: Done.");
	fclose(fp);
	return;
}