From 4eaff8d484f9fadb26c593f64f4e9513aa71b959 Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 25 Mar 2003 23:45:56 +0000 Subject: [PATCH] Rename dlg_listbox_addwithindex() to dlg_listbox_addwithid(), since the old name was, not to put too fine a point on it, wrong. git-svn-id: svn://svn.tartarus.org/sgt/putty@2997 cda61777-01e9-0310-a592-d414129be87e --- config.c | 8 ++++---- dialog.h | 4 ++-- mac/macctrls.c | 12 ++++++------ unix/gtkdlg.c | 6 +++--- winctrls.c | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/config.c b/config.c index 7b11e28c..ed2bee66 100644 --- a/config.c +++ b/config.c @@ -110,7 +110,7 @@ static void cipherlist_handler(union control *ctrl, void *dlg, break; } } - dlg_listbox_addwithindex(ctrl, dlg, cstr, c); + dlg_listbox_addwithid(ctrl, dlg, cstr, c); } dlg_update_done(ctrl, dlg); @@ -179,9 +179,9 @@ static void sshbug_handler(union control *ctrl, void *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; diff --git a/dialog.h b/dialog.h index fb3906cf..078aca19 100644 --- a/dialog.h +++ b/dialog.h @@ -580,8 +580,8 @@ void dlg_listbox_add(union control *ctrl, void *dlg, char const *text); * 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); diff --git a/mac/macctrls.c b/mac/macctrls.c index 0855e01e..dec815a8 100644 --- a/mac/macctrls.c +++ b/mac/macctrls.c @@ -1,4 +1,4 @@ -/* $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. @@ -1114,8 +1114,8 @@ void dlg_listbox_add(union control *ctrl, void *dlg, char const *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); @@ -1133,12 +1133,12 @@ static void dlg_macpopup_addwithindex(union control *ctrl, void *dlg, 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) - 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) diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index 6745ba0b..8a843956 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -323,7 +323,7 @@ void dlg_listbox_del(union control *ctrl, void *dlg, int index) 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); } /* @@ -333,8 +333,8 @@ void dlg_listbox_add(union control *ctrl, void *dlg, char const *text) * 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); diff --git a/winctrls.c b/winctrls.c index 771c0a16..87957efe 100644 --- a/winctrls.c +++ b/winctrls.c @@ -2179,8 +2179,8 @@ void dlg_listbox_add(union control *ctrl, void *dlg, char const *text) * 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); -- 2.11.0