summaryrefslogtreecommitdiffstats
path: root/src/windows/identity/ui
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2005-12-02 10:34:34 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2005-12-02 10:34:34 +0000
commit469a923cec9900a48204578e4f4c0656d11fb89b (patch)
tree80df51b3e779c91f51cf69bd96acde44d37aa6bf /src/windows/identity/ui
parentb5f6a77b27b8b942c0179f99131edca986f916d1 (diff)
Network Identity Manager updates for KFW 3.0 Beta 3
Fix the handling of case sensitive names being stored in the registry. Only apply case sensitive encoding logic to the keys below the NetIdMgr key. Fix the importing of credentials from MSLSA: Apply an ugly hack to krb5configcc.c that forces _WIN32_WINNT to 0x0501 for the one file so that the executable can be built as APPVER=5.0 and yet still gain access to balloon tips on XP and above. ticket: new component: windows status: open target_version: 1.4.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17535 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/identity/ui')
-rw-r--r--src/windows/identity/ui/Makefile3
-rw-r--r--src/windows/identity/ui/aboutwnd.c6
-rw-r--r--src/windows/identity/ui/appglobal.h8
-rw-r--r--src/windows/identity/ui/cfg_identities_wnd.c3
-rw-r--r--src/windows/identity/ui/cfg_plugins_wnd.c3
-rw-r--r--src/windows/identity/ui/main.c39
-rw-r--r--src/windows/identity/ui/mainwnd.c13
-rw-r--r--src/windows/identity/ui/notifier.c5
-rw-r--r--src/windows/identity/ui/reqdaemon.c3
9 files changed, 57 insertions, 26 deletions
diff --git a/src/windows/identity/ui/Makefile b/src/windows/identity/ui/Makefile
index 4419444a3..7b3acc40f 100644
--- a/src/windows/identity/ui/Makefile
+++ b/src/windows/identity/ui/Makefile
@@ -64,7 +64,8 @@ SDKLIBFILES= \
comctl32.lib \
shell32.lib \
htmlhelp.lib \
- iphlpapi.lib
+ iphlpapi.lib \
+ shlwapi.lib
$(OBJ)\uiconfig.c: uiconfig.csv $(CONFDIR)\csvschema.cfg
$(CCSV) $** $@
diff --git a/src/windows/identity/ui/aboutwnd.c b/src/windows/identity/ui/aboutwnd.c
index 4f5d38ef4..da7abdfee 100644
--- a/src/windows/identity/ui/aboutwnd.c
+++ b/src/windows/identity/ui/aboutwnd.c
@@ -108,12 +108,6 @@ about_dlg_proc(HWND hwnd,
mod.dwSize = sizeof(mod);
} while(Module32Next(hsnap, &mod));
-#if (_WIN32_WINNT >= 0x501)
- /* we are also setting the report style when creating
- the control. this is actually optional. */
- ListView_SetView(hw, LV_VIEW_DETAILS);
-#endif
-
_done_with_modules:
CloseHandle(hsnap);
}
diff --git a/src/windows/identity/ui/appglobal.h b/src/windows/identity/ui/appglobal.h
index d7e5667af..585ec090a 100644
--- a/src/windows/identity/ui/appglobal.h
+++ b/src/windows/identity/ui/appglobal.h
@@ -27,11 +27,17 @@
#ifndef __KHIMAIRA_APPGLOBAL_H
#define __KHIMAIRA_APPGLOBAL_H
+/* Helpfile */
+#define NIDM_HELPFILE L"netidmgr.chm"
+
/* global data */
extern HINSTANCE khm_hInstance;
extern int khm_nCmdShow;
extern const wchar_t * khm_facility;
extern kconf_schema schema_uiconfig[];
+extern khm_ui_4 khm_commctl_version;
+
+#define IS_COMMCTL6() (khm_commctl_version >= 0x60000)
typedef struct tag_khm_startup_options {
BOOL seen;
@@ -67,6 +73,8 @@ void khm_exit_gui(void);
void khm_parse_commandline();
void khm_register_window_classes(void);
+HWND khm_html_help(HWND hwnd, UINT command, DWORD_PTR data);
+
#define MAX_RES_STRING 1024
#define ELIPSIS L"..."
diff --git a/src/windows/identity/ui/cfg_identities_wnd.c b/src/windows/identity/ui/cfg_identities_wnd.c
index 8b27c3334..d38b338d2 100644
--- a/src/windows/identity/ui/cfg_identities_wnd.c
+++ b/src/windows/identity/ui/cfg_identities_wnd.c
@@ -946,9 +946,6 @@ khm_cfg_ids_tab_proc(HWND hwnd,
cfg_idents.idents[i].lv_idx = ListView_InsertItem(hw, &lvi);
}
-#if (_WIN32_WINNT >= 0x501)
- ListView_SetView(hw, LV_VIEW_DETAILS);
-#endif
}
return FALSE;
diff --git a/src/windows/identity/ui/cfg_plugins_wnd.c b/src/windows/identity/ui/cfg_plugins_wnd.c
index 8bf767e8c..6dad3698f 100644
--- a/src/windows/identity/ui/cfg_plugins_wnd.c
+++ b/src/windows/identity/ui/cfg_plugins_wnd.c
@@ -120,9 +120,6 @@ khm_cfg_plugins_proc(HWND hwnd,
#ifdef DEBUG
assert(hw);
#endif
-#if (_WIN32_WINNT >= 0x501)
- ListView_SetView(hw, LV_VIEW_DETAILS);
-#endif
ZeroMemory(&lvc, sizeof(lvc));
lvc.mask = LVCF_TEXT | LVCF_WIDTH;
diff --git a/src/windows/identity/ui/main.c b/src/windows/identity/ui/main.c
index 4f1aa7d5d..93055d97f 100644
--- a/src/windows/identity/ui/main.c
+++ b/src/windows/identity/ui/main.c
@@ -24,6 +24,7 @@
/* $Id$ */
+#include<shlwapi.h>
#include<khmapp.h>
#if DEBUG
@@ -33,6 +34,7 @@
HINSTANCE khm_hInstance;
const wchar_t * khm_facility = L"NetIDMgr";
int khm_nCmdShow;
+khm_ui_4 khm_commctl_version = 0;
khm_startup_options khm_startup;
@@ -123,12 +125,16 @@ void khm_register_window_classes(void) {
ICC_BAR_CLASSES |
ICC_DATE_CLASSES |
ICC_HOTKEY_CLASS |
+ ICC_LISTVIEW_CLASSES |
+ ICC_TAB_CLASSES |
#if (_WIN32_WINNT >= 0x501)
- ICC_LINK_CLASS |
- ICC_STANDARD_CLASSES |
+ ((IS_COMMCTL6())?
+ ICC_LINK_CLASS |
+ ICC_STANDARD_CLASSES :
+ 0) |
#endif
- ICC_LISTVIEW_CLASSES |
- ICC_TAB_CLASSES;
+ 0;
+
InitCommonControlsEx(&ics);
khm_register_main_wnd_class();
@@ -368,6 +374,27 @@ khm_module_load_ctx_handler(enum kherr_ctx_event evt,
c->serial);
}
+static wchar_t helpfile[MAX_PATH] = L"";
+
+HWND khm_html_help(HWND hwnd, UINT command, DWORD_PTR data) {
+ if (!*helpfile) {
+ DWORD dw;
+ wchar_t ppath[MAX_PATH];
+
+ dw = GetModuleFileName(NULL, ppath, ARRAYLENGTH(ppath));
+
+ if (dw == 0) {
+ StringCbCopy(helpfile, sizeof(helpfile), NIDM_HELPFILE);
+ } else {
+ PathRemoveFileSpec(ppath);
+ PathAppend(ppath, NIDM_HELPFILE);
+ StringCbCopy(helpfile, sizeof(helpfile), ppath);
+ }
+ }
+
+ return HtmlHelp(hwnd, helpfile, command, data);
+}
+
void khm_load_default_modules(void) {
kherr_context * c;
@@ -418,6 +445,10 @@ int WINAPI WinMain(HINSTANCE hInstance,
processes started by plugins. */
SetEnvironmentVariable(L"KERBEROSLOGIN_NEVER_PROMPT", L"1");
+ khm_version_init();
+
+ khm_commctl_version = khm_get_commctl_version(NULL);
+
/* we only open a main window if this is the only instance
of the application that is running. */
kmq_init();
diff --git a/src/windows/identity/ui/mainwnd.c b/src/windows/identity/ui/mainwnd.c
index 5fbd1ec9b..8f55005b3 100644
--- a/src/windows/identity/ui/mainwnd.c
+++ b/src/windows/identity/ui/mainwnd.c
@@ -176,24 +176,25 @@ LRESULT CALLBACK khm_main_wnd_proc(
break;
case KHUI_ACTION_HELP_CTX:
- HtmlHelp(khm_hwnd_main, NIDM_HELPFILE,
- HH_HELP_CONTEXT, IDH_WELCOME);
+ khm_html_help(khm_hwnd_main, HH_HELP_CONTEXT, IDH_WELCOME);
break;
case KHUI_ACTION_HELP_CONTENTS:
- HtmlHelp(khm_hwnd_main, NIDM_HELPFILE,
- HH_DISPLAY_TOC, 0);
+ khm_html_help(khm_hwnd_main, HH_DISPLAY_TOC, 0);
break;
case KHUI_ACTION_HELP_INDEX:
- HtmlHelp(khm_hwnd_main, NIDM_HELPFILE,
- HH_DISPLAY_INDEX, (DWORD_PTR) L"");
+ khm_html_help(khm_hwnd_main, HH_DISPLAY_INDEX, (DWORD_PTR) L"");
break;
case KHUI_ACTION_HELP_ABOUT:
khm_create_about_window();
break;
+ case KHUI_ACTION_IMPORT:
+ khm_cred_import();
+ break;
+
case KHUI_ACTION_PROPERTIES:
/* properties are not handled by the main window.
Just bounce it to credwnd. However, use SendMessage
diff --git a/src/windows/identity/ui/notifier.c b/src/windows/identity/ui/notifier.c
index c795245b1..5d62be5fc 100644
--- a/src/windows/identity/ui/notifier.c
+++ b/src/windows/identity/ui/notifier.c
@@ -988,10 +988,11 @@ ATOM khm_register_alerter_wnd_class(void)
wcx.cbSize = sizeof(wcx);
wcx.style =
+ CS_OWNDC |
#if(_WIN32_WINNT >= 0x0501)
- CS_DROPSHADOW |
+ ((IS_COMMCTL6())? CS_DROPSHADOW: 0) |
#endif
- CS_OWNDC;
+ 0;
wcx.lpfnWndProc = alerter_wnd_proc;
wcx.cbClsExtra = 0;
wcx.cbWndExtra = DLGWINDOWEXTRA + sizeof(LONG_PTR);
diff --git a/src/windows/identity/ui/reqdaemon.c b/src/windows/identity/ui/reqdaemon.c
index 620bdc54e..9c48eed43 100644
--- a/src/windows/identity/ui/reqdaemon.c
+++ b/src/windows/identity/ui/reqdaemon.c
@@ -293,8 +293,9 @@ DWORD WINAPI
khm_reqdaemon_thread_proc(LPVOID vparam) {
BOOL rv;
MSG msg;
+#ifdef DEBUG
DWORD dw;
-
+#endif
khm_register_reqdaemonwnd_class();
#ifdef DEBUG