Commit Graph

67 Commits

Author SHA1 Message Date
Christian Stimming
35129a333c Bug #539957: Replace struct named assignments by C99 "designated initializers"
Patch by Halton Huo.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17724 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-11-26 14:35:36 +00:00
Phil Longstaff
98373d0ccb If qof commit part2 fails, have error routine call engine to trigger
callback to show an error dialog.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17668 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-10-28 01:07:02 +00:00
Phil Longstaff
9173035d57 Merge gda-dev2 branch into trunk.
This introduces the dbi backend and the --enable-dbi configure option.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17444 57a11ea4-9604-0410-9ed3-97b8803252fd
2008-08-01 16:02:07 +00:00
David Hampton
fd26e126ec Remove the macro versions of qof_begin_edit and qof_commit_edit_part<x>.
The function call versions of these routines should be used instead.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16033 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-30 17:06:48 +00:00
David Hampton
ce65024722 Start putting an API in place for access to the members of the
QofInstance object.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16025 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-30 05:33:33 +00:00
Andreas Köhler
4acc6ac577 Add a few gncAddressBeginEdit before gncAddressDestroy.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15874 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-11 15:37:09 +00:00
Derek Atkins
8c6e7b8394 Add hooks for the gobject dispose() function so that we can
migrate each object's "free()" function to a combination of
dispose() and finalize().
(and yes, "make check" still passes all its tests)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gobject-engine-dev-warlord@15827 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-05 03:10:26 +00:00
Derek Atkins
4c64b3e9a0 convert GncVendor to gobject initialization
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gobject-engine-dev-warlord@15825 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-05 02:44:36 +00:00
Derek Atkins
12461c5b30 * Merge QofEntity into QofInstance
- QofEntity -> QofInstance
  - qof_entity -> qof_instance
  - QOF_ENTITY -> QOF_INSTANCE
* remove references to instance.entity
* keep qof_entity_init() and qof_entity_release() for now


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/gobject-engine-dev-warlord@15773 57a11ea4-9604-0410-9ed3-97b8803252fd
2007-04-01 22:18:50 +00:00
Christian Stimming
8139f08d62 Replace 'static inline' by 'static' for functions that are used by function pointers.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15161 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-11-29 15:13:02 +00:00
David Hampton
2ba716c4ed Use the existing QOF API to modify the instance dirty flag.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13912 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-05-03 02:28:18 +00:00
Chris Shoemaker
39d4d945b8 Replace calls to QOF_COMMIT_EDIT_PART1 macro with calls to qof_commit_edit()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13827 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-04-22 04:42:29 +00:00
David Hampton
61a12b2715 Remove more functions to be deprecated in libqof2. (Pass Two - more
trivial substitutions, some simple translations.)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13547 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-03-09 03:48:49 +00:00
Chris Shoemaker
cec7bb732c Use function version of QOF_COMMIT_EDIT_PART2.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13395 57a11ea4-9604-0410-9ed3-97b8803252fd
2006-02-26 18:36:05 +00:00
David Hampton
db2bed0e58 Include file cleanup. Remove the messages.[ch] files in favor of the
glib supplied gi18n.h file.  Replace includes of gnome.h with gtk.h
(or better yet glib.h) wherever possible.  Don't include gnome.h from
any header files.  Remove some extraneous includes.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11981 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-19 23:53:34 +00:00
David Hampton
0b8a944f30 Update FSF street address.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11964 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-17 05:35:02 +00:00
David Hampton
f28d033d74 Collapse the gnome2 branch back into HEAD.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11565 57a11ea4-9604-0410-9ed3-97b8803252fd
2005-11-02 03:32:36 +00:00
Derek Atkins
0bc9bfb411 Neil Williams's "QOF create: functionality added" patch.
QOF create: adding functions to be used with
	qof_object_new_instance for new qof_book_merge objects, including
	business objects.

	Small documentation tweak to make QofEntity and QofParam
	structures visible to doxygen.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10220 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-08-19 19:47:34 +00:00
Linas Vepstas
48df8b8884 Apply patch from Neil Williams <linux@codehelp.co.uk>
Extended the QofSetterFunc to business objects, for those set_fcn 's that
exist.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10207 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-07-26 12:41:43 +00:00
Linas Vepstas
4a1e07e594 merge changes from the backend-work-1 branch.
These changes conisted of:
-- change the backend begin()/commit() signatures to take qofinstance
   instead of gpointer
