diff options
author | George Hazan <ghazan@miranda.im> | 2017-10-16 16:51:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-10-16 16:51:24 +0300 |
commit | 472296cacaa7f230f6d99c7d1b6e44003de749af (patch) | |
tree | 2093f812f3869b12bb070546181e880c3e7e4bb9 /plugins | |
parent | 9d6b20ce1cfc010f9b9cc47d376dd0f01e290ca4 (diff) |
fixes #999 (StartupStatus doesn't flush options if there were no profiles in the database)
Diffstat (limited to 'plugins')
3 files changed, 4 insertions, 4 deletions
diff --git a/plugins/StatusManager/src/StartupStatus/ss_options.cpp b/plugins/StatusManager/src/StartupStatus/ss_options.cpp index 0629485f15..1f637a7c4d 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_options.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_options.cpp @@ -572,6 +572,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg, UINT msg, WPARAM if (profileCount == 0) { profileCount = 1; defProfile = 0; + SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); } for (int i = 0; i < profileCount; i++) { diff --git a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp index 05fa484306..9bacd8e27c 100644 --- a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp +++ b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp @@ -113,7 +113,7 @@ INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam) INT_PTR GetProfileCount(WPARAM wParam, LPARAM) { int *def = (int*)wParam; - int count = db_get_w(0, SSMODULENAME, SETTING_PROFILECOUNT, 1); + int count = db_get_w(0, SSMODULENAME, SETTING_PROFILECOUNT, 0); if (def != 0) { *def = db_get_w(0, SSMODULENAME, SETTING_DEFAULTPROFILE, 0); if (*def >= count) @@ -123,7 +123,7 @@ INT_PTR GetProfileCount(WPARAM wParam, LPARAM) return count; } -wchar_t *GetStatusMessage(int profile, char *szProto) +wchar_t* GetStatusMessage(int profile, char *szProto) { char dbSetting[80]; DBVARIANT dbv; diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp index 0f02b2065d..15c5ac289d 100644 --- a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp +++ b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp @@ -483,8 +483,7 @@ void StartupStatusLoad() { HookEvent(ME_SYSTEM_MODULESLOADED, SSModuleLoaded); - if (db_get_b(0, SSMODULENAME, SETTING_SETPROFILE, 1) || - db_get_b(0, SSMODULENAME, SETTING_OFFLINECLOSE, 0)) + if (db_get_b(0, SSMODULENAME, SETTING_SETPROFILE, 1) || db_get_b(0, SSMODULENAME, SETTING_OFFLINECLOSE, 0)) db_set_w(0, "CList", "Status", (WORD)ID_STATUS_OFFLINE); // docking |