[gnome-builder/wip/libide] libide: move snippet definitions into libide



commit d36bd6a6e09da7bdba17fb6a01e6296360605c9d
Author: Christian Hergert <christian hergert me>
Date:   Thu Feb 26 22:42:21 2015 -0800

    libide: move snippet definitions into libide

 {src/resources => data}/snippets/c-sharp.snippets  |    0
 {src/resources => data}/snippets/c.snippets        |    0
 {src/resources => data}/snippets/chdr.snippets     |    0
 {src/resources => data}/snippets/gobject.snippets  |    0
 {src/resources => data}/snippets/licenses.snippets |    0
 {src/resources => data}/snippets/main.snippets     |    0
 {src/resources => data}/snippets/python.snippets   |    0
 {src/resources => data}/snippets/rpmspec.snippets  |    0
 {src/resources => data}/snippets/shebang.snippets  |    0
 {src/resources => data}/snippets/vala.snippets     |    0
 {src/resources => data}/snippets/xml.snippets      |    0
 libide/Makefile.am                                 |   26 ++++++++++++++++++++
 libide/resources/.gitignore                        |    2 +
 libide/resources/libide.gresource.xml              |   16 ++++++++++++
 src/resources/gnome-builder.gresource.xml          |   12 ---------
 src/snippets/gb-source-snippets-manager.c          |    2 +-
 16 files changed, 45 insertions(+), 13 deletions(-)
---
diff --git a/src/resources/snippets/c-sharp.snippets b/data/snippets/c-sharp.snippets
similarity index 100%
rename from src/resources/snippets/c-sharp.snippets
rename to data/snippets/c-sharp.snippets
diff --git a/src/resources/snippets/c.snippets b/data/snippets/c.snippets
similarity index 100%
rename from src/resources/snippets/c.snippets
rename to data/snippets/c.snippets
diff --git a/src/resources/snippets/chdr.snippets b/data/snippets/chdr.snippets
similarity index 100%
rename from src/resources/snippets/chdr.snippets
rename to data/snippets/chdr.snippets
diff --git a/src/resources/snippets/gobject.snippets b/data/snippets/gobject.snippets
similarity index 100%
rename from src/resources/snippets/gobject.snippets
rename to data/snippets/gobject.snippets
diff --git a/src/resources/snippets/licenses.snippets b/data/snippets/licenses.snippets
similarity index 100%
rename from src/resources/snippets/licenses.snippets
rename to data/snippets/licenses.snippets
diff --git a/src/resources/snippets/main.snippets b/data/snippets/main.snippets
similarity index 100%
rename from src/resources/snippets/main.snippets
rename to data/snippets/main.snippets
diff --git a/src/resources/snippets/python.snippets b/data/snippets/python.snippets
similarity index 100%
rename from src/resources/snippets/python.snippets
rename to data/snippets/python.snippets
diff --git a/src/resources/snippets/rpmspec.snippets b/data/snippets/rpmspec.snippets
similarity index 100%
rename from src/resources/snippets/rpmspec.snippets
rename to data/snippets/rpmspec.snippets
diff --git a/src/resources/snippets/shebang.snippets b/data/snippets/shebang.snippets
similarity index 100%
rename from src/resources/snippets/shebang.snippets
rename to data/snippets/shebang.snippets
diff --git a/src/resources/snippets/vala.snippets b/data/snippets/vala.snippets
similarity index 100%
rename from src/resources/snippets/vala.snippets
rename to data/snippets/vala.snippets
diff --git a/src/resources/snippets/xml.snippets b/data/snippets/xml.snippets
similarity index 100%
rename from src/resources/snippets/xml.snippets
rename to data/snippets/xml.snippets
diff --git a/libide/Makefile.am b/libide/Makefile.am
index d268ab6..3f38e41 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -242,6 +242,7 @@ libide_1_0_la_includes = \
        -I$(top_srcdir)/libide/local \
        -I$(top_srcdir)/libide/pygobject \
        -I$(top_srcdir)/libide/python \
+       -I$(top_srcdir)/libide/resources \
        -I$(top_srcdir)/libide/tasks \
        -I$(top_srcdir)/libide/theatrics \
        -I$(top_srcdir)/libide/trie \
@@ -281,6 +282,31 @@ libide_1_0_la_LIBADD = \
        libeditorconfig.la \
        $(NULL)
 
