summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-12 21:28:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-12 21:28:12 +0000
commit91eb23f044911477f615e7e25e1425b667c3f1fa (patch)
tree783ff1dbb6ef98f9a7a7979bff8f9383caee9aa4
parent627687a2d798a8fa4ecbe4578c75d93bf97f6da5 (diff)
pascal sources sync
git-svn-id: http://svn.miranda-ng.org/main/trunk@4435 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/delphi/m_clist.inc1
-rw-r--r--include/delphi/m_core.inc26
-rw-r--r--include/delphi/m_database.inc17
-rw-r--r--include/delphi/m_helpers.inc56
-rw-r--r--include/delphi/m_idle.inc41
-rw-r--r--include/delphi/m_message.inc54
-rw-r--r--include/delphi/m_popup.inc6
-rw-r--r--include/delphi/m_skin.inc17
-rw-r--r--include/delphi/m_xml.inc32
-rw-r--r--plugins/Actman/ua/i_uaplaces.inc12
-rw-r--r--plugins/ExternalAPI/delphi/m_userinfoex.inc2
-rw-r--r--plugins/QuickSearch/qs.rc3
-rw-r--r--plugins/QuickSearch/quicksearch.dpr7
-rw-r--r--plugins/QuickSearch/sr_window.pas10
-rw-r--r--plugins/Utils.pas/common.pas90
-rw-r--r--plugins/Utils.pas/mApiCardM.pas2
-rw-r--r--plugins/Watrack/i_gui.inc18
-rw-r--r--plugins/Watrack/players/pl_mradio.pas26
-rw-r--r--plugins/Watrack/proto/i_proto_dlg.inc10
-rw-r--r--plugins/Watrack/proto/proto.pas15
-rw-r--r--plugins/mRadio/i_frameapi.inc4
-rw-r--r--plugins/mRadio/i_hotkey.inc1
-rw-r--r--plugins/mRadio/i_myservice.inc26
-rw-r--r--plugins/mRadio/i_optdlg.inc12
-rw-r--r--plugins/mRadio/i_tray.inc34
-rw-r--r--plugins/mRadio/mradio.dpr17
-rw-r--r--plugins/mRadio/mradio.rc3
-rw-r--r--plugins/mRadio/variants.pas5
28 files changed, 336 insertions, 211 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index 5fe6680289..ac6c1746e2 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -89,7 +89,6 @@ const
CMIF_ROOTHANDLE = 384; // means that hParentMenu member is set (since 0.8#26)
CMIF_UNICODE = 512; // will return TCHAR* instead of AnsiChar*
CMIF_KEEPUNTRANSLATED = 1024; // don't translate a menu item
- CMIF_ICONFROMICOLIB = 2048; // use icolibName instead of hIcon
CMIF_DEFAULT = 4096; // this menu item is the default one
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc
index 7daa189ceb..773b93a11c 100644
--- a/include/delphi/m_core.inc
+++ b/include/delphi/m_core.inc
@@ -164,12 +164,11 @@ function db_set_utf(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:
function db_set_blob(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
external CoreDLL name 'db_set_blob';
-// Aliases
+// deprecated Aliases
function DBFreeVariant(dbv:PDBVARIANT):int_ptr; stdcall;
external CoreDLL name 'db_free';
function DBDeleteContactSetting(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar):int_ptr; stdcall;
external CoreDLL name 'db_unset';
-
function DBGetContactSettingByte(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
external CoreDLL name 'db_get_b';
function DBGetContactSettingWord(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; errorValue:int):int; stdcall;
@@ -200,7 +199,6 @@ function DBWriteContactSettingUTF8String(hContact:THANDLE; const szModule:pAnsiC
function DBWriteContactSettingBlob(hContact:THANDLE; const szModule:pAnsiChar; const szSetting:pAnsiChar; val:pointer; len:uint):int_ptr; stdcall;
external CoreDLL name 'db_set_blob';
-
///////////////////////////////////////////////////////////////////////////////
// events, hooks & services
@@ -213,16 +211,16 @@ type
TMIRANDAHOOKOBJ = function(ptr:pointer;wParam:WPARAM;lParam:LPARAM): int; cdecl;
TMIRANDAHOOKOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1: LPARAM): int; cdecl;
- TMIRANDASERVICE = function(wParam: WPARAM; lParam: LPARAM): uint_ptr; cdecl;
- TMIRANDASERVICEPARAM = function(wParam:WPARAM;lParam,lParam1:LPARAM):uint_ptr; cdecl;
- TMIRANDASERVICEOBJ = function(ptr:pointer;wParam,lParam:LPARAM):uint_ptr; cdecl;
- TMIRANDASERVICEOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1:LPARAM):uint_ptr; cdecl;
+ TMIRANDASERVICE = function(wParam: WPARAM; lParam: LPARAM): int_ptr; cdecl;
+ TMIRANDASERVICEPARAM = function(wParam:WPARAM;lParam,lParam1:LPARAM):int_ptr; cdecl;
+ TMIRANDASERVICEOBJ = function(ptr:pointer;wParam,lParam:LPARAM):int_ptr; cdecl;
+ TMIRANDASERVICEOBJPARAM = function(ptr:pointer;wParam:WPARAM;lParam,lParam1:LPARAM):int_ptr; cdecl;
const
{$IFDEF WIN64}
- CALLSERVICE_NOTFOUND = uint_ptr($8000000000000000);
+ CALLSERVICE_NOTFOUND = int_ptr($8000000000000000);
{$ELSE}
- CALLSERVICE_NOTFOUND = uint_ptr($80000000);
+ CALLSERVICE_NOTFOUND = int_ptr($80000000);
{$ENDIF}
function CreateHookableEvent(const name: PAnsiChar): THANDLE; stdcall;
@@ -268,9 +266,9 @@ function DestroyServiceFunction(hService:THANDLE):int; stdcall;
function ServiceExists(const name:PAnsiChar):int; stdcall;
external CoreDLL name 'ServiceExists';
-function CallService(const name:PAnsiChar; wParam:WPARAM; lParam:LPARAM):uint_ptr; stdcall;
+function CallService(const name:PAnsiChar; wParam:WPARAM; lParam:LPARAM):int_ptr; stdcall;
external CoreDLL name 'CallService';
-function CallServiceSync(const name:PAnsiChar; wParam:WPARAM; lParam:LPARAM):uint_ptr; stdcall;
+function CallServiceSync(const name:PAnsiChar; wParam:WPARAM; lParam:LPARAM):int_ptr; stdcall;
external CoreDLL name 'CallServiceSync';
function CallFunctionAsync(ptr1,ptr2:pointer):int; stdcall;
@@ -280,16 +278,16 @@ procedure KillModuleServices(hInst:HINST); stdcall;
procedure KillObjectServices(var ptr); stdcall;
external CoreDLL name 'KillObjectServices';
-function CallContactService(hContact:THANDLE;const name:PAnsiChar;wParam:WPARAM;lParam:LPARAM):uint_ptr; cdecl;
+function CallContactService(hContact:THANDLE;const name:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
external CoreDLL name 'CallContactService';
-function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wParam:WPARAM;lParam:LPARAM):uint_ptr; cdecl;
+function CallProtoService(const szModule:PAnsiChar;const szService:PAnsiChar;wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
external CoreDLL name 'CallProtoService';
///////////////////////////////////////////////////////////////////////////////
// http
// returned result must be freed using mir_free()
-function mir_urlEncode(url:pAnsiChar):pAnsiChar; stdcall;
+function mir_urlEncode(url:pAnsiChar): pAnsiChar; stdcall;
external CoreDLL name 'mir_urlEncode';
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc
index 0cb6eeacb4..eda633e728 100644
--- a/include/delphi/m_database.inc
+++ b/include/delphi/m_database.inc
@@ -253,14 +253,14 @@ Always returns 0.
type
PDBEVENTTYPEDESCR = ^TDBEVENTTYPEDESCR;
TDBEVENTTYPEDESCR = record
- cbSize :int; // structure size in bytes
- module :PAnsiChar; // event module name
- eventType :int; // event id, unique for this module
- descr :PAnsiChar; // event type description (i.e. "File Transfer")
- textService:PAnsiChar; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID)
- iconService:PAnsiChar; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID)
- eventIcon :THANDLE; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID)
- flags :DWORD; // flags, combination of the DETF_*
+ cbSize :int; // structure size in bytes
+ module :PAnsiChar; // event module name
+ eventType :int; // event id, unique for this module (actually, word size)
+ descr :PAnsiChar; // event type description (i.e. "File Transfer")
+ textService:PAnsiChar; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID)
+ iconService:PAnsiChar; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID)
+ eventIcon :THANDLE; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID)
+ flags :DWORD; // flags, combination of the DETF_*
end;
const
@@ -315,7 +315,6 @@ const
modules are free to define their own, beginning at 2000
DBEVENTINFO.timestamp is in GMT, as returned by time()
}
-
const
MS_DB_EVENT_ADD:PAnsiChar = 'DB/Event/Add';
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc
index b7dcd80bdd..345bcc107a 100644
--- a/include/delphi/m_helpers.inc
+++ b/include/delphi/m_helpers.inc
@@ -43,7 +43,16 @@ function Langpack_Register:int_ptr;
function ProtoBroadcastAck(const szModule: PAnsiChar; hContact: THandle; type_: int; result_: int; hProcess: THandle; lParam: LPARAM): int_ptr;
function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr;
-function LoadSkinnedIcon(id: int): THandle;
+function Srmm_AddIcon (sid: PStatusIconData):int_ptr;
+procedure Srmm_RemoveIcon(sid: PStatusIconData);
+procedure Srmm_ModifyIcon(hContact:THANDLE; sid:PStatusIconData);
+function Srmm_GetNthIcon(hContact:THANDLE; index:int):pStatusIconData;
+
+function LoadSkinnedIcon (id: int): HICON;
+function LoadSkinnedIconHandle(id: int): THandle;
+function LoadSkinnedIconBig (id: int): HICON;
+function LoadSkinnedIconName (id: int): PAnsiChar;
+
function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr;
function SkinPlaySound (const name: PAnsiChar): int_ptr;
@@ -367,11 +376,52 @@ begin
Result := CreateServiceFunction(szStr, @serviceProc);
end;
+function Srmm_AddIcon(sid: PStatusIconData):int_ptr;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ result:=CallService(MS_MSG_ADDICON, hLangpack, LPARAM(sid));
+end;
+
+procedure Srmm_RemoveIcon(sid: PStatusIconData);
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ CallService(MS_MSG_REMOVEICON, 0, LPARAM(sid));
+end;
+
+procedure Srmm_ModifyIcon(hContact:THANDLE; sid:PStatusIconData);
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ CallService(MS_MSG_GETNTHICON, hContact, LPARAM(sid));
+end;
+
+function Srmm_GetNthIcon(hContact:THANDLE; index:int):PStatusIconData;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ result:=PStatusIconData(CallService(MS_MSG_GETNTHICON, hContact, index));
+end;
+
+function LoadSkinnedIcon(id: int): HICON;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ Result := HICON(CallService(MS_SKIN_LOADICON, id, 0));
+end;
+
+function LoadSkinnedIconHandle(id: int): THandle;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ Result := THANDLE(CallService(MS_SKIN_LOADICON, id, 1));
+end;
+
+function LoadSkinnedIconBig(id: int): HICON;
+ {$IFDEF AllowInline}inline;{$ENDIF}
+begin
+ Result := HICON(CallService(MS_SKIN_LOADICON, id, 2));
+end;
-function LoadSkinnedIcon(id: int): THandle;
+function LoadSkinnedIconName(id: int): PAnsiChar;
{$IFDEF AllowInline}inline;{$ENDIF}
begin
- Result := CallService(MS_SKIN_LOADICON, id, 0);
+ Result := PAnsiChar(CallService(MS_SKIN_LOADICON, id, 3));
end;
function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
diff --git a/include/delphi/m_idle.inc b/include/delphi/m_idle.inc
index f3646fbc40..c8d3203028 100644
--- a/include/delphi/m_idle.inc
+++ b/include/delphi/m_idle.inc
@@ -33,19 +33,19 @@ const
IDF_PRIVACY = $8; // if set, the information provided shouldn't be given to third parties.
const
- {
- wParam: 0
- lParam: IDF_ (or'd field)
- Affect: This event is fired when information about idle changes.
- Note: You will get multiple calls with IDF_ISIDLE set, the first is for short idle
- then long idle, then anytime during you might get IDF_ONFORCE if the screensaver
- or station become locked.
+{
+ wParam: 0
+ lParam: IDF_ (or'd field)
+ Affect: This event is fired when information about idle changes.
+ Note: You will get multiple calls with IDF_ISIDLE set, the first is for short idle
+ then long idle, then anytime during you might get IDF_ONFORCE if the screensaver
+ or station become locked.
- It is up to you to keep state, i.e. once the idle that you care about is reported
- ignore other status notifications with IDF_ISIDLE set until you get one with
- IDF_ISIDLE isn't set.
- Version: 0.3.4a+ (2004/09/16)
- }
+ It is up to you to keep state, i.e. once the idle that you care about is reported
+ ignore other status notifications with IDF_ISIDLE set until you get one with
+ IDF_ISIDLE isn't set.
+ Version: 0.3.4a+ (2004/09/16)
+}
ME_IDLE_CHANGED:PAnsiChar = 'Miranda/Idle/Changed';
type
@@ -59,14 +59,15 @@ type
idleType : int;
idlesoundsoff: int;
end;
- {
- wParam; 0
- lParam: address of MIRANDA_IDLE_INFO
- Affect: Return information about current idle settings, like short/long idle time in mins
- and if the user wants that info kept private, etc
- Returns: zero on success, non zero on failure
- Version: 0.3.4 (2004/09/16)
- }
+
+{
+ wParam; 0
+ lParam: address of MIRANDA_IDLE_INFO
+ Affect: Return information about current idle settings, like short/long idle time in mins
+ and if the user wants that info kept private, etc
+ Returns: zero on success, non zero on failure
+ Version: 0.3.4 (2004/09/16)
+}
const
MS_IDLE_GETIDLEINFO:PAnsiChar = 'Miranda/Idle/GetInfo';
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc
index 5e25657de8..a89204f1b0 100644
--- a/include/delphi/m_message.inc
+++ b/include/delphi/m_message.inc
@@ -70,18 +70,18 @@ type
end;
const
- MS_MSG_GETWINDOWAPI:PAnsiChar = 'MessageAPI/WindowAPI';
{ wparam=0
lparam=0
Returns a dword with the current message api version
Current version is 0,0,0,4
}
+ MS_MSG_GETWINDOWAPI:PAnsiChar = 'MessageAPI/WindowAPI';
- MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
{ wparam=(AnsiChar*)szBuf
lparam=(int)cbSize size of buffer
Sets the window class name in wParam (ex. "SRMM" for srmm.dll)
}
+ MS_MSG_GETWINDOWCLASS:PAnsiChar = 'MessageAPI/WindowClass';
type
PMessageWindowInputData = ^TMessageWindowInputData;
@@ -113,20 +113,21 @@ type
TMessageWindowData = TMessageWindowOutputData;
const
- MS_MSG_GETWINDOWDATA:PAnsiChar = 'MessageAPI/GetWindowData';
{ wparam=(MessageWindowInputData*)
lparam=(MessageWindowOutputData*)
returns 0 on success and returns non-zero (1) on error or if no window data
exists for that hcontact
}
+ MS_MSG_GETWINDOWDATA:PAnsiChar = 'MessageAPI/GetWindowData';
- ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
{ wParam = 0
lParam = (MessageWindowPopupData *)&MessageWindowPopupData;
Fired to allow plugins to add itens to the msg window popup menu
Always fired twice: once with MSG_WINDOWPOPUP_SHOWING and once with MSG_WINDOWPOPUP_SELECTED.
This is done to allow cleaning of resources.
}
+ ME_MSG_WINDOWPOPUP:PAnsiChar = 'MessageAPI/WindowPopupRequested';
+
MSG_WINDOWPOPUP_SHOWING = 1;
MSG_WINDOWPOPUP_SELECTED = 2;
@@ -145,20 +146,22 @@ type
selection:int; // The menu control id or 0 if no one was selected
end;
-// status icons - HICONs will be automatically destroyed when removed or when miranda exits
+// status icons
const
MBF_DISABLED = 1;
MBF_HIDDEN = 2;
+ MBF_UNICODE = 4;
type
- StatusIconData = record
- cbSize :int;
+ pStatusIconData = ^tStatusIconData;
+ tStatusIconData = record
+ cbSize :int; // must be equal to sizeof(StatusIconData)
szModule :PAnsiChar; // used in combo with the dwId below to create a unique identifier
- dwId :DWORD;
+ dwId :DWORD; // uniquely defines a button inside a module
hIcon,
hIconDisabled:HICON; // hIconDisabled is optional - if null, will use hIcon in the disabled state
flags :int; // one of MBF_* above
- szTooltip :PAnsiChar;
+ szTooltip :TChar; // controlled by MBF_UNICODE
end;
const
@@ -166,7 +169,8 @@ const
// otherwize it was a left click
type
- StatusIconClickData = record
+ pStatusIconClickData = ^tStatusIconClickData;
+ tStatusIconClickData = record
cbSize :int;
clickLocation:TPOINT; // click location, in screen coordinates
szModule :PAnsiChar;
@@ -175,16 +179,27 @@ type
end;
const
+{
+ wParam = hLangpack
+ lParam = (StatusIconData *)&StatusIconData
+}
MS_MSG_ADDICON:PAnsiChar = 'MessageAPI/AddIcon';
-// lParam = (StatusIconData *)&StatusIconData
+{
+ wParam = 0
+ lParam = (StatusIconData *)&StatusIconData
+ only szModule and szId are used
+}
MS_MSG_REMOVEICON:PAnsiChar = 'MessageAPI/RemoveIcon';
+
{
- lParam = (StatusIconData *)&StatusIconData
- only szModule and szId are used
+ wParam = (HANDLE)hContact
+ lParam = (int)zero-based index of a visible icon
+ returns (StatusIconData*)icon description filled for the required contact
+ don't free this memory.
}
+ MS_MSG_GETNTHICON:PAnsiChar = 'MessageAPI/GetNthIcon';
- MS_MSG_MODIFYICON:PAnsiChar = 'MessageAPI/ModifyIcon';
{
wParam = (HANDLE)hContact
lParam = (StatusIconData *)&StatusIconData
@@ -192,11 +207,20 @@ const
otherwise, only the flags field is valid
if either hIcon, hIconDisabled or szTooltip is null, they will not be modified
}
+ MS_MSG_MODIFYICON:PAnsiChar = 'MessageAPI/ModifyIcon';
- ME_MSG_ICONPRESSED:PAnsiChar = 'MessageAPI/IconPressed';
{
wParam = (HANDLE)hContact;
lParam = (StatusIconClickData *)&StatusIconClickData;
catch to show a popup menu, etc.
}
+ ME_MSG_ICONPRESSED:PAnsiChar = 'MessageAPI/IconPressed';
+
+{
+ wParam = (HANDLE)hContact;
+ lParam = (StatusIconkData*)pIcon
+ catch to be notified about the icon list's change.
+}
+ ME_MSG_ICONSCHANGED:PAnsiChar = 'MessageAPI/IconsChanged';
+
{$ENDIF}
diff --git a/include/delphi/m_popup.inc b/include/delphi/m_popup.inc
index 4e870963f4..9ec0df58d5 100644
--- a/include/delphi/m_popup.inc
+++ b/include/delphi/m_popup.inc
@@ -162,8 +162,8 @@ You may pass additional creation flags via lParam:
APF_NO_POPUP = 8;
APF_NEWDATA = $10;
- MS_POPUP_ADDPOPUPW :PAnsiChar = 'PopUp/AddPopUpW';
- MS_POPUP_ADDPOPUP :PAnsiChar = 'PopUp/AddPopUpEx';
+ MS_POPUP_ADDPOPUPW:PAnsiChar = 'PopUp/AddPopUpW';
+ MS_POPUP_ADDPOPUP :PAnsiChar = 'PopUp/AddPopUpEx';
{
Returns the handle to the contact associated to the specified PopUpWindow.
@@ -234,7 +234,6 @@ You may pass additional creation flags via lParam:
returns: > 0 for success, -1 for failure, 0 if the failure is due to second line not being shown. (but you could call PUIsSecondLineShown() before changing the text...)
Changes the text displayed in the second line of the popup.
}
-
MS_POPUP_CHANGETEXTW:PAnsiChar = 'PopUp/ChangetextW';
{
@@ -242,7 +241,6 @@ You may pass additional creation flags via lParam:
lParam = (LPARAM)(POPUPDATAEX*)newData
Changes the entire popup
}
-
MS_POPUP_CHANGEW:PAnsiChar = 'PopUp/ChangeW';
{
diff --git a/include/delphi/m_skin.inc b/include/delphi/m_skin.inc
index 9163305fce..342a8045ce 100644
--- a/include/delphi/m_skin.inc
+++ b/include/delphi/m_skin.inc
@@ -120,13 +120,15 @@ type
const
{
- wParam : ICON_ID or handle
- lParam : 0 if ICON_ID, else 1
+ wParam : ICON_ID
+ lParam : 0 - return HICON
+ 1 - return icolib handle
+ 2 - return big icon HICON
+ 3 - return icolib icon name
Affect : Load an icon from the user's custom skin lib, or from the exe
if there isn't one loaded, see notes
Return : HICON for the new icon, do *not* DestroyIcon() the return value
- returns NULL(0) if ICON_ID is invalid, but always success for a
- valid ID.
+ returns NULL(0) if ICON_ID is invalid, but always success for a valid ID.
}
MS_SKIN_LOADICON:PAnsiChar = 'Skin/Icons/Load';
@@ -155,15 +157,16 @@ const
wParam : 0
lParam : Pointer to a null terminated string containing the name of the
sound to play
- Affect : play a named sound event, play name should of been added
+ Affect : plays a named sound event, play name should of been added
with MS_SKIN_ADDNEWSOUND, see notes
Notes : function will not fail, it will play the Windows
}
MS_SKIN_PLAYSOUND:PAnsiChar = 'Skin/Sounds/Play';
{
- wParam : 0
- lParam : PWideChar containing the name of the file to play
+ wParam = 0
+ lParam = (WideChar *) ptszFileName
+ Affect: plays any sound file
}
MS_SKIN_PLAYSOUNDFILE:PAnsiChar = 'Skin/Sounds/PlayFile';
diff --git a/include/delphi/m_xml.inc b/include/delphi/m_xml.inc
index a085193eaf..92c18faf04 100644
--- a/include/delphi/m_xml.inc
+++ b/include/delphi/m_xml.inc
@@ -34,6 +34,32 @@ type
XML_ELEM_TYPE_CHILD,XML_ELEM_TYPE_ATTRIBUTE,
XML_ELEM_TYPE_TEXT ,XML_ELEM_TYPE_CLEAR);
+/// Enumeration for XML parse errors.
+type
+ XMLError = (
+ eXMLErrorNone,
+ eXMLErrorMissingEndTag,
+ eXMLErrorNoXMLTagFound,
+ eXMLErrorEmpty,
+ eXMLErrorMissingTagName,
+ eXMLErrorMissingEndTagName,
+ eXMLErrorUnmatchedEndTag,
+ eXMLErrorUnmatchedEndClearTag,
+ eXMLErrorUnexpectedToken,
+ eXMLErrorNoElements,
+ eXMLErrorFileNotFound,
+ eXMLErrorFirstTagNotFound,
+ eXMLErrorUnknownCharacterEntity,
+ eXMLErrorCharacterCodeAbove255,
+ eXMLErrorCharConversionError,
+ eXMLErrorCannotOpenWriteFile,
+ eXMLErrorCannotWriteFile,
+
+ eXMLErrorBase64DataSizeIsNotMultipleOf4,
+ eXMLErrorBase64DecodeIllegalCharacter,
+ eXMLErrorBase64DecodeTruncatedData,
+ eXMLErrorBase64DecodeBufferTooSmall);
+
const
XML_API_SIZEOF_V1 = SizeOf(size_t)+26*sizeof(dword);
@@ -115,6 +141,9 @@ type
positionOfChildByName :function(node:HXML; name:PAnsiChar; i:int):XML_ELEMENT_POS;cdecl;
positionOfText :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
positionOfClear :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
+
+ parseFile:function(filename:PAnsiChar; datalen:pint; tag:PAnsiChar):HXML;
+ toFile :function(node:HXML; filename:PAnsiChar; withformattiing:int):XMLError;
end;
XML_API_W = record
@@ -194,6 +223,9 @@ type
positionOfChildByName :function(node:HXML; name:PWideChar; i:int):XML_ELEMENT_POS;cdecl;
positionOfText :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
positionOfClear :function(node:HXML; i:int):XML_ELEMENT_POS;cdecl;
+
+ parseFile:function(filename:PAnsiChar; datalen:pint; tag:PAnsiChar):HXML;
+ toFile :function(node:HXML; filename:PAnsiChar; withformattiing:int):XMLError;
end;
// every protocol should declare this variable to use the XML API
diff --git a/plugins/Actman/ua/i_uaplaces.inc b/plugins/Actman/ua/i_uaplaces.inc
index 1d923e25a3..9ee2a79b0c 100644
--- a/plugins/Actman/ua/i_uaplaces.inc
+++ b/plugins/Actman/ua/i_uaplaces.inc
@@ -380,7 +380,7 @@ begin
begin
FillChar(clmi,SizeOf(clmi),0);
clmi.cbSize:=SizeOf(clmi);
- clmi.flags :=CMIF_UNICODE or CMIF_ICONFROMICOLIB;
+ clmi.flags :=CMIF_UNICODE;
if (UAMenuItem.szMenuPopup<>nil) and (UAMenuItem.szMenuPopup^<>#0) then
clmi.szName.w:=ParseVarString(UAMenuItem.szMenuPopup)
@@ -417,7 +417,7 @@ begin
{}{}
FillChar(clmi,SizeOf(clmi),0);
clmi.cbSize:=SizeOf(clmi);
- clmi.flags:=CMIF_UNICODE or CMIF_ICONFROMICOLIB;
+ clmi.flags:=CMIF_UNICODE;
if (ActionItem.flags and (UAF_2STATE+UAF_PRESSED))<>(UAF_2STATE+UAF_PRESSED) then
begin
clmi.hIcon:=ActionItem.hIcolibIcon;
@@ -426,7 +426,7 @@ begin
else
begin
clmi.hIcon:=ActionItem.hIcolibIconPressed;
- clmi.flags:=CMIF_UNICODE or CMIF_ICONFROMICOLIB or CMIF_CHECKED;
+ clmi.flags:=CMIF_UNICODE or CMIF_CHECKED;
extra:='1';
end;
@@ -504,7 +504,7 @@ begin
if (mi.flags and CMIF_HIDDEN)=0 then
begin
//!!!! icon (check for contact menu)
- mi.flags:=mi.flags or CMIM_ICON or CMIM_FLAGS or CMIF_ICONFROMICOLIB;
+ mi.flags:=mi.flags or CMIM_ICON or CMIM_FLAGS;
if (mtype=contact_menu) and IsLocalItem(UActionList[i]) then
begin
@@ -625,8 +625,8 @@ begin
if ActionItem.szTTBTooltip =nil then
pc1:=pc
else pc1:=ActionItem.szTTBTooltip;
-
- if ((ActionItem.flags and UAF_2STATE)=0) or
+
+ if ((ActionItem.flags and UAF_2STATE)=0) or
(ActionItem.szTTBTooltipPressed=nil) then
pc2:=pc1
else
diff --git a/plugins/ExternalAPI/delphi/m_userinfoex.inc b/plugins/ExternalAPI/delphi/m_userinfoex.inc
index b4aff7e7e8..819cbc9ca9 100644
--- a/plugins/ExternalAPI/delphi/m_userinfoex.inc
+++ b/plugins/ExternalAPI/delphi/m_userinfoex.inc
@@ -242,8 +242,6 @@ lParam = not used
MBS_FLAT = $00004000; // flat button
MBS_DOWNARROW = $00008000; // has arrow on the right
- MBF_UNICODE = 1;
-
// BUTTONADDTOOLTIP
// use lParam=MBF_UNICODE to set unicode tooltips
// for lParam=0 the string is interpreted as ansi
diff --git a/plugins/QuickSearch/qs.rc b/plugins/QuickSearch/qs.rc
index 0f4e27d46a..b42780e902 100644
--- a/plugins/QuickSearch/qs.rc
+++ b/plugins/QuickSearch/qs.rc
@@ -147,7 +147,7 @@ FONT 8, "Ms Shell Dlg",0,0
CCS_BOTTOM | 0x0900, // SBT_TOOLTIPS | SBARS_SIZEGRIP
0,226,520,14
}
-
+/*
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,4,1,18
PRODUCTVERSION 0,8,0,0
@@ -176,3 +176,4 @@ BEGIN
VALUE "Translation",0,1200
END
END
+*/ \ No newline at end of file
diff --git a/plugins/QuickSearch/quicksearch.dpr b/plugins/QuickSearch/quicksearch.dpr
index 856f3376d3..cd200ff6b5 100644
--- a/plugins/QuickSearch/quicksearch.dpr
+++ b/plugins/QuickSearch/quicksearch.dpr
@@ -45,7 +45,7 @@ begin
'users version of miranda,group or city.';
PluginInfo.author :='Awkward, based on Bethoven sources';
PluginInfo.authorEmail:='panda75@bk.ru; awk1975@ya.ru';
- PluginInfo.copyright :='(c) 2004,2005 Bethoven; 2006-2012 Awkward';
+ PluginInfo.copyright :='(c) 2004,2005 Bethoven; 2006-2013 Awkward';
PluginInfo.homepage :='http://code.google.com/p/delphi-miranda-plugins/';
PluginInfo.flags :=UNICODE_AWARE;
PluginInfo.uuid :=MIID_QUICKSEARCH;
@@ -164,7 +164,7 @@ begin
odp.hInstance :=hInstance;
odp.pszTemplate:=PAnsiChar(IDD_DIALOG1);
odp.szTitle.a :=qs_name;
- odp.szGroup.a :='Contact List';
+ odp.szGroup.a :='Contacts';
odp.pfnDlgProc :=@sr_optdialog.DlgProcOptions;
odp.flags :=ODPF_BOLDGROUPS;
Options_AddPage(wParam,@odp);
@@ -240,7 +240,6 @@ exports
Load, Unload,
MirandaPluginInfoEx;
-initialization
+begin
DisableThreadLibraryCalls(hInstance);
-
end.
diff --git a/plugins/QuickSearch/sr_window.pas b/plugins/QuickSearch/sr_window.pas
index 97624173ba..de9ba1b634 100644
--- a/plugins/QuickSearch/sr_window.pas
+++ b/plugins/QuickSearch/sr_window.pas
@@ -526,7 +526,7 @@ begin
ST_SERVICE: begin
if wparam._type=ptCurrent then wparam.n:=hContact;
if lparam._type=ptCurrent then lparam.n:=hContact;
- tmp:=CallService(protov,wparam.n,lparam.n);
+ tmp:=uint_ptr(CallService(protov,wparam.n,lparam.n));
if tmp=CALLSERVICE_NOTFOUND then exit;
case setting_cnftype of
ptString: begin
@@ -619,7 +619,7 @@ begin
end;
ST_LASTEVENT: begin
- hDbEvent := db_event_last(hContact);
+ hDbEvent:=db_event_last(hContact);
if hDbEvent<>0 then
begin
ZeroMemory(@dbei,sizeof(dbei));
@@ -1190,14 +1190,14 @@ begin
// filling buffer
LastMeta:=0;
cnt1:=0;
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact:=db_find_first();
while hContact<>0 do
begin
//!! check account
AddContact(cnt1,hContact);
inc(cnt1);
if cnt1=cnt then break; // additional checking
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
+ hContact:=db_find_next(hContact);
end;
if cnt1<>cnt then
begin
@@ -1949,7 +1949,7 @@ begin
FastWideToAnsiBuf(MainBuf[i,sub].text,buf);
// ListView_GetItemTextA(grid,lplvcd^.nmcd.dwItemSpec,lplvcd^.iSubItem,buf,SizeOf(buf));
-//
+//!!
if (buf[0]<>#0) and (ServiceExists(MS_FP_GETCLIENTICON)<>0) then
begin
h:=CallService(MS_FP_GETCLIENTICON,tlparam(@buf),0);
diff --git a/plugins/Utils.pas/common.pas b/plugins/Utils.pas/common.pas
index cd321cbcb7..d36ecad588 100644
--- a/plugins/Utils.pas/common.pas
+++ b/plugins/Utils.pas/common.pas
@@ -90,6 +90,8 @@ procedure mFreeMem(var ptr);
function mReallocMem(var dst; size:integer):pointer;
// String processing
+function FormatStrW(fmt:pWideChar; arr:array of pWideChar):pWideChar;
+
function WideToCombo(src:PWideChar;var dst;cp:integer=CP_ACP):integer;
function ChangeUnicode(str:PWideChar):PWideChar;
@@ -124,8 +126,8 @@ function StrReplace (src,SubStr,NewStr:PAnsiChar):PAnsiChar;
function StrReplaceW(src,SubStr,NewStr:pWideChar):PWideChar;
function CharReplace (dst:pAnsiChar;old,new:AnsiChar):PAnsiChar;
function CharReplaceW(dst:pWideChar;old,new:WideChar):PWideChar;
-function StrCmp (a,b:PAnsiChar;n:cardinal=0):integer;
-function StrCmpW(a,b:PWideChar;n:cardinal=0):integer;
+function StrCmp (a,b:PAnsiChar;n:integer=0):integer;
+function StrCmpW(a,b:PWideChar;n:integer=0):integer;
function StrEnd (const a:PAnsiChar):PAnsiChar;
function StrEndW(const a:PWideChar):PWideChar;
function StrScan (src:PAnsiChar;c:AnsiChar):PAnsiChar;
@@ -904,6 +906,8 @@ begin
result:=dst;
end;
+//----- Memory work -----
+
procedure FillWord(var buf;count:cardinal;value:word); register;
{$IFNDEF WIN64}assembler;
{
@@ -968,6 +972,7 @@ asm
POP ESI
end;
}
+
{$IFNDEF WIN64}
// Delphi 2009 realization
function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; assembler;
@@ -1035,10 +1040,6 @@ asm
end;
{$ELSE}
function CompareMem(P1, P2: Pointer; Length: Integer): Boolean;
- {$IFNDEF COMPILER_16_UP}
-begin
- result:=CompareByte(P1,P2,Length)=0;
- {$ELSE}
var
i:integer;
begin
@@ -1053,26 +1054,9 @@ begin
inc(pbyte(p2));
end;
result:=true;
- {$ENDIF}
end;
{$ENDIF}
-function Min(a,b:integer):integer;
-begin
- if a>b then
- result:=b
- else
- result:=a;
-end;
-
-function Max(a,b:integer):integer;
-begin
- if a<b then
- result:=b
- else
- result:=a;
-end;
-
function mGetMem(var dst;size:integer):pointer;
begin
{$IFDEF Use_MMI}
@@ -1106,6 +1090,22 @@ begin
result:=pointer(dst);
end;
+function Min(a,b:integer):integer;
+begin
+ if a>b then
+ result:=b
+ else
+ result:=a;
+end;
+
+function Max(a,b:integer):integer;
+begin
+ if a<b then
+ result:=b
+ else
+ result:=a;
+end;
+
function UnEscape(buf:PAnsiChar):PAnsiChar;
begin
if (buf<>nil) and (buf^<>#0) then
@@ -1198,6 +1198,46 @@ begin
end;
end;
+function FormatStrW(fmt:pWideChar; arr:array of pWideChar):pWideChar;
+var
+ i,len:integer;
+ pc:pWideChar;
+ number:integer;
+begin
+ result:=nil;
+ if (fmt=nil) or (fmt^=#0) then
+ exit;
+
+ // calculate length
+ len:=StrLenW(fmt); // -2*Length(arr)
+ for i:=0 to HIGH(arr) do
+ inc(len,StrLenW(arr[i]));
+
+ // format
+ mGetMem(result,(len+1)*SizeOf(WideChar));
+ pc:=result;
+ number:=0;
+ while fmt^<>#0 do
+ begin
+ if (fmt^='%') and ((fmt+1)^='s') then
+ begin
+ if number<=HIGH(arr) then
+ begin
+ pc:=StrCopyEW(pc,arr[number]);
+ inc(number);
+ end;
+ inc(fmt,2);
+ end
+ else
+ begin
+ pc^:=fmt^;
+ inc(pc);
+ inc(fmt);
+ end;
+ end;
+ pc^:=#0;
+end;
+
// ----- base string functions -----
function StrDup(var dst:PAnsiChar;src:PAnsiChar;len:cardinal=0):PAnsiChar;
var
@@ -1510,7 +1550,7 @@ begin
end;
end;
-function StrCmp(a,b:PAnsiChar;n:cardinal=0):integer; // CompareString
+function StrCmp(a,b:PAnsiChar;n:integer=0):integer; // CompareString
begin
result:=0;
if (a=nil) and (b=nil) then
@@ -1530,7 +1570,7 @@ begin
until n=0;
end;
-function StrCmpW(a,b:PWideChar;n:cardinal=0):integer;
+function StrCmpW(a,b:PWideChar;n:integer=0):integer;
begin
result:=0;
if (a=nil) and (b=nil) then
diff --git a/plugins/Utils.pas/mApiCardM.pas b/plugins/Utils.pas/mApiCardM.pas
index 6002ee2dbc..41ce4e2aa3 100644
--- a/plugins/Utils.pas/mApiCardM.pas
+++ b/plugins/Utils.pas/mApiCardM.pas
@@ -384,7 +384,7 @@ begin
title:='Miranda event help';
note :='';
end;
- SendMessageW(HelpWindow,WM_SETTEXT,0,LPARAM(title));
+ SendMessageW(HelpWindow,WM_SETTEXT,0,LPARAM(TranslateW(title)));
SendMessageW(GetDlgItem(HelpWindow,IDC_HLP_NOTE),WM_SETTEXT,0,LPARAM(TranslateW(Note)));
end;
diff --git a/plugins/Watrack/i_gui.inc b/plugins/Watrack/i_gui.inc
index 2ed5411bed..ad697d6fa5 100644
--- a/plugins/Watrack/i_gui.inc
+++ b/plugins/Watrack/i_gui.inc
@@ -25,7 +25,7 @@ begin
ttbState:=0
else
CallService(MS_TTB_SETBUTTONOPTIONS,(ttbState shl 16)+TTBO_TIPNAME,
- tlparam(Translate('Disable Plugin')));
+ tlparam(Translate('Disable WATrack')));
result:=0;
end;
@@ -38,7 +38,7 @@ begin
mi.szPopupName.a:=PluginShort;
mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnEnable));
- mi.szName.a :='Disable Plugin';
+ mi.szName.a :='Disable WATrack';
mi.pszService :=MS_WAT_PLUGINSTATUS;
mi.popupPosition:=MenuDisablePos;
hMenuDisable:=Menu_AddMainMenuItem(@mi);
@@ -55,12 +55,12 @@ begin
if f1<>0 then
begin
mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnDisable));
- mi.szName.a:='Enable Plugin';
+ mi.szName.a:='Enable WATrack';
end
else
begin
mi.hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnEnable));
- mi.szName.a:='Disable Plugin';
+ mi.szName.a:='Disable WATrack';
end;
CallService(MS_CLIST_MODIFYMENUITEM,hMenuDisable,lparam(@mi));
@@ -68,12 +68,12 @@ begin
begin
if f1<>0 then
begin
- p:='Enable Plugin';
+ p:='Enable WATrack';
CallService(MS_TTB_SETBUTTONSTATE,ttbState,TTBST_RELEASED)
end
else
begin
- p:='Disable Plugin';
+ p:='Disable WATrack';
CallService(MS_TTB_SETBUTTONSTATE,ttbState,TTBST_PUSHED);
end;
CallService(MS_TTB_SETBUTTONOPTIONS,(ttbState shl 16)+TTBO_TIPNAME,
@@ -97,6 +97,12 @@ begin
// toptoolbar
if ServiceExists(MS_TTB_GETBUTTONOPTIONS)<>0 then
begin
+{
+ CallService(MS_TTB_GETBUTTONOPTIONS,(ttbInfo shl 16)+TTBO_ALLDATA,tlparam(@ttb));
+ ttb.hIconUp:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnInfo));
+ ttb.hIconDn:=ttb.hIconUp;
+ CallService(MS_TTB_SETBUTTONOPTIONS,(ttbInfo shl 16)+TTBO_ALLDATA,tlparam(@ttb));
+}
CallService(MS_TTB_GETBUTTONOPTIONS,(ttbState shl 16)+TTBO_ALLDATA,tlparam(@ttb));
ttb.hIconDn:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnEnable));
ttb.hIconUp:=CallService(MS_SKIN2_GETICON,0,tlparam(IcoBtnDisable));
diff --git a/plugins/Watrack/players/pl_mradio.pas b/plugins/Watrack/players/pl_mradio.pas
index 3d97037fbb..68589eb159 100644
--- a/plugins/Watrack/players/pl_mradio.pas
+++ b/plugins/Watrack/players/pl_mradio.pas
@@ -72,7 +72,7 @@ function Fill:integer;
var
i:integer;
begin
- CurrentStation:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ CurrentStation:=db_find_first(playername);
while CurrentStation<>0 do
begin
i:=DBReadWord(CurrentStation,playername,'Status',WORD(-1));
@@ -81,7 +81,7 @@ begin
result:=1;
exit;
end;
- CurrentStation:=CallService(MS_DB_CONTACT_FINDNEXT,CurrentStation,0);
+ CurrentStation:=db_find_next(CurrentStation,playername);
end;
result:=WAT_RES_NOTFOUND;
end;
@@ -234,9 +234,7 @@ end;
function GetInfo(var SongInfo:tSongInfo;flags:integer):integer;cdecl;
var
- lfile:pWideChar;
isRemote:bool;
- isChanging:bool;
begin
result:=0;
if (flags and WAT_OPT_PLAYERDATA)<>0 then
@@ -259,32 +257,20 @@ begin
end
else
begin
- lfile:=GetFileName(plwnd,flags);
- isRemote:=StrPosW(lfile,'://')<>nil;
- if (prevfile=nil) or isRemote or (StrCmpW(prevfile,lfile)<>0) then
+ isRemote:=StrPosW(mfile,'://')<>nil;
+ if (prevfile=nil) or isRemote or (StrCmpW(prevfile,mfile)<>0) then
begin
ClearTrackInfo(SongInfo,false);
- mfile:=lfile;
mFreeMem(prevfile);
StrDupW(prevfile,mfile);
- isChanging:=true;
- end
- else
- begin
- isChanging:=false;
- mFreeMem(lfile);
- end;
- if not isRemote then
- begin
- if isChanging then
+ if not isRemote then
begin
CallService(MS_WAT_GETFILEINFO,0,lparam(@SongInfo));
fsize:=GetFSize(mfile);
- mFreeMem(prevfile);
- StrDupW(prevfile,mfile);
end;
end;
+
//!!
if kbps =0 then kbps :=GetKbps;
if genre =nil then genre :=GetGenre;
diff --git a/plugins/Watrack/proto/i_proto_dlg.inc b/plugins/Watrack/proto/i_proto_dlg.inc
index 3c467c79ac..ebfd6d31c9 100644
--- a/plugins/Watrack/proto/i_proto_dlg.inc
+++ b/plugins/Watrack/proto/i_proto_dlg.inc
@@ -4,7 +4,7 @@ procedure SetAllContactStat(hwndList:HWND);
var
hContact,hItem:THANDLE;
begin
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact:=db_find_first();
while hContact<>0 do
begin
hItem:=SendMessage(hwndList,CLM_FINDCONTACT,hContact,0);
@@ -13,7 +13,7 @@ begin
SendMessage(hwndList,CLM_SETCHECKMARK,hItem,
DBReadByte(hContact,strCList,ShareOptText,0));
end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
+ hContact:=db_find_next(hContact);
end;
end;
@@ -21,7 +21,7 @@ procedure SaveAllContactStat(hwndList:HWND);
var
hContact,hItem:THANDLE;
begin
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact:=db_find_first();
while hContact<>0 do
begin
hItem:=SendMessage(hwndList,CLM_FINDCONTACT,hContact,0);
@@ -32,7 +32,7 @@ begin
else
DBDeleteSetting(hContact,strCList,ShareOptText);
end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
+ hContact:=db_find_next(hContact);
end;
end;
@@ -100,7 +100,7 @@ begin
cii.cbSize :=SizeOf(cii);
cii.flags :=CLCIIF_GROUPFONT or CLCIIF_CHECKBOX;
cii.pszText.w:=TranslateW('** All contacts **');
- hItemAll:=SendMessage(hList,CLM_ADDINFOITEM,0,dword(@cii));
+ hItemAll:=SendMessage(hList,CLM_ADDINFOITEM,0,tlparam(@cii));
}
SetAllContactStat(hList);
SetHistMask(Dialog);
diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas
index 5ff19c1b25..416a610a31 100644
--- a/plugins/Watrack/proto/proto.pas
+++ b/plugins/Watrack/proto/proto.pas
@@ -185,18 +185,18 @@ begin
WideToAnsi(ss,p,UserCP);
if ccs^.wParam=0 then
begin
- ccs^.lParam:=dword(p);
+ ccs^.lParam:=tlparam(p);
end
else
begin
move(PAnsiChar(ss)^,(PAnsiChar(ss)+StrLen(p)+1)^,
(StrLenW(ss)+1)*SizeOf(WideChar));
StrCopy(PAnsiChar(ss),p);
- ccs^.lParam:=dword(ss);
+ ccs^.lParam:=tlparam(ss);
end;
result:=CallService(MS_PROTO_CHAINSEND,wParam,lParam);
mFreeMem(p);
- ccs^.lParam:=dword(s);
+ ccs^.lParam:=tlparam(s);
mFreeMem(ss);
exit;
end;
@@ -313,7 +313,7 @@ begin
i:=WideToCombo(textpos,encbuf,UserCP);
if (HistMask and hmOutInfo)<>0 then
AddEvent(ccs^.hContact,EVENTTYPE_WAT_MESSAGE,DBEF_SENT,encbuf,i);
-// if CallContactService(ccs^.hContact,PSS_MESSAGEW,PREF_UNICODE,dword(encbuf))=
+// if CallContactService(ccs^.hContact,PSS_MESSAGEW,PREF_UNICODE,tlparam(encbuf))=
// ACKRESULT_FAILED then
CallContactService(ccs^.hContact,PSS_MESSAGE,PREF_UNICODE,tlparam(encbuf));
end;
@@ -409,12 +409,12 @@ procedure RegisterContacts;
var
hContact:integer;
begin
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact:=db_find_first();
while hContact<>0 do
begin
if not IsChat(hContact) then
CallService(MS_PROTO_ADDTOCONTACT,hContact,lparam(PluginShort));
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
+ hContact:=db_find_next(hContact);
end;
end;
@@ -476,7 +476,7 @@ begin
FillChar(mi, sizeof(mi), 0);
mi.cbSize :=sizeof(mi);
mi.szPopupName.a:=PluginShort;
- mi.flags :=CMIF_NOTOFFLINE or CMIF_NOTOFFLIST or CMIF_ICONFROMICOLIB;
+ mi.flags :=CMIF_NOTOFFLINE or CMIF_NOTOFFLIST;
// mi.popupPosition:=MenuUserInfoPos;
mi.hIcon :=Icons.hIcolib;
mi.szName.a :='Get user''s Music Info';
@@ -517,6 +517,7 @@ begin
vproto.Init :=@InitProc;
vproto.DeInit :=@DeInitProc;
vproto.AddOption :=@AddOptionsPage;
+ vproto.Check :=nil;
vproto.ModuleName:='Protocol';
ModuleLink :=@vproto;
end;
diff --git a/plugins/mRadio/i_frameapi.inc b/plugins/mRadio/i_frameapi.inc
index baca5d885f..8f70edbf7a 100644
--- a/plugins/mRadio/i_frameapi.inc
+++ b/plugins/mRadio/i_frameapi.inc
@@ -47,7 +47,7 @@ begin
WM_INITDIALOG: begin
hMuteFrmCtrl:=GetDlgItem(Dialog,IDC_RADIO_MUTE);
SendMessage(hMuteFrmCtrl, BUTTONSETASFLATBTN,0,0);
- SetButtonIcon(hMuteFrmCtrl,IcoBtnOn);
+// SetButtonIcon(hMuteFrmCtrl,IcoBtnOn);
hwndTooltip:=CreateWindowW(TOOLTIPS_CLASS,nil,TTS_ALWAYSTIP,
integer(CW_USEDEFAULT),integer(CW_USEDEFAULT),
@@ -189,7 +189,7 @@ begin
begin
cbSize :=SizeOf(Frame);
hWnd :=FrameWnd;
- hIcon :=0;
+ hIcon :=CallService(MS_SKIN2_GETICON,0,lparam(IcoBtnSettings));
align :=alTop;
height :=tr.bottom-tr.top+2;
Flags :=F_VISIBLE or F_NOBORDER or F_UNICODE;
diff --git a/plugins/mRadio/i_hotkey.inc b/plugins/mRadio/i_hotkey.inc
index 8b165bdc23..44e4910699 100644
--- a/plugins/mRadio/i_hotkey.inc
+++ b/plugins/mRadio/i_hotkey.inc
@@ -65,6 +65,7 @@ begin
CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_PLAYPAUSE));
CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_STOP));
CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_MUTE));
+ CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_RECORD));
DestroyServiceFunction(hRadioHotkey);
end;
diff --git a/plugins/mRadio/i_myservice.inc b/plugins/mRadio/i_myservice.inc
index e4e76ba10f..d938a08d92 100644
--- a/plugins/mRadio/i_myservice.inc
+++ b/plugins/mRadio/i_myservice.inc
@@ -29,25 +29,21 @@ begin
cni.dwFlag:=CNF_DISPLAY or CNF_UNICODE;
cni.szProto :=PluginName;
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact:=db_find_first(PluginName);
while hContact<>0 do
begin
- p:=PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0));
- if (p<>nil) and (StrCmp(p,PluginName)=0) then
+ cni.hContact:=hContact;
+ if CallService(MS_CONTACT_GETCONTACTINFO,0,tlparam(@cni))=0 then
begin
- cni.hContact:=hContact;
- if CallService(MS_CONTACT_GETCONTACTINFO,0,tlparam(@cni))=0 then
- begin
- if lParam=1 then
- i:=StrCmp(pAnsiChar(wParam),cni.retval.szVal.a)
- else
- i:=StrCmpW(pWideChar(wParam),cni.retval.szVal.w);
- mir_free(cni.retval.szVal.w);
- if i=0 then
- break;
- end;
+ if lParam=1 then
+ i:=StrCmp(pAnsiChar(wParam),cni.retval.szVal.a)
+ else
+ i:=StrCmpW(pWideChar(wParam),cni.retval.szVal.w);
+ mir_free(cni.retval.szVal.w);
+ if i=0 then
+ break;
end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
+ hContact:=db_find_next(hContact,PluginName);
end;
end;
diff --git a/plugins/mRadio/i_optdlg.inc b/plugins/mRadio/i_optdlg.inc
index 2b5d66535e..7e72aa5409 100644
--- a/plugins/mRadio/i_optdlg.inc
+++ b/plugins/mRadio/i_optdlg.inc
@@ -126,16 +126,12 @@ begin
end
else
begin
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact:=db_find_first(PluginName);
while hContact<>0 do
begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),
- PluginName)=0 then
- begin
- inc(result);
- ExportRadioContact(result,dst,hContact);
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
+ inc(result);
+ ExportRadioContact(result,dst,hContact);
+ hContact:=db_find_next(hContact,PluginName);
end;
end;
end;
diff --git a/plugins/mRadio/i_tray.inc b/plugins/mRadio/i_tray.inc
index fa63acc720..f0a463c5de 100644
--- a/plugins/mRadio/i_tray.inc
+++ b/plugins/mRadio/i_tray.inc
@@ -49,32 +49,28 @@ begin
// Fill list
FillChar(srch,SizeOf(srch),0);
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact:=db_find_first(PluginName);
while hContact<>0 do
begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),cPluginName)=0 then
+ p:=DBReadUnicode(hContact,strCList,'MyHandle',nil);
+ if p<>nil then
begin
- p:=DBReadUnicode(hContact,strCList,'MyHandle',nil);
- if p<>nil then
+ srch.name:=p;
+ // search in list
+ if List_GetIndex(@trayStations,@srch,@idx)<>0 then
+ // found - set mark
+ pTrayRadioStation(trayStations.Items[idx]).presents:=1
+ else // add if not found
begin
- srch.name:=p;
- // search in list
- if List_GetIndex(@trayStations,@srch,@idx)<>0 then
- // found - set mark
- pTrayRadioStation(trayStations.Items[idx]).presents:=1
- else // add if not found
- begin
- mGetMem(tmp,SizeOf(tTrayRadioStation));
- tmp.name :=p;
- tmp.presents:=2;
- tmp.hContact:=hContact;
- List_InsertPtr(@trayStations,tmp);
- end;
+ mGetMem(tmp,SizeOf(tTrayRadioStation));
+ tmp.name :=p;
+ tmp.presents:=2;
+ tmp.hContact:=hContact;
+ List_InsertPtr(@trayStations,tmp);
end;
end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
+ hContact:=db_find_next(hContact,PluginName);
end;
-
// delete obsolete elements
for i:=trayStations.realCount-1 downto 0 do
begin
diff --git a/plugins/mRadio/mradio.dpr b/plugins/mRadio/mradio.dpr
index d8b0432b18..744ccc9813 100644
--- a/plugins/mRadio/mradio.dpr
+++ b/plugins/mRadio/mradio.dpr
@@ -70,14 +70,11 @@ begin
if hContact=0 then
begin
- hContact:=CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact:=db_find_first(PluginName);
while hContact<>0 do
begin
- if StrCmp(PAnsiChar(CallService(MS_PROTO_GETCONTACTBASEPROTO,hContact,0)),PluginName)=0 then
- begin
- DBWriteWord(hContact,PluginName,optStatus,status);
- end;
- hContact:=CallService(MS_DB_CONTACT_FINDNEXT,hContact,0);
+ DBWriteWord(hContact,PluginName,optStatus,status);
+ hContact:=db_find_next(hContact,PluginName);
end;
end
else
@@ -101,12 +98,12 @@ begin
result:=@PluginInfo;
PluginInfo.cbSize :=SizeOf(TPLUGININFOEX);
PluginInfo.shortName :='mRadio Mod';
- PluginInfo.version :=$00000202;
+ PluginInfo.version :=$00000203;
PluginInfo.description:='This plugin plays and records Internet radio streams.'+
' Also local media files can be played.';
PluginInfo.author :='Awkward';
PluginInfo.authorEmail:='panda75@bk.ru; awk1975@ya.ru';
- PluginInfo.copyright :='(c) 2007-2012 Awkward';
+ PluginInfo.copyright :='(c) 2007-2013 Awkward';
PluginInfo.homepage :='http://code.google.com/p/delphi-miranda-plugins/';
PluginInfo.flags :=UNICODE_AWARE;
PluginInfo.uuid :=MIID_MRADIO;
@@ -330,7 +327,6 @@ begin
PluginStatus:=ID_STATUS_OFFLINE;
end;
mFreeMem(custom);
-
Result:=0;
end;
@@ -344,7 +340,6 @@ exports
Load, Unload,
MirandaPluginInfoEx;
-initialization
+begin
DisableThreadLibraryCalls(hInstance);
-
end.
diff --git a/plugins/mRadio/mradio.rc b/plugins/mRadio/mradio.rc
index 126052f6ee..7037c10d42 100644
--- a/plugins/mRadio/mradio.rc
+++ b/plugins/mRadio/mradio.rc
@@ -153,7 +153,7 @@ IDI_ADD ICON "ico\new.ico"
IDI_DEL ICON "ico\delete.ico"
BTN_RECUP ICON "ico\recon.ico"
BTN_RECDN ICON "ico\recoff.ico"
-
+/*
LANGUAGE 0,0
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,2,2
@@ -183,3 +183,4 @@ BEGIN
VALUE "Translation",0,1200
END
END
+*/ \ No newline at end of file
diff --git a/plugins/mRadio/variants.pas b/plugins/mRadio/variants.pas
index c7c8fdc824..01337ae11c 100644
--- a/plugins/mRadio/variants.pas
+++ b/plugins/mRadio/variants.pas
@@ -2,6 +2,11 @@ unit variants;
interface
+var
+ Null: Variant; { Null standard constant }
+
implementation
+initialization
+ TVarData(Null).VType := varNull;
end. \ No newline at end of file