Commit Graph

18386 Commits

Author SHA1 Message Date
Bert
178013bf9d Bug 776396 - Foreign currency reports, amounts are not aligned correctly
Bug 776396 - Foreign currency reports, amounts are not aligned correctly

This commit will improve the styling of the table element used
for foreign currencies in the Balance sheet report so they
end up aligned with the other currencies.
2017-05-13 15:46:07 +02:00
fell
efaeb99ff1 Add XSU to iso-4217-currencies
The future common currency of south america?
2017-05-06 23:47:11 +02:00
Geert Janssens
9087418f81 Drop ifdeffed out code block 2017-05-03 18:08:37 +02:00
Geert Janssens
c5ef629fdc Bug 781634 - Alert on missing account currency when opening account 2017-05-03 18:08:37 +02:00
Geert Janssens
e0af43d413 Properly handle import of reconcile state.
Gnucash exports this state localized it should expect a localized state on import.
2017-05-03 12:19:04 +02:00
Geert Janssens
3603ec1aa8 Document supported date formats in the saved csv settings 2017-05-03 09:44:36 +02:00
Geert Janssens
9af57849ba Use GncDate in csv importer
This removes all date specific functionality from the importer
2017-05-02 23:16:21 +02:00
Geert Janssens
7df29b572a Add copy constructor and assignment operator to GncDate 2017-05-02 23:09:36 +02:00
Geert Janssens
5070037314 Add comparison operators for GncDate
Note the operands are const GncDate& because the GncDate has no copy
constructor/assigment operator (any other definition would fail
when used with variables of type boost::optional<GncDate>)
2017-05-01 16:24:01 +02:00
John Ralls
582edc1b31 CMakeLists.txt: Remove Apple architecture settings.
Those should be passed in as part of CFLAGS/CXXFLAGS.
2017-04-29 17:53:10 -07:00
John Ralls
e79d9b5cba Updated ar.po from ashalash@msn.com
After removing duplicate translator email addresses and reference to the
Translation Project's Arabic team.
2017-04-29 17:53:10 -07:00
fell
2206f0a518 Fix wrong displayed position of the verbose flag in gnc-fq-dump 2017-04-29 01:27:55 +02:00
Geert Janssens
1a3595cbeb Convert gnc_dmy2timespec{,_end,_neutral} to use the equivalent GncDateTime constructor
This required a couple of tweaks to the tests because:
- the invalid date returned for impossible conversions is different between the old implementation and the cpp edition
- unhandled glib warnings caused the tests to abort
2017-04-28 18:41:04 +02:00
Geert Janssens
7a037932ae Align day end time as used in the GncDateTime constructor and gnc_dmy2timespec_end
The former was using 23:59:00 while existing code was using 23:59:59. To avoid
disruptions, stick with the latter in our cpp code as well.
2017-04-28 18:41:04 +02:00
Geert Janssens
586b89c6ca Fix John's remarks 2017-04-28 18:41:04 +02:00
Geert Janssens
610f6309a3 Fix double free abort in gtest-gnc-datetime.cpp
This double free happened after the introduction of a class variable (static member variable
to GndDate and the test compiling in gnc-datetime.cpp *and* at the same time linking to
gnc-qof. This apparently threw off internal memory management. Removing either of linking to
gnc-qof or compiling in the source file solved it.
Credits go to John Ralls for debugging this.
2017-04-28 18:41:04 +02:00
Geert Janssens
209f971589 Add constructor to create GncDate from string and predefined date format
Primary use case is for parsing dates from external sources (importers)
2017-04-28 18:41:04 +02:00
Geert Janssens
9b30bb2b62 Various small fixups in csv importer
- Use descriptive names instead of numbers in std::get<>
- Remove unused parameters
- Fix some doxigen comments
2017-04-28 18:41:04 +02:00
Geert Janssens
b7bcd792f6 Align cmake rational/numeric test invocation with Makefile based one
This invocation avoids linking in gnc-qof and instead will
directly pull in all sources required.
2017-04-28 18:41:04 +02:00
Geert Janssens
b5530bd41f Fix autotools based build
For some reason gnc-vcs-info.h isn't found properly any more although
the relevant parts of the Makefiles haven't changed compared to the
maint branch. Perhaps a compiler option has changed ? Anyway simply
adding its path explicitly does fix it.
2017-04-26 11:10:30 +02:00
Geert Janssens
391955975b Fix static code checker warnings about parameter definition in doxygen comments
Apparently these shouldn't suffixed with a colon (:)
2017-04-20 23:19:08 +02:00
Geert Janssens
d1ff16138e Add GncDateTime constructor taking a GncDate as parameter
As a GncDate doesn't have any time information, this has to be made up.
GnuCash uses 3 times-of-day quite a lot:
- start-of-day (00:00 local time)
- end-of-day (23:59 local time)
- neutral time (10:59 utc, chosen to minimize
  day offsetting when converting to/from localtime)

A second parameter to the new constructor will tell it to use one of these presets.
2017-04-20 23:18:01 +02:00
Geert Janssens
724f8aa784 Swap GncDate and GncDateTime in preparation of a future commit 2017-04-20 21:42:24 +02:00
John Ralls
b2b32e29fa Work around googletest bug 920.
https://github.com/google/googletest/issues/920, already addressed in configure.ac.
2017-04-17 11:52:44 -07:00
John Ralls
82c9367503 Merge branch 'PR140' into maint 2017-04-16 16:59:35 -07:00
John Ralls
bf3052206e Merge branch 'pr141' 2017-04-16 07:20:15 -07:00
Nitin Anand
4da080d363 Fix crash while saving scheduled transaction template 2017-04-16 13:12:02 +05:30
John Ralls
81fa7d76c4 Adjust CMAKE_C_FLAGS for better release/debug behavior. 2017-04-15 10:26:52 -05:00
Geert Janssens
dd9b2007b0 Gtk3: fix failing item-edit widget on sheets
There were several problems since the conversion to gtk3
* widget wasn't displayed at all - apparently this was because I had overriden the draw function of the gtklayout (sheet)
  -> fixed by adding a draw callback instead
* several gtk warnings about allocating sizes to widgets without using *get_preferred_width/height
  -> fixed by adding the itemedit dropdowns to the layout only when they are requested
* the arrow button didn't want to resize small enough
  -> fixed by adding a custom style to drops the button's internal padding
* there were several sizing issues which ironically got fixed dropping much of the custom sizing code
2017-04-14 19:23:19 +02:00
Geert Janssens
24ed305c18 Gtk3: fix register redrawing when the window is scrolled
The new drawing interface in gtk3 uses a different coordinate system.
Some calculations had to be adjusted to this.
2017-04-14 19:22:29 +02:00
Geert Janssens
3a76cb91f1 Gtk3: Fix register not being drawn - item_edit still missing
While the data is displayed the widget to edit the active cell isn't yet.
2017-04-14 19:21:35 +02:00
Geert Janssens
e5d2ab8dc5 Fix build with webkitgtk >= 2.8 2017-04-14 19:21:35 +02:00
John Ralls
d632abaa96 Get links working. 2017-04-14 19:21:35 +02:00
John Ralls
bb0376240d Get WebKit2Gtk basics compiling and working.
Copy and register links don't work.
2017-04-14 19:21:35 +02:00
John Ralls
15ef317968 Revert "Fix query period in test-account-get-trans-type-splits-interval."
This reverts commit e66dd12aa9. Because
the test only seems to fail crossing a DST boundary.
2017-04-14 19:21:34 +02:00
John Ralls
bf86524884 Correct gnc-html-webkit.c indentation. 2017-04-14 19:21:34 +02:00
Geert Janssens
8f66cf4286 Gtk3: Replace obsolete functions
gtk_statusbar_set_has_resize_grip
gdk_drawable_get_screen
gdk_device_get_core_pointer

There is no replacement for it in gtk3 and it's probably
not needed any more either.
2017-04-14 19:21:34 +02:00
Geert Janssens
e40acf5915 Temporarily disable deprecation warnings 2017-04-14 19:21:34 +02:00
John Ralls
89021dde39 Remove if-0-ed out code from gnc-html-webkit.c 2017-04-14 19:21:34 +02:00
Geert Janssens
87a0cb7360 Gtk3: fix direct access issue for entry widget in cell renderer mode
The old code directly accessed a member variable of GtkEntry. This
direct access is no longer possible, but there is no public function
to get/set this variable. There is a private one  used by
GtkComboBox internally) but it's not exported so it can't be used either.

