From b200631b8fe202bc59a66d2d88cebf40c09059dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Thu, 23 May 2013 09:52:49 +0000 Subject: PluginUpdater: Fixed disabling "Update" button on window open. git-svn-id: http://svn.miranda-ng.org/main/trunk@4809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PluginUpdater/src/DlgUpdate.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index 93ff4fc86b..59c950ad25 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -201,6 +201,7 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM LVITEM lvI = {0}; lvI.mask = LVIF_TEXT | LVIF_PARAM | LVIF_NORECOMPUTE;// | LVIF_IMAGE; + bool enableOk = false; OBJLIST &todo = *(OBJLIST *)lParam; for (int i = 0; i < todo.getCount(); ++i) { lvI.mask = LVIF_TEXT | LVIF_PARAM;// | LVIF_IMAGE; @@ -213,9 +214,11 @@ static INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM // remember whether the user has decided not to update this component with this particular new version todo[i].bEnabled = db_get_b(NULL, MODNAME "Files", _T2A(todo[i].tszOldName), true); ListView_SetCheckState(hwndList, lvI.iItem, todo[i].bEnabled); + if (todo[i].bEnabled) + enableOk = true; } HWND hwOk = GetDlgItem(hDlg, IDOK); - EnableWindow(hwOk, true); + EnableWindow(hwOk, enableOk); } bShowDetails = false; -- cgit v1.2.3