From c3a168743616db6606702db5ad0fecab4dfee3da Mon Sep 17 00:00:00 2001 From: Alexey Kulakov Date: Thu, 24 Apr 2014 14:55:20 +0000 Subject: Miranda API update Watrack refactoring, API changes git-svn-id: http://svn.miranda-ng.org/main/trunk@9068 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Utils.pas/common.pas | 12 ++++++------ plugins/Utils.pas/mirutils.pas | 16 ++++------------ plugins/Utils.pas/wrapper.pas | 2 +- 3 files changed, 11 insertions(+), 19 deletions(-) (limited to 'plugins/Utils.pas') diff --git a/plugins/Utils.pas/common.pas b/plugins/Utils.pas/common.pas index 37d9400cbf..d6eafbf0e6 100644 --- a/plugins/Utils.pas/common.pas +++ b/plugins/Utils.pas/common.pas @@ -76,8 +76,8 @@ procedure ShellSort(size:integer;Compare,Swap:tSortProc); //----- String processing ----- -function FormatStrW(fmt:pWideChar; arr:array of pWideChar):pWideChar; -function FormatSimpleW(fmt:pWideChar; arr:array of const):pWideChar; +function FormatStrW (fmt:pWideChar; const arr:array of pWideChar):pWideChar; +function FormatSimpleW(fmt:pWideChar; const arr:array of const):pWideChar; const SIGN_UNICODE = $FEFF; @@ -1293,7 +1293,7 @@ end; //----- String processing ----- -function FormatStrW(fmt:pWideChar; arr:array of pWideChar):pWideChar; +function FormatStrW(fmt:pWideChar; const arr:array of pWideChar):pWideChar; var i,len:integer; pc:pWideChar; @@ -1333,7 +1333,7 @@ begin pc^:=#0; end; -function FormatSimpleW(fmt:pWideChar; arr:array of const):pWideChar; +function FormatSimpleW(fmt:pWideChar; const arr:array of const):pWideChar; var i,len:integer; pc:pWideChar; @@ -2036,7 +2036,7 @@ var begin result:=dst; dst^:=#0; - if fname<>nil then + if (fname<>nil) and (fname^<>#0) then begin pc:=StrEndW(fname)-1; while (pc>fname) and ((pc^='"') or (pc^=' ')) do dec(pc); @@ -2073,7 +2073,7 @@ var begin result:=dst; dst^:=#0; - if fname<>nil then + if (fname<>nil) and (fname^<>#0) then begin pc:=StrEnd(fname)-1; while (pc>fname) and ((pc^='"') or (pc^=' ')) do dec(pc); diff --git a/plugins/Utils.pas/mirutils.pas b/plugins/Utils.pas/mirutils.pas index 1f79cc1d4e..918f615390 100644 --- a/plugins/Utils.pas/mirutils.pas +++ b/plugins/Utils.pas/mirutils.pas @@ -285,19 +285,11 @@ begin exit; FillChar(ppdu,SizeOf(TPOPUPDATAW),0); - if CallService(MS_POPUP_ISSECONDLINESHOWN,0,0)<>0 then - begin - StrCopyW(ppdu.lpwzText,text,MAX_SECONDLINE-1); - if title<>nil then - StrCopyW(ppdu.lpwzContactName,title,MAX_CONTACTNAME-1) - else - ppdu.lpwzContactName[0]:=' '; - end + StrCopyW(ppdu.lpwzText,text,MAX_SECONDLINE-1); + if title<>nil then + StrCopyW(ppdu.lpwzContactName,title,MAX_CONTACTNAME-1) else - begin - StrCopyW(ppdu.lpwzContactName,text,MAX_CONTACTNAME-1); - ppdu.lpwzText[0]:=' '; - end; + ppdu.lpwzContactName[0]:=' '; CallService(MS_POPUP_ADDPOPUPW,wparam(@ppdu),APF_NO_HISTORY); end; diff --git a/plugins/Utils.pas/wrapper.pas b/plugins/Utils.pas/wrapper.pas index 5976df78fa..9e9e8b4b78 100644 --- a/plugins/Utils.pas/wrapper.pas +++ b/plugins/Utils.pas/wrapper.pas @@ -536,7 +536,7 @@ end; procedure GetUnitSize(wnd:HWND; var baseUnitX, baseUnitY: integer); var - DC :HDC; + dc :HDC; hfo :HFONT; tm :TTEXTMETRIC; size:TSIZE; -- cgit v1.2.3