Commit Graph

12809 Commits

Author SHA1 Message Date
Geert Janssens
32baf843e2 Replace IF_TYPE macro with a validation function
The macro is quite ugly: it's not a complete if condition (missing closing bracket)
which makes the code using it difficult to read and error-prone.
Even astyle got confused by it.
The replacement code is slightly longer (two lines per replaced IF_TYPE invocation)
but clean and readable.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18979 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-30 14:29:53 +00:00
Geert Janssens
ac6e872f84 Bug #612566 - Build failure with glib 2.10 - undefined gdk_color_to_string - part 2
Create the necessary HAVE_GTK_2_12 check in configure.in

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18978 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-30 10:58:43 +00:00
Geert Janssens
5f5f5a88f9 Bug #612566 - Build failure with glib 2.10 - undefined gdk_color_to_string
From modified patch by Bob

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18977 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-30 10:56:57 +00:00
Geert Janssens
746a4ca003 Remove redundant page tab setting code.
The tab is set again some time later in the gnc_main_window_connect function.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18976 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-30 10:20:14 +00:00
Geert Janssens
814ea90389 Add svn:ignore properties
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18975 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-28 22:14:13 +00:00
Geert Janssens
5d006dad74 Bug #605802 - Can't input Japanese characters at an account register window on windows with SCIM, IIIMF and XIM
This patch by Yasuaki Taniguchi fixes the business register.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18974 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-28 21:09:57 +00:00
Christian Stimming
c6e5d407e3 Cutecash: Fix missing #ifdefs for dbi calls.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18973 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-28 10:46:10 +00:00
Christian Stimming
bc411c57db Code cleanup in binreloc: Remove unused init_lib function. Add possibility to set the looked-up exe path from somewhere else.
Remove symbol mangling because r18940 already added the gnc_* prefix,
hence the symbol names are unique to gnucash anyway.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18972 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-27 22:08:17 +00:00
Christian Stimming
50163126ea Re-indentation of source code (sql parts).
This also strips trailing whitespaces from lines where they existed.
This re-indentation was done using astyle-1.24 using the following options:

astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18971 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-27 21:02:18 +00:00
Christian Stimming
88d3b83579 Re-indentation of source code.
This also strips trailing whitespaces from lines where they existed.
This re-indentation was done using astyle-1.24 using the following options:

astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18970 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-27 21:01:56 +00:00
Christian Stimming
a322015eb8 Rename the type GUID into GncGUID because on Windows, the system headers have a type GUID which clashes with ours.
Note that only the type was renamed, but not any enums or function names.
Hence, the scheme wrappers should be unchanged completely (hopefully).

Discussed at http://lists.gnucash.org/pipermail/gnucash-devel/2010-March/027679.html

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18969 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-27 21:01:21 +00:00
Christian Stimming
932eeb766d Cutecash: Compile & link SQL backend as well (but there is no GUI for this yet)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18968 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-27 20:27:10 +00:00
Christian Stimming
d5742f24fc Cutecash: Fix memory leak of missing cleanup of RecentFileMenu object.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18967 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-27 10:24:07 +00:00
Phil Longstaff
a383ad4875 Add business backend sql test infrastructure.
At this point, the test creates a customer, saves it to an sqlite3 db, loads it and compares the original and the loaded customer.  Will be expanded to test other business objects.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18966 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-26 19:15:56 +00:00
Phil Longstaff
1905fb8670 Add deep comparison routines for test purposes
1) Add routine gncCustomerEqual() which will do a deep comparison between two customers
2) Add routine gncAddressEqual() which will do a deep comparison between two addresses
3) Add more GncAddress gobject parameters for the remaining data items


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18965 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-26 19:13:34 +00:00
Geert Janssens
978002f0e3 Bug #613655 - Cannot load MYsql data, fix invalid state file name
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18964 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-25 22:08:34 +00:00
Phil Longstaff
eeb86ec6c3 Changes in dbi test infrastructure
1) Now that the various objects .c files can compare objects in different books, remove the duplicate copies.
2) Create a .la so that the business sql test code can use some common test infrastructure.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18963 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-25 20:45:07 +00:00
Phil Longstaff
962512ab7d Extend xaccXXXXXEqual() routines so that they can compare objects in different books to see if they have the same contents.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18962 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-25 18:32:40 +00:00
Christian Stimming
b53205e903 Set some more line-ending style properties.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18961 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-24 19:28:20 +00:00
Christian Stimming
fd0a7c2469 Set some more line-ending style properties.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18960 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-24 19:23:58 +00:00
Christian Stimming
c172bc7ee4 Set the desired line-ending style to the correct value on the server side.
Without the svn:eol-style property, SVN checkouts on windows tend to appear
with varying line endings. The only possible way around this in svn is to
set the expected line endings as svn properties.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18959 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-24 19:18:08 +00:00
Phil Longstaff
3fdbb0a412 Update dbi tests - more object types are now saved and loaded
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18958 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-23 21:43:05 +00:00
Phil Longstaff
cc843b4506 Add new CPP macros which make it cleaner to have conditional compilation based on compiler/system and options selected during config
Examples:

#if COMPILER(MSVC)
#if COMPILER(GCC)

#if ENABLE(NLS)
#if HAVE(PUTENV)

This platform.h file includes config.h, so that doesn't need to be included any more.

PLATFORM(X) is based on the definition of GNC_PLATFORM_X
COMPILER(X) is based on the definition of GNC_COMPILER_X.  At this point, only COMPILER(GCC), COMPILER(MSVC), COMPILER(MSVC7) and COMPILER(MINGW) are determined.
HAVE(X) is based on HAVE_X from config.h
ENABLE(X) is based on ENABLE_X from config.h
USE(X) is based on GNC_USE_X from config.h

