From 1c6adee432acbc6ea6e8f7108d972d85f1017232 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 27 Aug 2013 18:07:41 +0000 Subject: fixes for StatusIconData initialization git-svn-id: http://svn.miranda-ng.org/main/trunk@5863 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistorySweeperLight/src/main.cpp | 9 ++++----- plugins/HistorySweeperLight/src/options.cpp | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins/HistorySweeperLight') diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp index 75f8d65143..3f3bfa84a1 100644 --- a/plugins/HistorySweeperLight/src/main.cpp +++ b/plugins/HistorySweeperLight/src/main.cpp @@ -53,9 +53,9 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam) if ( !(sicd->flags & MBCF_RIGHTBUTTON) && !lstrcmpA(sicd->szModule, ModuleName) && db_get_b(NULL, ModuleName, "ChangeInMW", 0)) { - int nh = sicd->dwId; HANDLE hContact = (HANDLE)wParam; StatusIconData sid = {0}; - - sid.cbSize = sizeof(sid); + int nh = sicd->dwId; HANDLE hContact = (HANDLE)wParam; + + StatusIconData sid = { sizeof(sid) }; sid.szModule = ModuleName; sid.dwId = nh; sid.flags = MBF_HIDDEN; @@ -74,10 +74,9 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam) int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { - StatusIconData sid = {0}; int i, sweep = db_get_b(NULL, ModuleName, "SweepHistory", 0); - sid.cbSize = sizeof(sid); + StatusIconData sid = { sizeof(sid) }; sid.szModule = ModuleName; sid.hIcon = LoadIconEx("actG"); diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp index 436fecd86f..d2b2a329f7 100644 --- a/plugins/HistorySweeperLight/src/options.cpp +++ b/plugins/HistorySweeperLight/src/options.cpp @@ -157,7 +157,7 @@ void LoadSettings(HWND hwndDlg) void SaveSettings(HWND hwndDlg) { - int st, i; StatusIconData sid = {0}; + int st, i; HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST); db_set_b(NULL, ModuleName, "StartupShutdownOlder", (BYTE)SendDlgItemMessage(hwndDlg, IDC_SSOLDER, CB_GETCURSEL, 0, 0)); @@ -166,7 +166,7 @@ void SaveSettings(HWND hwndDlg) db_set_b(NULL, ModuleName, "SweepOnClose", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SWEEPONCLOSE)); db_set_b(NULL, ModuleName, "ChangeInMW", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_HISTMW)); - sid.cbSize = sizeof(sid); + StatusIconData sid = { sizeof(sid) }; sid.szModule = ModuleName; db_set_b(NULL, ModuleName, "SweepHistory", -- cgit v1.2.3