This commit is contained in:
Nishi 2026-09-27 11:49:25 +09:00
commit 1647490b5a
4 changed files with 52 additions and 52 deletions

View file

@ -30,7 +30,7 @@ static int calc_size(MwWidget box, xl_node_t* node) {
}
static void exec_button(MwWidget handle, void* user, void* client) {
char** args = MDEStringToExec(MwGetText(handle, "Sexec"), NULL);
char** args = MDEStringToExec(MwGetString(handle, "Sexec"), NULL);
int i;
if(fork() == 0) {
@ -55,7 +55,7 @@ void module_reload(MwWidget box, MwWidget user, xl_node_t* node) {
if(children != NULL) {
int i;
for(i = 0; children[i] != NULL; i++) {
MwLLPixmap px = MwGetVoid(children[i], MwNpixmap);
MwLLPixmap px = MwGetPointer(children[i], MwNpixmap);
if(px != NULL) MwLLDestroyPixmap(px);
@ -137,7 +137,7 @@ void module_destroy(MwWidget box, MwWidget user) {
if(children != NULL) {
int i;
for(i = 0; children[i] != NULL; i++) {
MwLLPixmap px = MwGetVoid(children[i], MwNpixmap);
MwLLPixmap px = MwGetPointer(children[i], MwNpixmap);
if(px != NULL) MwLLDestroyPixmap(px);

View file

@ -16,15 +16,15 @@
#define TriW 5
typedef struct opaque {
MwLLPixmap closed;
MwLLPixmap opened;
MwWidget submenu;
int is_opened;
MwMenu menu;
MwMenu current;
MwPixmap closed;
MwPixmap opened;
MwWidget submenu;
int is_opened;
MwMenu menu;
MwMenu current;
MwLLPixmap stripe;
char* stripe_color;
MwPixmap stripe;
char* stripe_color;
char* name;
char* category;
@ -367,7 +367,7 @@ void module_reload(MwWidget box, MwWidget user, xl_node_t* node) {
} else if(n->type == XL_NODE_NODE && strcmp(n->name, "Stripe") == 0) {
xl_attribute_t* a;
if(opaque->stripe != NULL) MwLLDestroyPixmap(opaque->stripe);
if(opaque->stripe != NULL) MwDestroyPixmap(opaque->stripe);
opaque->stripe = MwLoadImage(box, n->text == NULL ? "" : n->text);
a = n->first_attribute;
@ -394,8 +394,8 @@ void module_reload(MwWidget box, MwWidget user, xl_node_t* node) {
}
MwWidget module(MwWidget box, xl_node_t* node) {
MwLLPixmap closed = NULL;
MwLLPixmap opened = NULL;
MwPixmap closed = NULL;
MwPixmap opened = NULL;
MwWidget btn;
int w, h;
unsigned int ch;
@ -477,10 +477,10 @@ MwWidget module(MwWidget box, xl_node_t* node) {
void module_destroy(MwWidget box, MwWidget user) {
opaque_t* opaque = user->opaque;
MwLLDestroyPixmap(opaque->closed);
MwLLDestroyPixmap(opaque->opened);
MwDestroyPixmap(opaque->closed);
MwDestroyPixmap(opaque->opened);
if(opaque->stripe != NULL) MwLLDestroyPixmap(opaque->stripe);
if(opaque->stripe != NULL) MwDestroyPixmap(opaque->stripe);
if(opaque->stripe_color != NULL) free(opaque->stripe_color);
recursive_free(opaque->menu);