[totem/wip/hadess/move-properties-code] properties: Move properties widget to plugin directory



commit 6575e791744a92146d7486222b47c99c5aae4449
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Feb 11 17:40:12 2019 +0100

    properties: Move properties widget to plugin directory

 data/meson.build                                       |  1 -
 po/POTFILES.in                                         |  4 ++--
 src/meson.build                                        |  1 -
 .../properties/bacon-video-widget-properties.c         |  2 +-
 .../properties/bacon-video-widget-properties.h         |  0
 src/plugins/properties/meson.build                     | 16 ++++++++++++----
 src/plugins/properties/properties.gresource.xml        |  6 ++++++
 {data => src/plugins/properties}/properties.ui         |  0
 src/properties/meson.build                             | 18 ------------------
 9 files changed, 21 insertions(+), 27 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 1a4f56740..aecc657cd 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -43,7 +43,6 @@ ui_files = files(
   'controls.ui',
   'playlist.ui',
   'preferences.ui',
-  'properties.ui',
   'shortcuts.ui',
   'totem.ui',
   'uri.ui'
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8676b6f49..9bb773988 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -6,7 +6,6 @@ data/org.gnome.Totem.desktop.in.in
 data/org.gnome.totem.gschema.xml.in
 data/playlist.ui
 data/preferences.ui
-data/properties.ui
 data/shortcuts.ui
 data/totem.ui
 data/uri.ui
@@ -14,7 +13,6 @@ src/backend/bacon-time-label.c
 src/backend/bacon-video-widget.c
 src/backend/bacon-video-widget-gst-missing-plugins.c
 src/gst/totem-time-helpers.c
-src/properties/bacon-video-widget-properties.c
 src/grilo.ui
 src/totem.c
 src/totem-gallery-thumbnailer.c
@@ -50,6 +48,8 @@ src/plugins/opensubtitles/opensubtitles.ui
 src/plugins/opensubtitles/org.gnome.totem.plugins.opensubtitles.gschema.xml.in
 src/plugins/properties/movie-properties.plugin.desktop.in
 src/plugins/properties/totem-movie-properties.c
+src/plugins/properties/properties.ui
+src/plugins/properties/bacon-video-widget-properties.c
 src/plugins/pythonconsole/org.gnome.totem.plugins.pythonconsole.gschema.xml.in
 src/plugins/pythonconsole/pythonconsole.plugin.desktop.in
 src/plugins/pythonconsole/pythonconsole.py
diff --git a/src/meson.build b/src/meson.build
index c5e04bf97..3c9e7310c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -3,7 +3,6 @@ plugins_inc = include_directories('plugins')
 
 subdir('gst')
 subdir('backend')
-subdir('properties')
 
 enum_headers = files(
   'backend/bacon-time-label.h',
diff --git a/src/properties/bacon-video-widget-properties.c 
b/src/plugins/properties/bacon-video-widget-properties.c
similarity index 98%
rename from src/properties/bacon-video-widget-properties.c
rename to src/plugins/properties/bacon-video-widget-properties.c
index 188445624..0e899a978 100644
--- a/src/properties/bacon-video-widget-properties.c
+++ b/src/plugins/properties/bacon-video-widget-properties.c
@@ -258,7 +258,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/totem/properties/properties.ui", NULL) == 0) {
                g_object_unref (xml);
                return NULL;
        }
diff --git a/src/properties/bacon-video-widget-properties.h 
b/src/plugins/properties/bacon-video-widget-properties.h
similarity index 100%
rename from src/properties/bacon-video-widget-properties.h
rename to src/plugins/properties/bacon-video-widget-properties.h
diff --git a/src/plugins/properties/meson.build b/src/plugins/properties/meson.build
index c7df76b7d..b3c3f1fa0 100644
--- a/src/plugins/properties/meson.build
+++ b/src/plugins/properties/meson.build
@@ -2,13 +2,21 @@ plugin_name = 'movie-properties'
 
 plugin_dir = join_paths(totem_pluginsdir, 'properties')
 
+resources = gnome.compile_resources(
+  'properties-resources',
+  'properties.gresource.xml',
+  c_name: 'totem_properties',
+)
+
 shared_module(
   plugin_name,
-  sources: 'totem-' + plugin_name + '.c',
-  include_directories: plugins_incs,
-  dependencies: plugins_deps + [
-    libbacon_video_widget_properties_dep
+  sources: [
+    'totem-' + plugin_name + '.c',
+    'bacon-video-widget-properties.c',
+    resources[0]
   ],
+  include_directories: plugins_incs,
+  dependencies: plugins_deps,
   c_args: plugins_cflags,
   install: true,
   install_dir: plugin_dir
diff --git a/src/plugins/properties/properties.gresource.xml b/src/plugins/properties/properties.gresource.xml
new file mode 100644
index 000000000..cf125e72e
--- /dev/null
+++ b/src/plugins/properties/properties.gresource.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/totem/properties/">
+    <file compressed="true">properties.ui</file>
+  </gresource>
+</gresources>
diff --git a/data/properties.ui b/src/plugins/properties/properties.ui
similarity index 100%
rename from data/properties.ui
rename to src/plugins/properties/properties.ui


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