[Wine-devel] Eter's patch is applied to winehq repo 08/24/11

builder на builder.office.etersoft.ru builder на builder.office.etersoft.ru
Ср Авг 24 23:20:16 MSD 2011


New Etersoft's patches since last build time:
commit 4b6b0fe6815b8979fe2375b8a1afefa03a29de23
Author: Alexander Morozov <amorozov на etersoft.ru>

    cryptui: Disable some buttons if a certificate is not selected.

---

commit 4b6b0fe6815b8979fe2375b8a1afefa03a29de23
Author: Alexander Morozov <amorozov на etersoft.ru>
Date:   Mon Aug 8 19:39:07 2011 +0400

    cryptui: Disable some buttons if a certificate is not selected.

diff --git a/dlls/cryptui/main.c b/dlls/cryptui/main.c
index 23f247e..15e71d5 100644
--- a/dlls/cryptui/main.c
+++ b/dlls/cryptui/main.c
@@ -1164,20 +1164,19 @@ static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
             break;
         case LVN_ITEMCHANGED:
         {
-            NMITEMACTIVATE *nm;
+            WCHAR empty[] = { 0 };
+            NMITEMACTIVATE *nm = (NMITEMACTIVATE*)lp;
             HWND lv = GetDlgItem(hwnd, IDC_MGR_CERTS);
+            int numSelected = SendMessageW(lv, LVM_GETSELECTEDCOUNT, 0, 0);
 
-            nm = (NMITEMACTIVATE*)lp;
-            if (nm->uNewState & LVN_ITEMACTIVATE)
-            {
-                int numSelected = SendMessageW(lv, LVM_GETSELECTEDCOUNT, 0, 0);
-
-                EnableWindow(GetDlgItem(hwnd, IDC_MGR_EXPORT), numSelected > 0);
-                EnableWindow(GetDlgItem(hwnd, IDC_MGR_REMOVE), numSelected > 0);
-                EnableWindow(GetDlgItem(hwnd, IDC_MGR_VIEW), numSelected == 1);
-                if (numSelected == 1)
-                    cert_mgr_show_cert_usages(hwnd, nm->iItem);
-            }
+            EnableWindow(GetDlgItem(hwnd, IDC_MGR_EXPORT), numSelected > 0);
+            EnableWindow(GetDlgItem(hwnd, IDC_MGR_REMOVE), numSelected > 0);
+            EnableWindow(GetDlgItem(hwnd, IDC_MGR_VIEW), numSelected == 1);
+            if (numSelected == 1)
+                cert_mgr_show_cert_usages(hwnd, nm->iItem);
+            else
+                SendMessageW(GetDlgItem(hwnd, IDC_MGR_PURPOSES), WM_SETTEXT, 0,
+                 (LPARAM)empty);
             break;
         }
         case NM_DBLCLK:


Подробная информация о списке рассылки Wine-devel