Changeset b336bfd8 in mainline for uspace/app/nav/panel.c
- Timestamp:
- 2025-02-06T20:42:14Z (6 days ago)
- Branches:
- master
- Children:
- a7a16a2f
- Parents:
- accdf882
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nav/panel.c
raccdf882 rb336bfd8 1 1 /* 2 * Copyright (c) 202 3Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 377 377 } 378 378 379 /** Open panel file entry.380 *381 * Perform Open action on a file entry (i.e. try running it).382 *383 * @param panel Panel384 * @param fname File name385 *386 * @return EOK on success or an error code387 */388 static errno_t panel_open_file(panel_t *panel, const char *fname)389 {390 task_id_t id;391 task_wait_t wait;392 task_exit_t texit;393 int retval;394 errno_t rc;395 ui_t *ui;396 397 ui = ui_window_get_ui(panel->window);398 399 /* Free up and clean console for the child task. */400 rc = ui_suspend(ui);401 if (rc != EOK)402 return rc;403 404 rc = task_spawnl(&id, &wait, fname, fname, NULL);405 if (rc != EOK)406 goto error;407 408 rc = task_wait(&wait, &texit, &retval);409 if ((rc != EOK) || (texit != TASK_EXIT_NORMAL))410 goto error;411 412 /* Resume UI operation */413 rc = ui_resume(ui);414 if (rc != EOK)415 return rc;416 417 (void) ui_paint(ui_window_get_ui(panel->window));418 return EOK;419 error:420 (void) ui_resume(ui);421 (void) ui_paint(ui_window_get_ui(panel->window));422 return rc;423 }424 425 379 /** File list in panel requests activation. 426 380 * … … 446 400 panel_t *panel = (panel_t *)arg; 447 401 448 (void) panel_open_file(panel, fname); 402 if (panel->cb != NULL && panel->cb->file_open != NULL) 403 panel->cb->file_open(panel->cb_arg, panel, fname); 449 404 } 450 405
Note:
See TracChangeset
for help on using the changeset viewer.