Changeset 5e758e4 in mainline for uspace/lib/ui/src/list.c


Ignore:
Timestamp:
2023-11-19T12:22:11Z (7 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/list.c

    re8a6279f r5e758e4  
    800800}
    801801
     802/** Change list entry caption.
     803 *
     804 * @param entry UI list entry
     805 * @param caption New caption
     806 *
     807 * @return EOK on success, ENOMEM if out of memory
     808 */
     809errno_t ui_list_entry_set_caption(ui_list_entry_t *entry, const char *caption)
     810{
     811        char *dcaption;
     812
     813        dcaption = str_dup(caption);
     814        if (dcaption == NULL)
     815                return ENOMEM;
     816
     817        free(entry->caption);
     818        entry->caption = dcaption;
     819
     820        (void)ui_list_entry_paint(entry, ui_list_entry_get_idx(entry));
     821        return EOK;
     822}
     823
    802824/** Clear UI list entry list.
    803825 *
Note: See TracChangeset for help on using the changeset viewer.