+libide_1_0_la_built_sources = \
+       libide/resources/ide-resources.c \
+       libide/resources/ide-resources.h \
+       $(NULL)
+
+libide_resource_files = $(shell glib-compile-resources --sourcedir=$(top_srcdir)/libide/resources 
--generate-dependencies $(top_srcdir)/libide/resources/libide.gresource.xml)
+libide/resources/ide-resources.c: libide/resources/libide.gresource.xml $(libide_resource_files)
+       $(AM_V_GEN)glib-compile-resources --target=$@ --sourcedir=$(top_srcdir)/libide/resources 
--generate-source --c-name ide $(top_srcdir)/libide/resources/libide.gresource.xml
+libide/resources/ide-resources.h: libide/resources/libide.gresource.xml $(libide_resource_files)
+       $(AM_V_GEN)glib-compile-resources --target=$@ --sourcedir=$(top_srcdir)/libide/resources 
--generate-header --c-name ide $(top_srcdir)/libide/resources/libide.gresource.xml
+
+nodist_libide_1_0_la_SOURCES = \
+       $(libide_1_0_la_built_sources) \
+       $(NULL)
+
+BUILT_SOURCES += $(libide_1_0_la_built_sources)
+
+DISTCLEANFILES += $(libide_1_0_la_built_sources)
+
+EXTRA_DIST += \
+       $(libide_resource_files) \
+       libide/resources/libide.gresource.xml \
+       $(libide_1_0_la_built_sources) \
+       $(NULL)
+
 
 -include $(INTROSPECTION_MAKEFILE)
 
diff --git a/libide/resources/.gitignore b/libide/resources/.gitignore
new file mode 100644
index 0000000..f32665c
--- /dev/null
+++ b/libide/resources/.gitignore
@@ -0,0 +1,2 @@
+ide-resources.c
+ide-resources.h
diff --git a/libide/resources/libide.gresource.xml b/libide/resources/libide.gresource.xml
new file mode 100644
index 0000000..0cd0f1f
--- /dev/null
+++ b/libide/resources/libide.gresource.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/libide">
+    <file alias="snippets/c-sharp.snippets">../../data/snippets/c-sharp.snippets</file>
+    <file alias="snippets/c.snippets">../../data/snippets/c.snippets</file>
+    <file alias="snippets/chdr.snippets">../../data/snippets/chdr.snippets</file>
+    <file alias="snippets/gobject.snippets">../../data/snippets/gobject.snippets</file>
+    <file alias="snippets/licenses.snippets">../../data/snippets/licenses.snippets</file>
+    <file alias="snippets/main.snippets">../../data/snippets/main.snippets</file>
+    <file alias="snippets/python.snippets">../../data/snippets/python.snippets</file>
+    <file alias="snippets/rpmspec.snippets">../../data/snippets/rpmspec.snippets</file>
+    <file alias="snippets/shebang.snippets">../../data/snippets/shebang.snippets</file>
+    <file alias="snippets/vala.snippets">../../data/snippets/vala.snippets</file>
+    <file alias="snippets/xml.snippets">../../data/snippets/xml.snippets</file>
+  </gresource>
+</gresources>
diff --git a/src/resources/gnome-builder.gresource.xml b/src/resources/gnome-builder.gresource.xml
index c6c6c57..9cc5a62 100644
--- a/src/resources/gnome-builder.gresource.xml
+++ b/src/resources/gnome-builder.gresource.xml
@@ -20,18 +20,6 @@
 
     <file>language/defaults.ini</file>
 
-    <file>snippets/c.snippets</file>
-    <file>snippets/chdr.snippets</file>
-    <file>snippets/c-sharp.snippets</file>
-    <file>snippets/gobject.snippets</file>
-    <file>snippets/licenses.snippets</file>
-    <file>snippets/main.snippets</file>
-    <file>snippets/python.snippets</file>
-    <file>snippets/rpmspec.snippets</file>
-    <file>snippets/shebang.snippets</file>
-    <file>snippets/vala.snippets</file>
-    <file>snippets/xml.snippets</file>
-
     <file>ui/gb-command-bar.ui</file>
     <file>ui/gb-command-bar-item.ui</file>
     <file>ui/gb-credits-widget.ui</file>
diff --git a/src/snippets/gb-source-snippets-manager.c b/src/snippets/gb-source-snippets-manager.c
index 6ea34c5..7282e52 100644
--- a/src/snippets/gb-source-snippets-manager.c
+++ b/src/snippets/gb-source-snippets-manager.c
@@ -31,7 +31,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GbSourceSnippetsManager,
                             gb_source_snippets_manager,
                             G_TYPE_OBJECT)
 
-#define SNIPPETS_DIRECTORY "/org/gnome/builder/snippets/"
+#define SNIPPETS_DIRECTORY "/org/gnome/libide/snippets/"
 
 static gboolean
 gb_source_snippets_manager_load_file (GbSourceSnippetsManager *manager,


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