summaryrefslogtreecommitdiff
path: root/plugins/QuickSearch
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-30 18:59:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-30 18:59:38 +0000
commit10bc9e42dfba6ed8be41199243d688c2e367dc0d (patch)
tree891aca91eeb2feddb6c76498c4eb880689360fe6 /plugins/QuickSearch
parent5dac5be47f2d9af8cbceead6511ff4c0fc40bab5 (diff)
MS_CLIST_GETSTATUSMODEDESCRIPTION & MS_CLIST_GETCONTACTDISPLAYNAME replaced with pcli->* members
git-svn-id: http://svn.miranda-ng.org/main/trunk@14459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/QuickSearch')
-rw-r--r--plugins/QuickSearch/i_ok.inc13
-rw-r--r--plugins/QuickSearch/sr_global.pas16
-rw-r--r--plugins/QuickSearch/sr_optdialog.pas2
3 files changed, 20 insertions, 11 deletions
diff --git a/plugins/QuickSearch/i_ok.inc b/plugins/QuickSearch/i_ok.inc
index 51e756aacd..009dcd6ba5 100644
--- a/plugins/QuickSearch/i_ok.inc
+++ b/plugins/QuickSearch/i_ok.inc
@@ -266,7 +266,6 @@ begin
mFreeMem(res.text);
with column^ do
begin
-
case setting_type of
QST_SCRIPT: begin
res.text:=ParseVarString(script,hContact);
@@ -390,10 +389,15 @@ begin
end;
end;
- QST_OTHER: case other of
+ QST_OTHER:
+ case other of
QSTO_LASTSEEN: begin
res.data:=BuildLastSeenTimeInt(hContact,'SeenModule');
- res.text:=BuildLastSeenTime (res.data);
+ res.text:=BuildLastSeenTime(res.data);
+ end;
+
+ QSTO_DISPLAYNAME: begin
+ StrDupW(res.text,cli^.pfnGetContactDisplayName(hContact, 0));
end;
QSTO_LASTEVENT: begin
@@ -419,7 +423,6 @@ begin
res.text:=int2strw(res.data);
end;
end;
-
end;
end;
end;
@@ -573,7 +576,7 @@ begin
begin
if ((SBData[i].flags and (QSF_ACCDEL or QSF_ACCOFF))<>0) then
begin
- icon:=Skin_LoadProtoIcon(0,ID_STATUS_OFFLINE,0);
+ icon:=Skin_LoadProtoIcon(nil,ID_STATUS_OFFLINE,0);
end
else
begin
diff --git a/plugins/QuickSearch/sr_global.pas b/plugins/QuickSearch/sr_global.pas
index b4e18a1b92..74c0a5e6ef 100644
--- a/plugins/QuickSearch/sr_global.pas
+++ b/plugins/QuickSearch/sr_global.pas
@@ -43,6 +43,7 @@ const //types
QSTO_LASTEVENT = 1;
QSTO_METACONTACT = 2;
QSTO_EVENTCOUNT = 3;
+ QSTO_DISPLAYNAME = 4;
const
COL_ON = $0001; // Show column
@@ -395,12 +396,8 @@ begin
StrDupW(title,TranslateW('Nickname'));
width :=76;
flags :=COL_ON+COL_FILTER;
- setting_type :=QST_SERVICE;
- StrDup(service.service,MS_CLIST_GETCONTACTDISPLAYNAME);
- service.flags :=ACF_TYPE_UNICODE;
- service.w_flags:=ACF_TYPE_PARAM;
- service.l_flags:=ACF_TYPE_NUMBER;
- StrDupW(pWideChar(service.lparam),'2'); // 0 for ANSI
+ setting_type :=QST_OTHER;
+ other :=QSTO_DISPLAYNAME;
end;
inc(i);
@@ -740,6 +737,13 @@ begin
StrCopy(p,so__title); title:=GetUnicode(buf);
StrCopy(p,so__width); width:=GetWord(buf,20);
StrCopy(p,so__flags); flags:=GetWord(buf,COL_ON) and not COL_REFRESH;
+
+ if (title='Nickname') then begin
+ setting_type:=QST_OTHER;
+ other:=QSTO_DISPLAYNAME;
+ continue;
+ end;
+
case setting_type of
QST_SETTING: begin
StrCopy(p,so__datatype); datatype:=GetWord(buf,0);
diff --git a/plugins/QuickSearch/sr_optdialog.pas b/plugins/QuickSearch/sr_optdialog.pas
index 727f19bbb6..b5ee06be06 100644
--- a/plugins/QuickSearch/sr_optdialog.pas
+++ b/plugins/QuickSearch/sr_optdialog.pas
@@ -37,6 +37,7 @@ const
stScript :PWideChar = 'Script';
stMetacontact:PWideChar = 'Metacontact';
stEventCount :PWideChar = 'EventCount';
+ stDisplayName:PWideChar = 'Display name';
stSetting :PWideChar = 'DB setting';
stOther :PWideChar = 'Other';
@@ -466,6 +467,7 @@ begin
CB_AddStrDataW(list,TranslateW(stLastEvent) ,QSTO_LASTEVENT);
CB_AddStrDataW(list,TranslateW(stMetacontact),QSTO_METACONTACT);
CB_AddStrDataW(list,TranslateW(stEventCount) ,QSTO_EVENTCOUNT);
+ CB_AddStrDataW(list,TranslateW(stDisplayName),QSTO_DISPLAYNAME);
SendMessage(list,CB_SETCURSEL,0,0);
end;