Exemple #1
0
void CJabberProto::SearchAddToRecent( const TCHAR* szAddr, HWND hwndDialog )
{
	DBVARIANT dbv;
	char key[30];
	SearchDeleteFromRecent( szAddr );
	for ( int j=9; j > 0; j-- ) {
		sprintf( key, "RecentlySearched_%d", j-1 );
		if ( !JGetStringT( NULL, key, &dbv )) {
			sprintf(key,"RecentlySearched_%d",j);
			JSetStringT(NULL,key,dbv.ptszVal);
			JFreeVariant(&dbv);
	}	}

	sprintf( key, "RecentlySearched_%d", 0 );
	JSetStringT( NULL, key, szAddr );
	if ( hwndDialog )
		JabberSearchAddUrlToRecentCombo( hwndDialog, szAddr );
}
Exemple #2
0
void CJabberProto::SearchAddToRecent(const TCHAR *szAddr, HWND hwndDialog)
{
	char key[30];
	SearchDeleteFromRecent(szAddr);

	for (int j=9; j > 0; j--) {
		mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", j - 1);
		ptrT szValue( getTStringA(key));
		if (szValue != NULL) {
			mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", j);
			setTString(NULL, key, szValue);
	}	}

	mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", 0);
	setTString(key, szAddr);
	if (hwndDialog)
		JabberSearchAddUrlToRecentCombo(hwndDialog, szAddr);
}