Changeset 46bd63c9 in mainline for uspace/lib/ui/src/menuentry.c
- Timestamp:
- 2023-09-08T08:47:30Z (20 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1af103e
- Parents:
- 0b6fad9
- git-author:
- Jiri Svoboda <jiri@…> (2023-09-07 18:47:09)
- git-committer:
- Jiri Svoboda <jiri@…> (2023-09-08 08:47:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/menuentry.c
r0b6fad9 r46bd63c9 1 1 /* 2 * Copyright (c) 202 2Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 241 241 * This needs to work even if the menu is not open, so we cannot 242 242 * use the menu's resource, which is only created after the menu 243 * is open (and its window is created). Use the menu bar's243 * is open (and its window is created). Use the parent window's 244 244 * resource instead. 245 245 */ 246 res = ui_window_get_res(mentry->menu-> mbar->window);246 res = ui_window_get_res(mentry->menu->parent); 247 247 248 248 *caption_w = ui_text_width(res->font, mentry->caption); … … 267 267 * This needs to work even if the menu is not open, so we cannot 268 268 * use the menu's resource, which is only created after the menu 269 * is open (and its window is created). Use the menu bar's269 * is open (and its window is created). Use the parent window's 270 270 * resource instead. 271 271 */ 272 res = ui_window_get_res(menu-> mbar->window);272 res = ui_window_get_res(menu->parent); 273 273 274 274 if (res->textmode) … … 306 306 * This needs to work even if the menu is not open, so we cannot 307 307 * use the menu's resource, which is only created after the menu 308 * is open (and its window is created). Use the menu bar's308 * is open (and its window is created). Use the parent window's 309 309 * resource instead. 310 310 */ 311 res = ui_window_get_res(mentry->menu-> mbar->window);311 res = ui_window_get_res(mentry->menu->parent); 312 312 313 313 if (res->textmode) { … … 474 474 void ui_menu_entry_activate(ui_menu_entry_t *mentry) 475 475 { 476 /* Deactivate menu bar, close menu */477 ui_menu_ bar_deactivate(mentry->menu->mbar);476 /* Close menu */ 477 ui_menu_close_req(mentry->menu); 478 478 479 479 /* Call back */
Note:
See TracChangeset
for help on using the changeset viewer.