@ -33,6 +33,12 @@ type
procedure CNDrawitem(var Message: TWMDrawItem); message CN_DRAWITEM;
end;
TImageEx = class(TImage)
public
ImageStream: TMemoryStream;
destructor Destroy; override;
end;
function OnlFeature(const pr: TRnQProtocol; check: Boolean = True): Boolean;
// True if online
@ -43,8 +49,7 @@ function exitFromAutoaway(): Boolean;
procedure addTempVisibleFor(time: integer; c: TRnQContact);
function infoToStatus(const info: RawByteString): byte;
function infoToXStatus(const info: RawByteString): byte;
procedure drawHint(cnv: Tcanvas; kind: integer; groupid: integer; c: TRnQContact; var r: Trect;
calcOnly: Boolean = False);
procedure drawHint(cnv: Tcanvas; kind: integer; groupid: integer; c: TRnQContact; var r: Trect; calcOnly: Boolean = False);
// procedure drawNodeHint(cnv:Tcanvas; node:Pvirtualnode; var r:Trect);
function unexistant(const uin: TUID): Boolean;
function fileIncomePath(cnt: TRnQContact): String;
@ -103,8 +108,7 @@ function getXStatusMsgFor(c: TRnQContact): string;
procedure toggleOnlyOnline;
procedure toggleOnlyImVisibleTo;
procedure openURL(const pURL: String); OverLoad;
function enterPwdDlg(var pwd: String; const title: string = ''; maxLength: integer = 0;
AllowNull: Boolean = False): Boolean;
function enterPwdDlg(var pwd: String; const title: string = ''; maxLength: integer = 0; AllowNull: Boolean = False): Boolean;
function enterUinDlg(const proto: TRnQProtocol; var uin: TUID; const title: string = ''): Boolean;
function sendProtoMsg(var oe: Toevent): Boolean;
procedure SendEmail2Mail(const email: String);
@ -188,8 +192,8 @@ procedure LoadProxies(zp: TZipFile; var pProxys: Tarrproxy);
// procedure saveOutbox;
procedure loadOutInBox(zp: TZipFile);
// procedure saveRetrieveQ;
function openSaveDlg(parent: Tform; const Cptn: String; IsOpen: Boolean; const ext: string = '';
const extCptn: String = ''; const defFile: String = ''; MultiSelect: Boolean = False): string;
function openSaveDlg(parent: Tform; const Cptn: String; IsOpen: Boolean; const ext: string = ''; const extCptn: String = '';
const defFile: String = ''; MultiSelect: Boolean = False): string;
function str2sortby(const s: AnsiString): TsortBy;
procedure CheckBDays;
@ -686,8 +690,8 @@ begin
cfg := db2strU(contactsDB);
AddFile2Zip(dbFileName, cfg);
cfg := AnsiString('protocol=') + AnsiString(pr.ProtoName) + CRLF + AnsiString('account-id=') + pr.getMyInfo.UID2cmp +
CRLF + AnsiString('account-name=') + StrToUTF8(pr.getMyInfo.displayed)
cfg := AnsiString('protocol=') + AnsiString(pr.ProtoName) + CRLF + AnsiString('account-id=') + pr.getMyInfo.UID2cmp + CRLF +
AnsiString('account-name=') + StrToUTF8(pr.getMyInfo.displayed)
{$IFDEF UseNotSSI}
+ CRLF + AnsiString('use-ssi=') + yesno[useSSI2]
{$ELSE UseNotSSI}
@ -791,19 +795,16 @@ begin
cfg := cfg + 'proxy-name=' + StrToUTF8(pProxys[k].name) + CRLF
// + 'proxy='+yesno[pProxys[i].enabled]+CRLF
+ 'proxy-serv-host=' + AnsiString(pProxys[k].serv.host) + CRLF + 'proxy-serv-port=' +
IntToStrA(pProxys[k].serv.port) + CRLF + 'proxy-auth=' + yesno[pProxys[k].auth] + CRLF + 'proxy-user=' +
StrToUTF8(pProxys[k].user) + CRLF
+ 'proxy-serv-host=' + AnsiString(pProxys[k].serv.host) + CRLF + 'proxy-serv-port=' + IntToStrA(pProxys[k].serv.port) +
CRLF + 'proxy-auth=' + yesno[pProxys[k].auth] + CRLF + 'proxy-user=' + StrToUTF8(pProxys[k].user) + CRLF
// + 'proxy-pass=' +passCrypt(pProxys[k].pwd)+CRLF
+ 'proxy-pass64=' + Base64EncodeString(passCrypt(pProxys[k].pwd)) + CRLF + 'proxy-ntlm=' +
yesno[pProxys[k].NTLM] + CRLF + 'connection-ssl=' + yesno[pProxys[k].ssl] + CRLF + 'proxy-proto=' +
proxyproto2str[pProxys[k].proto] + CRLF
+ 'proxy-pass64=' + Base64EncodeString(passCrypt(pProxys[k].pwd)) + CRLF + 'proxy-ntlm=' + yesno[pProxys[k].NTLM] + CRLF +
'connection-ssl=' + yesno[pProxys[k].ssl] + CRLF + 'proxy-proto=' + proxyproto2str[pProxys[k].proto] + CRLF
{ for pp:=low(pp) to high(pp) do cfg:=cfg
+'proxy-'+proxyproto2str[pp]+'-host='+proxyes[i].addr[pp].host+CRLF
+'proxy-'+proxyproto2str[pp]+'-port='+proxyes[i].addr[pp].port+CRLF;
}
+ 'proxy-host=' + AnsiString(pProxys[k].addr.host) + CRLF + 'proxy-port=' +
IntToStrA(pProxys[k].addr.port) + CRLF;
+ 'proxy-host=' + AnsiString(pProxys[k].addr.host) + CRLF + 'proxy-port=' + IntToStrA(pProxys[k].addr.port) + CRLF;
cfg := cfg + '------------------' + CRLF;
end;
AddFile2Zip(proxiesFileName, cfg);
@ -1205,17 +1206,24 @@ begin
inherited;
end;
destructor TImageEx.Destroy;
begin
if Assigned(ImageStream) then
ImageStream.Free;
inherited;
end;
function viewTextWindow(title, body: string; image: RawByteString): Tform;
var form: Tform;
memo: Tmemo;
img: TImage;
img: TImageEx ;
scroll: TScrollBox;
PIn, POut: Pointer;
RnQPicStream: TMemoryStream;
OutSize: Cardinal;
ff: TPAFormat;
png: TPNGObject;
tif : TWICImage;
winimg : TWICImage;
bmp: TBitmap;
gif: TGIFImage;
rnqbmp: TRnQBitmap;
@ -1326,7 +1334,7 @@ begin
POut := RnQPicStream.Memory;
Base64Decode(PIn^, length(imgtag), POut^);
img := TImage.Create(scroll);
img := TImageEx .Create(scroll);
img.parent := scroll;
img.AutoSize := True;
img.Center := False;
@ -1336,6 +1344,8 @@ begin
img.OnMouseMove := RnQmain.imgMouseMove;
img.name := 'image' + IntToStr(j);
img.PopupMenu := RnQmain.imgmenu;
img.ImageStream := TMemoryStream.Create;
img.ImageStream.LoadFromStream(RnQPicStream);
ff := DetectFileFormatStream(RnQPicStream);
RnQPicStream.Seek(0, soBeginning);
@ -1374,6 +1384,8 @@ begin
if Assigned(bmp) then
img.Picture.Bitmap.Assign(bmp);
bmp.Free;
end;
pagetab.Caption := 'JPEG';
img.Tag := 2;
@ -1387,14 +1399,16 @@ begin
img.TRANSPARENT := True;
pagetab.Caption := 'GIF';
img.Tag := 3;
gif.Free;
end;
PA_FORMAT_PNG:
begin
png := TPNGImage.Create;
png.LoadFromStream(RnQPicStream);
img.Picture.Bitmap. Assign(png);
img.Picture.Assign(png);
pagetab.Caption := 'PNG';
img.Tag := 4;
png.Free;
end;
PA_FORMAT_ICO:
begin
@ -1405,11 +1419,21 @@ begin
end;
PA_FORMAT_TIF:
begin
tif := TWICImage.Create;
tif .LoadFromStream(RnQPicStream);
img.Picture.Bitmap.Assign(tif );
winimg := TWICImage.Create;
winimg .LoadFromStream(RnQPicStream);
img.Picture.Assign(winimg );
pagetab.Caption := 'TIFF';
img.Tag := 6;
winimg.Free;
end;
PA_FORMAT_WEBP:
begin
winimg := TWICImage.Create;
winimg.LoadFromStream(RnQPicStream);
img.Picture.Assign(winimg);
pagetab.Caption := 'WEBP';
img.Tag := 7;
winimg.Free;
end;
PA_FORMAT_UNK:
begin
@ -1418,6 +1442,7 @@ begin
end;
end;
end;
imgList.Free;
FreeAndNil(RnQPicStream);
end;
@ -1450,8 +1475,8 @@ begin
theme.pic2ico(RQteFormIcon, ev.pic, result.Icon);
end; // viewHeventWindow
function openSaveDlg(parent: Tform; const Cptn: String; IsOpen: Boolean; const ext: String = '';
const extCptn: String = ''; const defFile: String = ''; MultiSelect: Boolean = False): string;
function openSaveDlg(parent: Tform; const Cptn: String; IsOpen: Boolean; const ext: String = ''; const extCptn: String = '';
const defFile: String = ''; MultiSelect: Boolean = False): string;
var Filtr: String; fn: String; hndl: THandle;
// defDir : String;
begin
@ -1478,8 +1503,7 @@ end; // opendlg
function str2html(const s: string): string;
begin
result := template(s, ['&', '&', '"', '"', '<', '<', '>', '>', CRLF, '<br>', #13, '<br>', #10,
'<br>']);
result := template(s, ['&', '&', '"', '"', '<', '<', '>', '>', CRLF, '<br>', #13, '<br>', #10, '<br>']);
end; // str2html
function strFromHTML(const s: string): string;
@ -1935,9 +1959,9 @@ var wnd: TselectCntsFrm;
begin
if not Assigned(dest) then
exit;
wnd := TselectCntsFrm.doAll2(RnQmain, getTranslation('To %s', [dest.displayed]),
getTranslation('Send selected contacts'), dest.fProto, notInlist.clone.Add(dest.fProto.readList(LT_ROSTER)),
RnQmain.sendContactsAction, [sco_multi, sco_groups, sco_predefined], @wnd);
wnd := TselectCntsFrm.doAll2(RnQmain, getTranslation('To %s', [dest.displayed]), getTranslation('Send selected contacts'),
dest.fProto, notInlist.clone.Add(dest.fProto.readList(LT_ROSTER)), RnQmain.sendContactsAction,
[sco_multi, sco_groups, sco_predefined], @wnd);
// Theme.getIco2(PIC_CONTACTS, wnd.icon);
theme.pic2ico(RQteFormIcon, PIC_CONTACTS, wnd.Icon);
wnd.extra := Tincapsulate.aString(dest.uid);
@ -2089,8 +2113,7 @@ begin
fl := oe.flags or IF_UTF8_TEXT;
end;
{$ENDIF ~DB_ENABLED}
ev := Thevent.new(EK_MSG, oe.whom.fProto.getMyInfo, oe.timeSent, vBin{$IFDEF DB_ENABLED}, vStr{$ENDIF DB_ENABLED},
fl, oe.id);
ev := Thevent.new(EK_MSG, oe.whom.fProto.getMyInfo, oe.timeSent, vBin{$IFDEF DB_ENABLED}, vStr{$ENDIF DB_ENABLED}, fl, oe.id);
ev.fIsMyEvent := True;
if logpref.writehistory and (BE_save in behaviour[ev.kind].trig) and (oe.flags and IF_not_save_hist = 0) then
writeHistorySafely(ev, oe.whom);
@ -2154,8 +2177,7 @@ begin
until not result;
end; // enterUinDlg
function enterPwdDlg(var pwd: String; const title: string = ''; maxLength: integer = 0;
AllowNull: Boolean = False): Boolean;
function enterPwdDlg(var pwd: String; const title: string = ''; maxLength: integer = 0; AllowNull: Boolean = False): Boolean;
var frm: pwdDlg.TmsgFrm;
begin
frm := pwdDlg.TmsgFrm.Create(application);
@ -2189,8 +2211,8 @@ begin
if oldPwd = newPwd then
exit;
if not ICQ.isOffline then
if messageDlg(getTranslation('You have to be offline for this operation!\nDisconnect?'), mtConfirmation,
[mbYes, mbNo], 0) = mrNo then
if messageDlg(getTranslation('You have to be offline for this operation!\nDisconnect?'), mtConfirmation, [mbYes, mbNo], 0) = mrNo
then
exit
else
ICQ.disconnect;
@ -2376,11 +2398,11 @@ begin
else
h := 0;
result := template(s, ['%awaysince%', formatDatetime(timeformat.automsg, imAwaySince), '%awaysince-gmt%',
formatDatetime(timeformat.automsg, imAwaySince - GMToffset), '%elapsedhours%', IntToStr(trunc(h)),
'%elapsedminutes%', IntToStr(trunc(frac(h) * 60)), '%h%', IntToStr(hourof(now)), '%m%', IntToStr(minuteof(now)),
'%s%', IntToStr(secondof(now)), '% D%', IntToStr(dayof(now)), '%M%', IntToStr(monthof(now)), '%Y%',
IntToStr(yearof(now)), '%hh%', IntToStr(hourof(now), 2), '%mm%', IntToStr(minuteof(now), 2), '%ss %',
IntToStr(secondof(now), 2), '%DD%', IntToStr(dayof(now), 2), '%MM%', IntToStr( monthof(now), 2),
formatDatetime(timeformat.automsg, imAwaySince - GMToffset), '%elapsedhours%', IntToStr(trunc(h)), '%elapsedminutes%',
IntToStr(trunc(frac(h) * 60)), '%h%', IntToStr(hourof(now)), '%m%', IntToStr(minuteof(now)), '%s%', IntToStr(secondof(now)),
'%D%', IntToStr(dayof(now)), '%M%', IntToStr(monthof(now)), '%Y%', IntToStr(yearof(now)), '%hh%', IntToStr(hourof(now), 2),
'%mm%', IntToStr(minuteof(now), 2), '%ss%', IntToStr(secondof(now), 2), '%DD%', IntToStr(dayof(now), 2), '%MM %',
IntToStr(monthof(now), 2),
{$IFDEF RNQ_PLAYER}
'%track%', uSimplePlayer.RnQPlayer.getPlayingTitle,
{$ENDIF RNQ_PLAYER}
@ -2407,8 +2429,8 @@ begin
s1 := getTranslation(Str_unk);
s2 := s1;
end;
result := template(result, ['%you%', c.displayed, '%nick%', c.nick, '%first%', c.first, '%last%', c.last,
'%status%', getTranslation(c.fProto.Statuses[c.getStatus].Cptn), '%ip%', s1, '%proto%', s2]);
result := template(result, ['%you%', c.displayed, '%nick%', c.nick, '%first%', c.first, '%last%', c.last, '%status%',
getTranslation(c.fProto.Statuses[c.getStatus].Cptn), '%ip%', s1, '%proto%', s2]);
end
else
result := template(result, ['%you%', '', '%nick%', '', '%first%', '', '%last%', '', '%ip%', getTranslation(Str_unk),
@ -2465,8 +2487,7 @@ var
// if isAbort(ps) then exit;
vs := IntToStr(v) + ' ' + getTranslation('Build') + ' ' + IntToStr(build) + ifThen(preview, ' PREVIEW');
ps := ifThen(PREVIEWversion, CRLF + getTranslation('Your version is a "preview"!'), '');
if messageDlg
(getTranslation('There''s a new version available! version %s%s\nDo you want to download the new version?',
if messageDlg(getTranslation('There''s a new version available! version %s%s\nDo you want to download the new version?',
[vs, ps]), mtConfirmation, [mbYes, mbNo], 0) = mrYes then
openURL(url)
end; // found
@ -2500,8 +2521,7 @@ begin
if PREVIEWversion and ((v > RnQBuild) or (previewv > RnQBuildCustom)) then
begin
result := True;
if messageDlg(getTranslation('You are running OLD TEST BUILD!\nRun anyway?'), mtWarning, [mbYes, mbNo], 0) <> mrYes
then
if messageDlg(getTranslation('You are running OLD TEST BUILD!\nRun anyway?'), mtWarning, [mbYes, mbNo], 0) <> mrYes then
openURL(rnqSite)
else
begin
@ -2719,8 +2739,7 @@ begin
msgDlg(getTranslation('SPAM FILTERED FROM %s \n BY WORD %s', [c.displayed + ' (' + c.uid + ')', wrd]), False,
mtInformation, c.uid)
else
msgDlg(getTranslation('SPAM FILTERED FROM %s', [c.displayed + ' (' + c.uid + ')']), False,
mtInformation, c.uid);
msgDlg(getTranslation('SPAM FILTERED FROM %s', [c.displayed + ' (' + c.uid + ')']), False, mtInformation, c.uid);
exit;
end;
result := enableIgnoreList and ignoreList.exists(c);
@ -2937,8 +2956,7 @@ begin
// TRAY
if (ev0.kind = EK_CONTACTS) and chatFrm.isVisible and (ev0.who = chatFrm.thisChat.who) then
TselectCntsFrm.doAll2(RnQmain, getTranslation('from %s', [ev0.who.displayed]),
getTranslation('Add selected contacts'), vProto, ev0.cl.clone, RnQmain.addContactsAction,
[sco_multi], @wnd)
getTranslation('Add selected contacts'), vProto, ev0.cl.clone, RnQmain.addContactsAction, [sco_multi], @wnd)
else if BE_tray in behaviour[ev0.kind].trig then
eventQ.Add(ev0.clone);
// TIP
@ -2976,8 +2994,7 @@ begin
if ev.who.antispam.Tryes = spamfilter.BotTryesCount then
begin
inc(ev.who.antispam.Tryes);
Proto_Outbox_add(OE_msg, ev.who, SpamBotMsgFlags, AnsiReplaceStr(getTranslation(AntiSpamMsgs[3]), '%uin%',
ev.who.uid));
Proto_Outbox_add(OE_msg, ev.who, SpamBotMsgFlags, AnsiReplaceStr(getTranslation(AntiSpamMsgs[3]), '%uin%', ev.who.uid));
exit;
end
else if ev.who.antispam.Tryes > spamfilter.BotTryesCount then
@ -3017,13 +3034,13 @@ begin
begin
inc(ev.who.antispam.Tryes);
if spamfilter.UseBotFromFile and (length(spamfilter.quests) > 0) then
Proto_Outbox_add(OE_msg, ev.who, SpamBotMsgFlags, AnsiReplaceStr(getTranslation(AntiSpamMsgs[5]),
'%attempt%', IntToStr(spamfilter.BotTryesCount + 1 - ev.who.antispam.Tryes)) + CRLF +
getTranslation(AntiSpamMsgs[6]) + CRLF + s)
Proto_Outbox_add(OE_msg, ev.who, SpamBotMsgFlags, AnsiReplaceStr(getTranslation(AntiSpamMsgs[5]), '%attempt%',
IntToStr(spamfilter.BotTryesCount + 1 - ev.who.antispam.Tryes)) + CRLF + getTranslation(AntiSpamMsgs[6])
+ CRLF + s)
else
Proto_Outbox_add(OE_msg, ev.who, SpamBotMsgFlags, AnsiReplaceStr(getTranslation(AntiSpamMsgs[5]),
'%attempt%', IntToStr(spamfilter.BotTryesCount + 1 - ev.who.antispam.Tryes)) + CRLF +
getTranslation(AntiSpamMsgs[4]) + CRLF + s);
Proto_Outbox_add(OE_msg, ev.who, SpamBotMsgFlags, AnsiReplaceStr(getTranslation(AntiSpamMsgs[5]), '%attempt%',
IntToStr(spamfilter.BotTryesCount + 1 - ev.who.antispam.Tryes)) + CRLF + getTranslation(AntiSpamMsgs[4]) +
CRLF + s);
exit;
end;
end;
@ -3033,8 +3050,8 @@ begin
// prevent annoying fast oncoming/offgoing sequences
if minOnOff then
if (ev.kind = EK_oncoming) and (now - ev.who.lastTimeSeenOnline < minOnOffTime * DTseconds) or
(ev.kind = EK_offgoing) and ( now - TCE(ev.who.data^).lastOncoming < minOnOffTime * DTseconds) then
if (ev.kind = EK_oncoming) and (now - ev.who.lastTimeSeenOnline < minOnOffTime * DTseconds) or (ev.kind = EK_offgoing) and
(now - TCE(ev.who.data^).lastOncoming < minOnOffTime * DTseconds) then
exit;
result := True;
@ -3050,8 +3067,8 @@ begin
ev.fpos := -1;
SkipEvent := False;
if DsblEvnt4ClsdGrp and (ev.kind in [EK_oncoming, EK_offgoing, EK_statuschange, EK_automsgreq, EK_automsg,
EK_typingBeg, EK_typing Fin, EK_XstatusMsg, EK_Xstatusreq]) then
if DsblEvnt4ClsdGrp and (ev.kind in [EK_oncoming, EK_offgoing, EK_statuschange, EK_automsgreq, EK_automsg, EK_typingBeg,
EK_typingFin, EK_XstatusMsg, EK_Xstatusreq]) then
begin
// gr := ev.who.group;
gr := groups.get(ev.who.group);
@ -3090,8 +3107,8 @@ begin
end;
// TIP
if tipsAllowed and not BossMode.isBossKeyOn and (BE_tip in behaviour[ev.kind].trig) and (ev.flags and IF_offline = 0)
and not vProto.getStatusDisable.tips and not SkipEvent then
if tipsAllowed and not BossMode.isBossKeyOn and (BE_tip in behaviour[ev.kind].trig) and (ev.flags and IF_offline = 0) and
not vProto.getStatusDisable.tips and not SkipEvent then
if ev.flags and IF_no_matter = 0 then
try
// TipAdd(ev);
@ -3106,8 +3123,8 @@ begin
{$ENDIF Use_Baloons}
// TRAY
if (ev.kind = EK_CONTACTS) and chatFrm.isVisible and (ev.who = chatFrm.thisChat.who) then
TselectCntsFrm.doAll2(RnQmain, getTranslation('from %s', [ev.who.displayed]),
getTranslation('Add selected contacts'), vProto, ev.cl.clone, RnQmain.addContactsAction, [sco_multi], @wnd)
TselectCntsFrm.doAll2(RnQmain, getTranslation('from %s', [ev.who.displayed]), getTranslation('Add selected contacts'), vProto,
ev.cl.clone, RnQmain.addContactsAction, [sco_multi], @wnd)
else if (BE_tray in behaviour[ev.kind].trig) and not SkipEvent then
// if ev.flags and IF_no_matter = 0 then
eventQ.Add(ev.clone);
@ -3385,8 +3402,8 @@ begin
// DeleteFile(userPath + historyPath + c.UID);
if (grp > 0) and (TRnQCList(c.fProto.readList(LT_ROSTER)).getCount(grp) = 0) then
if messageDlg(getTranslation('This group (%s) is empty! Do you want to delete it?', [groups.id2name(grp)]),
mtConfirmation, [mbYes, mbNo], 0) = mrYes then
if messageDlg(getTranslation('This group (%s) is empty! Do you want to delete it?', [groups.id2name(grp)]), mtConfirmation,
[mbYes, mbNo], 0) = mrYes then
roasterLib.removeGroup(grp);
c.group := 0;
end; // removeFromRoster
@ -3438,8 +3455,7 @@ begin
EK_ADDEDYOU:
if ev.who.isInList(LT_ROSTER) then
msgDlg(getTranslation('%s added you to his/her contact list.', [ev.who.displayed]), False, mtInformation)
else if messageDlg
(getTranslation('%s added you to his/her contact list.\nDo you want to add him/her to your contact list?',
else if messageDlg(getTranslation('%s added you to his/her contact list.\nDo you want to add him/her to your contact list?',
[ev.who.displayed]), mtConfirmation, [mbYes, mbNo], 0) = mrYes then
addToRoster((ev.who));
EK_AUTHREQ:
@ -3472,9 +3488,8 @@ begin
// end;
end;
EK_CONTACTS:
TselectCntsFrm.doAll2(RnQmain, getTranslation('from %s', [ev.who.displayed]),
getTranslation('Add selected contacts'), ev.who.fProto, ev.cl.clone, RnQmain.addContactsAction,
[sco_multi, sco_selected], @wnd)
TselectCntsFrm.doAll2(RnQmain, getTranslation('from %s', [ev.who.displayed]), getTranslation('Add selected contacts'),
ev.who.fProto, ev.cl.clone, RnQmain.addContactsAction, [sco_multi, sco_selected], @wnd)
end;
try
// FreeAndNil(ev);
@ -3948,8 +3963,7 @@ begin
n := length(availableUsers);
for i := 0 to n - 2 do
for j := i + 1 to n - 1 do
swap4(availableUsers[i], availableUsers[j], sizeof(availableUsers[i]),
availableUsers[i].uin > availableUsers[j].uin);
swap4(availableUsers[i], availableUsers[j], sizeof(availableUsers[i]), availableUsers[i].uin > availableUsers[j].uin);
end; // refreshAvailableUsers
procedure assignImgPic(img: TImage; picName: String);
@ -4077,8 +4091,8 @@ end; // toggleMainfrmBorder
function unexistant(const uin: TUID): Boolean;
begin
result := not(Account.AccProto.getMyInfo.equals(uin)) and not Account.AccProto.readList(LT_ROSTER)
.exists(Account.AccProto, uin) and not notInlist.exists(Account.AccProto, uin)
result := not(Account.AccProto.getMyInfo.equals(uin)) and not Account.AccProto.readList(LT_ROSTER).exists(Account.AccProto, uin)
and not notInlist.exists(Account.AccProto, uin)
end; // unexistant
function findInAvailableUsers(const uin: TUID): integer;
@ -4100,8 +4114,7 @@ begin
SetWindowRgn(hnd, 0, True)
end;
procedure drawHint(cnv: Tcanvas; kind: integer; groupid: integer; c: TRnQContact; var r: Trect;
calcOnly: Boolean = False);
procedure drawHint(cnv: Tcanvas; kind: integer; groupid: integer; c: TRnQContact; var r: Trect; calcOnly: Boolean = False);
const border = 5; roundsize = 16; maxWidth = 300;
var
// n:Tnode;
@ -4585,12 +4598,12 @@ begin
case ev.kind of
EK_MSG, EK_AUTHREQ:
if (be_BALLOON in behaviour[ev.kind].trig) and (ev.flags and IF_offline = 0) and
not Account.AccProto.getStatusDisable.tips then
if (be_BALLOON in behaviour[ev.kind].trig) and (ev.flags and IF_offline = 0) and not Account.AccProto.getStatusDisable.tips
then
statusIcon.showballoon(counter, s, ev.who.displayed + ' ' + getTranslation(tipevent2str[ev.kind]), bitinfo);
EK_offgoing, EK_oncoming, EK_typingFin, EK_typingBeg:
if (be_BALLOON in behaviour[ev.kind].trig) and (ev.flags and IF_offline = 0) and
not Account.AccProto.getStatusDisable.tips then
if (be_BALLOON in behaviour[ev.kind].trig) and (ev.flags and IF_offline = 0) and not Account.AccProto.getStatusDisable.tips
then
statusIcon.showballoon(counter, ev.who.displayed, getTranslation(tipevent2str[ev.kind]), bitinfo);
end;
end;