summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AVS/src/acc.cpp6
-rw-r--r--plugins/AVS/src/acc.h5
-rw-r--r--plugins/AVS/src/cache.cpp6
-rw-r--r--plugins/AVS/src/options.cpp11
-rw-r--r--plugins/AVS/src/services.cpp33
-rw-r--r--plugins/AVS/src/stdafx.h10
-rw-r--r--plugins/AVS/src/utils.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_cachefuncs.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clc.h2
-rw-r--r--plugins/Clist_nicer/src/clc.cpp2
-rw-r--r--plugins/Clist_nicer/src/clc.h26
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp4
-rw-r--r--plugins/Clist_nicer/src/clcpaint.cpp8
-rw-r--r--plugins/CryptoPP/src/main.cpp3
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp8
-rw-r--r--plugins/MyDetails/src/data.cpp6
-rw-r--r--plugins/Popup/src/avatars.cpp2
-rw-r--r--plugins/Popup/src/avatars_gif.cpp2
-rw-r--r--plugins/Popup/src/avatars_gif.h2
-rw-r--r--plugins/Popup/src/avatars_simple.cpp4
-rw-r--r--plugins/Popup/src/avatars_simple.h2
-rw-r--r--plugins/Scriver/src/msgs.h2
-rw-r--r--plugins/SecureIM/src/commonheaders.cpp3
-rw-r--r--plugins/SimpleStatusMsg/src/options.cpp3
-rw-r--r--plugins/SimpleStatusMsg/src/version.h2
-rw-r--r--plugins/StatusManager/StatusManager.vcxproj14
-rw-r--r--plugins/StatusManager/StatusManager.vcxproj.filters372
-rw-r--r--plugins/StatusManager/res/notick.icobin1150 -> 0 bytes
-rw-r--r--plugins/StatusManager/res/notick1.icobin1150 -> 0 bytes
-rw-r--r--plugins/StatusManager/res/resource.rc143
-rw-r--r--plugins/StatusManager/res/useronli.icobin1150 -> 0 bytes
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/aaa_msgoptions.cpp (renamed from plugins/StatusManager/src/aaa_msgoptions.cpp)2
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp (renamed from plugins/StatusManager/src/aaa_options.cpp)9
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp (renamed from plugins/StatusManager/src/advancedautoaway.cpp)35
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h (renamed from plugins/StatusManager/src/advancedautoaway.h)14
-rw-r--r--plugins/StatusManager/src/KeepStatus/keepstatus.cpp (renamed from plugins/StatusManager/src/keepstatus.cpp)63
-rw-r--r--plugins/StatusManager/src/KeepStatus/keepstatus.h (renamed from plugins/StatusManager/src/keepstatus.h)15
-rw-r--r--plugins/StatusManager/src/KeepStatus/ks_options.cpp (renamed from plugins/StatusManager/src/ks_options.cpp)7
-rw-r--r--plugins/StatusManager/src/StartupStatus/ss_options.cpp (renamed from plugins/StatusManager/src/ss_options.cpp)5
-rw-r--r--plugins/StatusManager/src/StartupStatus/ss_profiles.cpp (renamed from plugins/StatusManager/src/ss_profiles.cpp)15
-rw-r--r--plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp (renamed from plugins/StatusManager/src/ss_toolbars.cpp)4
-rw-r--r--plugins/StatusManager/src/StartupStatus/startupstatus.cpp (renamed from plugins/StatusManager/src/startupstatus.cpp)63
-rw-r--r--plugins/StatusManager/src/StartupStatus/startupstatus.h (renamed from plugins/StatusManager/src/startupstatus.h)18
-rw-r--r--plugins/StatusManager/src/main.cpp105
-rw-r--r--plugins/StatusManager/src/options.cpp42
-rw-r--r--plugins/StatusManager/src/resource.h21
-rw-r--r--plugins/StatusManager/src/stdafx.h43
-rw-r--r--plugins/StatusManager/src/version.h4
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp103
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp6
-rw-r--r--plugins/TabSRMM/src/msgs.h2
-rw-r--r--plugins/UserInfoEx/src/svc_avatar.cpp17
-rw-r--r--plugins/UserInfoEx/src/svc_constants.cpp3
-rw-r--r--plugins/Utils.pas/mirutils.pas6
-rw-r--r--plugins/Watrack/myshows/i_cookies.inc2
-rw-r--r--plugins/YAMN/src/proto/netlib.cpp12
-rw-r--r--plugins/mRadio/mradio.dpr2
57 files changed, 564 insertions, 747 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp
index f24d1e6680..30dcc47720 100644
--- a/plugins/AVS/src/acc.cpp
+++ b/plugins/AVS/src/acc.cpp
@@ -496,11 +496,11 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
int *height = (int*)lParam;
// Get avatar
- avatarCacheEntry *ace;
+ AVATARCACHEENTRY *ace;
if (data->hContact == NULL)
- ace = (avatarCacheEntry *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)data->proto);
+ ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)data->proto);
else
- ace = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)data->hContact, 0);
+ ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)data->hContact, 0);
if (ace == NULL || ace->bmHeight == 0 || ace->bmWidth == 0 || (data->respectHidden && (ace->dwFlags & AVS_HIDEONCLIST))) {
*width = 0;
diff --git a/plugins/AVS/src/acc.h b/plugins/AVS/src/acc.h
index 9917156385..94a8f1253a 100644
--- a/plugins/AVS/src/acc.h
+++ b/plugins/AVS/src/acc.h
@@ -21,10 +21,9 @@ Boston, MA 02111-1307, USA.
#ifndef __ACC_H__
# define __ACC_H__
-static INT_PTR avSetAvatar(MCONTACT hContact, wchar_t *tszPath);
-INT_PTR avSetMyAvatar(char *szProto, wchar_t *tszPath);
+INT_PTR SetAvatar(WPARAM wParam, LPARAM lParam);
+INT_PTR SetMyAvatar(WPARAM wParam, LPARAM lParam);
int LoadACC();
-
#endif // __ACC_H__
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp
index 6bd8f97177..18250bddd7 100644
--- a/plugins/AVS/src/cache.cpp
+++ b/plugins/AVS/src/cache.cpp
@@ -75,7 +75,7 @@ CacheNode* FindAvatarInCache(MCONTACT hContact, bool add, bool findAny)
if (szProto == NULL || !db_get_b(NULL, AVS_MODULE, szProto, 1))
return NULL;
- avatarCacheEntry tmp;
+ AVATARCACHEENTRY tmp;
tmp.hContact = hContact;
mir_cslock lck(cachecs);
@@ -167,7 +167,7 @@ void DeleteAvatarFromCache(MCONTACT hContact, bool bForever)
if (g_shutDown)
return;
- avatarCacheEntry tmp;
+ AVATARCACHEENTRY tmp;
tmp.hContact = GetContactThatHaveTheAvatar(hContact);
mir_cslock lck(cachecs);
@@ -193,7 +193,7 @@ int SetAvatarAttribute(MCONTACT hContact, DWORD attrib, int mode)
if (g_shutDown)
return 0;
- avatarCacheEntry tmp;
+ AVATARCACHEENTRY tmp;
tmp.hContact = hContact;
mir_cslock lck(cachecs);
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index e83ceb28e1..b7304c11f5 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define DM_PROTOCOLCHANGED (WM_USER + 13)
extern int _DebugPopup(MCONTACT hContact, const char *fmt, ...);
-extern INT_PTR SetAvatar(WPARAM wParam, LPARAM lParam);
extern OBJLIST<protoPicCacheEntry> g_ProtoPictures;
extern HANDLE hEventChanged;
extern HINSTANCE g_hInst;
@@ -164,7 +163,7 @@ static void SetProtoPic(char *szProto)
if (!mir_strcmp(p.szProtoname, szProto) && mir_strlen(p.szProtoname) == mir_strlen(szProto)) {
if (p.hbmPic != 0)
DeleteObject(p.hbmPic);
- memset(&p, 0, sizeof(avatarCacheEntry));
+ memset(&p, 0, sizeof(AVATARCACHEENTRY));
CreateAvatarInCache(0, &p, szProto);
NotifyEventHooks(hEventChanged, 0, (LPARAM)&p);
break;
@@ -1062,18 +1061,18 @@ static INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wP
switch (LOWORD(wParam)) {
case IDC_CHANGE:
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_PER_PROTO))
- avSetMyAvatar(NULL, NULL);
+ SetMyAvatar(NULL, NULL);
else {
char *proto = GetSelectedProtocol(hwndDlg);
if (proto != NULL)
- avSetMyAvatar(proto, NULL);
+ SetMyAvatar((WPARAM)proto, NULL);
}
break;
case IDC_DELETE:
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_PER_PROTO)) {
if (MessageBox(hwndDlg, TranslateT("Are you sure you want to remove your avatar?"), TranslateT("Global avatar"), MB_YESNO) == IDYES)
- avSetMyAvatar(NULL, L"");
+ SetMyAvatar(NULL, (LPARAM)L"");
}
else {
char *proto = GetSelectedProtocol(hwndDlg);
@@ -1084,7 +1083,7 @@ static INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wP
CallProtoService(proto, PS_GETNAME, _countof(description), (LPARAM)description);
wchar_t *descr = mir_a2u(description);
if (MessageBox(hwndDlg, TranslateT("Are you sure you want to remove your avatar?"), descr, MB_YESNO) == IDYES)
- avSetMyAvatar(proto, L"");
+ SetMyAvatar((WPARAM)proto, (LPARAM)L"");
mir_free(descr);
}
break;
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index aba7818492..754fa54dc7 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -115,7 +115,7 @@ UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
return FALSE;
}
-static INT_PTR avSetAvatar(MCONTACT hContact, wchar_t *tszPath)
+INT_PTR SetAvatar(WPARAM hContact, LPARAM lParam)
{
wchar_t FileName[MAX_PATH];
wchar_t *szFinalName;
@@ -126,6 +126,7 @@ static INT_PTR avSetAvatar(MCONTACT hContact, wchar_t *tszPath)
int is_locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
+ wchar_t *tszPath = (wchar_t*)lParam;
if (tszPath == NULL) {
wchar_t filter[256];
Bitmap_GetFilter(filter, _countof(filter));
@@ -172,16 +173,6 @@ static INT_PTR avSetAvatar(MCONTACT hContact, wchar_t *tszPath)
return 0;
}
-INT_PTR SetAvatar(WPARAM wParam, LPARAM lParam)
-{
- return avSetAvatar(wParam, _A2T((const char*)lParam));
-}
-
-INT_PTR SetAvatarW(WPARAM wParam, LPARAM lParam)
-{
- return avSetAvatar(wParam, (wchar_t*)lParam);
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
// see if is possible to set the avatar for the expecified protocol
@@ -608,7 +599,7 @@ static int InternalSetMyAvatar(char *protocol, wchar_t *szFinalName, SetMyAvatar
return ret;
}
-INT_PTR avSetMyAvatar(char* protocol, wchar_t* tszPath)
+INT_PTR SetMyAvatar(WPARAM wParam, LPARAM lParam)
{
wchar_t FileName[MAX_PATH];
wchar_t *szFinalName = NULL;
@@ -616,9 +607,11 @@ INT_PTR avSetMyAvatar(char* protocol, wchar_t* tszPath)
BOOL allAcceptSWF;
// Protocol allow seting of avatar?
+ char* protocol = (char*)wParam;
if (protocol != NULL && !CanSetMyAvatar((WPARAM)protocol, 0))
return -1;
+ wchar_t* tszPath = (wchar_t*)lParam;
if (tszPath == NULL && hwndSetMyAvatar != 0) {
SetForegroundWindow(hwndSetMyAvatar);
SetFocus(hwndSetMyAvatar);
@@ -707,16 +700,6 @@ INT_PTR avSetMyAvatar(char* protocol, wchar_t* tszPath)
return InternalSetMyAvatar(protocol, szFinalName, data, allAcceptXML, allAcceptSWF);
}
-static INT_PTR SetMyAvatar(WPARAM wParam, LPARAM lParam)
-{
- return avSetMyAvatar((char*)wParam, _A2T((const char*)lParam));
-}
-
-static INT_PTR SetMyAvatarW(WPARAM wParam, LPARAM lParam)
-{
- return avSetMyAvatar((char*)wParam, (wchar_t*)lParam);
-}
-
/////////////////////////////////////////////////////////////////////////////////////////
INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -859,10 +842,8 @@ void InitServices()
{
CreateServiceFunction(MS_AV_GETAVATARBITMAP, GetAvatarBitmap);
CreateServiceFunction(MS_AV_PROTECTAVATAR, ProtectAvatar);
- CreateServiceFunction(MS_AV_SETAVATAR, SetAvatar);
- CreateServiceFunction(MS_AV_SETAVATARW, SetAvatarW);
- CreateServiceFunction(MS_AV_SETMYAVATAR, SetMyAvatar);
- CreateServiceFunction(MS_AV_SETMYAVATARW, SetMyAvatarW);
+ CreateServiceFunction(MS_AV_SETAVATARW, SetAvatar);
+ CreateServiceFunction(MS_AV_SETMYAVATARW, SetMyAvatar);
CreateServiceFunction(MS_AV_CANSETMYAVATAR, CanSetMyAvatar);
CreateServiceFunction(MS_AV_CONTACTOPTIONS, ContactOptions);
CreateServiceFunction(MS_AV_DRAWAVATAR, DrawAvatarPicture);
diff --git a/plugins/AVS/src/stdafx.h b/plugins/AVS/src/stdafx.h
index a28ea994c6..4eb907d41e 100644
--- a/plugins/AVS/src/stdafx.h
+++ b/plugins/AVS/src/stdafx.h
@@ -64,7 +64,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-struct CacheNode : public avatarCacheEntry, public MZeroedObject
+struct CacheNode : public AVATARCACHEENTRY, public MZeroedObject
{
CacheNode();
~CacheNode();
@@ -76,8 +76,8 @@ struct CacheNode : public avatarCacheEntry, public MZeroedObject
void wipeInfo();
};
-// The same fields as avatarCacheEntry + proto name
-struct protoPicCacheEntry : public avatarCacheEntry, public MZeroedObject
+// The same fields as AVATARCACHEENTRY + proto name
+struct protoPicCacheEntry : public AVATARCACHEENTRY, public MZeroedObject
{
protoPicCacheEntry() { memset(this, 0, sizeof(*this)); };
~protoPicCacheEntry();
@@ -126,10 +126,10 @@ void MakePathRelative(MCONTACT hContact);
void MakePathRelative(MCONTACT hContact, wchar_t *dest);
void MyPathToAbsolute(const wchar_t *ptszPath, wchar_t *ptszDest);
-HBITMAP LoadPNG(struct avatarCacheEntry *ace, char *szFilename);
+HBITMAP LoadPNG(struct AVATARCACHEENTRY *ace, char *szFilename);
void UnloadCache(void);
-int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto);
+int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, char *szProto);
void DeleteAvatarFromCache(MCONTACT hContact, bool bForever);
void PicLoader(LPVOID param);
void NotifyMetaAware(MCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY *ace = (AVATARCACHEENTRY*)-1);
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp
index a47b3f15c1..a20372b9dc 100644
--- a/plugins/AVS/src/utils.cpp
+++ b/plugins/AVS/src/utils.cpp
@@ -65,7 +65,7 @@ void MakePathRelative(MCONTACT hContact)
// create the avatar in cache
// returns 0 if not created (no avatar), iIndex otherwise, -2 if has to request avatar, -3 if avatar too big
-int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
+int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, char *szProto)
{
ptrW tszValue;
wchar_t tszFilename[MAX_PATH]; tszFilename[0] = 0;
@@ -157,7 +157,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
BITMAP bminfo;
GetObject(ace->hbmPic, sizeof(bminfo), &bminfo);
- ace->cbSize = sizeof(avatarCacheEntry);
+ ace->cbSize = sizeof(AVATARCACHEENTRY);
ace->dwFlags = AVS_BITMAP_VALID;
if (hContact != NULL && db_get_b(hContact, "ContactPhoto", "Hidden", 0))
ace->dwFlags |= AVS_HIDEONCLIST;
@@ -280,7 +280,7 @@ void protoPicCacheEntry::clear()
if (hbmPic != 0)
DeleteObject(hbmPic);
- memset(this, 0, sizeof(avatarCacheEntry));
+ memset(this, 0, sizeof(AVATARCACHEENTRY));
}
///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp
index e5f0f68040..e4fcfe208e 100644
--- a/plugins/Clist_modern/src/modern_cachefuncs.cpp
+++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp
@@ -645,7 +645,7 @@ BOOL ReduceAvatarPosition(ClcContact *contact, BOOL, void *param)
void Cache_ProceedAvatarInList(ClcData *dat, ClcContact *contact)
{
- avatarCacheEntry *ace = contact->avatar_data;
+ AVATARCACHEENTRY *ace = contact->avatar_data;
int old_pos = contact->avatar_pos;
if (ace == NULL || ace->dwFlags == AVS_BITMAP_EXPIRED || ace->hbmPic == NULL) {
@@ -718,8 +718,8 @@ void Cache_GetAvatar(ClcData *dat, ClcContact *contact)
}
if (dat->avatars_show && !db_get_b(contact->hContact, "CList", "HideContactAvatar", 0)) {
- contact->avatar_data = (avatarCacheEntry*)CallService(MS_AV_GETAVATARBITMAP, contact->hContact, 0);
- if (contact->avatar_data == NULL || contact->avatar_data->cbSize != sizeof(avatarCacheEntry) || contact->avatar_data->dwFlags == AVS_BITMAP_EXPIRED)
+ contact->avatar_data = (AVATARCACHEENTRY*)CallService(MS_AV_GETAVATARBITMAP, contact->hContact, 0);
+ if (contact->avatar_data == NULL || contact->avatar_data->cbSize != sizeof(AVATARCACHEENTRY) || contact->avatar_data->dwFlags == AVS_BITMAP_EXPIRED)
contact->avatar_data = NULL;
if (contact->avatar_data != NULL)
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h
index 76ce6f3479..64deabf5f6 100644
--- a/plugins/Clist_modern/src/modern_clc.h
+++ b/plugins/Clist_modern/src/modern_clc.h
@@ -180,7 +180,7 @@ struct ClcContact : public ClcContactBase
bool bSubExpanded, bImageIsSpecial;
int avatar_pos;
- avatarCacheEntry *avatar_data;
+ AVATARCACHEENTRY *avatar_data;
SIZE avatar_size;
CSmileyString ssText;
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index 2f15c72d6d..fafadeb568 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -423,7 +423,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
case INTM_AVATARCHANGED:
contact = NULL;
{
- avatarCacheEntry *cEntry = (struct avatarCacheEntry *)lParam;
+ AVATARCACHEENTRY *cEntry = (struct AVATARCACHEENTRY *)lParam;
if (wParam == 0) {
//RemoveFromImgCache(0, cEntry);
diff --git a/plugins/Clist_nicer/src/clc.h b/plugins/Clist_nicer/src/clc.h
index 56b8fe301f..f5303f506d 100644
--- a/plugins/Clist_nicer/src/clc.h
+++ b/plugins/Clist_nicer/src/clc.h
@@ -117,20 +117,20 @@ struct TExtraCache
struct ClcContact : public ClcContactBase
{
- BOOL bIsMeta;
- BYTE xStatus;
- int xStatusIcon;
+ BOOL bIsMeta;
+ BYTE xStatus;
+ int xStatusIcon;
MCONTACT hSubContact;
- char *metaProto;
- DWORD codePage;
- WORD wStatus;
- int avatarLeft, extraIconRightBegin;
- int isRtl;
- DWORD cFlags;
- BYTE bSecondLine;
-
- avatarCacheEntry *ace;
- TExtraCache* pExtra;
+ char *metaProto;
+ DWORD codePage;
+ WORD wStatus;
+ int avatarLeft, extraIconRightBegin;
+ int isRtl;
+ DWORD cFlags;
+ BYTE bSecondLine;
+
+ AVATARCACHEENTRY *ace;
+ TExtraCache *pExtra;
};
#define DRAGSTAGE_NOTMOVED 0
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index 0ab9137e9d..ebfdcd6cc8 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -84,8 +84,8 @@ void LoadAvatarForContact(ClcContact *p)
p->ace = NULL;
if (cfg::dat.bAvatarServiceAvail && (p->cFlags & ECF_AVATAR) && (!cfg::dat.bNoOfflineAvatars || p->wStatus != ID_STATUS_OFFLINE)) {
- p->ace = (struct avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)p->hContact, 0);
- if (p->ace != NULL && p->ace->cbSize != sizeof(struct avatarCacheEntry))
+ p->ace = (struct AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)p->hContact, 0);
+ if (p->ace != NULL && p->ace->cbSize != sizeof(struct AVATARCACHEENTRY))
p->ace = NULL;
if (p->ace != NULL)
p->ace->t_lastAccess = cfg::dat.t_now;
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp
index 4436f60553..f4b72bb304 100644
--- a/plugins/Clist_nicer/src/clcpaint.cpp
+++ b/plugins/Clist_nicer/src/clcpaint.cpp
@@ -262,7 +262,7 @@ static int __fastcall DrawAvatar(HDC hdcMem, RECT *rc, ClcContact *contact, int
if (!cfg::dat.bAvatarServiceAvail || dat->bisEmbedded)
return 0;
- if (contact->ace != NULL && contact->ace->cbSize == sizeof(struct avatarCacheEntry)) {
+ if (contact->ace != NULL && contact->ace->cbSize == sizeof(struct AVATARCACHEENTRY)) {
if (contact->ace->dwFlags & AVS_HIDEONCLIST)
return (cfg::dat.dwFlags & CLUI_FRAME_ALWAYSALIGNNICK) ? avatar_size + 2 : 0;
@@ -1458,11 +1458,11 @@ bgdone:
line_num++;
ClcContact *cc = group->cl[group->scanIndex];
if (cfg::dat.bForceRefetchOnPaint)
- cc->ace = (struct avatarCacheEntry*) - 1;
+ cc->ace = (struct AVATARCACHEENTRY*) - 1;
if (y > rcPaint->top - dat->row_heights[line_num] && y <= rcPaint->bottom) {
- if (cc->ace == (struct avatarCacheEntry*) - 1)
- cc->ace = (struct avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)cc->hContact, 0);
+ if (cc->ace == (struct AVATARCACHEENTRY*) - 1)
+ cc->ace = (struct AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)cc->hContact, 0);
RowHeight::getRowHeight(dat, cc, line_num, style);
PaintItem(hdcMem, group, cc, indent, y, dat, index, hwnd, style, &clRect, &bFirstNGdrawn, groupCountsFontTopShift, dat->row_heights[line_num]);
}
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp
index 22be7cadba..62a75b02b3 100644
--- a/plugins/CryptoPP/src/main.cpp
+++ b/plugins/CryptoPP/src/main.cpp
@@ -130,8 +130,7 @@ void InitNetlib()
void DeinitNetlib()
{
- if (hNetlibUser)
- CallService(MS_NETLIB_CLOSEHANDLE, (WPARAM)hNetlibUser, 0);
+ Netlib_CloseHandle(hNetlibUser);
}
int Sent_NetLog(const char *fmt, ...)
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index a1a7a3e565..2910730b1c 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -39,14 +39,14 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto)
wchar_t *result = NULL;
if (Options::getAvatarServiceFlags() == Options::AVATARSERVICE_PRESENT) {
- avatarCacheEntry *ace;
+ AVATARCACHEENTRY *ace;
if (hContact == NULL)
- ace = (avatarCacheEntry *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)szProto);
+ ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)szProto);
else
- ace = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
+ ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
if (ace != NULL) {
- if (ace->cbSize == sizeof(avatarCacheEntry))
+ if (ace->cbSize == sizeof(AVATARCACHEENTRY))
result = ace->szFilename;
else // compatibility: in M0.9 it will always be char*
MultiByteToWideChar(CP_ACP, 0, (char*)ace->szFilename, -1, tmpPath, _countof(tmpPath));
diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp
index 6005135cd8..79a2cf47bd 100644
--- a/plugins/MyDetails/src/data.cpp
+++ b/plugins/MyDetails/src/data.cpp
@@ -265,7 +265,7 @@ void Protocol::GetAvatar()
ace = NULL;
// Get HBITMAP from cache
- ace = (avatarCacheEntry *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)name);
+ ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)name);
if (ace != NULL)
avatar_bmp = ace->hbmPic;
@@ -317,7 +317,7 @@ bool Protocol::CanSetAvatar()
void Protocol::SetAvatar(const wchar_t *file_name)
{
if (CanSetAvatar())
- CallService(MS_AV_SETMYAVATART, (WPARAM)name, (LPARAM)file_name);
+ CallService(MS_AV_SETMYAVATARW, (WPARAM)name, (LPARAM)file_name);
}
bool Protocol::CanGetListeningTo()
@@ -450,7 +450,7 @@ void ProtocolArray::SetAvatars(const wchar_t *file_name)
if (!CanSetAvatars())
return;
- CallService(MS_AV_SETMYAVATART, NULL, (WPARAM)file_name);
+ CallService(MS_AV_SETMYAVATARW, NULL, (WPARAM)file_name);
}
void ProtocolArray::SetNicks(const wchar_t *nick)
diff --git a/plugins/Popup/src/avatars.cpp b/plugins/Popup/src/avatars.cpp
index 73bd43ede4..d099ddbd73 100644
--- a/plugins/Popup/src/avatars.cpp
+++ b/plugins/Popup/src/avatars.cpp
@@ -27,7 +27,7 @@ PopupAvatar *PopupAvatar::create(MCONTACT hContact)
{
if (hContact) {
if (ServiceExists(MS_AV_GETAVATARBITMAP)) {
- avatarCacheEntry *av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
+ AVATARCACHEENTRY *av = (AVATARCACHEENTRY*)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
if (av && (mir_wstrlen(av->szFilename) > 4))
if (!mir_wstrcmpi(av->szFilename + mir_wstrlen(av->szFilename) - 4, L".gif"))
if (db_get_b(NULL, MODULNAME, "EnableGifAnimation", 1) && GDIPlus_IsAnimatedGIF(av->szFilename))
diff --git a/plugins/Popup/src/avatars_gif.cpp b/plugins/Popup/src/avatars_gif.cpp
index c0eba9f628..5b8cbac17c 100644
--- a/plugins/Popup/src/avatars_gif.cpp
+++ b/plugins/Popup/src/avatars_gif.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
GifAvatar::GifAvatar(MCONTACT hContact) : PopupAvatar()
{
- av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
+ av = (AVATARCACHEENTRY*)CallService(MS_AV_GETAVATARBITMAP, hContact, 0);
bIsAnimated = true;
bIsValid = true;
GDIPlus_GetGIFSize(av->szFilename, &this->width, &this->height);
diff --git a/plugins/Popup/src/avatars_gif.h b/plugins/Popup/src/avatars_gif.h
index eca4c186c8..07cf5e1a49 100644
--- a/plugins/Popup/src/avatars_gif.h
+++ b/plugins/Popup/src/avatars_gif.h
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
class GifAvatar : public PopupAvatar
{
protected:
- avatarCacheEntry *av;
+ AVATARCACHEENTRY *av;
int cachedWidth, cachedHeight;
int activeFrame;
diff --git a/plugins/Popup/src/avatars_simple.cpp b/plugins/Popup/src/avatars_simple.cpp
index 5b55467b7f..b887bb27fd 100644
--- a/plugins/Popup/src/avatars_simple.cpp
+++ b/plugins/Popup/src/avatars_simple.cpp
@@ -36,7 +36,7 @@ SimpleAvatar::SimpleAvatar(HANDLE h, bool bUseBitmap)
height = abs(bmp.bmHeight);
avNeedFree = true;
- av = new avatarCacheEntry;
+ av = new AVATARCACHEENTRY;
av->bmHeight = abs(bmp.bmHeight);
av->bmWidth = abs(bmp.bmWidth);
av->hbmPic = (HBITMAP)h;
@@ -46,7 +46,7 @@ SimpleAvatar::SimpleAvatar(HANDLE h, bool bUseBitmap)
if (h && ServiceExists(MS_AV_GETAVATARBITMAP)) {
avNeedFree = false;
- av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)h, 0);
+ av = (AVATARCACHEENTRY*)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)h, 0);
if (av) {
if (av->hbmPic && (av->dwFlags&AVS_BITMAP_VALID) && !(av->dwFlags&AVS_HIDEONCLIST) && !(av->dwFlags&AVS_NOTREADY)) {
width = av->bmWidth;
diff --git a/plugins/Popup/src/avatars_simple.h b/plugins/Popup/src/avatars_simple.h
index 0479674cd4..490e1f403b 100644
--- a/plugins/Popup/src/avatars_simple.h
+++ b/plugins/Popup/src/avatars_simple.h
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
class SimpleAvatar : public PopupAvatar
{
private:
- avatarCacheEntry *av;
+ AVATARCACHEENTRY *av;
bool avNeedFree;
public:
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 2a2ba4411c..e3620340f7 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -134,7 +134,7 @@ struct SrmmWindowData : public CommonWindowData
int lastEventType;
DWORD flags;
int messagesInProgress;
- struct avatarCacheEntry *ace;
+ struct AVATARCACHEENTRY *ace;
int isMixed;
int sendAllConfirm;
HICON statusIcon;
diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp
index eca5257814..0ac3f749e3 100644
--- a/plugins/SecureIM/src/commonheaders.cpp
+++ b/plugins/SecureIM/src/commonheaders.cpp
@@ -107,8 +107,7 @@ void InitNetlib()
void DeinitNetlib()
{
- if (hNetlibUser)
- CallService(MS_NETLIB_CLOSEHANDLE, (WPARAM)hNetlibUser, 0);
+ Netlib_CloseHandle(hNetlibUser);
}
int Sent_NetLog(const char *fmt, ...)
diff --git a/plugins/SimpleStatusMsg/src/options.cpp b/plugins/SimpleStatusMsg/src/options.cpp
index 9eedcc3e5f..fb3c1d931e 100644
--- a/plugins/SimpleStatusMsg/src/options.cpp
+++ b/plugins/SimpleStatusMsg/src/options.cpp
@@ -1654,7 +1654,8 @@ int InitOptions(WPARAM wParam, LPARAM)
odp.flags = ODPF_BOLDGROUPS;
if (!ServiceExists(MS_SS_GETPROFILECOUNT)) {
- odp.szTitle.a = LPGEN("Status");
+ odp.szTitle.a = LPGEN("Startup status");
+ odp.szGroup.a = LPGEN("Status");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_STATUS);
odp.pfnDlgProc = DlgStatusOptionsProc;
Options_AddPage(wParam, &odp);
diff --git a/plugins/SimpleStatusMsg/src/version.h b/plugins/SimpleStatusMsg/src/version.h
index a888247a47..9ead42738d 100644
--- a/plugins/SimpleStatusMsg/src/version.h
+++ b/plugins/SimpleStatusMsg/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 1
#define __MINOR_VERSION 9
#define __RELEASE_NUM 0
-#define __BUILD_NUM 5
+#define __BUILD_NUM 6
#include <stdver.h>
diff --git a/plugins/StatusManager/StatusManager.vcxproj b/plugins/StatusManager/StatusManager.vcxproj
index 8fb9c5748d..f194247e9c 100644
--- a/plugins/StatusManager/StatusManager.vcxproj
+++ b/plugins/StatusManager/StatusManager.vcxproj
@@ -26,6 +26,18 @@
<Import Project="$(ProjectDir)..\..\build\vc.common\plugin.props" />
</ImportGroup>
<ItemGroup>
+ <ClInclude Include="src\KeepStatus\*.h" />
+ <ClCompile Include="src\KeepStatus\*.cpp">
+ <PrecompiledHeaderFile>..\stdafx.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClInclude Include="src\StartupStatus\*.h" />
+ <ClCompile Include="src\StartupStatus\*.cpp">
+ <PrecompiledHeaderFile>..\stdafx.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClInclude Include="src\AdvancedAutoAway\*.h" />
+ <ClCompile Include="src\AdvancedAutoAway\*.cpp">
+ <PrecompiledHeaderFile>..\stdafx.h</PrecompiledHeaderFile>
+ </ClCompile>
<ClCompile Include="..\helpers\gen_helpers.cpp">
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
@@ -39,4 +51,4 @@
<ExceptionHandling>Sync</ExceptionHandling>
</ClCompile>
</ItemDefinitionGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/plugins/StatusManager/StatusManager.vcxproj.filters b/plugins/StatusManager/StatusManager.vcxproj.filters
index 3361c3477f..8f90aeb3d5 100644
--- a/plugins/StatusManager/StatusManager.vcxproj.filters
+++ b/plugins/StatusManager/StatusManager.vcxproj.filters
@@ -1,374 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(ProjectDir)..\..\build\vc.common\common.filters" />
- <ItemGroup>
- <ClCompile Include="src\stdafx.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\options.cpp" />
- <ClCompile Include="src\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\options.cpp" />
- <ClCompile Include="src\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\options.cpp" />
- <ClCompile Include="src\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\options.cpp" />
- <ClCompile Include="src\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\options.cpp" />
- <ClCompile Include="src\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\options.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="src\aaa_msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\aaa_options.cpp" />
- <ClCompile Include="src\advancedautoaway.cpp" />
- <ClCompile Include="src\commonstatus.cpp" />
- <ClCompile Include="src\confirmdialog.cpp" />
- <ClCompile Include="src\keepstatus.cpp" />
- <ClCompile Include="src\ks_options.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\ss_options.cpp" />
- <ClCompile Include="src\ss_profiles.cpp" />
- <ClCompile Include="src\ss_toolbars.cpp" />
- <ClCompile Include="src\startupstatus.cpp" />
- <ClCompile Include="..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\commonstatus.h" />
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\startupstatus.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\commonstatus.h" />
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\startupstatus.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\commonstatus.h" />
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\startupstatus.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\commonstatus.h" />
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\startupstatus.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\commonstatus.h" />
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\startupstatus.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\commonstatus.h" />
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\startupstatus.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- <ClInclude Include="src\advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\commonstatus.h" />
- <ClInclude Include="src\keepstatus.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\startupstatus.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\version.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\StartupStatus.rc" />
- <ResourceCompile Include="res\version.rc" />
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\StartupStatus.rc" />
- <ResourceCompile Include="res\version.rc" />
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\StartupStatus.rc" />
- <ResourceCompile Include="res\version.rc" />
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\StartupStatus.rc" />
- <ResourceCompile Include="res\version.rc" />
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\StartupStatus.rc" />
- <ResourceCompile Include="res\version.rc" />
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\StartupStatus.rc" />
- <ResourceCompile Include="res\version.rc" />
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\StartupStatus.rc" />
- <ResourceCompile Include="res\version.rc" />
- </ItemGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/plugins/StatusManager/res/notick.ico b/plugins/StatusManager/res/notick.ico
deleted file mode 100644
index 7f93490642..0000000000
--- a/plugins/StatusManager/res/notick.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/StatusManager/res/notick1.ico b/plugins/StatusManager/res/notick1.ico
deleted file mode 100644
index 609504d614..0000000000
--- a/plugins/StatusManager/res/notick1.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/StatusManager/res/resource.rc b/plugins/StatusManager/res/resource.rc
index 5497def240..3edc4bc950 100644
--- a/plugins/StatusManager/res/resource.rc
+++ b/plugins/StatusManager/res/resource.rc
@@ -13,49 +13,73 @@
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// German (Germany) resources
+// English resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
-LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
#pragma code_page(1252)
-#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
-// TEXTINCLUDE
+// Dialog
//
-1 TEXTINCLUDE
+IDD_OPT_SUBPLUGINS DIALOGEX 0, 0, 302, 181
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- "..\\src\\resource.h\0"
+ GROUPBOX "Enable modules",IDC_STATIC,9,8,282,156
+ CONTROL "Keep status",IDC_ENABLE_KEEPSTATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,24,262,10
+ LTEXT "A connection checker. Automatically reconnects your accounts after protocol error or internet drop.",IDC_STATIC,40,36,241,24
+ CONTROL "Startup status",IDC_ENABLE_STARTUPSTATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,64,262,10
+ LTEXT "Allows you to define the status Miranda should set on startup, configurable per account.",IDC_STATIC,40,76,241,24
+ CONTROL "Advanced auto away",IDC_ENABLE_ADVANCEDAUTOAWAY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,105,262,10
+ LTEXT "Improved Auto Away module with some more options than the built in, configurable per account.",IDC_STATIC,40,117,241,24
+ LTEXT "Note: Miranda NG will have to be restarted for changes to take effect.",IDC_STATIC,19,148,270,9
END
-2 TEXTINCLUDE
-BEGIN
- "#include ""winres.h""\r\n"
- "\0"
-END
-3 TEXTINCLUDE
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
BEGIN
- "\r\n"
- "\0"
+ IDD_OPT_SUBPLUGINS, DIALOG
+ BEGIN
+ RIGHTMARGIN, 298
+ VERTGUIDE, 19
+ VERTGUIDE, 40
+ VERTGUIDE, 281
+ BOTTOMMARGIN, 176
+ END
END
-
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
-// Icon
+// AFX_DIALOG_LAYOUT
//
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_TTBDOWN ICON "ttbDown.ico"
+IDD_OPT_SUBPLUGINS AFX_DIALOG_LAYOUT
+BEGIN
+ 0x0000
+END
-IDI_TTBUP ICON "ttbUp.ico"
+#endif // English resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// German (Germany) resources
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+#pragma code_page(1252)
/////////////////////////////////////////////////////////////////////////////
//
@@ -360,7 +384,7 @@ BEGIN
END
IDD_TRG_AAASTATECHANGE DIALOGEX 0, 0, 212, 144
-STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
@@ -368,12 +392,12 @@ BEGIN
CONTROL "Entering second auto-away status",IDC_ENTERSECOND,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,37,123,10
CONTROL "Leaving first auto-away status",IDC_LEAVEFIRST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,50,109,10
- CONTROL "Leaving second auto-away status",IDC_LEAVESECOND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,63,122,10
- CONTROL "Becoming active without status change",IDC_BECOMEACTIVE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,76,140,10
GROUPBOX "Pre-conditions",IDC_STATIC,7,7,198,89
- GROUPBOX "TriggerData",IDC_STATIC,7,97,198,40
LTEXT "Status: The status the account will change to\r\nAccount: The account changing state",IDC_STATIC,19,111,177,18
+ GROUPBOX "TriggerData",IDC_STATIC,7,97,198,40
+ CONTROL "Becoming active without status change",IDC_BECOMEACTIVE,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,76,140,10
+ CONTROL "Leaving second auto-away status",IDC_LEAVESECOND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,63,122,10
END
@@ -445,6 +469,10 @@ BEGIN
VERTGUIDE, 11
VERTGUIDE, 283
END
+
+ IDD_TRG_AAASTATECHANGE, DIALOG
+ BEGIN
+ END
END
#endif // APSTUDIO_INVOKED
@@ -454,32 +482,73 @@ END
// AFX_DIALOG_LAYOUT
//
-IDD_OPT_KS_ADV AFX_DIALOG_LAYOUT
+IDD_OPT_KS_ADV AFX_DIALOG_LAYOUT
+BEGIN
+ 0x0000
+END
+
+IDD_OPT_AUTOAWAY AFX_DIALOG_LAYOUT
+BEGIN
+ 0x0000
+END
+
+IDD_OPT_GENAUTOAWAY AFX_DIALOG_LAYOUT
BEGIN
- 0
+ 0x0000
END
-IDD_OPT_AUTOAWAY AFX_DIALOG_LAYOUT
+IDD_OPT_KS_BASIC AFX_DIALOG_LAYOUT
BEGIN
- 0
+ 0x0000
END
-IDD_OPT_GENAUTOAWAY AFX_DIALOG_LAYOUT
+IDD_PUOPT_KEEPSTATUS AFX_DIALOG_LAYOUT
BEGIN
- 0
+ 0x0000
END
-IDD_OPT_KS_BASIC AFX_DIALOG_LAYOUT
+IDD_TRG_AAASTATECHANGE AFX_DIALOG_LAYOUT
BEGIN
- 0
+ 0x0000
END
-IDD_PUOPT_KEEPSTATUS AFX_DIALOG_LAYOUT
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
BEGIN
- 0
+ "..\\src\\resource.h\0"
END
-#endif // Deutsch (Deutschland) resources
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_TTBDOWN ICON "ttbDown.ico"
+IDI_TTBUP ICON "ttbUp.ico"
+#endif // German (Germany) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/StatusManager/res/useronli.ico b/plugins/StatusManager/res/useronli.ico
deleted file mode 100644
index 2760c47d5c..0000000000
--- a/plugins/StatusManager/res/useronli.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/StatusManager/src/aaa_msgoptions.cpp b/plugins/StatusManager/src/AdvancedAutoAway/aaa_msgoptions.cpp
index 5647199a43..2484440b2a 100644
--- a/plugins/StatusManager/src/aaa_msgoptions.cpp
+++ b/plugins/StatusManager/src/AdvancedAutoAway/aaa_msgoptions.cpp
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "stdafx.h"
+#include "..\stdafx.h"
extern char *StatusModeToDbSetting(int status,const char *suffix);
diff --git a/plugins/StatusManager/src/aaa_options.cpp b/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp
index d26678c1ce..63971adcdf 100644
--- a/plugins/StatusManager/src/aaa_options.cpp
+++ b/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp
@@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "stdafx.h"
+#include "..\stdafx.h"
int LoadAutoAwaySetting(TAAAProtoSetting &autoAwaySetting, char* protoName);
@@ -119,7 +119,7 @@ static void SetDialogStatus(HWND hwndDlg, TAAAProtoSetting *sameSetting)
/////////////////////////////////////////////////////////////////////////////////////////
// Rules dialog window procedure
-static TAAAProtoSettingList optionSettings(10, CompareSettings);
+static TAAAProtoSettingList optionSettings(10, AAACompareSettings);
static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -337,7 +337,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
for (int i = 0; i < optionSettings.getCount(); i++)
WriteAutoAwaySetting(optionSettings[i], optionSettings[i].szName);
}
- LoadOptions(autoAwaySettings, FALSE);
+ AAALoadOptions(autoAwaySettings, FALSE);
}
break;
@@ -402,7 +402,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA
db_set_w(NULL, AAAMODULENAME, SETTING_CONFIRMDELAY, (WORD)GetDlgItemInt(hwndDlg, IDC_CONFIRMDELAY, NULL, FALSE));
db_set_b(NULL, AAAMODULENAME, SETTING_MONITORMOUSE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE));
db_set_b(NULL, AAAMODULENAME, SETTING_MONITORKEYBOARD, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD));
- LoadOptions(autoAwaySettings, FALSE);
+ AAALoadOptions(autoAwaySettings, FALSE);
}
break;
}
@@ -513,6 +513,7 @@ int AutoAwayOptInitialise(WPARAM wParam, LPARAM)
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 1000000000;
odp.hInstance = hInst;
+ odp.hLangpack = hAAALangpack;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABS);
odp.szTitle.a = LPGEN("Auto away");
odp.szGroup.a = LPGEN("Status");
diff --git a/plugins/StatusManager/src/advancedautoaway.cpp b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp
index 7f09466bd2..b9647816f2 100644
--- a/plugins/StatusManager/src/advancedautoaway.cpp
+++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp
@@ -20,7 +20,9 @@
Some code is copied from Miranda's AutoAway module
*/
-#include "stdafx.h"
+#include "..\stdafx.h"
+
+int hAAALangpack = 0;
#ifdef _DEBUG
#define SECS_PER_MINUTE 20 /* speedup */
@@ -30,12 +32,7 @@
/////////////////////////////////////////////////////////////////////////////////////////
-int CompareSettings(const TAAAProtoSetting *p1, const TAAAProtoSetting *p2)
-{
- return mir_strcmp(p1->szName, p2->szName);
-}
-
-TAAAProtoSettingList autoAwaySettings(10, CompareSettings);
+TAAAProtoSettingList autoAwaySettings(10, AAACompareSettings);
TAAAProtoSetting::TAAAProtoSetting(PROTOACCOUNT *pa)
{
@@ -55,7 +52,8 @@ TAAAProtoSetting::~TAAAProtoSetting()
/////////////////////////////////////////////////////////////////////////////////////////
-extern HANDLE hStateChangedEvent;
+HANDLE hAAAModuleLoadedHook = NULL,
+ hStateChangedEvent = NULL;
static BOOL ignoreLockKeys = FALSE;
static BOOL ignoreSysKeys = FALSE;
@@ -95,7 +93,7 @@ extern char *StatusModeToDbSetting(int status,const char *suffix);
/////////////////////////////////////////////////////////////////////////////////////////
// Load from DB
-void LoadOptions(TAAAProtoSettingList &loadSettings, BOOL override)
+void AAALoadOptions(TAAAProtoSettingList &loadSettings, BOOL override)
{
// if override is enabled, samesettings will be ignored (for options loading)
int monitorMiranda = FALSE; // use windows hooks?
@@ -562,7 +560,7 @@ static int AutoAwayShutdown(WPARAM, LPARAM)
return 0;
}
-int AAACSModuleLoaded(WPARAM, LPARAM)
+int AAAModuleLoaded(WPARAM, LPARAM)
{
HookEvent(ME_PROTO_ACCLISTCHANGED, OnAAAAccChanged);
HookEvent(ME_OPT_INITIALISE, AutoAwayOptInitialise);
@@ -585,6 +583,21 @@ int AAACSModuleLoaded(WPARAM, LPARAM)
////////////////////////////////////////////////////////////////////////////////////////
- LoadOptions(autoAwaySettings, FALSE);
+ AAALoadOptions(autoAwaySettings, FALSE);
return 0;
}
+
+void AdvancedAutoAwayLoad()
+{
+ MUUID muidLast = MIID_LAST;
+ hAAALangpack = GetPluginLangId(muidLast, 0);
+
+ hAAAModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, AAAModuleLoaded);
+ hStateChangedEvent = CreateHookableEvent(ME_AAA_STATECHANGED);
+}
+
+void AdvancedAutoAwayUnload()
+{
+ UnhookEvent(hAAAModuleLoadedHook);
+ DestroyHookableEvent(hStateChangedEvent);
+} \ No newline at end of file
diff --git a/plugins/StatusManager/src/advancedautoaway.h b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h
index a8177c2a77..3f3a0b3c02 100644
--- a/plugins/StatusManager/src/advancedautoaway.h
+++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h
@@ -19,6 +19,8 @@
#ifndef __ADVANCED_AUTOAWAY_HEADER
#define __ADVANCED_AUTOAWAY_HEADER
+extern int hAAALangpack;
+
#define AAAMODULENAME "AdvancedAutoAway"
#define SETTING_IGNLOCK "IgnoreLockKeys"
#define SETTING_IGNSYSKEYS "IgnoreSysKeys"
@@ -70,6 +72,11 @@ struct TAAAProtoSetting : public PROTOCOLSETTINGEX, public MZeroedObject
unsigned int sts1setTimer;
};
+static int AAACompareSettings(const TAAAProtoSetting *p1, const TAAAProtoSetting *p2)
+{
+ return mir_strcmp(p1->szName, p2->szName);
+}
+
struct AAMSGSETTING
{
short useCustom;
@@ -77,14 +84,13 @@ struct AAMSGSETTING
char* msg;
};
-extern HINSTANCE hInst;
-
-int CompareSettings( const TAAAProtoSetting *p1, const TAAAProtoSetting *p2 );
+void AdvancedAutoAwayLoad();
+void AdvancedAutoAwayUnload();
typedef OBJLIST<TAAAProtoSetting> TAAAProtoSettingList;
extern TAAAProtoSettingList autoAwaySettings;
int LoadAutoAwaySetting(TAAAProtoSetting &autoAwaySetting, char *protoName);
-void LoadOptions(TAAAProtoSettingList &settings, BOOL override);
+void AAALoadOptions(TAAAProtoSettingList &settings, BOOL override);
#endif
diff --git a/plugins/StatusManager/src/keepstatus.cpp b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
index 41c244cde4..1cc209f0c7 100644
--- a/plugins/StatusManager/src/keepstatus.cpp
+++ b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
@@ -17,7 +17,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "stdafx.h"
+#include "..\stdafx.h"
+
+int hKSLangpack = 0;
struct TimerInfo {
int timer;
@@ -27,6 +29,16 @@ struct TimerInfo {
HANDLE hEvent;
};
+HANDLE hMainThread = 0;
+unsigned long mainThreadId = 0;
+
+HANDLE hKSModuleLoadedHook = NULL,
+ hConnectionEvent = NULL,
+ hStopRecon = NULL,
+ hEnableProto = NULL,
+ hIsProtoEnabled = NULL,
+ hAnnounceStat = NULL;
+
static mir_cs GenTimerCS, GenStatusCS, CheckContinueslyCS;
static HANDLE hProtoAckHook = NULL;
@@ -34,9 +46,6 @@ static HANDLE hStatusChangeHook = NULL;
static HANDLE hCSStatusChangeHook = NULL;
static HANDLE hCSStatusChangeExHook = NULL;
-extern HANDLE hConnectionEvent;
-extern PLUGININFOEX pluginInfoEx;
-
static HWND hMessageWindow = NULL;
static int CompareConnections(const TConnectionSettings *p1, const TConnectionSettings *p2)
@@ -64,7 +73,6 @@ static int showConnectionPopups = 0;
// prototypes
static int StartTimer(int timer, int timeout, BOOL restart);
static int StopTimer(int timer);
-int KSLoadMainOptions();
static void GetCurrentConnectionSettings();
static int AssignStatus(TConnectionSettings* connSetting, int status, int lastStatus, wchar_t *szMsg);
static int ProcessProtoAck(WPARAM wParam, LPARAM lParam);
@@ -83,7 +91,7 @@ INT_PTR IsProtocolEnabledService(WPARAM wParam, LPARAM lParam);
static int ProcessPopup(int reason, LPARAM lParam);
static INT_PTR ShowPopup(wchar_t *msg, HICON hIcon);
-LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
+LRESULT CALLBACK KSPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
static DWORD CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// options.c
@@ -106,7 +114,7 @@ TConnectionSettings::~TConnectionSettings()
free(szMsg);
}
-int KSLoadMainOptions()
+int KSLoadOptions()
{
UnhookEvent(hProtoAckHook);
UnhookEvent(hStatusChangeHook);
@@ -991,7 +999,7 @@ static INT_PTR ShowPopup(wchar_t *msg, HICON hIcon)
ppd.colorBack = db_get_dw(NULL, KSMODULENAME, SETTING_POPUP_BACKCOLOR, 0xAAAAAA);
ppd.colorText = db_get_dw(NULL, KSMODULENAME, SETTING_POPUP_TEXTCOLOR, 0x0000CC);
}
- ppd.PluginWindowProc = PopupDlgProc;
+ ppd.PluginWindowProc = KSPopupDlgProc;
switch (db_get_b(NULL, KSMODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYFROMPU)) {
case POPUP_DELAYCUSTOM:
@@ -1012,7 +1020,7 @@ static INT_PTR ShowPopup(wchar_t *msg, HICON hIcon)
return PUAddPopupT(&ppd);
}
-LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+LRESULT CALLBACK KSPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message) {
case WM_CONTEXTMENU: // right
@@ -1193,15 +1201,48 @@ static int onShutdown(WPARAM, LPARAM)
return 0;
}
-int KSCSModuleLoaded(WPARAM, LPARAM)
+int KSModuleLoaded(WPARAM, LPARAM)
{
protoList = (OBJLIST<PROTOCOLSETTINGEX>*)&connectionSettings;
hMessageWindow = NULL;
- KSLoadMainOptions();
+ KSLoadOptions();
HookEvent(ME_OPT_INITIALISE, KeepStatusOptionsInit);
HookEvent(ME_SYSTEM_PRESHUTDOWN, onShutdown);
HookEvent(ME_PROTO_ACCLISTCHANGED, OnKSAccChanged);
return 0;
}
+
+void KeepStatusLoad()
+{
+ MUUID muidLast = MIID_LAST;
+ hKSLangpack = GetPluginLangId(muidLast, 0);
+
+ hKSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, KSModuleLoaded);
+
+ CreateHookableEvent(ME_KS_CONNECTIONEVENT);
+
+ hStopRecon = CreateServiceFunction(MS_KS_STOPRECONNECTING, StopReconnectingService);
+ hEnableProto = CreateServiceFunction(MS_KS_ENABLEPROTOCOL, EnableProtocolService);
+ hIsProtoEnabled = CreateServiceFunction(MS_KS_ISPROTOCOLENABLED, IsProtocolEnabledService);
+ hAnnounceStat = CreateServiceFunction(MS_KS_ANNOUNCESTATUSCHANGE, AnnounceStatusChangeService);
+
+ DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, THREAD_SET_CONTEXT, FALSE, 0);
+ mainThreadId = GetCurrentThreadId();
+}
+
+void KeepStatusUnload()
+{
+ if (hMainThread)
+ CloseHandle(hMainThread);
+
+ DestroyServiceFunction(hStopRecon);
+ DestroyServiceFunction(hEnableProto);
+ DestroyServiceFunction(hIsProtoEnabled);
+ DestroyServiceFunction(hAnnounceStat);
+
+ DestroyHookableEvent(hConnectionEvent);
+
+ UnhookEvent(hKSModuleLoadedHook);
+}
diff --git a/plugins/StatusManager/src/keepstatus.h b/plugins/StatusManager/src/KeepStatus/keepstatus.h
index d44b312e80..167bb1a051 100644
--- a/plugins/StatusManager/src/keepstatus.h
+++ b/plugins/StatusManager/src/KeepStatus/keepstatus.h
@@ -20,6 +20,7 @@
#ifndef __KEEPSTATUS_HEADER
#define __KEEPSTATUS_HEADER
+extern int hKSLangpack;
#define KSMODULENAME "KeepStatus"
#define SETTING_CHECKCONNECTION "CheckConnection"
@@ -113,16 +114,12 @@ typedef struct {
#define ME_CS_STATUSCHANGE "CommonStatus/StatusChange"
/////////////////////////////////////////////////////////////////////////////////////////
-// main.cpp
-
-extern HINSTANCE hInst;
-extern HANDLE hMainThread;
-extern unsigned long mainThreadId;
-
-/////////////////////////////////////////////////////////////////////////////////////////
// keepstatus.cpp
-int KSLoadMainOptions();
-LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
+void KeepStatusLoad();
+void KeepStatusUnload();
+int KSLoadOptions();
+
+LRESULT CALLBACK KSPopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
#endif //__KEEPSTATUS_HEADER
diff --git a/plugins/StatusManager/src/ks_options.cpp b/plugins/StatusManager/src/KeepStatus/ks_options.cpp
index 890981a8c1..1a4d6075b8 100644
--- a/plugins/StatusManager/src/ks_options.cpp
+++ b/plugins/StatusManager/src/KeepStatus/ks_options.cpp
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "stdafx.h"
+#include "..\stdafx.h"
// prototypes
INT_PTR CALLBACK OptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -341,7 +341,7 @@ static INT_PTR CALLBACK DlgProcKsTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
SendMessage((HWND)tci.lParam, WM_NOTIFY, 0, lParam);
}
// let main reload options
- KSLoadMainOptions();
+ KSLoadOptions();
}
break;
}
@@ -497,7 +497,7 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l
ppd.colorBack = SendDlgItemMessage(hwndDlg, IDC_BGCOLOR, CPM_GETCOLOUR, 0, 0);
ppd.colorText = SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOR, CPM_GETCOLOUR, 0, 0);
}
- ppd.PluginWindowProc = PopupDlgProc;
+ ppd.PluginWindowProc = KSPopupDlgProc;
ppd.PluginData = NULL;
if (IsDlgButtonChecked(hwndDlg, IDC_DELAYFROMPU))
{
@@ -567,6 +567,7 @@ int KeepStatusOptionsInit(WPARAM wparam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
+ odp.hLangpack = hKSLangpack;
odp.szGroup.w = LPGENW("Status");
odp.szTitle.w = LPGENW("Keep status");
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
diff --git a/plugins/StatusManager/src/ss_options.cpp b/plugins/StatusManager/src/StartupStatus/ss_options.cpp
index 2acf61483f..eaa5566820 100644
--- a/plugins/StatusManager/src/ss_options.cpp
+++ b/plugins/StatusManager/src/StartupStatus/ss_options.cpp
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "stdafx.h"
+#include "..\stdafx.h"
/////////////////////////////////////////////////////////////////////////////////////////
@@ -27,7 +27,7 @@ TSettingsList* GetCurrentProtoSettings()
PROTOACCOUNT **protos;
Proto_EnumAccounts(&count, &protos);
- TSettingsList *result = new TSettingsList(count, CompareSettings);
+ TSettingsList *result = new TSettingsList(count, SSCompareSettings);
if (result == NULL)
return NULL;
@@ -905,6 +905,7 @@ int StartupStatusOptionsInit(WPARAM wparam,LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
+ odp.hLangpack = hSSLangpack;
odp.szGroup.a = LPGEN("Status");
odp.szTitle.a = LPGEN("Startup status");
odp.flags = ODPF_BOLDGROUPS;
diff --git a/plugins/StatusManager/src/ss_profiles.cpp b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
index 521d498fe9..5cb311b605 100644
--- a/plugins/StatusManager/src/ss_profiles.cpp
+++ b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "stdafx.h"
+#include "..\stdafx.h"
#define MAX_MMITEMS 6
@@ -57,6 +57,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
CMenuItem mi;
mi.position = 2000100000;
mi.flags = CMIF_UNICODE;
+ mi.hLangpack = hSSLangpack;
mcount = 0;
int count = GetProfileCount(0, 0);
for (int i = 0; i < count && mcount < MAX_MMITEMS; i++) {
@@ -65,7 +66,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
continue;
if (db_get_b(NULL, SSMODULENAME, OptName(i, SETTING_INSUBMENU), 1) && !mi.root) {
- mi.root = Menu_CreateRoot(MO_STATUS, LPGENW("Status profiles"), 2000100000);
+ mi.root = Menu_CreateRoot(MO_STATUS, LPGENW("Status profiles"), 2000100000, 0, hSSLangpack);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "1AB30D51-BABA-4B27-9288-1A12278BAD8D");
}
@@ -199,7 +200,7 @@ INT_PTR LoadAndSetProfile(WPARAM iProfileNo, LPARAM)
{
// wParam == profile no.
int profile = (int)iProfileNo;
- TSettingsList profileSettings(10, CompareSettings);
+ TSettingsList profileSettings(10, SSCompareSettings);
if (!GetProfile(profile, profileSettings)) {
profile = (profile >= 0) ? profile : db_get_w(NULL, SSMODULENAME, SETTING_DEFAULTPROFILE, 0);
@@ -313,6 +314,12 @@ int LoadProfileModule()
return 0;
}
+int UnloadProfileModule()
+{
+ DestroyServiceFunction(hLoadAndSetProfileService);
+ return 0;
+}
+
int InitProfileModule()
{
hTTBModuleLoadedHook = HookEvent(ME_TTB_MODULELOADED, CreateTopToolbarButtons);
@@ -337,7 +344,5 @@ int DeinitProfilesModule()
UnregisterHotKeys();
RemoveTopToolbarButtons();
-
- DestroyServiceFunction(hLoadAndSetProfileService);
return 0;
}
diff --git a/plugins/StatusManager/src/ss_toolbars.cpp b/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp
index 2ecf0a6b95..db8f6aeb61 100644
--- a/plugins/StatusManager/src/ss_toolbars.cpp
+++ b/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp
@@ -17,7 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "stdafx.h"
+#include "..\stdafx.h"
#define MAX_MMITEMS 6
@@ -41,7 +41,7 @@ void RemoveTopToolbarButtons()
int CreateTopToolbarButtons(WPARAM, LPARAM)
{
if (iconList[0].hIcolib == NULL)
- Icon_Register(hInst, "Toolbar/StartupStatus", iconList, _countof(iconList));
+ Icon_Register(hInst, "Toolbar/StartupStatus", iconList, _countof(iconList), NULL, hSSLangpack);
int profileCount = CallService(MS_SS_GETPROFILECOUNT, 0, 0);
diff --git a/plugins/StatusManager/src/startupstatus.cpp b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
index 995aa68934..b9de70b28c 100644
--- a/plugins/StatusManager/src/startupstatus.cpp
+++ b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
@@ -17,16 +17,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "stdafx.h"
+#include "..\stdafx.h"
-static UINT_PTR setStatusTimerId = 0;
+int hSSLangpack = 0;
-int CompareSettings(const TSSSetting *p1, const TSSSetting *p2)
-{
- return mir_strcmp(p1->szName, p2->szName);
-}
+static UINT_PTR setStatusTimerId = 0;
-static TSettingsList startupSettings(10, CompareSettings);
+static TSettingsList startupSettings(10, SSCompareSettings);
TSSSetting::TSSSetting(PROTOACCOUNT *pa)
{
@@ -342,8 +339,6 @@ static int OnOkToExit(WPARAM, LPARAM)
static int OnShutdown(WPARAM, LPARAM)
{
- DeinitProfilesModule();
-
// set windowstate and docked for next startup
if (db_get_b(NULL, SSMODULENAME, SETTING_SETWINSTATE, 0)) {
int state = db_get_b(NULL, SSMODULENAME, SETTING_WINSTATE, SETTING_STATE_NORMAL);
@@ -402,7 +397,7 @@ static DWORD CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM)
return TRUE;
}
-int SSCSModuleLoaded(WPARAM, LPARAM)
+int SSModuleLoaded(WPARAM, LPARAM)
{
protoList = (OBJLIST<PROTOCOLSETTINGEX>*)&startupSettings;
@@ -484,3 +479,51 @@ int SSCSModuleLoaded(WPARAM, LPARAM)
return 0;
}
+
+HANDLE hSSModuleLoadedHook = NULL,
+ hGetProfileService,
+ hGetProfileCountService,
+ hGetProfileNameService;
+
+void StartupStatusLoad()
+{
+ MUUID muidLast = MIID_LAST;
+ hSSLangpack = GetPluginLangId(muidLast, 0);
+
+ hSSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, SSModuleLoaded);
+
+ if (db_get_b(NULL, SSMODULENAME, SETTING_SETPROFILE, 1) ||
+ db_get_b(NULL, SSMODULENAME, SETTING_OFFLINECLOSE, 0))
+ db_set_w(NULL, "CList", "Status", (WORD)ID_STATUS_OFFLINE);
+
+ // docking
+ if (db_get_b(NULL, SSMODULENAME, SETTING_SETDOCKED, 0)) {
+ int docked = db_get_b(NULL, SSMODULENAME, SETTING_DOCKED, DOCKED_NONE);
+ if (docked == DOCKED_LEFT || docked == DOCKED_RIGHT)
+ docked = -docked;
+
+ db_set_b(NULL, MODULE_CLIST, SETTING_DOCKED, (BYTE)docked);
+ }
+
+ // Create service functions; the get functions are created here; they don't rely on commonstatus
+ hGetProfileService = CreateServiceFunction(MS_SS_GETPROFILE, SrvGetProfile);
+ hGetProfileCountService = CreateServiceFunction(MS_SS_GETPROFILECOUNT, GetProfileCount);
+ hGetProfileNameService = CreateServiceFunction(MS_SS_GETPROFILENAME, GetProfileName);
+
+ LoadProfileModule();
+}
+
+void StartupStatusUnload()
+{
+ KillModuleIcons(hSSLangpack);
+ KillModuleMenus(hSSLangpack);
+
+ DeinitProfilesModule();
+ UnloadProfileModule();
+
+ DestroyServiceFunction(hGetProfileService);
+ DestroyServiceFunction(hGetProfileCountService);
+ DestroyServiceFunction(hGetProfileNameService);
+
+ UnhookEvent(hSSModuleLoadedHook);
+}
diff --git a/plugins/StatusManager/src/startupstatus.h b/plugins/StatusManager/src/StartupStatus/startupstatus.h
index f106a141d9..e1ad779103 100644
--- a/plugins/StatusManager/src/startupstatus.h
+++ b/plugins/StatusManager/src/StartupStatus/startupstatus.h
@@ -19,6 +19,8 @@
#ifndef __STARTUPSTATUSHEADER
#define __STARTUPSTATUSHEADER
+extern int hSSLangpack;
+
#define SSMODULENAME "StartupStatus"
struct TSSSetting : public PROTOCOLSETTINGEX, public MZeroedObject
@@ -28,6 +30,11 @@ struct TSSSetting : public PROTOCOLSETTINGEX, public MZeroedObject
~TSSSetting();
};
+static int SSCompareSettings(const TSSSetting *p1, const TSSSetting *p2)
+{
+ return mir_strcmp(p1->szName, p2->szName);
+}
+
typedef OBJLIST<TSSSetting> TSettingsList;
struct PROFILECE
@@ -130,9 +137,10 @@ int StartupStatusOptionsInit(WPARAM wparam,LPARAM lparam);
char* OptName(int i, const char* setting);
// startupstatus
-int SSLoadMainOptions();
+void StartupStatusLoad();
+void StartupStatusUnload();
-int CompareSettings( const TSSSetting* p1, const TSSSetting* p2 );
+int SSLoadMainOptions();
TSettingsList* GetCurrentProtoSettings();
@@ -140,6 +148,11 @@ TSettingsList* GetCurrentProtoSettings();
int GetProfile(int profileID, TSettingsList& arSettings );
wchar_t *GetStatusMessage(int profile, char *szProto);
+static INT_PTR SrvGetProfile(WPARAM wParam, LPARAM lParam)
+{
+ return GetProfile((int)wParam, *(TSettingsList*)lParam);
+}
+
INT_PTR LoadAndSetProfile(WPARAM wParam, LPARAM lParam);
INT_PTR GetProfileCount(WPARAM wParam, LPARAM lParam);
INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam);
@@ -149,6 +162,7 @@ void RemoveTopToolbarButtons();
int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam);
int LoadProfileModule();
+int UnloadProfileModule();
int InitProfileModule();
int DeinitProfilesModule();
diff --git a/plugins/StatusManager/src/main.cpp b/plugins/StatusManager/src/main.cpp
index 41455e029a..e1cdb19222 100644
--- a/plugins/StatusManager/src/main.cpp
+++ b/plugins/StatusManager/src/main.cpp
@@ -19,21 +19,6 @@
#include "stdafx.h"
-unsigned long mainThreadId = 0;
-
-HANDLE hMainThread = 0,
- hCSModuleLoadedHook,
- hGetProfileService,
- hGetProfileCountService,
- hGetProfileNameService,
- hStateChangedEvent;
-
-HANDLE hConnectionEvent = NULL,
- hStopRecon = NULL,
- hEnableProto = NULL,
- hIsProtoEnabled = NULL,
- hAnnounceStat = NULL;
-
HINSTANCE hInst;
int hLangpack = 0;
CLIST_INTERFACE *pcli;
@@ -74,19 +59,26 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
/////////////////////////////////////////////////////////////////////////////////////////
// interfaces
-extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_AUTOAWAY, MIID_LAST };
+MUUID Interfaces[2] = {0};
+MUUID miidAutoAway = MIID_AUTOAWAY;
+
+
+MUUID* GetInterfaces(void)
+{
+ if (IsSubPluginEnabled(AAAMODULENAME))
+ Interfaces[0] = miidAutoAway;
+ return Interfaces;
+};
+
+extern "C" __declspec(dllexport) MUUID* MirandaInterfaces = GetInterfaces();
/////////////////////////////////////////////////////////////////////////////////////////
// plugin's entry point
-INT_PTR StopReconnectingService(WPARAM wParam, LPARAM lParam);
-INT_PTR EnableProtocolService(WPARAM wParam, LPARAM lParam);
-INT_PTR IsProtocolEnabledService(WPARAM wParam, LPARAM lParam);
-INT_PTR AnnounceStatusChangeService(WPARAM wParam, LPARAM lParam);
-
-static INT_PTR SrvGetProfile(WPARAM wParam, LPARAM lParam)
+int OnModulesLoaded(WPARAM, LPARAM)
{
- return GetProfile((int)wParam, *(TSettingsList*)lParam);
+ HookEvent(ME_OPT_INITIALISE, CSubPluginsOptionsDlg::OnOptionsInit);
+ return 0;
}
extern "C" int __declspec(dllexport) Load(void)
@@ -94,48 +86,16 @@ extern "C" int __declspec(dllexport) Load(void)
mir_getLP(&pluginInfoEx);
pcli = Clist_GetInterface();
- //common
- InitCommonStatus();
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- /* KeepStatus */
- hCSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, KSCSModuleLoaded);
-
- hConnectionEvent = CreateHookableEvent(ME_KS_CONNECTIONEVENT);
-
- hStopRecon = CreateServiceFunction(MS_KS_STOPRECONNECTING, StopReconnectingService);
- hEnableProto = CreateServiceFunction(MS_KS_ENABLEPROTOCOL, EnableProtocolService);
- hIsProtoEnabled = CreateServiceFunction(MS_KS_ISPROTOCOLENABLED, IsProtocolEnabledService);
- hAnnounceStat = CreateServiceFunction(MS_KS_ANNOUNCESTATUSCHANGE, AnnounceStatusChangeService);
-
- DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, THREAD_SET_CONTEXT, FALSE, 0);
- mainThreadId = GetCurrentThreadId();
-
- /* StartupStatus */
- hCSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, SSCSModuleLoaded);
-
- if (db_get_b(NULL, SSMODULENAME, SETTING_SETPROFILE, 1) ||
- db_get_b(NULL, SSMODULENAME, SETTING_OFFLINECLOSE, 0))
- db_set_w(NULL, "CList", "Status", (WORD)ID_STATUS_OFFLINE);
-
- // docking
- if (db_get_b(NULL, SSMODULENAME, SETTING_SETDOCKED, 0)) {
- int docked = db_get_b(NULL, SSMODULENAME, SETTING_DOCKED, DOCKED_NONE);
- if (docked == DOCKED_LEFT || docked == DOCKED_RIGHT)
- docked = -docked;
-
- db_set_b(NULL, MODULE_CLIST, SETTING_DOCKED, (BYTE)docked);
- }
-
- // Create service functions; the get functions are created here; they don't rely on commonstatus
- hGetProfileService = CreateServiceFunction(MS_SS_GETPROFILE, SrvGetProfile);
- hGetProfileCountService = CreateServiceFunction(MS_SS_GETPROFILECOUNT, GetProfileCount);
- hGetProfileNameService = CreateServiceFunction(MS_SS_GETPROFILENAME, GetProfileName);
-
- LoadProfileModule();
+ InitCommonStatus();
- /* AdvancedAutoAway */
- hCSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, AAACSModuleLoaded);
- hStateChangedEvent = CreateHookableEvent(ME_AAA_STATECHANGED);
+ if (IsSubPluginEnabled(KSMODULENAME))
+ KeepStatusLoad();
+ if (IsSubPluginEnabled(SSMODULENAME))
+ StartupStatusLoad();
+ if (IsSubPluginEnabled(AAAMODULENAME))
+ AdvancedAutoAwayLoad();
return 0;
}
@@ -145,22 +105,9 @@ extern "C" int __declspec(dllexport) Load(void)
extern "C" int __declspec(dllexport) Unload(void)
{
- UnhookEvent(hCSModuleLoadedHook);
-
- // StartupStatus
- DestroyHookableEvent(hConnectionEvent);
-
- if (hMainThread)
- CloseHandle(hMainThread);
- DestroyServiceFunction(hStopRecon);
- DestroyServiceFunction(hEnableProto);
- DestroyServiceFunction(hIsProtoEnabled);
- DestroyServiceFunction(hAnnounceStat);
-
- // StartupStatus
- DestroyServiceFunction(hGetProfileService);
- DestroyServiceFunction(hGetProfileCountService);
- DestroyServiceFunction(hGetProfileNameService);
+ KeepStatusUnload();
+ StartupStatusUnload();
+ AdvancedAutoAwayUnload();
return 0;
}
diff --git a/plugins/StatusManager/src/options.cpp b/plugins/StatusManager/src/options.cpp
new file mode 100644
index 0000000000..c6fe45bda4
--- /dev/null
+++ b/plugins/StatusManager/src/options.cpp
@@ -0,0 +1,42 @@
+#include "stdafx.h"
+
+CSubPluginsOptionsDlg::CSubPluginsOptionsDlg()
+ : CPluginDlgBase(hInst, IDD_OPT_SUBPLUGINS, MODULENAME),
+ m_enableKeepStatus(this, IDC_ENABLE_KEEPSTATUS),
+ m_enableStartupStatus(this, IDC_ENABLE_STARTUPSTATUS),
+ m_enableAdvancedAutoAway(this, IDC_ENABLE_ADVANCEDAUTOAWAY)
+{
+}
+
+void CSubPluginsOptionsDlg::OnInitDialog()
+{
+ CDlgBase::OnInitDialog();
+
+ m_enableKeepStatus.SetState(IsSubPluginEnabled(KSMODULENAME));
+ m_enableStartupStatus.SetState(IsSubPluginEnabled(SSMODULENAME));
+ m_enableAdvancedAutoAway.SetState(IsSubPluginEnabled(AAAMODULENAME));
+}
+
+void CSubPluginsOptionsDlg::OnApply()
+{
+ char setting[128];
+ mir_snprintf(setting, "%s_enabled", KSMODULENAME);
+ db_set_b(NULL, MODULENAME, setting, m_enableKeepStatus.GetState());
+ mir_snprintf(setting, "%s_enabled", SSMODULENAME);
+ db_set_b(NULL, MODULENAME, setting, m_enableStartupStatus.GetState());
+ mir_snprintf(setting, "%s_enabled", AAAMODULENAME);
+ db_set_b(NULL, MODULENAME, setting, m_enableAdvancedAutoAway.GetState());
+}
+
+int CSubPluginsOptionsDlg::OnOptionsInit(WPARAM wParam, LPARAM)
+{
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.hInstance = hInst;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
+ odp.szGroup.w = LPGENW("Status");
+ odp.szTitle.w = LPGENW("Status manager");
+ odp.pDialog = CSubPluginsOptionsDlg::CreateOptionsPage();
+ Options_AddPage(wParam, &odp);
+
+ return 0;
+} \ No newline at end of file
diff --git a/plugins/StatusManager/src/resource.h b/plugins/StatusManager/src/resource.h
index f49d2abbd5..fe80e01f93 100644
--- a/plugins/StatusManager/src/resource.h
+++ b/plugins/StatusManager/src/resource.h
@@ -1,8 +1,7 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by resource.rc
+// Used by E:\Projects\C++\miranda-ng\plugins\StatusManager\res\resource.rc
//
-#define IDD_OPT_KEEPSTATUS 101
#define IDD_OPT_KS_BASIC 101
#define IDD_CONFIRMDIALOG 102
#define IDD_OPT_AUTOAWAY 104
@@ -11,28 +10,23 @@
#define IDD_OPT_STARTUPSTATUS 110
#define IDD_PUOPT_KEEPSTATUS 113
#define IDD_OPT_AUTOAWAYMSG 114
-#define IDI_TICK 117
-#define IDI_NOTICK 118
#define IDD_OPT_GENAUTOAWAY 119
#define IDD_OPT_KS_ACTION 120
#define IDD_SETSTSMSGDIALOG 121
#define IDD_OPT_STATUSPROFILES 123
-#define IDD_OPT_AAATABS 126
#define IDD_OPT_TABS 126
#define IDD_OPT_KS_ADV 127
#define IDD_TRG_AAASTATECHANGE 128
#define IDI_TTBDOWN 129
+#define IDD_OPT_SUBPLUGINS 129
#define IDI_TTBUP 130
#define IDC_PROTOCOL 1000
#define IDC_STATUS 1001
#define IDC_PROFILE 1002
#define IDC_STARTUPLIST 1008
#define IDC_STATUSMSG 1008
-#define IDC_SETSTATUSONSTARTUP 1010
#define IDC_SETPROFILE 1010
-#define IDC_SETWINDOW 1011
#define IDC_SETWINSTATE 1011
-#define IDC_WINDOW 1012
#define IDC_WINSTATE 1012
#define IDC_CLOSE 1013
#define IDC_SHOWDIALOG 1014
@@ -46,7 +40,6 @@
#define IDC_CHECKCONNECTION 1025
#define IDC_MAXRETRIES 1026
#define IDC_INITDELAY 1027
-#define IDC_SETSTATUSDELAY 1027
#define IDC_SETPROFILEDELAY 1027
#define IDC_DOCKED 1028
#define IDC_SETDOCKED 1029
@@ -63,12 +56,10 @@
#define IDC_DELPROFILE 1042
#define IDC_PROFILENAME 1043
#define IDC_CANCEL 1044
-#define IDC_DEFAULTPROFILE 1045
#define IDC_MONITORMIRANDA 1045
#define IDC_WINCOLORS 1045
#define IDC_CHKINET 1045
#define IDC_IGNLOCK 1045
-#define IDC_CREATETTBBUTTONS 1046
#define IDC_CREATETTB 1046
#define IDC_PERPROTOCOLSETTINGS 1050
#define IDC_SAMESETTINGS 1051
@@ -145,12 +136,14 @@
#define IDC_LEAVEFIRST 1136
#define IDC_LEAVESECOND 1137
#define IDC_BECOMEACTIVE 1138
+#define IDC_ENABLE_KEEPSTATUS 1141
+#define IDC_ENABLE_STARTUPSTATUS 1142
+#define IDC_ENABLE_ADVANCEDAUTOAWAY 1143
#define IDC_SCREENSAVE 1145
#define IDC_TIMED 1146
#define IDC_AWAYTIME 1147
#define IDC_SETNA 1148
#define IDC_NATIME 1149
-#define IDC_SCREENSAVE2 1150
#define IDC_FULLSCREEN 1150
#define IDC_RADUSEMIRANDA 1210
#define IDC_RADUSECUSTOM 1212
@@ -160,9 +153,9 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 129
+#define _APS_NEXT_RESOURCE_VALUE 131
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1141
+#define _APS_NEXT_CONTROL_VALUE 1144
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/plugins/StatusManager/src/stdafx.h b/plugins/StatusManager/src/stdafx.h
index a8fd9051a7..f82e4ae86a 100644
--- a/plugins/StatusManager/src/stdafx.h
+++ b/plugins/StatusManager/src/stdafx.h
@@ -21,17 +21,48 @@
#include <m_protocols.h>
#include <m_toptoolbar.h>
#include <m_statusplugins.h>
+#include <m_gui.h>
#include "version.h"
#include "resource.h"
+#define MODULENAME "StatusManager"
+
#include "commonstatus.h"
-#include "keepstatus.h"
-#include "startupstatus.h"
-#include "advancedautoaway.h"
+#include "KeepStatus\keepstatus.h"
+#include "StartupStatus\startupstatus.h"
+#include "AdvancedAutoAway\advancedautoaway.h"
+
+extern HINSTANCE hInst;
+
+static BYTE IsSubPluginEnabled(const char* name)
+{
+ // Check if this plugin was disabled as separate dll
+ CMStringA dllName(FORMAT, "%s.dll", name);
+ dllName.MakeLower();
+ bool dllEnabled = !db_get_b(NULL, "PluginDisable", dllName);
+
+ char setting[128];
+ mir_snprintf(setting, "%s_enabled", name);
+ return db_get_b(NULL, MODULENAME, setting, dllEnabled ? 1 : 0);
+}
+
+class CSubPluginsOptionsDlg : CPluginDlgBase
+{
+private:
+ CCtrlCheck m_enableKeepStatus;
+ CCtrlCheck m_enableStartupStatus;
+ CCtrlCheck m_enableAdvancedAutoAway;
+
+protected:
+ void OnInitDialog();
+ void OnApply();
+
+public:
+ CSubPluginsOptionsDlg();
-int KSCSModuleLoaded(WPARAM, LPARAM);
-int SSCSModuleLoaded(WPARAM, LPARAM);
-int AAACSModuleLoaded(WPARAM, LPARAM);
+ static int OnOptionsInit(WPARAM wParam, LPARAM);
+ static CDlgBase *CreateOptionsPage() { return new CSubPluginsOptionsDlg(); }
+};
#endif //_COMMON_H_
diff --git a/plugins/StatusManager/src/version.h b/plugins/StatusManager/src/version.h
index afc5ef5d5f..d4e2982f74 100644
--- a/plugins/StatusManager/src/version.h
+++ b/plugins/StatusManager/src/version.h
@@ -1,7 +1,7 @@
// plugin version part
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 11
-#define __RELEASE_NUM 0
+#define __RELEASE_NUM 2
#define __BUILD_NUM 0
// other stuff for Version resource
@@ -14,4 +14,4 @@
#define __AUTHOR "P Boon"
#define __AUTHOREMAIL "unregistered@users.sourceforge.net"
#define __AUTHORWEB "http://miranda-ng.org/p/StatusManager/"
-#define __COPYRIGHT "© 2003-08 P. Boon, 2008-17 George Hazan"
+#define __COPYRIGHT "� 2003-08 P. Boon, 2008-17 George Hazan"
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index b6457fcdaa..0c9c79ba8f 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -164,8 +164,8 @@ void BB_InitDlgButtons(TWindowData *dat)
CustomButtonData *cbd;
for (int i = 0; cbd = Srmm_GetNthButton(i); i++) {
- HWND hwndBtn = GetDlgItem(hdlg, cbd->m_dwButtonCID);
- if (hwndBtn == NULL)
+ HWND hwndButton = GetDlgItem(hdlg, cbd->m_dwButtonCID);
+ if (hwndButton == NULL)
continue;
if (!cbd->m_bHidden) {
@@ -180,11 +180,14 @@ void BB_InitDlgButtons(TWindowData *dat)
if (cbd->m_bSeparator)
continue;
- CustomizeButton(hwndBtn);
+ CustomizeButton(hwndButton);
- SendMessage(hwndBtn, BUTTONSETASTHEMEDBTN, CSkin::IsThemed(), 0);
- SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
- SendMessage(hwndBtn, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
+ if (cbd->m_dwArrowCID)
+ SendMessage(hwndButton, BUTTONSETARROW, (cbd->m_dwButtonCID == IDOK) ? IDC_SENDMENU : cbd->m_dwArrowCID, 0);
+
+ SendMessage(hwndButton, BUTTONSETASTHEMEDBTN, CSkin::IsThemed(), 0);
+ SendMessage(hwndButton, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
+ SendMessage(hwndButton, BUTTONSETASTOOLBARBUTTON, TRUE, 0);
}
}
@@ -211,7 +214,7 @@ BOOL BB_SetButtonsPos(TWindowData *dat)
HWND hwnd = dat->hwnd;
RECT rect;
- HWND hwndBtn = 0;
+ HWND hwndButton = 0;
BYTE gap = DPISCALEX_S(db_get_b(NULL, SRMSGMOD, "ButtonsBarGap", 1));
bool showToolbar = !(dat->pContainer->dwFlags & CNT_HIDETOOLBAR);
@@ -252,40 +255,40 @@ BOOL BB_SetButtonsPos(TWindowData *dat)
continue;
if (((dat->bType == SESSIONTYPE_IM) && cbd->m_bIMButton) || ((dat->bType == SESSIONTYPE_CHAT) && cbd->m_bChatButton)) {
- hwndBtn = GetDlgItem(hwnd, cbd->m_dwButtonCID);
+ hwndButton = GetDlgItem(hwnd, cbd->m_dwButtonCID);
if (!showToolbar) {
- ShowWindow(hwndBtn, SW_HIDE);
- if (NULL != hwndBtn) /* Wine fix. */
- hdwp = DeferWindowPos(hdwp, hwndBtn, NULL, lwidth, splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
- if (IsWindowVisible(hwndBtn) || (cbd->m_bSeparator && !(cbd->m_bAutoHidden || cbd->m_bHidden)))
+ ShowWindow(hwndButton, SW_HIDE);
+ if (NULL != hwndButton) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hwndButton, NULL, lwidth, splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
+ if (IsWindowVisible(hwndButton) || (cbd->m_bSeparator && !(cbd->m_bAutoHidden || cbd->m_bHidden)))
lwidth += cbd->m_iButtonWidth + gap;
- if (!IsWindowEnabled(hwndBtn) && !IsWindowVisible(hwndBtn) && !cbd->m_bAutoHidden)
+ if (!IsWindowEnabled(hwndButton) && !IsWindowVisible(hwndButton) && !cbd->m_bAutoHidden)
cbd->m_bAutoHidden = 1;
continue;
}
- if (!cbd->m_bCanBeHidden && !cbd->m_bHidden && !(!IsWindowEnabled(hwndBtn) && !IsWindowVisible(hwndBtn) && !cbd->m_bAutoHidden)) {
- ShowWindow(hwndBtn, SW_SHOW);
+ if (!cbd->m_bCanBeHidden && !cbd->m_bHidden && !(!IsWindowEnabled(hwndButton) && !IsWindowVisible(hwndButton) && !cbd->m_bAutoHidden)) {
+ ShowWindow(hwndButton, SW_SHOW);
cbd->m_bAutoHidden = 0;
}
- if (!cbd->m_bSeparator && !IsWindowVisible(hwndBtn) && !IsWindowEnabled(hwndBtn) && !cbd->m_bAutoHidden)
+ if (!cbd->m_bSeparator && !IsWindowVisible(hwndButton) && !IsWindowEnabled(hwndButton) && !cbd->m_bAutoHidden)
tempL -= cbd->m_iButtonWidth + gap;
- if (cbd->m_bCanBeHidden && !cbd->m_bHidden && (cbd->m_bSeparator || !((!IsWindowEnabled(hwndBtn) && !IsWindowVisible(hwndBtn)) && !cbd->m_bAutoHidden))) {
+ if (cbd->m_bCanBeHidden && !cbd->m_bHidden && (cbd->m_bSeparator || !((!IsWindowEnabled(hwndButton) && !IsWindowVisible(hwndButton)) && !cbd->m_bAutoHidden))) {
if (tempL + tempR > (rect.right - foravatar)) {
- ShowWindow(hwndBtn, SW_HIDE);
+ ShowWindow(hwndButton, SW_HIDE);
cbd->m_bAutoHidden = 1;
tempL -= cbd->m_iButtonWidth + gap;
}
else if (cbd->m_bAutoHidden) {
- ShowWindow(hwndBtn, SW_SHOW);
+ ShowWindow(hwndButton, SW_SHOW);
cbd->m_bAutoHidden = 0;
}
}
- if (NULL != hwndBtn) /* Wine fix. */
- hdwp = DeferWindowPos(hdwp, hwndBtn, NULL, lwidth, splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);// SWP_NOCOPYBITS);
- if (IsWindowVisible(hwndBtn) || (cbd->m_bSeparator && !(cbd->m_bAutoHidden || cbd->m_bHidden)))
+ if (NULL != hwndButton) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hwndButton, NULL, lwidth, splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);// SWP_NOCOPYBITS);
+ if (IsWindowVisible(hwndButton) || (cbd->m_bSeparator && !(cbd->m_bAutoHidden || cbd->m_bHidden)))
lwidth += cbd->m_iButtonWidth + gap;
}
}
@@ -302,42 +305,42 @@ BOOL BB_SetButtonsPos(TWindowData *dat)
continue;
if (((dat->bType == SESSIONTYPE_IM) && cbd->m_bIMButton) || ((dat->bType == SESSIONTYPE_CHAT) && cbd->m_bChatButton)) {
- hwndBtn = GetDlgItem(hwnd, cbd->m_dwButtonCID);
+ hwndButton = GetDlgItem(hwnd, cbd->m_dwButtonCID);
if (!showToolbar) {
- ShowWindow(hwndBtn, SW_HIDE);
- if (IsWindowVisible(hwndBtn) || (cbd->m_bSeparator && !(cbd->m_bAutoHidden || cbd->m_bHidden)))
+ ShowWindow(hwndButton, SW_HIDE);
+ if (IsWindowVisible(hwndButton) || (cbd->m_bSeparator && !(cbd->m_bAutoHidden || cbd->m_bHidden)))
rwidth += cbd->m_iButtonWidth + gap;
- if (NULL != hwndBtn) /* Wine fix. */
- hdwp = DeferWindowPos(hdwp, hwndBtn, NULL, rect.right - foravatar - rwidth + gap, splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
- if (!IsWindowEnabled(hwndBtn) && !IsWindowVisible(hwndBtn) && !cbd->m_bAutoHidden)
+ if (NULL != hwndButton) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hwndButton, NULL, rect.right - foravatar - rwidth + gap, splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
+ if (!IsWindowEnabled(hwndButton) && !IsWindowVisible(hwndButton) && !cbd->m_bAutoHidden)
cbd->m_bAutoHidden = 1;
continue;
}
- if (!cbd->m_bCanBeHidden && !cbd->m_bHidden && !((!IsWindowEnabled(hwndBtn) && !IsWindowVisible(hwndBtn)) && !cbd->m_bAutoHidden)) {
- ShowWindow(hwndBtn, SW_SHOW);
+ if (!cbd->m_bCanBeHidden && !cbd->m_bHidden && !((!IsWindowEnabled(hwndButton) && !IsWindowVisible(hwndButton)) && !cbd->m_bAutoHidden)) {
+ ShowWindow(hwndButton, SW_SHOW);
cbd->m_bAutoHidden = 0;
}
- if (!cbd->m_bSeparator && !IsWindowVisible(hwndBtn) && !IsWindowEnabled(hwndBtn) && !cbd->m_bAutoHidden)
+ if (!cbd->m_bSeparator && !IsWindowVisible(hwndButton) && !IsWindowEnabled(hwndButton) && !cbd->m_bAutoHidden)
tempR -= cbd->m_iButtonWidth + gap;
- if (cbd->m_bCanBeHidden && !cbd->m_bHidden && (cbd->m_bSeparator || !((!IsWindowEnabled(hwndBtn) && !IsWindowVisible(hwndBtn)) && !cbd->m_bAutoHidden))) {
+ if (cbd->m_bCanBeHidden && !cbd->m_bHidden && (cbd->m_bSeparator || !((!IsWindowEnabled(hwndButton) && !IsWindowVisible(hwndButton)) && !cbd->m_bAutoHidden))) {
if (tempL + tempR > (rect.right - foravatar)) {
- ShowWindow(hwndBtn, SW_HIDE);
+ ShowWindow(hwndButton, SW_HIDE);
cbd->m_bAutoHidden = 1;
tempR -= cbd->m_iButtonWidth + gap;
}
else if (cbd->m_bAutoHidden) {
- ShowWindow(hwndBtn, SW_SHOW);
+ ShowWindow(hwndButton, SW_SHOW);
cbd->m_bAutoHidden = 0;
}
}
- if (IsWindowVisible(hwndBtn) || (cbd->m_bSeparator && !(cbd->m_bAutoHidden || cbd->m_bHidden)))
+ if (IsWindowVisible(hwndButton) || (cbd->m_bSeparator && !(cbd->m_bAutoHidden || cbd->m_bHidden)))
rwidth += cbd->m_iButtonWidth + gap;
- if (NULL != hwndBtn) /* Wine fix. */
- hdwp = DeferWindowPos(hdwp, hwndBtn, NULL, rect.right - foravatar - rwidth + gap, splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
+ if (NULL != hwndButton) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hwndButton, NULL, rect.right - foravatar - rwidth + gap, splitterY - iOff, 0, 0, SWP_NOZORDER | SWP_NOSIZE);
}
}
return EndDeferWindowPos(hdwp);
@@ -347,41 +350,41 @@ void CB_DestroyAllButtons(HWND hwndDlg)
{
CustomButtonData *cbd;
for (int i = 0; cbd = Srmm_GetNthButton(i); i++) {
- HWND hwndBtn = GetDlgItem(hwndDlg, cbd->m_dwButtonCID);
- if (hwndBtn)
- DestroyWindow(hwndBtn);
+ HWND hwndButton = GetDlgItem(hwndDlg, cbd->m_dwButtonCID);
+ if (hwndButton)
+ DestroyWindow(hwndButton);
}
}
void CB_DestroyButton(HWND hwndDlg, TWindowData *dat, DWORD dwButtonCID, DWORD dwFlags)
{
- HWND hwndBtn = GetDlgItem(hwndDlg, dwButtonCID);
- if (hwndBtn == NULL)
+ HWND hwndButton = GetDlgItem(hwndDlg, dwButtonCID);
+ if (hwndButton == NULL)
return;
RECT rc = { 0 };
- GetClientRect(hwndBtn, &rc);
+ GetClientRect(hwndButton, &rc);
if (dwFlags & BBBF_ISRSIDEBUTTON)
dat->bbRSideWidth -= rc.right;
else
dat->bbLSideWidth -= rc.right;
- DestroyWindow(hwndBtn);
+ DestroyWindow(hwndButton);
BB_SetButtonsPos(dat);
}
void CB_ChangeButton(HWND hwndDlg, TWindowData *dat, CustomButtonData *cbd)
{
- HWND hwndBtn = GetDlgItem(hwndDlg, cbd->m_dwButtonCID);
- if (hwndBtn == NULL)
+ HWND hwndButton = GetDlgItem(hwndDlg, cbd->m_dwButtonCID);
+ if (hwndButton == NULL)
return;
if (cbd->m_hIcon)
- SendMessage(hwndBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
+ SendMessage(hwndButton, BM_SETIMAGE, IMAGE_ICON, (LPARAM)IcoLib_GetIconByHandle(cbd->m_hIcon));
if (cbd->m_pwszTooltip)
- SendMessage(hwndBtn, BUTTONADDTOOLTIP, (WPARAM)cbd->m_pwszTooltip, BATF_UNICODE);
- SendMessage(hwndBtn, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
- SetWindowTextA(hwndBtn, cbd->m_pszModuleName);
+ SendMessage(hwndButton, BUTTONADDTOOLTIP, (WPARAM)cbd->m_pwszTooltip, BATF_UNICODE);
+ SendMessage(hwndButton, BUTTONSETCONTAINER, (LPARAM)dat->pContainer, 0);
+ SetWindowTextA(hwndButton, cbd->m_pszModuleName);
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 1f30d68496..d655767595 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -282,7 +282,7 @@ int TSAPI MsgWindowUpdateMenu(TWindowData *dat, HMENU submenu, int menuID)
}
else {
EnableMenuItem(submenu, 0, MF_BYPOSITION | MF_GRAYED);
- EnableMenuItem(submenu, ID_PICMENU_SETTINGS, MF_BYCOMMAND | ((ServiceExists(MS_AV_SETMYAVATAR) && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)(dat->cache->getActiveProto()), 0)) ? MF_ENABLED : MF_GRAYED));
+ EnableMenuItem(submenu, ID_PICMENU_SETTINGS, MF_BYCOMMAND | ((ServiceExists(MS_AV_SETMYAVATARW) && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)(dat->cache->getActiveProto()), 0)) ? MF_ENABLED : MF_GRAYED));
szText = TranslateT("Set your avatar...");
}
mii.dwTypeData = szText;
@@ -388,8 +388,8 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId)
CallService(MS_AV_CONTACTOPTIONS, dat->hContact, 0);
else if (menuId == MENU_PICMENU) {
if (dat->Panel->isActive()) {
- if (ServiceExists(MS_AV_SETMYAVATAR) && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)(dat->cache->getActiveProto()), 0))
- CallService(MS_AV_SETMYAVATAR, (WPARAM)(dat->cache->getActiveProto()), 0);
+ if (ServiceExists(MS_AV_SETMYAVATARW) && CallService(MS_AV_CANSETMYAVATAR, (WPARAM)(dat->cache->getActiveProto()), 0))
+ CallService(MS_AV_SETMYAVATARW, (WPARAM)(dat->cache->getActiveProto()), 0);
}
else
CallService(MS_AV_CONTACTOPTIONS, dat->hContact, 0);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 29f5e8aa3b..d00fcfb84e 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -302,7 +302,7 @@ struct TWindowData
HANDLE hTimeZone;
DWORD panelStatusCX;
COLORREF inputbg;
- avatarCacheEntry *ace, *ownAce;
+ AVATARCACHEENTRY *ace, *ownAce;
MEVENT *hHistoryEvents;
int maxHistory, curHistory;
HANDLE hTheme, hThemeIP, hThemeToolbar;
diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp
index bf510a731b..48a619d79d 100644
--- a/plugins/UserInfoEx/src/svc_avatar.cpp
+++ b/plugins/UserInfoEx/src/svc_avatar.cpp
@@ -27,16 +27,13 @@ namespace NServices
{
static HANDLE ghChangedHook = NULL;
- static int GetContactAvatarFileName(LPCTSTR zodiac, LPSTR szFileName, int cchFileName)
+ static int GetContactAvatarFileName(LPCWSTR zodiac, LPWSTR szFileName, int cchFileName)
{
- if (!Profile_GetPathA(cchFileName, szFileName)) {
- size_t len = mir_strlen(szFileName);
+ if (!Profile_GetPathW(cchFileName, szFileName)) {
+ size_t len = mir_wstrlen(szFileName);
+ mir_snwprintf(szFileName + len, cchFileName - len, L"\\avatars\\%s.png", zodiac);
- CHAR tmp[64];
- if (WideCharToMultiByte(CP_ACP, 0, zodiac, 64, tmp, _countof(tmp), 0, 0) > 0)
- mir_snprintf(szFileName + len, cchFileName - len, "\\avatars\\%s.png", tmp);
-
- return !PathFileExistsA(szFileName);
+ return !PathFileExistsW(szFileName);
}
return 1;
}
@@ -49,7 +46,7 @@ namespace NServices
if (!mtb.DBGetBirthDate(hContact)) {
MZodiac zodiac;
//ICONINFO iinfo;
- CHAR szFileName[MAX_PATH];
+ WCHAR szFileName[MAX_PATH];
// get zodiac for birthday
zodiac = mtb.Zodiac();
@@ -59,7 +56,7 @@ namespace NServices
//GetIconInfo(zodiac.hIcon, &iinfo);
// save the bitmap to a file used as avatar later
- if (!CallService(MS_AV_SETAVATAR, hContact, (LPARAM)szFileName))
+ if (!CallService(MS_AV_SETAVATARW, hContact, (LPARAM)szFileName))
db_set_b(hContact, "ContactPhoto", "IsZodiac", 1);
}
}
diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp
index 4deefca9b4..b345b25f26 100644
--- a/plugins/UserInfoEx/src/svc_constants.cpp
+++ b/plugins/UserInfoEx/src/svc_constants.cpp
@@ -231,7 +231,8 @@ static IDSTRLIST TmplMarital[]={
{40, LPGEN("Widowed"), 0},
{50, LPGEN("Actively searching"), 0 },
{60, LPGEN("In love"), 0 },
- {70, LPGEN("It\'s complicated"), 0 }
+ {70, LPGEN("It\'s complicated"), 0 },
+ {80, LPGEN("In a civil union"), 0 }
};
static IDSTRLIST TmplPrefixes[]={
diff --git a/plugins/Utils.pas/mirutils.pas b/plugins/Utils.pas/mirutils.pas
index 10f2ea2578..4ede3640a2 100644
--- a/plugins/Utils.pas/mirutils.pas
+++ b/plugins/Utils.pas/mirutils.pas
@@ -458,7 +458,7 @@ begin
end;
if (hNetLib=0) and (nlu.cbSize<>0) then
- CallService(MS_NETLIB_CLOSEHANDLE,hTmpNetLib,0);
+ Netlib_CloseHandle(hTmpNetLib);
end;
(*
@@ -537,7 +537,7 @@ begin
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,lparam(resp));
if nlu.cbSize<>0 then
- CallService(MS_NETLIB_CLOSEHANDLE,hNetLib,0);
+ Netlib_CloseHandle(hNetLib);
end;
end;
@@ -640,7 +640,7 @@ begin
end;
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,lparam(resp));
end;
- CallService(MS_NETLIB_CLOSEHANDLE,hNetLib,0);
+ Netlib_CloseHandle(hNetLib);
end;
function RegisterSingleIcon(resname,ilname,descr,group:PAnsiChar):int;
diff --git a/plugins/Watrack/myshows/i_cookies.inc b/plugins/Watrack/myshows/i_cookies.inc
index 1258490199..3241134cf3 100644
--- a/plugins/Watrack/myshows/i_cookies.inc
+++ b/plugins/Watrack/myshows/i_cookies.inc
@@ -87,5 +87,5 @@ begin
CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,lparam(resp));
end;
- CallService(MS_NETLIB_CLOSEHANDLE,hTmpNetLib,0);
+ Netlib_CloseHandle(hTmpNetLib);
end;
diff --git a/plugins/YAMN/src/proto/netlib.cpp b/plugins/YAMN/src/proto/netlib.cpp
index 0d8df55ab1..cc8f73a602 100644
--- a/plugins/YAMN/src/proto/netlib.cpp
+++ b/plugins/YAMN/src/proto/netlib.cpp
@@ -119,14 +119,7 @@ void CNLClient::Connect(const char* servername, const int port) throw(DWORD)
// query- command to send
int CNLClient::LocalNetlib_Send(HANDLE hConn, const char *buf, int len, int flags)
{
- if (isTLSed) {
- #ifdef DEBUG_COMM
- SSL_DebugLog("SSL send: %s", buf);
- #endif
- }
-
- NETLIBBUFFER nlb = { (char*)buf,len,flags };
- return CallService(MS_NETLIB_SEND, (WPARAM)hConn, (LPARAM)&nlb);
+ return Netlib_Send(hConn, buf, len, flags);
}
void CNLClient::Send(const char *query) throw(DWORD)
@@ -166,8 +159,7 @@ void CNLClient::Send(const char *query) throw(DWORD)
int CNLClient::LocalNetlib_Recv(HANDLE hConn, char *buf, int len, int flags)
{
- NETLIBBUFFER nlb = { buf,len,flags };
- int iReturn = CallService(MS_NETLIB_RECV, (WPARAM)hConn, (LPARAM)&nlb);
+ int iReturn = Netlib_Recv(hConn, buf, len, flags);
if (isTLSed) {
#ifdef DEBUG_COMM
SSL_DebugLog("SSL recv: %s", buf);
diff --git a/plugins/mRadio/mradio.dpr b/plugins/mRadio/mradio.dpr
index 3843cf56cd..3c3a5c3050 100644
--- a/plugins/mRadio/mradio.dpr
+++ b/plugins/mRadio/mradio.dpr
@@ -130,7 +130,7 @@ begin
DestroyHookableEvent(hhRadioStatus);
- CallService(MS_NETLIB_CLOSEHANDLE,hNetLib,0);
+ Netlib_CloseHandle(hNetLib);
mFreeMem(storage);
mFreeMem(storagep);