Changeset b279899 in mainline for uspace/app/taskbar/tbsmenu.c


Ignore:
Timestamp:
2023-10-17T12:18:10Z (21 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d4643db
Parents:
4030072
git-author:
Jiri Svoboda <jiri@…> (2023-10-16 18:17:59)
git-committer:
Jiri Svoboda <jiri@…> (2023-10-17 12:18:10)
Message:

Rename startmenu library to tbarcfg

There may be other aspects of task bar that will need configuring
so let's widen the scope of the library a bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskbar/tbsmenu.c

    r4030072 rb279899  
    3434
    3535#include <gfx/coord.h>
    36 #include <startmenu/startmenu.h>
    3736#include <stdbool.h>
    3837#include <stddef.h>
     
    4039#include <str.h>
    4140#include <task.h>
     41#include <tbarcfg/tbarcfg.h>
    4242#include <ui/fixed.h>
    4343#include <ui/menu.h>
     
    127127{
    128128        tbsmenu_entry_t *tentry;
    129         startmenu_t *smenu = NULL;
    130         startmenu_entry_t *sme;
     129        tbarcfg_t *tbcfg = NULL;
     130        smenu_entry_t *sme;
    131131        const char *caption;
    132132        const char *cmd;
    133133        errno_t rc;
    134134
    135         rc = startmenu_open(repopath, &smenu);
    136         if (rc != EOK)
    137                 goto error;
    138 
    139         sme = startmenu_first(smenu);
     135        rc = tbarcfg_open(repopath, &tbcfg);
     136        if (rc != EOK)
     137                goto error;
     138
     139        sme = tbarcfg_smenu_first(tbcfg);
    140140        while (sme != NULL) {
    141                 caption = startmenu_entry_get_caption(sme);
    142                 cmd = startmenu_entry_get_cmd(sme);
     141                caption = smenu_entry_get_caption(sme);
     142                cmd = smenu_entry_get_cmd(sme);
    143143
    144144                rc = tbsmenu_add(tbsmenu, caption, cmd, &tentry);
     
    148148                (void)tentry;
    149149
    150                 sme = startmenu_next(sme);
    151         }
    152 
    153         startmenu_close(smenu);
     150                sme = tbarcfg_smenu_next(sme);
     151        }
     152
     153        tbarcfg_close(tbcfg);
    154154        return EOK;
    155155error:
    156         if (smenu != NULL)
    157                 startmenu_close(smenu);
     156        if (tbcfg != NULL)
     157                tbarcfg_close(tbcfg);
    158158        return rc;
    159159}
Note: See TracChangeset for help on using the changeset viewer.