Changes in uspace/app/nav/panel.c [b336bfd8:7cf5ddb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nav/panel.c
rb336bfd8 r7cf5ddb 1 1 /* 2 * Copyright (c) 202 5Jiri Svoboda2 * Copyright (c) 2023 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 Panel 384 * @param fname File name 385 * 386 * @return EOK on success or an error code 387 */ 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 379 425 /** File list in panel requests activation. 380 426 * … … 400 446 panel_t *panel = (panel_t *)arg; 401 447 402 if (panel->cb != NULL && panel->cb->file_open != NULL) 403 panel->cb->file_open(panel->cb_arg, panel, fname); 448 (void) panel_open_file(panel, fname); 404 449 } 405 450
Note:
See TracChangeset
for help on using the changeset viewer.