[gnome-sound-recorder/resources] application: fix issues related to bundling css into gresource
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder/resources] application: fix issues related to bundling css into gresource
- Date: Thu, 2 May 2019 21:58:37 +0000 (UTC)
commit f1420b9e53b9db702c88980daca7c02373117b2f
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Thu May 2 23:57:59 2019 +0200
application: fix issues related to bundling css into gresource
those issues were introduced in !16
- the pkgdatadir should use app-id = pkg.name
- Fix loading gresource
data/meson.build | 2 +-
meson.build | 2 +-
src/application.js | 5 +++--
src/meson.build | 5 +++--
4 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index fc0fedc..abee44d 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -45,7 +45,7 @@ gnome.compile_resources(
application_id + '.data',
application_id + '.data.gresource.xml',
gresource_bundle: true,
- install_dir: sound_recoder_pkgdatadir,
+ install_dir: sound_recorder_pkgdatadir,
install: true
)
diff --git a/meson.build b/meson.build
index 4f2dfbc..31e284c 100644
--- a/meson.build
+++ b/meson.build
@@ -11,7 +11,7 @@ sound_recorder_prefix = get_option('prefix')
sound_recorder_bindir = join_paths(sound_recorder_prefix, get_option('bindir'))
sound_recorder_libdir = join_paths(sound_recorder_prefix, get_option('libdir'))
sound_recorder_datadir = join_paths(sound_recorder_prefix, get_option('datadir'))
-sound_recoder_pkgdatadir = join_paths(sound_recorder_datadir, meson.project_name())
+sound_recorder_pkgdatadir = join_paths(sound_recorder_datadir, application_id)
sound_recorder_schemadir = join_paths(sound_recorder_datadir, 'glib-2.0', 'schemas')
diff --git a/src/application.js b/src/application.js
index 981ac40..587bb1d 100644
--- a/src/application.js
+++ b/src/application.js
@@ -23,6 +23,7 @@ const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const Gst = imports.gi.Gst;
const Gtk = imports.gi.Gtk;
+const Gdk = imports.gi.Gdk;
const MainWindow = imports.mainWindow;
const Preferences = imports.preferences;
@@ -141,11 +142,11 @@ var Application = GObject.registerClass(class Application extends Gtk.Applicatio
_loadStyleSheet() {
let provider = new Gtk.CssProvider();
- provider.load_from_resource('resource:///org/gnome/SoundRecorder/application.css');
+ provider.load_from_resource('/org/gnome/SoundRecorder/application.css');
Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),
provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
- },
+ }
_showAbout() {
let aboutDialog = new Gtk.AboutDialog();
diff --git a/src/meson.build b/src/meson.build
index 395c6d2..e7431dd 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,6 +1,7 @@
app_conf = configuration_data()
app_conf.set('prefix', sound_recorder_prefix)
app_conf.set('libdir', sound_recorder_libdir)
+app_conf.set('pkgdatadir', sound_recorder_pkgdatadir)
app_conf.set('PACKAGE_VERSION', meson.project_version())
app_conf.set('GJS', gjs_console)
app_conf.set('APPLICATION_ID', application_id)
@@ -9,7 +10,7 @@ configure_file(
input: 'org.gnome.SoundRecorder.in',
output: application_id,
install: true,
- install_dir: sound_recoder_pkgdatadir,
+ install_dir: sound_recorder_pkgdatadir,
configuration: app_conf
)
@@ -19,5 +20,5 @@ gnome.compile_resources(
source_dir: '.',
gresource_bundle: true,
install: true,
- install_dir: sound_recoder_pkgdatadir
+ install_dir: sound_recorder_pkgdatadir
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]