mirror of
https://github.com/labwc/labwc.git
synced 2026-02-26 01:40:22 -05:00
menu: minor coding style tweaks
This commit is contained in:
parent
c827c4c9e5
commit
b22722dafa
1 changed files with 6 additions and 8 deletions
|
|
@ -201,7 +201,7 @@ item_create(struct menu *menu, const char *text, bool show_arrow)
|
||||||
menuitem->selected.buffer = scaled_font_buffer_create(menuitem->selected.tree);
|
menuitem->selected.buffer = scaled_font_buffer_create(menuitem->selected.tree);
|
||||||
if (!menuitem->normal.buffer || !menuitem->selected.buffer) {
|
if (!menuitem->normal.buffer || !menuitem->selected.buffer) {
|
||||||
wlr_log(WLR_ERROR, "Failed to create menu item '%s'", text);
|
wlr_log(WLR_ERROR, "Failed to create menu item '%s'", text);
|
||||||
/**
|
/*
|
||||||
* Destroying the root node will destroy everything,
|
* Destroying the root node will destroy everything,
|
||||||
* including the node descriptor and scaled_font_buffers.
|
* including the node descriptor and scaled_font_buffers.
|
||||||
*/
|
*/
|
||||||
|
|
@ -483,9 +483,9 @@ handle_menu_element(xmlNode *n, struct server *server)
|
||||||
wlr_log(WLR_ERROR, "no menu with id '%s'", id);
|
wlr_log(WLR_ERROR, "no menu with id '%s'", id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
zfree(label);
|
free(label);
|
||||||
zfree(execute);
|
free(execute);
|
||||||
zfree(id);
|
free(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This can be one of <separator> and <separator label=""> */
|
/* This can be one of <separator> and <separator label=""> */
|
||||||
|
|
@ -494,9 +494,7 @@ handle_separator_element(xmlNode *n)
|
||||||
{
|
{
|
||||||
char *label = (char *)xmlGetProp(n, (const xmlChar *)"label");
|
char *label = (char *)xmlGetProp(n, (const xmlChar *)"label");
|
||||||
current_item = separator_create(current_menu, label);
|
current_item = separator_create(current_menu, label);
|
||||||
if (label) {
|
free(label);
|
||||||
free(label);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -943,7 +941,7 @@ menu_execute_item(struct menuitem *item)
|
||||||
actions_run(item->parent->triggered_by_view,
|
actions_run(item->parent->triggered_by_view,
|
||||||
item->parent->server, &item->actions, 0);
|
item->parent->server, &item->actions, 0);
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* We close the menu here to provide a faster feedback to the user.
|
* We close the menu here to provide a faster feedback to the user.
|
||||||
* We do that without resetting the input state so src/cursor.c
|
* We do that without resetting the input state so src/cursor.c
|
||||||
* can do its own clean up on the following RELEASE event.
|
* can do its own clean up on the following RELEASE event.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue