Changeset 0d6d527 in mainline


Ignore:
Timestamp:
2020-11-21T20:07:34Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4f64b7b8
Parents:
68698ba
Message:

Put GFX demo in launcher instead of launcher

Don't really need to launch another launcher

File:
1 edited

Legend:

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

    r68698ba r0d6d527  
    7070};
    7171
    72 static int app_launch(const char *);
     72static int app_launch(const char *, const char *);
    7373
    7474/** Window close button was clicked.
     
    9494
    9595        if (pbutton == launcher->pb1) {
    96                 app_launch("/app/terminal");
     96                app_launch("/app/terminal", NULL);
    9797        } else if (pbutton == launcher->pb2) {
    98                 app_launch("/app/calculator");
     98                app_launch("/app/calculator", NULL);
    9999        } else if (pbutton == launcher->pb3) {
    100                 app_launch("/app/uidemo");
     100                app_launch("/app/uidemo", NULL);
    101101        } else if (pbutton == launcher->pb4) {
    102                 app_launch("/app/launcher");
    103         }
    104 }
    105 
    106 static int app_launch(const char *app)
     102                app_launch("/app/gfxdemo", "ui");
     103        }
     104}
     105
     106static int app_launch(const char *app, const char *arg)
    107107{
    108108        errno_t rc;
     
    112112        if (display_spec != UI_DISPLAY_DEFAULT) {
    113113                printf("%s: Spawning %s -d %s\n", NAME, app, display_spec);
    114                 rc = task_spawnl(&id, &wait, app, app, "-d", display_spec, NULL);
     114                rc = task_spawnl(&id, &wait, app, app, "-d", display_spec,
     115                    arg, NULL);
    115116        } else {
    116117                printf("%s: Spawning %s\n", NAME, app);
    117                 rc = task_spawnl(&id, &wait, app, app, NULL);
     118                rc = task_spawnl(&id, &wait, app, app, arg, NULL);
    118119        }
    119120
     
    316317        }
    317318
    318         rc = ui_pbutton_create(ui_res, "Launcher", &launcher.pb4);
     319        rc = ui_pbutton_create(ui_res, "GFX Demo", &launcher.pb4);
    319320        if (rc != EOK) {
    320321                printf("Error creating button.\n");
Note: See TracChangeset for help on using the changeset viewer.