Changeset c3db721 in mainline for uspace/app/nav
- Timestamp:
- 2025-10-10T20:35:05Z (3 months ago)
- Branches:
- master
- Children:
- c1383cd
- Parents:
- 0cf3d5f
- Location:
- uspace/app/nav
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nav/nav.c
r0cf3d5f rc3db721 79 79 .activate_req = navigator_panel_activate_req, 80 80 .file_open = navigator_panel_file_open 81 }; 82 83 static void navigator_progress_babort(progress_dlg_t *, void *); 84 static void navigator_progress_close(progress_dlg_t *, void *); 85 86 progress_dlg_cb_t navigator_progress_cb = { 87 .babort = navigator_progress_babort, 88 .close = navigator_progress_close 81 89 }; 82 90 … … 596 604 } 597 605 606 /** Abort button pressed in progress dialog. 607 * 608 * @param dlg Progress dialog 609 * @param arg Argument (navigator_t *) 610 */ 611 static void navigator_progress_babort(progress_dlg_t *dlg, void *arg) 612 { 613 navigator_t *nav = (navigator_t *)arg; 614 615 (void)dlg; 616 nav->abort_op = true; 617 } 618 619 /** Progress dialog closed, 620 * 621 * @param dlg Progress dialog 622 * @param arg Argument (navigator_t *) 623 */ 624 static void navigator_progress_close(progress_dlg_t *dlg, void *arg) 625 { 626 navigator_t *nav = (navigator_t *)arg; 627 628 (void)dlg; 629 nav->abort_op = true; 630 } 631 598 632 /** @} 599 633 */ -
uspace/app/nav/nav.h
r0cf3d5f rc3db721 38 38 39 39 #include <errno.h> 40 #include "types/dlg/progress.h" 40 41 #include "types/nav.h" 41 42 #include "types/panel.h" 43 44 extern progress_dlg_cb_t navigator_progress_cb; 42 45 43 46 extern errno_t navigator_create(const char *, navigator_t **); -
uspace/app/nav/newfile.c
r0cf3d5f rc3db721 64 64 }; 65 65 66 static bool new_file_abort_query(void *); 66 67 static void new_file_progress(void *, fmgt_progress_t *); 67 68 68 69 static fmgt_cb_t new_file_fmgt_cb = { 69 .progress = new_file_progress 70 .abort_query = new_file_abort_query, 71 .progress = new_file_progress, 70 72 }; 71 73 … … 124 126 return; 125 127 error: 128 fmgt_destroy(fmgt); 126 129 ui_lock(nav->ui); 127 130 progress_dlg_destroy(nav->progress_dlg); 131 navigator_refresh_panels(nav); 128 132 ui_msg_dialog_params_init(¶ms); 129 133 params.caption = "Error"; … … 192 196 } 193 197 198 progress_dlg_set_cb(nav->progress_dlg, &navigator_progress_cb, 199 (void *)nav); 200 194 201 rc = navigator_worker_start(nav, new_file_wfunc, (void *)job); 195 202 if (rc != EOK) { … … 231 238 } 232 239 240 /** New file abort query. 241 * 242 * @param arg Argument (navigator_t *) 243 * @return @c true iff abort is requested 244 */ 245 static bool new_file_abort_query(void *arg) 246 { 247 navigator_t *nav = (navigator_t *)arg; 248 249 return nav->abort_op; 250 } 251 233 252 /** New file progress update. 234 253 * -
uspace/app/nav/types/nav.h
r0cf3d5f rc3db721 38 38 39 39 #include <fibril.h> 40 #include <stdbool.h> 40 41 #include <ui/fixed.h> 41 42 #include <ui/ui.h> … … 62 63 /** Worker fibril ID */ 63 64 fid_t worker_fid; 65 /** Abort current file management operation */ 66 bool abort_op; 64 67 } navigator_t; 65 68
Note:
See TracChangeset
for help on using the changeset viewer.
