Tag the "Cancel" button appropriately, in case anyone's using a theme that
[u/mdw/putty] / mac / macctrls.c
index bc74514..40514ec 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: macctrls.c,v 1.3 2003/03/18 19:06:51 simon Exp $ */
+/* $Id: macctrls.c,v 1.4 2003/03/18 23:41:14 ben Exp $ */
 /*
  * Copyright (c) 2003 Ben Harris
  * All rights reserved.
@@ -366,6 +366,13 @@ static void macctrl_button(struct macctrls *mcs, WindowPtr window,
                       kControlPushButtonDefaultTag,
                       sizeof(isdefault), &isdefault);
     }
+    if (mac_gestalts.apprvers >= 0x110) {
+       Boolean iscancel = ctrl->button.iscancel;
+
+       SetControlData(mc->button.tbctrl, kControlEntireControl,
+                      kControlPushButtonCancelTag,
+                      sizeof(iscancel), &iscancel);
+    }
     add234(mcs->byctrl, mc);
     curstate->pos.v += 26;
 }