Changeset 550ed86 in mainline for uspace/lib/tbarcfg/src/tbarcfg.c


Ignore:
Timestamp:
2023-12-19T17:25:58Z (5 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, topic/simplify-dev-export
Children:
7130754
Parents:
f87ff8e
git-author:
Jiri Svoboda <jiri@…> (2023-12-19 17:19:18)
git-committer:
Jiri Svoboda <jiri@…> (2023-12-19 17:25:58)
Message:

Need to add new start menu entry to editor's list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/tbarcfg/src/tbarcfg.c

    rf87ff8e r550ed86  
    154154                }
    155155
    156                 rc = smenu_entry_new(tbcfg, nentry, caption, cmd);
     156                rc = smenu_entry_new(tbcfg, nentry, caption, cmd, NULL);
    157157                if (rc != EOK)
    158158                        goto error;
     
    325325 * @param caption Caption
    326326 * @param cmd Command to run
     327 * @param rentry Place to store pointer to new entry or @c NULL
    327328 */
    328329errno_t smenu_entry_new(tbarcfg_t *smenu, sif_node_t *nentry,
    329     const char *caption, const char *cmd)
     330    const char *caption, const char *cmd, smenu_entry_t **rentry)
    330331{
    331332        smenu_entry_t *entry;
     
    354355        entry->smenu = smenu;
    355356        list_append(&entry->lentries, &smenu->entries);
     357        if (rentry != NULL)
     358                *rentry = entry;
    356359        return EOK;
    357360error:
     
    388391 * @param caption Caption
    389392 * @param cmd Command to run
     393 * @param rentry Place to store pointer to new entry or @c NULL
    390394 */
    391395errno_t smenu_entry_create(tbarcfg_t *smenu, const char *caption,
    392     const char *cmd)
     396    const char *cmd, smenu_entry_t **rentry)
    393397{
    394398        sif_node_t *nentry;
     399        smenu_entry_t *entry;
    395400        errno_t rc;
    396401        sif_trans_t *trans = NULL;
     
    413418                goto error;
    414419
    415         rc = smenu_entry_new(smenu, nentry, caption, cmd);
     420        rc = smenu_entry_new(smenu, nentry, caption, cmd, &entry);
    416421        if (rc != EOK)
    417422                goto error;
     
    421426                goto error;
    422427
     428        if (rentry != NULL)
     429                *rentry = entry;
    423430        return EOK;
    424431error:
Note: See TracChangeset for help on using the changeset viewer.