4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@ecs.soton.ac.uk>.
8 /* apps.c - code for handling application directories */
14 #include "gui_support.h"
17 /* An application has been double-clicked (or run in some other way) */
18 void run_app(char *path
)
21 char *argv
[] = {NULL
, NULL
};
23 apprun
= g_string_new(path
);
24 argv
[0] = g_string_append(apprun
, "/AppRun")->str
;
26 if (!spawn_full(argv
, getenv("HOME"), 0))
27 report_error("ROX-Filer", "Failed to fork() child process");
29 g_string_free(apprun
, TRUE
);
32 void app_show_help(char *path
)
37 help_dir
= g_strconcat(path
, "/Help", NULL
);
39 if (stat(help_dir
, &info
))
40 report_error("Application",
41 "This is an application directory - you can "
42 "run it as a program, or open it (hold down "
43 "Shift while you open it). Most applications provide "
44 "their own help here, but this one doesn't.");
46 filer_opendir(help_dir
, FALSE
, BOTTOM
);