[gnome-sound-recorder] meson: don't add sources files as a dependency to the gresource



commit f3284607bfc9320204a13de18eaad0bf5a2a4f1e
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date:   Fri Jan 11 21:11:03 2019 +0100

    meson: don't add sources files as a dependency to the gresource
    
    This was causing issues when we build the app with the pkg.name set to the app-id
    By following what is already done on Weather, this can be fixed by not adding those files as a dependency

 .gitignore                                      |  4 ----
 data/meson.build                                |  1 -
 data/org.gnome.SoundRecorder.data.gresource.xml |  2 +-
 src/application.js                              | 15 +++++++--------
 src/meson.build                                 | 15 ---------------
 src/org.gnome.SoundRecorder.in                  |  2 +-
 6 files changed, 9 insertions(+), 30 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5773b23..31c8999 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,4 @@
-<<<<<<< HEAD
 _build
 **/*.swp
 **/*.*~
 **/tags.*
-=======
-_build/
->>>>>>> application: bundle the css file in gresources
diff --git a/data/meson.build b/data/meson.build
index 5d90c4f..fc0fedc 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -45,7 +45,6 @@ gnome.compile_resources(
   application_id + '.data',
   application_id + '.data.gresource.xml',
   gresource_bundle: true,
-  source_dir: '.',
   install_dir: sound_recoder_pkgdatadir,
   install: true
 )
diff --git a/data/org.gnome.SoundRecorder.data.gresource.xml b/data/org.gnome.SoundRecorder.data.gresource.xml
index 1112863..c0306b2 100644
--- a/data/org.gnome.SoundRecorder.data.gresource.xml
+++ b/data/org.gnome.SoundRecorder.data.gresource.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
-  <gresource prefix="/org/gnome/SoundRecorder/Application">
+  <gresource prefix="/org/gnome/SoundRecorder">
     <file>application.css</file>
   </gresource>
 </gresources>
diff --git a/src/application.js b/src/application.js
index f129467..981ac40 100644
--- a/src/application.js
+++ b/src/application.js
@@ -68,7 +68,7 @@ var Application = GObject.registerClass(class Application extends Gtk.Applicatio
         Gst.init(null);
         this._initAppMenu();
         application = this;
-        settings = new Gio.Settings({ schema: 'org.gnome.SoundRecorder' });
+        settings = new Gio.Settings({ schema: pkg.name });
         this.ensure_directory();
     }
 
@@ -139,17 +139,16 @@ var Application = GObject.registerClass(class Application extends Gtk.Applicatio
          settings.set_double("speaker-volume", level);
     }
 
-    _loadStyleSheet: function() {
-        var resource = 'resource:///org/gnome/SoundRecorder/Application/application.css';
-        var provider = new Gtk.CssProvider();
-        provider.load_from_resource(resource);
+    _loadStyleSheet() {
+        let provider = new Gtk.CssProvider();
+        provider.load_from_resource('resource:///org/gnome/SoundRecorder/application.css');
         Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),
                                                  provider,
                                                  Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
     },
 
-    _showAbout: function() {
-        var aboutDialog = new Gtk.AboutDialog();
+    _showAbout() {
+        let aboutDialog = new Gtk.AboutDialog();
         aboutDialog.artists = [ 'Reda Lazri <the red shortcut gmail com>',
                                 'Garrett LeSage <garrettl gmail com>',
                                 'Hylke Bons <hylkebons gmail com>',
@@ -160,7 +159,7 @@ var Application = GObject.registerClass(class Application extends Gtk.Applicatio
         aboutDialog.program_name = _("Sound Recorder");
         aboutDialog.copyright = 'Copyright ' + String.fromCharCode(0x00A9) + ' 2013' + 
String.fromCharCode(0x2013) + 'Meg Ford';
         aboutDialog.license_type = Gtk.License.GPL_2_0;
-        aboutDialog.logo_icon_name = 'org.gnome.SoundRecorder';
+        aboutDialog.logo_icon_name = pkg.name;
         aboutDialog.version = pkg.version;
         aboutDialog.website = 'https://wiki.gnome.org/Apps/SoundRecorder';
         aboutDialog.wrap_license = true;
diff --git a/src/meson.build b/src/meson.build
index 23b181b..395c6d2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,17 +1,3 @@
-sound_recorder_sources = files(
-  'application.js',
-  'audioProfile.js',
-  'fileUtil.js',
-  'info.js',
-  'listview.js',
-  'main.js',
-  'mainWindow.js',
-  'play.js',
-  'preferences.js',
-  'record.js',
-  'waveform.js',
-)
-
 app_conf = configuration_data()
 app_conf.set('prefix', sound_recorder_prefix)
 app_conf.set('libdir', sound_recorder_libdir)
@@ -31,7 +17,6 @@ gnome.compile_resources(
   application_id + '.src',
   'org.gnome.SoundRecorder.src.gresource.xml',
   source_dir: '.',
-  dependencies: sound_recorder_sources,
   gresource_bundle: true,
   install: true,
   install_dir: sound_recoder_pkgdatadir
diff --git a/src/org.gnome.SoundRecorder.in b/src/org.gnome.SoundRecorder.in
index f613b0d..b34882a 100755
--- a/src/org.gnome.SoundRecorder.in
+++ b/src/org.gnome.SoundRecorder.in
@@ -1,5 +1,5 @@
 #!@GJS@
-imports.package.init({ name: "@APPLICATON_ID@",
+imports.package.init({ name: "@APPLICATION_ID@",
                         version: "@PACKAGE_VERSION@",
                         prefix: "@prefix@",
                         libdir: "@libdir@" });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]