Commit Graph

18296 Commits

Author SHA1 Message Date
Robert Fewell
64deacf1e1 With Gtk3 it uses css to do the theming so change the file to load 2017-06-15 19:38:53 +01:00
christopherlam
385ca0c324 Bug 776396 Further Fix
This commit will further improve the styling of the table element used for foreign 
currencies in any report with foreign currencies or stocks. Adds non-breaking space 
between foreign currency/stock and report currency.
2017-06-04 12:26:46 +08:00
John Ralls
881a39d2eb Bug 783095 - gnucash-2.6.16 segfaults on startup
Null tip_list after freeing it the first time to prevent double-free,
then don't iterate over it if contents is NULL. Don't even try to open
dialog if tip_count < 1. Protect from dereferencing a NULL tip_list in
gnc_new_tip_number.
2017-05-26 11:34:00 -07:00
Mike Evans
e43e30d039 Change from deprecated gncEntrySetDate to gncEntrySetDateGDate.
Again.
2017-05-21 15:49:30 +01:00
Mike Evans
9591c52bf5 Revert "Change from deprecated gncEntrySetDate to gncEntrySetDateGDate."
Oops, more work required.

This reverts commit 78565f7939.
2017-05-21 15:38:51 +01:00
Mike Evans
78565f7939 Change from deprecated gncEntrySetDate to gncEntrySetDateGDate.
Should gncEntrySetDateEntered() similarly be deprecated?
2017-05-21 15:23:25 +01:00
Mike Evans
3e9716626f Correct a typo. 2017-05-19 08:03:12 +01:00
Mike Evans
5df97ba2a5 Use correct column for entry date.
The date opened will be set to today if that column is blank.
2017-05-18 19:27:47 +01:00
Guy Taylor
34bab999a5 Fix coredump in Python when using "get_namespaces"
The Python API incorectly had GncCommodityTable.get_namespaces() defined
as a list of GncCommodityNamespace over the correct list of String. This
fixes the issue and adds a test for GncCommodityTable.get_namespaces()
and GncCommodityTable.get_namespaces_list().

Note: This is not a direct fix as I could not get SWIG to detect/convert
"GList *" to a "gchar *" to a Python str list.
2017-05-17 10:40:21 +02:00
Guy Taylor
3cd2a6554c Enable Python tests in Travis CI 2017-05-17 01:28:43 +01:00
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