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;
|
d->exit_val = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DialogCallExitFunction(Dialog * d)
|
||||||
|
{
|
||||||
|
if (d->exit_func)
|
||||||
|
d->exit_func(d, d->exit_val, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DialogSetData(Dialog * d, void *data)
|
DialogSetData(Dialog * d, void *data)
|
||||||
{
|
{
|
||||||
|
@ -630,8 +637,7 @@ _DialogClose(Dialog * d)
|
||||||
if (!d)
|
if (!d)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (d->exit_func)
|
DialogCallExitFunction(d);
|
||||||
d->exit_func(d, d->exit_val, NULL);
|
|
||||||
|
|
||||||
EwinHide(d->ewin);
|
EwinHide(d->ewin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,7 @@ void DialogSetText(Dialog * d, const char *text);
|
||||||
void DialogSetTitle(Dialog * d, const char *title);
|
void DialogSetTitle(Dialog * d, const char *title);
|
||||||
void DialogSetExitFunction(Dialog * d, DialogCallbackFunc * func,
|
void DialogSetExitFunction(Dialog * d, DialogCallbackFunc * func,
|
||||||
int val);
|
int val);
|
||||||
|
void DialogCallExitFunction(Dialog * d);
|
||||||
void DialogSetData(Dialog * d, void *data);
|
void DialogSetData(Dialog * d, void *data);
|
||||||
void *DialogGetData(Dialog * d);
|
void *DialogGetData(Dialog * d);
|
||||||
|
|
||||||
|
|
|
@ -656,6 +656,8 @@ CB_DlgSelect(Dialog * d, int val, void *data)
|
||||||
if (!dd->fill)
|
if (!dd->fill)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
DialogCallExitFunction(d);
|
||||||
|
|
||||||
DialogItemTableEmpty(table);
|
DialogItemTableEmpty(table);
|
||||||
DialogKeybindingsDestroy(d);
|
DialogKeybindingsDestroy(d);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue