Changeset 8a43f01 in mainline for uspace/lib/tbarcfg/src/tbarcfg.c
- Timestamp:
- 2023-11-25T19:02:24Z (14 months ago)
- Branches:
- master, topic/simplify-dev-export
- Children:
- 84d29a2
- Parents:
- 69935a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/tbarcfg/src/tbarcfg.c
r69935a8 r8a43f01 101 101 } 102 102 103 rc = smenu_entry_ create(tbcfg, nentry, caption, cmd);103 rc = smenu_entry_new(tbcfg, nentry, caption, cmd); 104 104 if (rc != EOK) 105 105 goto error; … … 124 124 void tbarcfg_close(tbarcfg_t *tbcfg) 125 125 { 126 smenu_entry_t *entry; 127 128 entry = tbarcfg_smenu_first(tbcfg); 129 while (entry != NULL) { 130 smenu_entry_delete(entry); 131 entry = tbarcfg_smenu_first(tbcfg); 132 } 133 126 134 (void)sif_close(tbcfg->repo); 135 free(tbcfg); 127 136 } 128 137 … … 255 264 } 256 265 257 /** Create a start menu entry and append it to the start menu (internal).266 /** Allocate a start menu entry and append it to the start menu (internal). 258 267 * 259 268 * This only creates the entry in memory, but does not update the repository. … … 264 273 * @param cmd Command to run 265 274 */ 266 errno_t smenu_entry_ create(tbarcfg_t *smenu, sif_node_t *nentry,275 errno_t smenu_entry_new(tbarcfg_t *smenu, sif_node_t *nentry, 267 276 const char *caption, const char *cmd) 268 277 { … … 305 314 } 306 315 316 /** Delete start menu entry. 317 * 318 * This only deletes the entry from, but does not update the 319 * repository. 320 * 321 * @param entry Start menu entry 322 */ 323 void smenu_entry_delete(smenu_entry_t *entry) 324 { 325 list_remove(&entry->lentries); 326 free(entry->caption); 327 free(entry->cmd); 328 free(entry); 329 } 330 307 331 /** @} 308 332 */
Note:
See TracChangeset
for help on using the changeset viewer.