Changeset b279899 in mainline for uspace/app


Ignore:
Timestamp:
2023-10-17T12:18:10Z (2 years 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.

Location:
uspace/app/taskbar
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/taskbar/meson.build

    r4030072 rb279899  
    2727#
    2828
    29 deps = [ 'startmenu', 'ui', 'wndmgt' ]
     29deps = [ 'tbarcfg', 'ui', 'wndmgt' ]
    3030src = files(
    3131        'clock.c',
     
    4949
    5050if install_nonessential_data
    51         installed_data += { 'name': 'startmenu.sif', 'dir': '/cfg' }
     51        installed_data += { 'name': 'taskbar.sif', 'dir': '/cfg' }
    5252endif
  • uspace/app/taskbar/taskbar.c

    r4030072 rb279899  
    201201        }
    202202
    203         rc = tbsmenu_load(taskbar->tbsmenu, "/cfg/startmenu.sif");
     203        rc = tbsmenu_load(taskbar->tbsmenu, "/cfg/taskbar.sif");
    204204        if (rc != EOK) {
    205205                printf("Error loading start menu from '%s'.\n",
    206                     "/cfg/startmenu.sif");
     206                    "/cfg/taskbar.sif");
    207207                goto error;
    208208        }
  • 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.