* widget.h: Renamed define_label to buttonbar_set_label. Renamed

define_label_data to buttonbar_set_label_data. Renamed
	redraw_labels to buttonbar_redraw. Provided compatibility macros
	to enable a smooth transition between the old and the new names.
	* widget.c: Likewise.
This commit is contained in:
Roland Illig 2005-02-08 09:40:52 +00:00
parent 68249252cb
commit 77391f3981
3 changed files with 20 additions and 10 deletions

View File

@ -1,3 +1,11 @@
2005-02-08 Roland Illig <roland.illig@gmx.de>
* widget.h: Renamed define_label to buttonbar_set_label. Renamed
define_label_data to buttonbar_set_label_data. Renamed
redraw_labels to buttonbar_redraw. Provided compatibility macros
to enable a smooth transition between the old and the new names.
* widget.c: Likewise.
2005-02-08 Roland Illig <roland.illig@gmx.de>
* *.c: Reordered header inclusion.

View File

@ -2328,7 +2328,7 @@ find_buttonbar (Dlg_head *h)
}
void
define_label_data (Dlg_head *h, int idx, const char *text, buttonbarfn cback,
buttonbar_set_label_data (Dlg_head *h, int idx, const char *text, buttonbarfn cback,
void *data)
{
WButtonBar *bb = find_buttonbar (h);
@ -2342,14 +2342,13 @@ define_label_data (Dlg_head *h, int idx, const char *text, buttonbarfn cback,
}
void
define_label (Dlg_head *h, int idx, const char *text, void (*cback) (void))
buttonbar_set_label (Dlg_head *h, int idx, const char *text, void (*cback) (void))
{
define_label_data (h, idx, text, (buttonbarfn) cback, 0);
}
/* Redraw labels of the buttonbar */
void
redraw_labels (Dlg_head *h)
buttonbar_redraw (Dlg_head *h)
{
WButtonBar *bb = find_buttonbar (h);

View File

@ -197,13 +197,16 @@ char *listbox_add_item (WListbox *l, enum append_pos pos, int
/* Hintbar routines */
/* Buttonbar routines */
typedef void (*voidfn)(void);
WButtonBar *buttonbar_new (int visible);
WButtonBar *find_buttonbar (Dlg_head *h);
typedef void (*voidfn)(void);
void define_label (Dlg_head *, int index, const char *text, voidfn);
void define_label_data (Dlg_head *h, int idx, const char *text,
buttonbarfn cback, void *data);
void redraw_labels (Dlg_head *h);
void buttonbar_hint (WButtonBar *bb, const char *s);
void buttonbar_set_label (Dlg_head *, int index, const char *text, voidfn);
#define define_label buttonbar_set_label
void buttonbar_set_label_data (Dlg_head *h, int idx, const char *text,
buttonbarfn cback, void *data);
#define define_label_data buttonbar_set_label_data
void buttonbar_redraw (Dlg_head *h);
#define redraw_labels buttonbar_redraw
#endif