Changeset c88d7f99 in mainline for uspace/app/uidemo/uidemo.c


Ignore:
Timestamp:
2022-03-10T17:44:35Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c38ab6c
Parents:
96c6a00
Message:

Menu entry accelerators

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/uidemo/uidemo.c

    r96c6a00 rc88d7f99  
    11/*
    2  * Copyright (c) 2021 Jiri Svoboda
     2 * Copyright (c) 2022 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    545545        }
    546546
    547         rc = ui_menu_entry_create(demo.mfile, "Message", "", &mmsg);
     547        rc = ui_menu_entry_create(demo.mfile, "~M~essage", "", &mmsg);
    548548        if (rc != EOK) {
    549549                printf("Error creating menu.\n");
     
    553553        ui_menu_entry_set_cb(mmsg, uidemo_file_message, (void *) &demo);
    554554
    555         rc = ui_menu_entry_create(demo.mfile, "Load", "", &mload);
     555        rc = ui_menu_entry_create(demo.mfile, "~L~oad", "", &mload);
    556556        if (rc != EOK) {
    557557                printf("Error creating menu.\n");
     
    561561        ui_menu_entry_set_cb(mload, uidemo_file_load, (void *) &demo);
    562562
    563         rc = ui_menu_entry_create(demo.mfile, "Foo", "Ctrl-Alt-Del", &mfoo);
    564         if (rc != EOK) {
    565                 printf("Error creating menu.\n");
    566                 return rc;
    567         }
    568 
    569         rc = ui_menu_entry_create(demo.mfile, "Bar", "", &mbar);
    570         if (rc != EOK) {
    571                 printf("Error creating menu.\n");
    572                 return rc;
    573         }
    574 
    575         rc = ui_menu_entry_create(demo.mfile, "Foobar", "", &mfoobar);
     563        rc = ui_menu_entry_create(demo.mfile, "~F~oo", "Ctrl-Alt-Del", &mfoo);
     564        if (rc != EOK) {
     565                printf("Error creating menu.\n");
     566                return rc;
     567        }
     568
     569        rc = ui_menu_entry_create(demo.mfile, "~B~ar", "", &mbar);
     570        if (rc != EOK) {
     571                printf("Error creating menu.\n");
     572                return rc;
     573        }
     574
     575        rc = ui_menu_entry_create(demo.mfile, "F~o~obar", "", &mfoobar);
    576576        if (rc != EOK) {
    577577                printf("Error creating menu.\n");
     
    585585        }
    586586
    587         rc = ui_menu_entry_create(demo.mfile, "Exit", "Alt-F4", &mexit);
     587        rc = ui_menu_entry_create(demo.mfile, "E~x~it", "Alt-F4", &mexit);
    588588        if (rc != EOK) {
    589589                printf("Error creating menu.\n");
     
    599599        }
    600600
    601         rc = ui_menu_entry_create(demo.medit, "Modify", "", &mmodify);
     601        rc = ui_menu_entry_create(demo.medit, "~M~odify", "", &mmodify);
    602602        if (rc != EOK) {
    603603                printf("Error creating menu.\n");
     
    619619        }
    620620
    621         rc = ui_menu_entry_create(demo.mhelp, "About", "Ctrl-H, F1", &mabout);
     621        rc = ui_menu_entry_create(demo.mhelp, "~A~bout", "Ctrl-H, F1", &mabout);
    622622        if (rc != EOK) {
    623623                printf("Error creating menu.\n");
Note: See TracChangeset for help on using the changeset viewer.