Mercurial > emacs
changeset 75239:37c56b5778df
[TARGET_API_MAC_CARBON] (create_and_show_dialog):
Create movable modal window instead of movable alert window.
[TARGET_API_MAC_CARBON] (create_and_show_dialog) [!MAC_OSX]: Use
DeactivateControl instead of DisableControl.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Mon, 15 Jan 2007 08:35:49 +0000 |
parents | 975531dd9b08 |
children | ffa0f75caa03 |
files | src/macmenu.c |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/macmenu.c Mon Jan 15 08:10:22 2007 +0000 +++ b/src/macmenu.c Mon Jan 15 08:35:49 2007 +0000 @@ -2460,11 +2460,11 @@ SetRect (&empty_rect, 0, 0, 0, 0); /* Create dialog window. */ - err = CreateNewWindow (kMovableAlertWindowClass, + err = CreateNewWindow (kMovableModalWindowClass, kWindowStandardHandlerAttribute, &empty_rect, &window); if (err == noErr) - err = SetThemeWindowBackground (window, kThemeBrushAlertBackgroundActive, + err = SetThemeWindowBackground (window, kThemeBrushMovableModalBackground, true); if (err == noErr) err = SetWindowTitleWithCFString (window, (dialog_name[0] == 'Q' @@ -2491,7 +2491,13 @@ if (err == noErr) { if (!wv->enabled) - err = DisableControl (buttons[i]); + { +#ifdef MAC_OSX + err = DisableControl (buttons[i]); +#else + err = DeactivateControl (buttons[i]); +#endif + } else if (default_button == NULL) default_button = buttons[i]; }