- s->settings_window =
- GetDialogWindow(GetNewDialog(wSettings, NULL, (WindowPtr)-1));
-
- SetWRefCon(s->settings_window, (long)s);
+ if (HAVE_COLOR_QD())
+ s->settings_window = GetNewCWindow(wSettings, NULL, (WindowPtr)-1);
+ else
+ s->settings_window = GetNewWindow(wSettings, NULL, (WindowPtr)-1);
+
+ get_sesslist(&sesslist, TRUE);
+ s->ctrlbox = ctrl_new_box();
+ setup_config_box(s->ctrlbox, &sesslist, FALSE, 0);
+
+ s->settings_ctrls.data = &s->cfg;
+ s->settings_ctrls.end = &mac_enddlg;
+ macctrl_layoutbox(s->ctrlbox, s->settings_window, &s->settings_ctrls);
+
+ wi = snew(WinInfo);
+ memset(wi, 0, sizeof(*wi));
+ wi->s = s;
+ wi->mcs = &s->settings_ctrls;
+ wi->wtype = wSettings;
+ wi->update = &macctrl_update;
+ wi->click = &macctrl_click;
+ wi->key = &macctrl_key;
+ wi->activate = &macctrl_activate;
+ wi->adjustmenus = &macctrl_adjustmenus;
+ wi->close = &mac_closedlg;
+ SetWRefCon(s->settings_window, (long)wi);