Having these determinations at a central point makes it easier to add new platforms and easier to conditionally compile based on them.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18957 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-23 18:34:17 +00:00
Phil Longstaff
7b69a7f00f Create splits->accounts sql index and tx->post_date index when creating new databases
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18956 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-23 14:31:43 +00:00
Christian Stimming
2a3d00c24f MSVC compatibility: MSVC must not use g_fopen because it uses a different C runtime than the rest of (MSVC) file-handling functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18955 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-22 21:15:15 +00:00
Christian Stimming
dfc294652d MSVC compatibility: Always initialize all members of the QofObject struct.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18954 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-22 21:14:38 +00:00
John Ralls
ead0ae8571 Cleanup cruft and an error from r18945
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18953 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-22 20:43:38 +00:00
Geert Janssens
c928dc6a26 Open/Save As...: configure enter/double click to run the default action.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18952 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-22 20:31:10 +00:00
Geert Janssens
4f01227882 Whitespace cleanup
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18951 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-22 14:44:56 +00:00
Phil Longstaff
f35eea0358 Fix #613574 - Cannot create/save new employees using MySQL backend
Wrong gobject property name used when creating "username" property - sql backend couldn't read it.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18950 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-22 11:31:03 +00:00
Christian Stimming
ccaad41e0f Cutecash: Add more event handler to the account windows so that they will be deleted upon book closing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18947 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-21 21:38:33 +00:00
Christian Stimming
b0116c16a8 Cutecash: Code cleanup. Avoid crashes when undoing adding of new transactions by not deleting the tmp transaction object.
Also, correctly set the document state to "clean" after saving.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18946 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-21 21:37:50 +00:00
John Ralls
8fe9fee93f Fix bug #613375
Odd that this affected only OSX, as the fix is clearly consistent with the GtkLabel "ellipsize" property documentation. (I.e., the packing "expand" property must be TRUE on notebook labels.)




git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18945 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-21 20:38:12 +00:00
Christian Stimming
bf7cc0097e I18n: Mark forgotten string for translation. Pointed out by Yasuaki Taniguch.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18944 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-21 19:47:39 +00:00
Christian Stimming
19c86d924a Updated Japanese translation, copied from the Translation Project.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18943 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-21 19:43:56 +00:00
John Ralls
efe2d63a96 Forgot to delete a diagnostic in 18941
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18942 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-21 19:13:35 +00:00
Christian Stimming
e637921dc7 Cutecash: Implement account selection in new transaction correctly.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18941 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-21 09:37:59 +00:00
John Ralls
bab6eb9072 Fixup binreloc, which wasn't working correctly on OSX
Most changes are to rename the functions named gbr_* to gnc_gbr_*, so
that our modified binreloc (to provide mac bundle support) doesn't
collide with binreloc implementations in other libraries. (The instant
case was in libenchant.)

Also moved the IGE_MAC_CFLAGS and IGE_MAC_LIBS lines from
engine/Makefile.am to core-utils/Makefile.am. This was missed when
binreloc was moved.

And last, there was a minor error in the original OSX binreloc patch:
At line 68, #elif MAC_INTEGRATION should be (and now is) #elif defined
MAC_INTEGRATION.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18940 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-21 00:40:24 +00:00
Christian Stimming
14f810a0ca Enable editing of the "other" account of a transaction.
Register Account and our other types in the QMetaType system
so that QVariant can hold it and pass it between the model,
view, and delegate. Implement AccountSelectionDelegate that
presents a QComboBox editor widget for account selection.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18939 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-20 22:33:59 +00:00
Christian Stimming
ad0ddae5e6 Cutecash: Implement entering new transactions in the register.
Only the account selection is still missing.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18935 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-19 22:01:56 +00:00
Christian Stimming
8e5379f352 Bug #610675: Re-apply r18918, and now with the account color.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18934 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-19 17:50:36 +00:00
Christian Stimming
0fe240caac Bug #610675: Re-apply r18918, but only the tooltip fixing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18933 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-19 17:50:16 +00:00
Christian Stimming
07135180b7 Bug #610675: Re-apply r18918 but with the relevant event_box not visible on Windows.
This patch contains only the changed widget order (no color yet).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18932 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-19 17:49:54 +00:00
Derek Atkins
b45b80962f Make sure we include glade headers (#613326)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18931 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-19 15:42:55 +00:00
Christian Stimming
4b4fed8b4c Cutecash: Add empty line for entering a new transaction in the register. Doesn't yet store data, though.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18929 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-18 22:07:02 +00:00
Christian Stimming
a58c3c0690 Cutecash: Introduce separate base class GncInstance for QofInstance methods.
This is the base class for Account, Book, Commodity, Split, Transaction.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18928 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-18 22:06:42 +00:00
Christian Stimming
07d25ab17b Cutecash: Add deletion of rows/transactions (through "Cut"). With Undo. Hee Hee.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18927 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-17 21:28:51 +00:00
Christian Stimming
4e3be7b89c Cutecash: Fix file loading, saving, and save-as. Works fine now.
Also, use the new GDate setter/getter for the transaction time.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18926 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-17 19:24:01 +00:00
Christian Stimming
59be2dc692 Add getter/setter for transaction posted-date as a GDate.
In addition to the known timespec, the date is also stored
as a kvp_value of TYPE_GDATE so that we know afterwards this
date has really been set as a date.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18925 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-17 19:23:40 +00:00
Christian Stimming
0b7b3cf6a1 Add a GDate kvp_value type including conversions from and to all sorts of thingys.
Also, removed the default: switch clauses when handling a
kvp_value so that the compiler will already complain about
unhandled enum values.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18924 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-03-17 19:23:20 +00:00