mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use helper function to find xslt folder
This seems much better than the different hard coded and semi-hard coded paths we had before. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ae713763c7
commit
f8708e2921
3 changed files with 4 additions and 3 deletions
2
dive.h
2
dive.h
|
@ -611,6 +611,8 @@ extern void save_dive(FILE *f, struct dive *dive);
|
||||||
|
|
||||||
extern xsltStylesheetPtr get_stylesheet(const char *name);
|
extern xsltStylesheetPtr get_stylesheet(const char *name);
|
||||||
|
|
||||||
|
extern char *xslt_path;
|
||||||
|
|
||||||
extern timestamp_t utc_mktime(struct tm *tm);
|
extern timestamp_t utc_mktime(struct tm *tm);
|
||||||
extern void utc_mkdate(timestamp_t, struct tm *tm);
|
extern void utc_mkdate(timestamp_t, struct tm *tm);
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
int verbose;
|
int verbose;
|
||||||
|
|
||||||
static xmlDoc *test_xslt_transforms(xmlDoc *doc, char **error);
|
static xmlDoc *test_xslt_transforms(xmlDoc *doc, char **error);
|
||||||
|
char *xslt_path;
|
||||||
|
|
||||||
/* the dive table holds the overall dive list; target table points at
|
/* the dive table holds the overall dive list; target table points at
|
||||||
* the table we are currently filling */
|
* the table we are currently filling */
|
||||||
|
@ -1852,9 +1853,6 @@ void parse_xml_exit(void)
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Maybe we'll want a environment variable that can override this.. */
|
|
||||||
static const char *xslt_path = XSLT ":xslt:.";
|
|
||||||
|
|
||||||
static xsltStylesheetPtr try_get_stylesheet(const char *path, int len, const char *name)
|
static xsltStylesheetPtr try_get_stylesheet(const char *path, int len, const char *name)
|
||||||
{
|
{
|
||||||
xsltStylesheetPtr ret;
|
xsltStylesheetPtr ret;
|
||||||
|
|
|
@ -103,6 +103,7 @@ void init_ui(int *argcp, char ***argvp)
|
||||||
QCoreApplication::setOrganizationName("Subsurface");
|
QCoreApplication::setOrganizationName("Subsurface");
|
||||||
QCoreApplication::setOrganizationDomain("subsurface.hohndel.org");
|
QCoreApplication::setOrganizationDomain("subsurface.hohndel.org");
|
||||||
QCoreApplication::setApplicationName("Subsurface");
|
QCoreApplication::setApplicationName("Subsurface");
|
||||||
|
xslt_path = strdup(getSubsurfaceDataPath("xslt").toAscii().data());
|
||||||
|
|
||||||
QSettings s;
|
QSettings s;
|
||||||
s.beginGroup("GeneralSettings");
|
s.beginGroup("GeneralSettings");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue