pull up r18494 from trunk
authorTom Yu <tlyu@mit.edu>
Wed, 23 Aug 2006 18:38:06 +0000 (18:38 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 23 Aug 2006 18:38:06 +0000 (18:38 +0000)
 r18494@cathode-dark-space:  jaltman | 2006-08-22 18:12:15 -0400
 ticket: new
 subject: improvements to netidmgr dialogs

    * ensure that buttons are disabled while
           actions are in process

    * allow plug-ins to specify italic text

    * fix some documentation

  * reformat langres.rc

ticket: 4172

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-5@18506 dc483132-0cff-0310-8789-dd5450dbe970

src/windows/identity/doc/ui_main.h
src/windows/identity/include/khmsgtypes.h
src/windows/identity/kcreddb/kcreddb.h
src/windows/identity/plugins/krb5/krb5configdlg.c
src/windows/identity/plugins/krb5/lang/en_us/langres.rc
src/windows/identity/ui/htwnd.c
src/windows/identity/ui/main.c
src/windows/identity/ui/newcredwnd.c
src/windows/identity/uilib/khnewcred.h

index 8cf735c044975350bffe974b542bfaa1ec66cfa4..6e17980a9cc1864e27bddbac10d903c9344ff1f1 100644 (file)
@@ -31,4 +31,5 @@
     - \subpage khui_actions\r
     - \subpage khui_menus\r
     - \subpage khui_context\r
+    - \subpage khui_htwnd\r
  */\r
index 686a9717f697c9416273bfa2236938f6e885da77..f1d42c2172cea3000e0593aaa5c58b2b1b9d08ac 100644 (file)
     finalizing dialog creation operations.\r
 \r
     Message parameters:\r
-    - \b vparam : poitner to a ::khui_new_creds structure\r
+    - \b vparam : pointer to a ::khui_new_creds structure\r
 \r
     \note May be sent to individual credential subscriptions.\r
  */\r
 \r
 /*! \brief A property page is being launced\r
 \r
+    Handlers of this message should determine whether or not they\r
+    should participate in the property sheet and if so, add a\r
+    ::khui_property_page structure to the property sheet.\r
+\r
     Message parameters:\r
     - \b vparam : pointer to a ::khui_property_sheet structure\r
  */\r
 \r
 /*! \brief A property page has finished processing\r
 \r
+    Handlers of this message should remove any ::khui_property_page\r
+    structures they added when processing ::KMSG_CRED_PP_BEGIN.\r
+\r
     Message parameters:\r
     - \b vparam : pointer to a ::khui_property_sheet structure\r
  */\r
 \r
     Message parameters:\r
     - \b vparam : pointer to a ::khui_property_sheet structure\r
+\r
+    \note This is a notification that the property sheet processing\r
+        has been completed and that the property sheet data structures\r
+        should be freed.  Any property page data structures should\r
+        have already been freed while processing KMSG_CRED_PP_END.\r
+        The validity of the ::khui_property_sheet structure should not\r
+        be relied upon while processing this message.\r
  */\r
 #define KMSG_CRED_PP_DESTROY        131\r
 \r
index 63d16252dd1dcab08b0af50c42b5304fff780be4..33c5d168d503da946e9b55aeb0b6cda58b8dc142 100644 (file)
@@ -236,7 +236,7 @@ Functions, macros etc. for manipulating identities.
 \r
     A bitmask that correspond to all the read/write flags in the mask.\r
 */\r
-#define KCDB_IDENT_FLAGMASK_RDWR   0x00000fffL\r
+#define KCDB_IDENT_FLAGMASK_RDWR    0x00000fffL\r
 \r
 /*@}*/\r
 \r
@@ -2876,7 +2876,7 @@ typedef struct tag_kcdb_credtype {
                                   kmq_delete_subscription() when the\r
                                   credentials type is unregistered.*/\r
 \r
-    kcdb_cred_comp_func is_equal; /*!< Used to as an additional clause\r
+    kcdb_cred_comp_func is_equal; /*!< Used as an additional clause\r
                                   when comparing two credentials for\r
                                   equality.  The function this is\r
                                   actually a comparison function, it\r
@@ -2886,10 +2886,10 @@ typedef struct tag_kcdb_credtype {
                                   rock parameter is always zero.\r
 \r
                                   It can be assumed that the identity,\r
-                                  name and credentials have already\r
-                                  been found to be equal among the\r
-                                  credentials and the credential type\r
-                                  is the type that is being\r
+                                  name and credentials type have\r
+                                  already been found to be equal among\r
+                                  the credentials and the credential\r
+                                  type is the type that is being\r
                                   registered.*/\r
 \r
 #ifdef _WIN32\r
index b8bdc55f999143bfd1ec15adb23b57dbc04568aa..8caafe90433b0b3a4fb518bf2ae68e5cf1dd56a0 100644 (file)
@@ -30,6 +30,7 @@
 #include<lm.h>
 #include<commctrl.h>
 #include<shlwapi.h>
+
 #include<strsafe.h>
 
 typedef struct tag_k5_realm_kdc {
@@ -1005,8 +1006,18 @@ k5_config_dlgproc(HWND hwnd,
             }
 
             /* and the import ticket options */
-            LoadString(hResModule, IDS_K5CFG_IMPORT_OPTIONS,
-                       importopts, ARRAYLENGTH(importopts));
+            {
+                wchar_t csvstring[256];
+                khm_size cb;
+
+                csvstring[0] = L'\0';
+
+                LoadString(hResModule, IDS_K5CFG_IMPORT_OPTIONS,
+                           csvstring, ARRAYLENGTH(csvstring));
+
+                cb = sizeof(importopts);
+                csv_to_multi_string(importopts, &cb, csvstring);
+            }
 
             hw = GetDlgItem(hwnd, IDC_CFG_IMPORT);
 #ifdef DEBUG
index 49673c3781a348e0b7b3a6d9b2c39bc2ccc190a2..aab9090503429cda29d9ff16499b7468414a0886 100644 (file)
@@ -53,32 +53,23 @@ END
 //\r
 \r
 IDD_NC_KRB5 DIALOGEX 0, 0, 300, 166\r
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS | \r
-    WS_CLIPCHILDREN\r
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN\r
 EXSTYLE WS_EX_CONTROLPARENT\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
-    CONTROL         "Kerberos 5 Ticket Options",IDC_STATIC,"Static",\r
-                    SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP,7,7,286,11\r
+    CONTROL         "Kerberos 5 Ticket Options",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP,7,7,286,11\r
     LTEXT           "Realm",IDC_STATIC,7,25,52,13\r
-    COMBOBOX        IDC_NCK5_REALM,60,25,233,17,CBS_DROPDOWN | \r
-                    CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Specify &additional realms ...",IDC_NCK5_ADD_REALMS,181,\r
-                    43,112,16,BS_NOTIFY | NOT WS_VISIBLE | WS_DISABLED\r
+    COMBOBOX        IDC_NCK5_REALM,60,25,233,17,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
+    PUSHBUTTON      "Specify &additional realms ...",IDC_NCK5_ADD_REALMS,181,43,112,16,BS_NOTIFY | NOT WS_VISIBLE | WS_DISABLED\r
     LTEXT           "&Lifetime",IDC_STATIC,7,67,61,12\r
     EDITTEXT        IDC_NCK5_LIFETIME_EDIT,85,67,107,12,ES_AUTOHSCROLL\r
-    CONTROL         "&Renewable for",IDC_NCK5_RENEWABLE,"Button",\r
-                    BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,7,87,64,12\r
+    CONTROL         "&Renewable for",IDC_NCK5_RENEWABLE,"Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,7,87,64,12\r
     EDITTEXT        IDC_NCK5_RENEW_EDIT,85,87,108,12,ES_AUTOHSCROLL\r
-    CONTROL         "Can be &forwarded to other machines",\r
-                    IDC_NCK5_FORWARDABLE,"Button",BS_AUTOCHECKBOX | \r
-                    BS_NOTIFY | WS_TABSTOP,7,107,132,12\r
-    CONTROL         "Addressless",IDC_NCK5_ADDRESS,"Button",BS_AUTOCHECKBOX | \r
-                    WS_TABSTOP,7,128,54,10\r
-    LTEXT           "Additional IP address",IDC_STATIC,118,129,68,8,NOT \r
-                    WS_VISIBLE\r
-    CONTROL         "",IDC_NCK5_PUBLICIP,"SysIPAddress32",NOT WS_VISIBLE | \r
-                    WS_TABSTOP,193,125,100,15\r
+    CONTROL         "Can be &forwarded to other machines",IDC_NCK5_FORWARDABLE,\r
+                    "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,7,107,132,12\r
+    CONTROL         "Addressless",IDC_NCK5_ADDRESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,128,54,10\r
+    LTEXT           "Additional IP address",IDC_STATIC,118,129,68,8,NOT WS_VISIBLE\r
+    CONTROL         "",IDC_NCK5_PUBLICIP,"SysIPAddress32",NOT WS_VISIBLE | WS_TABSTOP,193,125,100,15\r
 END\r
 \r
 IDD_PP_KRB5C DIALOGEX 0, 0, 235, 156\r
@@ -95,8 +86,7 @@ BEGIN
     EDITTEXT        IDC_PPK5_ISSUE,72,23,156,12,ES_AUTOHSCROLL | ES_READONLY\r
     EDITTEXT        IDC_PPK5_VALID,72,39,156,12,ES_AUTOHSCROLL | ES_READONLY\r
     EDITTEXT        IDC_PPK5_RENEW,72,55,156,12,ES_AUTOHSCROLL | ES_READONLY\r
-    LISTBOX         IDC_PPK5_FLAGS,72,74,156,75,LBS_SORT | \r
-                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP\r
+    LISTBOX         IDC_PPK5_FLAGS,72,74,156,75,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP\r
 END\r
 \r
 IDD_PP_KRB5 DIALOGEX 0, 0, 235, 156\r
@@ -112,14 +102,10 @@ BEGIN
     LTEXT           "Min. Renewable lifetime",IDC_STATIC,7,82,76,8\r
     LTEXT           "Max. Renewable lifetime",IDC_STATIC,7,97,79,8\r
     GROUPBOX        "Default ticket flags",IDC_STATIC,7,113,221,36\r
-    CONTROL         "Proxiable",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | \r
-                    WS_TABSTOP,160,129,45,10\r
-    CONTROL         "Renewable",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | \r
-                    WS_TABSTOP,23,129,51,10\r
-    CONTROL         "Forwardable",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | \r
-                    WS_TABSTOP,89,129,56,10\r
-    LTEXT           "ATHENA.MIT.EDU",IDC_STATIC,95,7,133,11,0,\r
-                    WS_EX_CLIENTEDGE\r
+    CONTROL         "Proxiable",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,160,129,45,10\r
+    CONTROL         "Renewable",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,129,51,10\r
+    CONTROL         "Forwardable",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,89,129,56,10\r
+    LTEXT           "ATHENA.MIT.EDU",IDC_STATIC,95,7,133,11,0,WS_EX_CLIENTEDGE\r
     LTEXT           "10 hours",IDC_STATIC,95,22,133,11,0,WS_EX_CLIENTEDGE\r
     LTEXT           "1 minute",IDC_STATIC,95,37,133,11,0,WS_EX_CLIENTEDGE\r
     LTEXT           "7 days",IDC_STATIC,95,52,133,11,0,WS_EX_CLIENTEDGE\r
@@ -133,31 +119,22 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
     LTEXT           "Default Realm",IDC_CFG_LBL_REALM,13,9,46,8\r
-    COMBOBOX        IDC_CFG_DEFREALM,76,7,166,30,CBS_DROPDOWN | CBS_SORT | \r
-                    WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Configure Realms ...",IDC_CFG_CFGREALMS,76,25,84,14,NOT \r
-                    WS_VISIBLE | WS_DISABLED\r
-    GROUPBOX        "Keberos Configuration File",IDC_CFG_CFGFILEGRP,7,45,241,\r
-                    61\r
+    COMBOBOX        IDC_CFG_DEFREALM,76,7,166,30,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
+    PUSHBUTTON      "Configure Realms ...",IDC_CFG_CFGREALMS,76,25,84,14,NOT WS_VISIBLE | WS_DISABLED\r
+    GROUPBOX        "Keberos Configuration File",IDC_CFG_CFGFILEGRP,7,45,241,61\r
     LTEXT           "Location",IDC_CFG_LBL_CFGFILE,13,61,28,8\r
     EDITTEXT        IDC_CFG_CFGFILE,76,58,119,14,ES_AUTOHSCROLL\r
     PUSHBUTTON      "Browse...",IDC_CFG_BROWSE,198,58,44,14\r
-    CONTROL         "Create file if missing",IDC_CFG_CREATECONFIG,"Button",\r
-                    BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | \r
-                    WS_TABSTOP,76,90,80,10\r
-    CONTROL         "Include realms in New Credentials realm list",\r
-                    IDC_CFG_INCREALMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,\r
-                    76,78,153,10\r
+    CONTROL         "Create file if missing",IDC_CFG_CREATECONFIG,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,76,90,80,10\r
+    CONTROL         "Include realms in New Credentials realm list",IDC_CFG_INCREALMS,\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,76,78,153,10\r
     GROUPBOX        "Windows® Options",IDC_CFG_WINGRP,7,110,241,65\r
     LTEXT           "Hostname",IDC_CFG_LBL_HOSTNAME,13,123,33,8\r
-    EDITTEXT        IDC_CFG_HOSTNAME,76,120,166,14,ES_AUTOHSCROLL | \r
-                    ES_READONLY\r
+    EDITTEXT        IDC_CFG_HOSTNAME,76,120,166,14,ES_AUTOHSCROLL | ES_READONLY\r
     LTEXT           "Domain",IDC_CFG_LBL_DOMAIN,13,141,24,8\r
-    EDITTEXT        IDC_CFG_DOMAIN,76,138,166,14,ES_AUTOHSCROLL | \r
-                    ES_READONLY\r
+    EDITTEXT        IDC_CFG_DOMAIN,76,138,166,14,ES_AUTOHSCROLL | ES_READONLY\r
     LTEXT           "Import tickets",IDC_LBL_IMPORT,13,158,45,8\r
-    COMBOBOX        IDC_CFG_IMPORT,76,156,166,30,CBS_DROPDOWNLIST | \r
-                    WS_VSCROLL | WS_TABSTOP\r
+    COMBOBOX        IDC_CFG_IMPORT,76,156,166,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP\r
 END\r
 \r
 IDD_CFG_REALMS DIALOGEX 0, 0, 255, 182\r
@@ -165,17 +142,11 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
 EXSTYLE WS_EX_CONTROLPARENT\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
-    CONTROL         "",IDC_CFG_REALMS,"SysListView32",LVS_REPORT | \r
-                    LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_EDITLABELS | \r
-                    LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_TABSTOP,7,19,81,\r
-                    148\r
+    CONTROL         "",IDC_CFG_REALMS,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_EDITLABELS | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_TABSTOP,7,19,81,148\r
     GROUPBOX        "Kerberos Servers",IDC_CFG_SERVERSGRP,93,7,155,91\r
     GROUPBOX        "Domain mappings",IDC_CFG_DOMAINGRP,93,101,155,74\r
-    CONTROL         "",IDC_CFG_KDC,"SysListView32",LVS_REPORT | \r
-                    LVS_EDITLABELS | LVS_ALIGNLEFT | WS_TABSTOP,99,19,143,72\r
-    CONTROL         "",IDC_CFG_DMAP,"SysListView32",LVS_REPORT | \r
-                    LVS_EDITLABELS | LVS_ALIGNLEFT | WS_TABSTOP,99,111,143,\r
-                    56\r
+    CONTROL         "",IDC_CFG_KDC,"SysListView32",LVS_REPORT | LVS_EDITLABELS | LVS_ALIGNLEFT | WS_TABSTOP,99,19,143,72\r
+    CONTROL         "",IDC_CFG_DMAP,"SysListView32",LVS_REPORT | LVS_EDITLABELS | LVS_ALIGNLEFT | WS_TABSTOP,99,111,143,56\r
 END\r
 \r
 IDD_CFG_IDS_TAB DIALOGEX 0, 0, 235, 151\r
@@ -185,8 +156,7 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN\r
     LTEXT           "Ticket lifetime",IDC_CFG_LBL_DEFLIFE,7,10,44,8\r
     EDITTEXT        IDC_CFG_DEFLIFE,91,7,137,14,ES_AUTOHSCROLL\r
-    LTEXT           "Ticket renewable lifetime",IDC_CFG_LBL_DEFRLIFE,7,29,80,\r
-                    8\r
+    LTEXT           "Ticket renewable lifetime",IDC_CFG_LBL_DEFRLIFE,7,29,80,8\r
     EDITTEXT        IDC_CFG_DEFRLIFE,91,26,137,14,ES_AUTOHSCROLL\r
     GROUPBOX        "Ticket lifetime range",IDC_CFG_LIFEGRP,7,43,221,49\r
     LTEXT           "Minimum",IDC_STATIC,13,56,28,8\r
@@ -207,17 +177,13 @@ FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN\r
     LTEXT           "Ticket lifetime",IDC_CFG_LBL_DEFLIFE,7,10,44,8\r
     EDITTEXT        IDC_CFG_DEFLIFE,91,7,137,14,ES_AUTOHSCROLL\r
-    CONTROL         "Renewable for",IDC_CFG_RENEW,"Button",BS_AUTOCHECKBOX | \r
-                    WS_TABSTOP,7,41,63,10\r
+    CONTROL         "Renewable for",IDC_CFG_RENEW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,41,63,10\r
     EDITTEXT        IDC_CFG_DEFRLIFE,91,39,137,14,ES_AUTOHSCROLL\r
     CONTROL         "Can be forwarded to other machines",IDC_CFG_FORWARD,\r
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,59,133,10\r
-    CONTROL         "Addressless",IDC_CFG_ADDRESSLESS,"Button",\r
-                    BS_AUTOCHECKBOX | WS_TABSTOP,7,77,54,10\r
-    LTEXT           "Additional IP address",IDC_STATIC,91,78,68,8,NOT \r
-                    WS_VISIBLE\r
-    CONTROL         "",IDC_CFG_PUBLICIP,"SysIPAddress32",NOT WS_VISIBLE | \r
-                    WS_TABSTOP,128,89,100,15\r
+    CONTROL         "Addressless",IDC_CFG_ADDRESSLESS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,77,54,10\r
+    LTEXT           "Additional IP address",IDC_STATIC,91,78,68,8,NOT WS_VISIBLE\r
+    CONTROL         "",IDC_CFG_PUBLICIP,"SysIPAddress32",NOT WS_VISIBLE | WS_TABSTOP,128,89,100,15\r
     LTEXT           "Credentials cache",IDC_STATIC,7,132,58,8\r
     EDITTEXT        IDC_CFG_CCACHE,91,130,137,14,ES_AUTOHSCROLL\r
 END\r
@@ -227,13 +193,10 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU
 EXSTYLE WS_EX_CONTROLPARENT\r
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
-    CONTROL         "Kerberos 5 Change Password Options",IDC_STATIC,"Static",\r
-                    SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP,7,7,286,11\r
+    CONTROL         "Kerberos 5 Change Password Options",IDC_STATIC,"Static",SS_LEFTNOWORDWRAP | SS_SUNKEN | WS_GROUP,7,7,286,11\r
     LTEXT           "Realm",IDC_STATIC,7,25,52,13\r
-    COMBOBOX        IDC_NCK5_REALM,60,25,233,17,CBS_DROPDOWN | \r
-                    CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
-    PUSHBUTTON      "Specify &additional realms ...",IDC_NCK5_ADD_REALMS,181,\r
-                    43,112,16,BS_NOTIFY | WS_DISABLED\r
+    COMBOBOX        IDC_NCK5_REALM,60,25,233,17,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP\r
+    PUSHBUTTON      "Specify &additional realms ...",IDC_NCK5_ADD_REALMS,181,43,112,16,BS_NOTIFY | WS_DISABLED\r
 END\r
 \r
 IDD_CFG_CACHES DIALOGEX 0, 0, 255, 182\r
@@ -242,16 +205,13 @@ EXSTYLE WS_EX_CONTROLPARENT
 FONT 8, "MS Shell Dlg", 400, 0, 0x1\r
 BEGIN\r
     GROUPBOX        "File Caches",IDC_CFG_FCGRP,7,26,241,149\r
-    CONTROL         "",IDC_CFG_FCLIST,"SysListView32",LVS_REPORT | \r
-                    LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | \r
-                    WS_TABSTOP,13,37,229,97\r
+    CONTROL         "",IDC_CFG_FCLIST,"SysListView32",LVS_REPORT | LVS_SORTASCENDING | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,13,37,229,97\r
     EDITTEXT        IDC_CFG_FCNAME,13,139,173,14,ES_AUTOHSCROLL\r
     PUSHBUTTON      "&Browse ...",IDC_CFG_BROWSE,192,139,50,14\r
     PUSHBUTTON      "Add",IDC_CFG_ADD,13,156,50,14\r
     PUSHBUTTON      "Remove Selected",IDC_CFG_REMOVE,88,156,80,14\r
     CONTROL         "Include all API: credentials caches",IDC_CFG_INCAPI,\r
-                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,\r
-                    123,7,125,10\r
+                    "Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,123,7,125,10\r
     CONTROL         "Include Windows LSA cache (MSLSA:)",IDC_CFG_INCMSLSA,\r
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,7,136,10\r
 END\r
@@ -443,8 +403,7 @@ BEGIN
     IDS_NC_PWD_NPWD         "New Password"\r
     IDS_NC_PWD_NPWD_AGAIN   "New Password again"\r
     IDS_KRB5_CREDTEXT_P0    "<p><a id=""SwitchPanel"" param=""Krb5Cred""><b>Krb5</b></a><tab>: Changing password for %s</p>"\r
-    IDS_K5CFG_IMPORT_OPTIONS \r
-                            "Never\000Always\000Only when the principal name matches\000 "\r
+    IDS_K5CFG_IMPORT_OPTIONS "Never,Always,Only when the principal matches"\r
     IDS_IDENTPRO_DESC       "Kerberos 5 Identity Provider"\r
     IDS_K5CCC_SHORT_DESC    "Credentials Caches"\r
 END\r
@@ -521,8 +480,8 @@ BEGIN
     IDS_CFG_RE_MMK          "Toggle &master KDC"\r
     IDS_CFG_RE_MND          "&Add new domain mapping"\r
     IDS_CFG_RE_MDD          "&Remove domain mapping"\r
-    IDS_KVNO_LONG_DESC      "Key version number"\r
     IDS_KVNO_SHORT_DESC     "Kvno"\r
+    IDS_KVNO_LONG_DESC      "Key version number"\r
 END\r
 \r
 #endif    // English (U.S.) resources\r
index 9507fbdd0c228a9181ec326758a7168cb4d1213d..f65525690987e3289210abbb17b995d21b33edc0 100644 (file)
@@ -315,17 +315,19 @@ We currently support the following tags:
 <a [id="string"] [param="paramstring"]>link text</a>\r
 <b>foo</b>\r
 <u>foo</u>\r
+<i>foo</i>\r
+\r
+<font [color="(color)"] [size="normal|large|huge|(point size)"]>foo</font>\r
+   (color)=black|white|red|green|blue|grey\r
+<large>foo</large>\r
+<huge>foo</huge>\r
 \r
 <center>foo</center>\r
 <left>foo</left>\r
 <right>foo</right>\r
 \r
-<font [color="color"] [size="normal|large|huge"]>foo</font>\r
-<large>foo</large>\r
-<huge>foo</huge>\r
-\r
 <p [align="left|center|right"]>foo</p>\r
-<settab pos="">\r
+<settab pos="(pos)">\r
 <tab>\r
 */\r
 \r
@@ -468,6 +470,10 @@ static int htw_parse_tag(
         format_push(s,d, HTW_DEFAULT, FV_UNDERLINE, HTW_DEFAULT);\r
     } else if(!_wcsnicmp(start, L"/u", c - start)) {\r
         format_pop(s);\r
+    } else if(!_wcsnicmp(start, L"i", c - start)) {\r
+        format_push(s,d, HTW_DEFAULT, FV_ITALIC, HTW_DEFAULT);\r
+    } else if(!_wcsnicmp(start, L"/i", c - start)) {\r
+        format_pop(s);\r
     } else if(!_wcsnicmp(start, L"large", c - start)) {\r
         format_push(s,d,-MulDiv(HTW_LARGE_SIZE, d->l_pixel_y, 72), HTW_DEFAULT, HTW_DEFAULT);\r
     } else if(!_wcsnicmp(start, L"/large", c - start)) {\r
index ad39de7eeb8bb8d875e75a18a2d736b9162dca45..80b7be3e5277472339ad4b7182f8dbc748e7a330 100644 (file)
@@ -174,6 +174,7 @@ void khm_unregister_window_classes(void) {
 \r
 typedef struct tag_khui_dialog {\r
     HWND hwnd;\r
+    HWND hwnd_next;\r
     BOOL active;\r
 } khui_dialog;\r
 \r
@@ -186,6 +187,7 @@ static BOOL khui_main_window_active;
 void khm_add_dialog(HWND dlg) {\r
     if(n_khui_dialogs < MAX_UI_DIALOGS - 1) {\r
         khui_dialogs[n_khui_dialogs].hwnd = dlg;\r
+        khui_dialogs[n_khui_dialogs].hwnd_next = NULL;\r
         /* we set .active=FALSE for now.  We don't need this to have a\r
            meaningful value until we enter a modal loop */\r
         khui_dialogs[n_khui_dialogs].active = FALSE;\r
@@ -202,36 +204,96 @@ void khm_add_dialog(HWND dlg) {
 void khm_enter_modal(HWND hwnd) {\r
     int i;\r
 \r
-    for(i=0; i < n_khui_dialogs; i++) {\r
-        if(khui_dialogs[i].hwnd != hwnd) {\r
-            khui_dialogs[i].active = IsWindowEnabled(khui_dialogs[i].hwnd);\r
-            EnableWindow(khui_dialogs[i].hwnd, FALSE);\r
+    if (khui_modal_dialog) {\r
+\r
+        /* we are already in a modal loop. */\r
+\r
+#ifdef DEBUG\r
+        assert(hwnd != khui_modal_dialog);\r
+#endif\r
+\r
+        for (i=0; i < n_khui_dialogs; i++) {\r
+            if (khui_dialogs[i].hwnd == khui_modal_dialog) {\r
+                khui_dialogs[i].active = TRUE;\r
+                EnableWindow(khui_modal_dialog, FALSE);\r
+                break;\r
+            }\r
         }\r
-    }\r
 \r
-    khui_main_window_active = khm_is_main_window_active();\r
-    EnableWindow(khm_hwnd_main, FALSE);\r
+#ifdef DEBUG\r
+        assert(i < n_khui_dialogs);\r
+#endif\r
+\r
+        for (i=0; i < n_khui_dialogs; i++) {\r
+            if (khui_dialogs[i].hwnd == hwnd) {\r
+                khui_dialogs[i].hwnd_next = khui_modal_dialog;\r
+                break;\r
+            }\r
+        }\r
+\r
+#ifdef DEBUG\r
+        assert(i < n_khui_dialogs);\r
+#endif\r
+\r
+        khui_modal_dialog = hwnd;\r
+\r
+    } else {\r
+\r
+        /* we are entering a modal loop.  preserve the active state of\r
+           the overlapped dialogs and proceed with the modal\r
+           dialog. */\r
 \r
-    khui_modal_dialog = hwnd;\r
+        for (i=0; i < n_khui_dialogs; i++) {\r
+            if(khui_dialogs[i].hwnd != hwnd) {\r
+                khui_dialogs[i].active = IsWindowEnabled(khui_dialogs[i].hwnd);\r
+                EnableWindow(khui_dialogs[i].hwnd, FALSE);\r
+            }\r
+        }\r
+\r
+        khui_main_window_active = khm_is_main_window_active();\r
+        EnableWindow(khm_hwnd_main, FALSE);\r
+\r
+        khui_modal_dialog = hwnd;\r
+    }\r
 }\r
 \r
 /* should only be called from the UI thread */\r
 void khm_leave_modal(void) {\r
     int i;\r
 \r
-    for(i=0; i < n_khui_dialogs; i++) {\r
-        if(khui_dialogs[i].hwnd != khui_modal_dialog) {\r
-            EnableWindow(khui_dialogs[i].hwnd, khui_dialogs[i].active);\r
-        }\r
+    for (i=0; i < n_khui_dialogs; i++) {\r
+        if (khui_dialogs[i].hwnd == khui_modal_dialog)\r
+            break;\r
     }\r
 \r
-    EnableWindow(khm_hwnd_main, TRUE);\r
-#if 0\r
-    if (khui_main_window_active)\r
-        SetForegroundWindow(khm_hwnd_main);\r
+#ifdef DEBUG\r
+    assert(i < n_khui_dialogs);\r
 #endif\r
 \r
-    khui_modal_dialog = NULL;\r
+    if (i < n_khui_dialogs && khui_dialogs[i].hwnd_next) {\r
+\r
+        /* we need to proceed to the next one down the modal dialog\r
+           chain.  We are not exiting a modal loop. */\r
+\r
+        khui_modal_dialog = khui_dialogs[i].hwnd_next;\r
+        khui_dialogs[i].hwnd_next = FALSE;\r
+\r
+        EnableWindow(khui_modal_dialog, TRUE);\r
+\r
+    } else {\r
+\r
+        /* we are exiting a modal loop. */\r
+\r
+        for (i=0; i < n_khui_dialogs; i++) {\r
+            if(khui_dialogs[i].hwnd != khui_modal_dialog) {\r
+                EnableWindow(khui_dialogs[i].hwnd, khui_dialogs[i].active);\r
+            }\r
+        }\r
+\r
+        EnableWindow(khm_hwnd_main, TRUE);\r
+\r
+        khui_modal_dialog = NULL;\r
+    }\r
 }\r
 \r
 /* should only be called from the UI thread */\r
index 39e670179c0830e4a7d3f932ed01522e1f1c4b32..a12942a15023aa7d327215b6f8c80d939cf90531 100644 (file)
@@ -198,8 +198,8 @@ nc_tab_sort_func(const void * v1, const void * v2)
     t1 = *((khui_new_creds_by_type **) v1);\r
     t2 = *((khui_new_creds_by_type **) v2);\r
 \r
-    if(t1->ordinal > 0) {\r
-        if(t2->ordinal > 0) {\r
+    if(t1->ordinal !=  -1) {\r
+        if(t2->ordinal != -1) {\r
             if(t1->ordinal == t2->ordinal)\r
                 return wcscmp(t1->name, t2->name);\r
             else\r
@@ -208,7 +208,7 @@ nc_tab_sort_func(const void * v1, const void * v2)
         } else\r
             return -1;\r
     } else {\r
-        if(t2->ordinal > 0)\r
+        if(t2->ordinal != -1)\r
             return 1;\r
         else if (t1->name && t2->name)\r
             return wcscmp(t1->name, t2->name);\r
@@ -260,7 +260,7 @@ nc_update_credtext(khui_nc_wnd_data * d)
     StringCchLength(ctbuf, NC_MAXCCH_CREDTEXT, &cch);\r
     buf = ctbuf + cch;\r
     nc_notify_types(d->nc, KHUI_WM_NC_NOTIFY, \r
-                    MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), 0);\r
+                    MAKEWPARAM(0, WMNC_UPDATE_CREDTEXT), (LPARAM) d->nc);\r
 \r
     /* hopefully all the types have updated their credential texts */\r
     if(d->nc->n_identities == 1) {\r
@@ -915,7 +915,7 @@ nc_handle_wm_command(HWND hwnd,
             nc_notify_types(d->nc, \r
                             KHUI_WM_NC_NOTIFY, \r
                             MAKEWPARAM(0,WMNC_DIALOG_PREPROCESS), \r
-                            0);\r
+                            (LPARAM) d->nc);\r
 \r
             khui_cw_sync_prompt_values(d->nc);\r
 \r
@@ -931,6 +931,8 @@ nc_handle_wm_command(HWND hwnd,
                 EnableWindow(hw, FALSE);\r
                 hw = GetDlgItem(d->dlg_main, IDCANCEL);\r
                 EnableWindow(hw, FALSE);\r
+                hw = GetDlgItem(d->dlg_main, IDC_NC_OPTIONS);\r
+                EnableWindow(hw, FALSE);\r
                 hw = GetDlgItem(d->dlg_bb, IDOK);\r
                 EnableWindow(hw, FALSE);\r
                 hw = GetDlgItem(d->dlg_bb, IDCANCEL);\r
@@ -1071,7 +1073,7 @@ static LRESULT nc_handle_wm_moving(HWND hwnd,
     d = (khui_nc_wnd_data *)(LONG_PTR) GetWindowLongPtr(hwnd, CW_PARAM);\r
 \r
     nc_notify_types(d->nc, KHUI_WM_NC_NOTIFY, \r
-                    MAKEWPARAM(0, WMNC_DIALOG_MOVE), 0);\r
+                    MAKEWPARAM(0, WMNC_DIALOG_MOVE), (LPARAM) d->nc);\r
 \r
     return FALSE;\r
 }\r
@@ -1222,8 +1224,19 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
 \r
             id = NC_TS_CTRL_ID_MIN;\r
 \r
+            /* if we have too many buttons than would fit on the\r
+               button bar, we have to adjust the width of the buttons.\r
+               Of course, having too many of them would be bad and\r
+               make the buttons fairly useless.  This is just an\r
+               interim measure. */\r
+\r
             khui_cw_lock_nc(d->nc);\r
 \r
+            GetWindowRect(d->dlg_ts, &r);\r
+            if (x + width * d->nc->n_types > (khm_size) (r.right - r.left)) {\r
+                width = (int)(((r.right - r.left) - x) / d->nc->n_types);\r
+            }\r
+\r
             /* first, the control for the main panel */\r
             LoadString(khm_hInstance, IDS_NC_IDENTITY, \r
                        wbuf, ARRAYLENGTH(wbuf));\r
@@ -1352,7 +1365,7 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
             BOOL okEnable = FALSE;\r
 \r
             nc_notify_types(d->nc, KHUI_WM_NC_NOTIFY,\r
-                            MAKEWPARAM(0, WMNC_IDENTITY_CHANGE), 0);\r
+                            MAKEWPARAM(0, WMNC_IDENTITY_CHANGE), (LPARAM) d->nc);\r
 \r
             if (d->nc->subtype == KMSG_CRED_NEW_CREDS &&\r
                 d->nc->n_identities > 0 &&\r
@@ -1654,6 +1667,8 @@ static LRESULT nc_handle_wm_nc_notify(HWND hwnd,
                 EnableWindow(hw, TRUE);\r
                 hw = GetDlgItem(d->dlg_main, IDCANCEL);\r
                 EnableWindow(hw, TRUE);\r
+                hw = GetDlgItem(d->dlg_main, IDC_NC_OPTIONS);\r
+                EnableWindow(hw, TRUE);\r
                 hw = GetDlgItem(d->dlg_bb, IDOK);\r
                 EnableWindow(hw, TRUE);\r
                 hw = GetDlgItem(d->dlg_bb, IDCANCEL);\r
index dc553f74089d344f9d7abc01e1e4421f9d7df397..453575713850c633ca9bd68dc24f73a69617d990 100644 (file)
@@ -518,7 +518,17 @@ typedef struct tag_khui_new_creds_by_type {
                                   current state of this cred\r
                                   type. (localized, optional).  Only\r
                                   used if providing a\r
-                                  user-interface. */\r
+                                  user-interface. If this field is\r
+                                  non-NULL, then it should point to a\r
+                                  NULL terminated string that does not\r
+                                  exceed ::KHUI_MAXCCH_LONG_DESC\r
+                                  characters in length including the\r
+                                  terminating NULL.\r
+\r
+                                  \see \ref khui_htwnd for information\r
+                                  on how to format the string for this\r
+                                  field.\r
+                                */\r
 \r
     LPARAM      aux;            /*!< auxilliary field.  For use by the\r
                                   plug-in. */\r