Mercurial > hg > xemacs-beta
comparison src/glyphs-msw.c @ 454:d7a9135ec789 r21-2-42
Import from CVS: tag r21-2-42
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:40:54 +0200 |
parents | 576fb035e263 |
children | 7039e6323819 |
comparison
equal
deleted
inserted
replaced
453:270b05afd845 | 454:d7a9135ec789 |
---|---|
2324 C_STRING_ALLOCA, lparam, | 2324 C_STRING_ALLOCA, lparam, |
2325 Qnative); | 2325 Qnative); |
2326 SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), | 2326 SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), |
2327 WM_SETTEXT, 0, (LPARAM)lparam); | 2327 WM_SETTEXT, 0, (LPARAM)lparam); |
2328 } | 2328 } |
2329 /* Set active state. */ | |
2330 if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p)) | |
2331 { | |
2332 Lisp_Object item = IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p); | |
2333 LONG style = GetWindowLong | |
2334 (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), | |
2335 GWL_STYLE); | |
2336 | |
2337 if (CONSP (item)) | |
2338 item = XCAR (item); | |
2339 | |
2340 if (gui_item_active_p (item)) | |
2341 SetWindowLong (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), | |
2342 GWL_STYLE, style & ~WS_DISABLED); | |
2343 else | |
2344 SetWindowLong (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), | |
2345 GWL_STYLE, style | WS_DISABLED); | |
2346 } | |
2329 } | 2347 } |
2330 | 2348 |
2331 /* register widgets into our hashtable so that we can cope with the | 2349 /* register widgets into our hashtable so that we can cope with the |
2332 callbacks. The hashtable is weak so deregistration is handled | 2350 callbacks. The hashtable is weak so deregistration is handled |
2333 automatically */ | 2351 automatically */ |
2933 if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) | 2951 if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) |
2934 || | 2952 || |
2935 IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (ii)) | 2953 IMAGE_INSTANCE_WIDGET_ACTION_OCCURRED (ii)) |
2936 { | 2954 { |
2937 HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); | 2955 HWND wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii); |
2938 int i = 0, selected = 0; | 2956 int i = 0, selected_idx = 0; |
2939 Lisp_Object rest; | 2957 Lisp_Object rest; |
2940 | 2958 |
2941 assert (!NILP (IMAGE_INSTANCE_WIDGET_ITEMS (ii))); | 2959 assert (!NILP (IMAGE_INSTANCE_WIDGET_ITEMS (ii))); |
2942 | 2960 |
2943 /* If only the order has changed then simply select the first | 2961 /* If only the order has changed then simply select the first |
2986 LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))) | 3004 LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii))) |
2987 { | 3005 { |
2988 add_tab_item (image_instance, wnd, XCAR (rest), | 3006 add_tab_item (image_instance, wnd, XCAR (rest), |
2989 IMAGE_INSTANCE_FRAME (ii), i); | 3007 IMAGE_INSTANCE_FRAME (ii), i); |
2990 if (gui_item_selected_p (XCAR (rest))) | 3008 if (gui_item_selected_p (XCAR (rest))) |
2991 selected = i; | 3009 selected_idx = i; |
2992 i++; | 3010 i++; |
2993 } | 3011 } |
2994 SendMessage (wnd, TCM_SETCURSEL, selected, 0); | 3012 SendMessage (wnd, TCM_SETCURSEL, selected_idx, 0); |
2995 } | 3013 } |
2996 } | 3014 } |
2997 } | 3015 } |
2998 | 3016 |
2999 /* instantiate a static control possible for putting other things in */ | 3017 /* instantiate a static control possible for putting other things in */ |