mirror of https://github.com/MidnightCommander/mc
* 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:
parent
68249252cb
commit
77391f3981
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
15
src/widget.h
15
src/widget.h
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue