unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 599a33c45895da44e5a60b1b4860414bad5a2d7e 745 bytes (raw)
name: patches/tuxpaint-stamps-path.patch 	 # note: path name is non-authoritative(*)

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

debug log:

solving 599a33c45895da44e5a60b1b4860414bad5a2d7e ...
found 599a33c45895da44e5a60b1b4860414bad5a2d7e in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).