-- clean up non-standard use of books by the pricedb
-- rename the gnc-be-utils.h file so that its now a part of QOF


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10056 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-06-13 16:48:32 +00:00
Linas Vepstas
832d75d08e rename 'new' to 'create' to avoid reserved word collision with C++
add 'version_compare' function for sql backedn updates


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10042 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-06-12 20:27:08 +00:00
Linas Vepstas
ce63311484 -- Rename QOF_QUERY_PARAM_XX to QOF_PARAM_XX
-- Add 'new' callback to QofObject.  This allows QofObject to act
   as an 'object factory', creating a new instance of something,
   given only the type name.  Plan to use this in the new SQL
   backend, when restoring objects from SQL tables.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9965 57a11ea4-9604-0410-9ed3-97b8803252fd
2004-05-23 17:31:40 +00:00
Linas Vepstas
fee30d10b3 more cloning; update status in BusPeriod.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9611 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-21 13:53:55 +00:00
Linas Vepstas
8e9f1afc97 more cloning of stuff.
(Yes Derek, I'm agonizing over whether/how to clone/not clone depending
on the backend.  But in the meantime this fills in needed function anyway.)


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9606 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-21 05:12:38 +00:00
Linas Vepstas
93e1d35a87 remove set_guid from customer, add clone to vendor
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9595 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-20 13:44:41 +00:00
Linas Vepstas
6444e8169b change address to use entity instead of naked guid
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9579 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-19 15:45:30 +00:00
Linas Vepstas
9ba2722cbb changes to use generic 'collection-of-entities' functions instead of
per-module specific functions.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9570 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-19 05:13:59 +00:00
Linas Vepstas
6089b89c6f remove vestiges of prior incomkplete gnc->qof renaming scheme changes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9538 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-17 05:15:56 +00:00
Linas Vepstas
5b7d9cae9e merge from entity-mess branch: minor tweaks to bring into line
with entity reworjk in engine.  Add GPL licenses to some of the files.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9533 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-17 04:32:04 +00:00
Linas Vepstas
87a5b565b5 start work to make ids/entities/objects a little less wonky
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9505 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-14 21:20:55 +00:00
Linas Vepstas
c1935ea584 add qofinstance to vendor
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9504 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-10-14 13:46:24 +00:00
Linas Vepstas
84967a7f2e change include files
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9426 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-27 17:02:19 +00:00
Linas Vepstas
fd10a04277 add setters to the query object
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9424 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-27 16:33:06 +00:00
Linas Vepstas
f8bfae598f rename QofQueryObejct to QofParam to better reflect its acutal purpose
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9422 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-27 10:21:27 +00:00
Linas Vepstas
c87ddd7293 rename QOF_QUERYCORE_DATE to QOF_TYPE_DATE so taht these can be used
generically


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9420 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-09-27 09:39:27 +00:00
Derek Atkins
948af280a0 * src/engine/gnc-event*.[ch]:
Change the event generation and callback routines to
	  pass a QofIdType in addition to the GUID*

	* src/app-utils/gnc-component-manager.c:
	* src/gnome-utils/gnc-account-sel.c:
	  change to match the new event API.  Remove the need for
	  xaccGUIDType(), which means we no longer get the g_warning.

	* src/backend/postgres/events.c:
	* src/business/business-core/gncAddress.c:
	* src/business/business-core/gncAddress.h:
	* src/business/business-core/gncBillTerm.c:
	* src/business/business-core/gncCustomer.c:
	* src/business/business-core/gncEmployee.c:
	* src/business/business-core/gncEntry.c:
	* src/business/business-core/gncInvoice.c:
	* src/business/business-core/gncJob.c:
	* src/business/business-core/gncOrder.c:
	* src/business/business-core/gncTaxTable.c:
	* src/business/business-core/gncVendor.c:
	* src/business/business-core/test/test-address.c:
	* src/engine/Account.c:
	* src/engine/FreqSpec.c:
	* src/engine/Group.c:
	* src/engine/Period.c:
	* src/engine/SchedXaction.c:
	* src/engine/Transaction.c:
	* src/engine/gnc-lot.c:
	* src/engine/gnc-pricedb.c:
	* src/engine/qofbook.c:
	  Pass the QofIdType into the event generation code.
	Fixes #115988


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8776 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 05:51:05 +00:00
Linas Vepstas
e574f17710 oops, needed some hand-made conversions
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8770 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 03:45:42 +00:00
Linas Vepstas
bd03ce3eb1 continuing port to the qof code
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8769 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 03:36:02 +00:00
Linas Vepstas
761724ab32 continue port to qof
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8768 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 03:09:39 +00:00
Linas Vepstas
31b3a0284c port to qof
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8766 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-27 03:05:25 +00:00
Linas Vepstas
35163676f1 change over to new include files
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8748 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-26 07:27:52 +00:00
Linas Vepstas
731d1e78a3 add missing include file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8719 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 07:18:48 +00:00
Linas Vepstas
7e3cfdb060 add missing include files
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8711 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-25 06:11:30 +00:00
Linas Vepstas
cd0ead1ee2 fix include file usage
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8676 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-24 23:48:58 +00:00
Derek Atkins
0aacad725a * src/business/business-core/gncBillTerm.c:
- keep a list of children so we can unref ourselves from our
	    children when we get destroyed
	  - deal with parentless children
	* src/business/business-core/gncCustomer.c:
	* src/business/business-core/gncInvoice.c:
	* src/business/business-core/gncVendor.c:
	  deal with properly un-ref'ing Bill Terms and Tax Tables
	* src/business/business-core/file/gnc-bill-term-xml-v2.c:
	  create a scrub function to clear up bogus bill terms due to
	  bug #114888 which could cause bill terms to get created
	  due to post/unpost of invoices.  Scrubs all invoices and
	  fixes the reference to bill terms, and updates the refcounts.
	Fixes bug #114888 for bill terms.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8597 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-14 05:17:07 +00:00
