summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/DlgUpdate.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-05-23 09:52:49 +0000
committerRobert Pösel <robyer@seznam.cz>2013-05-23 09:52:49 +0000
commitb200631b8fe202bc59a66d2d88cebf40c09059dc (patch)
tree8f39933742f1bb7df15fd585ac67b7678d526674 /plugins/PluginUpdater/src/DlgUpdate.cpp
parentd9d61b2732c4e2ddcb0bd0c1adea944f534d7405 (diff)
PluginUpdater: Fixed disabling "Update" button on window open.
git-svn-id: http://svn.miranda-ng.org/main/trunk@4809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/DlgUpdate.cpp')
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp5
1 files changed, 4 insertions, 1 deletions
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<FILEINFO> &todo = *(OBJLIST<FILEINFO> *)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;