From ce0b31d87db3c4c1c1bfb535c50770d33e9c4aaf Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Mon, 10 Dec 2018 12:04:55 -0600 Subject: [PATCH] Shortcuts, Fix FS#13151 Deleting shortcut removes name, icon, talkclip FS#13151 - Deleting item from shortcut menu corrupts the menu's display The function that writes shortcut.txt didn't write existing name, icon or talkclip items Change-Id: I4418700c82f91522b2dd8a975548d7bd91f150d3 Now: writes all three supplying default values if the items don't exist --- apps/shortcuts.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/shortcuts.c b/apps/shortcuts.c index 9abd82af2f..a0b6327e54 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c @@ -235,6 +235,12 @@ static void shortcuts_ata_idle_callback(void) write(fd, sc->u.setting->cfg_name, strlen(sc->u.setting->cfg_name)); else write(fd, sc->u.path, strlen(sc->u.path)); + + /* write name:, icon:, talkclip: */ + len = snprintf(buf, MAX_PATH, "\nname: %s\nicon: %d\ntalkclip: ", + sc->name, sc->icon); + write(fd, buf, len); + write(fd, sc->talk_clip, strlen(sc->talk_clip)); write(fd, "\n\n", 2); } close(fd);