X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=macosx%2Fosxctrls.m;h=27c2c52bac6da661b235135586185c4d0cc12aaf;hb=9dd9860cc84f82309de64c33e2813c6e9dc60749;hp=e3780ff682d402fb085697df18c497f6ee0b067c;hpb=46bfde32e84f331f65fac3fc6e9948d78a723d95;p=PuTTY.git diff --git a/macosx/osxctrls.m b/macosx/osxctrls.m index e3780ff6..27c2c52b 100644 --- a/macosx/osxctrls.m +++ b/macosx/osxctrls.m @@ -243,8 +243,6 @@ struct fe_ctrl { NSTableView *tableview; NSScrollView *scrollview; int nradiobuttons; - void *privdata; - int privdata_needs_free; }; static int fe_ctrl_cmp_by_ctrl(void *av, void *bv) @@ -346,16 +344,12 @@ static struct fe_ctrl *fe_ctrl_new(union control *ctrl) c->scrollview = nil; c->radiobuttons = NULL; c->nradiobuttons = 0; - c->privdata = NULL; - c->privdata_needs_free = FALSE; return c; } static void fe_ctrl_free(struct fe_ctrl *c) { - if (c->privdata_needs_free) - sfree(c->privdata); sfree(c->radiobuttons); sfree(c); } @@ -1686,6 +1680,17 @@ void dlg_text_set(union control *ctrl, void *dv, char const *text) [c->textview setString:[NSString stringWithCString:text]]; } +void dlg_label_change(union control *ctrl, void *dlg, char const *text) +{ + /* + * This function is currently only used by the config box to + * switch the labels on the host and port boxes between serial + * and network modes. Since OS X does not (yet?) have a serial + * back end, this function can safely do nothing for the + * moment. + */ +} + void dlg_filesel_set(union control *ctrl, void *dv, Filename fn) { /* FIXME */ @@ -1731,7 +1736,7 @@ void dlg_beep(void *dv) NSBeep(); } -void dlg_error_msg(void *dv, char *msg) +void dlg_error_msg(void *dv, const char *msg) { /* FIXME */ } @@ -1774,31 +1779,3 @@ void dlg_refresh(union control *ctrl, void *dv) } } } - -void *dlg_get_privdata(union control *ctrl, void *dv) -{ - struct fe_dlg *d = (struct fe_dlg *)dv; - struct fe_ctrl *c = fe_ctrl_byctrl(d, ctrl); - return c->privdata; -} - -void dlg_set_privdata(union control *ctrl, void *dv, void *ptr) -{ - struct fe_dlg *d = (struct fe_dlg *)dv; - struct fe_ctrl *c = fe_ctrl_byctrl(d, ctrl); - c->privdata = ptr; - c->privdata_needs_free = FALSE; -} - -void *dlg_alloc_privdata(union control *ctrl, void *dv, size_t size) -{ - struct fe_dlg *d = (struct fe_dlg *)dv; - struct fe_ctrl *c = fe_ctrl_byctrl(d, ctrl); - /* - * This is an internal allocation routine, so it's allowed to - * use smalloc directly. - */ - c->privdata = smalloc(size); - c->privdata_needs_free = TRUE; - return c->privdata; -}