Skip to content

Commit

Permalink
Internalize parts of the goffice code
Browse files Browse the repository at this point in the history
We're using only a tiny fraction of that library.
Adding it directly in the gnucash source saves a large dependency chain.

Note this is a verbatim copy of these files from
https://github.com/GNOME/goffice/tree/GOFFICE_0_8_17
to preserve a clean link with it's origin.
It will only build correctly after the next commit.
  • Loading branch information
gjanssens committed Feb 20, 2017
1 parent 20eecb0 commit d858c7d
Show file tree
Hide file tree
Showing 10 changed files with 2,540 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -1697,6 +1697,7 @@ AC_CONFIG_FILES(
doc/Makefile
doc/examples/Makefile
lib/Makefile
lib/goffice/Makefile
lib/libc/Makefile
lib/stf/Makefile
packaging/Makefile
Expand Down
2 changes: 1 addition & 1 deletion lib/Makefile.am
@@ -1,5 +1,5 @@
if GNUCASH_ENABLE_GUI
SUBDIRS = libc stf
SUBDIRS = libc stf goffice
else
SUBDIRS = libc
endif
Expand Down
17 changes: 17 additions & 0 deletions lib/goffice/Makefile.am
@@ -0,0 +1,17 @@
noinst_LTLIBRARIES = libgnc-goffice.la

REALSRCS = go-optionmenu.c \
go-charmap-sel.c \
go-glib-extras.c
REALHDRS = go-optionmenu.h \
go-charmap-sel.h \
go-glib-extras.h

libgnc_goffice_la_SOURCES = ${REALSRCS}
noinst_HEADERS = ${REALHDRS}

libgnc_goffice_la_LIBADD = $(GTK_LIBS)

AM_CPPFLAGS = $(GTK_CFLAGS)

EXTRA_DIST = $(REALSRCS) $(REALHDRS)
13 changes: 13 additions & 0 deletions lib/goffice/README
@@ -0,0 +1,13 @@
This code is extracted from goffice.

In particular,
- go-charmap-sel is a widget to allow the user to select an encoding
- go-option-menu is a widget used by go-charmap-sel to add manu items
with a radio button.
- go-glib-extras is copied because we use a few functions from it:
- go_ascii_strcase_equal and go_ascii_strcase_hash
- go_guess_encoding

This code is currently used by the csv importer, but could be useful
in several interfaces that require the user to select an encoding
(various importers and exporters mostly).

0 comments on commit d858c7d

Please sign in to comment.