diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-27 09:00:57 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-27 09:00:57 (EDT) |
commit | 383611ae82a60da4a2b2d890c45a1630b9e1b0ff (patch) | |
tree | 7541b9c8c993b1093600f783be6e4032fcd871b8 /src | |
parent | 3db7f3d7aaff648fcc816cd425da4c5674fbd1c5 (diff) | |
download | marquee-383611ae82a60da4a2b2d890c45a1630b9e1b0ff.zip marquee-383611ae82a60da4a2b2d890c45a1630b9e1b0ff.tar.gz marquee-383611ae82a60da4a2b2d890c45a1630b9e1b0ff.tar.bz2 |
mq_application_new(): Set resources directory
Diffstat (limited to 'src')
-rw-r--r-- | src/application.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/application.c b/src/application.c index e926e6f..b372d23 100644 --- a/src/application.c +++ b/src/application.c @@ -19,6 +19,10 @@ * along with Marquee. If not, see <http://www.gnu.org/licenses/>. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "application.h" #include <stdlib.h> @@ -36,6 +40,7 @@ struct MqApplication { MqConfig *config; WebKitSettings *settings; gboolean marquee_mode; + gchar *resources_dir; }; static void @@ -71,6 +76,14 @@ mq_application_new(gchar G_GNUC_UNUSED *profile, gboolean G_GNUC_UNUSED private) application->windows = NULL; application->marquee_mode = FALSE; +#if defined(RUN_IN_PLACE) && RUN_IN_PLACE + application->resources_dir = g_build_filename(ABS_TOP_BUILDDIR, + "data", "resources", NULL); +#else + application->resources_dir = g_build_filename(PKGDATADIR, "resources", + NULL); +#endif + set_webkit_settings(application); return application; |