As an interim solution I peeked at how hesiod handled it in his earlier
(unmerged) gtk3 branch. He replaced this private access with setting
gtk_widget_set_visible, something I wouldn't have considered in this
situation. The issue is in the register2 code, so for now it's not
too important. We can investigate this more when the register rewrite
is picked up again.
2017-04-14 19:21:34 +02:00
Geert Janssens
e26480ccbb Gtk3: Convert GdkColor into GdkRGBA
Only gnc-dense-cal.[ch] is left untouched because it's use
of color is tightly coupled to the use of GtkStyle. This
latter needs conversion as well, but would be too much to
add in one commit.

Additionally the register code uses GtkStyle to extract
colors. This has been partially converted to using GdkRGBA
with the inconvenient side effect that depending on how
a color is retrieved it has to be freed with gdk_rgba_free
or not. This may be cleaned up later.
2017-04-14 19:21:34 +02:00
Geert Janssens
f07ad114c4 Gtk3: replace expose_event size_request functions
expose_event has been replaced with draw
size_request has become get_preferred_width and get_preferred_height
2017-04-14 19:21:34 +02:00
Geert Janssens
2ca938bd67 Gtk3: Fix the remaining gtk direct access violations
These could not be fixed in Gtk2 because the accessor functions were only added as of Gtk3.
2017-04-14 19:21:34 +02:00
Geert Janssens
42264efd1b Gtk3: adapt to changed callback function signature 2017-04-14 19:21:34 +02:00
Geert Janssens
3065005f05 Gtk3: use CSS style instead of old GtkStyle interface 2017-04-14 19:21:20 +02:00
John Ralls
aa6854fb1b Use the Mac Locale to find the account templates only when building with quartz. 2017-04-10 15:23:25 -07:00
Mike Alexander
ce83251bd0 Fix a minor typo. 2017-04-10 01:53:04 -04:00
Mike Alexander
c7226ddd4f Delete left over line from previous merge conflict. 2017-04-10 01:37:23 -04:00
Mike Alexander
ce79222f05 Merge branch 'maint' 2017-04-10 01:27:47 -04:00
Mike Alexander
a2687bcbe3 Fix the SWIG Guile wrapping of functions that have a "struct tm" parameter.
The biggest problem was that a pointer to an out of scope struct tm was
passed to the wrapped function.  With opt level 2, clang doesn't bother
setting the contents of the struct since it goes out of scope without being
used.  This caused the transaction report to never report anything since
the start and end times it got were ridiculous.

Also most functions that take a struct tm pointer can change the contents
of the struct (if only to normalize it) so pass the new values back to Scheme.

Finally all calls to gnc_localtime and gnc_gmtime from Scheme leaked a struct tm
and calling gnc_tm_free from Scheme is a really bad idea so don't wrap it.
2017-04-09 16:25:45 -04:00