summaryrefslogtreecommitdiff
path: root/src/gmutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmutil.c')
-rw-r--r--src/gmutil.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gmutil.c b/src/gmutil.c
index 0573aac1..9188091d 100644
--- a/src/gmutil.c
+++ b/src/gmutil.c
@@ -23,6 +23,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
23#include "gmutil.h" 23#include "gmutil.h"
24#include "fontpack.h" 24#include "fontpack.h"
25#include "lang.h" 25#include "lang.h"
26#include "sitespec.h"
26#include "ui/color.h" 27#include "ui/color.h"
27 28
28#include <the_Foundation/file.h> 29#include <the_Foundation/file.h>
@@ -279,6 +280,19 @@ const iBlock *urlThemeSeed_String(const iString *url) {
279 return collect_Block(newRange_Block(user)); 280 return collect_Block(newRange_Block(user));
280} 281}
281 282
283const iBlock *urlPaletteSeed_String(const iString *url) {
284 if (equalCase_Rangecc(urlScheme_String(url), "file")) {
285 return urlThemeSeed_String(url);
286 }
287 /* Check for a site-specific setting. */
288 const iString *seed =
289 valueString_SiteSpec(collectNewRange_String(urlRoot_String(url)), paletteSeed_SiteSpecKey);
290 if (!isEmpty_String(seed)) {
291 return utf8_String(seed);
292 }
293 return urlThemeSeed_String(url);
294}
295
282static iBool isAbsolutePath_(iRangecc path) { 296static iBool isAbsolutePath_(iRangecc path) {
283 return isAbsolute_Path(collect_String(urlDecode_String(collect_String(newRange_String(path))))); 297 return isAbsolute_Path(collect_String(urlDecode_String(collect_String(newRange_String(path)))));
284} 298}