This commit is contained in:
parent
4eb20e47b5
commit
20d1a455e7
3 changed files with 4 additions and 8 deletions
|
|
@ -13,6 +13,7 @@ void spawn(MwWidget handle, void* user, void* call) {
|
|||
(void)call;
|
||||
|
||||
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
||||
MwAddUserHandler(mb, MwNcloseHandler, ok, mb);
|
||||
}
|
||||
|
||||
void spawn2(MwWidget handle, void* user, void* call) {
|
||||
|
|
@ -22,6 +23,7 @@ void spawn2(MwWidget handle, void* user, void* call) {
|
|||
(void)call;
|
||||
|
||||
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
||||
MwAddUserHandler(mb, MwNcloseHandler, ok, mb);
|
||||
}
|
||||
|
||||
void spawn3(MwWidget handle, void* user, void* call) {
|
||||
|
|
@ -33,6 +35,7 @@ void spawn3(MwWidget handle, void* user, void* call) {
|
|||
for(i = 0; i <= MwMB_ICONCLOCK; i++) {
|
||||
MwWidget mb = MwMessageBox(user, "messagebox test", "title", i | MwMB_BUTTONOK);
|
||||
MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb);
|
||||
MwAddUserHandler(mb, MwNcloseHandler, ok, mb);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -782,6 +782,7 @@
|
|||
<handler name="colorChosen" />
|
||||
<handler name="fileChosen" />
|
||||
<handler name="directoryChosen" />
|
||||
<handler name="close" />
|
||||
</handlers>
|
||||
<functions>
|
||||
<function name="MakeBorderless" />
|
||||
|
|
|
|||
|
|
@ -18,12 +18,6 @@ static void spawn_button(MwWidget handle, int x, int y, int id, const char* text
|
|||
handle->opaque = mb;
|
||||
}
|
||||
|
||||
static void messagebox_close(MwWidget handle, void* user, void* call) {
|
||||
(void)user;
|
||||
(void)call;
|
||||
MwMessageBoxDestroy(handle);
|
||||
}
|
||||
|
||||
MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsigned int flag) {
|
||||
MwWidget window;
|
||||
int w, h;
|
||||
|
|
@ -112,8 +106,6 @@ MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsi
|
|||
MwLLMakePopup(window->lowlevel, handle == NULL ? NULL : handle->lowlevel);
|
||||
MwLLEndStateChange(window->lowlevel);
|
||||
|
||||
MwAddUserHandler(window, MwNcloseHandler, messagebox_close, NULL);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue