parent
0cca68ca52
commit
cffc466d8a
10
src/dialog.c
10
src/dialog.c
|
@ -321,6 +321,13 @@ DialogSetExitFunction(Dialog * d, DialogCallbackFunc * func, int val)
|
|||
d->exit_val = val;
|
||||
}
|
||||
|
||||
void
|
||||
DialogCallExitFunction(Dialog * d)
|
||||
{
|
||||
if (d->exit_func)
|
||||
d->exit_func(d, d->exit_val, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
DialogSetData(Dialog * d, void *data)
|
||||
{
|
||||
|
@ -630,8 +637,7 @@ _DialogClose(Dialog * d)
|
|||
if (!d)
|
||||
return;
|
||||
|
||||
if (d->exit_func)
|
||||
d->exit_func(d, d->exit_val, NULL);
|
||||
DialogCallExitFunction(d);
|
||||
|
||||
EwinHide(d->ewin);
|
||||
}
|
||||
|
|
|
@ -80,6 +80,7 @@ void DialogSetText(Dialog * d, const char *text);
|
|||
void DialogSetTitle(Dialog * d, const char *title);
|
||||
void DialogSetExitFunction(Dialog * d, DialogCallbackFunc * func,
|
||||
int val);
|
||||
void DialogCallExitFunction(Dialog * d);
|
||||
void DialogSetData(Dialog * d, void *data);
|
||||
void *DialogGetData(Dialog * d);
|
||||
|
||||
|
|
|
@ -656,6 +656,8 @@ CB_DlgSelect(Dialog * d, int val, void *data)
|
|||
if (!dd->fill)
|
||||
return;
|
||||
|
||||
DialogCallExitFunction(d);
|
||||
|
||||
DialogItemTableEmpty(table);
|
||||
DialogKeybindingsDestroy(d);
|
||||
|
||||
|
|
Loading…
Reference in New Issue