Changeset 2309891 in mainline for uspace/app/nav/menu.c


Ignore:
Timestamp:
2025-12-14T17:15:57Z (2 days ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
Children:
79b77ce
Parents:
144fafd
Message:

Copy files (Navigator and command line).

TODO Overwrite query, new I/O error types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/nav/menu.c

    r144fafd r2309891  
    5858        ui_menu_entry_t *medit;
    5959        ui_menu_entry_t *mverify;
     60        ui_menu_entry_t *mcopy;
    6061        ui_menu_entry_t *mfsep;
    6162        ui_menu_entry_t *mexit;
     
    104105        ui_menu_entry_set_cb(mverify, nav_menu_file_verify, (void *) menu);
    105106
     107        rc = ui_menu_entry_create(mfile, "~C~opy", "Ctrl-C", &mcopy);
     108        if (rc != EOK)
     109                goto error;
     110
     111        ui_menu_entry_set_cb(mcopy, nav_menu_file_copy, (void *) menu);
     112
    106113        rc = ui_menu_entry_sep_create(mfile, &mfsep);
    107114        if (rc != EOK)
     
    214221}
    215222
     223/** File / Copy menu entry selected.
     224 *
     225 * @param mentry Menu entry
     226 * @param arg Argument (navigator_t *)
     227 */
     228void nav_menu_file_copy(ui_menu_entry_t *mentry, void *arg)
     229{
     230        nav_menu_t *menu = (nav_menu_t *)arg;
     231
     232        if (menu->cb != NULL && menu->cb->file_copy != NULL)
     233                menu->cb->file_copy(menu->cb_arg);
     234}
     235
    216236/** File / Exit menu entry selected.
    217237 *
Note: See TracChangeset for help on using the changeset viewer.