summaryrefslogtreecommitdiff
path: root/plugins/CountryFlags
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-11 07:08:40 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-11 07:08:40 +0000
commitbd820972afe24409e6b570adbc45f5dc0fa2385d (patch)
treee600bf39409083219c7928e10ec2b61002529641 /plugins/CountryFlags
parent6029165c364f93a84ab7e98ef71d3a711b0f588c (diff)
SRMM icons to be unloaded automatically
git-svn-id: http://svn.miranda-ng.org/main/trunk@4418 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CountryFlags')
-rw-r--r--plugins/CountryFlags/src/extraimg.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp
index 7da037909a..4300276f53 100644
--- a/plugins/CountryFlags/src/extraimg.cpp
+++ b/plugins/CountryFlags/src/extraimg.cpp
@@ -165,7 +165,7 @@ static void CALLBACK UpdateStatusIcons(LPARAM lParam)
static int StatusIconsChanged(WPARAM wParam,LPARAM lParam)
{
- if (ServiceExists(MS_MSG_ADDICON))
+ if (ServiceExists(MS_MSG_MODIFYICON))
if ( db_get_b(NULL, MODULENAME, "ShowStatusIconFlag", SETTING_SHOWSTATUSICONFLAG_DEFAULT))
CallFunctionBuffered(UpdateStatusIcons, 0, FALSE, STATUSICON_REFRESHDELAY);
return 0;
@@ -184,7 +184,7 @@ static INT_PTR CALLBACK ExtraImgOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,L
{
BOOL val;
/* Status Icon */
- if (ServiceExists(MS_MSG_ADDICON))
+ if (ServiceExists(MS_MSG_REMOVEICON))
val = db_get_b(NULL, MODULENAME, "ShowStatusIconFlag", SETTING_SHOWSTATUSICONFLAG_DEFAULT) != 0;
else
EnableWindow(GetDlgItem(hwndDlg,IDC_CHECK_SHOWSTATUSICONFLAG),val=FALSE);
@@ -266,7 +266,7 @@ static int ExtraImgSettingChanged(WPARAM wParam,LPARAM lParam)
if (!lstrcmpA(dbcws->szSetting,"ShowStatusIconFlag") ||
!lstrcmpA(dbcws->szSetting,"UseUnknownFlag") ||
!lstrcmpA(dbcws->szSetting,"UseIpToCountry"))
- if (ServiceExists(MS_MSG_ADDICON))
+ if (ServiceExists(MS_MSG_REMOVEICON))
CallFunctionBuffered(UpdateStatusIcons,0,FALSE,STATUSICON_REFRESHDELAY);
}
}
@@ -277,7 +277,7 @@ static int ExtraImgSettingChanged(WPARAM wParam,LPARAM lParam)
/* Extra Image */
SetExtraImage((HANDLE)wParam);
/* Status Icon */
- if (ServiceExists(MS_MSG_ADDICON))
+ if (ServiceExists(MS_MSG_REMOVEICON))
CallFunctionBuffered(UpdateStatusIcons,0,FALSE,STATUSICON_REFRESHDELAY);
}
return 0;
@@ -298,29 +298,19 @@ static int ExtraImgModulesLoaded(WPARAM wParam,LPARAM lParam)
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULENAME; // dwID = 0
sid.flags = MBF_HIDDEN;
- CallService(MS_MSG_ADDICON, 0, (LPARAM)&sid);
+ Srmm_AddIcon(&sid);
/* Status Icon */
HookEvent(ME_MSG_WINDOWEVENT, MsgWndEvent);
return 0;
}
-static int ExtraImgShutdown(WPARAM, LPARAM)
-{
- StatusIconData sid = { sizeof(sid) };
- sid.szModule = MODULENAME; // dwID = 0
- sid.flags = MBF_HIDDEN;
- CallService(MS_MSG_REMOVEICON, 0, (LPARAM)&sid);
- return 0;
-}
-
void InitExtraImg(void)
{
/* Services */
hServiceDetectContactOrigin = CreateServiceFunction(MS_FLAGS_DETECTCONTACTORIGINCOUNTRY,ServiceDetectContactOriginCountry);
/* Misc */
HookEvent(ME_SYSTEM_MODULESLOADED, ExtraImgModulesLoaded);
- HookEvent(ME_SYSTEM_PRESHUTDOWN, ExtraImgShutdown);
/* Status icon */
HookEvent(ME_SKIN2_ICONSCHANGED,StatusIconsChanged);
/* Options */