diff options
author | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-21 14:14:52 +0000 |
---|---|---|
committer | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-21 14:14:52 +0000 |
commit | cb4a46e7fbe62d788e66ed6121c717a2d22a4d7c (patch) | |
tree | 30df260fdc5a1b5a7049c2f8cac8b7ef17513d6d /useactions | |
parent | 19b6f534d2e784a1e120bf52c4aa07004798f473 (diff) |
svn.miranda.im is moving to a new home!
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@7 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'useactions')
30 files changed, 5102 insertions, 0 deletions
diff --git a/useactions/Changelog.txt b/useactions/Changelog.txt new file mode 100644 index 0000000..349f104 --- /dev/null +++ b/useactions/Changelog.txt @@ -0,0 +1,15 @@ +UseActions Plugin, version 0.0.0.3
+ * enlarged variables string length from 512 to 1024
+ * update of m_actman.h from Awkward's trunk
+ ! removed minor memleak when freeing action request results (thx Merlin)
+
+UseActions Plugin, version 0.0.0.2
+ + added calling of action named "#Autostart" at start of Miranda
+ * fix for TTB detection
+ + Updater support
+ + added possibility to insert separators before contactmenuitems and mainmenuitems
+ * delete "Flags" from DB if =0
+ + attempt to deregister all possible controls and erase all owned DB settings for an Action before removing it.
+ * adaptation to new ActMan structures (v0.6+)
+ + new Version resource
+
diff --git a/useactions/ExternalAPI/m_actman.h b/useactions/ExternalAPI/m_actman.h new file mode 100644 index 0000000..1a8efd8 --- /dev/null +++ b/useactions/ExternalAPI/m_actman.h @@ -0,0 +1,96 @@ +#ifndef M_ACTMAN
+#define M_ACTMAN
+
+#define ACCF_DISABLED 0x10000000 // action disabled
+#define ACCF_EXPORT 0x08000000 // action to export
+#define ACCF_VOLATILE 0x04000000 // don't save in DB
+#define ACCF_IMPORTED ACF_EXPORT
+#define ACCF_FLAGS (ACCF_DISABLED | ACCF_EXPORT | ACCF_IMPORTED | ACCF_VOLATILE)
+#define ACCF_ID 0x02000000 // for MS_ACT_SELECT, lParam is ID (else name)
+#define ACCF_CLEAR 0x01000000 // clear other flags, else - set
+
+
+typedef struct{
+ WCHAR* Descr;
+ DWORD ID;
+ DWORD flags; // ACCF_* flags
+ } TChain, *PChain;
+
+// Service to get list of all configured actions;
+// wParam : 0
+// lParam : address of destination list variable (address of pointer to TChain)
+// Notes: first 4 bytes of list = size of TChain structure (to add new fields in future)
+// Return value: count of elements;
+#define MS_ACT_GETLIST "Actions/GetList"
+
+// Service to free list of all configured actions got with MS_ACT_GETLIST service call;
+// wParam : 0
+// lParam : list address (pointer to ACTION returned by MS_ACT_GETLIST)
+#define MS_ACT_FREELIST "Actions/FreeList"
+
+// Service to call action defined in wParam;
+// wParam: ID of an action (see ACTION.ActID) when calling MS_ACT_RUN
+// or description of an action (see ACTION.ActDescr) when calling MS_ACT_RUNGROUP
+// lParam: parameter (will be passed to action called)
+#define MS_ACT_RUNBYID "Actions/RunById"
+#define MS_ACT_RUNBYNAME "Actions/RunByName"
+
+// Event: action group list was changed: something was added or deleted
+// wParam: set of ACTM_* flags
+// lParam : 0
+#define ME_ACT_CHANGED "Actions/Changed"
+
+// Starts action with 2 parameters
+// wParam: 0
+// lParam: pointer to TAct_Param
+
+#define MS_ACT_RUNPARAMS "Actions/RunWithParams"
+typedef struct TAct_Param
+ {
+ DWORD flags; // 0 - ID, 1 - Name
+ DWORD ID; // Id or name
+ WPARAM wParam;
+ LPARAM lParam;
+ } TAct_Param, *PAct_Param;
+
+#define ACTM_NEW 0x00000001
+#define ACTM_DELETE 0x00000002
+#define ACTM_RELOAD 0x00000004
+#define ACTM_RENAME 0x00000008
+#define ACTM_SORT 0x00000010
+#define ACTM_ACT 0x10000000 // do not check, internal
+#define ACTM_ACTS 0x20000000 // do not check, internal
+#define ACTM_LOADED 0x80000000
+
+
+#define ACIO_EXPORT 0x00000001 // export, else - import
+#define ACIO_APPEND 0x00000002 // append file on export
+#define ACIO_ASKEXIST 0x00000004 // ask, if action exists on import
+#define ACIO_SELECTED 0x00000008 // export selected actions only
+
+// wParam: ACIO_* flags
+// lParam: Unicode file name
+// Return - true, if totally succesful
+#define MS_ACT_INOUT "Actions/ImpExp"
+
+
+//Event: Export actions
+// wParam - ACIO_* flags
+// lParam - unicode filename
+#define ME_ACT_INOUT "Actions/InOut"
+
+
+// Select/unselect specified action
+// wParam: set of ACCF_* consts
+// lParam: unicode action name / number
+// Return - -1 if unsuccesful
+#define MS_ACT_SELECT "Actions/Select"
+
+
+// Event: Action started/finished
+// wParam - Action status: 0 - started, 1 - finished
+// lParam - action id
+
+#define ME_ACT_ACTION "Actions/Action"
+
+#endif
diff --git a/useactions/ExternalAPI/m_actman.inc b/useactions/ExternalAPI/m_actman.inc new file mode 100644 index 0000000..02a84a4 --- /dev/null +++ b/useactions/ExternalAPI/m_actman.inc @@ -0,0 +1,115 @@ +{$IFNDEF M_ACTMAN}
+{$DEFINE M_ACTMAN}
+
+// defined in interfaces.inc
+//const MIID_ACTMANAGER:MUUID='{9584DA04-FB4F-40c1-9325-E4F9CAAFCB5D}';
+
+const
+ ACCF_DISABLED = $10000000; // action disabled
+ ACCF_EXPORT = $08000000; // action to export
+ ACCF_VOLATILE = $04000000; // don't save in DB
+ ACCF_IMPORTED = ACF_EXPORT;
+ ACCF_FLAGS = ACCF_DISABLED or ACCF_EXPORT or ACCF_IMPORTED or ACCF_VOLATILE;
+ ACCF_ID = $02000000; // for MS_ACT_SELECT, lParam is ID (else name)
+ ACCF_CLEAR = $01000000; // clear other flags, else - set
+type
+ pChain = ^tChain;
+ TChain = record
+ descr:pWideChar;
+ id :dword;
+ flags:dword; // ACCF_* flags
+ end;
+
+const
+ {
+ wParam - 0
+ lParam - address of destination list variable (address of pointer to tChain)
+ Return - count of elements
+ Notes: first 4 bytes = size of TChain structure (to add new fields in future)
+ }
+ MS_ACT_GETLIST:PAnsiChar = 'Actions/GetList';
+ {
+ wParam - 0
+ lParam - list address (pointer to data returned by MS_ACT_GETLIST)
+ }
+ MS_ACT_FREELIST:PAnsiChar = 'Actions/FreeList';
+ {
+ wParam - id: dword
+ lParam - parameter
+ }
+ MS_ACT_RUNBYID :PAnsiChar = 'Actions/RunById';
+ {
+ wParam - unicode action name
+ lParam - parameter
+ }
+ MS_ACT_RUNBYNAME:PAnsiChar = 'Actions/RunByName';
+
+{ Starts action with 2 parameters
+ wParam: 0
+ lParam: pointer to TAct_Param
+}
+ MS_ACT_RUNPARAMS:PAnsiChar = 'Actions/RunWithParams';
+const
+ ACTP_BYNAME = 1;
+ ACTP_WAIT = 2;
+type
+ PAct_Param = ^TAct_Param;
+ TAct_Param = record
+ flags :dword; // ACTP_*
+ ID :dword; // Id or name
+ wParam:WPARAM;
+ lParam:LPARAM;
+ end;
+
+const
+ ACTM_NEW = $00000001;
+ ACTM_DELETE = $00000002;
+ ACTM_RELOAD = $00000004;
+ ACTM_RENAME = $00000008;
+ ACTM_SORT = $00000010;
+ ACTM_ACT = $10000000; // do not check, internal
+ ACTM_ACTS = $20000000; // do not check, internal
+ ACTM_LOADED = $80000000;
+
+ {
+ Event: action group list was changed: some was added or deleted
+ wParam - set of ACTM_* flags
+ lParam - 0
+ }
+ ME_ACT_CHANGED:PAnsiChar = 'Actions/Changed';
+
+ ACIO_EXPORT = $00000001; // export, else - import
+ ACIO_APPEND = $00000002; // append file on export
+ ACIO_ASKEXIST = $00000004; // ask, if action exists on import
+ ACIO_SELECTED = $00000008; // export selected actions only
+
+ {
+ wParam - ACIO_* flags
+ lParam - Unicode file name
+ Return - true, if totally succesful
+ }
+ MS_ACT_INOUT:PAnsiChar = 'Actions/ImpExp';
+
+ {
+ Event: Export actions
+ wParam - ACIO_* flags
+ lParam - unicode filename
+ }
+ ME_ACT_INOUT:PAnsiChar = 'Actions/InOut';
+
+ {
+ Select/unselect specified action
+ wParam - set of ACCF_* consts
+ lParam - unicode action name / number
+ Return - -1 if unsuccesful
+ }
+ MS_ACT_SELECT:PAnsiChar = 'Actions/Select';
+
+ {
+ Event: Action started/finished
+ wParam - Action status: 0 - started, 1 - finished
+ lParam - action id
+ }
+ ME_ACT_ACTION:PAnsiChar = 'Actions/Action';
+
+{$ENDIF}
diff --git a/useactions/ExternalAPI/m_msg_buttonsbar.h b/useactions/ExternalAPI/m_msg_buttonsbar.h new file mode 100644 index 0000000..1ab6651 --- /dev/null +++ b/useactions/ExternalAPI/m_msg_buttonsbar.h @@ -0,0 +1,120 @@ +#ifndef M_MSG_BUTTONSBAR_H__
+#define M_MSG_BUTTONSBAR_H__
+
+//////////////////////////////////////////////////////////////////////////
+// Services
+//
+//////////////////////////////////////////////////////////////////////////
+// Adding a button
+//
+// wParam = 0
+// lParam = (BBButton *) &description
+#define MS_BB_ADDBUTTON "TabSRMM/ButtonsBar/AddButton"
+
+//////////////////////////////////////////////////////////////////////////
+// Remove button
+//
+// wParam = 0
+// lParam = (BBButton *) &description, only button ID and ModuleName used
+#define MS_BB_REMOVEBUTTON "TabSRMM/ButtonsBar/RemoveButton"
+
+//////////////////////////////////////////////////////////////////////////
+// ModifyButton(global)
+//
+// wParam = 0
+// lParam = (BBButton *) &description
+#define MS_BB_MODIFYBUTTON "TabSRMM/ButtonsBar/ModifyButton"
+
+
+#define BBSF_HIDDEN (1<<0)
+#define BBSF_DISABLED (1<<1)
+#define BBSF_PUSHED (1<<2)
+#define BBSF_RELEASED (1<<3)
+
+//////////////////////////////////////////////////////////////////////////
+// GetButtonState(local)
+//
+// wParam = hContact
+// lParam = (BBButton *) &description , only ModuleName and ID used
+// Returns BBButton struct with BBSF_ bbbFlags:
+#define MS_BB_GETBUTTONSTATE "TabSRMM/ButtonsBar/GetButtonState"
+
+//////////////////////////////////////////////////////////////////////////
+// SetButtonState (local)
+//
+// wParam = hContact
+// lParam = (BBButton *) &description , ModuleName, ID,hIcon,Tooltip, and BBSF_ bbbFlags are used
+#define MS_BB_SETBUTTONSTATE "TabSRMM/ButtonsBar/SetButtonState"
+
+
+////////////////////////////////////////////////////////////////
+//Events
+//
+///////////////////////////////////////////////////
+// ToolBar loaded event
+// wParam = 0;
+// lParam = 0;
+// This event will be send after module loaded and after each toolbar reset
+// You should add your buttons on this event
+#define ME_MSG_TOOLBARLOADED "TabSRMM/ButtonsBar/ModuleLoaded"
+
+///////////////////////////////////////////////////
+// ButtonClicked event
+// wParam = (HANDLE)hContact;
+// lParam = (CustomButtonClickData *)&CustomButtonClickData;
+// catch to show a popup menu, etc.
+#define ME_MSG_BUTTONPRESSED "TabSRMM/ButtonsBar/ButtonPressed"
+
+
+//event flags
+#define BBCF_RIGHTBUTTON (1<<0)
+#define BBCF_SHIFTPRESSED (1<<1)
+#define BBCF_CONTROLPRESSED (1<<2)
+#define BBCF_ARROWCLICKED (1<<3)
+
+typedef struct {
+ int cbSize;
+ POINT pt; // screen coordinates for menus
+ char* pszModule; // button owners name
+ DWORD dwButtonId; // registered button ID
+ HWND hwndFrom; // button parents HWND
+ HANDLE hContact; //
+ DWORD flags; // BBCF_ flags
+ } CustomButtonClickData;
+
+
+//button flags
+#define BBBF_DISABLED (1<<0)
+#define BBBF_HIDDEN (1<<1)
+#define BBBF_ISPUSHBUTTON (1<<2)
+#define BBBF_ISARROWBUTTON (1<<3)
+#define BBBF_ISCHATBUTTON (1<<4)
+#define BBBF_ISIMBUTTON (1<<5)
+#define BBBF_ISLSIDEBUTTON (1<<6)
+#define BBBF_ISRSIDEBUTTON (1<<7)
+#define BBBF_CANBEHIDDEN (1<<8)
+#define BBBF_ISDUMMYBUTTON (1<<9)
+#define BBBF_ANSITOOLTIP (1<<10)
+
+#define BBBF_CREATEBYID (1<<11) //only for tabsrmm internal use
+
+typedef struct _tagBBButton
+ {
+ int cbSize; // size of structure
+
+ DWORD dwButtonID; // your button ID, will be combined with pszModuleName for storing settings, etc...
+
+ char* pszModuleName; //module name without spaces and underline symbols (e.g. "tabsrmm")
+ union{
+ char* pszTooltip; //button's tooltip
+ TCHAR* ptszTooltip;
+ };
+ DWORD dwDefPos; // default order pos of button, counted from window edge (left or right)
+ // use value >100, because internal buttons using 10,20,30... 80, etc
+ int iButtonWidth; // must be 0
+ DWORD bbbFlags; // combine of BBBF_ flags above
+ HANDLE hIcon; //Handle to icolib registered icon, it's better to register with pszSection = "TabSRMM/Toolbar"
+ }BBButton;
+
+
+#endif //M_MSG_BUTTONSBAR_H__
\ No newline at end of file diff --git a/useactions/ExternalAPI/m_toolbar.h b/useactions/ExternalAPI/m_toolbar.h new file mode 100644 index 0000000..fc417cf --- /dev/null +++ b/useactions/ExternalAPI/m_toolbar.h @@ -0,0 +1,88 @@ +#ifndef M_TOOLBAR_H
+#define M_TOOLBAR_H
+
+#define TOOLBARBUTTON_ICONIDPREFIX "MTB_"
+#define TOOLBARBUTTON_ICONIDPRIMARYSUFFIX "_Primary"
+#define TOOLBARBUTTON_ICONIDSECONDARYSUFFIX "_Secondary"
+#define TOOLBARBUTTON_ICONNAMEPRESSEDSUFFIX "Pressed"
+
+//button flags
+#define TBBF_DISABLED (1<<0)
+#define TBBF_VISIBLE (1<<1)
+#define TBBF_PUSHED (1<<2)
+#define TBBF_SHOWTOOLTIP (1<<3)
+#define TBBF_ISSEPARATOR (1<<5)
+#define TBBF_ISLBUTTON (1<<6)
+#define TBBF_FLEXSIZESEPARATOR (TBBF_ISSEPARATOR|TBBF_PUSHED)
+typedef struct _tagTBButton
+{
+ int cbSize; // size of structure
+ char * pszButtonID; // char id of button used to store button info in DB and know about icon
+ char * pszButtonName; // name of button (not translated)
+ char * pszServiceName; // service name to be executed
+ LPARAM lParam; // param of service to be called
+ char * pszTooltipUp, *pszTooltipDn;
+ DWORD defPos; // default order pos of button (less values are nearer to edge).. please use values greater that 100. the default buttons has pos: 10,20..90
+ DWORD tbbFlags; // combine of TBBF_ flags above
+ void (*ParamDestructor)(void *); //will be called on parameters deletion
+ HANDLE hPrimaryIconHandle;
+ HANDLE hSecondaryIconHandle;
+}TBButton;
+
+//////////////////////////////////////////////////////////////////////////
+// Events
+// Only after this event module subscribers should register their buttons
+// wparam=lparam=0
+// don't forget to return 0 to continue processing
+#define ME_TB_MODULELOADED "ToolBar/ModuleLoaded"
+
+//////////////////////////////////////////////////////////////////////////
+// Services
+//
+//////////////////////////////////////////////////////////////////////////
+// Adding a button
+// WPARAM = 0
+// LPARAM = (TBButton *) &description
+// LRESULT = (HANDLE) hButton
+// in order to correctly process default icons via iconlib it should be
+// registered icolib icon with id named:
+// 'TBButton_'+pszButtonID+ 'Up' or +'Down' for Push (2-state) buttons
+#define MS_TB_ADDBUTTON "ToolBar/AddButton"
+
+//////////////////////////////////////////////////////////////////////////
+// Remove button
+// WPARAM = (HANDLE) hButton;
+// LPARAM = 0;
+#define MS_TB_REMOVEBUTTON "ToolBar/RemoveButton"
+
+//////////////////////////////////////////////////////////////////////////
+// SetState
+// WPARAM = (HANDLE) hButton;
+// LPARAM = one of below TBST_ states
+// LRESULT= old state
+#define TBST_PUSHED 1
+#define TBST_RELEASED 0
+#define MS_TB_SETBUTTONSTATE "ToolBar/SetButtonState"
+
+//////////////////////////////////////////////////////////////////////////
+// SetStatebyId
+// WPARAM = (char *) szButtonID;
+// LPARAM = one of below TBST_ states
+// LRESULT= old state
+#define MS_TB_SETBUTTONSTATEBYID "ToolBar/SetButtonStateId"
+//////////////////////////////////////////////////////////////////////////
+// GetState
+// WPARAM = (HANLDE) hButton;
+// LPARAM = 0
+// LRESULT= current state
+#define MS_TB_GETBUTTONSTATE "ToolBar/GetButtonState"
+
+//////////////////////////////////////////////////////////////////////////
+// GetState
+// WPARAM = (char *) szButtonID;;
+// LPARAM = 0
+// LRESULT= current state
+#define MS_TB_GETBUTTONSTATEBYID "ToolBar/GetButtonStateId"
+
+
+#endif
\ No newline at end of file diff --git a/useactions/ExternalAPI/m_toptoolbar.h b/useactions/ExternalAPI/m_toptoolbar.h new file mode 100644 index 0000000..5628f68 --- /dev/null +++ b/useactions/ExternalAPI/m_toptoolbar.h @@ -0,0 +1,125 @@ +
+#ifndef M_TOPTOOLBAR_H
+#define M_TOPTOOLBAR_H
+
+//button flags
+#define TTBBF_DISABLED 1
+#define TTBBF_VISIBLE 2
+#define TTBBF_PUSHED 4
+#define TTBBF_SHOWTOOLTIP 8
+#define TTBBF_DRAWBORDER 16//draw border for bitmap,bitmap must be WxH 16x12
+#define TTBBF_ISSEPARATOR 32
+
+//for internal launch buttons
+#define TTBBF_ISLBUTTON 64
+
+typedef struct {
+ int cbSize;
+ HBITMAP hbBitmapUp;
+ HBITMAP hbBitmapDown;
+ char *pszServiceUp;
+ char *pszServiceDown;
+ DWORD dwFlags;
+ LPARAM lParamUp;
+ WPARAM wParamUp;
+ LPARAM lParamDown;
+ WPARAM wParamDown;
+ char *name;
+
+} TTBButton, * lpTTBButton;
+
+typedef struct {
+ int cbSize;
+ HBITMAP hbBitmapUp;
+ HBITMAP hbBitmapDown;
+ char *pszServiceUp;
+ char *pszServiceDown;
+ DWORD dwFlags;
+ LPARAM lParamUp;
+ WPARAM wParamUp;
+ LPARAM lParamDown;
+ WPARAM wParamDown;
+ char *name;
+ HICON hIconUp,hIconDn;
+ char *tooltipUp;
+ char *tooltipDn;
+
+} TTBButtonV2, * lpTTBButtonV2;
+
+//=== EVENTS ===
+/*
+toptoolbar/moduleloaded event
+wParam = lParam = 0
+Called when the toolbar services are available
+
+!!!Warning you may work with TTB services only in this event or later.
+
+*/
+#define ME_TTB_MODULELOADED "TopToolBar/ModuleLoaded"
+
+
+
+//=== SERVICES ===
+/*
+toptoolbar/addbutton service
+wparam = (TTBButton*)lpTTBButton
+lparam = 0
+returns: hTTBButton - handle of added button on success, -1 on failure.
+*/
+#define MS_TTB_ADDBUTTON "TopToolBar/AddButton"
+
+/*
+toptoolbar/removebutton service
+wparam = (HANDLE)hTTButton
+lparam = 0
+returns: 0 on success, -1 on failure.
+*/
+#define MS_TTB_REMOVEBUTTON "TopToolBar/RemoveButton"
+
+/*
+toptoolbar/setstate service
+wparam = (HANDLE)hTTButton
+lparam = (LPARAM) state
+returns: 0 on success, -1 on failure.
+*/
+#define TTBST_PUSHED 1
+#define TTBST_RELEASED 2
+
+#define MS_TTB_SETBUTTONSTATE "TopToolBar/SetState"
+
+/*
+toptoolbar/getstate service
+wparam = (HANDLE)hTTButton
+lparam = 0
+returns: state on success, -1 on failure.
+*/
+#define MS_TTB_GETBUTTONSTATE "TopToolBar/GetState"
+
+/*
+toptoolbar/getoptions service
+(HIWORD)wparam = (HANDLE)hTTButton
+(LOWORD)wparam = TTBO_FLAG
+lparam = 0,or lparam=lpTTBButton if flag=TTBO_ALLDATA
+returns: value on success, -1 on failure.
+*/
+#define TTBO_FLAGS 0 //get/set all flags
+#define TTBO_POS 1 //position
+#define TTBO_WIDTH 2 //not impemented
+#define TTBO_HEIGHT 3 //not impemented
+#define TTBO_TIPNAME 4 //tool tip name
+#define TTBO_ALLDATA 5 //change all data via lparam=lpTTBButton
+
+
+#define MS_TTB_GETBUTTONOPTIONS "TopToolBar/GetOptions"
+
+/*
+toptoolbar/setoptions service
+(HIWORD)wparam = (HANDLE)hTTButton
+(LOWORD)wparam = TTBO_FLAG
+lparam = value
+returns: 1 on success, -1 on failure.
+*/
+#define MS_TTB_SETBUTTONOPTIONS "TopToolBar/SetOptions"
+
+
+#endif
\ No newline at end of file diff --git a/useactions/ExternalAPI/m_updater.h b/useactions/ExternalAPI/m_updater.h new file mode 100644 index 0000000..488d372 --- /dev/null +++ b/useactions/ExternalAPI/m_updater.h @@ -0,0 +1,150 @@ +#ifndef _M_UPDATER_H
+#define _M_UPDATER_H
+
+// NOTES:
+// - For langpack updates, include a string of the following format in the langpack text file:
+// ";FLID: <file listing name> <version>"
+// version must be four numbers seperated by '.', in the range 0-255 inclusive
+// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
+// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
+// to install an ini file to make the plugin activate when miranda restarts after the update
+// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
+// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
+// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
+// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
+// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
+// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
+// to install additional dlls etc that a plugin may require)
+
+// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
+// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
+// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
+#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
+// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
+// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
+
+typedef struct Update_tag {
+ int cbSize;
+ char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
+
+ char *szVersionURL; // URL where the current version can be found (NULL to disable)
+ BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
+ // (note that this URL could point at a binary file - dunno why, but it could :)
+ int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
+ char *szUpdateURL; // URL where dll/zip is located
+ // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
+
+ char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
+ BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
+ int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
+ char *szBetaUpdateURL; // URL where dll/zip is located
+
+ BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
+ int cpbVersion; // number of bytes pointed to by pbVersion
+
+ char *szBetaChangelogURL; // url for displaying changelog for beta versions
+} Update;
+
+// register a comonent with Updater
+//
+// wparam = 0
+// lparam = (LPARAM)&Update
+#define MS_UPDATE_REGISTER "Update/Register"
+
+// utility functions to create a version string from a DWORD or from pluginInfo
+// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
+//
+__inline static char *CreateVersionString(DWORD version, char *buf) {
+ mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
+ return buf;
+}
+
+__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
+ return CreateVersionString(pluginInfo->version, buf);
+}
+
+__inline static char *CreateVersionStringPluginEx(PLUGININFOEX *pluginInfo, char *buf) {
+ return CreateVersionString(pluginInfo->version, buf);
+}
+
+
+// register the 'easy' way - use this method if you have no beta URL and the plugin is on the miranda file listing
+// NOTE: the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
+// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
+//
+// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
+// lParam = (PLUGININFO*)&pluginInfo
+#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
+
+// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
+// may need to change those components on the fly
+// lParam = (char *)szComponentName
+#define MS_UPDATE_UNREGISTER "Update/Unregister"
+
+// this event is fired when the startup process is complete, but NOT if a restart is imminent
+// it is designed for status managment plugins to use as a trigger for beggining their own startup process
+// wParam = lParam = 0 (unused)
+// (added in version 0.1.6.0)
+#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
+
+// this service can be used to enable/disable Updater's global status control
+// it can be called from the StartupDone event handler
+// wParam = (BOOL)enable
+// lParam = 0
+// (added in version 0.1.6.0)
+#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
+
+// An description of usage of the above service and event:
+// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
+// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
+// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
+// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
+// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
+
+// this service can be used to determine whether updates are possible for a component with the given name
+// wParam = 0
+// lParam = (char *)szComponentName
+// returns TRUE if updates are supported, FALSE otherwise
+#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
+
+#endif
+
+
+/////////////// Usage Example ///////////////
+
+#ifdef EXAMPLE_CODE
+
+// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
+
+int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
+
+ Update update = {0}; // for c you'd use memset or ZeroMemory...
+ char szVersion[16];
+
+ update.cbSize = sizeof(Update);
+
+ update.szComponentName = pluginInfo.shortName;
+ update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
+ update.cpbVersion = strlen((char *)update.pbVersion);
+
+ // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
+ // before the version that we use to locate it on the page
+ // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
+ // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
+ update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
+ update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
+ update.pbVersionPrefix = (BYTE *)"Updater version ";
+
+ update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
+
+ // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
+
+ CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
+
+ // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
+ // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
+
+ return 0;
+}
+
+#endif
diff --git a/useactions/ExternalAPI/m_variables.h b/useactions/ExternalAPI/m_variables.h new file mode 100644 index 0000000..d932d5e --- /dev/null +++ b/useactions/ExternalAPI/m_variables.h @@ -0,0 +1,745 @@ +/*
+ Variables Plugin for Miranda-IM (www.miranda-im.org)
+ Copyright 2003-2006 P. Boon
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+*/
+
+#ifndef __M_VARS
+#define __M_VARS
+
+#if !defined(_TCHAR_DEFINED)
+#include <tchar.h>
+#endif
+
+#ifndef VARIABLES_NOHELPER
+#include "m_button.h"
+#endif
+
+#ifndef SIZEOF
+#include "win2k.h"
+#endif
+
+// --------------------------------------------------------------------------
+// Memory management
+// --------------------------------------------------------------------------
+
+// Release memory that was allocated by the Variables plugin, e.g. returned
+// strings.
+
+#define MS_VARS_FREEMEMORY "Vars/FreeMemory"
+
+// Parameters:
+// ------------------------
+// wParam = (WPARAM)(void *)pntr
+// Pointer to memory that was allocated by the Variables plugin (e.g. a
+// returned string) (can be NULL).
+// lParam = 0
+
+// Return Value:
+// ------------------------
+// Does return 0 on success, nozero otherwise.
+
+// Note: Do only use this service to free memory that was *explicitliy*
+// stated that it should be free with this service.
+
+
+
+#define MS_VARS_GET_MMI "Vars/GetMMI"
+
+// Get Variable's RTL/CRT function poiners to malloc(), free() and
+// realloc().
+
+// Parameters:
+// ------------------------
+// wParam = 0
+// lParam = (LPARAM) &MM_INTERFACE
+// Pointer to a memory manager interface struct (see m_system.h).
+
+// Return Value:
+// ------------------------
+// Returns 0 on success, nozero otherwise
+
+// Note: Works exactly the same as the MS_SYSTEM_GET_MMI service
+// service of m_system.h.
+
+// Helper function for easy using:
+#ifndef VARIABLES_NOHELPER
+__inline static void variables_free(void *pntr) {
+
+ CallService(MS_VARS_FREEMEMORY, (WPARAM)pntr, 0);
+}
+#endif
+
+
+
+// --------------------------------------------------------------------------
+// String formatting
+// --------------------------------------------------------------------------
+
+#define MS_VARS_FORMATSTRING "Vars/FormatString"
+
+// This service can be used to parse tokens in a text. The tokens will be
+// replaced by their resolved values. A token can either be a field or a
+// function. A field takes no arguments and is represented between
+// %-characters, e.g. "%winampsong%". A function can take any number of
+// arguments and is represented by a ? or !-character followed by the name
+// of the function and a list of arguments, e.g. "?add(1,2)".
+
+// Parameters:
+// ------------------------
+// wParam = (WPARAM)(FORMATINFO *)&fi
+// See below.
+// lParam = 0
+
+// Return Value:
+// ------------------------
+// Returns a pointer to the resolved string or NULL in case of an error.
+
+// Note: The returned pointer needs to be freed using MS_VARS_FREEMEMORY.
+
+typedef struct {
+ int cbSize; // Set this to sizeof(FORMATINFO).
+ int flags; // Flags to use (see FIF_* below).
+ union {
+ char *szFormat; // Text in which the tokens will be replaced (can't be
+ // NULL).
+ WCHAR *wszFormat;
+ TCHAR *tszFormat;
+ };
+ union {
+ char *szExtraText; // Extra, context-specific string (can be NULL) ->
+ // The field "extratext" will be replaced by this
+ // string. (Previously szSource).
+ WCHAR *wszExtraText;
+ TCHAR *tszExtraText;
+ };
+ HANDLE hContact; // Handle to contact (can be NULL) -> The field "subject"
+ // represents this contact.
+ int pCount; // (output) Number of succesful parsed tokens, needs to be set
+ // to 0 before the call
+ int eCount; // (output) Number of failed tokens, needs to be set to 0
+ // before the call
+ union {
+ char **szaTemporaryVars; // Temporary variables valid only in the duration of the format call
+ TCHAR **tszaTemporaryVars; // By pos: [i] is var name, [i + 1] is var value
+ WCHAR **wszaTemporaryVars;
+ };
+ int cbTemporaryVarsSize; // Number of elements in szaTemporaryVars array
+
+} FORMATINFO;
+
+#define FORMATINFOV2_SIZE 28
+
+// Possible flags:
+#define FIF_UNICODE 0x01 // Expects and returns unicode text (WCHAR*).
+
+#if defined(UNICODE) || defined(_UNICODE)
+#define FIF_TCHAR FIF_UNICODE // Strings in structure are TCHAR*.
+#else
+#define FIF_TCHAR 0
+#endif
+
+// Helper functions for easy using:
+
+// Helper #1: variables_parse
+// ------------------------
+// The returned string needs to be freed using MS_VARS_FREEMEMORY.
+
+#ifndef VARIABLES_NOHELPER
+__inline static TCHAR *variables_parse(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact) {
+
+ FORMATINFO fi;
+
+ ZeroMemory(&fi, sizeof(fi));
+ fi.cbSize = sizeof(fi);
+ fi.tszFormat = tszFormat;
+ fi.tszExtraText = tszExtraText;
+ fi.hContact = hContact;
+ fi.flags = FIF_TCHAR;
+
+ return (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+}
+
+__inline static char *variables_parse_char(char *szFormat, char *szExtraText, HANDLE hContact)
+{
+ FORMATINFO fi = {0};
+
+ fi.cbSize = sizeof(fi);
+ fi.szFormat = szFormat;
+ fi.szExtraText = szExtraText;
+ fi.hContact = hContact;
+ fi.flags = 0;
+
+ return (char *) CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+}
+__inline static wchar_t *variables_parse_wchar(wchar_t *wszFormat, wchar_t *wszExtraText, HANDLE hContact)
+{
+ FORMATINFO fi = {0};
+
+ fi.cbSize = sizeof(fi);
+ fi.wszFormat = wszFormat;
+ fi.wszExtraText = wszExtraText;
+ fi.hContact = hContact;
+ fi.flags = FIF_UNICODE;
+
+ return (wchar_t *) CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+}
+
+#endif
+
+__inline static TCHAR *variables_parse_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact,
+ TCHAR **tszaTemporaryVars, int cbTemporaryVarsSize) {
+
+ FORMATINFO fi;
+
+ ZeroMemory(&fi, sizeof(fi));
+ fi.cbSize = sizeof(fi);
+ fi.tszFormat = tszFormat;
+ fi.tszExtraText = tszExtraText;
+ fi.hContact = hContact;
+ fi.flags = FIF_TCHAR;
+ fi.tszaTemporaryVars = tszaTemporaryVars;
+ fi.cbTemporaryVarsSize = cbTemporaryVarsSize;
+
+ return (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+}
+// Helper #2: variables_parsedup
+// ------------------------
+// Returns a _strdup()'ed copy of the unparsed string when Variables is not
+// installed, returns a strdup()'ed copy of the parsed result otherwise.
+
+// Note: The returned pointer needs to be released using your own free().
+
+#ifndef VARIABLES_NOHELPER
+__inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact) {
+
+ if (ServiceExists(MS_VARS_FORMATSTRING)) {
+ FORMATINFO fi;
+ TCHAR *tszParsed, *tszResult;
+
+ ZeroMemory(&fi, sizeof(fi));
+ fi.cbSize = sizeof(fi);
+ fi.tszFormat = tszFormat;
+ fi.tszExtraText = tszExtraText;
+ fi.hContact = hContact;
+ fi.flags |= FIF_TCHAR;
+ tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+ if (tszParsed) {
+ tszResult = _tcsdup(tszParsed);
+ CallService(MS_VARS_FREEMEMORY, (WPARAM)tszParsed, 0);
+ return tszResult;
+ }
+ }
+ return tszFormat?_tcsdup(tszFormat):tszFormat;
+}
+
+__inline static TCHAR *variables_parsedup_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HANDLE hContact,
+ TCHAR **tszaTemporaryVars, int cbTemporaryVarsSize) {
+
+ if (ServiceExists(MS_VARS_FORMATSTRING)) {
+ FORMATINFO fi;
+ TCHAR *tszParsed, *tszResult;
+
+ ZeroMemory(&fi, sizeof(fi));
+ fi.cbSize = sizeof(fi);
+ fi.tszFormat = tszFormat;
+ fi.tszExtraText = tszExtraText;
+ fi.hContact = hContact;
+ fi.flags |= FIF_TCHAR;
+ fi.tszaTemporaryVars = tszaTemporaryVars;
+ fi.cbTemporaryVarsSize = cbTemporaryVarsSize;
+ tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0);
+ if (tszParsed) {
+ tszResult = _tcsdup(tszParsed);
+ CallService(MS_VARS_FREEMEMORY, (WPARAM)tszParsed, 0);
+ return tszResult;
+ }
+ }
+ return tszFormat?_tcsdup(tszFormat):tszFormat;
+}
+#endif
+
+
+
+// --------------------------------------------------------------------------
+// Register tokens
+// --------------------------------------------------------------------------
+
+// Plugins can define tokens which will be parsed by the Variables plugin.
+
+#define MS_VARS_REGISTERTOKEN "Vars/RegisterToken"
+
+// With this service you can define your own token. The newly added tokens
+// using this service are taken into account on every call to
+// MS_VARS_FORMATSTRING.
+
+// Parameters:
+// ------------------------
+// wParam = 0
+// lParam = (LPARAM)(TOKENREGISTER*)&tr
+// See below.
+
+// Return Value:
+// ------------------------
+// Returns 0 on success, nonzero otherwise. Existing tokens will be
+// 'overwritten' if registered twice.
+
+// Needed for szService and parseFunction:
+typedef struct {
+ int cbSize; // You need to check if this is >=sizeof(ARGUMENTSINFO)
+ // (already filled in).
+ FORMATINFO *fi; // Arguments passed to MS_VARS_FORMATSTRING.
+ unsigned int argc; // Number of elements in the argv array.
+ union {
+ char **argv; // Argv[0] will be the token name, the following elements
+ // are the additional arguments.
+ WCHAR **wargv; // If the registered token was registered as a unicode
+ // token, wargv should be accessed.
+ TCHAR **targv;
+ };
+ int flags; // (output) You can set flags here (initially 0), use the
+ // AIF_* flags (see below).
+} ARGUMENTSINFO;
+
+// Available flags for ARGUMENTSINFO:
+// Set the flags of the ARGUMENTSINFO struct to any of these to influence
+// further parsing.
+#define AIF_DONTPARSE 0x01 // Don't parse the result of this function,
+ // usually the result of a token is parsed
+ // again, if the `?` is used as a function
+ // character.
+#define AIF_FALSE 0x02 // The function returned logical false.
+
+// Definition of parse/cleanup functions:
+typedef char* (*VARPARSEFUNCA)(ARGUMENTSINFO *ai);
+typedef WCHAR* (*VARPARSEFUNCW)(ARGUMENTSINFO *ai);
+typedef void (*VARCLEANUPFUNCA)(char *szReturn);
+typedef void (*VARCLEANUPFUNCW)(WCHAR *wszReturn);
+
+#if defined(UNICODE) || defined(_UNICODE)
+#define VARPARSEFUNC VARPARSEFUNCW
+#define VARCLEANUPFUNC VARCLEANUPFUNCW
+#else
+#define VARPARSEFUNC VARPARSEFUNCA
+#define VARCLEANUPFUNC VARCLEANUPFUNCA
+#endif
+
+typedef struct {
+ int cbSize; // Set this to sizeof(TOKENREGISTER).
+ union {
+ char *szTokenString; // Name of the new token to be created, without %,
+ // ?, ! etc. signs (can't be NULL).
+ WCHAR *wszTokenString;
+ TCHAR *tszTokenString;
+ };
+ union {
+ char *szService; // Name of a service that is used to request the
+ // token's value, if no service is used, a function
+ // and TRF_PARSEFUNC must be used.
+ VARPARSEFUNCA parseFunction; // See above, use with TRF_PARSEFUNC.
+ VARPARSEFUNCW parseFunctionW;
+ VARPARSEFUNC parseFunctionT;
+ };
+ union {
+ char *szCleanupService; // Name of a service to be called when the
+ // memory allocated in szService can be freed
+ // (only used when flag VRF_CLEANUP is set,
+ // else set this to NULL).
+ VARCLEANUPFUNCA cleanupFunction; // See above, use with TRF_CLEANUPFUNC.
+ VARCLEANUPFUNCW cleanupFunctionW;
+ VARCLEANUPFUNC cleanupFunctionT;
+ };
+ char *szHelpText; // Help info shown in help dialog (can be NULL). Has to
+ // be in the following format:
+ // "subject\targuments\tdescription"
+ // (Example: "math\t(x, y ,...)\tx + y + ..."), or:
+ // "subject\tdescription"
+ // (Example: "miranda\tPath to the Miranda-IM
+ // executable").
+ // Note: subject and description are translated by
+ // Variables.
+ int memType; // Describes which method Varibale's plugin needs to use to
+ // free the returned buffer, use one of the VR_MEM_* values
+ // (see below). Only valid if the flag VRF_FREEMEM is set,
+ // use TR_MEM_OWNER otherwise).
+ int flags; // Flags to use (see below), one of TRF_* (see below).
+} TOKENREGISTER;
+
+// Available Memory Storage Types:
+// These values describe which method Variables Plugin will use to free the
+// buffer returned by the parse function or service
+#define TR_MEM_VARIABLES 1 // Memory is allocated using the functions
+ // retrieved by MS_VARS_GET_MMI.
+#define TR_MEM_MIRANDA 2 // Memory is allocated using Miranda's Memory
+ // Manager Interface (using the functions
+ // returned by MS_SYSTEM_GET_MMI), if
+ // VRF_FREEMEM is set, the memory will be
+ // freed by Variables.
+#define TR_MEM_OWNER 3 // Memory is owned by the calling plugin
+ // (can't be freed by Variables Plugin
+ // automatically). This should be used if
+ // VRF_FREEMEM is not specified in the flags.
+
+// Available Flags for TOKENREGISTER:
+#define TRF_FREEMEM 0x01 // Variables Plugin will automatically free the
+ // pointer returned by the parse function or
+ // service (which method it will us is
+ // specified in memType -> see above).
+#define TRF_CLEANUP 0x02 // Call cleanup service or function, notifying
+ // that the returned buffer can be freed.
+ // Normally you should use either TRF_FREEMEM
+ // or TRF_CLEANUP.
+#define TRF_PARSEFUNC 0x40 // parseFunction will be used instead of a
+ // service.
+#define TRF_CLEANUPFUNC 0x80 // cleanupFunction will be used instead of a
+ // service.
+#define TRF_USEFUNCS TRF_PARSEFUNC|TRF_CLEANUPFUNC
+#define TRF_UNPARSEDARGS 0x04 // Provide the arguments for the parse
+ // function in their raw (unparsed) form.
+ // By default, arguments are parsed before
+ // presenting them to the parse function.
+#define TRF_FIELD 0x08 // The token can be used as a %field%.
+#define TRF_FUNCTION 0x10 // The token can be used as a ?function().
+ // Normally you should use either TRF_FIELD or
+ // TRF_FUNCTION.
+#define TRF_UNICODE 0x20 // Strings in structure are unicode (WCHAR*).
+ // In this case, the strings pointing to the
+ // arguments in the ARGUMENTS struct are
+ // unicode also. The returned buffer is
+ // expected to be unicode also, and the
+ // unicode parse and cleanup functions are
+ // called.
+
+#if defined(UNICODE) || defined(_UNICODE)
+#define TRF_TCHAR TRF_UNICODE // Strings in structure are TCHAR*.
+#else
+#define TRF_TCHAR 0
+#endif
+
+// Deprecated:
+#define TRF_CALLSVC TRF_CLEANUP
+
+// Callback Service (szService) / parseFunction:
+// ------------------------
+// Service that is called automatically by the Variable's Plugin to resolve a
+// registered variable.
+
+// Parameters:
+// wParam = 0
+// lParam = (LPARAM)(ARGUMENTSINFO *)&ai
+// see above
+
+// Return Value:
+// Needs to return the pointer to a dynamically allocacated string or NULL.
+// A return value of NULL is regarded as an error (eCount will be increaded).
+// Flags in the ARGUMENTSINFO struct can be set (see above).
+
+// Callback Service (szCallbackService) / cleanupFunction:
+// ------------------------
+// This service is called when the memory that was allocated by the parse
+// function or service can be freed. Note: It will only be called when the
+// flag VRF_CLEANUP of TOKENREGISTER is set.
+
+// Parameters:
+// wParam = 0
+// lParam = (LPARAM)(char *)&res
+// Result from parse function or service (pointer to a string).
+
+// Return Value:
+// Should return 0 on success.
+
+
+
+// --------------------------------------------------------------------------
+// Show the help dialog
+// --------------------------------------------------------------------------
+
+// Plugins can invoke Variables' help dialog which can be used for easy input
+// by users.
+
+#define MS_VARS_SHOWHELPEX "Vars/ShowHelpEx"
+
+// This service can be used to open the help dialog of Variables. This dialog
+// provides easy input for the user and/or information about the available
+// tokens.
+
+// Parameters:
+// ------------------------
+// wParam = (WPARAM)(HWND)hwndParent
+// lParam = (LPARAM)(VARHELPINFO)&vhi
+// See below.
+
+// Return Value:
+// ------------------------
+// Returns 0 on succes, any other value on error.
+
+typedef struct {
+ int cbSize; // Set to sizeof(VARHELPINFO).
+ FORMATINFO *fi; // Used for both input and output. If this pointer is not
+ // NULL, the information is used as the initial values for
+ // the dialog.
+ HWND hwndCtrl; // Used for both input and output. The window text of this
+ // window will be read and used as the initial input of the
+ // input dialog. If the user presses the OK button the window
+ // text of this window will be set to the text of the input
+ // field and a EN_CHANGE message via WM_COMMAND is send to
+ // this window. (Can be NULL).
+ char *szSubjectDesc; // The description of the %subject% token will be set
+ // to this text, if not NULL. This is translated
+ // automatically.
+ char *szExtraTextDesc; // The description of the %extratext% token will be
+ // set to this text, if not NULL. This is translated
+ // automatically.
+ int flags; // Flags, see below.
+} VARHELPINFO;
+
+
+// Flags for VARHELPINFO
+#define VHF_TOKENS 0x00000001 // Create a dialog with the list of
+ // tokens
+#define VHF_INPUT 0x00000002 // Create a dialog with an input
+ // field (this contains the list of
+ // tokens as well).
+#define VHF_SUBJECT 0x00000004 // Create a dialog to select a
+ // contact for the %subject% token.
+#define VHF_EXTRATEXT 0x00000008 // Create a dialog to enter a text
+ // for the %extratext% token.
+#define VHF_HELP 0x00000010 // Create a dialog with help info.
+#define VHF_HIDESUBJECTTOKEN 0x00000020 // Hide the %subject% token in the
+ // list of tokens.
+#define VHF_HIDEEXTRATEXTTOKEN 0x00000040 // Hide the %extratext% token in
+ // the list of tokens.
+#define VHF_DONTFILLSTRUCT 0x00000080 // Don't fill the struct with the
+ // new information if OK is pressed
+#define VHF_FULLFILLSTRUCT 0x00000100 // Fill all members of the struct
+ // when OK is pressed. By default
+ // only szFormat is set. With this
+ // flag on, hContact and
+ // szExtraText are also set.
+#define VHF_SETLASTSUBJECT 0x00000200 // Set the last contact that was
+ // used in the %subject% dialog in
+ // case fi.hContact is NULL.
+
+// Predefined flags
+#define VHF_FULLDLG VHF_INPUT|VHF_SUBJECT|VHF_EXTRATEXT|VHF_HELP
+#define VHF_SIMPLEDLG VHF_INPUT|VHF_HELP
+#define VHF_NOINPUTDLG VHF_TOKENS|VHF_HELP
+
+// If the service fills information in the struct for szFormat or szExtraText,
+// these members must be free'd using the free function of Variables.
+// If wParam==NULL, the dialog is created modeless. Only one dialog can be
+// shown at the time.
+// If both hwndCtrl and fi are NULL, the user input will not be retrievable.
+// In this case, the dialog is created with only a "Close" button, instead of
+// the "OK" and "Cancel" buttons.
+// In case of modeless dialog and fi != NULL, please make sure this pointer
+// stays valid while the dialog is open.
+
+// Helper function for easy use in standard case:
+#ifndef VARIABLES_NOHELPER
+__inline static int variables_showhelp(HWND hwndDlg, UINT uIDEdit, int flags, char *szSubjectDesc, char *szExtraDesc) {
+
+ VARHELPINFO vhi;
+
+ ZeroMemory(&vhi, sizeof(VARHELPINFO));
+ vhi.cbSize = sizeof(VARHELPINFO);
+ if (flags == 0) {
+ flags = VHF_SIMPLEDLG;
+ }
+ vhi.flags = flags;
+ vhi.hwndCtrl = GetDlgItem(hwndDlg, uIDEdit);
+ vhi.szSubjectDesc = szSubjectDesc;
+ vhi.szExtraTextDesc = szExtraDesc;
+
+ return CallService(MS_VARS_SHOWHELPEX, (WPARAM)hwndDlg, (LPARAM)&vhi);
+}
+#endif
+
+
+#define MS_VARS_GETSKINITEM "Vars/GetSkinItem"
+
+// This service can be used to get the icon you can use for example on the
+// Variables help button in your options screen. You can also get the tooltip
+// text to use with such a button. If icon library is available the icon will
+// be retrieved from icon library manager, otherwise the default is returned.
+
+// Parameters:
+// ------------------------
+// wParam = (WPARAM)0
+// lParam = (LPARAM)VSI_* (see below)
+
+// Return Value:
+// ------------------------
+// Depends on the information to retrieve (see below).
+
+// VSI_ constants
+#define VSI_HELPICON 1 // Can be used on the button accessing the
+ // Variables help dialog. Returns (HICON)hIcon on
+ // success or NULL on failure;
+#define VSI_HELPTIPTEXT 2 // Returns the tooltip text you can use for the
+ // help button. Returns (char *)szTipText, a
+ // static, translated buffer containing the help
+ // text or NULL on error.
+
+// Helper to set the icon on a button accessing the help dialog.
+// Preferably a 16x14 MButtonClass control, but it works on a standard
+// button control as well. If no icon is availble (because of old version of
+// Variables) the string "V" is shown on the button. If Variables is not
+// available, the button will be hidden.
+#ifndef VARIABLES_NOHELPER
+__inline static int variables_skin_helpbutton(HWND hwndDlg, UINT uIDButton) {
+
+ int res;
+ HICON hIcon;
+ TCHAR tszClass[32];
+
+ hIcon = NULL;
+ res = 0;
+ if (ServiceExists(MS_VARS_GETSKINITEM))
+ hIcon = (HICON)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPICON);
+
+ GetClassName(GetDlgItem(hwndDlg, uIDButton), tszClass, SIZEOF(tszClass));
+ if (!_tcscmp(tszClass, _T("Button"))) {
+ if (hIcon != NULL) {
+ SetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)|BS_ICON);
+ SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
+ }
+ else {
+ SetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE, GetWindowLongPtr(GetDlgItem(hwndDlg, uIDButton), GWL_STYLE)&~BS_ICON);
+ SetDlgItemText(hwndDlg, uIDButton, _T("V"));
+ }
+ }
+ else if (!_tcscmp(tszClass, MIRANDABUTTONCLASS)) {
+ if (hIcon != NULL) {
+ char *szTipInfo = NULL;
+
+ SendMessage(GetDlgItem(hwndDlg, uIDButton), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
+ if (ServiceExists(MS_VARS_GETSKINITEM))
+ szTipInfo = (char *)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPTIPTEXT);
+
+ if (szTipInfo == NULL)
+ szTipInfo = Translate("Open String Formatting Help");
+
+ SendMessage(GetDlgItem(hwndDlg, uIDButton), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
+ SendDlgItemMessage(hwndDlg, uIDButton, BUTTONSETASFLATBTN, 0, 0);
+ }
+ else SetDlgItemText(hwndDlg, uIDButton, _T("V"));
+ }
+ else res = -1;
+
+ ShowWindow(GetDlgItem(hwndDlg, uIDButton), ServiceExists(MS_VARS_FORMATSTRING));
+
+ return res;
+}
+#endif
+
+
+#define MS_VARS_SHOWHELP "Vars/ShowHelp"
+
+// WARNING: This service is obsolete, please use MS_VARS_SHOWHELPEX
+
+// Shows a help dialog where all possible tokens are displayed. The tokens
+// are explained on the dialog, too. The user can edit the initial string and
+// insert as many tokens as he likes.
+
+// Parameters:
+// ------------------------
+// wParam = (HWND)hwndEdit
+// Handle to an edit control in which the modified string
+// should be inserted (When the user clicks OK in the dialog the edited
+// string will be set to hwndEdit) (can be NULL).
+// lParam = (char *)pszInitialString
+// String that the user is provided with initially when
+// the dialog gets opened (If this is NULL then the current text in the
+// hwndEdit edit control will be used) (can be NULL).
+
+// Return Value:
+// ------------------------
+// Returns the handle to the help dialog (HWND).
+
+// Note: Only one help dialog can be opened at a time. When the dialog gets
+// closed an EN_CHANGE of the edit controll will be triggered because the
+// contents were updated. (Only when user selected OK).
+
+// Example:
+// CallService(MS_VARS_SHOWHELP, (WPARAM)hwndEdit, (LPARAM)"some initial text");
+
+// --------------------------------------------------------------------------
+// Retrieve a contact's HANDLE given a string
+// --------------------------------------------------------------------------
+
+#define MS_VARS_GETCONTACTFROMSTRING "Vars/GetContactFromString"
+
+// Searching for contacts in the database. You can find contacts in db by
+// searching for their name, e.g first name.
+
+// Parameters:
+// ------------------------
+// wParam = (WPARAM)(CONTACTSINFO *)&ci
+// See below.
+// lParam = 0
+
+// Return Value:
+// ------------------------
+// Returns number of contacts found matching the given string representation.
+// The hContacts array of CONTACTSINFO struct contains these hContacts after
+// the call.
+
+// Note: The hContacts array needs to be freed after use using
+// MS_VARS_FREEMEMORY.
+
+typedef struct {
+ int cbSize; // Set this to sizeof(CONTACTSINFO).
+ union {
+ char *szContact; // String to search for, e.g. last name (can't be NULL).
+ WCHAR *wszContact;
+ TCHAR *tszContact;
+ };
+ HANDLE *hContacts; // (output) Array of contacts found.
+ DWORD flags; // Contact details that will be matched with the search
+ // string (flags can be combined).
+} CONTACTSINFO;
+
+// Possible flags:
+#define CI_PROTOID 0x00000001 // The contact in the string is encoded
+ // in the format <PROTOID:UNIQUEID>, e.g.
+ // <ICQ:12345678>.
+#define CI_NICK 0x00000002 // Search nick names.
+#define CI_LISTNAME 0x00000004 // Search custom names shown in contact
+ // list.
+#define CI_FIRSTNAME 0x00000008 // Search contact's first names (contact
+ // details).
+#define CI_LASTNAME 0x00000010 // Search contact's last names (contact
+ // details).
+#define CI_EMAIL 0x00000020 // Search contact's email adresses
+ // (contact details).
+#define CI_UNIQUEID 0x00000040 // Search unique ids of the contac, e.g.
+ // UIN.
+#define CI_CNFINFO 0x40000000 // Searches one of the CNF_* flags (set
+ // flags to CI_CNFINFO|CNF_X), only one
+ // CNF_ type possible
+#define CI_UNICODE 0x80000000 // tszContact is a unicode string
+ // (WCHAR*).
+
+#if defined(UNICODE) || defined(_UNICODE)
+#define CI_TCHAR CI_UNICODE // Strings in structure are TCHAR*.
+#else
+#define CI_TCHAR 0
+#endif
+
+
+
+#endif //__M_VARS
diff --git a/useactions/UpgradeLog.XML b/useactions/UpgradeLog.XML new file mode 100644 index 0000000..fd6b370 --- /dev/null +++ b/useactions/UpgradeLog.XML @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type='text/xsl' href='_UpgradeReport_Files/UpgradeReport.xslt'?><UpgradeLog>
+<Properties><Property Name="Solution" Value="UseActions_10">
+</Property><Property Name="Solution File" Value="D:\Sources\svn.miranda.im\useactions\trunk\UseActions_10.sln">
+</Property><Property Name="Date" Value="13 февраля 2011 г.">
+</Property><Property Name="Time" Value="1:38">
+</Property></Properties><Event ErrorLevel="0" Project="UseActions_10" Source="UseActions_10.vcproj" Description="Converting project file 'D:\Sources\svn.miranda.im\useactions\trunk\UseActions_10.vcproj'.">
+</Event><Event ErrorLevel="1" Project="UseActions_10" Source="UseActions_10.vcproj" Description="VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.">
+</Event><Event ErrorLevel="1" Project="UseActions_10" Source="UseActions_10.vcproj" Description="MSB8012: $(TargetPath) ('D:\Sources\svn.miranda.im\useactions\trunk\..\..\..\..\testmir\Plugins\UseActions.dll') does not match the Linker's OutputFile property value '..\..\..\..\testmir\Plugins\UseActions.dll' ('D:\testmir\Plugins\UseActions.dll') in project configuration 'Debug (Unicode)|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).">
+</Event><Event ErrorLevel="0" Project="UseActions_10" Source="UseActions_10.vcproj" Description="Done converting to new project file 'D:\Sources\svn.miranda.im\useactions\trunk\UseActions_10.vcxproj'.">
+</Event><Event ErrorLevel="3" Project="UseActions_10" Source="UseActions_10.vcproj" Description="Converted">
+</Event><Event ErrorLevel="0" Project="" Source="UseActions_10.sln" Description="Solution converted successfully">
+</Event><Event ErrorLevel="3" Project="" Source="UseActions_10.sln" Description="Converted">
+</Event></UpgradeLog>
\ No newline at end of file diff --git a/useactions/UseActions.c b/useactions/UseActions.c new file mode 100644 index 0000000..9824a88 --- /dev/null +++ b/useactions/UseActions.c @@ -0,0 +1,1345 @@ +#pragma warning( disable : 4100 )
+
+#include "common.h"
+#include "res\version.h"
+#include "res\resource.h"
+#include "UseActions.h"
+
+#define TABTOOLBAR_INITPOS 350
+
+struct LIST_INTERFACE li = { 0 };
+struct MM_INTERFACE mmi;
+
+SortedList ActionItemsList = {0};
+TCHAR tszMyPath[MAX_PATH];
+
+HANDLE hEventOptInit;
+
+HANDLE hModulesLoaded;
+HANDLE hPreBuildMMenu;
+HANDLE hPreBuildCMenu;
+HANDLE hActionsChanged;
+HANDLE hMTBHook;
+HANDLE hTTBHook;
+HANDLE hTabBBLoadHook;
+HANDLE hTabBBPressHook;
+HANDLE hServiceWithLParam;
+
+BOOL bActionsDefined;
+BOOL bTTBPresents;
+BOOL bTabBBPresents;
+BOOL bMTBPresents;
+BOOL bCoreHotkeyPresents;
+BOOL bVariablePresents;
+BOOL bTrayMenuPresents;
+
+DWORD MMenuSeparator, CMenuSeparator;
+
+int ModulesLoaded(WPARAM wParam, LPARAM lParam);
+
+int ReadSetting(MyActionItem* ActionItem);
+void WriteSetting(MyActionItem* ActionItem);
+void SetAllActionUsers(MyActionItem* ActionItem);
+static int CompareActions(MyActionItem* c1, MyActionItem* c2 );
+
+HANDLE AddMainMenuItem(MyActionItem* ActionItem);
+void DeleteMainMenuItem(MyActionItem* ActionItem);
+int PreBuildMainMenu(WPARAM wParam,LPARAM lParam);
+HANDLE AddContactMenuItem(MyActionItem* ActionItem);
+void DeleteContactMenuItem(MyActionItem* ActionItem);
+int PreBuildContactMenu(WPARAM wParam,LPARAM lParam);
+HANDLE AddTrayMenuItem(MyActionItem* ActionItem);
+void DeleteTrayMenuItem(MyActionItem* ActionItem);
+
+HANDLE AddRootMenuIcon(TCHAR* tszCMenuPopup);
+
+HANDLE AddMTBButton(MyActionItem* ActionItem);
+void DeleteMTBButton(MyActionItem* ActionItem);
+int OnMTBLoaded(WPARAM wParam, LPARAM lParam);
+HANDLE AddTTBButton(MyActionItem* ActionItem);
+void DeleteTTBButton(MyActionItem* ActionItem);
+int OnTTBLoaded(WPARAM wParam, LPARAM lParam);
+BOOL AddTabBBButton(MyActionItem* ActionItem);
+void DeleteTabBBButton(MyActionItem* ActionItem);
+int OnTabBBLoaded(WPARAM wParam, LPARAM lParam);
+int OnTabButtonPressed(WPARAM wParam,LPARAM lParam);
+HANDLE AddIcolibIcon (MyActionItem* ActionItem);
+void DeleteIcolibIcon(MyActionItem* ActionItem);
+int AddCoreHotkey(MyActionItem* ActionItem);
+void DeleteCoreHotkey(MyActionItem* ActionItem);
+
+static int ServiceCallWithLParam (WPARAM wParam, LPARAM lParam);
+static int ServiceCallWithFParam (WPARAM wParam, LPARAM lParam, LPARAM fParam);
+int ActionsChanged(WPARAM wParam, LPARAM lParam);
+void AddActionItem(TChain NewAction, int Index);
+void SetActionDesc(MyActionItem* ActionItem, TChain NewAction);
+void DeleteActionItem(MyActionItem* ActionItem, int ActionIndex);
+
+int OptInit(WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+void FillListViewWithActions();
+int OptActiveItem;
+HWND hListView;
+HIMAGELIST hImageListView;
+HWND hDialogWIndow;
+BOOL bRefreshing;
+
+///////////////////////////////////////////////
+// Common Plugin Stuff
+///////////////////////////////////////////////
+HINSTANCE hInst;
+PLUGINLINK *pluginLink;
+
+PLUGININFOEX pluginInfo={
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESC,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ 0,
+ MIID_USEACTIONS
+};
+
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) {
+ hInst=hinstDLL;
+ return TRUE;
+}
+
+__declspec (dllexport) int Load(PLUGINLINK *link) {
+ pluginLink = link;
+ mir_getLI(&li);
+ mir_getMMI( &mmi );
+ ActionItemsList = *(li.List_Create( 0, 1));
+ ActionItemsList.sortFunc = CompareActions;
+
+ hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+
+ GetModuleFileName(hInst, tszMyPath, MAX_PATH);
+
+ return 0;
+}
+
+__declspec (dllexport) int Unload(void) {
+ int i;
+ UnhookEvent(hModulesLoaded);
+ UnhookEvent(hActionsChanged);
+ UnhookEvent(hPreBuildMMenu);
+ UnhookEvent(hPreBuildCMenu);
+ UnhookEvent(hMTBHook);
+ UnhookEvent(hTabBBLoadHook);
+ UnhookEvent(hTTBHook);
+ UnhookEvent(hEventOptInit);
+ UnhookEvent(hTabBBPressHook);
+ DestroyServiceFunction(hServiceWithLParam);
+ for (i=ActionItemsList.realCount-1; i>=0;i--) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ DestroyServiceFunction(ActItem->hMenuService);
+ mir_free(ActItem);
+ }
+ li.List_Destroy(&ActionItemsList);
+ return 0;
+}
+
+__declspec (dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) {
+ return &pluginInfo;
+}
+
+/*
+// uncomment this for pre 0.7 compatibility
+extern "C" __declspec (dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion) {
+ pluginInfo.cbSize = sizeof(PLUGININFO);
+ return (PLUGININFO*)&pluginInfo;
+}
+*/
+
+static const MUUID interfaces[] = {MIID_USEACTIONS, MIID_LAST};
+__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void){
+ return interfaces;
+}
+
+static int CompareActions(MyActionItem* c1, MyActionItem* c2 ){
+ return c1->dwActID - c2->dwActID;
+}
+
+void AddActionItem(TChain NewAction, int Index) {
+ MyActionItem *ActItem = mir_calloc(sizeof(MyActionItem));
+ ActItem->dwActID = NewAction.ID;
+ ActItem->wSortIndex = Index;
+ //li.List_Insert(&ActionItemsList, ActItem, ActionItemsList.realCount);
+ li.List_InsertPtr(&ActionItemsList, ActItem);
+
+ SetActionDesc(ActItem, NewAction);
+ mir_snprintf(ActItem->szNameID,32,"%s/Action_%u", MODULE,NewAction.ID);
+
+ // register all for test
+ /*ActItem->wFlags = 0xFFFF;
+ _tcsncpy(ActItem->tszMMenuPopup, _T("TestMMenuPopup"), MAX_ACT_DESC_LEN);
+ _tcsncpy(ActItem->tszCMenuPopup, _T("TestCMenuPopup"), MAX_ACT_DESC_LEN);
+ _tcsncpy(ActItem->tszCMenuVarStr, _T("?if(?strcmp(?dbsetting(%subject%,CList,MyHandle),TestNick),1,0)"), MAX_ACT_DESC_LEN);
+ */
+ ReadSetting(ActItem);
+ SetAllActionUsers(ActItem);
+}
+
+void DeleteActionItem(MyActionItem* ActionItem, int ActionIndex) {
+ /*ActionItem->wFlags = UAF_NONE;
+ SetAllActionUsers(ActionItem);
+ DeleteIcolibIcon(ActionItem);*/
+ char text[200], *szDest;
+ mir_snprintf(text, 32, "Act%u_", ActionItem->dwActID);
+ szDest = text + strlen(text);
+
+ strcpy(szDest, "Flags");
+ DBDeleteContactSetting(NULL, MODULE, text);
+
+ // delete icon for action to icolib
+ DeleteIcolibIcon(ActionItem);
+
+ // core hotkeys
+ if (ActionItem->wFlags & UAF_REGHOTKEY) {
+ DeleteCoreHotkey(ActionItem);
+ }
+
+ // CList_Modern toolbar buttons
+ if (ActionItem->wFlags & UAF_REGMTBB) {
+ DeleteMTBButton(ActionItem);
+ }
+
+ // TopToolBar buttons
+ if (ActionItem->wFlags & UAF_REGTTBB) {
+ DeleteTTBButton(ActionItem);
+ }
+
+ // TabButtonBar buttons
+ if (ActionItem->wFlags & UAF_REGTABB) {
+ DeleteTabBBButton(ActionItem);
+ }
+
+ // MainMenu items
+ if (ActionItem->wFlags & UAF_REGMMENU) {
+ DeleteMainMenuItem(ActionItem);
+ strcpy(szDest, "MMenuPopup");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ strcpy(szDest, "MMenuName");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ }
+
+ // ContactMenu items
+ if (ActionItem->wFlags & UAF_REGCMENU) {
+ DeleteContactMenuItem(ActionItem);
+ strcpy(szDest, "CMenuPopup");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ strcpy(szDest, "CMenuName");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ strcpy(szDest, "CMenuVarStr");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ }
+ // TrayMenu items
+ if (ActionItem->wFlags & UAF_REGTMENU) {
+ DeleteTrayMenuItem(ActionItem);
+ strcpy(szDest, "TMenuPopup");
+ DBDeleteContactSetting(NULL, MODULE, text);
+ }
+
+ if (!(ActionItem->wFlags & (UAF_REGMMENU | UAF_REGCMENU | UAF_REGTMENU)) && (ActionItem->hMenuService != NULL)) {
+ DestroyServiceFunction(ActionItem->hMenuService);
+ ActionItem->hMenuService = NULL;
+ }
+
+ // FirstRun
+ strcpy(szDest, "FirstRun");
+ DBDeleteContactSetting(NULL, MODULE, text);
+
+ li.List_Remove(&ActionItemsList, ActionIndex);
+}
+
+int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
+ int ActionsCount;
+ DWORD* pActionStructLen = {0};
+ PChain pActionsList = {0};
+ //ACTION* pActionsList2 = {0};
+ bActionsDefined = FALSE;
+ if (ServiceExists(MS_ACT_GETLIST)) {
+ hEventOptInit = HookEvent(ME_OPT_INITIALISE, OptInit);
+ hPreBuildMMenu = HookEvent(ME_CLIST_PREBUILDMAINMENU, PreBuildMainMenu);
+ hPreBuildCMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PreBuildContactMenu);
+
+ hActionsChanged = HookEvent(ME_ACT_CHANGED, ActionsChanged);
+ hMTBHook = HookEvent(ME_TB_MODULELOADED, OnMTBLoaded);
+ hTTBHook = HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);
+ hTabBBLoadHook = HookEvent(ME_MSG_TOOLBARLOADED, OnTabBBLoaded);
+
+ if (ServiceExists(MS_TB_ADDBUTTON))
+ OnMTBLoaded(0,0);
+ if (ServiceExists(MS_BB_ADDBUTTON))
+ OnTabBBLoaded(0,0);
+// ActionsCount = CallService(MS_ACT_GETLIST, (WPARAM)0, (LPARAM)&pActionsList);
+ ActionsCount = CallService(MS_ACT_GETLIST, (WPARAM)0, (LPARAM)&pActionStructLen);
+ if (ActionsCount > 0) {
+ int i;
+ DWORD dwActionStructLen = *pActionStructLen;
+ pActionsList = (PChain)(pActionStructLen + 1);
+ bActionsDefined = TRUE;
+// pActionsList2 = pActionsList;
+
+ //bMTBPresents = ServiceExists(MS_TB_ADDBUTTON) && bActionsDefined;
+ bTTBPresents = ServiceExists(MS_TTB_ADDBUTTON) && bActionsDefined;
+ bCoreHotkeyPresents = ServiceExists(MS_HOTKEY_REGISTER);
+ bVariablePresents = ServiceExists(MS_VARS_FORMATSTRING);
+ bTrayMenuPresents = ServiceExists(MS_CLIST_ADDTRAYMENUITEM);
+
+ hServiceWithLParam = CreateServiceFunction(SERVICE_WITH_LPARAM_NAME,&ServiceCallWithLParam);
+ for (i=0;i<ActionsCount;i++) {
+ AddActionItem(*pActionsList, i);
+ pActionsList = (PChain)((BYTE*)pActionsList + dwActionStructLen);
+ }
+// CallService(MS_ACT_FREELIST, (WPARAM)0, (LPARAM)pActionsList2);
+ CallService(MS_ACT_FREELIST, (WPARAM)0, (LPARAM)pActionStructLen);
+ }
+
+
+ if(ServiceExists(MS_UPDATE_REGISTER)) {
+ // register with updater
+ Update update = {0};
+ char szVersion[16];
+ update.cbSize = sizeof(Update);
+ update.szComponentName = pluginInfo.shortName;
+ update.pbVersion = (BYTE *)CreateVersionString(pluginInfo.version, szVersion);
+ update.cpbVersion = (int)strlen((char *)update.pbVersion);
+ update.szBetaUpdateURL = "http://vasilich.org/mim/Updater/UseActions/UseActions.zip";
+ update.szBetaChangelogURL = "http://vasilich.org/mim/Updater/UseActions/Changelog.txt";
+ update.szBetaVersionURL = "http://vasilich.org/mim/Updater/UseActions/Changelog.txt";
+ update.pbBetaVersionPrefix = (BYTE *)"UseActions Plugin, version ";
+ update.cpbBetaVersionPrefix = (int)strlen((char *)update.pbBetaVersionPrefix);
+ CallService(MS_UPDATE_REGISTER, 0, (LPARAM)&update);
+ }
+ CallService(MS_ACT_RUNBYNAME, (WPARAM)_T("#Autostart"), 0);
+ }
+ else {
+ UnhookEvent(hEventOptInit);
+ MessageBox(NULL,
+ TranslateT("No actions manager (ActMan) plugin found.\n\rYou can't use UseActions plugin without ActMan.\n\rUseActions will not be loaded."),
+ TranslateT("Error loading actions"),
+ MB_OK + MB_ICONERROR);
+ }
+ return 0;
+}
+
+void SetAllActionUsers(MyActionItem* ActionItem) {
+ // add icon for action to icolib
+ ActionItem->hIcolibIcon = AddIcolibIcon(ActionItem);
+ // core hotkeys
+ if (ActionItem->wFlags & UAF_REGHOTKEY) {
+ ActionItem->bReggedHotkey = AddCoreHotkey(ActionItem);
+ }
+ else {
+ DeleteCoreHotkey(ActionItem);
+ }
+ // CList_Modern toolbar buttons
+ if (ActionItem->wFlags & UAF_REGMTBB) {
+ ActionItem->hMTBButton = AddMTBButton(ActionItem);
+ }
+ else {
+ DeleteMTBButton(ActionItem);
+ }
+ // TopToolBar buttons
+ if (ActionItem->wFlags & UAF_REGTTBB) {
+ ActionItem->hTTBButton = AddTTBButton(ActionItem);
+ }
+ else {
+ DeleteTTBButton(ActionItem);
+ }
+ // MainMenu items
+ if (ActionItem->wFlags & UAF_REGMMENU) {
+ ActionItem->hMainMenuItem = AddMainMenuItem(ActionItem);
+ }
+ else {
+ DeleteMainMenuItem(ActionItem);
+ }
+ // ContactMenu items
+ if (ActionItem->wFlags & UAF_REGCMENU) {
+ ActionItem->hContactMenuItem = AddContactMenuItem(ActionItem);
+ }
+ else {
+ DeleteContactMenuItem(ActionItem);
+ }
+ // TrayMenu items
+ if (ActionItem->wFlags & UAF_REGTMENU) {
+ ActionItem->hTrayMenuItem = AddTrayMenuItem(ActionItem);
+ }
+ else {
+ DeleteTrayMenuItem(ActionItem);
+ }
+
+ if (!(ActionItem->wFlags & (UAF_REGMMENU | UAF_REGCMENU | UAF_REGTMENU)) && (ActionItem->hMenuService != NULL)) {
+ DestroyServiceFunction(ActionItem->hMenuService);
+ ActionItem->hMenuService = NULL;
+ }
+
+ // TabButtonBar buttons
+ if (ActionItem->wFlags & UAF_REGTABB) {
+ ActionItem->wReggedTabButton = AddTabBBButton(ActionItem);
+ }
+ else {
+ DeleteTabBBButton(ActionItem);
+ }
+
+ {// FirstRun
+ char szFirstRunName[32];
+ mir_snprintf(szFirstRunName, 32, "Act%u_FirstRun", ActionItem->dwActID);
+ if (DBGetContactSettingByte(0, MODULE, szFirstRunName, 0)) {
+ CallService(SERVICE_WITH_LPARAM_NAME, 0, ActionItem->dwActID);
+ DBDeleteContactSetting(0, MODULE, szFirstRunName);
+ }
+ }
+}
+
+static int ServiceCallWithLParam (WPARAM wParam, LPARAM lParam){
+ CallService(MS_ACT_RUNBYID, lParam, 0);
+ return 0;
+}
+
+static int ServiceCallWithFParam (WPARAM wParam, LPARAM lParam, LPARAM fParam){
+ CallService(MS_ACT_RUNBYID, fParam, wParam);
+ return 0;
+}
+
+int ActionsChanged(WPARAM wParam, LPARAM lParam) {
+ DWORD* pActionStructLen = {0};
+ PChain pActionsList = {0};
+ PChain pActionsList2 = {0};
+ DWORD dwActionStructLen;
+// int ActionsCount = CallService(MS_ACT_GETLIST, (WPARAM)0, (LPARAM)&pActionsList);
+ int ActionsCount = CallService(MS_ACT_GETLIST, (WPARAM)0, (LPARAM)&pActionStructLen);
+ if (ActionsCount > 0) {
+ int i;
+ dwActionStructLen = *pActionStructLen;
+ pActionsList = (PChain)(pActionStructLen + 1);
+ bActionsDefined = TRUE;
+ pActionsList2 = pActionsList;
+ //bMTBPresents = ServiceExists(MS_TB_ADDBUTTON) && bActionsDefined;
+ bTTBPresents = ServiceExists(MS_TTB_ADDBUTTON) && bActionsDefined;
+ bCoreHotkeyPresents = ServiceExists(MS_HOTKEY_REGISTER);
+ bVariablePresents = ServiceExists(MS_VARS_FORMATSTRING);
+ bTrayMenuPresents = ServiceExists(MS_CLIST_ADDTRAYMENUITEM);
+
+ if(hServiceWithLParam == NULL)
+ hServiceWithLParam = CreateServiceFunction(SERVICE_WITH_LPARAM_NAME,&ServiceCallWithLParam);
+ for (i=0;i<ActionsCount;i++) {
+ if(wParam & (ACTM_NEW | ACTM_RENAME | ACTM_SORT | ACTM_DELETE)) {
+ MyActionItem *pFoundListItem = NULL;
+ MyActionItem pTestingItem;
+ pTestingItem.dwActID = pActionsList->ID;
+ pTestingItem.wSortIndex = i;
+ pFoundListItem = li.List_Find(&ActionItemsList, &pTestingItem);
+ // if we have no item in list for this action - then add new one
+ if (pFoundListItem == NULL) {
+ AddActionItem(*pActionsList, i);
+ }
+ else {
+ if(wParam & ACTM_RENAME) {
+ if (pActionsList->Descr == NULL)
+ pActionsList->Descr = _T("");
+ SetActionDesc(pFoundListItem, *pActionsList);
+ }
+ if (wParam & (ACTM_SORT | ACTM_DELETE | ACTM_NEW)) {
+ pFoundListItem->wSortIndex = i;
+ }
+ }
+ }
+// pActionsList++;
+ pActionsList = (PChain)((BYTE*)pActionsList + dwActionStructLen);
+
+ }
+ }
+ if(wParam & ACTM_DELETE) {
+ int i,j;
+ for (j=ActionItemsList.realCount-1; j>=0;j--) {
+ BOOL bFound = FALSE;
+ PChain pActionsList3 = pActionsList2;
+ MyActionItem* ActItem = ActionItemsList.items[j];
+ for (i=0;i<ActionsCount;i++) {
+ if(pActionsList3->ID == ActItem->dwActID) {
+ bFound = TRUE;
+ break;
+ }
+ pActionsList3++;
+ }
+ if(!bFound) {
+ DeleteActionItem(ActionItemsList.items[j], j);
+ }
+ }
+ }
+ if (pActionStructLen != NULL)
+ CallService(MS_ACT_FREELIST, (WPARAM)0, (LPARAM)pActionStructLen);
+
+ ListView_DeleteAllItems(hListView);
+ ListView_DeleteColumn(hListView, 0);
+ ImageList_RemoveAll(hImageListView);
+ FillListViewWithActions();
+ return 0;
+}
+
+void SetActionDesc( MyActionItem* ActionItem, TChain NewAction ) {
+ WideCharToMultiByte(CallService(MS_LANGPACK_GETCODEPAGE,0,0), 0, NewAction.Descr, -1, ActionItem->szActDescr, MAX_ACT_DESC_LEN, NULL, NULL);
+#ifdef UNICODE
+ _tcsncpy(ActionItem->tszActDescr, NewAction.Descr, MAX_ACT_DESC_LEN);
+#else
+ strncpy(ActionItem->tszActDescr, ActionItem->szActDescr, MAX_ACT_DESC_LEN);
+#endif
+}
+int ReadSetting(MyActionItem* ActionItem){
+ DBVARIANT dbv, dbv2;
+ int result = 1;
+ char text[200], *szDest;
+ mir_snprintf(text, 32, "Act%u_", ActionItem->dwActID);
+ szDest = text + strlen(text);
+
+ strcpy(szDest, "Flags");
+ ActionItem->wFlags = DBGetContactSettingWord(NULL, MODULE, text,0);
+
+ strcpy(szDest, "MMenuPopup");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszMMenuPopup, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ strcpy(szDest, "MMenuName");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszMMenuNameVars, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ strcpy(szDest, "CMenuName");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszCMenuNameVars, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ strcpy(szDest, "CMenuPopup");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszCMenuPopup, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ strcpy(szDest, "CMenuVarStr");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv2)) {
+ _tcscpy(ActionItem->tszCMenuShowWhenVars, dbv2.ptszVal);
+ DBFreeVariant(&dbv2);
+ result++;
+ }
+ strcpy(szDest, "TMenuPopup");
+ if(!DBGetContactSettingTString(NULL, MODULE, text, &dbv)) {
+ _tcscpy(ActionItem->tszTMenuPopup, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ result++;
+ }
+ return result;
+}
+
+void WriteSetting(MyActionItem* ActionItem){
+ char text[200], *szDest;
+ mir_snprintf(text, 32, "Act%u_", ActionItem->dwActID);
+ szDest = text + strlen(text);
+
+ strcpy(szDest, "Flags");
+ if(ActionItem->wFlags == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingWord(NULL, MODULE, text, ActionItem->wFlags);
+ strcpy(szDest, "MMenuPopup");
+ if(ActionItem->tszMMenuPopup[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszMMenuPopup);
+ strcpy(szDest, "MMenuName");
+ if(ActionItem->tszMMenuNameVars[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszMMenuNameVars);
+ strcpy(szDest, "CMenuName");
+ if(ActionItem->tszCMenuNameVars[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszCMenuNameVars);
+ strcpy(szDest, "CMenuPopup");
+ if(ActionItem->tszCMenuPopup[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszCMenuPopup);
+ strcpy(szDest, "CMenuVarStr");
+ if(ActionItem->tszCMenuShowWhenVars[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszCMenuShowWhenVars);
+ strcpy(szDest, "TMenuPopup");
+ if(ActionItem->tszTMenuPopup[0] == 0)
+ DBDeleteContactSetting(NULL, MODULE, text);
+ else
+ DBWriteContactSettingTString(NULL, MODULE, text, ActionItem->tszTMenuPopup);
+}
+
+//================= Menu items =============================
+//----------------- MainMenu -------------------------------
+HANDLE AddMainMenuItem(MyActionItem* ActionItem){
+ if (!ActionItem->hMainMenuItem) {
+ //register MainMenu items
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize=sizeof(clmi);
+ clmi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB;
+ if (ActionItem->tszMMenuPopup[0] != 0) {
+ // first search if we have already created root popup with same name
+ int i;
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ // try to find root popup with same name (if we already created one)
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if ( (ActItem->tszMMenuPopup[0] != 0) &&
+ ( (!_tcscmp(ActItem->tszMMenuPopup, ActionItem->tszMMenuPopup) ) && (ActItem != ActionItem) ) ) {
+ clmi.ptszPopupName = (TCHAR*)ActItem->hMMenuRoot;
+ clmi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP;
+ //mi.position = -1999901010;
+ ActionItem->hMMenuRoot = ActItem->hMMenuRoot;
+ break;
+ }
+ }
+ if (clmi.ptszPopupName == NULL) {
+ //haven't found - then make one!
+ clmi.icolibItem = AddRootMenuIcon(ActionItem->tszMMenuPopup);
+ //then register root popup itself
+ clmi.ptszName = ActionItem->tszMMenuPopup;
+ clmi.flags |= CMIF_ROOTPOPUP;
+ clmi.pszPopupName = (char *)-1;
+ ActionItem->hMMenuRoot = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&clmi);
+ clmi.ptszPopupName = (TCHAR*)ActionItem->hMMenuRoot;
+ clmi.flags &= ~CMIF_ROOTPOPUP;
+ }
+ clmi.flags |= CMIF_CHILDPOPUP;
+ }
+ clmi.pszService = ActionItem->szNameID;
+ if (!ActionItem->hMenuService)
+ ActionItem->hMenuService = (HANDLE)CreateServiceFunctionParam(clmi.pszService, ServiceCallWithFParam, ActionItem->dwActID);
+ clmi.ptszName = ActionItem->tszActDescr;
+ //clmi.ptszPopupName = ActionItem->tszMMenuPopup[0] == 0 ? NULL : ActionItem->tszMMenuPopup;
+ clmi.icolibItem = ActionItem->hIcolibIcon;
+ if (ActionItem->wFlags & UAF_MMENUSEP) {
+ MMenuSeparator += 100000;
+ }
+ clmi.position = MMenuSeparator;
+ return (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&clmi);
+ }
+ else {
+ return ActionItem->hMainMenuItem;
+ }
+}
+
+void DeleteMainMenuItem(MyActionItem* ActionItem) {
+ if(ActionItem->hMainMenuItem) {
+ CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)ActionItem->hMainMenuItem, 0);
+ ActionItem->hMainMenuItem = NULL;
+ }
+}
+
+int PreBuildMainMenu(WPARAM wParam,LPARAM lParam){
+ int i;
+ TCHAR* tszVarResult;
+ // HANDLE hContact = (HANDLE) wParam;
+ // char* szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if(ActItem->hMainMenuItem) {
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize = sizeof(clmi);
+ clmi.flags = CMIM_NAME | CMIF_TCHAR;
+ clmi.ptszName = ActItem->tszActDescr;
+ if ( bVariablePresents &&
+ (ActItem->wFlags & UAF_REGMMENU) &&
+ (ActItem->tszMMenuNameVars[0] != 0) ) {
+ tszVarResult = variables_parse(ActItem->tszMMenuNameVars, (TCHAR *)NULL, (HANDLE) wParam);
+ if (tszVarResult[0] != 0)
+ clmi.ptszName = tszVarResult;
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) ActItem->hMainMenuItem, (LPARAM)&clmi);
+ variables_free(tszVarResult);
+ } } }
+ return 0;
+}
+
+
+//----------------- ContactMenu ----------------------------
+HANDLE AddContactMenuItem(MyActionItem* ActionItem){
+ if(!ActionItem->hContactMenuItem) {
+ //register ContactMenu items
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize=sizeof(clmi);
+ clmi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB;
+
+ //note: this code works only with patched modules/clist/clistmenus.c lines 308-312
+ //mi.ptszPopupName = ActionItem->tszCMenuPopup;
+
+ if (ActionItem->tszCMenuPopup[0] != 0) {
+ // first search if we have already created root popup with same name
+ int i;
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ // try to find root popup with same name (if we already created one)
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if ( (ActItem->tszCMenuPopup[0] != 0) &&
+ ( (!_tcscmp(ActItem->tszCMenuPopup, ActionItem->tszCMenuPopup) ) && (ActItem != ActionItem) ) ) {
+ clmi.ptszPopupName = (TCHAR*)ActItem->hCMenuRoot;
+// mi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB | CMIF_CHILDPOPUP;
+ //mi.position = -1999901010;
+ ActionItem->hCMenuRoot = ActItem->hCMenuRoot;
+ break;
+ }
+ }
+ if (clmi.ptszPopupName == NULL) {
+ //haven't found - then make one!
+ clmi.icolibItem = AddRootMenuIcon(ActionItem->tszCMenuPopup);
+ //then register root popup itself
+ clmi.ptszName = ActionItem->tszCMenuPopup;
+ clmi.flags |= CMIF_ROOTPOPUP;
+ clmi.pszPopupName = (char *)-1;
+ ActionItem->hCMenuRoot = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&clmi);
+ clmi.ptszPopupName = (TCHAR*)ActionItem->hCMenuRoot;
+ clmi.flags &= ~CMIF_ROOTPOPUP;
+ //mi.position = -1999901010;
+ }
+ clmi.flags |= CMIF_CHILDPOPUP;
+ }
+ clmi.pszService = ActionItem->szNameID;
+ if (!ActionItem->hMenuService)
+ ActionItem->hMenuService = (HANDLE)CreateServiceFunctionParam(clmi.pszService, ServiceCallWithFParam, ActionItem->dwActID);
+ clmi.ptszName = ActionItem->tszActDescr;
+ clmi.icolibItem = ActionItem->hIcolibIcon;
+ /*if (!_tcscmp(ActionItem->tszCMenuName, _T("-----"))) {
+ //mi.position += 100000;
+ }*/
+ if (ActionItem->wFlags & UAF_CMENUSEP) {
+ CMenuSeparator += 100000;
+ }
+ clmi.position = CMenuSeparator;
+
+ return (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&clmi);
+ }
+ else
+ return ActionItem->hContactMenuItem;
+}
+
+void DeleteContactMenuItem(MyActionItem* ActionItem) {
+ if(ActionItem->hContactMenuItem) {
+ CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)ActionItem->hContactMenuItem, 0);
+ ActionItem->hContactMenuItem = NULL;
+ }
+}
+
+int PreBuildContactMenu(WPARAM wParam,LPARAM lParam){
+ int i;
+ TCHAR* tszVarResult;
+ TCHAR tszVarResultCopy[MAX_ACT_DESC_LEN];
+ // HANDLE hContact = (HANDLE) wParam;
+ // char* szProto = ( char* )CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if(ActItem->hContactMenuItem) {
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize = sizeof(clmi);
+ clmi.flags = CMIM_FLAGS | CMIF_HIDDEN;
+ if ( bVariablePresents &&
+ (ActItem->wFlags & UAF_REGCMENU) &&
+ (ActItem->wFlags & UAF_CMENU_VARS) &&
+ (ActItem->tszCMenuShowWhenVars[0] != 0) ) {
+ tszVarResult = variables_parse(ActItem->tszCMenuShowWhenVars, (TCHAR *)NULL, (HANDLE) wParam);
+ if (_tcscmp(tszVarResult, _T("1")) == 0) {
+ //show menuitem
+ clmi.flags = CMIM_FLAGS;
+ }
+ variables_free(tszVarResult);
+ }
+ else if( (ActItem->wFlags & UAF_REGCMENU) && !(ActItem->wFlags & UAF_CMENU_VARS) ) {
+ //show menuitem
+ clmi.flags = CMIM_FLAGS;
+ }
+ // Name through Vars
+ if ( bVariablePresents &&
+ (ActItem->wFlags & UAF_REGCMENU) &&
+ (ActItem->tszCMenuNameVars[0] != 0) ) {
+ tszVarResult = variables_parse(ActItem->tszCMenuNameVars, (TCHAR *)NULL, (HANDLE) wParam);
+ if (tszVarResult[0] != 0) {
+ _tcsncpy(tszVarResultCopy, tszVarResult, MAX_ACT_DESC_LEN);
+ clmi.ptszName = tszVarResultCopy;
+ }
+ else
+ clmi.ptszName = ActItem->tszActDescr;
+ clmi.flags |= CMIM_NAME | CMIF_TCHAR;
+ variables_free(tszVarResult);
+ }
+ if (!_tcscmp(ActItem->tszCMenuNameVars, _T("-----"))) {
+ //clmi.flags |= CMIF_HIDDEN;
+ }
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) ActItem->hContactMenuItem, (LPARAM)&clmi);
+ }
+ }
+ return 0;
+}
+
+//----------------- TrayMenu -------------------------------
+HANDLE AddTrayMenuItem(MyActionItem* ActionItem){
+ if(bTrayMenuPresents) {
+ if (!ActionItem->hTrayMenuItem) {
+ CLISTMENUITEM clmi = {0};
+ clmi.cbSize=sizeof(clmi);
+ clmi.flags = CMIF_TCHAR | CMIF_ICONFROMICOLIB;
+ //register TrayMenu items
+ if (ActionItem->tszTMenuPopup[0] != 0) {
+ // first search if we have already created root popup with same name
+ int i;
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ // try to find root popup with same name (if we already created one)
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if ( (ActItem->tszTMenuPopup[0] != 0) &&
+ ( (!_tcscmp(ActItem->tszTMenuPopup, ActionItem->tszTMenuPopup) ) && (ActItem != ActionItem) ) ) {
+ clmi.ptszPopupName = (TCHAR*)ActItem->hTMenuRoot;
+ //mi.position = -1999901010;
+ ActionItem->hTMenuRoot = ActItem->hTMenuRoot;
+ break;
+ }
+ }
+ if (clmi.ptszPopupName == NULL) {
+ //haven't found - then make one!
+ clmi.icolibItem = AddRootMenuIcon(ActionItem->tszTMenuPopup);
+ //then register root popup itself
+ clmi.ptszName = ActionItem->tszTMenuPopup;
+ clmi.flags |= CMIF_ROOTPOPUP;
+ clmi.pszPopupName = (char *)-1;
+ ActionItem->hTMenuRoot = (HANDLE)CallService(MS_CLIST_ADDTRAYMENUITEM,0,(LPARAM)&clmi);
+ clmi.ptszPopupName = (TCHAR*)ActionItem->hTMenuRoot;
+ clmi.flags &= ~CMIF_ROOTPOPUP;
+ //mi.position = -1999901010;
+ }
+ clmi.flags |= CMIF_CHILDPOPUP;
+ }
+ clmi.pszService = ActionItem->szNameID;
+ if (!ActionItem->hMenuService)
+ ActionItem->hMenuService = (HANDLE)CreateServiceFunctionParam(clmi.pszService, ServiceCallWithFParam, ActionItem->dwActID);
+ clmi.ptszName = ActionItem->tszActDescr;
+ clmi.icolibItem = ActionItem->hIcolibIcon;
+ //if (!_tcscmp(ActionItem->tszCMenuName, _T("-----"))) {
+ //mi.position += 100000;
+ return (HANDLE)CallService(MS_CLIST_ADDTRAYMENUITEM,0,(LPARAM)&clmi);
+ }
+ else {
+ //show menuitem
+ //clmi.flags = CMIM_FLAGS;
+ //CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) ActionItem->hTrayMenuItem, (LPARAM)&clmi);
+ return ActionItem->hTrayMenuItem;
+ }
+ }
+ return NULL;
+}
+
+void DeleteTrayMenuItem(MyActionItem* ActionItem) {
+ if(ActionItem->hTrayMenuItem) {
+ CallService(MS_CLIST_REMOVETRAYMENUITEM, (WPARAM)ActionItem->hTrayMenuItem, 0);
+ ActionItem->hTrayMenuItem = NULL;
+ }
+}
+
+HANDLE AddRootMenuIcon(TCHAR* tszPopupName){
+ //first - register icon for root popup
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(sid);
+ sid.ptszSection = _T(ICOLIB_MNUSECTION);
+ sid.flags = SIDF_ALL_TCHAR;
+ sid.cx= sid.cy = 16;
+ sid.ptszDescription = tszPopupName;
+ sid.pszName = mir_t2a(tszPopupName);
+ sid.ptszDefaultFile = tszMyPath;
+ sid.iDefaultIndex = -IDI_ACTION;
+ return (HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+}
+
+//============== Toolbar Buttons ===========================
+//-------------- CList_Modern Toolbar ----------------------
+HANDLE AddMTBButton(MyActionItem* ActionItem){
+ //register CList_Modern toolbar buttons
+ if (bMTBPresents) {
+ if(!ActionItem->hMTBButton) {
+ TBButton mtButton = {0};
+ mtButton.cbSize = sizeof(mtButton);
+ mtButton.defPos = 1000;
+ mtButton.tbbFlags = TBBF_SHOWTOOLTIP|TBBF_VISIBLE;
+ mtButton.pszButtonID = ActionItem->szNameID;
+ mtButton.pszServiceName = SERVICE_WITH_LPARAM_NAME;
+ mtButton.lParam = ActionItem->dwActID;
+ mtButton.pszButtonName = mtButton.pszTooltipUp = mtButton.pszTooltipUp = ActionItem->szActDescr;
+ mtButton.hSecondaryIconHandle = mtButton.hPrimaryIconHandle = ActionItem->hIcolibIcon;
+ return (HANDLE)CallService(MS_TB_ADDBUTTON, 0, (LPARAM)&mtButton);
+ }
+ else {
+ return ActionItem->hMTBButton;
+ }
+ }
+ else
+ return NULL;
+}
+
+void DeleteMTBButton(MyActionItem* ActionItem){
+ //register CList_Modern toolbar buttons
+ if (bMTBPresents && ActionItem->hMTBButton) {
+ CallService(MS_TB_REMOVEBUTTON, (WPARAM)ActionItem->hMTBButton, 0);
+ ActionItem->hMTBButton = NULL;
+ // ask FYR to fix his CList_Modern - right now (22.03.2008) it does nothing when calling service for remove toolbar button!
+ }
+}
+
+int OnMTBLoaded(WPARAM wParam, LPARAM lParam){
+ int i;
+ bMTBPresents = TRUE;//bActionsDefined;
+// for (i=0; i<ActionItemsList.realCount;i++) {
+ for (i=ActionItemsList.realCount-1;i>=0;i--) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if (ActItem->wFlags & UAF_REGMTBB)
+ ActItem->hMTBButton = AddMTBButton(ActItem);
+ }
+ return 0;
+}
+
+//----------------- TopToolbar -----------------------------
+HANDLE AddTTBButton(MyActionItem* ActionItem){
+ if (bTTBPresents) {
+ if(!ActionItem->hTTBButton) {
+ // register TopToolBar button
+ TTBButtonV2 ttbb = {0};
+ HANDLE hTTBButt;
+ ttbb.cbSize = sizeof(ttbb);
+ ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
+ ttbb.pszServiceDown = ttbb.pszServiceUp = SERVICE_WITH_LPARAM_NAME;
+ ttbb.lParamDown = ttbb.lParamUp = ActionItem->dwActID;
+ ttbb.name = Translate(ActionItem->szActDescr);
+ ttbb.hIconDn = ttbb.hIconUp = (HICON)CallService(MS_SKIN2_GETICONBYHANDLE,0, (LPARAM)ActionItem->hIcolibIcon);
+ ttbb.tooltipDn = ttbb.tooltipUp = Translate(ActionItem->szActDescr);
+ hTTBButt = (HANDLE)CallService(MS_TTB_ADDBUTTON, (WPARAM)&ttbb, 0);
+ if (hTTBButt)
+ CallService(MS_TTB_SETBUTTONOPTIONS, MAKEWPARAM(TTBO_TIPNAME, hTTBButt), (LPARAM)(Translate(ActionItem->szActDescr)));
+ return hTTBButt;
+ }
+ else
+ return ActionItem->hTTBButton;
+ }
+ else
+ return NULL;
+}
+
+void DeleteTTBButton(MyActionItem* ActionItem){
+ if(bTTBPresents && ActionItem->hTTBButton) {
+ // delete TopToolBar button
+ CallService(MS_TTB_REMOVEBUTTON, (WPARAM)ActionItem->hTTBButton, 0);
+ ActionItem->hTTBButton = NULL;
+ }
+}
+
+int OnTTBLoaded(WPARAM wParam, LPARAM lParam){
+ int i;
+ bTTBPresents = TRUE;//bActionsDefined;
+// for (i=0; i<ActionItemsList.realCount;i++) {
+ for (i=ActionItemsList.realCount-1;i>=0;i--) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if (ActItem->wFlags & UAF_REGTTBB)
+ ActItem->hTTBButton = AddTTBButton(ActItem);
+ }
+ return 0;
+}
+
+//----------------- TabSRMM ButtonBar ----------------------
+BOOL AddTabBBButton(MyActionItem* ActionItem){
+ if (bTabBBPresents) {
+ if(!(ActionItem->wReggedTabButton & 0x8000) ) {
+ // register Tab ButtonBar button
+ BBButton tabb = {0};
+ tabb.cbSize = sizeof(tabb);
+ tabb.dwButtonID = ActionItem->dwActID;
+ tabb.pszModuleName = MODULE;
+ tabb.ptszTooltip = TranslateTS(ActionItem->tszActDescr);
+ tabb.dwDefPos = (TABTOOLBAR_INITPOS + ActionItem->wSortIndex*10) & 0x7FFF;
+ tabb.iButtonWidth = 0;
+ tabb.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISLSIDEBUTTON | BBBF_ISCHATBUTTON;
+ tabb.hIcon = ActionItem->hIcolibIcon;
+
+ CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&tabb);
+ return tabb.dwDefPos | 0x8000;
+ }
+ else
+ return ActionItem->wReggedTabButton;
+ }
+ else
+ return FALSE;
+}
+
+void DeleteTabBBButton(MyActionItem* ActionItem){
+ if(bTabBBPresents && (ActionItem->wReggedTabButton & 0x8000)) {
+ // delete Tab ButtonBar button
+ BBButton tabb = {0};
+ tabb.dwButtonID = ActionItem->dwActID;
+ tabb.pszModuleName = MODULE;
+ CallService(MS_BB_REMOVEBUTTON, 0, (LPARAM)&tabb);
+ ActionItem->wReggedTabButton = ActionItem->wReggedTabButton & 0x7FFF;
+ }
+}
+
+int OnTabBBLoaded(WPARAM wParam, LPARAM lParam){
+ int i;
+ bTabBBPresents = TRUE;//bActionsDefined;
+// for (i=0; i<ActionItemsList.realCount;i++) {
+ for (i=ActionItemsList.realCount-1;i>=0;i--) {
+ MyActionItem* ActItem = ActionItemsList.items[i];
+ if (ActItem->wFlags & UAF_REGTABB)
+ ActItem->wReggedTabButton = AddTabBBButton(ActItem);
+ }
+ hTabBBPressHook = HookEvent(ME_MSG_BUTTONPRESSED, OnTabButtonPressed);
+ return 0;
+}
+
+int OnTabButtonPressed(WPARAM wParam,LPARAM lParam) {
+ CustomButtonClickData *cbcd=(CustomButtonClickData *)lParam;
+ if(strcmp(cbcd->pszModule, MODULE)) return 0;
+ ServiceCallWithFParam((WPARAM)cbcd->hContact, 0, cbcd->dwButtonId);
+ return 1;
+}
+
+
+//=============== Other ====================================
+HANDLE AddIcolibIcon (MyActionItem* ActionItem){
+ if(!ActionItem->hIcolibIcon) {
+ // add icon for action to icolib
+ SKINICONDESC sid = {0};
+ sid.cbSize = sizeof(sid);
+ sid.ptszSection = _T(ICOLIB_ACTSECTION);
+ sid.flags = SIDF_ALL_TCHAR;
+ sid.cx= sid.cy = 16;
+ sid.ptszDescription = ActionItem->tszActDescr;
+ sid.pszName = ActionItem->szNameID;
+ sid.ptszDefaultFile = tszMyPath;
+ sid.iDefaultIndex = -IDI_ACTION;
+ return (HANDLE)CallService(MS_SKIN2_ADDICON,0,(LPARAM)&sid);
+ }
+ else
+ return ActionItem->hIcolibIcon;
+}
+void DeleteIcolibIcon(MyActionItem* ActionItem) {
+ //will work only in MIM0.8.0.13+ (Rev7555+) - otherwise it will crash !
+ DWORD dwMirVer = CallService(MS_SYSTEM_GETVERSION, 0, 0);
+ if (dwMirVer >= 0x0008000D)
+ CallService(MS_SKIN2_REMOVEICON, 0, (LPARAM)ActionItem->szNameID);
+}
+
+int AddCoreHotkey(MyActionItem* ActionItem){
+//register core hotkeys
+if (bCoreHotkeyPresents) {
+ if (!ActionItem->bReggedHotkey) {
+ HOTKEYDESC hkd = {0};
+ hkd.cbSize = sizeof(hkd);
+ hkd.pszName = ActionItem->szNameID;
+ hkd.pszDescription = ActionItem->szActDescr;
+ hkd.pszService = SERVICE_WITH_LPARAM_NAME;
+ hkd.pszSection = MODULE;
+ hkd.lParam = ActionItem->dwActID;
+ return (CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd) != 0) ? TRUE : FALSE;
+ }
+ return TRUE;
+}
+else
+ return FALSE;
+}
+
+void DeleteCoreHotkey(MyActionItem* ActionItem){
+ //delete core hotkeys
+ //will work only from 0.8.0.15+ (Rev.7786+)
+ // and bug with crash when hotkey synonims were used is fixed in 0.8.0.27 (Rev.8831)
+ if (bCoreHotkeyPresents && ServiceExists(MS_HOTKEY_UNREGISTER) && ActionItem->bReggedHotkey) {
+ CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)ActionItem->szNameID);
+ ActionItem->bReggedHotkey = FALSE;
+ }
+}
+
+//================== GUI ===================================
+int OptInit(WPARAM wParam, LPARAM lParam) {
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ // odp.position = -790000000;
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.ptszTitle = _T("Actions");
+ odp.ptszGroup = _T("Services");
+ odp.ptszTab = _T(MODULE);
+ odp.nIDBottomSimpleControl = 0;
+ odp.pfnDlgProc = DlgProcOpts;
+ CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+
+ return 0;
+}
+
+BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+ LOGFONT lf;
+ HFONT hf;
+ switch ( msg ) {
+ case WM_INITDIALOG: {
+ hDialogWIndow = hwndDlg;
+ hListView = GetDlgItem(hwndDlg, IDC_ACTIONSLIST);
+ hImageListView = ImageList_Create(GetSystemMetrics(SM_CXSMICON),GetSystemMetrics(SM_CYSMICON),(IsWinVerXPPlus()?ILC_COLOR32:ILC_COLOR16)|ILC_MASK,3,3);
+ FillListViewWithActions();
+
+ // variables help button
+ if (bVariablePresents) {
+ HICON hIcon=(HICON)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPICON);
+ char *szTipInfo = (char *)CallService(MS_VARS_GETSKINITEM, 0, (LPARAM)VSI_HELPTIPTEXT);
+ if (hIcon != NULL) {
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTMMNVARSHELP), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMNVARSHELP), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMSVARSHELP), BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)hIcon);
+ }
+ else {
+ SetDlgItemText(hwndDlg, IDC_BTMMNVARSHELP, _T("V"));
+ SetDlgItemText(hwndDlg, IDC_BTCMNVARSHELP, _T("V"));
+ SetDlgItemText(hwndDlg, IDC_BTCMSVARSHELP, _T("V"));
+ }
+ if (szTipInfo == NULL) {
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTMMNVARSHELP), BUTTONADDTOOLTIP, (WPARAM)Translate("Open string formatting help for MainMenuitem name"), 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMNVARSHELP), BUTTONADDTOOLTIP, (WPARAM)Translate("Open string formatting help for ContactMenuitem name"), 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMSVARSHELP), BUTTONADDTOOLTIP, (WPARAM)Translate("Open string formatting help for ContactMenuitem showing"), 0);
+ }
+ else {
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTMMNVARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMNVARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
+ SendMessage(GetDlgItem(hwndDlg, IDC_BTCMSVARSHELP), BUTTONADDTOOLTIP, (WPARAM)szTipInfo, 0);
+ }
+ SendDlgItemMessage(hwndDlg, IDC_BTMMNVARSHELP, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BTCMNVARSHELP, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BTCMSVARSHELP, BUTTONSETASFLATBTN, 0, 0);
+ }
+
+ GetObject((HFONT)SendMessage(GetDlgItem(hwndDlg, IDC_STTOOLBAR), WM_GETFONT, 0, 0), sizeof(lf), &lf);
+ lf.lfWeight = FW_BOLD;
+ hf = CreateFontIndirect(&lf);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STTOOLBAR), WM_SETFONT, (WPARAM)hf, TRUE);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STMMI), WM_SETFONT, (WPARAM)hf, TRUE);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STCMI), WM_SETFONT, (WPARAM)hf, TRUE);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STTMI), WM_SETFONT, (WPARAM)hf, TRUE);
+ SendMessage(GetDlgItem(hwndDlg, IDC_STOTHER), WM_SETFONT, (WPARAM)hf, TRUE);
+ //DeleteObject(hf);
+
+ TranslateDialogDefault( hwndDlg );
+ return FALSE;
+ }
+ case WM_COMMAND: {
+ MyActionItem* ActItem = ActionItemsList.items[OptActiveItem];
+ switch (LOWORD(wParam)) {
+ case IDC_CHBHOTKEY:
+ ActItem->wFlags ^= UAF_REGHOTKEY;
+ break;
+ case IDC_CHBMTBB:
+ ActItem->wFlags ^= UAF_REGMTBB;
+ break;
+ case IDC_CHBTABBB:
+ ActItem->wFlags ^= UAF_REGTABB;
+ break;
+ case IDC_CHBMMENUITEM:
+ ActItem->wFlags ^= UAF_REGMMENU;
+ break;
+ case IDC_CHBMMENUSEP:
+ ActItem->wFlags ^= UAF_MMENUSEP;
+ break;
+ case IDC_CHBCMENUSEP:
+ ActItem->wFlags ^= UAF_CMENUSEP;
+ break;
+ case IDC_EDMMENUPN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDMMENUPN, ActItem->tszMMenuPopup, MAX_ACT_DESC_LEN);
+ break;
+ case IDC_EDMMENUN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDMMENUN, ActItem->tszMMenuNameVars, MAX_VARSCRIPT_LEN);
+ break;
+ case IDC_EDCMENUN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDCMENUN, ActItem->tszCMenuNameVars, MAX_VARSCRIPT_LEN);
+ break;
+ case IDC_CHBCMENUITEM:
+ ActItem->wFlags ^= UAF_REGCMENU;
+ break;
+ case IDC_EDCMENUPN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDCMENUPN, ActItem->tszCMenuPopup, MAX_ACT_DESC_LEN);
+ break;
+ case IDC_CHBCMVARS:
+ ActItem->wFlags ^= UAF_CMENU_VARS;
+ break;
+ case IDC_EDCMENUVARSTR:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDCMENUVARSTR, ActItem->tszCMenuShowWhenVars, MAX_VARSCRIPT_LEN);
+ break;
+ case IDC_CHBTMENUITEM:
+ ActItem->wFlags ^= UAF_REGTMENU;
+ break;
+ case IDC_EDTMENUPN:
+ if ((HIWORD(wParam) == EN_CHANGE) && !bRefreshing)
+ GetDlgItemText(hwndDlg, IDC_EDTMENUPN, ActItem->tszTMenuPopup, MAX_ACT_DESC_LEN);
+ break;
+ case IDC_CHBTTBB:
+ ActItem->wFlags ^= UAF_REGTTBB;
+ break;
+ case IDC_BTMMNVARSHELP:
+ variables_showhelp(hwndDlg, IDC_EDMMENUN, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL);
+ break;
+ case IDC_BTCMNVARSHELP:
+ variables_showhelp(hwndDlg, IDC_EDCMENUN, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL);
+ break;
+ case IDC_BTCMSVARSHELP:
+ variables_showhelp(hwndDlg, IDC_EDCMENUVARSTR, VHF_FULLDLG|VHF_SETLASTSUBJECT, NULL, NULL);
+ break;
+ }
+ // enable the 'apply' button
+ if(!bRefreshing)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ }
+ case WM_NOTIFY:
+ if(ActionItemsList.realCount == 0) break;
+ else {
+ //MyActionItem* ActItem = ActionItemsList.items[OptActiveItem];
+ if ((LPNMHDR)lParam == NULL) return TRUE;
+ switch(((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_APPLY: {
+ int i;
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ WriteSetting(ActionItemsList.items[i]);
+ SetAllActionUsers(ActionItemsList.items[i]);
+ }
+ break;
+ }
+ }
+ break;
+ }
+ switch (LOWORD(wParam)) {
+ case IDC_ACTIONSLIST: {
+ switch (((LPNMHDR)lParam)->code) {
+ case LVN_ITEMCHANGED:{
+ NMITEMACTIVATE* LVItemAct = (LPNMITEMACTIVATE)lParam;
+ if ((LVItemAct->iItem >= 0) && (LVItemAct->uChanged == LVIF_STATE)) {
+ if (LVItemAct->uNewState == (LVIS_SELECTED | LVIS_FOCUSED)) {
+ MyActionItem* ActItem = ActionItemsList.items[LVItemAct->lParam/*iItem*/];
+ OptActiveItem = LVItemAct->lParam;//iItem;
+ bRefreshing = TRUE;
+ CheckDlgButton(hwndDlg, IDC_CHBHOTKEY, (ActItem->wFlags & UAF_REGHOTKEY) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHBMTBB, (ActItem->wFlags & UAF_REGMTBB) ? BST_CHECKED : BST_UNCHECKED);
+
+ CheckDlgButton(hwndDlg, IDC_CHBMMENUITEM, (ActItem->wFlags & UAF_REGMMENU) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHBMMENUSEP, (ActItem->wFlags & UAF_MMENUSEP) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHBCMENUSEP, (ActItem->wFlags & UAF_CMENUSEP) ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemText(hwndDlg, IDC_EDMMENUPN, ActItem->tszMMenuPopup);
+ SetDlgItemText(hwndDlg, IDC_EDMMENUN, ActItem->tszMMenuNameVars);
+
+ CheckDlgButton(hwndDlg, IDC_CHBCMENUITEM, (ActItem->wFlags & UAF_REGCMENU) ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemText(hwndDlg, IDC_EDCMENUN, ActItem->tszCMenuNameVars);
+ SetDlgItemText(hwndDlg, IDC_EDCMENUPN, ActItem->tszCMenuPopup);
+ CheckDlgButton(hwndDlg, IDC_CHBCMVARS, (ActItem->wFlags & UAF_CMENU_VARS) ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemText(hwndDlg, IDC_EDCMENUVARSTR, ActItem->tszCMenuShowWhenVars);
+
+ CheckDlgButton(hwndDlg, IDC_CHBTMENUITEM, (ActItem->wFlags & UAF_REGTMENU) ? BST_CHECKED : BST_UNCHECKED);
+ SetDlgItemText(hwndDlg, IDC_EDTMENUPN, ActItem->tszTMenuPopup);
+
+ CheckDlgButton(hwndDlg, IDC_CHBTTBB, (ActItem->wFlags & UAF_REGTTBB) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHBTABBB, (ActItem->wFlags & UAF_REGTABB) ? BST_CHECKED : BST_UNCHECKED);
+ bRefreshing = FALSE;
+ }
+ }
+ return TRUE;
+ } //LVN_ITEMCHANGED
+ } //switch (((LPNMHDR)lParam)->code)
+ } //IDC_ACTIONSLIST
+ } //switch (LOWORD(wParam))
+ break;
+ } // case WM_NOTIFY
+ default:
+ break;
+ } //switch ( msg )
+ return 0;
+}
+
+void FillListViewWithActions() {
+ LVCOLUMN lvc = { 0 };
+ RECT aRect = { 0 };
+ int iCurrentSortIndex = 0;
+ int iCurrentArrayIndex = 0;
+ int i, j;
+ MyActionItem* ActItemTmp;
+
+ ListView_SetImageList(hListView, hImageListView, LVSIL_SMALL);
+ lvc.mask = LVCF_TEXT;
+ ListView_SetExtendedListViewStyleEx(hListView, LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP, LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
+ lvc.pszText = TranslateT("Actions");
+ ListView_InsertColumn(hListView, 0, &lvc);
+
+ iCurrentSortIndex = -1;
+ iCurrentArrayIndex = 0;
+
+ for (i=0; i<ActionItemsList.realCount;i++) {
+ LVITEM lvi = { 0 };
+
+ for (j=0; j<ActionItemsList.realCount;j++) {
+ MyActionItem* ActItemTmp2 = ActionItemsList.items[j];
+ if (ActItemTmp2->wSortIndex == iCurrentSortIndex + 1) {
+ iCurrentArrayIndex = j;
+ iCurrentSortIndex = ActItemTmp2->wSortIndex;
+ break;
+ }
+ }
+ ActItemTmp = ActionItemsList.items[iCurrentArrayIndex];
+
+ lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
+ lvi.iImage = lvi.iItem = i;
+ lvi.iSubItem = 0;
+ lvi.lParam = iCurrentArrayIndex;
+ lvi.pszText = ActItemTmp->tszActDescr;
+ lvi.iItem = ListView_InsertItem(hListView, &lvi);
+ ImageList_AddIcon(hImageListView, (HICON)CallService(MS_SKIN2_GETICONBYHANDLE, 0, (LPARAM)ActItemTmp->hIcolibIcon));
+ if (i == 0)
+ OptActiveItem = iCurrentArrayIndex;
+ }
+ if (ActionItemsList.realCount > 0) {
+ ListView_SetItemState(hListView, 0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
+ //OptActiveItem = 0;
+ }
+ else {
+ //EnableWindow(GetDlgItem(hwndDlg, IDC_GB), FALSE);
+ }
+ GetClientRect(hListView, &aRect);
+ ListView_SetColumnWidth(hListView, 0, aRect.right - aRect.left);
+
+ ShowWindow(GetDlgItem(hDialogWIndow, IDC_BTMMNVARSHELP), ((ActionItemsList.realCount>0) && bVariablePresents)? SW_SHOW : SW_HIDE);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_BTCMNVARSHELP), (ActionItemsList.realCount>0) && bVariablePresents);
+ ShowWindow(GetDlgItem(hDialogWIndow, IDC_BTCMSVARSHELP), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDMMENUN), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDCMENUN), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDCMENUVARSTR), (ActionItemsList.realCount>0) && bVariablePresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBCMVARS), (ActionItemsList.realCount>0) && bVariablePresents);
+
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBTTBB), (ActionItemsList.realCount>0) && bTTBPresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBMTBB), (ActionItemsList.realCount>0) && bMTBPresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBTABBB),(ActionItemsList.realCount>0) && bTabBBPresents);
+
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBMMENUITEM), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBMMENUSEP), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBCMENUITEM), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBCMENUSEP), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBTMENUITEM), (ActionItemsList.realCount>0) && bTrayMenuPresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDMMENUPN), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDCMENUPN), ActionItemsList.realCount>0);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_EDTMENUPN), (ActionItemsList.realCount>0) && bTrayMenuPresents);
+ EnableWindow(GetDlgItem(hDialogWIndow, IDC_CHBHOTKEY), (ActionItemsList.realCount>0) && bCoreHotkeyPresents);
+}
diff --git a/useactions/UseActions.h b/useactions/UseActions.h new file mode 100644 index 0000000..5d1e36a --- /dev/null +++ b/useactions/UseActions.h @@ -0,0 +1,48 @@ +#define MODULE "UseActions"
+#define ICOLIB_ACTSECTION "Actions/Registered actions"
+#define ICOLIB_MNUSECTION "Actions/Menu icons"
+#define SERVICE_WITH_LPARAM_NAME MODULE"/CallAction"
+
+#define MAX_ACT_DESC_LEN 512
+#define MAX_VARSCRIPT_LEN 1024
+
+typedef struct tagMyActionItem{
+ DWORD dwActID;
+ WORD wSortIndex;
+ char szNameID[32];
+ TCHAR tszActDescr[MAX_ACT_DESC_LEN];
+ char szActDescr[MAX_ACT_DESC_LEN];
+ HANDLE hIcolibIcon;
+ BOOL bReggedHotkey;
+ HANDLE hMTBButton;
+ HANDLE hMenuService;
+ HANDLE hMainMenuItem;
+ TCHAR tszMMenuPopup[MAX_ACT_DESC_LEN];
+ TCHAR tszMMenuNameVars[MAX_VARSCRIPT_LEN];
+ HANDLE hMMenuRoot;
+ HANDLE hContactMenuItem;
+ TCHAR tszCMenuNameVars[MAX_VARSCRIPT_LEN];
+ TCHAR tszCMenuPopup[MAX_ACT_DESC_LEN];
+ HANDLE hCMenuRoot;
+ TCHAR tszCMenuShowWhenVars[MAX_VARSCRIPT_LEN];
+ HANDLE hTrayMenuItem;
+ TCHAR tszTMenuPopup[MAX_ACT_DESC_LEN];
+ HANDLE hTMenuRoot;
+ HANDLE hTTBButton;
+ WORD wReggedTabButton;
+ WORD wFlags;
+ } MyActionItem;
+
+#define UAF_NONE 0
+#define UAF_REGHOTKEY (1<<0)
+#define UAF_REGMTBB (1<<1)
+#define UAF_REGMMENU (1<<2)
+#define UAF_REGCMENU (1<<3)
+#define UAF_REGTTBB (1<<4)
+#define UAF_REGTABB (1<<5)
+// #define UAF_CMENU_CNTCT (1<<6)
+// #define UAF_CMENU_CHAT (1<<7)
+#define UAF_CMENU_VARS (1<<8)
+#define UAF_REGTMENU (1<<9)
+#define UAF_MMENUSEP (1<<10)
+#define UAF_CMENUSEP (1<<11)
diff --git a/useactions/UseActions_10.sln b/useactions/UseActions_10.sln new file mode 100644 index 0000000..7afe3b2 --- /dev/null +++ b/useactions/UseActions_10.sln @@ -0,0 +1,26 @@ +
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UseActions", "UseActions_10.vcxproj", "{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug (Unicode)|Win32 = Debug (Unicode)|Win32
+ Debug|Win32 = Debug|Win32
+ Release (Unicode)|Win32 = Release (Unicode)|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.ActiveCfg = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.Build.0 = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.Build.0 = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.ActiveCfg = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.Build.0 = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.ActiveCfg = Release|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/useactions/UseActions_10.suo b/useactions/UseActions_10.suo Binary files differnew file mode 100644 index 0000000..d2b5ffc --- /dev/null +++ b/useactions/UseActions_10.suo diff --git a/useactions/UseActions_10.vcproj b/useactions/UseActions_10.vcproj new file mode 100644 index 0000000..4f9240f --- /dev/null +++ b/useactions/UseActions_10.vcproj @@ -0,0 +1,418 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="UseActions"
+ ProjectGUID="{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+ RootNamespace="TestActions"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug (Unicode)|Win32"
+ OutputDirectory="..\..\..\..\testmir\Plugins\"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ BrowseInformation="1"
+ WarningLevel="4"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ ProfileGuidedDatabase=""
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(intDir)\$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release (Unicode)|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\UseActions.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\common.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\UseActions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\res\action.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\res\UseActions.rc"
+ >
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\res\version.rc"
+ >
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\Changelog.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/useactions/UseActions_10.vcxproj b/useactions/UseActions_10.vcxproj new file mode 100644 index 0000000..59920b5 --- /dev/null +++ b/useactions/UseActions_10.vcxproj @@ -0,0 +1,198 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug (Unicode)|Win32">
+ <Configuration>Debug (Unicode)</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release (Unicode)|Win32">
+ <Configuration>Release (Unicode)</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>UseActions</ProjectName>
+ <ProjectGuid>{395CCE23-22B6-492C-8535-61C49A23D8E8}</ProjectGuid>
+ <RootNamespace>TestActions</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
+ <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</EmbedManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">..\..\..\..\testmir\Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">true</LinkIncremental>
+ <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">false</EmbedManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">$(Configuration)\</IntDir>
+ <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">false</EmbedManifest>
+ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">D:\Sources\miranda9_trunk\miranda\include;$(IncludePath)</IncludePath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USERDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USERDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ProfileGuidedDatabase>
+ </ProfileGuidedDatabase>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Windows</SubSystem>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="UseActions.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="common.h" />
+ <ClInclude Include="res\resource.h" />
+ <ClInclude Include="UseActions.h" />
+ <ClInclude Include="res\version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\action.ico" />
+ <None Include="Changelog.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\resource.rc" />
+ <ResourceCompile Include="res\UseActions.rc">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">true</ExcludedFromBuild>
+ </ResourceCompile>
+ <ResourceCompile Include="res\version.rc">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug (Unicode)|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release (Unicode)|Win32'">true</ExcludedFromBuild>
+ </ResourceCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/useactions/UseActions_10.vcxproj.filters b/useactions/UseActions_10.vcxproj.filters new file mode 100644 index 0000000..9d2b286 --- /dev/null +++ b/useactions/UseActions_10.vcxproj.filters @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="UseActions.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="common.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="res\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="UseActions.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="res\version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\action.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="Changelog.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\UseActions.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/useactions/UseActions_10.vcxproj.user b/useactions/UseActions_10.vcxproj.user new file mode 100644 index 0000000..695b5c7 --- /dev/null +++ b/useactions/UseActions_10.vcxproj.user @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+</Project>
\ No newline at end of file diff --git a/useactions/UseActions_6.dsp b/useactions/UseActions_6.dsp new file mode 100644 index 0000000..16e4646 --- /dev/null +++ b/useactions/UseActions_6.dsp @@ -0,0 +1,230 @@ +# Microsoft Developer Studio Project File - Name="UseActions" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=UseActions - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "UseActions_6.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "UseActions_6.mak" CFG="UseActions - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "UseActions - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "UseActions - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "UseActions - Win32 Debug (Unicode)" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "UseActions - Win32 Release (Unicode)" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "UseActions - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\Debug\Plugins"
+# PROP BASE Intermediate_Dir ".\Debug\Obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\Debug\Plugins"
+# PROP Intermediate_Dir ".\Debug\Obj"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /GX /Zi /Od /I "../../include" /D "_DEBUG" /D "_WINDOWS" /D "_USERDLL" /Yc"common.h" /GZ /c
+# ADD CPP /nologo /MTd /W3 /GX /Zi /Od /I "../../include" /D "_DEBUG" /D "_WINDOWS" /D "_USERDLL" /Yc"common.h" /GZ /c
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /pdb:"$(ConfigurationName)\$(TargetName).pdb" /debug /machine:IX86 /pdbtype:sept
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /pdb:"$(ConfigurationName)\$(TargetName).pdb" /debug /machine:IX86 /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "UseActions - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\Release\Plugins"
+# PROP BASE Intermediate_Dir ".\Release\Obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\Release\Plugins"
+# PROP Intermediate_Dir ".\Release\Obj"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /GX /I "../../include" /D "NDEBUG" /D "_WINDOWS" /D "_USERDLL" /Yc"common.h" /c
+# ADD CPP /nologo /MT /GX /I "../../include" /D "NDEBUG" /D "_WINDOWS" /D "_USERDLL" /Yc"common.h" /c
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /machine:IX86 /pdbtype:sept
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /machine:IX86 /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "UseActions - Win32 Debug (Unicode)"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "..\..\..\testmir\Plugins\"
+# PROP BASE Intermediate_Dir ".\Debug (Unicode)\Obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\testmir\Plugins\"
+# PROP Intermediate_Dir ".\Debug_(Unicode)\Obj"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "_WINDOWS" /D "_USERDLL" /D "UNICODE" /D "_UNICODE" /FR /Yc"common.h" /GZ /c
+# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "_WINDOWS" /D "_USERDLL" /D "UNICODE" /D "_UNICODE" /FR /Yc"common.h" /GZ /c
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x0 /d "_DEBUG" /d "UNICODE" /d "_UNICODE"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /pdb:"..\..\..\testmir\Plugins\$(TargetName).pdb" /debug /machine:IX86 /out:"..\..\..\testmir\Plugins\$(ProjectName).dll" /implib:"$(intDir)\$(TargetName).lib" /pdbtype:sept
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:IX86 /out:"..\..\..\testmir\Plugins\UseActions.dll" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "UseActions - Win32 Release (Unicode)"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\Release (Unicode)\Plugins"
+# PROP BASE Intermediate_Dir ".\Release (Unicode)\Obj"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\Release_(Unicode)\Plugins"
+# PROP Intermediate_Dir ".\Release_(Unicode)\Obj"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /GX /Ox /Os /I "../../include" /D "NDEBUG" /D "_WINDOWS" /D "_USERDLL" /D "UNICODE" /D "_UNICODE" /Yc"common.h" /c
+# ADD CPP /nologo /MD /W3 /Ox /Og /Os /Gf /I "../../include" /D "NDEBUG" /D "_WINDOWS" /D "_USERDLL" /D "UNICODE" /D "_UNICODE" /Fr /YX"common.h" /c
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x0 /d "UNICODE" /d "_UNICODE"
+# SUBTRACT RSC /x
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo /o".\Release_(Unicode)\obj/UseActions.bsc"
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /dll /machine:IX86 /pdbtype:sept
+# ADD LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib shell32.lib uuid.lib /nologo /subsystem:windows /dll /machine:IX86 /out:".\Release_(Unicode)\Plugins/UseActions.dll"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "UseActions - Win32 Debug"
+# Name "UseActions - Win32 Release"
+# Name "UseActions - Win32 Debug (Unicode)"
+# Name "UseActions - Win32 Release (Unicode)"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+# Begin Source File
+
+SOURCE=.\UseActions.c
+DEP_CPP_USEAC=\
+ "..\..\include\m_button.h"\
+ "..\..\include\m_clist.h"\
+ "..\..\include\m_database.h"\
+ "..\..\include\m_genmenu.h"\
+ "..\..\include\m_hotkeys.h"\
+ "..\..\include\m_icolib.h"\
+ "..\..\include\m_langpack.h"\
+ "..\..\include\m_options.h"\
+ "..\..\include\m_plugins.h"\
+ "..\..\include\m_protocols.h"\
+ "..\..\include\m_skin.h"\
+ "..\..\include\m_system.h"\
+ "..\..\include\m_utils.h"\
+ "..\..\include\newpluginapi.h"\
+ "..\..\include\statusmodes.h"\
+ "..\..\include\win2k.h"\
+ ".\common.h"\
+ ".\ExternalAPI\m_actman.h"\
+ ".\ExternalAPI\m_msg_buttonsbar.h"\
+ ".\ExternalAPI\m_toolbar.h"\
+ ".\ExternalAPI\m_toptoolbar.h"\
+ ".\ExternalAPI\m_updater.h"\
+ ".\ExternalAPI\m_variables.h"\
+ ".\res\version.h"\
+ ".\UseActions.h"\
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;inc;xsd"
+# Begin Source File
+
+SOURCE=.\common.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\resource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\UseActions.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\version.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+# Begin Source File
+
+SOURCE=.\res\action.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\resource.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\UseActions.rc
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\version.rc
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/useactions/UseActions_6.dsw b/useactions/UseActions_6.dsw new file mode 100644 index 0000000..d6b1044 --- /dev/null +++ b/useactions/UseActions_6.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "UseActions"=UseActions_6.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/useactions/UseActions_8.sln b/useactions/UseActions_8.sln new file mode 100644 index 0000000..5aacbb9 --- /dev/null +++ b/useactions/UseActions_8.sln @@ -0,0 +1,26 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UseActions", "UseActions_8.vcproj", "{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug (Unicode)|Win32 = Debug (Unicode)|Win32
+ Debug|Win32 = Debug|Win32
+ Release (Unicode)|Win32 = Release (Unicode)|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.ActiveCfg = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.Build.0 = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.Build.0 = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.ActiveCfg = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.Build.0 = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.ActiveCfg = Release|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/useactions/UseActions_8.vcproj b/useactions/UseActions_8.vcproj new file mode 100644 index 0000000..1c63bc1 --- /dev/null +++ b/useactions/UseActions_8.vcproj @@ -0,0 +1,443 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="UseActions"
+ ProjectGUID="{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+ RootNamespace="TestActions"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug (Unicode)|Win32"
+ OutputDirectory="..\..\..\testmir\Plugins\"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ BrowseInformation="1"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ ProfileGuidedDatabase=""
+ ImportLibrary="$(intDir)\$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release (Unicode)|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\UseActions.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\common.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\UseActions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\res\action.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\res\UseActions.rc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\res\version.rc"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\readme.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/useactions/UseActions_9.sln b/useactions/UseActions_9.sln new file mode 100644 index 0000000..0d5611d --- /dev/null +++ b/useactions/UseActions_9.sln @@ -0,0 +1,26 @@ +
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UseActions", "UseActions_9.vcproj", "{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug (Unicode)|Win32 = Debug (Unicode)|Win32
+ Debug|Win32 = Debug|Win32
+ Release (Unicode)|Win32 = Release (Unicode)|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.ActiveCfg = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug (Unicode)|Win32.Build.0 = Debug (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Debug|Win32.Build.0 = Debug|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.ActiveCfg = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release (Unicode)|Win32.Build.0 = Release (Unicode)|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.ActiveCfg = Release|Win32
+ {395CCE23-22B6-492C-8535-61C49A23D8E8}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/useactions/UseActions_9.vcproj b/useactions/UseActions_9.vcproj new file mode 100644 index 0000000..4f9240f --- /dev/null +++ b/useactions/UseActions_9.vcproj @@ -0,0 +1,418 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="UseActions"
+ ProjectGUID="{395CCE23-22B6-492C-8535-61C49A23D8E8}"
+ RootNamespace="TestActions"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug (Unicode)|Win32"
+ OutputDirectory="..\..\..\..\testmir\Plugins\"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="_DEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ BrowseInformation="1"
+ WarningLevel="4"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ ProfileGuidedDatabase=""
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(intDir)\$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release (Unicode)|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="NDEBUG;_WINDOWS;_USERDLL;UNICODE;_UNICODE"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="common.h"
+ WarningLevel="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ SubSystem="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ EmbedManifest="false"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\UseActions.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\common.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\UseActions.h"
+ >
+ </File>
+ <File
+ RelativePath=".\res\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\res\action.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\resource.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\res\UseActions.rc"
+ >
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\res\version.rc"
+ >
+ <FileConfiguration
+ Name="Debug (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release (Unicode)|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\Changelog.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/useactions/common.h b/useactions/common.h new file mode 100644 index 0000000..1a022b3 --- /dev/null +++ b/useactions/common.h @@ -0,0 +1,67 @@ +#ifndef _COMMON_INC
+#define _COMMON_INC
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER // Allow use of features specific to Windows XP or later.
+#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
+#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
+#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
+#endif
+
+#define _CRT_SECURE_NO_DEPRECATE
+
+#if defined( UNICODE ) && !defined( _UNICODE )
+#define _UNICODE
+#endif
+
+#ifndef MIRANDA_VER
+ #define MIRANDA_VER 0x0700
+#endif
+
+#include <tchar.h>
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+#include <windows.h>
+#include <commctrl.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include <win2k.h>
+#include <newpluginapi.h>
+#include <m_system.h>
+#include <m_database.h>
+#include <m_langpack.h>
+#include <m_options.h>
+#include <m_hotkeys.h>
+#include <m_utils.h>
+#include <m_skin.h>
+#include <m_genmenu.h>
+#include <m_icolib.h>
+#include <m_protocols.h>
+#include "ExternalAPI\m_actman.h"
+#include "ExternalAPI\m_msg_buttonsbar.h"
+#include "ExternalAPI\m_toolbar.h"
+#include "ExternalAPI\m_toptoolbar.h"
+#include "ExternalAPI\m_variables.h"
+#include "ExternalAPI\m_updater.h"
+
+extern HINSTANCE hInst;
+extern PLUGINLINK *pluginLink;
+
+#ifndef MIID_USEACTIONS
+#define MIID_USEACTIONS { 0xA63473F7, 0xF8BF, 0x46E7, { 0x9D, 0xF0, 0x4, 0x2D, 0xBE, 0x4C, 0xF5, 0x79 } }
+#endif
+
+#endif
diff --git a/useactions/res/UseActions.rc b/useactions/res/UseActions.rc new file mode 100644 index 0000000..849825f --- /dev/null +++ b/useactions/res/UseActions.rc @@ -0,0 +1,156 @@ +// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OPTIONS DIALOGEX 0, 0, 312, 232
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ GROUPBOX "The way actions could be called",IDC_GB,7,2,297,226
+ CONTROL "",IDC_ACTIONSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,15,12,115,210
+ CONTROL "CList_Modern",IDC_CHBMTBB,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,19,76,8
+ CONTROL "Core Hotkey",IDC_CHBHOTKEY,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,208,146,8
+ CONTROL "Enable",IDC_CHBMMENUITEM,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,54,50,8
+ CONTROL "Enable",IDC_CHBCMENUITEM,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,106,50,8
+ CONTROL "TopToolBar",IDC_CHBTTBB,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,28,68,8
+ EDITTEXT IDC_EDMMENUPN,218,60,78,12,ES_AUTOHSCROLL | WS_GROUP
+ EDITTEXT IDC_EDCMENUPN,218,112,78,12,ES_AUTOHSCROLL | WS_GROUP
+ RTEXT "Root popup:",IDC_STMMIROOTPOPN,150,62,65,8
+ RTEXT "Root popup:",IDC_STCMIROOTPOPN,150,114,65,8
+ CONTROL "show only if variables return 1",IDC_CHBCMVARS,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_GROUP | WS_TABSTOP,162,142,134,8
+ EDITTEXT IDC_EDCMENUVARSTR,162,151,120,12,ES_AUTOHSCROLL | WS_GROUP
+ CONTROL "",IDC_BTCMSVARSHELP,"MButtonClass",WS_TABSTOP,282,151,14,12
+ LTEXT "Toolbar buttons",IDC_STTOOLBAR,140,10,145,8
+ LTEXT "Main menu item",IDC_STMMI,140,44,156,8
+ LTEXT "Contact menu item",IDC_STCMI,140,96,156,8
+ LTEXT "Other",IDC_STOTHER,140,199,156,8
+ LTEXT "Tray menu item",IDC_STTMI,140,169,156,8
+ EDITTEXT IDC_EDTMENUPN,220,185,76,12,ES_AUTOHSCROLL | WS_GROUP
+ CONTROL "Enable",IDC_CHBTMENUITEM,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,150,178,50,8
+ RTEXT "Root popup:",IDC_STTMIROOTPOPN,150,187,65,8
+ EDITTEXT IDC_EDMMENUN,218,73,63,12,ES_AUTOHSCROLL | WS_GROUP
+ RTEXT "Name through vars:",IDC_STMMIVARNAME,150,75,65,8
+ CONTROL "",IDC_BTMMNVARSHELP,"MButtonClass",WS_TABSTOP,282,73,14,12
+ EDITTEXT IDC_EDCMENUN,218,125,63,12,ES_AUTOHSCROLL | WS_GROUP
+ RTEXT "Name through vars:",IDC_STCMIVARNAME,150,127,65,8
+ CONTROL "",IDC_BTCMNVARSHELP,"MButtonClass",WS_TABSTOP,282,125,14,12
+ CONTROL "TabButtonBar",IDC_CHBTABBB,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,228,19,68,8
+ CONTROL "separated",IDC_CHBMMENUSEP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,50,77,10
+ CONTROL "separated",IDC_CHBCMENUSEP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,219,102,77,10
+END
+
+IDD_ELEMOPTS DIALOGEX 0, 0, 316, 182
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOOLWINDOW
+CAPTION "Dialog"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,205,161,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,259,161,50,14
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ACTION ICON ".\\action.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_OPTIONS, DIALOG
+ BEGIN
+ VERTGUIDE, 140
+ VERTGUIDE, 150
+ VERTGUIDE, 162
+ VERTGUIDE, 200
+ VERTGUIDE, 215
+ VERTGUIDE, 228
+ VERTGUIDE, 268
+ VERTGUIDE, 296
+ VERTGUIDE, 304
+ HORZGUIDE, 27
+ END
+
+ IDD_ELEMOPTS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 309
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 175
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // Neutral resources
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/useactions/res/action.ico b/useactions/res/action.ico Binary files differnew file mode 100644 index 0000000..9e4c60d --- /dev/null +++ b/useactions/res/action.ico diff --git a/useactions/res/resource.h b/useactions/res/resource.h new file mode 100644 index 0000000..05d165e --- /dev/null +++ b/useactions/res/resource.h @@ -0,0 +1,50 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by UseActions.rc
+//
+#define IDI_ACTION 101
+#define IDD_OPTIONS 102
+#define IDD_ELEMOPTS 104
+#define IDC_ACTIONSLIST 1001
+#define IDC_CHBMTBB 1002
+#define IDC_CHBHOTKEY 1003
+#define IDC_CHBMMENUITEM 1004
+#define IDC_CHBCMENUITEM 1005
+#define IDC_CHBTTBB 1006
+#define IDC_EDMMENUPN 1007
+#define IDC_EDCMENUPN 1008
+#define IDC_EDTMENUPN 1009
+#define IDC_CHBTABBB 1010
+#define IDC_CHBTMENUITEM 1012
+#define IDC_EDMMENUN 1013
+#define IDC_EDCMENUN 1014
+#define IDC_CHBCMVARS 1015
+#define IDC_EDCMENUVARSTR 1016
+#define IDC_BTCMSVARSHELP 1017
+#define IDC_STTOOLBAR 1018
+#define IDC_GB 1019
+#define IDC_STMMI 1020
+#define IDC_STCMI 1021
+#define IDC_STTMI 1022
+#define IDC_STOTHER 1023
+#define IDC_STMMIROOTPOPN 1024
+#define IDC_STCMIROOTPOPN 1025
+#define IDC_STTMIROOTPOPN 1026
+#define IDC_STMMIVARNAME 1027
+#define IDC_BTMMNVARSHELP 1028
+#define IDC_STCMIVARNAME 1029
+#define IDC_BTCMNVARSHELP 1030
+#define IDC_CHBMMENUSEP 1031
+#define IDC_CHBCMENUSEP 1032
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 105
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1032
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/useactions/res/resource.rc b/useactions/res/resource.rc new file mode 100644 index 0000000..16c9fa2 --- /dev/null +++ b/useactions/res/resource.rc @@ -0,0 +1,2 @@ +#include "UseActions.rc"
+#include "version.rc"
\ No newline at end of file diff --git a/useactions/res/version.h b/useactions/res/version.h new file mode 100644 index 0000000..94df319 --- /dev/null +++ b/useactions/res/version.h @@ -0,0 +1,58 @@ +// Set the version number here - it will affect the version resource and the version field of the pluginInfo structure
+// (Be careful that you don't have the resource file open when you change this and rebuild, otherwise the changes may not
+// take effect within the version resource)
+// Do not forget to define symbol "_DEBUG" for resource compiler if you use debug configuration (in VisualStudio you can
+// find it under Project properties - Configuration properties - Resource - General - Preprocessor definitions)
+
+// plugin version part
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 0
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 3
+// plugin SVN Revision number
+//#define __REV_NUM 5678
+
+// minimal MirandaIM version number, with which this plugin supposed to work
+#define __PROD_MAJOR_VERSION 0
+#define __PROD_MINOR_VERSION 7
+#define __PROD_RELEASE_NUM 13
+#define __PROD_BUILD_NUM 0
+// if your plugin works only with Miranda core beginning from specific revision, you can include this information in Product Version resource
+//#define __PROD_REV_NUM 1234
+
+// stuff that will be used in PluginInfo section and in Version resource
+#define __PLUGIN_NAME "UseActions"
+#define __FILENAME "UseActions.dll"
+#define __DESC "This plugin makes use of actions, serviced by Actions Manager plugin (ActMan, by Awkward)"
+#define __AUTHOR "Igor Abakumov"
+#define __AUTHOREMAIL "abakumoff@mail.ru"
+#define __AUTHORWEB "http://vasilich.org/blog"
+#define __COPYRIGHT " 2009 Igor Abakumov"
+
+// other stuff for Version resource
+#define __STRINGIFY_IMPL(x) #x
+#define __STRINGIFY(x) __STRINGIFY_IMPL(x)
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
+#ifdef _UNICODE
+#ifdef __REV_NUM
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS rev. __REV_NUM Unicode)
+#else
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS Unicode)
+#endif
+#else
+#ifdef __REV_NUM
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS rev. __REV_NUM)
+#else
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS)
+#endif
+#endif
+
+#define __PRODVERSION_STRING __PROD_MAJOR_VERSION,__PROD_MINOR_VERSION,__PROD_RELEASE_NUM,__PROD_BUILD_NUM
+#define __PRODVERSION_STRING_DOTS __PROD_MAJOR_VERSION.__PROD_MINOR_VERSION.__PROD_RELEASE_NUM.__PROD_BUILD_NUM
+#ifdef __PROD_REV_NUM
+#define __PROD_VERSION_STRING __STRINGIFY(__PRODVERSION_STRING_DOTS rev. __PROD_REV_NUM)
+#else
+#define __PROD_VERSION_STRING __STRINGIFY(__PRODVERSION_STRING_DOTS+)
+#endif
diff --git a/useactions/res/version.rc b/useactions/res/version.rc new file mode 100644 index 0000000..ae94064 --- /dev/null +++ b/useactions/res/version.rc @@ -0,0 +1,39 @@ +#include "version.h"
+
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#endif //_WIN32
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __PRODVERSION_STRING
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+//#else
+// FILEFLAGS 0x0L
+#endif
+
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0" // LOCALE_NEUTRAL<<16 + 1200 (ANSI - Unicode)
+ BEGIN
+ VALUE "Author", __AUTHOR
+ VALUE "FileDescription", __DESC
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "FileVersion", __VERSION_STRING
+ VALUE "ProductName", "Miranda IM"
+ VALUE "ProductVersion", __PROD_VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", /*LOCALE_NEUTRAL from WinNT.h */ 0x0, 1200
+ END
+END
|