solve problems
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-04-20 01:51:29 +09:00
commit 20d1a455e7
Signed by: nishi
GPG key ID: 27EF69B208EB9343
3 changed files with 4 additions and 8 deletions

View file

@ -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);
}
}

View file

@ -782,6 +782,7 @@
<handler name="colorChosen" />
<handler name="fileChosen" />
<handler name="directoryChosen" />
<handler name="close" />
</handlers>
<functions>
<function name="MakeBorderless" />

View file

@ -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;
}