from views using the filtered GncTreeModelAccountTypes.
Privatize the unfiltered GncTreeModelAccountTypes - now, every accessible
account-types TreeModel is a new GtkTreeModelFilter, and their
ref-counting is always the same.
Add some tweaks to gnc-tree-model-account-types.[ch] from
Andreas Köhler <andi5.py@gmx.net>, plus the conversion of the Account
Dialog's account-types field to use the filtered GncTreeModelAccountTypes
instead of a GtkListStore, but simplified to use the AccountType
selection functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13271 57a11ea4-9604-0410-9ed3-97b8803252fd
copies of buggy accountlist-get-comm-balance-at-date to using a new
gnc:accountlist-get-comm-balance-interval provided by
report-utilities.scm. For the affected calculations, the balances no
longer exclude transactions on the first day of the reporting period.
This fixes http://bugzilla.gnome.org/show_bug.cgi?id=331005.
Changed calculations:
Income Statement: Total Expenses, Total Revenues
Balance Sheet: Retained Earnings (*)
Equity Statement: Retained Earnings (*), Net Income
(*) The Retained Earning calculations use a start-date of "forever-ago"
so they are not affected, but still converted to the new function.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13266 57a11ea4-9604-0410-9ed3-97b8803252fd
Patch by Mike Alexander <mta.umich.edu>, closes bug #330361
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13229 57a11ea4-9604-0410-9ed3-97b8803252fd
This prevents the whole program from crashing when unrecognized report
options are used.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13227 57a11ea4-9604-0410-9ed3-97b8803252fd
Also, use gfec to be a bit more defensive about potential errors while
running a report.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13223 57a11ea4-9604-0410-9ed3-97b8803252fd
accounting period set in the preferences. Both the start date and the end
date are used, so the user is free to choose any arbitrary period.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13199 57a11ea4-9604-0410-9ed3-97b8803252fd
These are the recursive and non-recursive, respectively, period balances,
where the accounting period is specified in the preferences.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13165 57a11ea4-9604-0410-9ed3-97b8803252fd
Factor out and publicize functions to get the start and end of the
accounting period in the preferences.
Mark one comment as probably obsolete.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13158 57a11ea4-9604-0410-9ed3-97b8803252fd
GtkTreeViewColumn that's been added to a GncTreeView with one of the
convenience functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13156 57a11ea4-9604-0410-9ed3-97b8803252fd
This change isn't ideal in the sense that the handler list is now a
monotonically increasing resource, but it's better than crashing when the
handler in node N+1 happens to be deleted while servicing the handler in
node N.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13152 57a11ea4-9604-0410-9ed3-97b8803252fd
Replace gtk_object_sink calls on the models with g_object_unref calls.
Correctly increase the refcount of "remembered" models when we return them.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13150 57a11ea4-9604-0410-9ed3-97b8803252fd
the GtkObject destroy path. Also, remove the gconf callback during dispose.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13148 57a11ea4-9604-0410-9ed3-97b8803252fd
with account balances.
Comment two possible bugs related to capgains and dirtying (or not) Splits.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13134 57a11ea4-9604-0410-9ed3-97b8803252fd
Also, dirty transactions upon changing due date and read-only status,
which didn't used to happen.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13132 57a11ea4-9604-0410-9ed3-97b8803252fd
Let QofInstance manage the book pointer and kvp frame instead of Split
managing its own.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13131 57a11ea4-9604-0410-9ed3-97b8803252fd
These calls were probably a copied idiom from the Split setters in this
same file, but Split and Transaction use completely different mechanisms
for managing dirty state. Transactions inherit from QofInstance and so
use the .dirty field. Splits inherit from QofEntity, so their
check_open(split->parent) calls are their way of letting someone know
they've changed.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13128 57a11ea4-9604-0410-9ed3-97b8803252fd
estimation code can use stand-alone recurrences to estimate budget values.
Also, tweak the initial budget so that it begins at the beginning of the
current month.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13092 57a11ea4-9604-0410-9ed3-97b8803252fd
Even though we don't explicitly ask for this representation, certain
calculations (e.g. those involving GNC_HOW_DENOM_SIGFIGS in the loan
druid and soon in budgets) will return numbers using this representation.
Unfortunately, these numbers aren't handled correctly by most of the
gnc_numeric functions, like the ones for comparison, equality testing,
arithmetic and conversion.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13090 57a11ea4-9604-0410-9ed3-97b8803252fd
Dirty the book when the budget changes.
Remove some obsolete budget code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13089 57a11ea4-9604-0410-9ed3-97b8803252fd
Better documentation of exactly what m-g-potfiles excludes, and a general
clean-up of the script.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13079 57a11ea4-9604-0410-9ed3-97b8803252fd
The failure will also helpfully explain which files are the problem.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13065 57a11ea4-9604-0410-9ed3-97b8803252fd
This function is only compiled when HAVE_GTK26 because it uses
GtkCellRendererCombo.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13047 57a11ea4-9604-0410-9ed3-97b8803252fd
We use the component manager to watch for the destruction of the account.
Previously, having an account's register open while deleting it would
just crash.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13010 57a11ea4-9604-0410-9ed3-97b8803252fd
Try to gracefully handle more errors during report loading.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12993 57a11ea4-9604-0410-9ed3-97b8803252fd
Move the book-open/close hooks from guile to C.
There are several places where we do report-management from C already.
Those places no longer use libguile to access the hash-table of reports -
they can just call C functions.
For now, there's still some report-management happening in guile so guile
can access the global state through g-wrapped functions. Eventually,
all report-management should be in C and guile can just provide single
reports one-at-a-time.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12984 57a11ea4-9604-0410-9ed3-97b8803252fd
Split handling of persistent application state into book-level data
and window-level data.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12982 57a11ea4-9604-0410-9ed3-97b8803252fd
Also, the (gnucash main) module no longer depends on (gnucash price-quotes).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12980 57a11ea4-9604-0410-9ed3-97b8803252fd
Do low-level application initialization even before booting guile.
This means the splash and totd come up almost instantly.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12979 57a11ea4-9604-0410-9ed3-97b8803252fd
The report menu setup is pretty fragile - it has to be done in a pretty
specific order, so I pulled it out of (gnc:main) and call it independently.
Also, move more bits of gnc:main into the modules where the bits are used.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12977 57a11ea4-9604-0410-9ed3-97b8803252fd
Remove obsolete guile command line options.
Remove guile setting of add-extension hooks that were apparently
obsoleted by C code a while ago.
Remove guile's access to application lifecycle function hooks.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12976 57a11ea4-9604-0410-9ed3-97b8803252fd
leaving only the highest level of gui initialization in /gnome/top-level.c
Process --loglevel command-line option from C.
Move the running of the startup hook from guile to C.
Distrubute bits of scheme from main.scm to the modules they're used in.
Remove more obsoleted scheme.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12975 57a11ea4-9604-0410-9ed3-97b8803252fd
BTW, it turns out that we don't need to call gtk_init(). It's called
during the LIBGNOMEUI_MODULE initializtion from gnome_program_init().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12964 57a11ea4-9604-0410-9ed3-97b8803252fd
Details:
Remove the last bits of libguile from top-level.[ch].
Change the gui initialization funtions so they can be called from C.
Drop some gwrappers for gui initialization functions.
Process the --nofile and filename command-line options from C.
Drastic simpilification of main.scm.
Initialize the gui and enter the gtk event-loop from C.
Even though there's some more clean-up to do, this patch does mark
a certain milestone: A developer seeking to understand and/or modify
GnuCash's startup process can now essentially ignore the guile portion.
Most parts of our startup now look pretty typical for a gnome-2 app.
The parts that remain firmly in guile are initialization of the report
menus and the installation of price-quote sources.
Caveat: We have multiple mechanisms for handling the filename
argument string -- some in guile and some in C. The C-side mechanisms
(in engine/gnc-filepath-utils.c) seem a little nicer than the guile
ones (in main.scm). They have slightly different behavior (e.g. which
paths they'll search for data files.) They both handle URIs and
making absolute paths out of relative ones. This patch switches from
using the guile functions to the C function. I've tested that the common
cases are handled the same way, but it wouldn't surprise me if some
corner-cases are not.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12956 57a11ea4-9604-0410-9ed3-97b8803252fd
Also remove now unused guile portion of --add-price-quote option.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12947 57a11ea4-9604-0410-9ed3-97b8803252fd
This is done by booting guile with a custom inner_main.
Much of the work is still handled by price-quotes.scm, which
is now a true stand-alone guile module without the circular dependency
on the (gnucash main) module.
One caveat: Since the initialization of guile-side debugging variables
is in main.scm, and since main.scm is no longer executed when running
--add-price-quotes, the guile code that runs during --add-price-quote
isn't affected by the --debug option. A work-around is to use the
GNC_DEBUG environment variable:
$ GNC_DEBUG=yes gnucash --add-price-quote myfile
In the longer term, we'll either move the debugging aids to a common place
where it can be used by both main.scm and price-quotes.scm, or we'll get
the debugging state from the C-side via gwrap.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12946 57a11ea4-9604-0410-9ed3-97b8803252fd
This is now handled by Gnome's gnome_program_locate_file() function.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12943 57a11ea4-9604-0410-9ed3-97b8803252fd
Also one bit of uncommitted code from gwrap change.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12912 57a11ea4-9604-0410-9ed3-97b8803252fd
Remove the "load config" command line options, since they weren't doing
anything different than the default.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12909 57a11ea4-9604-0410-9ed3-97b8803252fd
Move one function from path.scm to command-line.scm.
Remove processing of arguments now handled in C.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12872 57a11ea4-9604-0410-9ed3-97b8803252fd
Also show svn revision info if binary was built from svn.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12838 57a11ea4-9604-0410-9ed3-97b8803252fd
Strangely, symbols that are resolved during a dlopen() *before* calling
scm_set_current_module() are not resolvable from guile code that is inside
a module.
In order for code in a guile module to see symbols from dlopen'ed libraries,
they must be dlopen'ed *while* that guile module is current. I imagine this
is because the process of changing the current guile module purposely hides
all symbols in the current symbol table - to create an illusion of an empty
table. Kinda interesting... kinda scary...
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12816 57a11ea4-9604-0410-9ed3-97b8803252fd