summaryrefslogtreecommitdiff
path: root/plugins/StatusManager/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-10-15 14:03:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-10-15 14:03:04 +0300
commit73c3207950044c5156bbb74ca2f60fc5b5b2d81a (patch)
tree57d0db73aefa91d884de5fce149410a17ec9034c /plugins/StatusManager/src
parent551a43bcc498123ecfabb5951f858b824d54befd (diff)
unused service removed
Diffstat (limited to 'plugins/StatusManager/src')
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp2
-rw-r--r--plugins/StatusManager/src/StartupStatus/ss_profiles.cpp2
-rw-r--r--plugins/StatusManager/src/StartupStatus/startupstatus.cpp2
-rw-r--r--plugins/StatusManager/src/commonstatus.cpp4
-rw-r--r--plugins/StatusManager/src/commonstatus.h6
-rw-r--r--plugins/StatusManager/src/confirmdialog.cpp15
6 files changed, 14 insertions, 17 deletions
diff --git a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp
index 97ddeaef97..c15fc40239 100644
--- a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp
+++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp
@@ -370,7 +370,7 @@ static VOID CALLBACK AutoAwayTimer(HWND, UINT, UINT_PTR, DWORD)
}
if (confirm)
- confirmDialog = (HWND)CallService(MS_CS_SHOWCONFIRMDLGEX, (WPARAM)&ps, db_get_w(NULL, AAAMODULENAME, SETTING_CONFIRMDELAY, 5));
+ confirmDialog = ShowConfirmDialogEx((TProtoSettings*)&ps, db_get_w(NULL, AAAMODULENAME, SETTING_CONFIRMDELAY, 5));
else if (statusChanged)
CallService(MS_CS_SETSTATUSEX, (WPARAM)&ps, 0);
}
diff --git a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
index 275883d9ce..ba056510f5 100644
--- a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
+++ b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
@@ -206,7 +206,7 @@ INT_PTR LoadAndSetProfile(WPARAM iProfileNo, LPARAM)
if (!db_get_b(NULL, SSMODULENAME, setting, 0))
CallService(MS_CS_SETSTATUSEX, (WPARAM)&profileSettings, 0);
else
- CallService(MS_CS_SHOWCONFIRMDLGEX, (WPARAM)&profileSettings, (LPARAM)db_get_dw(NULL, SSMODULENAME, SETTING_DLGTIMEOUT, 5));
+ ShowConfirmDialogEx((TProtoSettings*)&profileSettings, db_get_dw(NULL, SSMODULENAME, SETTING_DLGTIMEOUT, 5));
}
// add timer here
diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
index ccfa0819a7..fb2b87ea0f 100644
--- a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
+++ b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
@@ -421,7 +421,7 @@ int SSModuleLoaded(WPARAM, LPARAM)
// set the status!
if (showDialogOnStartup || db_get_b(NULL, SSMODULENAME, SETTING_SHOWDIALOG, 0))
- CallService(MS_CS_SHOWCONFIRMDLGEX, (WPARAM)&startupSettings, db_get_dw(NULL, SSMODULENAME, SETTING_DLGTIMEOUT, 5));
+ ShowConfirmDialogEx((TProtoSettings*)&startupSettings, db_get_dw(NULL, SSMODULENAME, SETTING_DLGTIMEOUT, 5));
else if (db_get_b(NULL, SSMODULENAME, SETTING_SETPROFILE, 1)) {
// set hooks for override
if (db_get_b(NULL, SSMODULENAME, SETTING_OVERRIDE, 1)) {
diff --git a/plugins/StatusManager/src/commonstatus.cpp b/plugins/StatusManager/src/commonstatus.cpp
index be3f778397..6869550b1a 100644
--- a/plugins/StatusManager/src/commonstatus.cpp
+++ b/plugins/StatusManager/src/commonstatus.cpp
@@ -33,9 +33,6 @@ INT_PTR SetStatusEx(WPARAM wParam, LPARAM lParam);
int InitCommonStatus();
int GetProtoCount();
-// extern
-extern INT_PTR ShowConfirmDialogEx(WPARAM wParam, LPARAM lParam);
-
// some helpers from awaymsg.c ================================================================
char *StatusModeToDbSetting(int status, const char *suffix)
{
@@ -284,7 +281,6 @@ static int CreateServices()
hCSStatusChangedExEvent = CreateHookableEvent(ME_CS_STATUSCHANGEEX);
CreateServiceFunction(MS_CS_SETSTATUSEX, SetStatusEx);
- CreateServiceFunction(MS_CS_SHOWCONFIRMDLGEX, ShowConfirmDialogEx);
CreateServiceFunction(MS_CS_GETPROTOCOUNT, GetProtocolCountService);
return 0;
}
diff --git a/plugins/StatusManager/src/commonstatus.h b/plugins/StatusManager/src/commonstatus.h
index 59a39708b6..438a4f6614 100644
--- a/plugins/StatusManager/src/commonstatus.h
+++ b/plugins/StatusManager/src/commonstatus.h
@@ -79,7 +79,11 @@ bool IsSuitableProto(PROTOACCOUNT *pa);
// allways returns 1
#define MS_SA_ISSARUNNING "SimpleAway/IsSARunning"
+typedef OBJLIST<PROTOCOLSETTINGEX> TProtoSettings;
+
extern HINSTANCE hInst;
-extern OBJLIST<PROTOCOLSETTINGEX>* protoList;
+extern TProtoSettings *protoList;
+
+HWND ShowConfirmDialogEx(TProtoSettings *params, int _timeout);
#endif //COMMONSTATUSHEADER
diff --git a/plugins/StatusManager/src/confirmdialog.cpp b/plugins/StatusManager/src/confirmdialog.cpp
index 82225f2320..c3d093738b 100644
--- a/plugins/StatusManager/src/confirmdialog.cpp
+++ b/plugins/StatusManager/src/confirmdialog.cpp
@@ -206,6 +206,7 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
else
SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_SETCURSEL, defaultProfile, 0);
}
+
// start timer
if (timeOut > 0) {
wchar_t text[32];
@@ -400,19 +401,15 @@ static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
return 0;
}
-INT_PTR ShowConfirmDialogEx(WPARAM wParam, LPARAM lParam)
+HWND ShowConfirmDialogEx(OBJLIST<PROTOCOLSETTINGEX> *params, int _timeout)
{
- if (wParam == 0)
- return -1;
-
delete confirmSettings;
confirmSettings = new OBJLIST<TConfirmSetting>(10, CompareSettings);
- OBJLIST<PROTOCOLSETTINGEX>& param = *(OBJLIST<PROTOCOLSETTINGEX>*)wParam;
- for (int i = 0; i < param.getCount(); i++)
- confirmSettings->insert(new TConfirmSetting(param[i]));
+ for (int i = 0; i < params->getCount(); i++)
+ confirmSettings->insert(new TConfirmSetting((*params)[i]));
- timeOut = lParam;
+ timeOut = _timeout;
if (timeOut < 0)
timeOut = DEF_CLOSE_TIME;
@@ -421,5 +418,5 @@ INT_PTR ShowConfirmDialogEx(WPARAM wParam, LPARAM lParam)
EnableWindow(win, TRUE);
}
- return (INT_PTR)win;
+ return win;
}