summaryrefslogtreecommitdiff
path: root/plugins/Utils.pas
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-01-17 20:56:37 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-01-17 20:56:37 +0300
commit0408c8952ca633a1ef37e3c4419816fa4ad5c418 (patch)
treebfc994a0ff6c215ac55a9d3f004414f87b66d5ff /plugins/Utils.pas
parent78034bcd615e739ad51a1b4bc570b6f1927932fc (diff)
fixes #4109 (Прекратить хранение списка групп в базе)
Diffstat (limited to 'plugins/Utils.pas')
-rw-r--r--plugins/Utils.pas/mirutils.pas33
1 files changed, 1 insertions, 32 deletions
diff --git a/plugins/Utils.pas/mirutils.pas b/plugins/Utils.pas/mirutils.pas
index fb07550f08..a38e15142e 100644
--- a/plugins/Utils.pas/mirutils.pas
+++ b/plugins/Utils.pas/mirutils.pas
@@ -28,7 +28,6 @@ function ShowVarHelp(dlg:HWND;id:integer=0):integer;
function CreateGroupW(name:PWideChar;hContact:TMCONTACT):integer;
-function MakeGroupMenu(idxfrom:integer=100):HMENU;
function GetNewGroupName(parent:HWND):PWideChar;
const
@@ -351,36 +350,6 @@ begin
result:=StrCmpW(PWideChar(para1),PWideChar(para2));
end;
-function MakeGroupMenu(idxfrom:integer=100):HMENU;
-var
- sl:TSortedList;
- i:integer;
- b:array [0..15] of AnsiChar;
- p:PWideChar;
-begin
- result:=CreatePopupMenu;
- i:=0;
- AppendMenuW(result,MF_STRING,idxfrom,TranslateW('<Root Group>'));
- AppendMenuW(result,MF_SEPARATOR,0,nil);
- FillChar(sl,SizeOf(sl),0);
- sl.increment:=16;
- sl.sortFunc:=@MyStrSort;
- repeat
- p:=DBReadUnicode(0,'CListGroups',IntToStr(b,i),nil);
- if p=nil then break;
- List_InsertPtr(@sl,p+1);
- inc(i);
- until false;
- inc(idxfrom);
- for i:=0 to sl.realCount-1 do
- begin
- AppendMenuW(result,MF_STRING,idxfrom+i,PWideChar(sl.Items[i]));
- p:=PWideChar(sl.Items[i])-1;
- mFreeMem(p);
- end;
- List_Destroy(@sl);
-end;
-
function GetNewGroupName(parent:HWND):PWideChar;
var
mmenu:HMENU;
@@ -389,7 +358,7 @@ var
pt:TPoint;
begin
result:=nil;
- mmenu:=MakeGroupMenu(100);
+ mmenu:=Clist_GroupBuildMenu(100);
GetCursorPos(pt);
i:=integer(TrackPopupMenu(mmenu,TPM_RETURNCMD+TPM_NONOTIFY,pt.x,pt.y,0,parent,nil));
if i>100 then // no root or cancel