[gnumeric] embedded-ui: cleanups
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] embedded-ui: cleanups
- Date: Thu, 1 Dec 2011 21:22:26 +0000 (UTC)
commit b25a4c64ea8d398b4ddac16ec986b3c639cf257a
Author: Morten Welinder <terra gnome org>
Date: Thu Dec 1 16:21:30 2011 -0500
embedded-ui: cleanups
ChangeLog | 4 ++++
src/Makefile.am | 2 --
src/dialogs/ChangeLog | 4 ++++
src/dialogs/Makefile.am | 4 +++-
src/gnm-rsm.c | 36 ------------------------------------
src/gnm-rsm.h | 12 ------------
src/gui-util.c | 1 -
tools/ChangeLog | 4 ++++
tools/embedder | 13 +++++++------
9 files changed, 22 insertions(+), 58 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 65b213a..60c8790 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-01 Morten Welinder <terra gnome org>
+
+ * src/Makefile.am: No need for gnm-rsm.[ch]
+
2011-11-30 Andreas J. Guelzow <aguelzow pyrshep ca>
* src/stf-parse.c (stf_parse_sheet): remove unused variable
diff --git a/src/Makefile.am b/src/Makefile.am
index bc93c45..c485399 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -77,8 +77,6 @@ libspreadsheet_la_SOURCES = \
\
gnm-data-cache-source.h \
gnm-data-cache-source.c \
- gnm-rsm.h \
- gnm-rsm.c \
gnm-sheet-slicer.h \
gnm-sheet-slicer.c \
gnm-sheet-slicer-combo.h \
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 289d8eb..a17f36b 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-01 Morten Welinder <terra gnome org>
+
+ * Makefile.am (embedded-ui.c): use --id-prefix.
+
2011-11-30 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-doc-metadata.c (gnm_docprop_vector_as_string): use G_VALUE_INIT;
diff --git a/src/dialogs/Makefile.am b/src/dialogs/Makefile.am
index 4db18d1..3b44c16 100644
--- a/src/dialogs/Makefile.am
+++ b/src/dialogs/Makefile.am
@@ -185,7 +185,9 @@ BUILT_SOURCES = embedded-ui.c
embedded-ui.c: $(top_srcdir)/tools/embedder $(embedded_uis)
cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/embedder \
--register-function=gnm_register_ui_files \
- --register-file-function=gnm_rsm_register_file \
+ --register-file-function=go_rsm_register_file \
+ --id-prefix=gnm: \
+ --include '<goffice/goffice.h>' \
--include embedded-ui.h \
COMPRESS $(embedded_uis) >$(abs_builddir)/$@
diff --git a/src/gui-util.c b/src/gui-util.c
index 9691ba7..5b9c8ac 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -24,7 +24,6 @@
#include "libgnumeric.h"
#include "wbc-gtk.h"
#include "widgets/gnumeric-expr-entry.h"
-#include "gnm-rsm.h"
#include <goffice/goffice.h>
#include <gtk/gtk.h>
diff --git a/tools/ChangeLog b/tools/ChangeLog
index f09e7d2..063bd65 100644
--- a/tools/ChangeLog
+++ b/tools/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-01 Morten Welinder <terra gnome org>
+
+ * embedder: Improve #include handling.
+
2011-11-30 Morten Welinder <terra gnome org>
* embedder: Minor improvements targeting goffice.
diff --git a/tools/embedder b/tools/embedder
index 4c033fa..6902a92 100644
--- a/tools/embedder
+++ b/tools/embedder
@@ -11,21 +11,22 @@ my $WIDTH = 70;
my $regfunc = undef;
my $regfuncstatic = 0;
my $regfilefunc = undef;
+my $id_prefix = "";
my @includes;
&GetOptions("register-function=s" => \$regfunc,
"register-file-function=s" => \$regfilefunc,
"static" => \$regfuncstatic,
+ "id-prefix=s" => \$id_prefix,
"include=s" => \ includes,
) or die "$0: invalid usage -- inquire within\n";
# -----------------------------------------------------------------------------
print "/* Generated by $myself -- do not edit! */\n\n";
-print "#include <gnumeric-config.h>\n";
-print "#include <gnm-rsm.h>\n\n";
-foreach (@includes) {
- print "#include \"$_\"\n";
+foreach my $include (@includes) {
+ $include = "\"$include\"" unless $include =~ /^[<""]/;
+ print "#include $include\n";
}
my $fileno = 0;
@@ -76,7 +77,7 @@ sub embed {
&embed_data ($data, $id);
my $len = length ($data);
- $reg .= " $regfilefunc (\"$file\", $id, $len);\n";
+ $reg .= " $regfilefunc (\"$id_prefix$file\", $id, $len);\n";
}
sub embed_data {
@@ -117,7 +118,7 @@ sub embed_data {
} elsif ($c eq "\\") {
print "\\\\";
$linelen += 2;
- } elsif ($ci >= 32 && $ci < 128) {
+ } elsif ($ci >= 32 && $ci < 127) {
if ($thisnohex && $c =~ /[a-fA-f0-9]/) {
print "\"\"";
$linelen += 2;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]