Changeset 550ed86 in mainline for uspace/app


Ignore:
Timestamp:
2023-12-19T17:25:58Z (22 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

Location:
uspace/app/taskbar-cfg
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskbar-cfg/smeedit.c

    rf87ff8e r550ed86  
    116116
    117117        ui_wnd_params_init(&params);
    118         params.caption = smentry != NULL ? "Edit Start Menu Entry"
    119             : "Create Start Menu Entry";
     118        params.caption = smentry != NULL ? "Edit Start Menu Entry" :
     119            "Create Start Menu Entry";
    120120        if (ui_is_textmode(ui)) {
    121121                params.rect.p0.x = 0;
     
    345345{
    346346        smeedit_t *smee;
     347        smenu_entry_t *entry;
     348        startmenu_entry_t *smentry;
    347349        const char *cmd;
    348350        const char *caption;
     
    358360                /* Create new entry */
    359361                rc = smenu_entry_create(smee->startmenu->tbarcfg->tbarcfg,
    360                     caption, cmd);
     362                    caption, cmd, &entry);
    361363                if (rc != EOK)
    362364                        return;
     365
     366                rc = startmenu_insert(smee->startmenu, entry, &smentry);
     367                if (rc != EOK)
     368                        return;
     369
     370                startmenu_repaint(smee->startmenu);
    363371        } else {
    364372                /* Edit existing entry */
    365 
    366 
    367373                rc = smenu_entry_set_cmd(smee->smentry->entry, cmd);
    368374                if (rc != EOK)
  • uspace/app/taskbar-cfg/startmenu.c

    rf87ff8e r550ed86  
    429429}
    430430
     431/** Repaint start menu entry list.
     432 *
     433 * When editing an entry the entry's label might change. We need
     434 * to update the list entry caption to reflect that.
     435 *
     436 * @param smenu Start menu
     437 */
     438void startmenu_repaint(startmenu_t *smenu)
     439{
     440        (void) ui_control_paint(ui_list_ctl(smenu->entries_list));
     441}
     442
    431443/** Entry in entry list is selected.
    432444 *
  • uspace/app/taskbar-cfg/startmenu.h

    rf87ff8e r550ed86  
    5050extern void startmenu_edit(startmenu_t *);
    5151extern errno_t startmenu_entry_update(startmenu_entry_t *);
     52extern void startmenu_repaint(startmenu_t *);
    5253
    5354#endif
Note: See TracChangeset for help on using the changeset viewer.