summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8cf125c)
name was, not to put too fine a point on it, wrong.
[originally from svn r2997]
- dlg_listbox_addwithindex(ctrl, dlg, cstr, c);
+ dlg_listbox_addwithid(ctrl, dlg, cstr, c);
}
dlg_update_done(ctrl, dlg);
}
dlg_update_done(ctrl, dlg);
if (event == EVENT_REFRESH) {
dlg_update_start(ctrl, dlg);
dlg_listbox_clear(ctrl, dlg);
if (event == EVENT_REFRESH) {
dlg_update_start(ctrl, dlg);
dlg_listbox_clear(ctrl, dlg);
- dlg_listbox_addwithindex(ctrl, dlg, "Auto", AUTO);
- dlg_listbox_addwithindex(ctrl, dlg, "Off", FORCE_OFF);
- dlg_listbox_addwithindex(ctrl, dlg, "On", FORCE_ON);
+ dlg_listbox_addwithid(ctrl, dlg, "Auto", AUTO);
+ dlg_listbox_addwithid(ctrl, dlg, "Off", FORCE_OFF);
+ dlg_listbox_addwithid(ctrl, dlg, "On", FORCE_ON);
switch (*(int *)ATOFFSET(data, ctrl->listbox.context.i)) {
case AUTO: dlg_listbox_select(ctrl, dlg, 0); break;
case FORCE_OFF: dlg_listbox_select(ctrl, dlg, 1); break;
switch (*(int *)ATOFFSET(data, ctrl->listbox.context.i)) {
case AUTO: dlg_listbox_select(ctrl, dlg, 0); break;
case FORCE_OFF: dlg_listbox_select(ctrl, dlg, 1); break;
* strings in any listbox then you MUST not assign them different
* IDs and expect to get meaningful results back.
*/
* strings in any listbox then you MUST not assign them different
* IDs and expect to get meaningful results back.
*/
-void dlg_listbox_addwithindex(union control *ctrl, void *dlg,
- char const *text, int id);
+void dlg_listbox_addwithid(union control *ctrl, void *dlg,
+ char const *text, int id);
int dlg_listbox_getid(union control *ctrl, void *dlg, int index);
/* dlg_listbox_index returns <0 if no single element is selected. */
int dlg_listbox_index(union control *ctrl, void *dlg);
int dlg_listbox_getid(union control *ctrl, void *dlg, int index);
/* dlg_listbox_index returns <0 if no single element is selected. */
int dlg_listbox_index(union control *ctrl, void *dlg);
-/* $Id: macctrls.c,v 1.14 2003/03/25 23:23:03 ben Exp $ */
+/* $Id: macctrls.c,v 1.15 2003/03/25 23:45:56 ben Exp $ */
/*
* Copyright (c) 2003 Ben Harris
* All rights reserved.
/*
* Copyright (c) 2003 Ben Harris
* All rights reserved.
dlg_macpopup_add(ctrl, dlg, text);
}
dlg_macpopup_add(ctrl, dlg, text);
}
-static void dlg_macpopup_addwithindex(union control *ctrl, void *dlg,
- char const *text, int id)
+static void dlg_macpopup_addwithid(union control *ctrl, void *dlg,
+ char const *text, int id)
{
struct macctrls *mcs = dlg;
union macctrl *mc = findbyctrl(mcs, ctrl);
{
struct macctrls *mcs = dlg;
union macctrl *mc = findbyctrl(mcs, ctrl);
mc->popup.ids[index] = id;
}
mc->popup.ids[index] = id;
}
-void dlg_listbox_addwithindex(union control *ctrl, void *dlg,
- char const *text, int id)
+void dlg_listbox_addwithid(union control *ctrl, void *dlg,
+ char const *text, int id)
{
if (ctrl->listbox.height == 0)
{
if (ctrl->listbox.height == 0)
- dlg_macpopup_addwithindex(ctrl, dlg, text, id);
+ dlg_macpopup_addwithid(ctrl, dlg, text, id);
}
int dlg_listbox_getid(union control *ctrl, void *dlg, int index)
}
int dlg_listbox_getid(union control *ctrl, void *dlg, int index)
void dlg_listbox_add(union control *ctrl, void *dlg, char const *text)
{
void dlg_listbox_add(union control *ctrl, void *dlg, char const *text)
{
- dlg_listbox_addwithindex(ctrl, dlg, text, 0);
+ dlg_listbox_addwithid(ctrl, dlg, text, 0);
* strings in any listbox then you MUST not assign them different
* IDs and expect to get meaningful results back.
*/
* strings in any listbox then you MUST not assign them different
* IDs and expect to get meaningful results back.
*/
-void dlg_listbox_addwithindex(union control *ctrl, void *dlg,
- char const *text, int id)
+void dlg_listbox_addwithid(union control *ctrl, void *dlg,
+ char const *text, int id)
{
struct dlgparam *dp = (struct dlgparam *)dlg;
struct uctrl *uc = dlg_find_byctrl(dp, ctrl);
{
struct dlgparam *dp = (struct dlgparam *)dlg;
struct uctrl *uc = dlg_find_byctrl(dp, ctrl);
* strings in any listbox then you MUST not assign them different
* IDs and expect to get meaningful results back.
*/
* strings in any listbox then you MUST not assign them different
* IDs and expect to get meaningful results back.
*/
-void dlg_listbox_addwithindex(union control *ctrl, void *dlg,
- char const *text, int id)
+void dlg_listbox_addwithid(union control *ctrl, void *dlg,
+ char const *text, int id)
{
struct dlgparam *dp = (struct dlgparam *)dlg;
struct winctrl *c = dlg_findbyctrl(dp, ctrl);
{
struct dlgparam *dp = (struct dlgparam *)dlg;
struct winctrl *c = dlg_findbyctrl(dp, ctrl);