Changeset 5e758e4 in mainline for uspace/app


Ignore:
Timestamp:
2023-11-19T12:22:11Z (23 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, topic/simplify-dev-export
Children:
69935a8
Parents:
e8a6279f
Message:

When start menu entry is edited, editor list needs updating

We need to update the entry caption in the UI list to reflect
any changes made while the entry was being edited.

Location:
uspace/app/taskbar-cfg
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskbar-cfg/smeedit.c

    re8a6279f r5e758e4  
    4141#include "taskbar-cfg.h"
    4242#include "smeedit.h"
     43#include "startmenu.h"
    4344
    4445static void wnd_close(ui_window_t *, void *);
     
    111112        }
    112113
     114        smee->startmenu = smenu;
    113115        smee->smentry = smentry;
    114116
     
    361363
    362364        (void)smenu_entry_save(smee->smentry->entry);
    363 
     365        startmenu_entry_update(smee->smentry);
    364366        smeedit_destroy(smee);
    365367}
  • uspace/app/taskbar-cfg/startmenu.c

    re8a6279f r5e758e4  
    398398}
    399399
     400/** Update start menu entry caption.
     401 *
     402 * When editing an entry the entry's label might change. We need
     403 * to update the list entry caption to reflect that.
     404 *
     405 * @param entry Start menu entry
     406 */
     407errno_t startmenu_entry_update(startmenu_entry_t *entry)
     408{
     409        return ui_list_entry_set_caption(entry->lentry,
     410            smenu_entry_get_caption(entry->entry));
     411}
     412
    400413/** Entry in entry list is selected.
    401414 *
  • uspace/app/taskbar-cfg/startmenu.h

    re8a6279f r5e758e4  
    4848extern startmenu_entry_t *startmenu_get_selected(startmenu_t *);
    4949extern void startmenu_edit(startmenu_t *);
     50extern errno_t startmenu_entry_update(startmenu_entry_t *);
    5051
    5152#endif
Note: See TracChangeset for help on using the changeset viewer.