summaryrefslogtreecommitdiff
path: root/plugins/Sessions/Src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-02 22:21:55 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-02 22:21:55 +0300
commit10091bbca1380a1d8e3b9d61b8c175490036af5b (patch)
treeb08bd16212909ac1b72bfefaa70ab71b4e63974d /plugins/Sessions/Src
parent2347a641948e9082b0e842eb0a8480abdfba09e0 (diff)
old shit died
now there's no need to create fake services & events
Diffstat (limited to 'plugins/Sessions/Src')
-rw-r--r--plugins/Sessions/Src/Main.cpp12
-rw-r--r--plugins/Sessions/Src/stdafx.h2
2 files changed, 2 insertions, 12 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index d1c379893d..ba1cbaf64d 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -740,11 +740,8 @@ static int CreateButtons(WPARAM, LPARAM)
return 0;
}
-static INT_PTR LaunchSessions(WPARAM wParam, LPARAM)
+static void CALLBACK LaunchSessions()
{
- CallService(MS_SYSTEM_REMOVEWAIT, wParam, 0);
- CloseHandle((HANDLE)wParam);
-
int startup = db_get_b(NULL, MODNAME, "StartupMode", 3);
if (startup == 1 || (startup == 3 && isLastTRUE == TRUE)) {
StartUp = TRUE;
@@ -754,7 +751,6 @@ static INT_PTR LaunchSessions(WPARAM wParam, LPARAM)
g_hghostw = TRUE;
g_hDlg = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_WLCMDIALOG), 0, LoadSessionDlgProc);
}
- return 0;
}
static int PluginInit(WPARAM, LPARAM)
@@ -846,11 +842,7 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(MS_SESSIONS_SAVEUSERSESSION, SaveUserSessionHandles);
CreateServiceFunction(MS_SESSIONS_CLOSESESSION, CloseCurrentSession);
- HANDLE hEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
- if (hEvent != 0) {
- CreateServiceFunction(MS_SESSIONS_LAUNCHME, LaunchSessions);
- CallService(MS_SYSTEM_WAITONHANDLE, (WPARAM)hEvent, (LPARAM)MS_SESSIONS_LAUNCHME);
- }
+ Miranda_WaitOnHandle(LaunchSessions);
g_ses_count = db_get_b(NULL, MODNAME, "UserSessionsCount", 0);
g_ses_limit = db_get_b(NULL, MODNAME, "TrackCount", 10);
diff --git a/plugins/Sessions/Src/stdafx.h b/plugins/Sessions/Src/stdafx.h
index d6cad97c92..35d25db35b 100644
--- a/plugins/Sessions/Src/stdafx.h
+++ b/plugins/Sessions/Src/stdafx.h
@@ -44,8 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MODNAME "Sessions"
-#define MS_SESSIONS_LAUNCHME "Sessions/Service/LaunchMe"
-
extern IconItem iconList[];
#define MIIM_STRING 0x00000040