[beast: 1/8] BEAST-GTK: use Rapicorn resources to compile and access dialog XML files
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 1/8] BEAST-GTK: use Rapicorn resources to compile and access dialog XML files
- Date: Fri, 12 Jun 2015 21:26:15 +0000 (UTC)
commit 3a43e5eac1307991b0c3d55f27b646869fd10dc3
Author: Tim Janik <timj gnu org>
Date: Fri Jan 30 05:01:07 2015 +0100
BEAST-GTK: use Rapicorn resources to compile and access dialog XML files
beast-gtk/bstutils.cc | 14 ++++++--------
beast-gtk/dialogs/.gitignore | 2 +-
beast-gtk/dialogs/Makefile.am | 18 +++++++++---------
3 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/beast-gtk/bstutils.cc b/beast-gtk/bstutils.cc
index af7ad9d..bfe8b49 100644
--- a/beast-gtk/bstutils.cc
+++ b/beast-gtk/bstutils.cc
@@ -86,11 +86,10 @@ _bst_init_utils (void)
}
}
-#include "beast-gtk/dialogs/beast-xml-zfiles.cc"
+#include "beast-gtk/dialogs/beast-resources.cc"
void
_bst_init_radgets (void)
{
- gchar *text;
gxk_radget_define_widget_type (BST_TYPE_TRACK_VIEW);
gxk_radget_define_widget_type (BST_TYPE_HGROW_BAR);
gxk_radget_define_widget_type (BST_TYPE_VGROW_BAR);
@@ -107,12 +106,11 @@ _bst_init_radgets (void)
gxk_radget_define_widget_type (BST_TYPE_SCROLLGRAPH);
gxk_radget_define_widget_type (BST_TYPE_PATTERN_VIEW);
gxk_radget_define_widget_type (BST_TYPE_ZOOMED_WINDOW);
- text = gxk_zfile_uncompress (BST_RADGETS_STANDARD_SIZE, BST_RADGETS_STANDARD_DATA, G_N_ELEMENTS
(BST_RADGETS_STANDARD_DATA));
- gxk_radget_parse_text ("beast", text, -1, NULL, NULL);
- g_free (text);
- text = gxk_zfile_uncompress (BST_RADGETS_BEAST_SIZE, BST_RADGETS_BEAST_DATA, G_N_ELEMENTS
(BST_RADGETS_BEAST_DATA));
- gxk_radget_parse_text ("beast", text, -1, NULL, NULL);
- g_free (text);
+ Rapicorn::Blob blob;
+ blob = Rapicorn::Res ("@res radgets-standard.xml");
+ gxk_radget_parse_text ("beast", blob.data(), blob.size(), NULL, NULL);
+ blob = Rapicorn::Res ("@res radgets-beast.xml");
+ gxk_radget_parse_text ("beast", blob.data(), blob.size(), NULL, NULL);
}
GtkWidget*
diff --git a/beast-gtk/dialogs/.gitignore b/beast-gtk/dialogs/.gitignore
index e4ffe3e..9f1d9b7 100644
--- a/beast-gtk/dialogs/.gitignore
+++ b/beast-gtk/dialogs/.gitignore
@@ -1 +1 @@
-beast-xml-zfiles.cc
+beast-resources.cc
diff --git a/beast-gtk/dialogs/Makefile.am b/beast-gtk/dialogs/Makefile.am
index 4028669..a8a2ba6 100644
--- a/beast-gtk/dialogs/Makefile.am
+++ b/beast-gtk/dialogs/Makefile.am
@@ -1,24 +1,24 @@
# BEAST - Better Audio System
include $(top_srcdir)/Makefile.decl
-ZINTERN = rapicorn-zintern
+RAPIDRES = rapidres
-ZFILE_DEFS = $(strip \
- bst-radgets-standard $(srcdir)/radgets-standard.xml \
- bst-radgets-beast $(srcdir)/radgets-beast.xml \
+RESOURCES = $(strip \
+ $(srcdir)/radgets-standard.xml \
+ $(srcdir)/radgets-beast.xml \
)
-XML_FILES = $(filter-out bst-%, $(ZFILE_DEFS))
+XML_FILES = $(filter-out bst-%, $(RESOURCES))
EXTRA_DIST += $(XML_FILES)
XMLLINTCALL=$(if $(XMLLINT),$(XMLLINT),true) # handle undefined XMLLINT
-beast-xml-zfiles.cc: $(XML_FILES)
+beast-resources.cc: $(XML_FILES)
cd . \
&& $(XMLLINTCALL) --noout $(XML_FILES) \
- && $(ZINTERN) -b -z $(ZFILE_DEFS) > xgen-bxc \
+ && $(RAPIDRES) $(RESOURCES) > xgen-bxc \
&& cp xgen-bxc $@ \
&& rm -f xgen-bxc
-CLEANFILES += xgen-bxc beast-xml-zfiles.cc
+CLEANFILES += xgen-bxc beast-resources.cc
-noinst_DATA = beast-xml-zfiles.cc
+noinst_DATA = beast-resources.cc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]