Merge commit 'e5b0bdb'; remote-tracking branch 'origin/deprecated-cleanup' into archive

This commit is contained in:
John Ralls committed 2014-04-11 08:11:44 -07:00
263 files changed
+124786 -160443

No files matched your search

+3
View File
@@ -130,6 +130,7 @@ Bob Drzyzgula <bob@mostly.com> for budgeting design notes
Volker Englisch <Volker@englisch.us> QA and testing
Jonathan Ernst <jonathan@ernstfamily.ch> Translations
Stephen Evanchik <evanchsa@clarkson.edu> Logging improvements; gtk2 conversions
Joshua Facemyer / Impressus Art <faceman@impressusart.com>: New artwork.
Paul Fenwick <pjf@schools.net.au> ASX support, Finance::Quote
Hubert Figuiere <hfiguiere@teaser.fr> patch to gnc-prices
Valek Filippov <frob@df.ru> messages Russian translation
@@ -189,6 +190,7 @@ Yves-Eric Martin <yem_lists.gnucash.org@filter.yve.net> work on financial year e
Juan Manuel García Molina <juanmagm@mail.com> messages Spanish translation
David Montenegro <sunrise2000@comcast.net> all sorts of Scheme reports
Orestes Mas <orestes@tsc.upc.es> Catalan translation
Bernard Meens <meensb@xs4all.nl> Dutch translation
Christopher Molnar <molnarc@mandrakesoft.com> build system patch
Tim Mooney <mooney@dogbert.cc.ndsu.NoDak.edu> port to alpha-dec-osf4.0f
Lucimar Moresco <lucimarmoresco@hotmail.com> pt_BR account templates
@@ -242,6 +244,7 @@ Diane Trout <detrout@earthlink.net> scheme QIF import patch
Richard -Gilligan- Uschold <uschold@cs.ucf.edu> tax report & txf export
Matthew Vanecek <mevanecek@yahoo.com> lots of postgres backend work
Didier Vidal <didier-devel@9online.fr> various G2 fixes.
Oliver Vollmer <ovo@mx.lihas.de> German account templates SKR03
Richard Wackerbarth <rkw@dataplex.net> patch to gnc-prices, qif import fixes
Rob Walker <rob@valinux.com> guile and register patches
Darin Willits <darin@blueyonder.co.uk> initial budgeting prototype
+850
View File
@@ -1,3 +1,853 @@
2006-08-02 David Hampton <hampton@employees.org>
* various: Remove the majority of the remaining deprecated widgets
by collapsing the "deprecated-cleanup" branch (r13935:14581) back
into trunk. This patch also creates a new file for the code that
requires a GtkEntry text to match one of its completions.
2006-07-31 Derek Atkins <derek@ihtfp.com>
* src/bin/gnucash-bin.c:
Adjust the "development version" message for the 2.0.1 release.
2006-07-30 Andreas Köhler <andi5.py@gmx.net>
* src/gnome/window-reconcile.c: Replace the hbox separating debits
from credits in the reconciliation window by a homogeneous
table. This avoids nasty redraws when one of them changes in
size. Fixes #342512.
* src/gnome/schemas/apps_gnucash_warnings.schemas.in:
* src/gnome-utils/gnc-main-window.c: Add warning close_last_window
and show it when user tries to close the last GnuCash window.
Fixes #338865.
* src/gnome-utils/gnc-gnome-utils.c:
* src/gnome-utils/glade/preferences.glade:
* src/gnome/schemas/apps_gnucash_general.schemas.in: Add new
setting general/show_splash_screen to
preferences_dialog->General and only show the splash screen if
it is TRUE. Fixes 339876.
* src/gnome/gnc-plugin-page-account-tree.c:
* src/gnome/gnc-plugin-page-register.c:
* src/gnome/gnc-plugin-basic-commands.c:
* src/gnome-utils/glade/preferences.glade: Fixed some duplicate
accelerators.
* src/gnome-utils/gnc-main-window.c:
* src/gnome/schemas/apps_gnucash_general.schemas.in:
* src/gnome-utils/glade/preferences.glade: Add preference
general/tab_position to choose the edge of the notebook the tabs
will be showed (top, bottom, left or right). Add it to
preferences_dialog->Windows. Move "Show close button on notebook
tabs" from General to Windows. Fixes #340299.
2006-07-24 Derek Atkins <derek@ihtfp.com>
* [lots of Makefile.am files]:
Allow proper compile/install from tarball using separate builddir.
- Don't distribute (most) generated files.
- Be (more) consistent about when generated files are cleaned.
* po/POTFILES.skip:
- Now that we distribute the SX schema properly, don't skip it
in the POTFILES.skip file.
2006-07-23 Andreas Köhler <andi5.py@gmx.net>
* src/gnome-utils/gnc-tree-view.c: Correctly set column sort
orders from gconf. Fixes #348248.
2006-07-22 Derek Atkins <derek@ihtfp.com>
* configure.in: check for SLIB. (#347922)
2006-07-21 Andreas Köhler <andi5.py@gmx.net>
* configure.in:
* src/gnome-utils/gnc-main-window.c: Make tabs within one notebook
reorderable by dnd for gtk>=2.10. Fixes #343454.
2006-07-18 Christian Stimming <stimming@tuhh.de>
* src/gnc-module/gnc-module.c: On windows, deactivate gnucash's
extra de-quoting of path names that is done on the GNC_MODULE_PATH
env variable.
2006-07-16 Derek Atkins <derek@ihtfp.com>
* configure.in:
check for (g-wrap) module (#347680)
Apparently some distributions ship g-wrap-config separately
from the g-wrap.scm guile module.
* src/import-export/qif-import/qif-file.scm:
Ignore any unknown !Option specification. Fixes #160735.
* src/import-export/qif-import/qif-parse.scm:
Allow comma-radix numbers without a radix. Fixes #142424.
I.e., allow "17.500" to be parsed either as "seventeen and a half"
or as "seventeen thousand five hundred". Note that numbers STILL
default to decimal-radix instead of asking the user to choose.
* src/business/business-core/gncEntry.[ch]:
* src/business/business-ledger/gncEntryLedger.c:
Properly round invoice entries and totals. Fixes #300042.
Perform internal computations to LCD, but then export rounded values.
Now, using the test case in Bug #300042 I get the same values
in the invoice window, in the printable invoice report, and
in the CoA Registers.
2006-07-16 Andreas Köhler <andi5.py@gmx.net>
* src/gnome-utils/gnc-main-window.c: Do not move windows on
restoration that would be offscreen.
2006-07-15 Derek Atkins <derek@ihtfp.com>
* src/business/business-core/gncAddress.[ch]:
Make GncAddress more QOF compliant. (#343726)
Adds BeginEdit/CommitEdit calls.
* src/business/business-gnome/dialog-invoice.c:
Set the summary bar values when the window is first opened (#345978).
2006-07-15 Andreas Köhler <andi5.py@gmx.net>
* src/report/report-system/html-text.scm: Remove a duplicate of
gnc:html-text?.
2006-07-15 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/druid-hbci-initial.c: Remove obsolete
buttons for aqbanking/hbci setup that are unneeded. Fix crash due
to dangling points by deleting all pointers after calling
AB_Banking_Fini.
2006-07-14 Derek Atkins <derek@ihtfp.com>
* configure.in:
* autogen.sh:
make sure that po/POTFILES.in exists so configure doens't complain.
* configure.in:
check for (g-wrap gw-glib-spec) instead of (g-wrap) #347404.
2006-07-14 Andreas Köhler <andi5.py@gmx.net>
* src/gnome/schemas/Makefile.am: Add
apps_gnucash_scheduled_transctions.schemas.in. Fixes #340641.
* src/register/ledger-core/split-register-control.c:
* src/register/ledger-core/split-register-model.c: Let
GtkMessageDialog render the headers of two warnings in bold
font.
2006-07-13 Andreas Köhler <andi5.py@gmx.net>
* doc/tip_of_the_day.list.in:
* lib/libqof/backend/file/qsf-backend.c:
* src/gnome-search/search.glade:
* src/gnome-utils/druid-gnc-xml-import.c:
* src/gnome-utils/glade/preferences.glade:
* src/gnome-utils/gnc-file.c:
* src/gnome/schemas/apps_gnucash_general.schemas.in:
* src/gnome/gnc-plugin-page-account-tree.c:
* src/gnome/gnc-plugin-page-register.c:
* src/import-export/import-provider-format.glade:
* src/report/report-system/report.scm: String fixes that have
been delayed due to the string freeze.
* src/gnome/glade/account.glade: In the account dialog, do not
expand the upper left entries when the window is resized.
Automatic scrollbars for the notes field.
2006-07-12 Derek Atkins <derek@ihtfp.com>
* src/engine/Group.c:
Allow account-separator character in account names (#347321).
Revert to previous behavior of xaccGetAccountFromFullName()
which was changed in r13467 when the function was restructured.
This patch returns to the old behavior (but uses the new
function structure).
2006-07-09 Chris Lyttle <chris@wilddev.net>
* NEWS: Added some text about the release.
* configure.in: Change to version 2.0.0
* src/gnome-utils/glade/totd.glade: Removed 1.8 references
* doc/README.OFX: Removed 1.8 references
* doc/tip_of_the_day.list.in: Removed 1.8 references
* doc/README.german: Removed 1.8 references
* doc/TRANSLATION_HOWTO: Removed 1.8 references
* README: Removed 1.8 references
2006-07-07 David Hampton <hampton@cisco.com>
* src/engine/Transaction.c: Restore 1.8 behavior by using the full
date/time when sorting on the posted date. Fixes #346954.
2006-07-06 David Hampton <hampton@employees.org>
* src/gnome-utils/dialog-account.c: When creating accounts from
the register, fix the name parsing logic to correctly handle the
case where the first new account will be the first child of its
parent. Fixes #345771.
2006-07-04 Derek Atkins <derek@ihtfp.com>
* src/core-utils/gnc-glib-utils.h
* src/core-utils/gw-core-utils-spec.scm:
Remove the gnc_utf8_validate() API. It's not used anywhere.
* src/core-utils/gnc-glib-utils.c:
Rework gnc_utf8_validate() as a copy-and-paste of g_utf8_validate
but ignore certain control characters between 0x00 and 0x20
that are not valid XML characters. Fixes #346535.
2006-07-04 Christian Stimming <stimming@tuhh.de>
* po/de.po: Proof-read and improved German translation by feedback
from Andi Köhler.
2006-07-01 David Hampton <hampton@employees.org>
* src/quotes/gnc-fq-helper.in: This one file really does require
the perl Date::Manip module.
2006-07-01 Christian Stimming <stimming@tuhh.de>
* po/nl.po, po/glossary/nl.po: Updated Dutch translation by
Bernard Meens <meensb@xs4all.nl>
2006-06-28 David Hampton <hampton@employees.org>
* packaging/gnucash-1.9.x.ebuild:
* src/quotes/gnc-fq-update.in:
* src/quotes/gnc-fq-check.in:
* src/quotes/gnc-fq-helper.in:
* src/quotes/gnc-fq-dump: Recent version of Finance::Quote no
longer depend on Date::Manip, but they do now depend on
Crypt::SSLeay.
2006-06-27 David Hampton <hampton@employees.org>
* src/report/standard-reports/portfolio.scm:
* src/report/standard-reports/advanced-portfolio.scm: Restore the
original sort ordering which is grouping by parent account, and
then sorting within a group first by account code and then by
account name. Partial fix for #345385.
* src/quotes/gnc-fq-update.in:
* src/quotes/gnc-fq-check.in:
* src/quotes/gnc-fq-helper.in:
* src/quotes/gnc-fq-dump: When modules can't be found refer users
to their package manager first. Other fixups for the utility
program name changes.
2006-06-27 Christian Stimming <stimming@tuhh.de>
* src/backend/file/gnc-backend-file.c: Ignore failed chown()
because it always fails on vfat/samba. #345913
2006-06-26 David Hampton <hampton@employees.org>
* src/pixmaps/gnucash-icon.png:
* src/pixmaps/appicon.png: Add new application icon.
2006-06-25 Joshua Sled <jsled@asynchronous.org>
* src/pixmaps/gnucash_splash.png: reduced-size splash image.
2006-06-24 Derek Atkins <derek@ihtfp.com>
Allow building from either SVN or SVK
* util/gnc-svnversion: obtain revision info from SVN or SVK.
Deals with lndir tree and both svn and svk checkouts.
* configure.in:
* src/gnome-utils/Makefile.am:
use new gnc-svnversion script instead of calling out to svn
directly.
* moved glade-fixup to util subdir
2006-06-20 Christian Stimming <stimming@tuhh.de>
* src/engine/iso-4217-currencies.scm: Add Suriname Dollar
currency; replaces SRG, but due to a non-unity exchange rate we
cannot have it replaced automatically. #319084
* src/backend/file/io-gncxml-v2.c: Use waitpid() only if
<sys/wait.h> is available. Unavailable on win32.
2006-06-18 Chris Lyttle <chris@wilddev.net>
* NEWS: Added some text about the release.
* configure.in: Change to version 1.9.8
2006-06-18 Christian Stimming <stimming@tuhh.de>
* accounts/de_DE/acctchrt_skr03.gnucash-xea: Add new SKR03 account
template (in addition to the existing SKR04) by Oliver Vollmer
<ovo@mx.lihas.de>.
r14377 | chris | 2006-06-16 21:00:18 -0400 (Fri, 16 Jun 2006) | 2 lines
M /gnucash/trunk/src/engine/gnc-commodity.c
M /gnucash/trunk/src/engine/iso-4217-currencies.scm
Update mnemonic for Mexican Peso. Fixes Bug #345048.
r14375 | chris | 2006-06-16 20:38:08 -0400 (Fri, 16 Jun 2006) | 3 lines
M /gnucash/trunk/src/gnome-utils/dialog-utils.c
Make the keypad 'minus' key enter a dash in the date entry for ISO dates.
Fixes Bug #345096.
r14373 | chris | 2006-06-16 19:14:13 -0400 (Fri, 16 Jun 2006) | 3 lines
M /gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
Restore non-editing state when cancelled editing is complete.
Fixes Bug #344870, which was a regression caused by r11892.
2006-06-16 David Hampton <hampton@employees.org>
* src/register/register-gnome/gnucash-item-edit.c: Correctly
indicate the focus state of the register. Fixes #342055.
* src/gnome-utils/gnc-main-window.[ch]:
* src/gnome/gnc-plugin-page-account-tree.c: Instead of marking the
first page so that it can't be closed, mark the first *accounts*
page so that it can't be closed.
* src/register/register-gnome/gnucash-header.c: Remove five year
old workaround for a resizing bug. Fixes #344764. Also
explicitly initialize a couple of variables.
2006-06-14 David Hampton <hampton@employees.org>
* src/app-utils/gnc-ui-util.c: Restore the auto decimal places
settings from gconf at startup. Fixes #344938.
* src/business/business-gnome/glade/invoice.glade: The Chargeback
and Extra Payments sections of the bill should not expand to fill
extra space.
* src/business/business-ledger/gncEntryLedgerLoad.c: Use the new
mechanism for the account list popups. Fixes #342058.
* src/import-export/hbci/gnc-hbci-utils.c: HBCI data is already in
utf8. Don't recode into the local charset (which may not be utf8).
2006-06-14 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/gnc-hbci-utils.c: Similarly ensure for
aqbanking/mt940 import that all retrieved strings will be valid
utf8.
2006-06-13 David Hampton <hampton@employees.org>
* src/import-export/qif-import/druid-qif-import.c: Do a better job
of turning the busy cursor on/off. Now works correctly if there's
a failure in the input file.
* src/core-utils/gnc-glib-utils.[ch]:
* src/core-utils/gw-core-utils-spec.scm:
* src/import-export/qif-import/qif-file.scm:
* src/import-export/ofx/gnc-ofx-import.c: Strip all invalid utf8
characters from imported QIF and OFX/QFX strings. This fixes bugs
#106203 #338296 #344170 and #344219. Long term gnucash should be
enhanced to learn/remember the input encoding and automatically
convert to utf8.
2006-06-13 Derek Atkins <derek@ihtfp.com>
* configure.in: force-enable hbci if the user enables mt940
2006-06-13 David Hampton <hampton@employees.org>
* src/quotes/gnc-fq-helper.in: Tell gnucash that a currency quote
failed instead of just abandoning the request. Fixes #344546.
r14354 | chris | 2006-06-12 20:35:47 -0400 (Mon, 12 Jun 2006) | 2 lines
M /gnucash/trunk/src/import-export/qif-import/qif-parse.scm
Don't crash when parsing empty string as date. Fixes #344466.
2006-06-12 David Hampton <hampton@employees.org>
* src/engine/Account.c: When committing an account during the
closing of a book, don't search the engine for splits that are in
the process of being assigned to the account but aren't yet linked
into the account. This eliminates an O(n*m) operation that will
never find any work to perform. Fixes #344473.
* src/quotes/gnc-fq-check.in: Quote the F::Q version number so
that it will be correctly parsed as a string.
2006-06-09 David Hampton <hampton@employees.org>
* doc/examples/*.qif: Tell subversion these files are text.
* src/doc/valgrind.txt:
* src/doc/Makefile.am:
* src/gnome-utils/ui/gnc-main-window-ui.xml:
* src/gnome-utils/gnc-main-window.c:
* configure.in: Move the valgrind reference code from a compiled
file to a documentation file. The start/stop valgrind command
didn't work as well as I'd hoped. Fixes #344353.
2006-06-07 David Hampton <hampton@employees.org>
* src/business/business-gnome/business-gnome.scm: Restore the
business reports menu.
r14345 | chris | 2006-06-06 21:34:54 -0400 (Tue, 06 Jun 2006) | 4 lines
M /gnucash/trunk/src/register/ledger-core/split-register-util.c
Um, uhh, important code change. Might fix #343798.*
(*) Might also do strange things to the register, esp. cursor motion.
2006-06-06 David Hampton <hampton@employees.org>
* src/business/business-gnome/glade/billterms.glade: Hide notebook
tabs on programmatically changed notebook.
2006-06-05 Chris Lyttle <chris@wilddev.net>
* packaging/gnucash-1.9.x.ebuild: Update to use -docs-1.9.0
2006-06-05 Chris Lyttle <chris@wilddev.net>
* NEWS: Added some text about the release.
* configure.in: Change to version 1.9.7
2006-06-05 David Hampton <hampton@employees.org>
* src/gnome-utils/gnc-menu-extensions.c: Fix "missing icon" menu
icons on FC6.
2006-06-04 David Hampton <hampton@employees.org>
* src/gnome-utils/gnc-icons.c:
* src/gnome-utils/test/test-gnc-dialog.c: Include "config.h".
2006-06-04 Derek Atkins <derek@ihtfp.com>
* configure.in:
* various Makefile.am files:
Move the GLIB26 compatibility checks to configure.in.
Just modify GLIB_LIBS and GLIB_CFLAGS so everyone properly
links against the glib26 compatibility library when necessary.
2006-06-04 David Hampton <hampton@employees.org>
* various Makefile.am files: Don't ever reference lib/glib26 if
the host system has glib 2.6 or better installed.
* various Makefile.am files: Add lib/glib26 to the include and
library paths.
* src/gnome-utils/gnc-plugin-page.h: Include gkeyfile.h instead of
explicitly declaring a data type. This prevents include file
ordering problems.
2006-06-04 Derek Atkins <derek@ihtfp.com>
* src/gnome-utils/gnc-plugin-file-history.c:
swap the #includes so it builds on FC3 w/ glib-2.4
2006-06-04 David Hampton <hampton@employees.org>
* src/gnome-utils/gnc-plugin-file-history.c: If the g2 file
history list is empty, then copy the file history list over from
Gnucash 1.x gnome settings file. #342724.
2006-06-04 Joshua Sled <jsled@asynchronous.org>
* src/register/register-gnome/gnucash-item-edit.c (gnc_item_edit_selection_received)
(gnc_item_edit_selection_get, gnc_item_edit_paste_clipboard)
(gnc_item_edit_paste_primary, gnc_item_edit_new): Use the
selection type UTF8_STRING for copy/paste rather than the combination
of COMPOUND_TEXT, TEXT and STRING, as the LCD STRING is inadequate
for interesting characters, and it is what the rest of GTK does.
* src/register/register-gnome/gnucash-item-edit.c
(gnc_item_edit_selection_get),
(gnc_item_edit_selection_received): Handle selections more
correctly in a utf8 world, within GnuCash at least. Fixes
Bug#333299.
* src/gnome/druid-loan.c (ld_get_pmt_formula)
(ld_get_ppmt_formula, ld_get_ipmt_formula): Treat all numbers in a
auto-decimal-point-safe way. Bug#343795.
2006-06-04 Andreas Köhler <andi5.py@gmx.net>
* src/gnome-utils/gnc-html.[ch]:
* src/report/report-gnome/gnc-plugin-page-report.c: Add
gnc_html_copy and enable report pages to copy to clipboard.
Fixes #343645.
* src/gnome/gnc-plugin-page-register.c: Readd descriptions for
Cut/Copy/Paste actions in register pages.
r14302 | chris | 2006-06-03 10:51:10 -0400 (Sat, 03 Jun 2006) | 3 lines
M /gnucash/trunk/src/backend/file/test/test-load-backend.c
M /gnucash/trunk/src/backend/file/test/test-load-xml2.c
M /gnucash/trunk/src/backend/postgres/test/test-db.c
M /gnucash/trunk/src/backend/postgres/test/test-load-backend.c
M /gnucash/trunk/src/backend/postgres/test/test-period.c
When loading the gmodule backends from the test suite, look in ../.libs
for the real module.
r14301 | chris | 2006-06-03 09:42:53 -0400 (Sat, 03 Jun 2006) | 2 lines
M /gnucash/trunk/configure.in
M /gnucash/trunk/po/POTFILES.skip
M /gnucash/trunk/src/backend/file/Makefile.am
M /gnucash/trunk/src/backend/file/gnc-backend-file.c
M /gnucash/trunk/src/bin/gnucash-bin.c
M /gnucash/trunk/src/import-export/Makefile.am
Disable support for the old binary file format.
2006-06-03 Derek Atkins <derek@ihtfp.com>
* src/engine/Split.c:
Properly round values when setting the Base Value. Fixes #337505.
* src/business/dialog-tax-table/tax-tables.glade:
fix a string. It should be "Edit" not "gtk-edit". This string
is already translated, so shouldn't be an issue for the string
freeze.
2006-06-03 Joshua Sled <jsled@asynchronous.org>
* src/gnome/ui/gnc-plugin-page-register-ui.xml:
* src/gnome/ui/gnc-plugin-page-account-tree-ui.xml:
* src/gnome/glade/lots.glade:
* src/gnome/gnc-plugin-page-account-tree.c:
* src/gnome/gnc-plugin-page-register.c:
* src/gnome/lot-viewer.c: Re-enable View Lots; disable 'View' button. Fix
clist/lot-title handling bug. Bug#343772.
2006-06-03 David Hampton <hampton@employees.org>
* src/register/register-gnome/combocell-gnome.c:
* src/register/register-gnome/gnucash-item-list.[ch]: Only use the
amount of space required to show all the entries in the popup, not
all the available space. Fixes #343242.
* src/register/register-gnome/gnucash-sheet.c: The register code
shouldn't process any keystrokes that have a "modifier" (e.g. Alt,
Meta, etc.) key pressed. This allows Alt-Ctl-Pgup/Down in a
register to change the notebook page, just like from the accounts
page. Also remove some dead code. Fixes #343228.
2006-06-03 Andreas Köhler <andi5.py@gmx.net>
* src/gnome-utils/Makefile.am:
* src/gnome-utils/druid-gnc-xml-import.c:
* src/backend/file/io-gncxml-v2.h: Link gnome-utils against
backend/file and remove symbol lookup in druid-gnc-xml-import.c.
* src/register/register-gnome/gnucash-sheet.c: Add GDK_Menu as
shortcut for showing register popups. Fixes 343244.
2006-06-02 David Hampton <hampton@employees.org>
* src/gnome-utils/gnc-main-window.c:
* src/gnome-utils/gnc-window.c: The progress bar changes size when
text is added/removed. Prevent these changes by setting the text
to a single space when there is no text to display. Fixes
#343455.
* src/gnome/window-reconcile.c: Limit the reconciliation date to
the past or today, never the future. Fixes #343527.
2006-06-01 Derek Atkins <derek@ihtfp.com>
* configure.in: Don't need to patch libtool for darwin anymore.
Patch by David Reiser.
* src/gnome-utils/dialog-preferences.c: fix non-C99 construct so
the file builds again.
* po/nb.po: updated Norwegian Bokmål translation by Sigve Indregard
* src/backend/Makefile.am:
* src/backend/gnc-backend-api.h:
deleted gnc-backend-api.h, which isn't needed by anything
* src/backend/file/gnc-backend-file.[ch]:
make "gnc_new_backend()" into a private function. It's
never called from anywhere, so it's not needed in the API.
* src/backend/file/Makefile.am:
Build a shared library (libgnc-backend-file-utils) and a
loadable module (libgnc-backend-file). This should let us
build on MacOS AND windows.
* src/business/business-core/file/Makefile.am:
* src/gnome/Makefile.am:
link against libgnc-backend-file-utils
2006-06-01 Andreas Köhler <andi5.py@gmx.net>
* src/gnome-utils/dialog-preferences.c: Do not try to find
positions for alphabetic insertions of add_on pages, but rather
append and then sort pages in the end. Solves appearance of pref
dialog in non-C locales.
* src/gnome-utils/glade/preferences.glade: Move "Accounting
Period" to the top, regardless of above.
* src/gnome-utils/gnc-main-window.c: Cancel renaming of a page
when GDK_Escape is pressed. Fixes #343226.
r14285 | chris | 2006-05-31 21:44:53 -0400 (Wed, 31 May 2006) | 6 lines
M /gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c
Restore two behaviors removed by r14283, and add a third.
1) Invalidate outstanding iterators when a row is inserted or deleted.
2) Emit row_changed for ancestors of inserted or deleted row.
New) Emit row_changed for ancestors of a changed account, too.
2006-05-31 Andreas Köhler <andi5.py@gmx.net>
* src/gnome-utils/gnc-tree-model-account.c: Replace
gnc_tree_model_account_path_changed with manual checks whether
the inserted (resp. deleted) account is the first (resp. last)
account in its level and call gtm_row_has_child_toggled only in
these cases. Might fix #343405, as GtkTreeModelFilter seems to
make (false) assumptions when being woken up too often.
2006-05-31 Derek Atkins <derek@ihtfp.com>
* po/es.po: Updated Spanish Translation from Eneko Lacunza
* src/business/business-core/gncAddress.c: remove some duplicated code.
2006-05-30 David Hampton <hampton@employees.org>
* various: Update the help file names now that the docs are xml
instead of html. Fixes #343255.
* src/scm: Remove old help-topics-index files.
r14276 | chris | 2006-05-30 20:56:10 -0400 (Tue, 30 May 2006) | 3 lines
M /gnucash/trunk/src/gnome/gnucash.desktop.in
M /gnucash/trunk/src/pixmaps/Makefile.am
GNOME integration, part 2. Bug #342936.
Use the same icon for the window manager as for the desktop.
r14251 | chris | 2006-05-29 18:07:10 -0400 (Mon, 29 May 2006) | 4 lines
M /gnucash/trunk/src/gnome/Makefile.am
M /gnucash/trunk/src/gnome/gnucash.desktop.in
D /gnucash/trunk/src/gnome/gnucash.keys.in
D /gnucash/trunk/src/gnome/gnucash.mime
M /gnucash/trunk/src/pixmaps/Makefile.am
Improve GNOME desktop integration. Bug #342936
Patch supplied by Stanislav Brabec <sbrabec@suse.cz>.
r14237 | chris | 2006-05-29 15:24:38 -0400 (Mon, 29 May 2006) | 3 lines
M /gnucash/trunk/src/business/business-reports/aging.scm
Fix a crash in the aging report. Breaks a string, but seeing English is
better than seeing a guile stack trace.
r14233 | chris | 2006-05-29 00:53:40 -0400 (Mon, 29 May 2006) | 2 lines
M /gnucash/trunk/Makefile.am
revert r14177 because it fails make dist.
r14232 | chris | 2006-05-29 00:52:23 -0400 (Mon, 29 May 2006) | 4 lines
M /gnucash/trunk/src/bin/gnucash-bin.c
M /gnucash/trunk/src/engine/gnc-engine.c
Move the error-handling of failure to initialize the engine from
gnc-engine.c to gnucash-bin.c. This allows tests that call
gnc_engine_init() but fail to find a backend to still pass.
2006-05-29 Joshua Sled <jsled@asynchronous.org>
* packaging/gnucash-1.9.x.ebuild: Remove support for being a
dual-nature -release and -svn ebuild. Misc cleanups.
2006-05-29 Andreas Köhler <andi5.py@gmx.net>
* src/backend/file/io-gncxml-v2.c: Add wait_for_gzip to avoid
reading from a file that is still being written to by a child
process, a race condition at the end of the xml import druid.
2006-05-28 David Hampton <hampton@employees.org>
* src/pixmaps/gnucash_splash.png: New splash screen from Joshua
Facemyer / Impressus Art <faceman@impressusart.com>.
* po/en_GB.po: Updated translation from Nigel Titley.
* src/backend/file/io-gncxml-v2.c: Fix gcc4 complaint about unused
return value of the write function.
2006-05-28 Andreas Köhler <andi5.py@gmx.net>
* src/backend/file/gnc-backend-file.c:
* src/backend/file/io-gncxml-v2.c: Move is_gzipped_file to
io-gncxml-v2.c. Extend try_gz_open to read from gzipped files.
Let gnc_xml2_find_ambiguous and parse_with_subst_push_handler
read gzipped files.
* src/backend/file/sixtp.c:
* src/backend/file/sixtp.h: Add gnc_is_our_first_xml_chunk.
* src/backend/file/io-gncxml-v2.h:
* src/gnome-utils/druid-gnc-xml-import.c: Remove "error" from
argument list of gnc_xml2_find_ambiguous.
r14213 | chris | 2006-05-27 22:23:37 -0400 (Sat, 27 May 2006) | 7 lines
M /gnucash/trunk/src/gnome-utils/gnc-tree-view.c
The description for the "sort_column" gconf key of the tree_views says,
"Possible values for this setting are the name of any column in this
dialog (see the column_order key) or the keyword 'none'."
The third click on a column header removes the sorting by that column.
This patch will now store 'none' for the sort_column in that case.
r14212 | chris | 2006-05-27 15:05:41 -0400 (Sat, 27 May 2006) | 12 lines
M /gnucash/trunk/src/gnome-utils/gnc-tree-view.c
Use GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID instead of '0' as the
fallback sort column, since column 0 may not be sortable with the
default sort function.
Set the MODEL_COLUMN column property, even when it is -1, since
gnc_tree_view_set_sort_column() looks for this condition.
Make the gnc_tree_view_count_visible_columns() function only count regular
columns, so that the special columns don't count, but count any
DEFAULT_VISIBLE columns, even if they've been hidden by gconf. That way,
the special columns will still show and allow the user to unhide columns.
r14210 | chris | 2006-05-27 10:19:48 -0400 (Sat, 27 May 2006) | 3 lines
M /gnucash/trunk/lib/libqof/backend/file/Makefile.am
M /gnucash/trunk/src/backend/file/Makefile.am
M /gnucash/trunk/src/backend/postgres/Makefile.am
Add -avoid-version to LDFLAGS of gmodule backends.
Hopefully this will solve the problem Macs are having dlopen'ing them.
2006-05-27 Joshua Sled <jsled@asynchronous.org>
* packaging/gnucash-1.9.x.ebuild: Add docs extraction, un-slot,
un-/opt-ize.
2006-05-27 Andreas Köhler <andi5.py@gmx.net>
* src/gnome-utils/druid-gnc-xml-import.c: When the user chooses
another default encoding, do not recheck the file for ambiguous
words, but rather just resort what has been found before.
2006-05-26 Derek Atkins <derek@ihtfp.com>
* src/engine/gnc-engine.c: load the qsf backend from the right place.
* src/engine/gnc-engine.c:
force-exit gnucash if a required library can't be loaded.
* src/engine/gnc-engine.c:
* lib/libqof/qof/qofsession.c:
QOF should load its own backend libraries.
It shouldn't depend on apps to load QOF libraries.
Make sure app-defined backends are used first.
Fix a memory leak in qofsession.
2006-05-26 Christian Stimming <stimming@tuhh.de>
* src/import-export/hbci/druid-hbci-initial.c: Simplify calling
the aqhbci setup wizard for aqbanking>=1.9.1 because we don't need
to select an aqbanking backend beforehand.
2006-05-25 Chris Shoemaker <chris.shoemaker@cox.net>
* configure.in: REactivate --enable-sql by reverting part of r14175
see bug#332251.
r14200 | chris | 2006-05-25 20:23:34 -0400 (Thu, 25 May 2006) | 2 lines
M /gnucash/trunk/ChangeLog
M /gnucash/trunk/configure.in
REactivate --enable-sql by reverting part of r14175; see bug#332251
r14199 | chris | 2006-05-25 20:14:28 -0400 (Thu, 25 May 2006) | 4 lines
M /gnucash/trunk/src/engine/gnc-engine.c
Load the file backend _after_ the qsf backend, so that it gets tried
_before_ the qsf backend, because the qsf backend prints some noisy error
messages while figuring out that the gnucash file isn't a qsf file.
r14198 | chris | 2006-05-25 20:10:35 -0400 (Thu, 25 May 2006) | 3 lines
M /gnucash/trunk/ChangeLog
M /gnucash/trunk/lib/libqof/backend/file/Makefile.am
M /gnucash/trunk/lib/libqof/backend/file/qof-backend-qsf.h
M /gnucash/trunk/lib/libqof/backend/file/qsf-backend.c
M /gnucash/trunk/lib/libqof/qof/guid.c
M /gnucash/trunk/lib/libqof/qof/qof.h
M /gnucash/trunk/lib/libqof/qof/qofbackend-p.h
M /gnucash/trunk/lib/libqof/qof/qofbackend.c
M /gnucash/trunk/lib/libqof/qof/qofbackend.h
M /gnucash/trunk/lib/libqof/qof/qofbook.c
M /gnucash/trunk/lib/libqof/qof/qofsession-p.h
M /gnucash/trunk/lib/libqof/qof/qofsession.c
M /gnucash/trunk/lib/libqof/qof/qofsession.h
M /gnucash/trunk/lib/libqof/qof/qofutil.c
M /gnucash/trunk/lib/libqof/qof/qofutil.h
M /gnucash/trunk/src/backend/file/gnc-backend-file.c
M /gnucash/trunk/src/backend/file/gnc-backend-file.h
M /gnucash/trunk/src/backend/file/test/test-load-backend.c
M /gnucash/trunk/src/backend/file/test/test-load-xml2.c
M /gnucash/trunk/src/backend/postgres/Makefile.am
M /gnucash/trunk/src/backend/postgres/PostgresBackend.c
M /gnucash/trunk/src/backend/postgres/PostgresBackend.h
M /gnucash/trunk/src/backend/postgres/test/test-db.c
M /gnucash/trunk/src/backend/postgres/test/test-load-backend.c
M /gnucash/trunk/src/backend/postgres/test/test-period.c
M /gnucash/trunk/src/engine/Account.c
M /gnucash/trunk/src/engine/Makefile.am
M /gnucash/trunk/src/engine/Period.c
M /gnucash/trunk/src/engine/Transaction.c
M /gnucash/trunk/src/engine/gnc-commodity.h
M /gnucash/trunk/src/engine/gnc-engine.c
M /gnucash/trunk/src/engine/gnc-engine.h
M /gnucash/trunk/src/engine/gnc-pricedb.c
M /gnucash/trunk/src/engine/gnc-session-scm.c
M /gnucash/trunk/src/engine/gnc-session-scm.h
M /gnucash/trunk/src/engine/gw-engine-spec.scm
M /gnucash/trunk/src/gnome-utils/gnc-file.c
M /gnucash/trunk/src/gnome-utils/gnc-html-graph-gog.c
M /gnucash/trunk/src/gnome-utils/gnc-main-window.c
Merge 'misc-backend' -r 14160:14184 into trunk.
This includes the now semi-functional postgres backend.
2006-05-24 Joshua Sled <jsled@asynchronous.org>
* src/register/ledger-core/split-register-load.c (skip_cb):
+1 -1
View File
@@ -1,6 +1,6 @@
- Current -
Chris Lyttle <chris@wilddev.net>
Christian Stimmings <stimming@tuhh.de>
Christian Stimming <stimming@tuhh.de>
Jon Lapham <lapham@extracta.com.br>
- Past -
+13 -24
View File
@@ -74,53 +74,42 @@ TIPS AND HINTS
Starting Gnucash from the build tree:
-------------------------------------
To run gnucash from your build tree:
-- edit ./src/bin/overrides/gnucash and replace gnucash-env with
./src/bin/overrides/gnucash-build-env
-- then start gnucash by saying ./src/bin/overrides/gnucash
-- Make sure you undo this change before installing gnucash
Getting Trace Messages From GnuCash:
------------------------------------
Note that piping stdout from gnucash to a file causes gnucash to crash.
Don't know why, this is a bug that needs to be fixed. Here's another
way to get trace messages into a file:
-- edit src/engine/gnc-trace.c, adjust values in the array
gnc_log_modules[] to what you want to have for a given module.
-- edit gnc_log_init() to fopen() the log file where you want
messages to go to.
-- edit src/engine/gnc-engine.c and find the call to qof_log_set_level
for the module you are intersted in. Adjust the log level
appropriately.
-- edit the call to qof_log_file_init() in this same file to change
where you want messages to go to.
Starting GnuCash in GDB
-----------------------
To run gdb on an installed version of gnucash (installed in /opt/gnc/unstable:)
% /opt/gnc/unstable/bin/gnucash-env gdb /opt/gnc/unstable/bin/gnucash-bin
% /opt/gnc/unstable/bin/gnucash &
[ pid number output here ]
% gdb /opt/gnc/unstable/bin/gnucash-bin
[gdb output]
% gdb> run [--g-fatal-warnings]
gdb> attach <pid>
To run gdb on the version in your build tree:
% ./src/bin/overrides/gnucash-build-env gdb /usr/bin/guile
[gdb output]
% gdb> run -e main -s ./src/bin/overrides/gnucash --g-fatal-warnings
You'll also probably want to know about these:
% gdb> catch fork
% gdb> set follow-fork-mode child
gdb> catch fork
gdb> set follow-fork-mode child
-----
It may be the case that running GDB from within emacs doesn't work for you,
with the following error:
[C-u M-x gdb /opt/gnucash-cvs/bin/gnucash-env gdb /opt/gnucash-cvs/bin/gnucash-bin
[C-u M-x gdb /opt/gnucash-cvs/bin/gnucash-bin
...in buffer *gud-gdb*:]
/opt/gnucash-cvs/libexec/gnucash/overrides/gnucash-env: line 28: exec: -d: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]
(gdb) attach <pid>
jsled needed to re-define a gud.el function as such:
+2 -2
View File
@@ -17,9 +17,9 @@ etags.files: $(shell find . -mindepth 1 -type d ! -name CVS ! -path "*/.*")
# we don't need an etags.files dep here b/c you always call this after
# re-generating etags.files if needed from the top-level Makefile.am.
TAGS: $(shell cat etags.files)
rm TAGS
if [ -f TAGS ]; then rm TAGS; fi
cat etags.files | xargs -n 200 etags --append
tags: $(shell cat etags.files)
rm tags
if [ -f TAGS ]; then rm tags; fi
cat etags.files | xargs -n 200 ctags --append
+2 -2
View File
@@ -75,7 +75,8 @@ EXTRA_DIST = \
po/glossary/zh_TW.po \
intltool-extract.in \
intltool-merge.in \
intltool-update.in
intltool-update.in \
util/gnc-svnversion
bin_SCRIPTS = gnucash-config
@@ -156,7 +157,6 @@ distcleancheck_listfiles = \
find -type f -exec sh -c 'test -f ${srcdir}/{} || echo {}' ';'
dist-hook: po/POTFILES.in
rm -f $(distdir)/po/*.gmo
distcheck-hook:
@e=''; \
+70
View File
@@ -1,6 +1,76 @@
Version history:
------- -------
2.0.0 - 9 July 2006
o Release of new stable version 2.0.0.
o GnuCash 2.0 is based on state-of-the-art gtk2 GUI technology.
o GnuCash 2.0 follows the Gnome Human Interface Guidelines (HIG) for
a consistent behaviour and look-and-feel for the whole Desktop.
o New tabbed window.
o New importing feature: OFX DirectConnect can directly retrieve and
import account statements over the Internet.
o Implemented a "Hide account" feature to keep a better overview of
your current accounts.
o Implemented the ability to create budgets within GnuCash using
your account data.
o New importing feature: MT940 files can be imported (in addition to
QIF files and OFX files).
o The data file format has been improved with respect to
international characters. Data files with international characters
can be transferred to other countries flawlessly.
o Support for Accounting Periods.
o GnuCash Help and Guide are now fully integrated with the GNOME Help
system (Yelp).
o New releases of Finance::Quote and LibOFX will be coming soon to
update support for GnuCash 2.0.0.
1.9.8 - 18 June 2006
o Welcome to GnuCash 1.9.8 aka "Grab that cash with both hands and
make a stash" the first release candidate of the GnuCash Open Source
Accounting Software which will eventually lead to the stable version
2.0.0. This release contains many bugfixes since the second beta
release.
o PLEASE TEST any and all features important to you. Then post any
bugs you find to bugzilla
http://bugzilla.gnome.org/enter_bug.cgi?product=GnuCash
o We would like to encourage people to test this and any further
releases as much as possible and submit bug reports in order that we
can polish GnuCash to be as stable as possible for the 2.0.0 release
in a few weeks.
o Major bugfixes include -
o More Register fixes.
o Restore the business reports menu.
o QIF import and HBCI fixes.
o Fixes for currencies.
o Fixes to business invoices.
o General UI fixes.
1.9.7 - 04 June 2006
o Welcome to GnuCash 1.9.7 aka "Banking on Gnu Cash!" the second
beta release of the GnuCash Open Source Accounting Software which will
eventually lead to the stable version 2.0.0. This release contains
many bugfixes since the first beta release.
o PLEASE TEST any and all features important to you. Then post any
bugs you find to bugzilla
http://bugzilla.gnome.org/enter_bug.cgi?product=GnuCash
o We would like to encourage people to test this and any further
releases as much as possible and submit bug reports in order that we
can polish GnuCash to be as stable as possible for the 2.0.0 release
in a few weeks.
o Major bugfixes include -
o Hide not finished funtionality for the 2.0 release
o Fixes to lots functionality
o Fixes to XML import
o Patches to work with guile 1.8
o HBCI fixes
o Many updated translations.
o New splash screen from Joshua Facemyer / Impressus Art
o Fix the help file names now the docs are xml instead of html.
o Fixes for MacOS and Windows builds
o Fixes to progress bar.
o UTF8 fixes
o Fixes for glib 2.6
1.9.6 - 14 May 2006
o Welcome to GnuCash 1.9.6 aka "Time to make a difference" the first
beta release of the GnuCash Open Source Accounting Software which will
+14 -15
View File
@@ -1,13 +1,13 @@
############################################################
GnuCash 1.9.x README file.
GnuCash 2.1.x README file.
NOTE: THIS IS A DEVELOPMENT RELEASE!!! THIS VERSION HAS NOT
BEEN TESTED PROPERLY AND MAY DO ABSOLUTELY ANYTHING!
NOTE: THIS IS A DEVELOPMENT RELEASE!!! THIS VERSION HAS NOT
BEEN TESTED PROPERLY AND MAY DO ABSOLUTELY ANYTHING!
USE AT YOUR OWN RISK (AND KEEP *LOTS* OF BACKUPS)
USE AT YOUR OWN RISK (AND KEEP *LOTS* OF BACKUPS)
If you want something a bit more tested, please use the
1.8 stable series.
If you want something a bit more tested, please use the
1.8 stable series.
------------------------------------------------------------
##################
@@ -15,7 +15,6 @@ Table of Contents:
------------------
- Overview
- Upgrading from 1.6.x
- Upgrading from 1.8.x
- Dependencies
- Invocation/running
@@ -23,7 +22,7 @@ Table of Contents:
- Building & Installing
- Supported Platforms
- Additional Download Sites
- Getting the Source via CVS
- Getting the Source via SVN
- Developing GnuCash
########
@@ -140,7 +139,7 @@ http://www.gnucash.org/en/hacking.phtml
Upgrading from earlier versions
-------------------------------
There are many, many changes from the 1.6 series - have a look at the
There are many, many changes from the 1.8 series - have a look at the
NEWS file if you want more details. In particular:
- GnuCash now requires g-wrap 1.3.4 or better. See the "dependencies"
@@ -164,7 +163,7 @@ Dependencies
The following packages are required to be installed to run GnuCash:
[FIXME; see README.dependencies]
[see README.dependencies]
To be able to use certain features of GnuCash, such as reports and
network stock price downloads, you must have the following packages
@@ -179,7 +178,7 @@ versions of required packages.
To use the new import features (OFX and HBCI) you need to obtain
the following;
libofx: This library provide support for OFX file imports.
GnuCash-1.8.10 and newer needs at least the version libofx-0.7.0
GnuCash-2.0.0 and newer needs at least the version libofx-0.7.0
or newer. Sources can be found at
http://sourceforge.net/projects/libofx/
aqbanking: This library provide support for HBCI online actions.
@@ -331,7 +330,7 @@ details.
Supported Platforms
-------------------
GnuCash 1.8.x is known to work with the following operating systems:
GnuCash 2.0.x is known to work with the following operating systems:
GNU/Linux -- x86, Sparc, PPC
Solaris -- Sparc
@@ -410,10 +409,10 @@ directory to be called, and is optional. If you leave it out,
you'll have a directory called "trunk" created containing all the
source code.
If you want the latest 1.8.x code, you'd need to pull from the
1.8 branch, as follows:
If you want the latest 2.0.x code, you'd need to pull from the
2.0 branch, as follows:
svn checkout http://svn.gnucash.org/repo/gnucash/branches/1.8 gnucash-1.8
svn checkout http://svn.gnucash.org/repo/gnucash/branches/2.0 gnucash-2.0
##################
+1
View File
@@ -12,6 +12,7 @@ account_DATA = \
acctchrt_otherasset.gnucash-xea \
acctchrt_otherloan.gnucash-xea \
acctchrt_studium.gnucash-xea \
acctchrt_skr03.gnucash-xea \
acctchrt_skr04.gnucash-xea
File diff suppressed because it is too large. Load diff
+6
View File
@@ -187,6 +187,9 @@ esac
dr=${srcdir}
echo "Creating $dr/po/POTFILES.in ..."
test -r $dr/po/POTFILES.in || touch $dr/po/POTFILES.in
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
@@ -199,6 +202,9 @@ echo
echo "Ensure $dr/aclocal.m4 is writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
echo "Ensure $dr/po/POTFILES.in is writable ..."
test -r $dr/po/POTFILES.in && chmod u+w $dr/po/POTFILES.in
echo "Running ${INTLTOOLIZE} --force --copy ..."
${INTLTOOLIZE} --force --copy || \
{ echo "**Error**: ${INTLTOOLIZE} failed."; exit 1; }
+117 -71
View File
@@ -20,7 +20,7 @@ dnl Process this file with autoconf to produce a configure script.
# Autoconf initialization
AC_PREREQ(2.59)
AC_INIT([gnucash], [1.9.6], [gnucash-devel@gnucash.org])
AC_INIT([gnucash], [2.0.99], [gnucash-devel@gnucash.org])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR(src/engine/Transaction.h)
@@ -93,7 +93,7 @@ AC_PROG_MAKE_SET
AC_PROG_LN_S
AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h sys/times.h)
AC_CHECK_HEADERS(limits.h sys/times.h sys/wait.h)
AC_CHECK_FUNCS(stpcpy memcpy timegm towupper)
AC_CHECK_FUNCS(setenv,,[
AC_CHECK_FUNCS(putenv,,[
@@ -103,10 +103,10 @@ AC_CHECK_FUNCS(setenv,,[
STRUCT_TM_GMTOFF_CHECK
SCANF_LLD_CHECK
if test $am_cv_scanf_lld = "no"; then
if test x$am_cv_scanf_lld = "xno"; then
SCANF_QD_CHECK
if test $am_cv_scanf_qs = "no"; then
if test x$am_cv_scanf_qs = "xno"; then
AC_MSG_ERROR([cannot continue, no long long conversion support in scanf])
fi
fi
@@ -154,7 +154,11 @@ then
AC_DEFINE(HAVE_GLIB26,1,[System has glib 2.6.0 or better])
HAVE_GLIB26=yes
else
GLIB24_LIBS="$GLIB_LIBS"
GLIB_LIBS="\${top_builddir}/lib/glib26/libgncglib.la $GLIB_LIBS"
GLIB_CFLAGS="-I\${top_srcdir}/lib/glib26 $GLIB_CFLAGS"
AC_MSG_RESULT(no)
AC_SUBST(GLIB24_LIBS)
fi
AM_CONDITIONAL(HAVE_GLIB26, test "x$HAVE_GLIB26" = "xyes" )
@@ -213,14 +217,15 @@ case $host_os in
update to latest darwin])
;;
darwin*)
AC_CHECK_HEADERS(popt.h)
AC_MSG_RESULT([yes, patching libtool to always build dylibs])
mv libtool libtool.old
${SED} -e 's/^deplibs_check_method.*/deplibs_check_method=pass_all/g' \
-e 's|^library_names_spec.*|library_names_spec="\\$libname\\$release\\$versuffix.dylib \\$libname\\$release\\${major}.dylib \\$libname.dylib"|g' \
-e 's|^soname_spec.*|soname_spec="\\$libname\\$release\\$major.dylib"|g' \
< libtool.old > libtool
rm libtool.old
AC_MSG_RESULT([yes, moving on...])
# AC_CHECK_HEADERS(popt.h)
# AC_MSG_RESULT([yes, patching libtool to always build dylibs])
# mv libtool libtool.old
# ${SED} -e 's/^deplibs_check_method.*/deplibs_check_method=pass_all/g' \
# -e 's|^library_names_spec.*|library_names_spec="\\$libname\\$release\\$versuffix.dylib \\$libname\\$release\\${major}.dylib \\$libname.dylib"|g' \
# -e 's|^soname_spec.*|soname_spec="\\$libname\\$release\\$major.dylib"|g' \
# < libtool.old > libtool
# rm libtool.old
;;
*)
AC_MSG_RESULT(no)
@@ -308,17 +313,64 @@ AC_SUBST(G_WRAP_LIB_DIR)
AS_SCRUB_INCLUDE(CFLAGS)
AC_MSG_CHECKING([for (g-wrap) guile module])
if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
${GUILE} -c "(use-modules (g-wrap))" > /dev/null 2>&1
then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([
Cannot find the (g-wrap) guile module.
Are you sure you have g-wrap compile-time environment installed?
See http://bugzilla.gnome.org/show_bug.cgi?id=347680
])
fi
AC_MSG_CHECKING([for (g-wrap gw-glib-spec) guile module])
if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
${GUILE} -c "(use-modules (g-wrap gw-glib-spec))" > /dev/null 2>&1
then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([
Cannot find the (g-wrap gw-glib-spec) guile module.
Are you sure you have g-wrap installed with glib support?
See http://bugzilla.gnome.org/show_bug.cgi?id=347404
])
fi
AC_MSG_CHECKING([for SLIB support])
if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
${GUILE} -c "(use-modules (ice-9 slib)) (require 'printf)" > /dev/null 2>&1
then
AC_MSG_RESULT(yes)
else
AC_MSG_ERROR([
Cannot find SLIB. Are you sure you have it installed?
See http://bugzilla.gnome.org/show_bug.cgi?id=347922
])
fi
AC_MSG_CHECKING([for (g-wrap gw-standard) guile module])
if LD_LIBRARY_PATH=$G_WRAP_LIB_DIR:$LD_LIBRARY_PATH \
GUILE_LOAD_PATH=$G_WRAP_MODULE_DIR \
if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
${GUILE} -c "(use-modules (g-wrap gw-standard))" > /dev/null 2>&1
then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_CHECKING([for (g-wrap gw standard) guile module])
if LD_LIBRARY_PATH=$G_WRAP_LIB_DIR:$LD_LIBRARY_PATH \
GUILE_LOAD_PATH=$G_WRAP_MODULE_DIR \
if LD_LIBRARY_PATH="${G_WRAP_LIB_DIR}:${LD_LIBRARY_PATH}" \
GUILE_LOAD_PATH="${G_WRAP_MODULE_DIR}:${GUILE_LOAD_PATH}" \
${GUILE} -c "(use-modules (g-wrap gw standard))" > /dev/null 2>&1
then
AC_MSG_RESULT(yes)
@@ -586,14 +638,6 @@ AC_ARG_ENABLE( sql,
if test "x$enableval" != "xno" ; then
AC_MSG_ERROR([
We are very sorry, but the PostgreSQL backend is currently
completely broken. --enable-sql has been disabled because of this.
See e. g. http://bugzilla.gnome.org/show_bug.cgi?id=332251
])
PGSQL_CFLAGS=`${PG_CONFIG} --includedir`
if test "x$PGSQL_CFLAGS" != x; then
PGSQL_CFLAGS="-I${PGSQL_CFLAGS}"
@@ -718,7 +762,7 @@ then
# This is libofx >= 0.7.x
AC_MSG_RESULT([found ${LIBOFX_VERSION}])
else
if x${want_ofx} = xyes ; then
if test x${want_ofx} = xyes ; then
AC_MSG_ERROR([found ${LIBOFX_VERSION}; Libofx 0.7.0 or newer needed for ofx support])
else
AC_MSG_RESULT([found ${LIBOFX_VERSION}; Libofx 0.7.0 or newer needed for ofx support])
@@ -788,7 +832,8 @@ AC_SUBST(OFX_DIR)
AC_ARG_ENABLE( mt940,
[ --enable-mt940 compile with MT940 support (needs --enable-hbci)],
if test "x$enableval" != "xno" ; then
MT940_DIR=mt940
MT940_DIR=mt940 ;
HBCI_DIR=hbci ;
fi)
if test x${MT940_DIR} = xmt940 ;
then
@@ -879,12 +924,12 @@ AC_SUBST(GNC_HELPDIR)
AC_ARG_ENABLE( etags,
[ --enable-etags enable automatic create of TAGS file],
if test $enableval = yes; then
if test x$enableval = xyes; then
USE_ETAGS=1
fi,
USE_ETAGS=0)
if test ${USE_ETAGS} = 1; then
if test x${USE_ETAGS} = x1; then
AC_CHECK_PROG(GNC_ETAGS_FILE, etags, TAGS)
fi
@@ -895,12 +940,12 @@ AM_CONDITIONAL(GNC_ETAGS_FILE, test x${GNC_ETAGS_FILE} = xTAGS)
AC_ARG_ENABLE( ctags,
[ --enable-ctags enable automatic create of tags file],
if test $enableval = yes; then
if test x$enableval = xyes; then
USE_CTAGS=1
fi,
USE_CTAGS=0)
if test ${USE_CTAGS} = 1; then
if test x${USE_CTAGS} = x1; then
AC_CHECK_PROG(GNC_CTAGS_FILE, ctags, tags)
fi
@@ -988,10 +1033,6 @@ AC_SUBST(enable_latex_docs)
BB_ENABLE_DOXYGEN
# check for callgrind
# ----------------------------------------------------------------------------
AC_CHECK_HEADERS(valgrind/callgrind.h)
### --------------------------------------------------------------------------
### Libraries
LIBS="$LIBS -lm"
@@ -1076,13 +1117,13 @@ then
# check for gtkhtml 3.x versions.
gtkhtml=0
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.8 , [gtkhtml=1] , [gtkhtml=0])
if test $gtkhtml = 0
if test x$gtkhtml = x0
then
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.6 , [gtkhtml=1] , [gtkhtml=0])
if test $gtkhtml = 0
if test x$gtkhtml = x0
then
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.2 , [gtkhtml=1] , [gtkhtml=0])
if test $gtkhtml = 0
if test x$gtkhtml = x0
then
PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.1 , [gtkhtml=1],
AC_MSG_ERROR([Could not find a working gtkhtml version (need 3.1, 3.2, 3.6, or 3.8)]))
@@ -1106,7 +1147,7 @@ esac
AC_ARG_ENABLE( efence,
[ --enable-efence link using efence],
if test $enableval = yes; then
if test x$enableval = xyes; then
EFENCE_LIBS="-lefence"
USE_EFENCE=1
AC_DEFINE(USE_EFENCE,,We are using EFence)
@@ -1150,6 +1191,18 @@ then
AM_CONDITIONAL(HAVE_GTK26, test "x$HAVE_GTK26" = "xyes" )
AC_MSG_CHECKING(for GTK - version >= 2.10.0)
if $PKG_CONFIG 'gtk+-2.0 >= 2.10.0'
then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GTK_2_10,1,[System has gtk 2.10.0 or better])
HAVE_GTK_2_10=yes
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(HAVE_GTK_2_10, test "x$HAVE_GTK_2_10" = "xyes" )
AC_MSG_CHECKING(for pango version >= 1.8.0)
if $PKG_CONFIG 'pango >= 1.8.0'
then
@@ -1257,12 +1310,12 @@ then
PKG_CHECK_MODULES(LIBGSF, $libgsf_reqs)
AC_CHECK_DECL(fdopen, fdopen_works=yes, fdopen_works=no)
if test $fdopen_works = no ; then
if test x$fdopen_works = xno ; then
unset ac_cv_have_decl_fdopen
CFLAGS="$CFLAGS -D_POSIX_SOURCE"
AC_MSG_NOTICE([adding -D_POSIX_SOURCE to CFLAGS])
AC_CHECK_DECL(fdopen, fdopen_works=yes, fdopen_works=no)
if test $fdopen_works = no ; then
if test x$fdopen_works = xno ; then
AC_MSG_ERROR([fdopen is not available])
fi
fi
@@ -1276,12 +1329,12 @@ then
[[struct timeval tv;]])],
struct_timeval_works=yes,
struct_timeval_works=no)
test $struct_timeval_works = yes && break
test x$struct_timeval_works = xyes && break
# Try this for the second attempt:
test $try = 1 && CFLAGS="$CFLAGS -D__EXTENSIONS__"
test x$try = x1 && CFLAGS="$CFLAGS -D__EXTENSIONS__"
done
AC_MSG_RESULT($struct_timeval_works)
if test $struct_timeval_works = no ; then
if test x$struct_timeval_works = xno ; then
AC_MSG_ERROR([struct timeval is not available])
fi
@@ -1300,7 +1353,7 @@ then
[[void *ptr = &lstat]])],
need_bsd2=no, need_bsd2=yes)
AC_MSG_RESULT($need_bsd2)
if test $need_bsd1 = yes -o $need_bsd2 = yes; then
if test x$need_bsd1 = xyes -o x$need_bsd2 = xyes; then
CFLAGS="$CFLAGS -D_BSD_SOURCE"
fi
@@ -1466,18 +1519,18 @@ then
#dnl esac[]dnl
#dnl])
have_gnome=no
if test $want_gnome = no ; then
if test x$want_gnome = xno ; then
AC_MSG_WARN([GNOME support disabled, as requested (Use --with-gnome to enable)])
else
PKG_CHECK_MODULES(LIBGSF_GNOME, $libgsf_gnome_reqs,
[have_gnome=yes],
[if test $want_gnome = yes; then
[if test x$want_gnome = xyes; then
AC_MSG_ERROR([GNOME support requested, but not available.])
else
AC_MSG_WARN([GNOME support disabled, unable to find required version of VFS and/or Bonobo])
fi])
fi
AM_CONDITIONAL(WITH_LIBGSF_GNOME, test $have_gnome = yes)
AM_CONDITIONAL(WITH_LIBGSF_GNOME, test x$have_gnome = xyes)
dnl # LDFLAGS="-no-undefined $LDFLAGS"
@@ -1649,7 +1702,7 @@ then
;;
esac
AC_MSG_RESULT($with_win32)
AM_CONDITIONAL(WITH_WIN32, test $with_win32 = yes)
AM_CONDITIONAL(WITH_WIN32, test x$with_win32 = xyes)
dnl *****************************
dnl FIXME: perhaps declare with AC_ARG_VAR?
@@ -1675,12 +1728,12 @@ then
AC_TRY_COMPILE([#include <math.h>], [double f = M_PI], works_without_bsd_source=yes, works_without_bsd_source=no)
AC_MSG_RESULT($works_without_bsd_source)
if test $works_without_bsd_source = no ; then
if test x$works_without_bsd_source = xno ; then
CFLAGS="$CFLAGS -D_BSD_SOURCE"
AC_MSG_CHECKING([whether M_PI is available with -D_BSD_SOURCE])
AC_TRY_COMPILE([#include <math.h>], [double f = M_PI], m_pi_works=yes, m_pi_works=no)
AC_MSG_RESULT($m_pi_works)
if test $m_pi_works = no ; then
if test x$m_pi_works = xno ; then
AC_MSG_ERROR([M_PI is not available])
fi
fi
@@ -1707,7 +1760,7 @@ then
dnl
dnl On BSD, we seem to need -lm for finite
dnl
if test $ac_cv_func_finite = no; then
if test x$ac_cv_func_finite = xno; then
AC_CHECK_LIB(m, finite,
[AC_DEFINE(HAVE_FINITE, 1,
[Define if the finite function is available]
@@ -1720,7 +1773,7 @@ then
dnl Handle systems that have stuff in -lm.
AC_CHECK_FUNCS(log)
if test $ac_cv_func_log = no; then
if test x$ac_cv_func_log = xno; then
AC_CHECK_LIB(m, log,
[AC_DEFINE(HAVE_LOG, 1,
[Define if the log function is available]
@@ -1744,7 +1797,7 @@ then
float_msg=no
EXTRA_LIBS= EXTRA_INCLUDES=
AC_C_LONG_DOUBLE
if test $ac_cv_c_long_double = yes; then
if test x$ac_cv_c_long_double = xyes; then
have_mandatory_funcs=yes
need_sunmath=0
sunmathlinkstuff='-L/opt/SUNWspro/lib -R/opt/SUNWspro/lib -lsunmath'
@@ -1756,7 +1809,7 @@ then
,
[AC_CHECK_LIB(sunmath,
$ldfunc,
[ if test $need_sunmath = 0; then
[ if test x$need_sunmath = x0; then
# FIXME: better idea?
LDFLAGS="$LDFLAGS $sunmathlinkstuff"
sunmathinclude=`ls -d /opt/SUNWspro/*/include/cc | sed '$!d'`
@@ -1766,7 +1819,7 @@ then
[have_mandatory_funcs=no],
[-L/opt/SUNWspro/lib $GOFFICE_DEPS_LIBS])])])
done
if test $need_sunmath = 1; then
if test x$need_sunmath = x1; then
EXTRA_LIBS="$EXTRA_LIBS $sunmathlinkstuff"
EXTRA_INCLUDES="$EXTRA_INCLUDES -I$sunmathinclude"
AC_CHECK_HEADERS([sunmath.h floatingpoint.h],
@@ -1861,6 +1914,7 @@ then
else
### A bunch of am conditionals that need to be set
AM_CONDITIONAL(HAVE_GTK26, false )
AM_CONDITIONAL(HAVE_GTK_2_10, false)
AM_CONDITIONAL(HAVE_PANGO18, false )
AM_CONDITIONAL(HAVE_LIBGSF, false)
AM_CONDITIONAL(HAVE_GOFFICE, false)
@@ -1963,7 +2017,7 @@ AC_CHECK_FUNCS(pthread_mutex_init)
AC_REPLACE_FUNCS(strptime localtime_r)
#AC_REPLACE_FUNCS(scm_strptime)
if test $am_cv_val_LC_MESSAGES = "no"; then
if test x$am_cv_val_LC_MESSAGES = "xno"; then
LC_MESSAGES_ENUM="LC_ALL"
else
LC_MESSAGES_ENUM="LC_MESSAGES"
@@ -2030,16 +2084,10 @@ then
#warnFLAGS="${warnFLAGS} -Werror-implicit-function-declaration" # In -Wall
# error-on-warning should not be active in (stable) release tarballs
if test -h ${srcdir}/Makefile.am
then
tmp_srcdir=`readlink ${srcdir}/Makefile.am`
real_srcdir="${srcdir}/`dirname ${tmp_srcdir}`"
else
real_srcdir=${srcdir}
fi
if test -d ${real_srcdir}/.svn
${srcdir}/util/gnc-svnversion ${srcdir} >/dev/null 2>&1
if test $? = 0
then
# This code is from SVN, so enable error-on-warning
# This code is from SVN/SVK, so enable error-on-warning
error_on_warning_as_default="yes"
else
# This is from a tarball, so disable error-on-warning
@@ -2067,17 +2115,17 @@ then
# -Wdeclaration-after-statement in order to preserve source code
# compatibility to gcc 2.95 and other compilers.
GCC_VERSION=`${CC} -dumpversion`
if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 3; then
if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 3; then
# This is gcc >= 3.x.x
if test `echo ${GCC_VERSION} | cut -d. -f2` -ge 4; then
if test "`echo ${GCC_VERSION} | cut -d. -f2`" -ge 4; then
# This is gcc >= 3.4.x
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement"
else if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 4; then
else if test "`echo ${GCC_VERSION} | cut -d. -f1`" -ge 4; then
# This is gcc == 4.x.x
warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
# rpmbuild on FC4 forces this flag. Can't hurt to always compile with it.
warnFLAGS="${warnFLAGS} -D_FORTIFY_SOURCE=2"
if test $gwrap_major_version = 1 -a $gwrap_minor_version -lt 9 ; then
if test x$gwrap_major_version = x1 -a "$gwrap_minor_version" -lt 9 ; then
# This is g-wrap 1.3 + gcc4. Test error-on-warning
case "$gnc_error_on_warning" in
auto)
@@ -2239,8 +2287,6 @@ AC_CONFIG_FILES(po/Makefile.in
src/gnome-search/Makefile
src/import-export/Makefile
src/import-export/test/Makefile
src/import-export/binary-import/Makefile
src/import-export/binary-import/test/Makefile
src/import-export/qif-import/Makefile
src/import-export/qif/Makefile
src/import-export/qif/test/Makefile
+3 -6
View File
@@ -27,14 +27,13 @@ as other services, such as bill payment. Features requiring direct access
2. Requirements
------------
LibOFX 0.6.2 or later (in the 0.6x series, for GnuCash 1.8, the interface will
change in later versions)
LibOFX 0.7.0 or later
http://libofx.sourceforge.net/
which in turn requires:
OpenSP 1.3.x or later, http://openjade.sourceforge.net/
Then you enable OFX support by building GnuCash 1.7.x/1.8.x with:
Then you enable OFX support by building GnuCash with:
--enable-ofx added to ./autogen.sh (for CVS) or ./configure (for tarballs)
make
@@ -263,9 +262,7 @@ from bank to bank.
(8) Can I export my Gnucash data in QIF, OFX, CSV, etc. ?
Export capability is currently being built into LibOfx. During the
1.8.x series, Gnucash will be able to export in any format supported by
LibOFX.
Export capability is currently being built into LibOfx.
7. Credits-------
+7 -7
View File
@@ -1,10 +1,10 @@
************ Unstabile Version ******************
Alle Versionen der 1.9.x Serie von GnuCash sind experimentelle
Entwicklungsversionen. Sie koennen normal funktionieren, muessen aber
nicht. Benutzung auf eigene Gefahr!
Die letzte stabile Version war gnucash-1.8.12.
Die nächste stabile Version wird gnucash-2.0.0 sein.
************ Unstabile Version ******************
Alle Versionen der 2.1.x Serie von GnuCash sind experimentelle
Entwicklungsversionen. Sie koennen normal funktionieren, muessen aber
nicht. Benutzung auf eigene Gefahr!
Die letzte stabile Version war gnucash-2.0.0.
Die nächste stabile Version wird gnucash-2.2.0 sein.
##############################################
+14 -12
View File
@@ -50,9 +50,10 @@ http://www.iro.umontreal.ca/contrib/po/HTML/
==============================================================================
2) Get the source from CVS/SVN
FIXME: This section is now outdated since the source is now in SVN
instead of CVS. Please check the website.
****FIXME: This section is now outdated since the source is now in SVN
instead of CVS. Please check the website.*****
#######################################################################
The first thing to do is to download the latest STABLE branch of gnucash
from CVS and get it to compile. Do not use the HEAD branch, since the text
in the HEAD branch changes so much, it would be a waste of time to translate
@@ -65,7 +66,7 @@ cvs -d :pserver:cvs@cvs.gnucash.org:/home/cvs/cvsroot login
Checkout the current stable branch.
cvs -z3 -d :pserver:cvs@cvs.gnucash.org:/home/cvs/cvsroot checkout \
-rgnucash-1-8-branch gnucash
-rgnucash-2-0-branch gnucash
Checkout the documentation (optional, but recommended)
cvs -z3 -d :pserver:cvs@cvs.gnucash.org:/home/cvs/cvsroot checkout \
@@ -73,6 +74,7 @@ cvs -z3 -d :pserver:cvs@cvs.gnucash.org:/home/cvs/cvsroot checkout \
After this initial CVS checkout, you can update your CVS files using:
cvs -d :pserver:cvs@cvs.gnucash.org:/home/cvs/cvsroot update gnucash
########################################################################
==============================================================================
3) Contact the maintainer of your language
@@ -93,7 +95,7 @@ The beginning of your .po file should look something similar to this:
#
msgid ""
msgstr ""
"Project-Id-Version: GnuCash 1.8.3\n"
"Project-Id-Version: GnuCash 2.0.0\n"
"POT-Creation-Date: 2003-05-16 16:42-0300\n"
"PO-Revision-Date: 2003-06-02 12:00-0300\n"
"Last-Translator: Jon Lapham <lapham@extracta.com.br>\n"
@@ -129,7 +131,7 @@ versions.
cd gnucash
./autogen.sh
./configure --enable-debug --prefix=/opt/gnucash-1.8
./configure --enable-debug --prefix=/opt/gnucash-2.0
If autogen complains about missing development packages, find them on your
favorite OS distribution, install it, and try to re-run the autogen command.
@@ -153,7 +155,7 @@ To compile the documentation, enter the gnucash-doc directory and go
through the same process:
./autogen.sh
./configure --prefix=/opt/gnucash-1.8
./configure --prefix=/opt/gnucash-2.0
make
su -
make install
@@ -164,7 +166,7 @@ make install
After installation, insure that it works by running (as a normal user,
no need to be root here):
/opt/gnucash-1.8/bin/gnucash
/opt/gnucash-2.0/bin/gnucash
It is a good idea to use absolute paths like this to insure you run
the proper gnucash executable. To run your OS pre-installed version of
@@ -176,7 +178,7 @@ In either case, you can easily switch between the various languages the
gnucash has available by placing the LANG env var before the call to the
executable:
LANG=pt_BR /opt/gnucash-1.8/bin/gnucash
LANG=pt_BR /opt/gnucash-2.0/bin/gnucash
==============================================================================
6) The glossary file
@@ -318,7 +320,7 @@ make install
Now you can run gnucash with your ned translations:
LANG=XXXX /opt/gnucash-1.8/bin/gnucash
LANG=XXXX /opt/gnucash-2.0/bin/gnucash
When you are happy with the new translation file, email a gzipped version
of it to the gnucash-patches mailing list.
@@ -350,10 +352,10 @@ change the translation to exactly match that of the gnome libraries.
To do this, you need to run gnucash under gdb:
LANG=XXXX /opt/gnucash-1.8/bin/gnucash-env gdb /usr/bin/guile
LANG=XXXX /opt/gnucash-2.0/bin/gnucash-env gdb /usr/bin/guile
Then, from within gdb, issue:
run -e main -s /opt/gnucash-1.8/libexec/gnucash/overrides/gnucash --g-fatal-warnings
run -e main -s /opt/gnucash-2.0/libexec/gnucash/overrides/gnucash --g-fatal-warnings
Eventually, gnucash should crash (because of the --g-fatal-warnings
directive), when it does, issue from within gdb:
@@ -387,7 +389,7 @@ Remember that the translations must contain the proper underscores.
------------
To follow gnucash as it access files,
strace /opt/gnucash-1.8/bin/gnucash
strace /opt/gnucash-2.0/bin/gnucash
==============================================================================
11) How to translate the GnuCash guide and/or help files
+2 -2
View File
@@ -1,7 +1,7 @@
N_( "Warning!! This is a DEVELOPMENT version of GnuCash. \
It probably has lots of bugs and unstable features! \
If you are looking for a stable personal finance application, \
you should use the latest release of GnuCash 1.8.")
you should use the latest release of GnuCash 2.0.")
N_( "The GnuCash online manual has lots of helpful information. \
If you are upgrading from earlier versions of GnuCash, the section \
@@ -30,7 +30,7 @@ mouse button brings up the transaction menu options.")
N_( "To enter multiple-split transactions such as a paycheck with \
multiple deductions, click the Split button in the tool bar. \
Alternatively, in the View -> Style menu, you can choose the register \
Alternatively, in the View menu, you can choose the register \
style Auto-Split Ledger or Transaction Journal.")
N_( "As you enter amounts in the register, you can use the GnuCash \
+1 -1
View File
@@ -9,7 +9,7 @@ else
libgncglib_la_SOURCES = $(REALSRCS)
endif
libgncglib_la_LIBADD = ${GLIB_LIBS}
libgncglib_la_LIBADD = ${GLIB24_LIBS}
AM_CFLAGS = ${GLIB_CFLAGS}
-1
View File
@@ -24,7 +24,6 @@ BUILT_SOURCES = goffice-paths.h
CLEANFILES = $(BUILT_SOURCES)
libgoffice_1_la_SOURCES = \
$(BUILT_SOURCES) \
goffice.c \
goffice-priv.h
if !HAVE_GLIB26
+2 -4
View File
@@ -14,7 +14,7 @@ libgncqof_backend_qsf_la_SOURCES = \
qsf-xml-map.c \
qsf-xml.c
libgncqof_backend_qsf_la_LDFLAGS = -module
libgncqof_backend_qsf_la_LDFLAGS = -module -avoid-version
libgncqof_backend_qsf_la_LIBADD = \
${QOF_LIBS} \
${GLIB_LIBS} \
@@ -40,6 +40,4 @@ qsf-dir.h: qsf-dir.h.in Makefile
mv $@.tmp $@
BUILT_SOURCES = qsf-dir.h
CONFIG_CLEAN_FILES = qsf-dir.h
CLEANFILES = qsf-dir.h
+2 -2
View File
@@ -117,9 +117,9 @@ qsf_get_config(QofBackend *be)
g_free(option);
option = g_new0(QofBackendOption, 1);
option->option_name = QSF_ENCODING;
option->description = _("Encoding string to use when writing the XML file.");
option->description = _("String encoding to use when writing the XML file.");
option->tooltip = _("QSF defaults to UTF-8. Other encodings are supported by "
"passing the encoding string in this option.");
"passing the string encoding in this option.");
option->type = KVP_TYPE_STRING;
option->value = (gpointer)params->encoding;
qof_backend_prepare_option(be, option);
+1 -1
View File
@@ -94,4 +94,4 @@ qofla-dir.h: $(srcdir)/qofla-dir.h.in Makefile
mv $@.tmp $@
BUILT_SOURCES = qofla-dir.h
DISTCLEANFILES = qofla-dir.h
CLEANFILES = $(BUILT_SOURCES)
+3
View File
@@ -785,6 +785,9 @@ gnc_numeric_convert(gnc_numeric in, gint64 denom, gint how)
}
sigfigs = GNC_HOW_GET_SIGFIGS(how);
if (fabs(sigfigs - logratio) > 18)
return gnc_numeric_error(GNC_ERROR_OVERFLOW);
if(sigfigs-logratio >= 0) {
denom = (gint64)(pow(10, sigfigs-logratio));
}
+11 -7
View File
@@ -52,13 +52,14 @@ static QofSession * current_session = NULL;
static GHookList * session_closed_hooks = NULL;
static QofLogModule log_module = QOF_MOD_SESSION;
static GSList *provider_list = NULL;
static gboolean qof_providers_initialized = FALSE;
/* ====================================================================== */
void
qof_backend_register_provider (QofBackendProvider *prov)
{
provider_list = g_slist_prepend (provider_list, prov);
provider_list = g_slist_append (provider_list, prov);
}
/* ====================================================================== */
@@ -846,7 +847,7 @@ struct backend_providers
};
/* All available QOF backends need to be described here
and the last entry must be three NULL's.
and the last entry must be two NULL's.
Remember: Use the libdir from the current build environment
and use JUST the module name without .so - .so is not portable! */
struct backend_providers backend_list[] = {
@@ -869,9 +870,10 @@ qof_session_load_backend(QofSession * session, char * access_method)
gboolean prov_type;
gboolean (*type_check) (const char*);
ENTER (" list=%d", g_slist_length(provider_list));
ENTER (" list=%d, initted=%s", g_slist_length(provider_list),
qof_providers_initialized ? "true" : "false");
prov_type = FALSE;
if (NULL == provider_list)
if (!qof_providers_initialized)
{
for (num = 0; backend_list[num].filename != NULL; num++) {
if(!qof_load_backend_library(backend_list[num].libdir,
@@ -881,8 +883,9 @@ qof_session_load_backend(QofSession * session, char * access_method)
backend_list[num].filename, backend_list[num].libdir);
}
}
qof_providers_initialized = TRUE;
}
p = g_slist_copy(provider_list);
p = provider_list;
while(p != NULL)
{
prov = p->data;
@@ -1204,14 +1207,15 @@ qof_session_save (QofSession *session,
if(change_backend == TRUE)
{
qof_session_destroy_backend(session);
if (NULL == provider_list)
if (!qof_providers_initialized)
{
for (num = 0; backend_list[num].filename != NULL; num++) {
qof_load_backend_library(backend_list[num].libdir,
backend_list[num].filename);
}
qof_providers_initialized = TRUE;
}
p = g_slist_copy(provider_list);
p = provider_list;
while(p != NULL)
{
prov = p->data;
+24 -90
View File
@@ -1,31 +1,27 @@
# Copyright 1999-2005 Gentoo Foundation
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# $Header$
# This script should work fine for the whole 1.9.x (and hopefully 2.0.x)
# releases with a simple rename. See
# http://bugs.gentoo.org/show_bug.cgi?id=122337 for discussion and history
# about this file.
# As well, it'll work for as an SVN ebuild; drop it into
# ${PORTAGE_OVERLAY}/app-office/gnucash-svn/gnucash-svn-20060306.ebuild.
# It'll install into /opt/gnucash-svn-20060306/.
# -- jsled-gentoo@asynchronous.org
inherit eutils gnome2
DOC_VER="1.9.0"
DESCRIPTION="A personal finance manager (unstable version)."
HOMEPAGE="http://www.gnucash.org/"
SRC_URI=""
if [[ "${PN}" != *-svn ]]; then
SRC_URI="mirror://sourceforge/gnucash/${P}.tar.gz"
fi
SRC_URI="mirror://sourceforge/gnucash/${P}.tar.gz
mirror://sourceforge/gnucash/gnucash-docs-${DOC_VER}.tar.gz"
LICENSE="GPL-2"
SLOT="1"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="postgres ofx hbci chipcard doc debug quotes"
# mt940 qof
# mt940
RDEPEND=">=dev-libs/glib-2.4.0
>=dev-util/guile-1.6
@@ -49,19 +45,12 @@ RDEPEND=">=dev-libs/glib-2.4.0
hbci? ( net-libs/aqbanking
chipcard? ( sys-libs/libchipcard )
)
quotes? ( dev-perl/DateManip
quotes? ( dev-perl/Crypt-SSLeay
dev-perl/Finance-Quote
dev-perl/HTML-TableExtract )
postgres? ( dev-db/postgresql )"
# See http://bugs.gentoo.org/show_bug.cgi?id=118517
# qof? ( >=qof-0.6.1 )
# or... same pattern as above?
# I [jsled-gentoo@asynchronous.org] don't think these are used by gnucash;
# maybe -docs...
# app-text/docbook-xsl-stylesheets
# =app-text/docbook-xml-dtd-4.1.2
postgres? ( dev-db/postgresql )
app-text/docbook-xsl-stylesheets
=app-text/docbook-xml-dtd-4.1.2*"
DEPEND="${RDEPEND}
dev-util/pkgconfig
@@ -72,30 +61,9 @@ pkg_setup() {
built_with_use goffice gnome || die "goffice must be built with gnome"
}
src_unpack() {
if [[ "${PN}" == *-svn ]]; then
svn co http://svn.gnucash.org/repo/gnucash/trunk ${P}
cd ${S}
./autogen.sh || die "Cannot autogen."
else
unpack ${A}
cd ${S}
fi
}
src_compile() {
local myconf_warnings="--enable-error-on-warning --enable-compile-warnings"
# We'd like to only define --prefix, but the econf definition seems
# to check, but then promptly forget, that we've redefined it. :p
# Thus, set {man,info,data,sysconf,localstate}dir too.
econf \
--prefix /opt/${P} \
--mandir=/opt/${P}/man \
--infodir=/opt/${P}/info \
--datadir=/opt/${P}/share \
--sysconfdir=/opt/${P}/etc \
--localstatedir=/opt/${P}/var/lib \
$(use_enable debug) \
$(use_enable postgres sql) \
$(use_enable ofx) \
@@ -104,56 +72,22 @@ src_compile() {
${myconf_warnings} \
|| die "econf failed"
emake -j1 || die "emake failed"
cd ${WORKDIR}/gnucash-docs-${DOC_VER}
econf || die "doc econf failed"
emake || die "doc emake failed"
}
# copied+mods from gnome2.eclass:
gnome2_gconf_install() {
if [[ -x ${GCONFTOOL_BIN} ]]; then
# We are ready to install the GCONF Scheme now
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
einfo "Installing GNOME 2 GConf schemas"
local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS"
for F in $(grep "obj /opt/${P}/etc/gconf/schemas" ${contents} | sed 's:obj \([^ ]*\) .*:\1:' ); do
if [[ -e "${F}" ]]; then
# echo "DEBUG::gconf install ${F}"
${GCONFTOOL_BIN} --makefile-install-rule ${F} 1>/dev/null
fi
done
for user in `ps axuwwf | grep "gconfd-2" |grep -v "grep" | awk '{ print $1 }' | uniq`; do
einfo "shutting down gconfd-2 for user ${user} to sync gnucash schemas"
echo su ${user} -c "${GCONFTOOL_BIN} --shutdown"
${ROOT}/bin/su - ${user} -c "${GCONFTOOL_BIN} --shutdown"
done
fi
}
# copied+mods from gnome2.eclass:
gnome2_gconf_uninstall() {
if [[ -x ${GCONFTOOL_BIN} ]]; then
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
einfo "Uninstalling GNOME 2 GConf schemas"
local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS"
for F in $(grep "obj /opt/${P}/etc/gconf/schemas" ${contents} | sed 's:obj \([^ ]*\) .*:\1:' ); do
# echo "DEBUG::gconf install ${F}"
${GCONFTOOL_BIN} --makefile-uninstall-rule ${F} 1>/dev/null
done
fi
}
# See http://bugs.gentoo.org/show_bug.cgi?id=132862 regarding gconf schema install
src_install() {
gnome2_src_install || die "gnome2_src_install failed"
dodoc AUTHORS ChangeLog* DOCUMENTERS HACKING INSTALL LICENSE NEWS TODO README* doc/README*
dodir /usr/bin
dosym /opt/${P}/bin/gnucash /usr/bin/${P}
make_desktop_entry ${P} "GnuCash ${PV}" \
/opt/${P}/share/gnucash/pixmaps/appicon.png "Office;Finance"
make_desktop_entry ${P} "GnuCash ${PV}" gnucash-icon.png "GNOME;Office;Finance"
cd ${WORKDIR}/${PN}-docs-${DOC_VER}
make DESTDIR=${D} \
scrollkeeper_localstate_dir=${D}/var/lib/scrollkeeper \
install || die "doc install failed"
rm -rf ${D}/var/lib/scrollkeeper
}
+4 -1
View File
@@ -6,4 +6,7 @@ src/business/business-core/gncBusPeriod.c
src/backend/dwi/qofmap.c
src/gnome-utils/gnc-tree-model-selection.c
src/backend/file/gncmod-backend-file.c
src/gnome/schemas/apps_gnucash_dialog_scheduled_transctions.schemas.in
src/backend/file/io-gncbin-r.c
src/import-export/binary-import/binary-import.glade
src/import-export/binary-import/druid-commodity.c
src/import-export/binary-import/gncmod-binary-import.c
+2205 -2955
View File
File diff suppressed because it is too large. Load diff
+2215 -4812
View File
File diff suppressed because it is too large. Load diff
+2218 -4700
View File
File diff suppressed because it is too large. Load diff
+996 -1091
View File
File diff suppressed because it is too large. Load diff
+4727 -4782
View File
File diff suppressed because it is too large. Load diff
+11398 -9631
View File
File diff suppressed because it is too large. Load diff
+11602 -11621
View File
File diff suppressed because it is too large. Load diff
+2224 -5305
View File
File diff suppressed because it is too large. Load diff
+2223 -4871
View File
File diff suppressed because it is too large. Load diff
+5097 -5090
View File
File diff suppressed because it is too large. Load diff
+139 -125
View File
@@ -1,93 +1,94 @@
# Dutch translation of GNUCash-glossary
# Copyright (C) YEAR Free Software Foundation, Inc.
# Jan-Willem Harmanny <jwharmanny@hotmail.com>, 2002
# Dutch translation of GNUCash glossary.
# Copyright (C) 2006 Free Software Foundation, Inc.
# Bernard Meens <meensb@xs4all.nl>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: Gnucash-glossary cvs\n"
"POT-Creation-Date: 2005-11-14 21:55+0100\n"
"PO-Revision-Date: 2002-02-26 00:00+100\n"
"Last-Translator: Jan-Willem Harmanny <jwharmanny@hotmail.com>\n"
"Language-Team: NL <NL@li.org>\n"
"Project-Id-Version: GNUCasg 1.9.4 svn\n"
"POT-Creation-Date: 2006-04-16 18:11+0200\n"
"PO-Revision-Date: 2006-04-16 20:08+0200\n"
"Last-Translator: Bernard Meens <meensb@xs4all.nl>\n"
"Language-Team: NONE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#. "English Definition"
msgid "Term"
#. "English Definition (Dear translator: This file will never be visible to the user! It should only serve as a tool for you, the translator. Nothing more.)"
msgid "Term (Dear translator: This file will never be visible to the user!)"
msgstr "Begrip"
#. "A detailed record of money spent and received"
msgid "account"
msgstr "rekening"
msgstr "dagboek"
#. "-"
msgid "account code"
msgstr "rekeningnummer"
msgstr "dagboekcode"
#. "the tree view of all accounts"
msgid "account hierarchy"
msgstr "rekening hierarchie"
msgstr "dagboek hierarchie"
#. "-"
msgid "account name"
msgstr "rekening naam"
msgstr "naam dagboek"
#. "A thing, esp. owned by a person or company, that has value and can be used or sold to pay debts"
msgid "account type: Asset"
msgstr "rekening type: Aktiva"
msgstr "Activa"
#. "(esp. US) (Brit = current account) a bank account from which money can be withdrawn without previous notice"
msgid "account type: checking"
msgstr "rekening type: Giro"
msgstr "rekening courant"
#. "-"
msgid "account type: currency"
msgstr "rekening type: valuta"
msgstr "Valuta"
#. "see: Equity"
msgid "account type: Equity"
msgstr "rekening type: Eigen kapitaal"
msgstr "Eigen kapitaal"
#. "-"
msgid "account type: Expense"
msgstr "rekening type: Uitgaven"
msgstr "Uitgaven"
#. "-"
msgid "account type: Income"
msgstr "rekening type: Inkomsten"
msgstr "Inkomsten"
#. "A debt, a financial obligation"
msgid "account type: Liability"
msgstr "rekening type: Passiva"
msgstr "Passiva"
#. "-"
msgid "account type: money-market"
msgstr "rekening type: valutamarkt"
msgstr "Geldmarktfonds"
#. "-"
msgid "account type: Mutual fund"
msgstr "rekening type: gemeenschappelijke gelden"
msgstr "Investeringsfonds"
#. "1. (US) any type of account that earns interest 2. (Brit) any type of bank account that earns a higher level of interest than a current account or deposit account"
msgid "account type: saving"
msgstr "rekening type: spaar"
msgstr "Spaarrekening"
#. "-"
msgid "account type: Stock"
msgstr "rekening type: Beurs"
msgstr "Aandelen"
#. "-"
msgid "account: parent account"
msgstr "rekening: bovenliggende rekening (???)"
msgstr "Bovenliggend dagboek"
#. "-"
msgid "account: subaccount"
msgstr "rekening: subrekening"
msgstr "Onderliggend dagboek"
#. "-"
msgid "account: top level account"
msgstr "rekening: bovenste niveau rekening"
msgstr "Hoogste dagboek"
#. "The process of doing something that caused a transaction to happen"
msgid "Action (register)"
@@ -99,71 +100,71 @@ msgstr "Geldautomaat"
#. "Transaction was an auto deposit"
msgid "action: autoDep"
msgstr "actie: autoDep"
msgstr "autoDep"
#. "-"
msgid "action: buy"
msgstr "actie: koop"
msgstr "koop"
#. "-"
msgid "action: deposit"
msgstr "actie: betaling"
msgstr "storting"
#. "When people can automatically deduct money straight from your account. The reverse of Direct Deposit."
msgid "action: direct debit"
msgstr "actie: direct debet"
msgstr "automatische afschrijving"
#. "transaction is a distribution (???)"
msgid "action: dist"
msgstr "uitschrijving"
msgstr "dist"
#. "transaction is a dividend"
msgid "action: div"
msgstr "divident"
msgstr "dividend"
#. "-"
msgid "action: fee"
msgstr "actie: betaling"
msgstr "fee"
#. "transaction comes from interest"
msgid "action: int"
msgstr "actie: rente"
msgstr "rente"
#. "-"
msgid "action: loan"
msgstr "actie: lenen"
msgstr "lenen"
#. "see: payment 1."
msgid "action: payment"
msgstr "actie: betaling"
msgstr "betaling"
#. "-"
msgid "action: POS"
msgstr "actie: POS"
msgstr "betaalautomaat"
#. "-"
msgid "action: rebate"
msgstr "actie: korting"
msgstr "korting"
#. "-"
msgid "action: sell"
msgstr "actie: verkoop"
msgstr "verkoop"
#. "-"
msgid "action: Teller"
msgstr "actie: Kassier"
msgstr "kassa"
#. "see: transfer 2. (=credit transfer)"
msgid "action: transfer"
msgstr "actie: overboeken"
msgstr "overboeking"
#. "-"
msgid "action: wire"
msgstr "actie: draad"
msgstr "overboeking"
#. "-"
msgid "action: withdraw"
msgstr "actie: opnemen"
msgstr "opname"
#. "A sum of money"
msgid "amount"
@@ -183,7 +184,7 @@ msgstr "balans"
#. "To arrange for income and spending to be equal"
msgid "balance, to"
msgstr "balans opmaken"
msgstr "balanceren"
#. "-"
msgid "bank"
@@ -191,44 +192,43 @@ msgstr "bank"
#. "A written statement of money owed for goods or services supplied. In Gnucash, a 'bill' is a statement that we received, whereas an 'invoice' is one that we sent out."
msgid "bill"
msgstr ""
msgstr "rekening"
#. "Conditions on paying a bill. Both an invoice and a bill have billing terms. For example, you can have 'terms' of 'Net-30', where the bill is due in full in 30 days."
msgid "billing terms"
msgstr ""
msgstr "betalingscondities"
#. "The dataset that encapsulates all the collections of entities (accounts etc.) in gnucash. The written records of the financial affairs of a business."
msgid "Book"
msgstr ""
msgstr "Boekhouding"
#. "Completing the records of financial affairs for a specific time period, e.g. at the end of the year."
msgid "book closing"
msgstr ""
msgstr "afsluiten van de boeken"
#. "An estimate or plan of the money available to somebody and how it will be spent over a period of time."
msgid "Budget"
msgstr ""
msgstr "budget"
#. "-"
msgid "business (adjective)"
msgstr "zakelijk"
msgstr "zakelijke"
#. "as Menu Item: Headline for features that are related to small business accounting"
#, fuzzy
msgid "business (noun)"
msgstr "saldo"
msgstr "bedrijf"
#. "Profits made from the sale of investments or property"
msgid "capital gains"
msgstr "opbrengst uit kapitaal"
msgstr "kapitaalwinst"
#. "Distinguishing the uppercase and lowercase letters"
msgid "case sensitive"
msgstr "hoofdletter gevoelig"
msgstr "hoofdlettergevoelig"
#. "Money in coins or notes"
msgid "cash"
msgstr "contant"
msgstr "contanten"
#. "(esp. US) (= cheque) A special printed form on which one writes an order to a bank to pay a sum of money from one's account to another person"
msgid "check"
@@ -244,11 +244,11 @@ msgstr "sluiten"
#. "An article that is bought and sold. The most general term of what an account keeps track of, e.g. a currency or a stock."
msgid "commodity"
msgstr "(munt)eenheid"
msgstr "waarde-eenheid"
#. "e.g. NASDAQ"
msgid "commodity listing"
msgstr "beurskoerslijst"
msgstr "beurs"
#. "the smallest amount of a commodity that's traded (e.g. 1/100 for USD, 1 for most stocks)"
msgid "commodity option: fraction"
@@ -260,7 +260,7 @@ msgstr "symbool"
#. "(a) A sum of money paid into an account. (b) A record of such a payment. (c) The state of having money in one's bank account."
msgid "Credit (column in register)"
msgstr "Credit"
msgstr "credit"
#. "-"
msgid "Credit Card"
@@ -268,7 +268,7 @@ msgstr "Credit Card"
#. "A transfer of money direct from one bank account to another, without using a cheque"
msgid "credit transfer"
msgstr "overboeken"
msgstr "overboeking"
#. "The system of money used in a country"
msgid "currency"
@@ -276,7 +276,7 @@ msgstr "valuta"
#. "Custom print format (i.e. according to the user's wishes) as opposed to a template choice."
msgid "Custom"
msgstr "Aangepast"
msgstr "aangepast"
#. "The backend where the data is stored."
msgid "database"
@@ -284,15 +284,15 @@ msgstr "database"
#. "A specific numbered day of the month"
msgid "Date"
msgstr "Datum"
msgstr "datum"
#. "DD/MM/YY or MM/DD/YY or something else"
msgid "date format"
msgstr "Datum indeling"
msgstr "datumformaat"
#. "A range in time that is delimited by two distinct dates."
msgid "date range"
msgstr "tijdzone"
msgstr "tijdsspanne"
#. "(a) A written note in an account of a sum owed or paid out. (b) A sum withdrawn from an account."
msgid "Debit (column in register)"
@@ -308,29 +308,31 @@ msgstr "deposito"
#. "The process of something becoming less valuable"
msgid "depreciation"
msgstr "waardevermindering"
msgstr "afschrijving"
#. "1. One textfield per transaction. The text in it should describe what the transaction was about. A short descriptive phrase (up to 40 chars) 2. One textfield per account. It is intended to be a longer, 1-5 sentence description of what this account is all about."
msgid "Description (column in register)"
msgstr "Beschrijving"
msgstr "beschrijving"
#. "Important Buzzword :)"
msgid "double entry"
msgstr "dubbel invoeren"
msgstr "dubbele boekhouding"
#. "a person who works for somebody or a company in return for wages"
#, fuzzy
msgid "employee"
msgstr "voorbeeld"
msgstr "medewerker"
#. "1. The money value of a property after all charges on it have been paid. Equity isn't debt, it's a representation of long-term capital (So combining it with liability isn't really very meaningful, except in the balance sheet. 2. (a) The value of the shares issued by a company. (b) Ordinary stocks and shares that carry no fixed interest."
msgid "equity"
msgstr "eigen kapitaal"
#. "Report that ... FIXME: Add description."
msgid "equity statement"
msgstr "eigen kapitaal balans"
#. "A trusted third party that holds a payment or deposit until a transaction is completed. In the US, many mortgage companies set up an escrow account when you get a mortgage. You pay into the account every month and they disburse amounts out of the escrow to pay for hazard insurance and property taxes. So they are holding funds 'in escrow' to complete the transactions (paying insurance and taxes)."
#, fuzzy
msgid "escrow (account)"
msgstr "begunstigde rekening"
msgstr "derde rekening"
#. "The relation in value between the money used in different countries"
msgid "exchange rate"
@@ -358,27 +360,31 @@ msgstr "betalingen"
#. "An increase in wealth; profit; advantage (See also: capital gains)"
msgid "gain"
msgstr "opbrengsten"
msgstr "toename"
#. "Name of an automaticly created account to get imbalanced transactions back in balance"
msgid "imbalance"
msgstr "onbalans"
msgstr "ongebalanceerd"
#. "Process of extracting data from a non-Gnucash format into a Gnucash file. E.g. QIF Import."
msgid "import"
msgstr "importeren"
#. "Report that ... FIXME: add description. This report used to be called the 'Profit & Loss', but it was renamed on 2004-07-13."
msgid "income statement"
msgstr "inkomensverklaring"
#. "Money charged for borrowing money, or paid to somebody who invests money"
msgid "interest"
msgstr "interest"
#. "A list of goods sold or services provided together with the prices charged; see also: a bill. In Gnucash, an 'invoice' is a statement that we sent out, whereas a 'bill' is one that we received."
msgid "invoice"
msgstr "rekening"
msgstr "factuur"
#. "In small business accounting: A piece of work or task undertaken on order at a stated rate?????"
msgid "job"
msgstr ""
msgstr "opdracht"
#. "A book in which a bank, business firm, etc. records its financial accounts"
msgid "ledger"
@@ -389,9 +395,8 @@ msgid "liabilities/equity"
msgstr "passiva"
#. "A sum of money that is lent (by a bank)"
#, fuzzy
msgid "loan"
msgstr "uitboekingen rekening"
msgstr "lening"
#. "The money lost in business activity"
msgid "loss"
@@ -399,17 +404,15 @@ msgstr "verlies"
#. "name of an automatically created account"
msgid "Lost Accounts"
msgstr "Verloren Rekeningen"
msgstr "verloren kasboeken"
#. "A particular collection of items that were bought in one transaction. A lot is typically formed when the item is bought, and is closed when the item is sold out. Needed e.g. for U.S. tax purposes."
#, fuzzy
msgid "Lot"
msgstr "Tot"
msgstr "partij"
#. "Combine two books into one (see book)."
#, fuzzy
msgid "merge, to"
msgstr "opnieuw laden"
msgstr "samenvoegen"
#. "The thing that the scatter plot uses to mark each data point"
msgid "marker"
@@ -421,11 +424,11 @@ msgstr "MDI modus"
#. "One textfield per split that should help you remember what this split was about."
msgid "Memo"
msgstr "Memo"
msgstr "memo"
#. "(a) An agreement by which money is lent by a bank for buying a house or other property, the property being the security. (b) A sum of money lent in this way."
msgid "Mortgage"
msgstr ""
msgstr "hypotheek"
#. "e.g. USD, DEM, see Currency."
msgid "national currency"
@@ -437,7 +440,7 @@ msgstr "netto"
#. "net total of all assets"
msgid "net assets"
msgstr "netto bezit"
msgstr "netto bezittingen"
#. "The total income minus the total expenses of a given time period."
msgid "net profit"
@@ -461,7 +464,7 @@ msgstr "openen"
#. "If an account starts with a non-zero balance, then this amount is called the opening balance."
msgid "opening balance"
msgstr "aanvangs saldo"
msgstr "openingsbalans"
#. "A menu choice in the graphical user interface that allows the user to specify how the application will act each time it is used. "
msgid "options"
@@ -469,23 +472,23 @@ msgstr "opties"
#. "In small business accounting: unused term at the moment (maybe: a particular piece of work, maybe created through an order from a customer???)"
msgid "order"
msgstr ""
msgstr "opdracht"
#. "Name of an automatically created account that holds splits that have no account."
msgid "orphan"
msgstr "uitboekingen rekening"
msgstr "wees"
#. "A secret phrase that one needs to know in order to get access to a user account "
msgid "passphrase"
msgstr "wachtwoord"
msgstr "passphrase"
#. "An amount that must be paid / An amount for which money has not yet been received"
msgid "Payables/Receivables"
msgstr "Te betalen/Vorderingen"
msgstr "schulden/vorderingen"
#. "A person to whom sth is paid"
msgid "payee"
msgstr "Betalingsontvanger"
msgstr "begunstigde"
#. "A person who pays or who has to pay for sth"
msgid "payer"
@@ -497,7 +500,7 @@ msgstr "betaling"
#. "An account where no transactions may be posted to; transactions can only be posted to subaccounts of this account, so this account serves as a placeholder in the hierarchy"
msgid "placeholder"
msgstr ""
msgstr "verzamelboek"
#. "A set of investments owned by a person"
msgid "portfolio"
@@ -505,7 +508,7 @@ msgstr "portfolio"
#. "A menu choice in many graphical user interface applications that allows the user to specify how the application will act each time it is used. "
msgid "preferences"
msgstr "instellingen"
msgstr "voorkeuren"
#. "An amount of money for which sth may be bought or sold"
msgid "price (in a split)"
@@ -513,21 +516,21 @@ msgstr "prijs"
#. "An ask is an offer to sell, and the price you want to sell at."
msgid "price type: ask"
msgstr "prijstype: vraag"
msgstr "verkoopprijs"
#. "A bid is an offer to buy, and the price you want to buy at."
msgid "price type: bid"
msgstr "prijstype: aanbod"
msgstr "koopprijs"
#. "online quotes (rather: quotation!?) A statement of the current price of stocks or commodities"
msgid "price: quotes"
msgstr "prijs: noteringen"
msgstr "koers"
#. "Money gained in business, esp. the difference between the amount earned and the amount spent"
msgid "profit"
msgstr "winst"
#. "(rather: profit and loss account!?) A list that shows the amount of money spent compared with the amount earned by a business in a particular period"
#. "OBSOLETE. This report was renamed to 'income statement' on 2004-07-13. Old definition: A list that shows the amount of money spent compared with the amount earned by a business in a particular period"
msgid "Profit & Loss"
msgstr "Winst & Verlies"
@@ -537,43 +540,43 @@ msgstr "quick-fill"
#. "-"
msgid "rebalance, to (a transaction)"
msgstr "opnieuw berekenen"
msgstr "opnieuw balanceren"
#. "reconcile an account, a reconciled split. To find a way to make the bank's account statement agree with the user's recorded transactions in an account."
msgid "reconcile, to"
msgstr "overeenbrengen"
msgstr "in overeenstemming brengen"
#. "-"
msgid "record keeping"
msgstr "boekhouding"
msgstr "registreren"
#. "A list of items; a book containing such a list"
msgid "register"
msgstr "register (of, gezien de context, kasboek?)"
msgstr "dagboek"
#. "A transaction that is divided into two or more parts"
msgid "register entry: split transaction"
msgstr "register ingang: verdeelde transactie"
msgstr "opgesplitste transactie"
#. "-"
msgid "register entry: stock split"
msgstr "register ingang: beurs splitsing"
msgstr "aandelensplitsing"
#. "one form of register"
msgid "register: auto-split ledger"
msgstr "register: auto-splitsing grootboek"
msgstr "automatische splitsend grootboek"
#. "another form of register"
msgid "register: basic ledger"
msgstr "register: basis grootboek"
msgstr "simpele grootboek"
#. "another form of register"
msgid "register: general ledger"
msgstr "register: algemeen grootboek"
msgstr "normaal grootboek"
#. "another form of register"
msgid "register: transaction journal"
msgstr "register: transactie verslag"
msgstr "transactie journaal"
#. "reload the current document"
msgid "reload, to"
@@ -583,18 +586,21 @@ msgstr "opnieuw laden"
msgid "Retained Earnings"
msgstr "winst reserves"
#. "Create a new transaction that is the inverse of the old one. When you add the two together they completely cancel out. Accounts use this instead of voiding transactions, usually because the prior month has been closed and can no longer be changed, or the entire accounting system is 'write only'."
msgid "reverse transaction, to (Action in the register)"
msgstr "terugboeken (storneren)"
#. "To write data (typically a file) to a storage medium, such as a disk or tape."
msgid "save, to (to a file)"
msgstr "opslaan"
#. "A transaction or reminder of a transaction that can be automatically executed at a specific time. It can be executed either once, or several times at regular intervals."
#, fuzzy
msgid "Scheduled Transaction"
msgstr "transactie"
msgstr "geplande transactie"
#. "DEPRECATED. To repair unbalanced transactions and orphan splits in an account tree. Any transactions that have debits != credits will get a balancing split added (pointing to a special new account called 'Imbalance'). Any splits that do not have accounts are put into another special account called 'Orphan'. Deprecated - use the term 'to check and repair' now."
msgid "scrub, to"
msgstr "uitboeken"
msgstr "controleren en repareren"
#. "A document or certificate showing who owns shares"
msgid "security"
@@ -602,11 +608,11 @@ msgstr "waardepapier"
#. "-"
msgid "Share Balance (register)"
msgstr "Aandelen saldo"
msgstr "aandelensaldo"
#. "Any of the equal parts into which the money of a business company is divided, giving the holder a right to a portion of the profits"
msgid "shares"
msgstr "aandelen"
msgstr "aandeel"
#. "(of a price) A place wfrom which sth comes or is obtained"
msgid "source"
@@ -618,7 +624,7 @@ msgstr "deel"
#. "This sets the particular design or shape of a report."
msgid "style sheet"
msgstr "style sheet"
msgstr "stijlblad"
#. "The total of a set of figures that are part of a larger group of figures"
msgid "subtotal"
@@ -626,7 +632,7 @@ msgstr "subtotaal"
#. "field of an account"
msgid "tax info"
msgstr "informatie voor belasting"
msgstr "belastinginfo"
#. "if you create a new e.g. style sheet, you can start from a template"
msgid "template"
@@ -634,7 +640,7 @@ msgstr "voorbeeld"
#. "see: date range"
msgid "time period"
msgstr "tijdzone"
msgstr "tijsspanne"
#. "as abbreviation for Total"
msgid "Tot"
@@ -650,20 +656,19 @@ msgstr "transactie"
#. "A transaction whose amount has actually been moved. The word comes from checks: a check is issued, but several steps have to be done until the amount is actually retrieved from the bank account, which is the point in time where that transaction (check) gets cleared."
msgid "transaction state: cleared"
msgstr "transactie status: verrekend"
msgstr "bevestigd"
#. "-"
msgid "transaction state: frozen"
msgstr "transactie status: bevroren"
msgstr "bevroren"
#. "A transaction that was reconciled with the bank's statement."
msgid "transaction state: reconciled"
msgstr "transactie status: overeengebracht"
msgstr "verwerkt"
#. "A transaction that is void i.e. not valid (anymore)."
#, fuzzy
msgid "transaction state: voided"
msgstr "transactie status: overeengebracht"
msgstr "ongeldig"
#. "1. The action of transferring sth. 2. see: credit transfer"
msgid "transfer (noun)"
@@ -671,12 +676,16 @@ msgstr "overboeking"
#. "The account where an amount is transferred to"
msgid "transfer account"
msgstr "begunstigde rekening"
msgstr "tegenrekening"
#. "To move money from one account to another. Will create a transaction."
msgid "transfer, to (register toolbar)"
msgstr "overboeken"
#. "The trial balance is a worksheet on which you list all your general ledger accounts and their debit or credit balance. It is a tool that is used to alert you to errors in your books. The total debits must equal the total credits. If they don't equal, you know you have an error that must be tracked down."
msgid "trial balance (report)"
msgstr "proefbalans"
#. "A class or things that have characteristics in common; type of an account, of a commodity etc."
msgid "type"
msgstr "type"
@@ -695,8 +704,13 @@ msgstr "waarde"
#. "In small business accounting: A person or company that sells items and is supplying goods"
msgid "vendor"
msgstr ""
msgstr "leverancier"
#. "The terms 'Voucher' and 'Expense Voucher' are used interchangeably in gnucash. The 'Expense Voucher' is also a bit of a misnomer -- it's more like an 'Expense Report' in gnucash. The phrase is meant to be a list of expenses incurred by an employee for which the company will reminburse them."
msgid "voucher"
msgstr "voucher"
#. "see debit"
msgid "withdraw (in the reconcile dialog)"
msgstr "uitgave"
msgstr "opname"
+2216 -4590
View File
File diff suppressed because it is too large. Load diff
+2225 -5789
View File
File diff suppressed because it is too large. Load diff
+2216 -4472
View File
File diff suppressed because it is too large. Load diff
+6095 -6168
View File
File diff suppressed because it is too large. Load diff
+11385 -9767
View File
File diff suppressed because it is too large. Load diff
+4631 -7523
View File
File diff suppressed because it is too large. Load diff
+2221 -4390
View File
File diff suppressed because it is too large. Load diff
+2276 -6243
View File
File diff suppressed because it is too large. Load diff
+2224 -4862
View File
File diff suppressed because it is too large. Load diff
+8280 -8327
View File
File diff suppressed because it is too large. Load diff
+2475 -2157
View File
File diff suppressed because it is too large. Load diff
+2248 -4209
View File
File diff suppressed because it is too large. Load diff
+597 -635
View File
File diff suppressed because it is too large. Load diff
+10696 -9101
View File
File diff suppressed because it is too large. Load diff
+2194 -2584
View File
File diff suppressed because it is too large. Load diff
+2218 -3325
View File
File diff suppressed because it is too large. Load diff
+2227 -3440
View File
File diff suppressed because it is too large. Load diff
+2221 -3449
View File
File diff suppressed because it is too large. Load diff
+2215 -4723
View File
File diff suppressed because it is too large. Load diff
+5 -9
View File
@@ -9,7 +9,6 @@ AM_CFLAGS = \
-I${top_srcdir}/src/calculation \
-I${top_srcdir}/src/core-utils \
-I${top_srcdir}/src/engine \
-I${top_srcdir}/lib/glib26 \
${GUILE_INCS} \
${G_WRAP_COMPILE_ARGS} \
${GLIB_CFLAGS} \
@@ -65,16 +64,12 @@ gncinclude_HEADERS = \
guile-util.h \
option-util.h
noinst_HEADERS = \
gw-app-utils.h
libgncmod_app_utils_la_LIBADD = \
${top_builddir}/src/gnc-module/libgncmodule.la \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/engine/libgw-engine.la \
${top_builddir}/src/calculation/libgncmod-calculation.la \
${top_builddir}/src/core-utils/libcore-utils.la \
${top_builddir}/lib/glib26/libgncglib.la \
${GCONF_LIBS} \
${GTK_LIBS} \
${G_WRAP_LINK_ARGS} \
@@ -92,7 +87,7 @@ libgw_app_utils_la_LIBADD = \
${QOF_LIBS} \
${GLIB_LIBS}
libgw_app_utils_la_SOURCES = gw-app-utils.c
nodist_libgw_app_utils_la_SOURCES = gw-app-utils.c
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = app-utils.scm
@@ -109,7 +104,8 @@ gncscm_DATA = \
simple-obj.scm
gwmoddir = ${GNC_GWRAP_LIBDIR}
gwmod_DATA = gw-app-utils.scm gw-app-utils-spec.scm
gwmod_DATA = gw-app-utils-spec.scm
nodist_gwmod_DATA = gw-app-utils.scm
noinst_DATA = .scm-links
@@ -148,5 +144,5 @@ gw-app-utils.scm gw-app-utils.c gw-app-utils.h: \
(gw:generate-wrapset \"gw-app-utils\")"
BUILT_SOURCES = gw-app-utils.scm gw-app-utils.c gw-app-utils.h
DISTCLEANFILES = ${SCM_FILE_LINKS} gnucash g-wrapped .scm-links \
gw-app-utils.html
CLEANFILES = $(BUILT_SOURCES) ${SCM_FILE_LINKS} gnucash g-wrapped \
.scm-links gw-app-utils.html
+11
View File
@@ -2092,10 +2092,21 @@ gnc_set_auto_decimal_places (GConfEntry *entry, gpointer user_data)
auto_decimal_places = gconf_value_get_float(value);
}
static void
gnc_auto_decimal_init (void)
{
auto_decimal_enabled =
gnc_gconf_get_bool(GCONF_GENERAL, "auto_decimal_point", NULL);
auto_decimal_places =
gnc_gconf_get_float(GCONF_GENERAL, "auto_decimal_places", NULL);
}
void
gnc_ui_util_init (void)
{
gnc_configure_account_separator ();
gnc_auto_decimal_init();
gnc_gconf_general_register_cb(KEY_ACCOUNT_SEPARATOR,
(GncGconfGeneralCb)gnc_configure_account_separator,
NULL);
-2
View File
@@ -1,5 +1,3 @@
SUBDIRS = file ${SQL_DIR}
DIST_SUBDIRS = file postgres
noinst_HEADERS = gnc-backend-api.h
+15 -8
View File
@@ -1,7 +1,7 @@
SUBDIRS = . test
#Now a shared GModule, not a package library.
lib_LTLIBRARIES = libgnc-backend-file.la
# Now a shared library AND a GModule
lib_LTLIBRARIES = libgnc-backend-file-utils.la libgnc-backend-file.la
AM_CFLAGS = \
-I.. -I../.. \
@@ -15,9 +15,8 @@ AM_CFLAGS = \
${GLIB_CFLAGS} \
${GCONF_CFLAGS}
libgnc_backend_file_la_SOURCES = \
libgnc_backend_file_utils_la_SOURCES = \
gnc-account-xml-v2.c \
gnc-backend-file.c \
gnc-book-xml-v2.c \
gnc-budget-xml-v2.c \
gnc-commodity-xml-v2.c \
@@ -28,7 +27,6 @@ libgnc_backend_file_la_SOURCES = \
gnc-schedxaction-xml-v2.c \
gnc-transaction-xml-v2.c \
io-example-account.c \
io-gncbin-r.c \
io-gncxml-gen.c \
io-gncxml-v1.c \
io-gncxml-v2.c \
@@ -40,12 +38,14 @@ libgnc_backend_file_la_SOURCES = \
sixtp-utils.c \
sixtp.c
libgnc_backend_file_la_SOURCES = \
gnc-backend-file.c
noinst_HEADERS = \
gnc-backend-file.h \
gnc-xml.h \
gnc-xml-helper.h \
io-example-account.h \
io-gncbin.h \
io-gncxml-gen.h \
io-gncxml.h \
io-gncxml-v2.h \
@@ -57,9 +57,16 @@ noinst_HEADERS = \
sixtp-stack.h \
sixtp-utils.h
libgnc_backend_file_la_LDFLAGS = -module
libgnc_backend_file_la_LIBADD = \
libgnc_backend_file_utils_la_LIBADD = \
${GLIB_LIBS} ${GCONF_LIBS} ${LIBXML2_LIBS} \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/core-utils/libcore-utils.la \
${QOF_LIBS}
libgnc_backend_file_la_LDFLAGS = -module -avoid-version
libgnc_backend_file_la_LIBADD = \
${GLIB_LIBS} ${GCONF_LIBS} ${LIBXML2_LIBS} \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/core-utils/libcore-utils.la \
libgnc-backend-file-utils.la \
${QOF_LIBS}
+8 -43
View File
@@ -45,15 +45,14 @@
#include <dirent.h>
#include <time.h>
#include "qof.h"
#include "TransLog.h"
#include "gnc-engine.h"
#include "gnc-filepath-utils.h"
#include "io-gncxml.h"
#include "io-gncbin.h"
#include "io-gncxml-v2.h"
#include "gnc-backend-api.h"
#include "gnc-backend-file.h"
#include "gnc-gconf-utils.h"
@@ -391,30 +390,6 @@ gnc_int_link_or_make_backup(FileBackend *be, const char *orig, const char *bkup)
/* ================================================================= */
static gboolean
is_gzipped_file(const gchar *name)
{
unsigned char buf[2];
int fd = open(name, O_RDONLY);
if(fd == 0)
{
return FALSE;
}
if(read(fd, buf, 2) != 2)
{
return FALSE;
}
if(buf[0] == 037 && buf[1] == 0213)
{
return TRUE;
}
return FALSE;
}
static QofBookFileType
gnc_file_be_determine_file_type(const char *path)
{
@@ -427,10 +402,6 @@ gnc_file_be_determine_file_type(const char *path)
}
} else if (gnc_is_xml_data_file(path)) {
return GNC_BOOK_XML1_FILE;
} else if (is_gzipped_file(path)) {
return GNC_BOOK_XML2_FILE;
} else if (gnc_is_bin_file(path)) {
return GNC_BOOK_BIN_FILE;
}
return GNC_BOOK_NOT_OURS;
}
@@ -452,8 +423,6 @@ gnc_determine_file_type (const char *path)
if (sbuf.st_size == 0) { PINFO (" empty file"); return TRUE; }
if(gnc_is_xml_data_file_v2(path, NULL)) { return TRUE; }
else if(gnc_is_xml_data_file(path)) { return TRUE; }
else if(is_gzipped_file(path)) { return TRUE; }
else if(gnc_is_bin_file(path)) { return TRUE; }
PINFO (" %s is not a gnc file", path);
return FALSE;
}
@@ -550,18 +519,18 @@ gnc_file_be_write_to_file(FileBackend *fbe,
/* Use the permissions from the original data file */
if(chmod(tmp_name, statbuf.st_mode) != 0)
{
qof_backend_set_error(be, ERR_BACKEND_PERM);
/* FIXME: Even if the chmod did fail, the save
/* qof_backend_set_error(be, ERR_BACKEND_PERM); */
/* Even if the chmod did fail, the save
nevertheless completed successfully. It is
therefore wrong to signal the ERR_BACKEND_PERM
error here which implies that the saving itself
failed! What should we do? */
failed. Instead, we simply ignore this. */
PWARN("unable to chmod filename %s: %s",
tmp_name ? tmp_name : "(null)",
strerror(errno) ? strerror(errno) : "");
#if VFAT_DOESNT_SUCK /* chmod always fails on vfat fs */
g_free(tmp_name);
return FALSE;
#if VFAT_DOESNT_SUCK /* chmod always fails on vfat/samba fs */
/* g_free(tmp_name); */
/* return FALSE; */
#endif
}
#ifdef HAVE_CHOWN
@@ -895,10 +864,6 @@ gnc_file_be_load_from_file (QofBackend *bend, QofBook *book)
rc = qof_session_load_from_xml_file (book, be->fullpath);
if (FALSE == rc) error = ERR_FILEIO_PARSE_ERROR;
break;
case GNC_BOOK_BIN_FILE:
qof_session_load_from_binfile(book, be->fullpath);
error = gnc_get_binfile_io_error();
break;
default:
PWARN("File not any known type");
error = ERR_FILEIO_UNKNOWN_FILE_TYPE;
@@ -972,7 +937,7 @@ compression_changed_cb(GConfEntry *entry, gpointer user_data)
be->file_compression = gnc_gconf_get_bool("general", "file_compression", NULL);
}
QofBackend*
static QofBackend*
gnc_backend_new(void)
{
FileBackend *gnc_be;
+2 -1
View File
@@ -53,7 +53,8 @@ struct FileBackend_struct
typedef struct FileBackend_struct FileBackend;
QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
// This is now a static inside the module
//QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
G_MODULE_EXPORT const gchar *
g_module_check_init(GModule *module);
+158 -71
View File
@@ -23,10 +23,14 @@
#include <glib.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <zlib.h>
#include <errno.h>
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
#include "gnc-engine.h"
#include "gnc-pricedb-p.h"
@@ -50,6 +54,8 @@
static QofLogModule log_module = GNC_MOD_IO;
static pid_t gzip_child_pid = 0;
/* Callback structure */
struct file_backend {
gboolean ok;
@@ -1233,7 +1239,8 @@ gnc_book_write_accounts_to_xml_filehandle_v2(QofBackend *be, QofBook *book, FILE
#define BUFLEN 4096
static FILE *
try_gz_open (const char *filename, const char *perms, gboolean use_gzip)
try_gz_open (const char *filename, const char *perms, gboolean use_gzip,
gboolean compress)
{
if (strstr(filename, ".gz.") != NULL) /* its got a temp extension */
use_gzip = TRUE;
@@ -1249,7 +1256,8 @@ try_gz_open (const char *filename, const char *perms, gboolean use_gzip)
the g_spawn glib wrappers. */
{
/* Start gzip from a command line, not by fork(). */
gchar *argv[] = {"gzip", NULL};
gchar *argv[] = {compress ? "gzip" : "gunzip",
NULL};
GPid child_pid;
GError *error;
int child_stdin;
@@ -1268,7 +1276,7 @@ try_gz_open (const char *filename, const char *perms, gboolean use_gzip)
/* FIXME: Now need to set up the child process to write to the
file. */
return fdopen(child_stdin, "w");
return fdopen(child_stdin, compress ? "w" : "r");
/* Eventually the GPid must be cleanup up, but not here? */
/* g_spawn_close_pid(child_pid); */
@@ -1279,6 +1287,10 @@ try_gz_open (const char *filename, const char *perms, gboolean use_gzip)
int filedes[2];
pid_t pid;
/* avoid reading from file that is still being written to
by a child process */
g_assert(gzip_child_pid == 0);
if (pipe(filedes) < 0) {
PWARN("Pipe call failed. Opening uncompressed file.");
return fopen(filename, perms);
@@ -1293,29 +1305,71 @@ try_gz_open (const char *filename, const char *perms, gboolean use_gzip)
case 0: /* child */ {
char buffer[BUFLEN];
unsigned bytes;
gzFile *out;
ssize_t written;
gzFile *file;
close(filedes[1]);
out = gzopen(filename, perms);
if (out == NULL) {
PWARN("child gzopen failed\n");
exit(0);
file = gzopen(filename, perms);
if (file == NULL) {
PWARN("child gzopen failed\n");
exit(0);
}
while ((bytes = read(filedes[0], buffer, BUFLEN)) > 0)
gzwrite(out, buffer, bytes);
gzclose(out);
if (compress) {
close(filedes[1]);
while ((bytes = read(filedes[0], buffer, BUFLEN)) > 0)
gzwrite(file, buffer, bytes);
}
else
{
close(filedes[0]);
while ((bytes = gzread(file, buffer, BUFLEN)) > 0)
written = write(filedes[1], buffer, bytes);
}
gzclose(file);
_exit(0);
}
default: /* parent */
if (compress) {
/* the calling code must wait_for_gzip() */
gzip_child_pid = pid;
}
sleep(2);
close(filedes[0]);
return fdopen(filedes[1], "w");
if (compress) {
close(filedes[0]);
return fdopen(filedes[1], "w");
}
else
{
close(filedes[1]);
return fdopen(filedes[0], "r");
}
}
}
#endif
}
static gboolean
wait_for_gzip()
{
pid_t retval;
if (gzip_child_pid == 0)
return TRUE;
#ifdef HAVE_SYS_WAIT_H
retval = waitpid(gzip_child_pid, NULL, WUNTRACED);
#else
/* FIXME: Windows doesn't have waitpid. According to glib's
g_spawn_async_with_pipes(), we should use one of the
g_spawn functions and some Win32-API WaitFor*() function
here. For now, we ignore that race condition. */
retval = 1;
#endif
gzip_child_pid = 0;
return retval != -1;
}
gboolean
gnc_book_write_to_xml_file_v2(
QofBook *book,
@@ -1324,7 +1378,7 @@ gnc_book_write_to_xml_file_v2(
{
FILE *out;
out = try_gz_open(filename, "w", compress);
out = try_gz_open(filename, "w", compress, TRUE);
if (out == NULL)
{
return FALSE;
@@ -1339,6 +1393,9 @@ gnc_book_write_to_xml_file_v2(
return FALSE;
}
if (compress)
return wait_for_gzip();
return TRUE;
}
@@ -1374,10 +1431,55 @@ gnc_book_write_accounts_to_xml_file_v2(
}
/***********************************************************************/
static gboolean
is_gzipped_file(const gchar *name)
{
unsigned char buf[2];
int fd = open(name, O_RDONLY);
if (fd == -1) {
return FALSE;
}
if (read(fd, buf, 2) != 2) {
close(fd);
return FALSE;
}
close(fd);
if (buf[0] == 037 && buf[1] == 0213) {
return TRUE;
}
return FALSE;
}
gboolean
gnc_is_xml_data_file_v2(const gchar *name, gboolean *with_encoding)
{
return gnc_is_our_xml_file(name, GNC_V2_STRING, with_encoding);
if (gnc_is_our_xml_file(name, GNC_V2_STRING, with_encoding))
return TRUE;
if (is_gzipped_file(name)) {
gzFile *file;
char first_chunk[256];
int num_read;
file = gzopen(name, "r");
if (file == NULL)
return FALSE;
num_read = gzread(file, first_chunk, sizeof(first_chunk) - 1);
gzclose(file);
if (num_read < 1)
return FALSE;
return gnc_is_our_first_xml_chunk(first_chunk, GNC_V2_STRING,
with_encoding);
}
return FALSE;
}
@@ -1447,29 +1549,25 @@ typedef struct {
gint
gnc_xml2_find_ambiguous(const gchar *filename, GList *encodings,
GHashTable **unique, GHashTable **ambiguous,
GList **impossible, GError **error)
GList **impossible)
{
GIOChannel *channel=NULL;
GIOStatus status;
FILE *file=NULL;
GList *iconv_list=NULL, *conv_list=NULL, *iter;
iconv_item_type *iconv_item=NULL, *ascii=NULL;
const gchar *enc;
GHashTable *processed=NULL;
gint n_impossible = 0;
gboolean clean_return = FALSE;
GError *error=NULL;
gboolean is_compressed;
gboolean clean_return=FALSE;
channel = g_io_channel_new_file(filename, "r", error);
if (*error) {
is_compressed = is_gzipped_file(filename);
file = try_gz_open(filename, "r", is_compressed, FALSE);
if (file == NULL) {
PWARN("Unable to open file %s", filename);
goto cleanup_find_ambs;
}
status = g_io_channel_set_encoding(channel, NULL, error);
if (status != G_IO_STATUS_NORMAL) {
PWARN("Error on unsetting encoding on IOChannel");
goto cleanup_find_ambs;
}
/* we need ascii */
ascii = g_new(iconv_item_type, 1);
ascii->encoding = g_quark_from_string("ASCII");
@@ -1510,25 +1608,21 @@ gnc_xml2_find_ambiguous(const gchar *filename, GList *encodings,
/* loop through lines */
while (1) {
gchar *line, *word, *utf8;
gchar line[256], *word, *utf8;
gchar **word_array, **word_cursor;
conv_type *conv = NULL;
status = g_io_channel_read_line(channel, &line, NULL, NULL, error);
if (status == G_IO_STATUS_EOF) {
break;
}
if (status == G_IO_STATUS_AGAIN) {
continue;
}
if (status != G_IO_STATUS_NORMAL) {
goto cleanup_find_ambs;
if (!fgets(line, sizeof(line)-1, file)) {
if (feof(file)) {
break;
} else {
goto cleanup_find_ambs;
}
}
g_strchomp(line);
replace_character_references(line);
word_array = g_strsplit_set(line, "> <", 0);
g_free(line);
/* loop through words */
for (word_cursor = word_array; *word_cursor; word_cursor++) {
@@ -1537,14 +1631,14 @@ gnc_xml2_find_ambiguous(const gchar *filename, GList *encodings,
continue;
utf8 = g_convert_with_iconv(word, -1, ascii->iconv,
NULL, NULL, error);
NULL, NULL, &error);
if (utf8) {
/* pure ascii */
g_free(utf8);
continue;
}
g_error_free(*error);
*error = NULL;
g_error_free(error);
error = NULL;
if (g_hash_table_lookup_extended(processed, word, NULL, NULL)) {
/* already processed */
@@ -1556,15 +1650,15 @@ gnc_xml2_find_ambiguous(const gchar *filename, GList *encodings,
for (iter = iconv_list; iter; iter = iter->next) {
iconv_item = iter->data;
utf8 = g_convert_with_iconv(word, -1, iconv_item->iconv,
NULL, NULL, error);
NULL, NULL, &error);
if (utf8) {
conv = g_new(conv_type, 1);
conv->encoding = iconv_item->encoding;
conv->utf8_string = utf8;
conv_list = g_list_prepend(conv_list, conv);
} else {
g_error_free(*error);
*error = NULL;
g_error_free(error);
error = NULL;
}
}
@@ -1616,8 +1710,8 @@ gnc_xml2_find_ambiguous(const gchar *filename, GList *encodings,
g_hash_table_destroy(processed);
if (ascii)
g_free(ascii);
if (channel)
g_io_channel_unref(channel);
if (file)
fclose(file);
return (clean_return) ? n_impossible : -1;
}
@@ -1631,21 +1725,18 @@ static void
parse_with_subst_push_handler (xmlParserCtxtPtr xml_context,
push_data_type *push_data)
{
GIOChannel *channel=NULL;
GIOStatus status;
const gchar *filename;
FILE *file = NULL;
GIConv ascii=(GIConv)-1;
GString *output=NULL;
GError *error=NULL;
gboolean is_compressed;
channel = g_io_channel_new_file(push_data->filename, "r", &error);
if (error) {
PWARN("Unable to open file %s", push_data->filename);
goto cleanup_push_handler;
}
status = g_io_channel_set_encoding(channel, NULL, &error);
if (status != G_IO_STATUS_NORMAL) {
PWARN("Error on unsetting encoding on IOChannel");
filename = push_data->filename;
is_compressed = is_gzipped_file(filename);
file = try_gz_open(filename, "r", is_compressed, FALSE);
if (file == NULL) {
PWARN("Unable to open file %s", filename);
goto cleanup_push_handler;
}
@@ -1657,24 +1748,20 @@ parse_with_subst_push_handler (xmlParserCtxtPtr xml_context,
/* loop through lines */
while (1) {
gchar *line, *word, *repl, *utf8;
gchar line[256], *word, *repl, *utf8;
gint pos, len;
gchar *start, *cursor;
status = g_io_channel_read_line(channel, &line, NULL, NULL, &error);
if (status == G_IO_STATUS_EOF) {
break;
}
if (status == G_IO_STATUS_AGAIN) {
continue;
}
if (status != G_IO_STATUS_NORMAL) {
goto cleanup_push_handler;
if (!fgets(line, sizeof(line)-1, file)) {
if (feof(file)) {
break;
} else {
goto cleanup_push_handler;
}
}
replace_character_references(line);
output = g_string_new(line);
g_free(line);
/* loop through words */
cursor = output->str;
@@ -1740,8 +1827,8 @@ parse_with_subst_push_handler (xmlParserCtxtPtr xml_context,
g_string_free(output, TRUE);
if (ascii != (GIConv) -1)
g_iconv_close(ascii);
if (channel)
g_io_channel_unref(channel);
if (file)
fclose(file);
}
gboolean
+1 -6
View File
@@ -180,10 +180,7 @@ typedef struct {
*/
gint gnc_xml2_find_ambiguous(
const gchar *filename, GList *encodings, GHashTable **unique,
GHashTable **ambiguous, GList **impossible, GError **error);
typedef gint (*find_ambiguous_handler)(
const gchar *filename, GList *encodings, GHashTable **unique,
GHashTable **ambiguous, GList **impossible, GError **error);
GHashTable **ambiguous, GList **impossible);
/** Parse a file in push mode, but replace byte sequences in the file given a
* hash table of substitutions
@@ -192,7 +189,5 @@ typedef gint (*find_ambiguous_handler)(
*/
gboolean gnc_xml2_parse_with_subst (
FileBackend *fbe, QofBook *book, GHashTable *subst);
typedef gboolean (*parse_with_subst_handler)(
FileBackend *fbe, QofBook *book, GHashTable *subst);
#endif /* __IO_GNCXML_V2_H__ */
+21 -13
View File
@@ -838,16 +838,11 @@ gnc_is_our_xml_file(const char *filename, const char *first_tag,
{
FILE *f = NULL;
char first_chunk[256];
unsigned char* cursor = NULL;
ssize_t num_read;
g_return_val_if_fail(filename, FALSE);
g_return_val_if_fail(first_tag, FALSE);
if (with_encoding) {
*with_encoding = FALSE;
}
f = fopen(filename, "r");
if (f == NULL) {
return FALSE;
@@ -856,21 +851,34 @@ gnc_is_our_xml_file(const char *filename, const char *first_tag,
num_read = fread(first_chunk, sizeof(char), sizeof(first_chunk) - 1, f);
fclose(f);
if(num_read == 0)
if(num_read == 0)
{
return FALSE;
}
first_chunk[num_read] = '\0';
cursor = first_chunk;
return gnc_is_our_first_xml_chunk(first_chunk, first_tag, with_encoding);
}
gboolean
gnc_is_our_first_xml_chunk(char *chunk, const char *first_tag,
gboolean *with_encoding)
{
unsigned char* cursor = NULL;
if (with_encoding) {
*with_encoding = FALSE;
}
cursor = chunk;
if(!eat_whitespace(&cursor))
{
return FALSE;
}
if(strncmp(cursor, "<?xml", 5) == 0)
if(strncmp(cursor, "<?xml", 5) == 0)
{
char *tag_compare;
gboolean result;
@@ -892,7 +900,7 @@ gnc_is_our_xml_file(const char *filename, const char *first_tag,
if (result && with_encoding) {
*cursor = '\0';
cursor = first_chunk;
cursor = chunk;
while (search_for('e', &cursor)) {
if (strncmp(cursor, "ncoding=", 8) == 0) {
*with_encoding = TRUE;
+3
View File
@@ -207,5 +207,8 @@ gboolean sixtp_add_sub_parser(sixtp *parser, const gchar* tag,
gboolean gnc_is_our_xml_file(const char *filename, const char *first_tag,
gboolean *with_encoding);
gboolean gnc_is_our_first_xml_chunk(char *chunk, const char *first_tag,
gboolean *with_encoding);
#endif /* _SIXTP_H_ */
+1 -1
View File
@@ -36,7 +36,7 @@ int main (int argc, char ** argv)
qof_init();
cashobjects_register();
do_test(
qof_load_backend_library ("../", GNC_LIB_NAME),
qof_load_backend_library ("../.libs/", GNC_LIB_NAME),
" loading gnc-backend-file GModule failed");
print_test_results();
qof_close();
+1 -1
View File
@@ -111,7 +111,7 @@ main (int argc, char ** argv)
g_type_init();
qof_init();
cashobjects_register();
do_test(qof_load_backend_library ("../", GNC_LIB_NAME),
do_test(qof_load_backend_library ("../.libs/", GNC_LIB_NAME),
" loading gnc-backend-file GModule failed");
if (!location)
+1 -1
View File
@@ -12,7 +12,7 @@ AM_CFLAGS = \
${QOF_CFLAGS} \
${GLIB_CFLAGS}
libgnc_backend_postgres_la_LDFLAGS = -module
libgnc_backend_postgres_la_LDFLAGS = -module -avoid-version
libgnc_backend_postgres_la_LIBADD = ${PGSQL_LIBS} -lpq \
${top_builddir}/src/engine/libgncmod-engine.la \
${QOF_LIBS} \
+1 -1
View File
@@ -1094,7 +1094,7 @@ main (int argc, char **argv)
DbInfo *dbinfo;
qof_init();
do_test(qof_load_backend_library (QOF_LIB_DIR, PG_LIB_NAME),
do_test(qof_load_backend_library ("../.libs/", PG_LIB_NAME),
" loading gnc-backend-postgres GModule failed");
dbinfo = g_new0(DbInfo, 1);
@@ -37,7 +37,7 @@ int main (int argc, char ** argv)
cashobjects_register();
/* the test needs to run locally in case make install
* has not yet been run. Use GNC_LIBDIR usually. */
do_test(qof_load_backend_library ("../", PG_LIB_NAME),
do_test(qof_load_backend_library ("../.libs/", PG_LIB_NAME),
" loading gnc-backend-postgres GModule failed");
print_test_results();
qof_close();
+2 -2
View File
@@ -34,7 +34,7 @@
#include "test-engine-stuff.h"
#include "Transaction.h"
#define PG_LIB_NAME "libgnc-backend-postgres.la"
#define PG_LIB_NAME "gnc-backend-postgres"
static void
run_test (void)
@@ -51,7 +51,7 @@ run_test (void)
Timespec tsfirst, tslast, tsmiddle;
char * test_url;
do_test(qof_load_backend_library (QOF_LIB_DIR, PG_LIB_NAME),
do_test(qof_load_backend_library ("../.libs/", PG_LIB_NAME),
" loading gnc-backend-postgres GModule failed");
session = get_random_session ();
+1 -2
View File
@@ -67,7 +67,7 @@ gnucash-valgrind: gnucash-valgrind.in ${top_builddir}/config.status Makefile
mv $@.tmp $@
chmod u+x $@
CLEANFILES = gnucash gnucash-valgrind
CLEANFILES = $(BUILT_SOURCES) gnucash gnucash-valgrind
# We handle gnucash scripts in a somewhat unexpected way, but we do
# this so that a user who doesn't necessarily have the right
@@ -99,7 +99,6 @@ ${gnc_common_scripts}: generate-gnc-script ${top_builddir}/config.status
${srcdir}/generate-gnc-script $@ "${gncoverridesdir}"
CLEANFILES += ${gnc_common_scripts} update-gnucash-gconf
DISTCLEANFILES = i18n.h
## We borrow guile's convention and use @-...-@ as the substitution
## brackets here, instead of the usual @...@. This prevents autoconf
+7 -4
View File
@@ -73,8 +73,8 @@ gnc_print_unstable_message(void)
_("This is a development version. It may or may not work.\n"),
_("Report bugs and other problems to gnucash-devel@gnucash.org.\n"),
_("You can also lookup and file bug reports at http://bugzilla.gnome.org\n"),
_("The last stable version was "), "GnuCash 1.8.12",
_("The next stable version will be "), "GnuCash 2.0");
_("The last stable version was "), "GnuCash 2.0.1",
_("The next stable version will be "), "GnuCash 2.2");
}
/* Priority of paths: The default is set at build time. It may be
@@ -350,7 +350,6 @@ load_gnucash_modules()
{ "gnucash/register/ledger-core", 0, FALSE },
{ "gnucash/register/register-core", 0, FALSE },
{ "gnucash/register/register-gnome", 0, FALSE },
{ "gnucash/import-export/binary-import", 0, FALSE },
{ "gnucash/import-export/qif-import", 0, FALSE },
{ "gnucash/import-export/ofx", 0, TRUE },
{ "gnucash/import-export/mt940", 0, TRUE },
@@ -373,7 +372,11 @@ load_gnucash_modules()
gnc_module_load_optional(modules[i].name, modules[i].version);
else
gnc_module_load(modules[i].name, modules[i].version);
}
}
if (!gnc_engine_is_initialized()) {
g_error("GnuCash engine failed to initialize. Exiting.\n");
exit(0);
}
}
static void
+8 -6
View File
@@ -52,8 +52,7 @@ noinst_HEADERS = \
gncTaxTable.h \
gncTaxTableP.h \
gncVendor.h \
gncVendorP.h \
gw-business-core.h
gncVendorP.h
libgncmod_business_core_la_LIBADD = \
${top_builddir}/src/gnc-module/libgncmodule.la \
@@ -67,7 +66,9 @@ libgncmod_business_core_la_LIBADD = \
# business-core-helpers.c
libgw_business_core_la_SOURCES = \
gncBusGuile.c \
gncBusGuile.c
nodist_libgw_business_core_la_SOURCES = \
gw-business-core.c
libgw_business_core_la_LDFLAGS = ${G_WRAP_LINK_ARGS}
@@ -83,8 +84,9 @@ gncmod_DATA = business-core.scm
gwmoddir = ${GNC_GWRAP_LIBDIR}
gwmod_DATA = \
gw-business-core.scm \
gw-business-core-spec.scm
nodist_gwmod_DATA = \
gw-business-core.scm
EXTRA_DIST = \
${gncmod_DATA} \
@@ -118,5 +120,5 @@ gw-business-core.scm gw-business-core.c gw-business-core.h: \
(gw:generate-wrapset \"gw-business-core\")"
BUILT_SOURCES = gw-business-core.scm gw-business-core.c gw-business-core.h
DISTCLEANFILES = g-wrapped gnucash .scm-links ${SCM_FILE_LINKS} \
gw-business-core.html
CLEANFILES = $(BUILT_SOURCES) gw-business-core.html \
g-wrapped gnucash .scm-links ${SCM_FILE_LINKS}
+1 -7
View File
@@ -43,15 +43,9 @@ noinst_HEADERS = \
libgncmod_business_backend_file_la_LDFLAGS = -module
# When building on windows, the following variable must also contain
# ${top_builddir}/src/backend/file/libgnc-backend-file.la, which won't
# build on MacOSX because libgnc-backend-file.so is a module and not a
# library. This problem has to be solved on an architectural basis by
# probably moving the relevant portion of libgnc-backend-file.so into
# a new shared library which will be used by both the gnc-backend-file
# module and this module here (and libgncgnome.so, too)
libgncmod_business_backend_file_la_LIBADD = \
${top_builddir}/src/business/business-core/libgncmod-business-core.la \
${top_builddir}/src/backend/file/libgnc-backend-file-utils.la \
${top_builddir}/src/engine/libgncmod-engine.la \
${top_builddir}/src/gnc-module/libgncmodule.la \
${LIBXML2_LIBS} \
+60 -29
View File
@@ -50,6 +50,8 @@ struct _gncAddress
char * email;
};
static QofLogModule log_module = GNC_MOD_BUSINESS;
#define _GNC_MOD_NAME GNC_ADDRESS_MODULE_NAME
G_INLINE_FUNC void mark_address (GncAddress *address);
@@ -90,26 +92,8 @@ gncAddressCreate (QofBook *book, QofEntity *prnt)
static GncAddress *
qofAddressCreate (QofBook *book)
{
GncAddress *addr;
if (!book) return NULL;
addr = g_new0 (GncAddress, 1);
qof_instance_init(&addr->inst, GNC_ID_ADDRESS, book);
addr->book = book;
addr->dirty = FALSE;
addr->parent = NULL; /* set using an independent function. */
addr->name = CACHE_INSERT ("");
addr->addr1 = CACHE_INSERT ("");
addr->addr2 = CACHE_INSERT ("");
addr->addr3 = CACHE_INSERT ("");
addr->addr4 = CACHE_INSERT ("");
addr->phone = CACHE_INSERT ("");
addr->fax = CACHE_INSERT ("");
addr->email = CACHE_INSERT ("");
return addr;
/* The address will get set later by another function */
return gncAddressCreate(book, NULL);
}
static void
@@ -155,6 +139,16 @@ void
gncAddressDestroy (GncAddress *addr)
{
if (!addr) return;
addr->inst.do_free = TRUE;
gncAddressCommitEdit (addr);
}
static void
gncAddressFree (GncAddress *addr)
{
if (!addr) return;
qof_event_gen (&addr->inst.entity, QOF_EVENT_DESTROY, NULL);
CACHE_REMOVE (addr->name);
CACHE_REMOVE (addr->addr1);
@@ -165,16 +159,19 @@ gncAddressDestroy (GncAddress *addr)
CACHE_REMOVE (addr->fax);
CACHE_REMOVE (addr->email);
qof_instance_release (&addr->inst);
g_free (addr);
}
/* Set functions */
#define SET_STR(member, str) { \
#define SET_STR(obj, member, str) { \
char * tmp; \
\
if (member == str) return; \
if (!safe_strcmp (member, str)) return; \
gncAddressBeginEdit (obj); \
tmp = CACHE_INSERT (str); \
CACHE_REMOVE (member); \
member = tmp; \
@@ -184,66 +181,100 @@ void gncAddressSetName (GncAddress *addr, const char *name)
{
if (!addr) return;
if (!name) return;
SET_STR(addr->name, name);
SET_STR(addr, addr->name, name);
mark_address (addr);
gncAddressCommitEdit (addr);
}
void gncAddressSetAddr1 (GncAddress *addr, const char *addr1)
{
if (!addr) return;
if (!addr1) return;
SET_STR(addr->addr1, addr1);
SET_STR(addr, addr->addr1, addr1);
mark_address (addr);
gncAddressCommitEdit (addr);
}
void gncAddressSetAddr2 (GncAddress *addr, const char *addr2)
{
if (!addr) return;
if (!addr2) return;
SET_STR(addr->addr2, addr2);
SET_STR(addr, addr->addr2, addr2);
mark_address (addr);
gncAddressCommitEdit (addr);
}
void gncAddressSetAddr3 (GncAddress *addr, const char *addr3)
{
if (!addr) return;
if (!addr3) return;
SET_STR(addr->addr3, addr3);
SET_STR(addr, addr->addr3, addr3);
mark_address (addr);
gncAddressCommitEdit (addr);
}
void gncAddressSetAddr4 (GncAddress *addr, const char *addr4)
{
if (!addr) return;
if (!addr4) return;
SET_STR(addr->addr4, addr4);
SET_STR(addr, addr->addr4, addr4);
mark_address (addr);
gncAddressCommitEdit (addr);
}
void gncAddressSetPhone (GncAddress *addr, const char *phone)
{
if (!addr) return;
if (!phone) return;
SET_STR(addr->phone, phone);
SET_STR(addr, addr->phone, phone);
mark_address (addr);
gncAddressCommitEdit (addr);
}
void gncAddressSetFax (GncAddress *addr, const char *fax)
{
if (!addr) return;
if (!fax) return;
SET_STR(addr->fax, fax);
SET_STR(addr, addr->fax, fax);
mark_address (addr);
gncAddressCommitEdit (addr);
}
void gncAddressSetEmail (GncAddress *addr, const char *email)
{
if (!addr) return;
if (!email) return;
SET_STR(addr->email, email);
SET_STR(addr, addr->email, email);
mark_address (addr);
gncAddressCommitEdit (addr);
}
void gncAddressBeginEdit (GncAddress *addr)
{
qof_begin_edit (&addr->inst);
}
static inline void gncAddressOnError (QofInstance *inst, QofBackendError errcode)
{
PERR("Address QofBackend Failure: %d", errcode);
}
static inline void gncAddressOnDone (QofInstance *addr) { }
static inline void address_free (QofInstance *inst)
{
GncAddress *addr = (GncAddress *) inst;
gncAddressFree (addr);
}
void gncAddressCommitEdit (GncAddress *addr)
{
if (!qof_commit_edit (QOF_INSTANCE(addr))) return;
qof_commit_edit_part2 (&addr->inst, gncAddressOnError,
gncAddressOnDone, address_free);
}
/* Get Functions */
const char * gncAddressGetName (const GncAddress *addr)
+3 -4
View File
@@ -80,11 +80,10 @@ typedef struct _gncAddress GncAddress;
/** @name Create/Destroy functions
@{ */
/** create a new address */
GncAddress * gncAddressCreate (QofBook *book, QofEntity *parent);
/** destroy an address */
GncAddress *gncAddressCreate (QofBook *book, QofEntity *parent);
void gncAddressDestroy (GncAddress *addr);
void gncAddressBeginEdit (GncAddress *addr);
void gncAddressCommitEdit (GncAddress *addr);
/** @} */
+16 -4
View File
@@ -839,13 +839,15 @@ GncOrder * gncEntryGetOrder (GncEntry *entry)
* the amount the merchant gets; the taxes are the amount the gov't
* gets, and the customer pays the sum or value + taxes.
*
* The SCU is the denominator to convert the value.
*
* The discount return value is just for entertainment -- you may way
* to let a consumer know how much they saved.
*/
void gncEntryComputeValue (gnc_numeric qty, gnc_numeric price,
GncTaxTable *tax_table, gboolean tax_included,
gnc_numeric discount, GncAmountType discount_type,
GncDiscountHow discount_how,
GncDiscountHow discount_how, int SCU,
gnc_numeric *value, gnc_numeric *discount_value,
GList **tax_value)
{
@@ -975,11 +977,15 @@ void gncEntryComputeValue (gnc_numeric qty, gnc_numeric price,
* need to compute taxes (based on 'pretax') if the caller wants it.
*/
if (discount_value != NULL)
if (discount_value != NULL) {
if (SCU) discount = gnc_numeric_convert(discount, SCU, GNC_RND_ROUND);
*discount_value = discount;
}
if (value != NULL)
if (value != NULL) {
if (SCU) result = gnc_numeric_convert(result, SCU, GNC_RND_ROUND);
*value = result;
}
/* Now... Compute the list of tax values (if the caller wants it) */
@@ -995,12 +1001,14 @@ void gncEntryComputeValue (gnc_numeric qty, gnc_numeric price,
switch (gncTaxTableEntryGetType (entry)) {
case GNC_AMT_TYPE_VALUE:
if (SCU) amount = gnc_numeric_convert(amount, SCU, GNC_RND_ROUND);
taxes = gncAccountValueAdd (taxes, acc, amount);
break;
case GNC_AMT_TYPE_PERCENT:
amount = gnc_numeric_div (amount, percent, GNC_DENOM_AUTO,
GNC_DENOM_LCD);
tax = gnc_numeric_mul (pretax, amount, GNC_DENOM_AUTO, GNC_DENOM_LCD);
if (SCU) tax = gnc_numeric_convert(tax, SCU, GNC_RND_ROUND);
taxes = gncAccountValueAdd (taxes, acc, tax);
break;
default:
@@ -1066,12 +1074,16 @@ gncEntryRecomputeValues (GncEntry *entry)
entry->b_tax_values = NULL;
}
/* Determine the commodity denominator */
denom = get_entry_commodity_denom (entry);
/* Compute the invoice values */
gncEntryComputeValue (entry->quantity, entry->i_price,
(entry->i_taxable ? entry->i_tax_table : NULL),
entry->i_taxincluded,
entry->i_discount, entry->i_disc_type,
entry->i_disc_how,
denom,
&(entry->i_value), &(entry->i_disc_value),
&(entry->i_tax_values));
@@ -1080,9 +1092,9 @@ gncEntryRecomputeValues (GncEntry *entry)
(entry->b_taxable ? entry->b_tax_table : NULL),
entry->b_taxincluded,
gnc_numeric_zero(), GNC_AMT_TYPE_VALUE, GNC_DISC_PRETAX,
denom,
&(entry->b_value), NULL, &(entry->b_tax_values));
denom = get_entry_commodity_denom (entry);
entry->i_value_rounded = gnc_numeric_convert (entry->i_value, denom,
GNC_RND_ROUND);
entry->i_disc_value_rounded = gnc_numeric_convert (entry->i_disc_value, denom,
+4 -2
View File
@@ -174,7 +174,9 @@ GList * gncEntryReturnTaxValues (GncEntry *entry, gboolean is_inv);
/** Compute the Entry value, tax-value, and discount_value, based on
* the quantity, price, discount, tax-table, and types. The value is
* the amount the merchant gets, the taxes are what the gov't gets,
* and the discount is how much the customer saved.
* and the discount is how much the customer saved. The SCU is the
* target denominator of the value and tax -- it should be the
* account or commodity SCU of the target.
*
* The tax_values list is the property of the entry and will be
* destroyed automatically, so use it quickly. Note that all return
@@ -187,7 +189,7 @@ void gncEntryGetValue (GncEntry *entry, gboolean is_inv, gnc_numeric *value,
void gncEntryComputeValue (gnc_numeric qty, gnc_numeric price,
GncTaxTable *tax_table, gboolean tax_included,
gnc_numeric discount, GncAmountType discount_type,
GncDiscountHow discount_how,
GncDiscountHow discount_how, int SCU,
/* return values */
gnc_numeric *value, gnc_numeric *discount_value,
GList **tax_values);
+7 -9
View File
@@ -27,8 +27,7 @@ AM_CFLAGS = \
${QOF_CFLAGS} \
-I${top_srcdir}/src/register/register-core \
-I${top_srcdir}/src/register/register-gnome \
-I${top_srcdir}/src/register/ledger-core \
-I${top_srcdir}/lib/glib26
-I${top_srcdir}/src/register/ledger-core
libgncmod_business_gnome_la_SOURCES = \
businessmod-gnome.c \
@@ -65,8 +64,7 @@ noinst_HEADERS = \
dialog-vendor.h \
gnc-plugin-business.h \
gnc-plugin-page-invoice.h \
search-owner.h \
gw-business-gnome.h
search-owner.h
libgncmod_business_gnome_la_LIBADD = \
${top_builddir}/src/business/business-core/libgncmod-business-core.la \
@@ -87,11 +85,10 @@ libgncmod_business_gnome_la_LIBADD = \
${GUILE_LIBS} \
${GLIB_LIBS} \
${QOF_LIBS} \
${top_builddir}/lib/glib26/libgncglib.la \
${EFENCE_LIBS}
libgw_business_gnome_la_SOURCES = gw-business-gnome.c
nodist_libgw_business_gnome_la_SOURCES = gw-business-gnome.c
libgw_business_gnome_la_LDFLAGS = ${G_WRAP_LINK_ARGS}
libgw_business_gnome_la_LIBADD = \
@@ -108,8 +105,9 @@ gncmod_DATA = business-gnome.scm
gwmoddir = ${GNC_GWRAP_LIBDIR}
gwmod_DATA = \
gw-business-gnome.scm \
gw-business-gnome-spec.scm
nodist_gwmod_DATA = \
gw-business-gnome.scm
EXTRA_DIST = \
${gncmod_DATA} \
@@ -149,5 +147,5 @@ gw-business-gnome.scm gw-business-gnome.c gw-business-gnome.h: \
(gw:generate-wrapset \"gw-business-gnome\")"
BUILT_SOURCES = gw-business-gnome.scm gw-business-gnome.c gw-business-gnome.h
CLEANFILES = g-wrapped gnucash .scm-links
DISTCLEANFILES = ${SCM_FILE_LINKS} gw-business-gnome.html
CLEANFILES = $(BUILT_SOURCES) g-wrapped gnucash .scm-links \
${SCM_FILE_LINKS} gw-business-gnome.html
@@ -3,6 +3,7 @@
*
* Written By: Derek Atkins <warlord@MIT.EDU>
* Copyright (C) 2001,2002,2006 Derek Atkins
* Copyright (c) 2006 David Hampton <hampton@employees.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -32,6 +33,7 @@
#include "gnc-ui-util.h"
#include "qof.h"
#include "gnc-component-manager.h"
#include "gnc-gtk-utils.h"
#include "gncCustomer.h"
#include "gncJob.h"
@@ -304,20 +306,27 @@ void
gnc_fill_account_select_combo (GtkWidget *combo, GNCBook *book,
GList *acct_types)
{
GList *list, *node, *names = NULL;
GtkListStore *store;
GtkEntry *entry;
GList *list, *node;
char *text;
gboolean found = FALSE;
g_return_if_fail (combo);
g_return_if_fail (combo && GTK_IS_COMBO_BOX_ENTRY(combo));
g_return_if_fail (book);
g_return_if_fail (acct_types);
/* Figure out if anything is set in the combo */
text = gtk_editable_get_chars (GTK_EDITABLE ((GTK_COMBO (combo))->entry), 0, -1);
text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
list = xaccGroupGetSubAccounts (gnc_book_get_group (book));
/* Create a list of names. Figure out if we've got the 'saved' one */
/* Clear the existing list */
entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN(combo)));
gtk_entry_set_text(entry, "");
store = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(combo)));
gtk_list_store_clear(store);
/* Add the account names to the combo box */
for (node = list; node; node = node->next) {
Account *account = node->data;
char *name;
@@ -328,27 +337,14 @@ gnc_fill_account_select_combo (GtkWidget *combo, GNCBook *book,
continue;
name = xaccAccountGetFullName (account);
if (name != NULL) {
names = g_list_append (names, name);
if (!safe_strcmp (name, text))
found = TRUE;
}
gtk_combo_box_append_text(GTK_COMBO_BOX(combo), name);
g_free(name);
}
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
g_list_free (list);
/* set the popdown strings and the default to last selected choice
* (or the first entry if none was previously selected */
if (names) {
gtk_combo_set_popdown_strings (GTK_COMBO (combo), names);
gtk_entry_set_text (GTK_ENTRY ((GTK_COMBO (combo))->entry),
found ? text : names->data);
}
for (node = names; node; node = node->next)
g_free (node->data);
g_list_free (names);
gnc_cbe_set_by_string(GTK_COMBO_BOX_ENTRY(combo), text);
if (text)
g_free (text);
@@ -16,10 +16,6 @@
(export gnc:reload-module)
(define top-level (N_ "_Business"))
(define new-label (N_ "New"))
(define find-label (N_ "Find"))
(define (gnc:reload-module name)
(let ((m (current-module)))
(load-from-path name)
+88 -99
View File
@@ -2,6 +2,7 @@
* dialog-billterms.c -- Dialog to create and edit billing terms
* Copyright (C) 2002 Derek Atkins
* Author: Derek Atkins <warlord@MIT.EDU>
* Copyright (c) 2006 David Hampton <hampton@employees.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -39,13 +40,18 @@
#define DIALOG_BILLTERMS_CM_CLASS "billterms-dialog"
void billterms_row_selected (GtkCList *clist, gint row, gint column,
GdkEventButton *event, gpointer user_data);
enum term_cols {
BILL_TERM_COL_NAME = 0,
BILL_TERM_COL_TERM,
NUM_BILL_TERM_COLS
};
void billterms_new_term_cb (GtkButton *button, BillTermsWindow *btw);
void billterms_delete_term_cb (GtkButton *button, BillTermsWindow *btw);
void billterms_edit_term_cb (GtkButton *button, BillTermsWindow *btw);
void billterms_window_close (GtkWidget *widget, gpointer data);
void billterms_window_destroy_cb (GtkWidget *widget, gpointer data);
void billterms_type_combobox_changed (GtkComboBox *cb, gpointer data);
typedef struct _billterm_notebook {
GtkTooltips * tooltips;
@@ -68,7 +74,7 @@ typedef struct _billterm_notebook {
struct _billterms_window {
GtkWidget * dialog;
GtkWidget * terms_clist;
GtkWidget * terms_view;
GtkWidget * desc_entry;
GtkWidget * type_label;
GtkWidget * term_vbox;
@@ -342,51 +348,14 @@ maybe_set_type (NewBillTerm *nbt, GncBillTermType type)
show_notebook (&nbt->notebook);
}
static void
on_days1_activate (GtkWidget *w, gpointer data)
void
billterms_type_combobox_changed (GtkComboBox *cb, gpointer data)
{
NewBillTerm *nbt = data;
gint value;
maybe_set_type (nbt, GNC_TERM_TYPE_DAYS);
}
static void
on_proximo1_activate (GtkWidget *w, gpointer data)
{
NewBillTerm *nbt = data;
maybe_set_type (nbt, GNC_TERM_TYPE_PROXIMO);
}
static void
make_menu (GtkWidget *omenu, NewBillTerm *nbt)
{
GladeXML *xml;
GtkWidget *popup;
/* Open and read the Popup XML */
xml = gnc_glade_xml_new ("billterms.glade", "Term Type Popup");
popup = glade_xml_get_widget (xml, "Term Type Popup");
/* Glade insists on making this a tearoff menu. */
if (gnc_gconf_menus_have_tearoff()) {
GtkMenuShell *ms = GTK_MENU_SHELL (popup);
GtkWidget *tearoff;
tearoff = g_list_nth_data (ms->children, 0);
ms->children = g_list_remove (ms->children, tearoff);
gtk_widget_destroy (tearoff);
}
/* attach the signal handlers */
glade_xml_signal_connect_data (xml, "on_days1_activate",
G_CALLBACK (on_days1_activate), nbt);
glade_xml_signal_connect_data (xml, "on_proximo1_activate",
G_CALLBACK (on_proximo1_activate), nbt);
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), popup);
gtk_option_menu_set_history (GTK_OPTION_MENU (omenu),
nbt->notebook.type - 1);
value = gtk_combo_box_get_active(cb);
maybe_set_type (nbt, value + 1);
}
static GncBillTerm *
@@ -396,7 +365,7 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
GncBillTerm *created_term = NULL;
NewBillTerm *nbt;
GladeXML *xml;
GtkWidget *box;
GtkWidget *box, *combo_box;
gint response;
gboolean done;
const gchar *dialog_name;
@@ -432,7 +401,8 @@ new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
nbt->notebook.type = GNC_TERM_TYPE_DAYS;
/* Create the menu */
make_menu (glade_xml_get_widget (xml, "type_menu"), nbt);
combo_box = glade_xml_get_widget (xml, "type_combobox");
gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), nbt->notebook.type - 1);
/* Show the right notebook page */
show_notebook (&nbt->notebook);
@@ -509,27 +479,26 @@ static void
billterms_window_refresh (BillTermsWindow *btw)
{
GList *list, *node;
GtkAdjustment *vadjustment;
GtkCList *clist;
gfloat save_value = 0.0;
GncBillTerm *term;
GtkTreeView *view;
GtkListStore *store;
GtkTreeIter iter;
GtkTreePath *path;
GtkTreeSelection *selection;
GtkTreeRowReference *reference = NULL;
g_return_if_fail (btw);
clist = GTK_CLIST (btw->terms_clist);
vadjustment = gtk_clist_get_vadjustment (clist);
if (vadjustment)
save_value = vadjustment->value;
view = GTK_TREE_VIEW (btw->terms_view);
store = GTK_LIST_STORE(gtk_tree_view_get_model(view));
/* Clear the list */
gtk_clist_freeze (clist);
gtk_clist_clear (clist);
gtk_list_store_clear (store);
gnc_gui_component_clear_watches (btw->component_id);
/* Add the items to the list */
list = gncBillTermGetTerms (btw->book);
/* If there are no erms, clear the term display */
/* If there are no terms, clear the term display */
if (list == NULL) {
btw->current_term = NULL;
billterms_term_refresh (btw);
@@ -538,20 +507,21 @@ billterms_window_refresh (BillTermsWindow *btw)
}
for ( node = list; node; node = node->next) {
char *row_text[2];
gint row;
GncBillTerm *term = node->data;
term = node->data;
gnc_gui_component_watch_entity (btw->component_id,
gncBillTermGetGUID (term),
QOF_EVENT_MODIFY);
row_text[0] = (char *)gncBillTermGetName (term);
row_text[1] = NULL;
row = gtk_clist_prepend (clist, row_text);
gtk_clist_set_row_data (clist, row, term);
gtk_clist_set_selectable (clist, row, TRUE);
gtk_list_store_prepend(store, &iter);
gtk_list_store_set(store, &iter,
BILL_TERM_COL_NAME, gncBillTermGetName(term),
BILL_TERM_COL_TERM, term,
-1);
if (term == btw->current_term) {
path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(store), path);
gtk_tree_path_free(path);
}
}
g_list_free (list);
@@ -560,38 +530,30 @@ billterms_window_refresh (BillTermsWindow *btw)
GNC_BILLTERM_MODULE_NAME,
QOF_EVENT_CREATE | QOF_EVENT_DESTROY);
if (vadjustment) {
save_value = CLAMP (save_value, vadjustment->lower,
vadjustment->upper - vadjustment->page_size);
gtk_adjustment_set_value (vadjustment, save_value);
if (reference) {
path = gtk_tree_row_reference_get_path(reference);
gtk_tree_row_reference_free(reference);
if (path) {
selection = gtk_tree_view_get_selection(view);
gtk_tree_selection_select_path(selection, path);
gtk_tree_view_scroll_to_cell(view, path, NULL, TRUE, 0.5, 0.0);
gtk_tree_path_free(path);
}
}
gtk_clist_thaw (clist);
{
gint row = gtk_clist_find_row_from_data (clist, btw->current_term);
if (row < 0)
row = 0;
gtk_clist_select_row (clist, row, 0);
/* If this row isn't visible, move it to the center */
if (gtk_clist_row_is_visible (clist, row) != GTK_VISIBILITY_FULL)
gtk_clist_moveto (clist, row, 0, 0.5, 0);
}
/* select_row() above will refresh the term display */
}
void
billterms_row_selected (GtkCList *clist, gint row, gint column,
GdkEventButton *event, gpointer user_data)
static void
billterm_selection_changed (GtkTreeSelection *selection,
BillTermsWindow *btw)
{
BillTermsWindow *btw = user_data;
GncBillTerm *term = gtk_clist_get_row_data (clist, row);
GncBillTerm *term = NULL;
GtkTreeModel *model;
GtkTreeIter iter;
g_return_if_fail (btw);
g_return_if_fail (term);
if (gtk_tree_selection_get_selected(selection, &model, &iter))
gtk_tree_model_get(model, &iter, BILL_TERM_COL_TERM, &term, -1);
/* If we've changed, then reset the term list */
if (term != btw->current_term)
@@ -599,10 +561,15 @@ billterms_row_selected (GtkCList *clist, gint row, gint column,
/* And force a refresh of the entries */
billterms_term_refresh (btw);
}
/* If the user double-clicked on the item, pop up the edit window */
if (event && event->type == GDK_2BUTTON_PRESS)
new_billterm_dialog (btw, term, NULL);
static void
billterm_selection_activated (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
BillTermsWindow *btw)
{
new_billterm_dialog (btw, btw->current_term, NULL);
}
void
@@ -702,6 +669,11 @@ gnc_ui_billterms_window_new (GNCBook *book)
BillTermsWindow *btw;
GladeXML *xml;
GtkWidget *widget;
GtkTreeView *view;
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
GtkListStore *store;
GtkTreeSelection *selection;
if (!book) return NULL;
@@ -724,11 +696,28 @@ gnc_ui_billterms_window_new (GNCBook *book)
/* Open and read the XML */
xml = gnc_glade_xml_new ("billterms.glade", "Terms Window");
btw->dialog = glade_xml_get_widget (xml, "Terms Window");
btw->terms_clist = glade_xml_get_widget (xml, "terms_clist");
btw->terms_view = glade_xml_get_widget (xml, "terms_view");
btw->desc_entry = glade_xml_get_widget (xml, "desc_entry");
btw->type_label = glade_xml_get_widget (xml, "type_label");
btw->term_vbox = glade_xml_get_widget (xml, "term_vbox");
/* Initialize the view */
view = GTK_TREE_VIEW(btw->terms_view);
store = gtk_list_store_new (NUM_BILL_TERM_COLS, G_TYPE_STRING, G_TYPE_POINTER);
gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes("", renderer,
"text", BILL_TERM_COL_NAME,
NULL);
gtk_tree_view_append_column(view, column);
g_signal_connect(view, "row-activated",
G_CALLBACK(billterm_selection_activated), btw);
selection = gtk_tree_view_get_selection(view);
g_signal_connect(selection, "changed",
G_CALLBACK(billterm_selection_changed), btw);
/* Initialize the notebook widgets */
init_notebook_widgets (&btw->notebook, TRUE,
GTK_DIALOG (btw->dialog), btw);
@@ -327,7 +327,7 @@ gnc_customer_window_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_customer_window_help_cb (GtkWidget *widget, gpointer data)
{
gnc_gnome_help(HF_USAGE, NULL);
gnc_gnome_help(HF_HELP, HL_USAGE);
}
void
@@ -263,7 +263,7 @@ gnc_employee_window_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_employee_window_help_cb (GtkWidget *widget, gpointer data)
{
gnc_gnome_help(HF_USAGE, NULL);
gnc_gnome_help(HF_HELP, HL_USAGE);
}
void
+4 -1
View File
@@ -406,7 +406,7 @@ gnc_invoice_window_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_invoice_window_help_cb (GtkWidget *widget, gpointer data)
{
gnc_gnome_help(HF_USAGE, NULL);
gnc_gnome_help(HF_HELP, HL_USAGE);
}
void
@@ -1678,6 +1678,9 @@ gnc_invoice_new_page (GNCBook *bookp, InvoiceDialogType type,
new_page = gnc_plugin_page_invoice_new (iw);
gnc_main_window_open_page (gnc_plugin_business_get_window(), new_page);
/* Initialize the summary bar */
gnc_invoice_redraw_all_cb(iw->reg, iw);
return iw;
}
+1 -1
View File
@@ -191,7 +191,7 @@ gnc_job_window_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_job_window_help_cb (GtkWidget *widget, gpointer data)
{
gnc_gnome_help(HF_USAGE, NULL);
gnc_gnome_help(HF_HELP, HL_USAGE);
}
+1 -1
View File
@@ -224,7 +224,7 @@ gnc_order_window_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_order_window_help_cb (GtkWidget *widget, gpointer data)
{
gnc_gnome_help(HF_USAGE, NULL);
gnc_gnome_help(HF_HELP, HL_USAGE);
}
void
+5 -2
View File
@@ -2,6 +2,7 @@
* dialog-payment.c -- Dialog for payment entry
* Copyright (C) 2002,2006 Derek Atkins
* Author: Derek Atkins <warlord@MIT.EDU>
* Copyright (c) 2006 David Hampton <hampton@employees.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -34,6 +35,7 @@
#include "qof.h"
#include "gnc-date-edit.h"
#include "gnc-amount-edit.h"
#include "gnc-gtk-utils.h"
#include "gnc-tree-view-account.h"
#include "Transaction.h"
#include "Account.h"
@@ -246,7 +248,7 @@ gnc_payment_ok_cb (GtkWidget *widget, gpointer data)
}
/* Verify the "post" account */
text = gtk_entry_get_text (GTK_ENTRY ((GTK_COMBO (pw->post_combo))->entry));
text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(pw->post_combo));
if (!text || safe_strcmp (text, "") == 0) {
text = _("You must enter an account name for posting.");
gnc_error_dialog (pw->dialog, text);
@@ -383,6 +385,7 @@ new_payment_window (GncOwner *owner, GNCBook *book, GncInvoice *invoice)
pw->num_entry = glade_xml_get_widget (xml, "num_entry");
pw->memo_entry = glade_xml_get_widget (xml, "memo_entry");
pw->post_combo = glade_xml_get_widget (xml, "post_combo");
gnc_cbe_require_list_item(GTK_COMBO_BOX_ENTRY(pw->post_combo));
label = glade_xml_get_widget (xml, "owner_label");
box = glade_xml_get_widget (xml, "owner_box");
@@ -451,7 +454,7 @@ new_payment_window (GncOwner *owner, GNCBook *book, GncInvoice *invoice)
const gchar *text;
const char *acct_type;
text = gtk_entry_get_text(GTK_ENTRY((GTK_COMBO(pw->post_combo))->entry));
text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(pw->post_combo));
if (!text || safe_strcmp (text, "") == 0) {
/* XXX: I know there's only one type here */
+1 -1
View File
@@ -250,7 +250,7 @@ gnc_vendor_window_cancel_cb (GtkWidget *widget, gpointer data)
void
gnc_vendor_window_help_cb (GtkWidget *widget, gpointer data)
{
gnc_gnome_help(HF_USAGE, NULL);
gnc_gnome_help(HF_HELP, HL_USAGE);
}
void
+33 -100
View File
@@ -107,30 +107,14 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkCList" id="terms_clist">
<widget class="GtkTreeView" id="terms_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="n_columns">1</property>
<property name="column_widths">80</property>
<property name="selection_mode">GTK_SELECTION_SINGLE</property>
<property name="show_titles">False</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<signal name="select_row" handler="billterms_row_selected" last_modification_time="Mon, 08 Sep 2003 02:00:56 GMT"/>
<child>
<widget class="GtkLabel" id="label23">
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<property name="fixed_height_mode">False</property>
</widget>
</child>
</widget>
@@ -560,37 +544,6 @@
</packing>
</child>
<child>
<widget class="GtkOptionMenu" id="type_menu">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Choose the type of Billing Term</property>
<property name="can_focus">True</property>
<property name="history">0</property>
<child internal-child="menu">
<widget class="GtkMenu" id="convertwidget3">
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="convertwidget4">
<property name="visible">True</property>
<property name="label" translatable="yes">Type Menu</property>
<property name="use_underline">True</property>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="notebook_box">
<property name="visible">True</property>
@@ -785,7 +738,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">type_menu</property>
<property name="mnemonic_widget">type_combobox</property>
</widget>
</child>
</widget>
@@ -798,6 +751,24 @@
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="type_combobox">
<property name="visible">True</property>
<property name="items" translatable="yes">Days
Proximo</property>
<property name="focus_on_click">True</property>
<signal name="changed" handler="billterms_type_combobox_changed" last_modification_time="Tue, 06 Jun 2006 01:17:37 GMT"/>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
@@ -991,7 +962,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">type_menu</property>
<property name="mnemonic_widget">type_combobox</property>
</widget>
</child>
</widget>
@@ -1006,25 +977,12 @@
</child>
<child>
<widget class="GtkOptionMenu" id="type_menu">
<widget class="GtkComboBox" id="type_combobox">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Choose the type of Billing Term</property>
<property name="can_focus">True</property>
<property name="history">0</property>
<child internal-child="menu">
<widget class="GtkMenu" id="convertwidget3">
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="convertwidget4">
<property name="visible">True</property>
<property name="label" translatable="yes">Type Menu</property>
<property name="use_underline">True</property>
</widget>
</child>
</widget>
</child>
<property name="items" translatable="yes">Days
Proximo</property>
<property name="focus_on_click">True</property>
<signal name="changed" handler="billterms_type_combobox_changed" last_modification_time="Tue, 06 Jun 2006 01:17:37 GMT"/>
</widget>
<packing>
<property name="left_attach">1</property>
@@ -1032,7 +990,7 @@
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
<property name="y_options">fill</property>
</packing>
</child>
@@ -1065,30 +1023,6 @@
</child>
</widget>
<widget class="GtkMenu" id="Term Type Popup">
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="days1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Number of days from now</property>
<property name="label" translatable="yes">Days</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_days1_activate"/>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="proximo1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Absolute Day-of-the-month</property>
<property name="label" translatable="yes">Proximo</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_proximo1_activate"/>
</widget>
</child>
</widget>
<widget class="GtkWindow" id="Term Notebook">
<property name="title" translatable="yes">window1</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
@@ -1105,8 +1039,7 @@
<child>
<widget class="GtkNotebook" id="term_notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_tabs">True</property>
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<property name="tab_pos">GTK_POS_TOP</property>
<property name="scrollable">False</property>
@@ -1482,7 +1482,7 @@
</widget>
<packing>
<property name="padding">3</property>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
@@ -1561,7 +1561,7 @@
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
@@ -95,7 +95,7 @@
<child>
<widget class="GtkLabel" id="owner_label">
<property name="visible">True</property>
<property name="label" translatable="no">(owner)</property>
<property name="label">(owner)</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_RIGHT</property>
@@ -116,7 +116,7 @@
<child>
<widget class="GtkLabel" id="invoice_label">
<property name="visible">True</property>
<property name="label" translatable="no">(invoice)</property>
<property name="label">(invoice)</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -309,7 +309,7 @@
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
@@ -328,7 +328,7 @@
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
@@ -381,57 +381,11 @@
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<child>
<widget class="GtkCombo" id="post_combo">
<property name="border_width">3</property>
<widget class="GtkComboBoxEntry" id="post_combo">
<property name="visible">True</property>
<property name="value_in_list">True</property>
<property name="allow_empty">False</property>
<property name="case_sensitive">False</property>
<property name="enable_arrow_keys">True</property>
<property name="enable_arrows_always">False</property>
<child internal-child="entry">
<widget class="GtkEntry" id="combo-entry1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char" translatable="yes">*</property>
<property name="activates_default">False</property>
</widget>
</child>
<child internal-child="list">
<widget class="GtkList" id="convertwidget1">
<property name="visible">True</property>
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
<child>
<widget class="GtkListItem" id="convertwidget2">
<property name="visible">True</property>
<child>
<widget class="GtkLabel" id="convertwidget3">
<property name="visible">True</property>
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<property name="items">Dummy Entry</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
</widget>
</child>
+26 -76
View File
@@ -3,6 +3,8 @@
*
* Authors: Derek Atkins <warlord@MIT.EDU>
*
* Copyright (c) 2006 David Hampton <hampton@employees.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
@@ -32,6 +34,7 @@
#include "business-gnome-utils.h"
#include "search-owner.h"
#include "search-core-utils.h"
#define d(x)
@@ -199,11 +202,14 @@ set_owner_widget (GNCSearchOwner *fe)
}
static void
type_option_changed (GtkWidget *widget, GNCSearchOwner *fe)
type_combo_changed (GtkWidget *widget, GNCSearchOwner *fe)
{
GNCSearchOwnerPrivate *priv;
GncOwnerType type = (GncOwnerType)
g_object_get_data (G_OBJECT (widget), "option");
GncOwnerType type;
g_return_if_fail(GTK_IS_COMBO_BOX(widget));
type = gnc_combo_box_search_get_active(GTK_COMBO_BOX(widget));
/* If the type changed or if we don't have a type create the owner_choice */
priv = GNC_SEARCH_OWNER_GET_PRIVATE(fe);
@@ -215,100 +221,44 @@ type_option_changed (GtkWidget *widget, GNCSearchOwner *fe)
set_owner_widget (fe);
}
static GtkWidget *
add_type_menu_item (GtkWidget *menu, gpointer user_data, char *label,
GncOwnerType type)
{
GtkWidget *item = gtk_menu_item_new_with_label (label);
g_object_set_data (G_OBJECT (item), "option", (gpointer) type);
g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (type_option_changed),
user_data);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
return item;
}
#define ADD_TYPE_MENU_ITEM(str,tp) { \
item = add_type_menu_item (menu, fe, str, tp); \
if (type == tp) { current = index; first = item; } \
index++; \
}
static GtkWidget *
make_type_menu (GNCSearchCoreType *fe)
{
GNCSearchOwner *fi = (GNCSearchOwner *)fe;
GNCSearchOwnerPrivate *priv;
GtkWidget *menu, *item, *first, *opmenu;
int current = 0, index = 0;
GtkComboBox *combo;
GncOwnerType type;
menu = gtk_menu_new ();
priv = GNC_SEARCH_OWNER_GET_PRIVATE(fi);
type = gncOwnerGetType (&(priv->owner));
ADD_TYPE_MENU_ITEM (_("Customer"), GNC_OWNER_CUSTOMER);
first = item;
ADD_TYPE_MENU_ITEM (_("Vendor"), GNC_OWNER_VENDOR);
ADD_TYPE_MENU_ITEM (_("Employee"), GNC_OWNER_EMPLOYEE);
ADD_TYPE_MENU_ITEM (_("Job"), GNC_OWNER_JOB);
combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, _("Customer"), GNC_OWNER_CUSTOMER);
gnc_combo_box_search_add(combo, _("Vendor"), GNC_OWNER_VENDOR);
gnc_combo_box_search_add(combo, _("Employee"), GNC_OWNER_EMPLOYEE);
gnc_combo_box_search_add(combo, _("Job"), GNC_OWNER_JOB);
opmenu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
g_signal_connect (combo, "changed", G_CALLBACK (type_combo_changed), fe);
gnc_combo_box_search_set_active(combo, type);
return GTK_WIDGET(combo);
g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
return opmenu;
}
static void
how_option_changed (GtkWidget *widget, GNCSearchOwner *fe)
{
fe->how = (query_compare_t)
g_object_get_data (G_OBJECT (widget), "option");
}
static GtkWidget *
add_how_menu_item (GtkWidget *menu, gpointer user_data, char *label,
query_compare_t option)
{
GtkWidget *item = gtk_menu_item_new_with_label (label);
g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (how_option_changed),
user_data);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
return item;
}
#define ADD_HOW_MENU_ITEM(str,op) { \
item = add_how_menu_item (menu, fe, str, op); \
if (fi->how == op) { current = index; first = item; } \
index++; \
}
static GtkWidget *
make_how_menu (GNCSearchCoreType *fe)
{
GNCSearchOwner *fi = (GNCSearchOwner *)fe;
GtkWidget *menu, *item, *first, *opmenu;
int current = 0, index = 0;
GtkComboBox *combo;
menu = gtk_menu_new ();
combo = GTK_COMBO_BOX(gnc_combo_box_new_search());
gnc_combo_box_search_add(combo, _("is"), GUID_MATCH_ANY);
gnc_combo_box_search_add(combo, _("is not"), GUID_MATCH_NONE);
gnc_combo_box_search_changed(combo, &fi->how);
gnc_combo_box_search_set_active(combo, fi->how ? fi->how : GUID_MATCH_ANY);
ADD_HOW_MENU_ITEM (_("is"), GUID_MATCH_ANY);
first = item; /* Force one */
ADD_HOW_MENU_ITEM (_("is not"), GUID_MATCH_NONE);
opmenu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
return opmenu;
return GTK_WIDGET(combo);
}
static GtkWidget *
+11 -8
View File
@@ -627,6 +627,7 @@ gnc_entry_ledger_compute_value (GncEntryLedger *ledger,
gboolean taxable, taxincluded;
GncTaxTable *table;
GList *taxes = NULL;
int denom = 100;
gnc_entry_ledger_get_numeric (ledger, ENTRY_QTY_CELL, &qty);
gnc_entry_ledger_get_numeric (ledger, ENTRY_PRIC_CELL, &price);
@@ -670,18 +671,20 @@ gnc_entry_ledger_compute_value (GncEntryLedger *ledger,
table = NULL;
}
if (ledger->invoice)
{
gnc_commodity *currency = gncInvoiceGetCurrency(ledger->invoice);
if (currency)
denom = gnc_commodity_get_fraction(currency);
}
gncEntryComputeValue (qty, price, (taxable ? table : NULL), taxincluded,
discount, disc_type, disc_how,
discount, disc_type, disc_how, denom,
value, NULL, &taxes);
/* Now convert the values to the proper denomination */
if (value)
*value = gnc_numeric_convert (*value, 100 /* XXX */, GNC_RND_ROUND);
if (tax_value) {
/* return the tax value */
if (tax_value)
*tax_value = gncAccountValueTotal (taxes);
*tax_value = gnc_numeric_convert (*tax_value, 100 /* XXX */, GNC_RND_ROUND);
}
}
gboolean
@@ -172,69 +172,16 @@ skip_income_acct_cb (Account *account, gpointer user_data)
/* ===================================================================== */
/* Splat the account name into the transfer cell combobox menu */
typedef struct {
ComboCell *cell;
GncEntryLedgerType ledger_type;
} BCE;
static gpointer
load_entry_xfer_cell_cb (Account *account, gpointer data)
{
BCE *bce = data;
GNCAccountType type;
char *name;
/* Don't add A/R, A/P, Bank, Cash, or Equity accounts */
type = xaccAccountGetType (account);
if (type == PAYABLE || type == RECEIVABLE ||
type == CASH || type == BANK || type == EQUITY)
{
return NULL;
}
/* If this is an ORDER or INVOICE, then leave out the expenses.
* if it's a BILL, then leave out the incomes
*/
switch (bce->ledger_type)
{
case GNCENTRY_ORDER_ENTRY:
case GNCENTRY_ORDER_VIEWER:
case GNCENTRY_INVOICE_ENTRY:
case GNCENTRY_INVOICE_VIEWER:
if (type == EXPENSE) return NULL;
break;
case GNCENTRY_BILL_ENTRY:
case GNCENTRY_BILL_VIEWER:
case GNCENTRY_EXPVOUCHER_ENTRY:
case GNCENTRY_EXPVOUCHER_VIEWER:
case GNCENTRY_NUM_REGISTER_TYPES:
if (type == INCOME) return NULL;
break;
}
/* Don't add placeholder accounts */
if (xaccAccountGetPlaceholder (account)) return NULL;
name = xaccAccountGetFullName (account);
if (NULL == name) return NULL;
gnc_combo_cell_add_menu_item (bce->cell, name);
g_free(name);
return NULL;
}
#define EKEY "Expense Business entry quickfill"
#define IKEY "Income Business entry quickfill"
static void
load_xfer_type_cells (GncEntryLedger *ledger)
{
BCE bce;
AccountGroup *group;
ComboCell *cell;
QuickFill *qf=NULL;
GtkListStore *store = NULL;
group = gnc_book_get_group (ledger->book);
if (group == NULL) return;
@@ -251,6 +198,8 @@ load_xfer_type_cells (GncEntryLedger *ledger)
case GNCENTRY_INVOICE_VIEWER:
qf = gnc_get_shared_account_name_quickfill (group, IKEY,
skip_expense_acct_cb, NULL);
store = gnc_get_shared_account_name_list_store (group, IKEY,
skip_expense_acct_cb, NULL);
break;
case GNCENTRY_BILL_ENTRY:
@@ -260,26 +209,20 @@ load_xfer_type_cells (GncEntryLedger *ledger)
case GNCENTRY_NUM_REGISTER_TYPES:
qf = gnc_get_shared_account_name_quickfill (group, EKEY,
skip_income_acct_cb, NULL);
store = gnc_get_shared_account_name_list_store (group, EKEY,
skip_income_acct_cb, NULL);
break;
}
cell = (ComboCell *)
gnc_table_layout_get_cell (ledger->table->layout, ENTRY_IACCT_CELL);
gnc_combo_cell_clear_menu (cell);
gnc_combo_cell_use_quickfill_cache (cell, qf);
bce.cell = cell;
bce.ledger_type = ledger->type;
xaccGroupForEachAccount (group, load_entry_xfer_cell_cb, &bce, TRUE);
gnc_combo_cell_use_list_store_cache (cell, store);
cell = (ComboCell *)
gnc_table_layout_get_cell (ledger->table->layout, ENTRY_BACCT_CELL);
gnc_combo_cell_clear_menu (cell);
gnc_combo_cell_use_quickfill_cache (cell, qf);
bce.cell = cell;
bce.ledger_type = ledger->type;
xaccGroupForEachAccount (group, load_entry_xfer_cell_cb, &bce, TRUE);
gnc_combo_cell_use_list_store_cache (cell, store);
}
/* ===================================================================== */
+2 -2
View File
@@ -203,8 +203,8 @@
this-currency
(company-get-currency company-info)))
(cons #f (sprintf
(_ "Transactions relating to company %d contain \
more than one currency. This report is not designed to cope with this possibility.")))
(_ "Transactions relating to '%s' contain \
more than one currency. This report is not designed to cope with this possibility.") (gnc:owner-get-name owner)))
(begin
(gnc:debug "it's an old company")
(if (gnc:numeric-negative-p value)
+6 -6
View File
@@ -25,8 +25,7 @@ libgncmod_dialog_tax_table_la_SOURCES = \
dialog-tax-table.c
noinst_HEADERS = \
dialog-tax-table.h \
gw-dialog-tax-table.h
dialog-tax-table.h
libgncmod_dialog_tax_table_la_LIBADD = \
${top_builddir}/src/business/business-core/libgncmod-business-core.la \
@@ -42,7 +41,7 @@ libgncmod_dialog_tax_table_la_LIBADD = \
${QOF_LIBS} \
${EFENCE_LIBS}
libgw_dialog_tax_table_la_SOURCES = gw-dialog-tax-table.c
nodist_libgw_dialog_tax_table_la_SOURCES = gw-dialog-tax-table.c
libgw_dialog_tax_table_la_LIBADD = \
libgncmod-dialog-tax-table.la \
@@ -50,8 +49,9 @@ libgw_dialog_tax_table_la_LIBADD = \
gwmoddir = ${GNC_GWRAP_LIBDIR}
gwmod_DATA = \
gw-dialog-tax-table.scm \
gw-dialog-tax-table-spec.scm
nodist_gwmod_DATA = \
gw-dialog-tax-table.scm
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = dialog-tax-table.scm
@@ -97,5 +97,5 @@ gw-dialog-tax-table.scm gw-dialog-tax-table.c gw-dialog-tax-table.h: \
BUILT_SOURCES = gw-dialog-tax-table.scm gw-dialog-tax-table.c \
gw-dialog-tax-table.h
CLEANFILES = g-wrapped gnucash .scm-links
DISTCLEANFILES = ${SCM_FILE_LINKS} gw-dialog-tax-table.html
CLEANFILES = $(BUILT_SOURCES) g-wrapped gnucash .scm-links \
${SCM_FILE_LINKS} gw-dialog-tax-table.html
+169 -142
View File
@@ -32,6 +32,7 @@
#include "gnc-component-manager.h"
#include "gnc-ui.h"
#include "gnc-gui-query.h"
#include "gnc-gtk-utils.h"
#include "gnc-ui-util.h"
#include "qof.h"
#include "gnc-amount-edit.h"
@@ -43,23 +44,32 @@
#define DIALOG_TAX_TABLE_CM_CLASS "tax-table-dialog"
#define GCONF_SECTION "dialogs/business/tax_tables"
enum tax_table_cols {
TAX_TABLE_COL_NAME = 0,
TAX_TABLE_COL_POINTER,
NUM_TAX_TABLE_COLS
};
enum tax_entry_cols {
TAX_ENTRY_COL_NAME = 0,
TAX_ENTRY_COL_POINTER,
TAX_ENTRY_COL_AMOUNT,
NUM_TAX_ENTRY_COLS
};
void tax_table_new_table_cb (GtkButton *button, TaxTableWindow *ttw);
void tax_table_delete_table_cb (GtkButton *button, TaxTableWindow *ttw);
void tax_table_new_entry_cb (GtkButton *button, TaxTableWindow *ttw);
void tax_table_edit_entry_cb (GtkButton *button, TaxTableWindow *ttw);
void tax_table_delete_entry_cb (GtkButton *button, TaxTableWindow *ttw);
void tax_table_row_selected (GtkCList *clist, gint row, gint column,
GdkEventButton *event, gpointer user_data);
void tax_table_entry_row_selected (GtkCList *clist, gint row, gint column,
GdkEventButton *event, gpointer user_data);
void tax_table_window_close (GtkWidget *widget, gpointer data);
void tax_table_window_destroy_cb (GtkWidget *widget, gpointer data);
struct _taxtable_window {
GtkWidget * dialog;
GtkWidget * names_clist;
GtkWidget * entries_clist;
GtkWidget * names_view;
GtkWidget * entries_view;
GncTaxTable * current_table;
GncTaxTableEntry * current_entry;
@@ -175,43 +185,15 @@ new_tax_table_ok_cb (NewTaxTable *ntt)
}
static void
optionmenu_changed (GtkWidget *widget, NewTaxTable *ntt)
combo_changed (GtkWidget *widget, NewTaxTable *ntt)
{
g_return_if_fail (ntt);
ntt->type = GPOINTER_TO_INT (g_object_get_data (G_OBJECT(widget), "option"));
}
gint index;
static GtkWidget *
add_menu_item (GtkWidget *menu, NewTaxTable *ntt, char *label, gint type)
{
GtkWidget *item;
g_return_if_fail(GTK_IS_COMBO_BOX(widget));
g_return_if_fail(ntt);
item = gtk_menu_item_new_with_label (label);
g_object_set_data (G_OBJECT (item), "option", GINT_TO_POINTER (type));
g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (optionmenu_changed), ntt);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show (item);
return item;
}
static GtkWidget *
make_menu (GtkWidget *omenu, NewTaxTable *ntt)
{
GtkWidget *menu, *value, *percent;
int current = ntt->type - 1;
menu = gtk_menu_new ();
value = add_menu_item (menu, ntt, _("Value $"), GNC_AMT_TYPE_VALUE);
/* xgettext:no-c-format */
percent = add_menu_item (menu, ntt, _("Percent %"), GNC_AMT_TYPE_PERCENT);
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
g_signal_emit_by_name (G_OBJECT ((current == GNC_AMT_TYPE_VALUE-1 ?
value : percent)), "activate", ntt);
gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current);
return menu;
index = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
ntt->type = index + 1;
}
static GncTaxTable *
@@ -221,9 +203,9 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
GncTaxTable *created_table = NULL;
NewTaxTable *ntt;
GladeXML *xml;
GtkWidget *box, *widget;
GtkWidget *box, *widget, *combo;
gboolean done;
gint response;
gint response, index;
if (!ttw) return NULL;
if (new_table && entry) return NULL;
@@ -246,7 +228,10 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
gtk_entry_set_text (GTK_ENTRY (ntt->name_entry), name);
/* Create the menu */
make_menu (glade_xml_get_widget (xml, "type_menu"), ntt);
combo = glade_xml_get_widget (xml, "type_combobox");
index = ntt->type ? ntt->type : GNC_AMT_TYPE_VALUE;
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), index - 1);
g_signal_connect (combo, "changed", G_CALLBACK (combo_changed), ntt);
/* Attach our own widgets */
box = glade_xml_get_widget (xml, "amount_box");
@@ -332,26 +317,27 @@ new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
/***********************************************************************/
static void
tax_table_entries_refresh (TaxTableWindow *ttw, gboolean new_table)
tax_table_entries_refresh (TaxTableWindow *ttw)
{
GList *list, *node;
GtkAdjustment *vadjustment = NULL;
GtkCList *clist;
gfloat save_value = 0.0;
GtkTreeView *view;
GtkListStore *store;
GtkTreeIter iter;
GtkTreePath *path;
GtkTreeSelection *selection;
GtkTreeRowReference *reference = NULL;
GncTaxTableEntry *selected_entry;
g_return_if_fail (ttw);
clist = GTK_CLIST (ttw->entries_clist);
if (!new_table) {
vadjustment = gtk_clist_get_vadjustment (clist);
if (vadjustment)
save_value = vadjustment->value;
}
view = GTK_TREE_VIEW (ttw->entries_view);
store = GTK_LIST_STORE(gtk_tree_view_get_model(view));
/* Clear the list */
gtk_clist_freeze (clist);
gtk_clist_clear (clist);
selected_entry = ttw->current_entry;
gtk_list_store_clear (store);
if (ttw->current_table == NULL)
return;
/* Add the items to the list */
list = gncTaxTableGetEntries (ttw->current_table);
@@ -360,7 +346,6 @@ tax_table_entries_refresh (TaxTableWindow *ttw, gboolean new_table)
for (node = list ; node; node = node->next) {
char *row_text[3];
gint row;
GncTaxTableEntry *entry = node->data;
Account *acc = gncTaxTableEntryGetAccount (entry);
gnc_numeric amount = gncTaxTableEntryGetAmount (entry);
@@ -380,126 +365,115 @@ tax_table_entries_refresh (TaxTableWindow *ttw, gboolean new_table)
gnc_default_print_info (TRUE)));
break;
}
row_text[2] = NULL;
row = gtk_clist_prepend (clist, row_text);
gtk_clist_set_row_data (clist, row, entry);
gtk_clist_set_selectable (clist, row, TRUE);
gtk_list_store_prepend(store, &iter);
gtk_list_store_set(store, &iter,
TAX_ENTRY_COL_NAME, row_text[0],
TAX_ENTRY_COL_POINTER, entry,
TAX_ENTRY_COL_AMOUNT, row_text[1],
-1);
if (entry == selected_entry) {
path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(store), path);
gtk_tree_path_free(path);
}
g_free (row_text[0]);
g_free (row_text[1]);
}
g_list_free (list);
if (!new_table) {
if (vadjustment) {
save_value = CLAMP (save_value, vadjustment->lower,
vadjustment->upper - vadjustment->page_size);
gtk_adjustment_set_value (vadjustment, save_value);
if (reference) {
path = gtk_tree_row_reference_get_path(reference);
gtk_tree_row_reference_free(reference);
if (path) {
selection = gtk_tree_view_get_selection(view);
gtk_tree_selection_select_path(selection, path);
gtk_tree_view_scroll_to_cell(view, path, NULL, TRUE, 0.5, 0.0);
gtk_tree_path_free(path);
}
}
gtk_clist_thaw (clist);
{
gint row = gtk_clist_find_row_from_data (clist, ttw->current_entry);
if (row < 0)
row = 0;
gtk_clist_select_row (clist, row, 0);
/* If this row isn't visible, move it to the center */
if (gtk_clist_row_is_visible (clist, row) != GTK_VISIBILITY_FULL)
gtk_clist_moveto (clist, row, 0, 0.5, 0);
}
}
static void
tax_table_window_refresh (TaxTableWindow *ttw)
{
GList *list, *node;
GtkAdjustment *vadjustment;
GtkCList *clist;
gfloat save_value = 0.0;
GtkTreeView *view;
GtkListStore *store;
GtkTreeIter iter;
GtkTreePath *path;
GtkTreeSelection *selection;
GtkTreeRowReference *reference = NULL;
g_return_if_fail (ttw);
clist = GTK_CLIST (ttw->names_clist);
vadjustment = gtk_clist_get_vadjustment (clist);
if (vadjustment)
save_value = vadjustment->value;
view = GTK_TREE_VIEW (ttw->names_view);
store = GTK_LIST_STORE(gtk_tree_view_get_model(view));
/* Clear the list */
gtk_clist_freeze (clist);
gtk_clist_clear (clist);
gtk_list_store_clear(store);
gnc_gui_component_clear_watches (ttw->component_id);
/* Add the items to the list */
list = gncTaxTableGetTables (ttw->book);
/* If there are no tables, clear the entries list */
if (list == NULL)
gtk_clist_clear (GTK_CLIST (ttw->entries_clist));
else
if (list)
list = g_list_reverse (g_list_copy (list));
for (node = list; node; node = node->next) {
char *row_text[2];
gint row;
GncTaxTable *table = node->data;
gnc_gui_component_watch_entity (ttw->component_id,
gncTaxTableGetGUID (table),
QOF_EVENT_MODIFY);
row_text[0] = (char *)gncTaxTableGetName (table);
row_text[1] = NULL;
row = gtk_clist_prepend (clist, row_text);
gtk_clist_set_row_data (clist, row, table);
gtk_clist_set_selectable (clist, row, TRUE);
gtk_list_store_prepend(store, &iter);
gtk_list_store_set(store, &iter,
TAX_TABLE_COL_NAME, gncTaxTableGetName (table),
TAX_TABLE_COL_POINTER, table,
-1);
if (table == ttw->current_table) {
path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
reference = gtk_tree_row_reference_new(GTK_TREE_MODEL(store), path);
gtk_tree_path_free(path);
}
}
g_list_free (list);
if (list)
g_list_free (list);
gnc_gui_component_watch_entity_type (ttw->component_id,
GNC_TAXTABLE_MODULE_NAME,
QOF_EVENT_CREATE | QOF_EVENT_DESTROY);
if (vadjustment) {
save_value = CLAMP (save_value, vadjustment->lower,
vadjustment->upper - vadjustment->page_size);
gtk_adjustment_set_value (vadjustment, save_value);
}
gtk_clist_thaw (clist);
{
gint row = gtk_clist_find_row_from_data (clist, ttw->current_table);
if (row < 0)
row = 0;
gtk_clist_select_row (clist, row, 0);
/* If this row isn't visible, move it to the center */
if (gtk_clist_row_is_visible (clist, row) != GTK_VISIBILITY_FULL)
gtk_clist_moveto (clist, row, 0, 0.5, 0);
if (reference) {
path = gtk_tree_row_reference_get_path(reference);
gtk_tree_row_reference_free(reference);
if (path) {
selection = gtk_tree_view_get_selection(view);
gtk_tree_selection_select_path(selection, path);
gtk_tree_view_scroll_to_cell(view, path, NULL, TRUE, 0.5, 0.0);
gtk_tree_path_free(path);
}
}
;; tax_table_entries_refresh (ttw);
/* select_row() above will refresh the entries window */
}
void
tax_table_row_selected (GtkCList *clist, gint row, gint column,
GdkEventButton *event, gpointer user_data)
static void
tax_table_selection_changed (GtkTreeSelection *selection,
gpointer user_data)
{
TaxTableWindow *ttw = user_data;
GncTaxTable *table = gtk_clist_get_row_data (clist, row);
GncTaxTable *table;
GtkTreeModel *model;
GtkTreeIter iter;
g_return_if_fail (ttw);
if (!gtk_tree_selection_get_selected(selection, &model, &iter))
return;
gtk_tree_model_get(model, &iter, TAX_TABLE_COL_POINTER, &table, -1);
g_return_if_fail (table);
/* If we've changed, then reset the entry list */
@@ -508,24 +482,36 @@ tax_table_row_selected (GtkCList *clist, gint row, gint column,
ttw->current_entry = NULL;
}
/* And force a refresh of the entries */
tax_table_entries_refresh (ttw, TRUE);
tax_table_entries_refresh (ttw);
}
void
tax_table_entry_row_selected (GtkCList *clist, gint row, gint column,
GdkEventButton *event, gpointer user_data)
static void
tax_table_entry_selection_changed (GtkTreeSelection *selection,
gpointer user_data)
{
TaxTableWindow *ttw = user_data;
GncTaxTableEntry *entry = gtk_clist_get_row_data (clist, row);
GtkTreeModel *model;
GtkTreeIter iter;
g_return_if_fail (ttw);
g_return_if_fail (entry);
ttw->current_entry = entry;
if (!gtk_tree_selection_get_selected(selection, &model, &iter)) {
ttw->current_entry = NULL;
return;
}
/* If we double-click an item, then pop up an 'edit' window */
if (event && event->type == GDK_2BUTTON_PRESS)
new_tax_table_dialog (ttw, FALSE, entry, NULL);
gtk_tree_model_get(model, &iter, TAX_ENTRY_COL_POINTER, &ttw->current_entry, -1);
}
static void
tax_table_entry_row_activated (GtkTreeView *tree_view,
GtkTreePath *path,
GtkTreeViewColumn *column,
gpointer user_data)
{
TaxTableWindow *ttw = user_data;
new_tax_table_dialog (ttw, FALSE, ttw->current_entry, NULL);
}
void
@@ -665,6 +651,11 @@ gnc_ui_tax_table_window_new (GNCBook *book)
{
TaxTableWindow *ttw;
GladeXML *xml;
GtkTreeView *view;
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
GtkListStore *store;
GtkTreeSelection *selection;
if (!book) return NULL;
@@ -687,8 +678,44 @@ gnc_ui_tax_table_window_new (GNCBook *book)
/* Open and read the XML */
xml = gnc_glade_xml_new ("tax-tables.glade", "Tax Table Window");
ttw->dialog = glade_xml_get_widget (xml, "Tax Table Window");
ttw->names_clist = glade_xml_get_widget (xml, "tax_tables_clist");
ttw->entries_clist = glade_xml_get_widget (xml, "tax_table_entries");
ttw->names_view = glade_xml_get_widget (xml, "tax_tables_view");
ttw->entries_view = glade_xml_get_widget (xml, "tax_table_entries");
/* Create the tax tables view */
view = GTK_TREE_VIEW(ttw->names_view);
store = gtk_list_store_new (NUM_TAX_TABLE_COLS, G_TYPE_STRING,
G_TYPE_POINTER);
gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes("", renderer,
"text", TAX_TABLE_COL_NAME,
NULL);
gtk_tree_view_append_column(view, column);
selection = gtk_tree_view_get_selection(view);
g_signal_connect(selection, "changed",
G_CALLBACK(tax_table_selection_changed), ttw);
/* Create the tax table entries view */
view = GTK_TREE_VIEW(ttw->entries_view);
store = gtk_list_store_new (NUM_TAX_ENTRY_COLS, G_TYPE_STRING,
G_TYPE_POINTER, G_TYPE_STRING);
gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes("", renderer,
"text", TAX_ENTRY_COL_NAME,
NULL);
gtk_tree_view_append_column(view, column);
selection = gtk_tree_view_get_selection(view);
g_signal_connect(selection, "changed",
G_CALLBACK(tax_table_entry_selection_changed), ttw);
g_signal_connect(view, "row-activated",
G_CALLBACK(tax_table_entry_row_activated), ttw);
/* Setup signals */
glade_xml_signal_autoconnect_full( xml,
+31 -83
View File
@@ -107,30 +107,14 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkCList" id="tax_tables_clist">
<widget class="GtkTreeView" id="tax_tables_view">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="n_columns">1</property>
<property name="column_widths">80</property>
<property name="selection_mode">GTK_SELECTION_SINGLE</property>
<property name="show_titles">False</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<signal name="select_row" handler="tax_table_row_selected" last_modification_time="Mon, 08 Sep 2003 03:31:16 GMT"/>
<child>
<widget class="GtkLabel" id="label23">
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<property name="fixed_height_mode">False</property>
</widget>
</child>
</widget>
@@ -250,30 +234,14 @@
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkCList" id="tax_table_entries">
<widget class="GtkTreeView" id="tax_table_entries">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="n_columns">1</property>
<property name="column_widths">80</property>
<property name="selection_mode">GTK_SELECTION_SINGLE</property>
<property name="show_titles">False</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<signal name="select_row" handler="tax_table_entry_row_selected" last_modification_time="Mon, 08 Sep 2003 03:31:06 GMT"/>
<child>
<widget class="GtkLabel" id="label23">
<property name="label" translatable="yes"></property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
<property name="fixed_height_mode">False</property>
</widget>
</child>
</widget>
@@ -308,7 +276,7 @@
<widget class="GtkButton" id="edit_entry_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-edit</property>
<property name="label">Edit</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@@ -630,7 +598,7 @@
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="mnemonic_widget">type_menu</property>
<property name="mnemonic_widget">type_combobox</property>
</widget>
</child>
</widget>
@@ -664,43 +632,6 @@
</packing>
</child>
<child>
<widget class="GtkOptionMenu" id="type_menu">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="history">0</property>
<child internal-child="menu">
<widget class="GtkMenu" id="convertwidget5">
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="convertwidget6">
<property name="visible">True</property>
<property name="label" translatable="yes">Value ($)</property>
<property name="use_underline">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="convertwidget7">
<property name="visible">True</property>
<property name="label" translatable="yes">Percent (%)</property>
<property name="use_underline">True</property>
</widget>
</child>
</widget>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="amount_box">
<property name="visible">True</property>
@@ -758,6 +689,23 @@
<property name="y_options">fill</property>
</packing>
</child>
<child>
<widget class="GtkComboBox" id="type_combobox">
<property name="visible">True</property>
<property name="items" translatable="yes">Value $
Percent %</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
Loaded 100 of 263 files, more files were not shown because too many files have changed in this diff. Show more