gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / tuxpaint-stamps-path.patch
1 --- tuxpaint-0.9.22/src/tuxpaint.c
2 +++ tuxpaint-0.9.22/src/tuxpaint.c
3 @@ -7474,11 +7474,21 @@
4 static void load_stamps(SDL_Surface * screen)
5 {
6 char *homedirdir = get_fname("stamps", DIR_DATA);
7 + char *stamps_path = getenv("TUXPAINT_STAMPS_PATH");
8
9 default_stamp_size = compute_default_scale_factor(1.0);
10
11 load_stamp_dir(screen, homedirdir);
12 load_stamp_dir(screen, DATA_PREFIX "stamps");
13 + /* Load any stamps in TUXPAINT_STAMPS_PATH */
14 + if (stamps_path) {
15 + char *token;
16 + token = strtok(stamps_path, ":");
17 + while (token != NULL) {
18 + load_stamp_dir(screen, token);
19 + token = strtok(NULL, ":");
20 + }
21 + }
22 #ifdef __APPLE__
23 load_stamp_dir(screen, "/Library/Application Support/TuxPaint/stamps");
24 #endif