Linas Vepstas
4d997e5b52 add missing gnc-commodity.h include file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8573 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-06-11 16:22:26 +00:00
Derek Atkins
198f41ee89 * src/engine/QueryNew.h: add QUERY_PARAM_ACTIVE
* src/business/business-core/gncCustomer.c:
	* src/business/business-core/gncEmployee.c:
	* src/business/business-core/gncInvoice.c:
	* src/business/business-core/gncJob.c:
	* src/business/business-core/gncOrder.c:
	* src/business/business-core/gncVendor.c:
	  add the QUERY_PARAM_ACTIVE parameter support
	* src/app-util/prefs.scm: add hidden preference to store
	  the user's choice of searchin
	* src/gnome-search/search.glade: add a checkbox to search-for-all
	* src/gnome-search/dialog-search.c -- add preliminary support to
	  limit searches to only "active" objects.  Fixes bug #103506


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7833 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-01-15 03:49:51 +00:00
Derek Atkins
c1adfb5be8 * .../business-core/gncCustomer.[ch]:
* .../business-core/gncVendor.[ch]:
	* .../business-core/gncEmployee.[ch]:
	  Rename ...Commodity() to ...Currency()
	* .../business-core/gw-business-core-spec.scm: fix function wrappings
	* .../business-core/file/gnc-customer-xml-v2.c:
	* .../business-core/file/gnc-vendor-xml-v2.c:
	* .../business-core/file/gnc-employee-xml-v2.c:
	  Use new function names.
	* .../business-gnome/business-gnome.scm:
	* .../business-gnome/dialog-customer.c:
	* .../business-gnome/dialog-vendor.c:
	* .../business-gnome/dialog-employee.c:
	  Use new ...Currency() functions
	More prep to fix #101001


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7819 57a11ea4-9604-0410-9ed3-97b8803252fd
2003-01-12 22:53:02 +00:00
Derek Atkins
25f3ffddb9 * business/business-core/*.c: add begin/commit edit calls in every 'set'
function.  Fixes 96855.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7434 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-11-04 00:41:01 +00:00
Derek Atkins
ac574a38eb * engine/gnc-be-utils.h: implement macro helpers for begin/commit functions
* business/business-core/*.c: Implement BeginEdit()/CommitEdit() functions
	  for all the business-accounting data objects.
	* Use the begin/commit calls in the GUI and file-backend.
	* mostly fixes bug #96855.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7431 57a11ea4-9604-0410-9ed3-97b8803252fd
2002-11-03 20:21:42 +00:00