[nautilus/wip/hadess/audio-video-properties: 3/3] Make it build



commit ccf95ca783179a48645cb3b2983931d72f3cfea0
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Feb 11 13:42:21 2019 +0100

    Make it build

 .../bacon-video-widget-properties.c                |  4 +--
 extensions/audio-video-properties/meson.build      | 42 ++++++++++++----------
 .../nautilus-audio-video-properties.gresource.xml  |  6 ++++
 .../{ => resources/ui}/properties.ui               |  0
 .../audio-video-properties/test-properties-page.c  |  2 +-
 .../audio-video-properties/totem-properties-main.c |  7 ++--
 extensions/meson.build                             |  1 +
 meson.build                                        |  2 ++
 8 files changed, 37 insertions(+), 27 deletions(-)
---
diff --git a/extensions/audio-video-properties/bacon-video-widget-properties.c 
b/extensions/audio-video-properties/bacon-video-widget-properties.c
index 188445624..d5621b676 100644
--- a/extensions/audio-video-properties/bacon-video-widget-properties.c
+++ b/extensions/audio-video-properties/bacon-video-widget-properties.c
@@ -26,8 +26,6 @@
 #include <glib/gi18n-lib.h>
 #include <string.h>
 
-#include "totem-interface.h"
-
 #include "bacon-video-widget-properties.h"
 
 static void bacon_video_widget_properties_dispose (GObject *object);
@@ -258,7 +256,7 @@ bacon_video_widget_properties_new (void)
 
        xml = gtk_builder_new ();
        gtk_builder_set_translation_domain (xml, GETTEXT_PACKAGE);
-       if (gtk_builder_add_from_file (xml, DATADIR"/properties.ui", NULL) == 0) {
+       if (gtk_builder_add_from_resource (xml, 
"/org/gnome/nautilus/audio-video-properties/ui/properties.ui", NULL) == 0) {
                g_object_unref (xml);
                return NULL;
        }
diff --git a/extensions/audio-video-properties/meson.build b/extensions/audio-video-properties/meson.build
index 9116a3bde..4ac5cd87d 100644
--- a/extensions/audio-video-properties/meson.build
+++ b/extensions/audio-video-properties/meson.build
@@ -1,42 +1,48 @@
+resources = gnome.compile_resources(
+  'nautilus-audio-video-properties-resources',
+  join_paths(
+    'resources', 'nautilus-audio-video-properties.gresource.xml'
+  ),
+  source_dir: 'resources',
+  c_name: 'nautilus_audio_video_properties',
+)
+
 libtotem_properties_page_sources = files(
   'totem-properties-main.c',
-  'totem-properties-view.c'
-)
+  'totem-properties-view.c',
+  'bacon-video-widget-properties.c',
+) + resources
 
-libtotem_properties_page_deps = missing_plugins_deps + [
-  gtk_dep,
-  dependency('gthread-2.0'),
-  libnautilus_ext_dep,
+libtotem_properties_page_deps = [
   gst_tag_dep,
-  libbacon_video_widget_properties_dep
+  gst_pbutils_dep,
 ]
 
 libtotem_properties_page = shared_module(
   'totem-properties-page',
-  sources: libtotem_properties_page_sources + gen_sources,
-  include_directories: top_inc,
-  dependencies: libtotem_properties_page_deps,
-  c_args: totem_common_cflags + [
+  sources: libtotem_properties_page_sources,
+  dependencies: libtotem_properties_page_deps + [
+    nautilus_extension
+  ],
+  c_args: [
     '-DG_LOG_DOMAIN="TotemPropertiesPage"'
   ],
   install: true,
-  install_dir: nautilusdir
+  install_dir: extensiondir
 )
 
 test_properties_page_sources = files(
   'totem-properties-main.c',
   'totem-properties-view.c',
+  'bacon-video-widget-properties.c',
   'test-properties-page.c'
-)
+) + resources
 
 executable(
   'test-properties-page',
-  test_properties_page_sources + gen_sources,
-  include_directories: top_inc,
+  test_properties_page_sources,
   dependencies: libtotem_properties_page_deps + [
-    libtotem_player_dep,
-    libbacon_video_widget_dep
+    nautilus_extension
   ],
-  c_args: totem_common_cflags
 )
 
diff --git a/extensions/audio-video-properties/resources/nautilus-audio-video-properties.gresource.xml 
b/extensions/audio-video-properties/resources/nautilus-audio-video-properties.gresource.xml
new file mode 100644
index 000000000..d7f727dd6
--- /dev/null
+++ b/extensions/audio-video-properties/resources/nautilus-audio-video-properties.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+    <gresource prefix="/org/gnome/nautilus/audio-video-properties">
+    <file compressed="true">ui/properties.ui</file>
+  </gresource>
+</gresources>
diff --git a/extensions/audio-video-properties/properties.ui 
b/extensions/audio-video-properties/resources/ui/properties.ui
similarity index 100%
rename from extensions/audio-video-properties/properties.ui
rename to extensions/audio-video-properties/resources/ui/properties.ui
diff --git a/extensions/audio-video-properties/test-properties-page.c 
b/extensions/audio-video-properties/test-properties-page.c
index 8dd3f2e33..6969ee5ad 100644
--- a/extensions/audio-video-properties/test-properties-page.c
+++ b/extensions/audio-video-properties/test-properties-page.c
@@ -59,7 +59,7 @@ int main (int argc, char **argv)
        GFile *file;
        char *url;
 
-       bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+       bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
        textdomain (GETTEXT_PACKAGE);
 
diff --git a/extensions/audio-video-properties/totem-properties-main.c 
b/extensions/audio-video-properties/totem-properties-main.c
index 4a60489a2..03d016e74 100644
--- a/extensions/audio-video-properties/totem-properties-main.c
+++ b/extensions/audio-video-properties/totem-properties-main.c
@@ -30,10 +30,8 @@
 #define GST_USE_UNSTABLE_API 1
 #include <gst/gst.h>
 
-#include "gst/totem-gst-helpers.h"
 #include "totem-properties-view.h"
-#include <libnautilus-extension/nautilus-extension-types.h>
-#include <libnautilus-extension/nautilus-property-page-provider.h>
+#include <nautilus-extension.h>
 
 #define WANT_MIME_TYPES 1
 #include "totem-mime-types.h"
@@ -83,7 +81,6 @@ static gpointer
 init_backend (gpointer data)
 {
        gst_init (NULL, NULL);
-       totem_gst_disable_display_decoders ();
        return NULL;
 }
 
@@ -135,7 +132,7 @@ void
 nautilus_module_initialize (GTypeModule *module)
 {
        /* set up translation catalog */
-       bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+       bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
        totem_properties_plugin_register_type (module);
diff --git a/extensions/meson.build b/extensions/meson.build
index 41048589c..5c6f64cef 100644
--- a/extensions/meson.build
+++ b/extensions/meson.build
@@ -1,2 +1,3 @@
 subdir('image-properties')
+subdir('audio-video-properties')
 subdir('sendto')
diff --git a/meson.build b/meson.build
index 512b41dc6..a803c0738 100644
--- a/meson.build
+++ b/meson.build
@@ -121,6 +121,8 @@ libm = cc.find_library('m')
 
 if get_option('extensions')
   gexiv = dependency('gexiv2', version: '>= 0.10.0')
+  gst_tag_dep = dependency('gstreamer-tag-1.0')
+  gst_pbutils_dep = dependency('gstreamer-pbutils-1.0')
 endif
 gio = dependency('gio-2.0', version: glib_ver)
 gio_unix = dependency('gio-unix-2.0', version: glib_ver)


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