From 6e18b3055f2903ef0425d1a7adb78ae1e95c69cd Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 8 Jul 2008 09:26:15 +0000 Subject: [PATCH] if we're not going to create links, disable startmenu/desktop buttons --- installer/installer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/installer/installer.c b/installer/installer.c index 05017f4..08e3c0e 100644 --- a/installer/installer.c +++ b/installer/installer.c @@ -563,10 +563,14 @@ BOOL CALLBACK PropertySheetFunc4(HWND hwnd, UINT message, WPARAM wParam, LPARAM printf("a GUI program exists, creating desktop/startmenu links\n"); config_createLinks = 1; fclose(fi); + } else { + config_createLinks = 0; + config_createStartmenu = 0; + config_createDesktop = 0; } if(!config_createLinks) { - SendDlgItemMessage(hwnd, IDC_STARTMENU, SW_HIDE, 0, 0); - SendDlgItemMessage(hwnd, IDC_DESKTOP, SW_HIDE, 0, 0); + SendDlgItemMessage(hwnd, IDC_STARTMENU, BN_DISABLE, 0, 0); + SendDlgItemMessage(hwnd, IDC_DESKTOP, BN_DISABLE, 0, 0); } SendDlgItemMessage(hwnd, IDC_STARTMENU, BM_SETCHECK, config_createStartmenu, 0); @@ -575,13 +579,17 @@ BOOL CALLBACK PropertySheetFunc4(HWND hwnd, UINT message, WPARAM wParam, LPARAM if(message == WM_COMMAND) { if((wParam&0xffff) == IDC_STARTMENU) { config_createStartmenu = SendDlgItemMessage(hwnd, IDC_STARTMENU, BM_GETCHECK, 0, 0); - config_createStartmenu^=1; + if(config_createLinks) { + config_createStartmenu^=1; + } SendDlgItemMessage(hwnd, IDC_STARTMENU, BM_SETCHECK, config_createStartmenu, 0); return 0; } if((wParam&0xffff) == IDC_DESKTOP) { config_createDesktop = SendDlgItemMessage(hwnd, IDC_DESKTOP, BM_GETCHECK, 0, 0); - config_createDesktop^=1; + if(config_createLinks) { + config_createDesktop^=1; + } SendDlgItemMessage(hwnd, IDC_DESKTOP, BM_SETCHECK, config_createDesktop, 0); return 0; } -- 1.7.10.4