Implement the debit/credit reversal. All debits are positive,

all credits are negative.

Moved include/*.h files into src.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2240 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-04-30 05:20:37 +00:00
parent 31a65de178
commit 2dc99c46ce
33 changed files with 1150 additions and 208 deletions

View File

@ -1,3 +1,49 @@
2000-04-29 Dave Peticolas <peticola@cs.ucdavis.edu>
* src/register/splitreg.c: add a flag determining whether to use
regular labels or only debit/credit.
* src/gnome/top-level.c: implement the debit/credit label option
* src/scm/prefs.scm: added option to only use debit/credit labels
in the register.
* src/MultiLedger.h: remove the MAX_SPLITS constants
* src/gnome/window-main.c (gnc_ui_refresh_statusbar): no need to
reverse quantities.
* src/gnome/top-level.c (gnc_configure_reverse_balance): take out
debit sign-reversal type.
* src/scm/prefs.scm: take out debit sign-reversal type
* src/SplitLedger.c: debit/credit reversal.
* src/register/pricecell.c: debit/credit reversal.
* src/register/splitreg.c: switch the column labels for the
debit/credit reversal.
* src/gnome/window-reconcile.c: fix up the dialog for the
debit/credit reversal. Also, fix the calculations so the user
can change sign-reversal modes while the dialog is open.
* src/gnome/window-main.c (gnc_ui_delete_account): refresh the
main window fully.
* src/gnome/reconcile-list.c (gnc_reconcile_list_fill): debits are
positive, credits are negative.
2000-04-28 Dave Peticolas <peticola@cs.ucdavis.edu>
* src/gnome/option-util.c: redid the option database storage as
a hash table, so databases have the same handle throughout their
lifetime.
* src/engine/Transaction.c (xaccTransOrder): only compare nums if
they are non-blank.
2000-04-27 Dave Peticolas <peticola@cs.ucdavis.edu>
* src/gnome/window-main.c (gnc_ui_refresh_statusbar): use ASSET

4
configure vendored
View File

@ -4756,6 +4756,7 @@ trap 'rm -fr `echo "Makefile
Makefile.init
make-gnucash-patch
src/Makefile
src/messages_i18n.h
src/engine/Makefile
src/guile/Makefile
src/guile/gnucash.h
@ -4774,7 +4775,6 @@ trap 'rm -fr `echo "Makefile
src/swig/perl5/Makefile
po/Makefile.in
po/extract-macros.perl
include/messages_i18n.h
rpm/gnucash.spec
lib/Makefile
lib/Xbae-4.6.2-linas/Makefile
@ -4925,6 +4925,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
Makefile.init
make-gnucash-patch
src/Makefile
src/messages_i18n.h
src/engine/Makefile
src/guile/Makefile
src/guile/gnucash.h
@ -4943,7 +4944,6 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile
src/swig/perl5/Makefile
po/Makefile.in
po/extract-macros.perl
include/messages_i18n.h
rpm/gnucash.spec
lib/Makefile
lib/Xbae-4.6.2-linas/Makefile

View File

@ -580,6 +580,7 @@ AC_OUTPUT(Makefile
Makefile.init
make-gnucash-patch
src/Makefile
src/messages_i18n.h
src/engine/Makefile
src/guile/Makefile
src/guile/gnucash.h
@ -598,7 +599,6 @@ AC_OUTPUT(Makefile
src/swig/perl5/Makefile
po/Makefile.in
po/extract-macros.perl
include/messages_i18n.h
rpm/gnucash.spec
lib/Makefile
lib/Xbae-4.6.2-linas/Makefile

View File

@ -91,7 +91,7 @@ $(PACKAGE).pot: pseudo-source.c $(POTFILES)
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
pseudo-source.c: $(top_srcdir)/include/messages_i18n.h
pseudo-source.c: $(top_srcdir)/src/messages_i18n.h
perl -s extract-macros.perl $< > $@
install: install-exec install-data

View File

@ -6,3 +6,4 @@ obj
*.patch
*.log
*.xac.*.xac
messages_i18n.h

View File

@ -27,7 +27,6 @@ INCLPATH = -I. \
-I./engine/guid \
-I./register \
-Ireports \
-I@srcdir@/../include \
-I@prefix@/include
GNOME_CFLAGS += -I./gnome

View File

@ -384,9 +384,6 @@ xaccLedgerDisplayGeneral (Account *lead_acc, Account **acclist,
QUERY_OR);
}
/* by default, display only thirty transactions */
/* xaccQuerySetMaxSplits (regData->query, MAX_QUERY_SPLITS); */
/* add this register to the list of registers */
fullList = ledgerListAdd (fullList, regData);

View File

@ -33,24 +33,8 @@
#include "Transaction.h"
/* the MAX_QUERY_SPLITS define determines how many transactions should be shown
* in the register. Its set to a default of 30. But this should be converted
* into a user-configurable value. So hack-alert on the configuration aspect.
*/
#define MAX_QUERY_SPLITS 30
/* the MAX_QUERY_SPLITS_UNCLAMP define determines cap on how many transactions
* should be shown in the register when uiser is browsing with dates. Its set
* to a default of 1000, which should give user plenty of elbow room to browse,
* and is still small enough to keep em out of trouble. This should be converted
* into a user-configurable value. So hack-alert on the configuration aspect.
*/
#define MAX_QUERY_SPLITS_UNCLAMP 1000
/** STRUCTS *********************************************************/
/* The xaccLedgerDisplay struct describes a single register/ledger instance.
*/
/* The xaccLedgerDisplay struct describes a single register/ledger instance. */
typedef struct _xaccLedgerDisplay xaccLedgerDisplay;

View File

@ -1520,7 +1520,7 @@ xaccSRSaveRegEntry (SplitRegister *reg, Transaction *new_trans)
if (MOD_AMNT & changed) {
double credit = xaccGetPriceCellValue(reg->creditCell);
double debit = xaccGetPriceCellValue(reg->debitCell);
new_amount = credit - debit;
new_amount = debit - credit;
}
else
new_amount = xaccSplitGetShareAmount(split);
@ -1617,11 +1617,11 @@ xaccSRSaveRegEntry (SplitRegister *reg, Transaction *new_trans)
if (MOD_AMNT & changed) {
credit = xaccGetPriceCellValue(reg->creditCell);
debit = xaccGetPriceCellValue(reg->debitCell);
new_amount = credit - debit;
new_amount = debit - credit;
} else {
credit = xaccGetPriceCellValue(reg->ncreditCell);
debit = xaccGetPriceCellValue(reg->ndebitCell);
new_amount = debit - credit;
new_amount = -(debit - credit);
}
DEBUG ("xaccSRSaveRegEntry(): MOD_AMNT: %f\n", new_amount);

165
src/SplitLedger.h Normal file
View File

@ -0,0 +1,165 @@
/********************************************************************\
* SplitLedger.h -- split ledger api *
* Copyright (C) 1998-2000 Linas Vepstas *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
* *
\********************************************************************/
/*
* FILE:
* SplitLedger.h
*
* FUNCTION:
* Definitions for a number of functions that interface
* between the transaction engine, and the register GUI.
*
* The xaccSRSetData() method sets the user data and callback
* hooks for the register.
*
* The xaccSRSetAccountSeparator() method sets the character
* used to separate accounts in fully-qualified names.
*
* The xaccSRSetReverseBalanceCallback() method sets up
* a callback used to determine whether split balances
* should be reversed.
*
* The xaccSRGetCurrentTrans() method returns the transaction
* which is the parent of the current split (see below).
*
* The xaccSRGetCurrentSplit() method returns the split at which
* the cursor is currently located.
*
* The xaccSRGetBlankSplit() method returns the blank split or
* NULL if there is none.
*
* The xaccSRGetSplitRowCol() method searches the split register for
* the given split. If found, it returns GNC_T and the virt_row
* and virt_col arguments are set to the location of the split.
* Otherwise, the method returns GNC_F.
*
* The xaccSRGetTransSplitRowCol() method works as above, but searches
* first for the first split (the transaction split) and then the
* next split, and returns the location of the second split.
*
* The xaccSRDuplicateCurrent() method duplicates either the current
* transaction or the current split depending on the register mode
* and cursor position. Returns the split just created, or the
* 'main' split of the transaction just created, or NULL if
* nothing happened.
*
* The xaccSRDeleteCurrentSplit() method deletes the split associated
* with the current cursor, if both are non-NULL. If successful, all
* affected account windows are refreshed. Deleting the blank split
* just clears the cursor values.
*
* The xaccSRDeleteCurrentTrans() method deletes the transaction
* associated with the current cursor, if both are non-NULL.
* If successful, all affected account windows are refreshed.
*
* The xaccSREmptyCurrentTrans() method deletes the non-transaction
* splits associated wih the current cursor, if both are non-NULL.
* If successful, all affected account windows are refreshed.
*
* The xaccSRCancelCursorSplitChanges() method cancels any changes made
* to the current cursor, reloads the cursor from the engine, reloads
* the table from the cursor, and updates the GUI. The change flags
* are cleared.
*
* The xaccSRCancelCursorTransChanges() method cancels any changes made
* to the current pending transaction, reloads the table from the engine,
* and updates the GUI. The change flags are cleared.
*
* The xaccSRLoadRegister() subroutine will copy transaction
* information from a list of splits to the rows of the
* register GUI. The third argument, default_source_acc,
* will be used to initialize the source account of a new,
* blank split appended to the tail end of the register.
* This "blank split" is the place where the user can
* edit info to create new tranasactions.
*
* The xaccSRSaveRegEntry() method will copy the contents
* from the cursor to a split. The split/transaction
* that is updated is the one associated with the current
* cursor (register entry) position. If the current transaction
* is different from newtrans, the current transaction will be
* comitted. Pass in NULL for newtrans to force a commit.
* The method returns GNC_T if the cursor was really saved,
* i.e., it had been changed. Otherwise, it returns GNC_F.
*
* The xaccSRRedrawRegEntry() method should be called soon
* after the xaccSRSaveRegEntry() method. It checks the
* change flag for the current entry/split, and if it
* has been modified, it causes a redraw of any register
* window that could be affected. That is, it causes
* a rdraw of any window showing this split, or any other
* split that belongs to this same tansaction.
*
* The xaccSRLoadXferCells() method loads (or reloads) the transfer
* cells with appropriate entries.
*/
#ifndef __XACC_SPLIT_LEDGER_H__
#define __XACC_SPLIT_LEDGER_H__
#include "gnc-common.h"
#include "Group.h"
#include "splitreg.h"
#include "Transaction.h"
/* Callback function type */
typedef gncUIWidget (*SRGetParentCallback) (void *user_data);
typedef void (*SRSetHelpCallback) (void *user_data, const char *help_str);
typedef gncBoolean (*SRReverseBalanceCallback) (Account *account);
void xaccSRSetData(SplitRegister *reg, void *user_data,
SRGetParentCallback get_parent,
SRSetHelpCallback set_help);
void xaccSRSetAccountSeparator(char separator);
void xaccSRSetReverseBalanceCallback(SRReverseBalanceCallback callback);
Transaction * xaccSRGetCurrentTrans (SplitRegister *reg);
Split * xaccSRGetCurrentSplit (SplitRegister *reg);
Split * xaccSRGetBlankSplit (SplitRegister *reg);
gncBoolean xaccSRGetSplitRowCol (SplitRegister *reg, Split *split,
int *virt_row, int *virt_col);
gncBoolean xaccSRGetTransSplitRowCol (SplitRegister *reg,
Transaction *trans, Split *split,
int *virt_row, int *virt_col);
Split * xaccSRDuplicateCurrent (SplitRegister *reg);
void xaccSRDeleteCurrentSplit (SplitRegister *reg);
void xaccSRDeleteCurrentTrans (SplitRegister *reg);
void xaccSREmptyCurrentTrans (SplitRegister *reg);
void xaccSRCancelCursorSplitChanges (SplitRegister *reg);
void xaccSRCancelCursorTransChanges (SplitRegister *reg);
void xaccSRLoadRegister (SplitRegister *reg, Split **slist,
Account *default_source_acc);
gncBoolean xaccSRSaveRegEntry (SplitRegister *reg, Transaction *newtrans);
void xaccSRRedrawRegEntry (SplitRegister *reg);
void xaccSRLoadXferCells (SplitRegister *reg, Account *base_account);
#endif /* __XACC_SPLIT_LEDGER_H__ */

View File

@ -309,15 +309,15 @@ disable for now till we figure out what the right thing is.
/* mark the account as having changed */
acc -> changed |= ACC_INVALIDATE_ALL;
/* if this split belongs to another acount, remove it from
/* if this split belongs to another account, remove it from
* there first. We don't want to ever leave the system
* in an inconsistent state.
*/
oldacc = split->acc;
if (split->acc) xaccAccountRemoveSplit (split->acc, split);
split->acc = acc;
/* enlarge the size of the split array to accomadate the new split,
/* enlarge the size of the split array to accomodate the new split,
* and copy all the splits over to the new array.
* If the old and new accounts are the same account, then we
* are just shuffling around the split, resumably due to a

View File

@ -22,9 +22,9 @@
include @top_srcdir@/Makefile.init
INCLPATH = -I@srcdir@/../../include \
-I@srcdir@/../.. \
-I@srcdir@/guid \
INCLPATH = -I@srcdir@/../.. \
-I@srcdir@/.. \
-I@srcdir@/guid \
-I@prefix@/include
# add the -fpic flag to generate relocatable position independent code

View File

@ -1524,7 +1524,9 @@ xaccTransOrder (Transaction **ta, Transaction **tb)
/* otherwise, sort on number string */
da = (*ta)->num;
db = (*tb)->num;
SAFE_STRCMP (da, db);
if (da && db && *da && *db) {
SAFE_STRCMP (da, db);
}
/* if dates differ, return */
DATE_CMP(ta,tb,date_entered);

45
src/engine/gnc-common.h Normal file
View File

@ -0,0 +1,45 @@
/*******************************************************************\
* gnc-common.h -- define platform independent items *
* *
* Copyright (C) 1999 Rob Browning *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
\********************************************************************/
#ifndef __GNC_COMMON_H__
#define __GNC_COMMON_H__
#if defined(GNOME)
#include <gtk/gtk.h>
#elif defined(MOTIF)
#include <Xm/Xm.h>
#endif
typedef char gncBoolean;
#define GNC_F 0
#define GNC_T (! GNC_F)
typedef unsigned int uint32;
#if defined(GNOME)
typedef GtkWidget *gncUIWidget;
#elif defined(MOTIF)
typedef Widget gncUIWidget;
#elif defined(KDE)
typedef void *gncUIWidget;
#endif
#endif

View File

@ -29,7 +29,6 @@ INCLPATH := -I.. \
-I../engine/guid \
-I../register \
-I../reports \
-I@srcdir@/../../include \
-I@top_srcdir@/lib/g-wrap-install/include \
-I@top_srcdir@/src/g-wrap \
-I${includedir} \

View File

@ -2726,6 +2726,9 @@ create_Budget_Dialog (void)
GtkWidget *apply_button;
GtkWidget *cancel_button;
GtkWidget *help_button;
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new ();
Budget_Dialog = gnome_dialog_new (_("Budget"), NULL);
gtk_object_set_data (GTK_OBJECT (Budget_Dialog), "Budget_Dialog", Budget_Dialog);
@ -2781,6 +2784,7 @@ create_Budget_Dialog (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (budget_name_entry);
gtk_box_pack_start (GTK_BOX (vbox60), budget_name_entry, TRUE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, budget_name_entry, _("The name of this budget"), NULL);
hbox40 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox40);
@ -2861,13 +2865,14 @@ create_Budget_Dialog (void)
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox2), 6);
gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox2), 75, 0);
insert_entry_button = gtk_button_new_with_label (_("Insert"));
insert_entry_button = gtk_button_new_with_label (_("Add"));
gtk_widget_ref (insert_entry_button);
gtk_object_set_data_full (GTK_OBJECT (Budget_Dialog), "insert_entry_button", insert_entry_button,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (insert_entry_button);
gtk_container_add (GTK_CONTAINER (hbuttonbox2), insert_entry_button);
GTK_WIDGET_SET_FLAGS (insert_entry_button, GTK_CAN_DEFAULT);
gtk_tooltips_set_tip (tooltips, insert_entry_button, _("Add a new entry or subentry"), NULL);
delete_entry_button = gtk_button_new_with_label (_("Delete"));
gtk_widget_ref (delete_entry_button);
@ -2876,6 +2881,7 @@ create_Budget_Dialog (void)
gtk_widget_show (delete_entry_button);
gtk_container_add (GTK_CONTAINER (hbuttonbox2), delete_entry_button);
GTK_WIDGET_SET_FLAGS (delete_entry_button, GTK_CAN_DEFAULT);
gtk_tooltips_set_tip (tooltips, delete_entry_button, _("Delete the selected entry or subentry"), NULL);
hbox44 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox44);
@ -2890,6 +2896,7 @@ create_Budget_Dialog (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (up_button);
gtk_box_pack_start (GTK_BOX (hbox44), up_button, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, up_button, _("Move the selected item up"), NULL);
down_button = gtk_button_new_with_label ("");
gtk_widget_ref (down_button);
@ -2897,6 +2904,7 @@ create_Budget_Dialog (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (down_button);
gtk_box_pack_start (GTK_BOX (hbox44), down_button, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, down_button, _("Move the selected item down"), NULL);
vbox52 = gtk_vbox_new (FALSE, 2);
gtk_widget_ref (vbox52);
@ -3201,6 +3209,8 @@ create_Budget_Dialog (void)
GTK_SIGNAL_FUNC (on_budget_cancel_button_clicked),
Budget_Dialog);
gtk_object_set_data (GTK_OBJECT (Budget_Dialog), "tooltips", tooltips);
return Budget_Dialog;
}

View File

@ -4153,6 +4153,7 @@ Exactly
<widget>
<class>GtkEntry</class>
<name>budget_name_entry</name>
<tooltip>The name of this budget</tooltip>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
@ -4300,14 +4301,16 @@ Exactly
<widget>
<class>GtkButton</class>
<name>insert_entry_button</name>
<tooltip>Add a new entry or subentry</tooltip>
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Insert</label>
<label>Add</label>
</widget>
<widget>
<class>GtkButton</class>
<name>delete_entry_button</name>
<tooltip>Delete the selected entry or subentry</tooltip>
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Delete</label>
@ -4328,6 +4331,7 @@ Exactly
<widget>
<class>GtkButton</class>
<name>up_button</name>
<tooltip>Move the selected item up</tooltip>
<can_focus>True</can_focus>
<label></label>
<child>
@ -4340,6 +4344,7 @@ Exactly
<widget>
<class>GtkButton</class>
<name>down_button</name>
<tooltip>Move the selected item down</tooltip>
<can_focus>True</can_focus>
<label></label>
<child>

View File

@ -52,6 +52,8 @@ struct _GNCOptionDB
GSList *option_sections;
gboolean options_dirty;
GNCOptionDBHandle handle;
};
typedef struct _Getters Getters;
@ -77,24 +79,13 @@ static Getters getters = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/* This static indicates the debugging module this .o belongs to. */
static short module = MOD_GUI;
static GPtrArray *option_dbs = NULL;
static GHashTable *option_dbs = NULL;
static int last_db_handle = 0;
/*******************************************************************/
static GNCOptionDBHandle
gnc_option_db_get_handle(GNCOptionDB *odb)
{
int i;
for (i = 0; i < option_dbs->len; i++)
if (odb == g_ptr_array_index(option_dbs, i))
return i;
return -1;
}
/********************************************************************\
* gnc_option_db_init *
* initialize the options structures from the guile side *
@ -106,16 +97,8 @@ static void
gnc_option_db_init(GNCOptionDB *odb)
{
SCM func = gh_eval_str("gnc:send-options");
GNCOptionDBHandle handle;
handle = gnc_option_db_get_handle(odb);
if (handle < 0)
{
PERR("Can't find option database in list.\n");
return;
}
gh_call2(func, gh_int2scm(handle), odb->guile_options);
gh_call2(func, gh_int2scm(odb->handle), odb->guile_options);
}
@ -130,6 +113,7 @@ GNCOptionDB *
gnc_option_db_new(SCM guile_options)
{
GNCOptionDB *odb;
GNCOptionDB *lookup;
odb = g_new0(GNCOptionDB, 1);
@ -140,9 +124,15 @@ gnc_option_db_new(SCM guile_options)
odb->options_dirty = FALSE;
if (option_dbs == NULL)
option_dbs = g_ptr_array_new();
option_dbs = g_hash_table_new(g_int_hash, g_int_equal);
g_ptr_array_add(option_dbs, odb);
do
{
odb->handle = last_db_handle++;
lookup = g_hash_table_lookup(option_dbs, &odb->handle);
} while (lookup != NULL);
g_hash_table_insert(option_dbs, &odb->handle, odb);
gnc_option_db_init(odb);
@ -197,14 +187,11 @@ gnc_option_db_destroy(GNCOptionDB *odb)
odb->option_sections = NULL;
odb->options_dirty = FALSE;
if (!g_ptr_array_remove(option_dbs, odb))
{
PERR("Option database not present in list.\n");
}
g_hash_table_remove(option_dbs, &odb->handle);
if (option_dbs->len == 0)
if (g_hash_table_size(option_dbs) == 0)
{
g_ptr_array_free(option_dbs, FALSE);
g_hash_table_destroy(option_dbs);
option_dbs = NULL;
}
@ -1118,7 +1105,7 @@ _gnc_option_db_register_option(GNCOptionDBHandle handle, SCM guile_option)
GNCOption *option;
GNCOptionSection *section;
odb = g_ptr_array_index(option_dbs, handle);
odb = g_hash_table_lookup(option_dbs, &handle);
assert(odb != NULL);

View File

@ -555,9 +555,9 @@ gnc_reconcile_list_fill(GNCReconcileList *list)
else
amount = xaccSplitGetValue(split);
if ((amount < 0) && (list->list_type == RECLIST_CREDIT))
if ((amount < 0) && (list->list_type == RECLIST_DEBIT))
continue;
if ((amount >= 0) && (list->list_type == RECLIST_DEBIT))
if ((amount >= 0) && (list->list_type == RECLIST_CREDIT))
continue;
trans = xaccSplitGetParent(split);

View File

@ -66,6 +66,8 @@ static void gnc_configure_register_borders_cb(void *);
static void gnc_configure_register_borders(void);
static void gnc_configure_reverse_balance_cb(void *);
static void gnc_configure_reverse_balance(void);
static void gnc_configure_debit_credit_labels_cb(void *);
static void gnc_configure_debit_credit_labels(void);
/** GLOBALS *********************************************************/
/* This static indicates the debugging module that this .o belongs to. */
@ -83,6 +85,7 @@ static SCM account_separator_callback_id = SCM_UNDEFINED;
static SCM register_colors_callback_id = SCM_UNDEFINED;
static SCM register_borders_callback_id = SCM_UNDEFINED;
static SCM reverse_balance_callback_id = SCM_UNDEFINED;
static SCM debit_credit_labels_callback_id = SCM_UNDEFINED;
/* ============================================================== */
@ -167,6 +170,12 @@ gnucash_ui_init()
NULL, "General",
"Reversed-balance account types");
gnc_configure_debit_credit_labels();
debit_credit_labels_callback_id =
gnc_register_option_change_callback(gnc_configure_debit_credit_labels_cb,
NULL, "Register",
"Always use debit/credit labels");
mainWindow();
gnucash_style_init();
@ -217,6 +226,7 @@ gnc_ui_destroy (void)
gnc_unregister_option_change_callback_id(register_colors_callback_id);
gnc_unregister_option_change_callback_id(register_borders_callback_id);
gnc_unregister_option_change_callback_id(reverse_balance_callback_id);
gnc_unregister_option_change_callback_id(debit_credit_labels_callback_id);
if (app != NULL)
{
@ -601,16 +611,6 @@ gnc_configure_reverse_balance(void)
reverse_type[INCOME] = GNC_T;
reverse_type[CREDIT] = GNC_T;
}
else if (safe_strcmp(choice, "debit") == 0)
{
reverse_type[BANK] = GNC_T;
reverse_type[CASH] = GNC_T;
reverse_type[ASSET] = GNC_T;
reverse_type[STOCK] = GNC_T;
reverse_type[MUTUAL] = GNC_T;
reverse_type[CURRENCY] = GNC_T;
reverse_type[EXPENSE] = GNC_T;
}
else if (safe_strcmp(choice, "none") == 0)
{
}
@ -626,4 +626,36 @@ gnc_configure_reverse_balance(void)
free(choice);
}
/* gnc_configure_debit_credit_labels_cb
* Callback called when options change - sets
* register debit/credit labels
*
* Args: Nothing
* Returns: Nothing
*/
static void
gnc_configure_debit_credit_labels_cb(void *not_used)
{
gnc_configure_debit_credit_labels();
}
/* gnc_configure_debit_credit_labels
* sets usage of debit/credit labels
*
* Args: Nothing
* Returns: Nothing
*/
static void
gnc_configure_debit_credit_labels(void)
{
gncBoolean only_debit_credit_labels;
only_debit_credit_labels =
gnc_lookup_boolean_option("Register",
"Always use debit/credit labels",
GNC_F);
xaccSplitRegisterSetLabelMode(only_debit_credit_labels);
}
/****************** END OF FILE **********************/

View File

@ -168,18 +168,6 @@ gnc_ui_refresh_statusbar (void)
}
}
/* check to see whether GUI should display reversed signs */
if (gnc_reverse_balance_type(ASSET))
{
assets = -assets;
euro_assets = -euro_assets;
}
if (!gnc_reverse_balance_type(INCOME))
{
profits = -profits;
euro_profits = -euro_profits;
}
xaccSPrintAmount(asset_string, assets, PRTSYM | PRTSEP, NULL);
if(euro)
{
@ -264,7 +252,7 @@ gnc_ui_delete_account ( Account *account )
xaccFreeAccount(account);
/* Step 4: Refresh things */
gnc_ui_refresh_statusbar();
gnc_refresh_main_window();
gnc_group_ui_refresh(gncGetCurrentGroup());
}

View File

@ -58,7 +58,7 @@
struct _RecnWindow
{
Account *account; /* The account that we are reconciling */
double ddiff; /* The amount to reconcile */
double new_ending; /* The new ending balance */
GtkWidget *window; /* The reconcile window */
@ -150,10 +150,11 @@ static double
recnRecalculateBalance(RecnWindow *recnData)
{
char *amount;
double value;
double ddebit = 0.0;
double dcredit = 0.0;
double ddiff = 0.0;
double debit;
double credit;
double starting;
double ending;
double diff;
short shares = PRTSYM | PRTSEP;
gboolean reverse_balance;
int account_type;
@ -165,42 +166,47 @@ recnRecalculateBalance(RecnWindow *recnData)
(account_type == CURRENCY))
shares |= PRTSHR;
value = xaccAccountGetReconciledBalance(recnData->account);
starting = xaccAccountGetReconciledBalance(recnData->account);
if (reverse_balance)
value = -value;
amount = xaccPrintAmount(value, shares, NULL);
gnc_set_label_color(recnData->starting, value);
starting = -starting;
amount = xaccPrintAmount(starting, shares, NULL);
gnc_set_label_color(recnData->starting, starting);
gtk_label_set_text(GTK_LABEL(recnData->starting), amount);
if (reverse_balance)
starting = -starting;
value -= recnData->ddiff;
amount = xaccPrintAmount(value, shares, NULL);
gnc_set_label_color(recnData->ending, value);
ending = recnData->new_ending;
if (reverse_balance)
ending = -ending;
amount = xaccPrintAmount(ending, shares, NULL);
gnc_set_label_color(recnData->ending, ending);
gtk_label_set_text(GTK_LABEL(recnData->ending), amount);
if (reverse_balance)
ending = -ending;
ddebit = gnc_reconcile_list_reconciled_balance
debit = gnc_reconcile_list_reconciled_balance
(GNC_RECONCILE_LIST(recnData->debit));
if (reverse_balance)
ddebit = -ddebit;
dcredit = gnc_reconcile_list_reconciled_balance
credit = gnc_reconcile_list_reconciled_balance
(GNC_RECONCILE_LIST(recnData->credit));
if (reverse_balance)
dcredit = -dcredit;
/* Update the difference field, and the total fields */
amount = xaccPrintAmount(DABS(ddebit), shares, NULL);
amount = xaccPrintAmount(DABS(debit), shares, NULL);
gtk_label_set_text(GTK_LABEL(recnData->total_debit), amount);
amount = xaccPrintAmount(dcredit, shares, NULL);
amount = xaccPrintAmount(credit, shares, NULL);
gtk_label_set_text(GTK_LABEL(recnData->total_credit), amount);
ddiff = recnData->ddiff + dcredit - ddebit;
amount = xaccPrintAmount(ddiff, shares, NULL);
gnc_set_label_color(recnData->difference, ddiff);
diff = ending - (starting + debit - credit);
if (reverse_balance)
diff = -diff;
amount = xaccPrintAmount(diff, shares, NULL);
gnc_set_label_color(recnData->difference, diff);
gtk_label_set_text(GTK_LABEL(recnData->difference), amount);
if (reverse_balance)
diff = -diff;
return ddiff;
return diff;
}
static gboolean
@ -235,17 +241,17 @@ gnc_start_recn_update_cb(GtkWidget *widget, GdkEventFocus *event,
* NOTE: This dialog does not return until the user presses "Ok" *
* or "Cancel" *
* *
* Args: parent - the parent of this window *
* account - the account to reconcile *
* diff - returns the amount from ending balance field *
* Args: parent - the parent of this window *
* account - the account to reconcile *
* new_ending - returns the amount for ending balance *
* Return: True, if the user presses "Ok", else False *
\********************************************************************/
static gboolean
startRecnWindow(GtkWidget *parent, Account *account, double *diff)
startRecnWindow(GtkWidget *parent, Account *account, double *new_ending)
{
GtkWidget *dialog, *end_value;
char *amount, *title;
double dendBalance, value;
double dendBalance;
int result;
short shares = PRTSYM | PRTSEP;
int account_type;
@ -256,7 +262,10 @@ startRecnWindow(GtkWidget *parent, Account *account, double *diff)
*/
dendBalance = xaccAccountGetReconciledBalance(account);
if (gnc_reverse_balance(account))
{
dendBalance = -dendBalance;
*new_ending = -(*new_ending);
}
account_type = xaccAccountGetType(account);
if ((account_type == STOCK) || (account_type == MUTUAL) ||
@ -280,7 +289,7 @@ startRecnWindow(GtkWidget *parent, Account *account, double *diff)
gnome_dialog_set_parent(GNOME_DIALOG(dialog), GTK_WINDOW(parent));
{
GtkWidget *frame = gtk_frame_new("Reconcile Information");
GtkWidget *frame = gtk_frame_new(RECONCILE_INFO_STR);
GtkWidget *main_area = gtk_hbox_new(FALSE, 5);
GtkWidget *left_column = gtk_vbox_new(TRUE, 0);
GtkWidget *right_column = gtk_vbox_new(TRUE, 0);
@ -290,7 +299,7 @@ startRecnWindow(GtkWidget *parent, Account *account, double *diff)
GtkWidget *vbox = GNOME_DIALOG(dialog)->vbox;
end_value = gtk_entry_new();
amount = xaccPrintAmount(dendBalance - *diff, shares & ~PRTSYM, NULL);
amount = xaccPrintAmount(*new_ending, shares & ~PRTSYM, NULL);
gtk_entry_set_text(GTK_ENTRY(end_value), amount);
gtk_editable_select_region(GTK_EDITABLE(end_value), 0, -1);
@ -323,7 +332,7 @@ startRecnWindow(GtkWidget *parent, Account *account, double *diff)
gtk_widget_grab_focus(end_value);
}
while (1)
{
result = gnome_dialog_run(GNOME_DIALOG(dialog));
@ -334,9 +343,10 @@ startRecnWindow(GtkWidget *parent, Account *account, double *diff)
string = gtk_entry_get_text(GTK_ENTRY(end_value));
value = xaccParseAmount(string, GNC_T);
*new_ending = xaccParseAmount(string, GNC_T);
*diff = dendBalance - value;
if (gnc_reverse_balance(account))
*new_ending = -(*new_ending);
}
/* cancel or delete */
@ -494,11 +504,11 @@ static void
gnc_ui_reconcile_window_change_cb(GtkButton *button, gpointer data)
{
RecnWindow *recnData = (RecnWindow *) data;
double ddiff = recnData->ddiff;
double new_ending = recnData->new_ending;
if (startRecnWindow(recnData->window, recnData->account, &ddiff))
if (startRecnWindow(recnData->window, recnData->account, &new_ending))
{
recnData->ddiff = ddiff;
recnData->new_ending = new_ending;
recnRecalculateBalance(recnData);
}
}
@ -948,20 +958,25 @@ recnWindow(GtkWidget *parent, Account *account)
GtkWidget *statusbar;
GtkWidget *vbox;
GtkWidget *dock;
double ddiff = 0.0;
double new_ending;
if (account == NULL)
return NULL;
FETCH_FROM_LIST(RecnWindow, recnList, account, account, recnData);
new_ending = xaccAccountGetBalance(account);
/* Popup a little window to prompt the user to enter the
* ending balance for his/her bank statement */
if (!startRecnWindow(parent, account, &ddiff))
if (!startRecnWindow(parent, account, &new_ending))
{
REMOVE_FROM_LIST(RecnWindow, recnList, account, account);
free(recnData);
return NULL;
}
recnData->ddiff = ddiff;
recnData->new_ending = new_ending;
recnData->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
recnData->delete_refresh = FALSE;

View File

@ -1498,8 +1498,6 @@ regWindowLedger(xaccLedgerDisplay *ledger)
if (regData != NULL)
return regData;
/* xaccQuerySetMaxSplits(ledger->query, INT_MAX); */
regData = (RegWindow *) malloc(sizeof (RegWindow));
ledger->gui_hook = (void *) regData;

34
src/messages.h Normal file
View File

@ -0,0 +1,34 @@
/********************************************************************\
* messages.h -- national-language messages for GnuCash (eX-Accountant) *
* Copyright (C) 1997 Robin D. Clark *
* Copyright (C) 1997, 1998 Linas Vepstas *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
* Author: Rob Clark *
* Internet: rclark@cs.hmc.edu *
* Address: 609 8th Street *
* Huntington Beach, CA 92648-4632 *
\********************************************************************/
#ifndef __XACC_MESSAGES_H__
#define __XACC_MESSAGES_H__
#include "config.h"
/* messages_i18n.h contains messages for internationalization */
#include "messages_i18n.h"
#endif /* __XACC_MESSAGES_H__ */

617
src/messages_i18n.h.in Normal file
View File

@ -0,0 +1,617 @@
/********************************************************************\
* messages_i18n.h -- internationalized messages for GnuCash *
* Copyright (C) 1997 Robin D. Clark *
* Copyright (C) 1997, 1998, 1999,2000 Linas Vepstas *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 *
* Boston, MA 02111-1307, USA gnu@gnu.org *
* *
* Author: Rob Clark *
* Internet: rclark@cs.hmc.edu *
* Address: 609 8th Street *
* Huntington Beach, CA 92648-4632 *
\********************************************************************/
#ifndef __XACC_MESSAGES_I18N_H__
#define __XACC_MESSAGES_I18N_H__
#if defined(HAVE_GETTEXT) /* HAVE_GETTEXT */
#include <libintl.h>
@INCLUDE_LOCALE_H@
#undef _
#ifdef DISABLE_GETTEXT_UNDERSCORE
#define _(String) (String)
#else /* ENABLE_GETTEXT_UNDERSCORE */
#define _(String) gettext (String)
#endif /* End ENABLE_GETTEXT_UNDERSCORE */
#else /* Not HAVE_GETTEXT */
#define _(String) (String)
#define gettext(String) (String)
#endif /* End Not HAVE_GETTEXT */
#undef N_
#define N_(String) (String)
/** MISC INTERNATIONALIZATION PIECES-PARTS: ******************************/
/* This will be used if localeconv cannot find a value. */
#define CURRENCY_SYMBOL _("$")
/** DIALOG BOX MESSAGES: ********************************************/
#define ABOUT_MSG _("The GnuCash personal finance manager.\n"\
"The GNU way to manage your money!")
#define ACC_ADJUST_MSG _("To adjust an account's balance, you must first\n"\
"choose an account to adjust.\n")
#define ACC_BAD_PARENT_MSG _("You must choose a valid parent account.")
#define ACC_NEW_MSG _("Do you want to create a new account?\n"\
"If not, then please select an account\n"\
"to open in the main window.\n")
#define ACC_EDIT_MSG _("To edit an account, you must first\n"\
"choose an account to edit.\n")
#define ACC_DEL_MSG _("To delete an account, you must first\n"\
"choose an account to delete.\n")
#define ACC_DEL_SURE_MSG _("Are you sure you want to delete the %s account?")
#define ACC_NO_NAME_MSG _("The account must be given a name! \n")
#define ACC_OPEN_MSG _("To open an account, you must first\n"\
"choose an account to open.\n")
#define ACC_SCRUB_MSG _("You must select an account to scrub.")
#define ACC_TYPE_MSG _("You must select an account type.")
#define ACC_RECONCILE_MSG _("To reconcile an account, you must first\n"\
"choose an account to reconcile.\n")
#define AMOUNT_NUM_MSG _("The amount must be a number.")
#define BALANCE_NUM_MSG _("The balance must be a number.")
#define DEL_SPLITS_MSG _("Delete all the splits")
#define DEL_TRANS_MSG _("Delete the whole transaction")
#define DEL_USUAL_MSG _("This selection will delete the whole "\
"transaction. This is what you usually want.")
#define DEL_WARN_MSG _("Warning: Just deleting all the splits will "\
"make your account unbalanced. You probably "\
"shouldn't do this unless you're going to "\
"immediately add another split to bring the "\
"transaction back into balance.")
#define EDIT_CURRENCY_MSG _("It is dangerous to change the currency type\n"\
"of an account. You asked to change it\n"\
"from %s to %s.\nAre You Sure?\n")
#define EDIT_SECURITY_MSG _("It is dangerous to change the security\n"\
"of an account. You asked to change it\n"\
"from %s to %s.\nAre You Sure?\n")
#define FILE_TOO_OLD_MSG _("This file is from an older version of "\
"GnuCash. \nDo you want to continue?")
#define FILE_TOO_NEW_MSG _("This file appears to be from a newer version "\
"of GnuCash. You must upgrade GnuCash to read "\
"this file.")
#define FILE_BAD_READ_MSG _("There was an error reading the file. \n"\
"Do you want to continue?")
#define FILE_EWRITE_MSG _("There was an error writing the file\n %s.")
#define FILE_EOPEN_MSG _("There was an error opening the file\n %s.")
#define FILE_ECLOSE_MSG _("There was an error closing the file\n %s.")
#define FILE_NOT_FOUND_MSG _("The file \n %s\n could not be found.")
#define FILE_EMPTY_MSG _("The file \n %s\n is empty.")
#define FMB_SAVE_MSG _("Changes have been made since the last "\
"Save. Save the data to file?")
#define FMB_EEXIST_MSG _("The file \n %s\n already exists.\n"\
"Are you sure you want to overwrite it?")
#define FMB_INVALID_MSG _("The filepath \n %s\n"\
"is not a valid location in the filesystem.")
#define FMB_LOCKED_MSG _("The file \n %s\n"\
"appears to be in use by another user.\n"\
"If this is not right, remove the .LCK file "\
"and try again.")
#define GNOME_PRINT_MSG _("You need to install the gnome-print library.")
#define QIF_LOAD_FAILED_FORMAT_MSG _("QIF file load failed. %s")
#define QIF_LOAD_FAILED_DEFAULT_MSG _("QIF file load failed. Check "\
"settings and reload.")
#define QUOTE_SRC_MSG _("The source for price quotes")
#define RECN_BALN_WARN _("The account is not balanced.\n" \
"Are you sure you want to finish?")
#define RECN_CANCEL_WARN _("You have made changes to this reconcile window.\n"\
"Are you sure you want to cancel?")
#define RECN_TRANS_WARN _("Warning! This is a reconciled transaction. "\
"Do you want do continue?")
#define REG_CURR_MSG _("You cannot transfer funds from the %s account.\n"\
"It does not have a matching currency.")
#define REPORT_ERR_MSG _("Error executing scheme report.")
#define REPORT_NOPARM_MSG _("This report has no parameters.")
#define SHOW_CAT_MSG _("Show the income and expense accounts.")
#define TRANS_CHANGED_MSG _("The current transaction has been changed.\n"\
"Would you like to record it?")
#define TRANS_DEL_MSG _("Are you sure you want to delete\n %s\n"\
"from the transaction\n %s ?")
#define TRANS_DEL2_MSG _("Are you sure you want to delete the current "\
"transaction?")
#define TRANS_RECALC_TITLE _("Recalculate Transaction")
#define TRANS_RECALC_MSG _("The values entered for this transaction "\
"are inconsistent.\nWhich value would you "\
"like to have recalculated?\n")
#define TYPE_WARN1_MSG _("The types of all the parent accounts and their "\
"subaccounts must be changed to %s.\nIs that "\
"what you want to do?")
#define TYPE_WARN2_MSG _("The types of all the subaccounts must be "\
"changed to %s.\nIs that what you want to do?")
#define VERIFY_CHANGE_MSG _("The following changes must be made. Continue?")
#define XFER_NSF_MSG _("There must be at least two accounts\n"\
"created before you can transfer funds.")
#define XFER_CURR_MSG _("You cannot transfer between those accounts.\n" \
"They do not have a common currency.")
#define XFER_DIFF_MSG _("The \"From\" and \"To\" accounts\n must be " \
"different!")
#define XFER_SAME_MSG _("You can't transfer from and to the same account!")
#define XFER_NO_ACC_MSG _("You must specify an account to transfer from,\n"\
"or to, or both, for this transaction.\n" \
"Otherwise, it will not be recorded.")
/* Tooltip phrases */
#define TOOLTIP_ADJUST_N N_("Adjust the balance of the selected account")
#define TOOLTIP_ADJUST _(TOOLTIP_ADJUST_N)
#define TOOLTIP_ADJUST_END_N N_("Adjust the ending balance")
#define TOOLTIP_ADJUST_END _(TOOLTIP_ADJUST_END_N)
#define TOOLTIP_ADJUST_REG_N N_("Adjust the balance of the main account "\
"for this register")
#define TOOLTIP_ADJUST_REG _(TOOLTIP_ADJUST_REG_N)
#define TOOLTIP_AUTO_DOUBLE_N N_("Double line mode with a multi-line cursor")
#define TOOLTIP_AUTO_DOUBLE _(TOOLTIP_AUTO_DOUBLE_N)
#define TOOLTIP_AUTO_SINGLE_N N_("Single line mode with a multi-line cursor")
#define TOOLTIP_AUTO_SINGLE _(TOOLTIP_AUTO_SINGLE_N)
#define TOOLTIP_BLANK_TRANS_N N_("Move to the blank transaction at the "\
"bottom of the register")
#define TOOLTIP_BLANK_TRANS _(TOOLTIP_BLANK_TRANS_N)
#define TOOLTIP_CANCEL_TRANS_N N_("Cancel the current transaction")
#define TOOLTIP_CANCEL_TRANS _(TOOLTIP_CANCEL_TRANS_N)
#define TOOLTIP_CLOSE_HTML _("Close this HTML window")
#define TOOLTIP_CLOSE_REG_N N_("Close this register window")
#define TOOLTIP_CLOSE_REG _(TOOLTIP_CLOSE_REG_N)
#define TOOLTIP_DATE_RANGE_N N_("Set the date range of this register")
#define TOOLTIP_DATE_RANGE _(TOOLTIP_DATE_RANGE_N)
#define TOOLTIP_DELETE_N N_("Delete selected account")
#define TOOLTIP_DELETE _(TOOLTIP_DELETE_N)
#define TOOLTIP_DEL_TRANS_N N_("Delete the current transaction")
#define TOOLTIP_DEL_TRANS _(TOOLTIP_DEL_TRANS_N)
#define TOOLTIP_DOUBLE_LINE_N N_("Show transactions on two lines with "\
"more information")
#define TOOLTIP_DOUBLE_LINE _(TOOLTIP_DOUBLE_LINE_N)
#define TOOLTIP_DUP_TRANS_N N_("Make a copy of the current transaction")
#define TOOLTIP_DUP_TRANS _(TOOLTIP_DUP_TRANS_N)
#define TOOLTIP_EDIT_N N_("Edit the selected account")
#define TOOLTIP_EDIT _(TOOLTIP_EDIT_N)
#define TOOLTIP_EDIT_REG_N N_("Edit the main account for this register")
#define TOOLTIP_EDIT_REG _(TOOLTIP_EDIT_REG_N)
#define TOOLTIP_EDIT_TRANS_N N_("Edit the current transaction")
#define TOOLTIP_EDIT_TRANS _(TOOLTIP_EDIT_TRANS_N)
#define TOOLTIP_EXIT_N N_("Exit GnuCash")
#define TOOLTIP_EXIT _(TOOLTIP_EXIT_N)
#define TOOLTIP_EXPORT_REPORT _("Export HTML-formatted report to file")
#define TOOLTIP_FIND_N N_("Find transactions with a search.")
#define TOOLTIP_FIND _(TOOLTIP_FIND_N)
#define TOOLTIP_HELP_N N_("Open the GnuCash help window")
#define TOOLTIP_HELP _(TOOLTIP_HELP_N)
#define TOOLTIP_HTML_BACK _("Move back one step in the history")
#define TOOLTIP_HTML_FORW _("Move forward one step in the history")
#define TOOLTIP_IMPORT_QIF_N N_("Import a Quicken QIF file")
#define TOOLTIP_IMPORT_QIF _(TOOLTIP_IMPORT_QIF_N)
#define TOOLTIP_JUMP_TRANS_N N_("Jump to the corresponding transaction in "\
"the other account")
#define TOOLTIP_JUMP_TRANS _(TOOLTIP_JUMP_TRANS_N)
#define TOOLTIP_MULTI_LINE_N N_("Show transactions on multiple lines with "\
"one line for each split")
#define TOOLTIP_MULTI_LINE _(TOOLTIP_MULTI_LINE_N)
#define TOOLTIP_MULTI_SPLIT _("This transaction has multiple splits; "\
"switch to multi-line mode to see them all")
#define TOOLTIP_NEW_N N_("Create a new account")
#define TOOLTIP_NEW _(TOOLTIP_NEW_N)
#define TOOLTIP_NEW_FILE_N N_("Create a new file")
#define TOOLTIP_NEW_FILE _(TOOLTIP_NEW_FILE_N)
#define TOOLTIP_NEW_TRANS_N N_("Add a new transaction to the account")
#define TOOLTIP_NEW_TRANS _(TOOLTIP_NEW_TRANS_N)
#define TOOLTIP_OPEN_N N_("Open the selected account")
#define TOOLTIP_OPEN _(TOOLTIP_OPEN_N)
#define TOOLTIP_OPEN_ACC_N N_("Open the account")
#define TOOLTIP_OPEN_ACC _(TOOLTIP_OPEN_ACC_N)
#define TOOLTIP_OPEN_SUB_N N_("Open the selected account and all its "\
"subaccounts")
#define TOOLTIP_OPEN_SUB _(TOOLTIP_OPEN_SUB_N)
#define TOOLTIP_OPEN_FILE_N N_("Open a file")
#define TOOLTIP_OPEN_FILE _(TOOLTIP_OPEN_FILE_N)
#define TOOLTIP_PREFERENCES_N N_("Open the global preferences dialog")
#define TOOLTIP_PREFERENCES _(TOOLTIP_PREFERENCES_N)
#define TOOLTIP_PRINT_CHECK_N N_("Print a check using a standard format")
#define TOOLTIP_PRINT_CHECK _(TOOLTIP_PRINT_CHECK_N)
#define TOOLTIP_RECONCILE_N N_("Reconcile the selected account")
#define TOOLTIP_RECONCILE _(TOOLTIP_RECONCILE_N)
#define TOOLTIP_RECN_CANCEL_N N_("Cancel the reconciliation of this account")
#define TOOLTIP_RECN_CANCEL _(TOOLTIP_RECN_CANCEL_N)
#define TOOLTIP_RECN_FINISH_N N_("Finish the reconciliation of this account")
#define TOOLTIP_RECN_FINISH _(TOOLTIP_RECN_FINISH_N)
#define TOOLTIP_RECN_REG_N N_("Reconcile the main account for this "\
"register")
#define TOOLTIP_RECN_REG _(TOOLTIP_RECN_REG_N)
#define TOOLTIP_RECORD_N N_("Record the current transaction")
#define TOOLTIP_RECORD _(TOOLTIP_RECORD_N)
#define TOOLTIP_REPORT_PARM _("Set the parameters for this report")
#define TOOLTIP_SAVE_FILE_N N_("Save the file to disk")
#define TOOLTIP_SAVE_FILE _(TOOLTIP_SAVE_FILE_N)
#define TOOLTIP_SCRUB_ACCT_N N_("Identify and fix problems in the account")
#define TOOLTIP_SCRUB_ACCT _(TOOLTIP_SCRUB_ACCT_N)
#define TOOLTIP_SCRUB_ALL_N N_("Identify and fix problems in all the "\
"accounts")
#define TOOLTIP_SCRUB_ALL _(TOOLTIP_SCRUB_ALL_N)
#define TOOLTIP_SCRUB_SUB_N N_("Identify and fix problems in the account "\
"and its subaccounts")
#define TOOLTIP_SCRUB_SUB _(TOOLTIP_SCRUB_SUB_N)
#define TOOLTIP_SCRUB_REG_N N_("Identify and fix problems in the accounts "\
"of this register")
#define TOOLTIP_SCRUB_REG _(TOOLTIP_SCRUB_REG_N)
#define TOOLTIP_SET_DEFAULT _("Set the option to its default value")
#define TOOLTIP_SHOW_ALL_N N_("Show all of the transactions in the "\
"account")
#define TOOLTIP_SHOW_ALL _(TOOLTIP_SHOW_ALL_N)
#define TOOLTIP_SINGLE_LINE_N N_("Show transactions on single lines")
#define TOOLTIP_SINGLE_LINE _(TOOLTIP_SINGLE_LINE_N)
#define TOOLTIP_SORT_BY_AMNT_N N_("Sort by Amount, then Date, then Num")
#define TOOLTIP_SORT_BY_AMNT _(TOOLTIP_SORT_BY_AMNT_N)
#define TOOLTIP_SORT_BY_DATE_N N_("Sort by Date, then Num, then Amount")
#define TOOLTIP_SORT_BY_DATE _(TOOLTIP_SORT_BY_DATE_N)
#define TOOLTIP_SORT_BY_DESC_N N_("Sort by Description, then Date, then Num")
#define TOOLTIP_SORT_BY_DESC _(TOOLTIP_SORT_BY_DESC_N)
#define TOOLTIP_SORT_BY_MEMO_N N_("Sort by Memo, then Date, then Num")
#define TOOLTIP_SORT_BY_MEMO _(TOOLTIP_SORT_BY_MEMO_N)
#define TOOLTIP_SORT_BY_NUM_N N_("Sort by Num, then Date, then Amount")
#define TOOLTIP_SORT_BY_NUM _(TOOLTIP_SORT_BY_NUM_N)
#define TOOLTIP_STANDARD_ORD_N N_("Keep normal account order")
#define TOOLTIP_STANDARD_ORD _(TOOLTIP_STANDARD_ORD_N)
#define TOOLTIP_TRANSFER_N N_("Transfer funds from one account to another")
#define TOOLTIP_TRANSFER _(TOOLTIP_TRANSFER_N)
/* Register cell help phrases */
#define ACTION_CELL_HELP _("Enter the type of transaction, or choose "\
"one from the list")
#define DESC_CELL_HELP _("Enter a description of the transaction")
#define MEMO_CELL_HELP _("Enter a description of the split")
#define NUM_CELL_HELP _("Enter the transaction number, such as the "\
"check number")
#define PRICE_CELL_HELP _("Enter the share price")
#define SELL_CELL_HELP _("Enter the number of shares sold")
#define VALUE_CELL_HELP _("Enter the total value of the shares")
#define XFER_CELL_HELP _("Enter the account to transfer from, or choose "\
"one from the list")
#define XFER_TO_CELL_HELP _("Enter the account to transfer to, or choose "\
"one from the list")
/* Menu strings with underscore accelerators */
#define ACCOUNT_MENU_STR_N N_("_Account")
#define ACCOUNT_MENU_STR _(ACCOUNT_MENU_STR_N)
#define ACCOUNTS_MENU_STR_N N_("_Accounts")
#define ACCOUNTS_MENU_STR _(ACCOUNTS_MENU_STR_N)
#define ADJ_BALN_MENU_STR _("_Adjust Balance")
#define ADJ_BALN_MENU_E_STR_N N_("_Adjust Balance...")
#define BLANK_MENU_STR_N N_("_Blank")
#define BLANK_MENU_STR _(BLANK_MENU_STR_N)
#define CANCEL_MENU_STR_N N_("_Cancel")
#define CANCEL_MENU_STR _(CANCEL_MENU_STR_N)
#define DATE_RANGE_MENU_STR_N N_("_Date Range")
#define DATE_RANGE_MENU_STR _(DATE_RANGE_MENU_STR_N)
#define DEL_ACC_MENU_STR_N N_("_Delete Account")
#define DEL_ACC_MENU_STR _(DEL_ACC_MENU_STR_N)
#define DELETE_MENU_STR_N N_("_Delete")
#define DELETE_MENU_STR _(DELETE_MENU_STR_N)
#define DUPLICATE_MENU_STR_N N_("D_uplicate")
#define DUPLICATE_MENU_STR _(DUPLICATE_MENU_STR_N)
#define EDIT_MENU_STR_N N_("_Edit")
#define EDIT_MENU_STR _(EDIT_MENU_STR_N)
#define EDIT_ACC_MENU_STR_N N_("_Edit Account")
#define EDIT_ACC_MENU_STR _(EDIT_ACC_MENU_STR_N)
#define END_BALN_MENU_STR _("_Ending Balance")
#define END_BALN_MENU_E_STR_N N_("_Ending Balance...")
#define FINISH_MENU_STR_N N_("_Finish")
#define FINISH_MENU_STR _(FINISH_MENU_STR_N)
#define HELP_MENU_STR_N N_("_Help")
#define HELP_MENU_STR _(HELP_MENU_STR_N)
#define JUMP_MENU_STR_N N_("_Jump")
#define JUMP_MENU_STR _(JUMP_MENU_STR_N)
#define NEW_MENU_STR_N N_("_New")
#define NEW_MENU_STR _(NEW_MENU_STR_N)
#define NEW_ACC_MENU_STR _("_New Account")
#define NEW_ACC_MENU_E_STR_N N_("_New Account...")
#define OPEN_ACC_MENU_STR_N N_("_Open Account")
#define OPEN_ACC_MENU_STR _(OPEN_ACC_MENU_STR_N)
#define OPEN_SUB_MENU_STR_N N_("Open S_ubaccounts")
#define OPEN_SUB_MENU_STR _(OPEN_SUB_MENU_STR_N)
#define PREFERENCES_MENU_STR _("_Preferences")
#define PREFERENCES_MENU_E_STR_N N_("_Preferences...")
#define PRINT_CHECK_MENU_E_STR_N N_("_Print Check... (unfinished!)")
#define RECONCILE_MENU_E_STR_N N_("_Reconcile...")
#define RECONCILE_MENU_STR_N N_("_Reconcile")
#define RECONCILE_MENU_STR _(RECONCILE_MENU_STR_N)
#define RECORD_MENU_STR_N N_("_Record")
#define RECORD_MENU_STR _(RECORD_MENU_STR_N)
#define REGISTER_MENU_STR_N N_("_Register")
#define REGISTER_MENU_STR _(REGISTER_MENU_STR_N)
#define SCRUB_MENU_STR_N N_("_Scrub")
#define SCRUB_MENU_STR _(SCRUB_MENU_STR_N)
#define SCRUB_ACC_MENU_STR_N N_("Scrub A_ccount")
#define SCRUB_ACC_MENU_STR _(SCRUB_ACC_MENU_STR_N)
#define SCRUB_ALL_MENU_STR_N N_("Scrub A_ll")
#define SCRUB_ALL_MENU_STR _(SCRUB_ALL_MENU_STR_N)
#define SCRUB_SUB_MENU_STR_N N_("Scrub Su_baccounts")
#define SCRUB_SUB_MENU_STR _(SCRUB_SUB_MENU_STR_N)
#define SET_RANGE_MENU_E_STR_N N_("Set _Range...")
#define SET_RANGE_MENU_STR _("Set _Range")
#define SHOW_ALL_MENU_STR_N N_("Show _All")
#define SHOW_ALL_MENU_STR _(SHOW_ALL_MENU_STR_N)
#define SORT_ORDER_MENU_STR_N N_("Sort _Order")
#define SORT_ORDER_MENU_STR _(SORT_ORDER_MENU_STR_N)
#define STYLE_MENU_STR_N N_("_Style")
#define STYLE_MENU_STR _(STYLE_MENU_STR_N)
#define TRANSACTION_MENU_STR_N N_("_Transaction")
#define TRANSACTION_MENU_STR _(TRANSACTION_MENU_STR_N)
#define TRANSFER_MENU_STR _("_Transfer")
#define TRANSFER_MENU_E_STR_N N_("_Transfer...")
/** MISC INTERNATIONALIZATION STRINGS: ******************************/
/* phrases */
#define ACC_CODE_STR _("Account Code")
#define ACC_NAME_STR _("Account Name")
#define ACC_TYPE_STR _("Account Type")
#define ADJ_BALN_STR _("Adjust Balance")
#define AUTO_DOUBLE_STR_N N_("Auto Double")
#define AUTO_DOUBLE_STR _(AUTO_DOUBLE_STR_N)
#define AUTO_SINGLE_STR_N N_("Auto Single")
#define AUTO_SINGLE_STR _(AUTO_SINGLE_STR_N)
#define CLEAR_ALL_STR _("Clear All")
#define CLOSE_WIN_STR _("Close Window")
#define CREDIT_CARD_STR _("Credit Card")
#define CREDITLINE_STR _("Credit Line") /* Line of Credit */
#define DATE_RANGE_STR _("Date Range")
#define DEL_ACC_STR _("Delete Account")
#define DEL_TRANS_STR _("Delete Transaction")
#define DOUBLE_LINE_STR_N N_("Double Line")
#define DOUBLE_LINE_STR _(DOUBLE_LINE_STR_N)
#define EDIT_ACCT_STR _("Edit Account")
#define END_BALN_STR _("Ending Balance")
#define END_DATE_STR _("End date")
#define EXPORT_TO_STR _("Export To")
#define FINISH_STR _("Finish")
#define FROM_NOW_STR _("From Now")
#define GENERAL_LEDGER_STR _("General Ledger")
#define HIDE_INC_EXP_STR _("Hide Inc/Exp")
#define IMPORT_QIF_E_STR_N N_("Import QIF...")
#define IMPORT_QIF_STR _("Import QIF")
#define LOST_ACC_STR _("Lost Accounts")
#define MONEYMRKT_STR _("Money Market")
#define MULTI_LINE_STR_N N_("Multi Line")
#define MULTI_LINE_STR _(MULTI_LINE_STR_N)
#define MUTUAL_FUND_STR _("Mutual Fund")
#define NEW_ACC_STR _("New Account")
#define NEW_BALN_STR _("New Balance")
#define NEW_FILE_STR_N N_("New File")
#define NEW_FILE_STR _(NEW_FILE_STR_N)
#define NEW_TOP_ACCT_STR _("New top level account")
#define NEW_VALUE_STR _("New Value")
#define NO_DESC_STR _("No description")
#define OLD_VALUE_STR _("Old Value")
#define OPEN_ACC_STR _("Open Account")
#define OPEN_BALN_STR _("Opening Balance")
#define OPEN_FILE_STR _("Open File")
#define OPEN_SUB_STR _("Open Subaccounts")
#define PICK_ONE_STR _("Pick One")
#define PARENT_ACC_STR _("Parent Account")
#define PREV_BALN_STR _("Previous Balance")
#define PURCH_PRIC_STR _("Purch Price")
#define QUOTE_SRC_STR _("Price Quote Source")
#define RECONCILE_INFO_STR _("Reconcile Information")
#define REG_DATE_RANGES_STR _("Register date ranges")
#define SALE_PRIC_STR _("Sale Price")
#define SAVE_AS_STR _("Save As")
#define SCRUB_ACCT_STR _("Scrub Account")
#define SCRUB_ALL_STR _("Scrub All")
#define SCRUB_SUBACCTS_STR _("Scrub Subaccounts")
#define SELECT_ALL_STR _("Select All")
#define SELECT_DEFAULT_STR _("Select Default")
#define SET_DATE_RANGE_STR _("Set Date Range")
#define SET_RANGE_STR _("Set Range")
#define SET_TO_DEFAULT_STR _("Set to default")
#define SETUP_ACCT_STR _("Set Up Account")
#define SHOW_ALL_STR _("Show All")
#define SHOW_INC_EXP_STR _("Show Inc/Exp")
#define SHOW_CATEGORIES_STR _("Show Categories")
#define SHOW_EARLIEST_STR _("Show Earliest")
#define SHOW_LATEST_STR _("Show Latest")
#define SINGLE_LINE_STR_N N_("Single Line")
#define SINGLE_LINE_STR _(SINGLE_LINE_STR_N)
#define SORT_BY_AMNT_STR_N N_("Sort by Amount")
#define SORT_BY_AMNT_STR _(SORT_BY_AMNT_STR_N)
#define SORT_BY_DATE_STR_N N_("Sort by Date")
#define SORT_BY_DATE_STR _(SORT_BY_DATE_STR_N)
#define SORT_BY_DESC_STR_N N_("Sort by Description")
#define SORT_BY_DESC_STR _(SORT_BY_DESC_STR_N)
#define SORT_BY_MEMO_STR_N N_("Sort by Memo")
#define SORT_BY_MEMO_STR _(SORT_BY_MEMO_STR_N)
#define SORT_BY_NUM_STR_N N_("Sort by Num")
#define SORT_BY_NUM_STR _(SORT_BY_NUM_STR_N)
#define SORT_ORDER_STR _("Sort Order")
#define START_DATE_STR _("Start date")
#define STANDARD_ORDER_STR_N N_("Standard order")
#define STANDARD_ORDER_STR _(STANDARD_ORDER_STR_N)
#define TOP_ACCT_STR _("Top level account")
#define TOTAL_SHARES_STR _("Total Shares")
#define VERIFY_CHANGES_STR _("Verify Changes")
#define XFER_INFO _("Transfer Information")
#define XFER_MONEY_STR _("Transfer Money")
#define XFRM_STR _("Transfer From")
#define XFTO_STR _("Transfer To")
/* single words */
#define ABOUT_STR _("About")
#define ACCOUNT_STR _("Account")
#define ACCOUNTS_STR _("Accounts")
#define ACC_INFO_STR _("Account Information")
#define ACH_STR _("AutoDep") /* Automatic Check Handling auto deposit */
#define ACTION_STR _("Action")
#define ACTIVITIES_STR _("Activities")
#define AGO_STR _("Ago")
#define AMT_STR _("Amount")
#define APPR_STR _("Appreciation")
#define ARU_STR _("Phone") /* Automated Response Unit telephone xfer */
#define ASSET_STR _("Asset")
#define ASSETS_STR _("Assets")
#define ATM_STR _("ATM") /* automatic teller machine */
#define BACK_STR _("Back")
#define BALN_STR _("Balance")
#define BALN_EURO_STR _("Balance")
#define BANK_STR _("Bank")
#define BLANK_STR_N N_("Blank")
#define BLANK_STR _(BLANK_STR_N)
#define BOUGHT_STR _("Bought")
#define BUY_STR _("Buy")
#define CANCEL_STR_N N_("Cancel")
#define CANCEL_STR _(CANCEL_STR_N)
#define CASH_STR _("Cash")
#define CHANGED_STR _("Changed")
#define CHARGE_STR _("Charge")
#define CHECK_STR _("Check")
#define CHECKING_STR _("Checking")
#define CLEARED_STR _("Cleared")
#define CLOSE_STR_N N_("Close")
#define CLOSE_STR _(CLOSE_STR_N)
#define COMMIT_STR _("Commit")
#define CREATE_STR _("Create")
#define CREDIT_STR _("Credit")
#define CREDITS_STR _("Credits")
#define CURRENCY_STR _("Currency")
#define DATE_STR _("Date")
#define DAYS_STR _("Days")
#define DEBIT_STR _("Debit")
#define DEBITS_STR _("Debits")
#define DECREASE_STR _("Decrease")
#define DEFICIT_STR _("Deficit")
#define DELETE_STR_N N_("Delete")
#define DELETE_STR _(DELETE_STR_N)
#define DEPOSIT_STR _("Deposit")
#define DEPR_STR _("Depreciation")
#define DESC_STR _("Description")
#define DIFF_STR _("Difference")
#define DIRECTDEBIT_STR _("Direct Debit")
#define DIST_STR _("Dist") /* Distribution */
#define DIV_STR _("Div") /* Dividend */
#define DUPLICATE_STR_N N_("Duplicate")
#define DUPLICATE_STR _(DUPLICATE_STR_N)
#define EDIT_STR_N N_("Edit")
#define EDIT_STR _(EDIT_STR_N)
#define EQUITY_STR _("Equity")
#define EXIT_STR_N N_("Exit")
#define EXIT_STR _(EXIT_STR_N)
#define EXPENSE_STR _("Expense")
#define EXPORT_STR _("Export")
#define EXTENSIONS_STR _("Extensions")
#define FEE_STR _("Fee")
#define FIELD_STR _("Field")
#define FILE_STR _("File")
#define FIND_STR_N N_("Find")
#define FIND_STR _(FIND_STR_N)
#define FORWARD_STR _("Forward")
#define FROM_STR _("From")
#define GNC_PREFS _("GnuCash Preferences")
#define HELP_STR _("Help")
#define IMBALANCE_STR _("Imbalance")
#define IMPORT_STR_N N_("Import")
#define IMPORT_STR _(IMPORT_STR_N)
#define INCOME_STR _("Income")
#define INCREASE_STR _("Increase")
#define INT_STR _("Int") /* Interest */
#define JUMP_STR_N N_("Jump")
#define JUMP_STR _(JUMP_STR_N)
#define LIABILITY_STR _("Liability")
#define LICENSE_STR _("License")
#define LOAN_STR _("Loan")
#define LTCG_STR _("LTCG") /* Long Term Capital Gains */
#define MEMO_STR _("Memo")
#define MONTHS_STR _("Months")
#define NEW_STR_N N_("New")
#define NEW_STR _(NEW_STR_N)
#define NO_STR _("No")
#define NONE_STR _("(none)")
#define NOTES_STR _("Notes")
#define NUM_STR _("Num")
#define OK_STR _("Ok")
#define ONLINE_STR _("Online")
#define OPEN_STR_N N_("Open")
#define OPEN_STR _(OPEN_STR_N)
#define ORPHAN_STR _("Orphan")
#define PARAMETERS_STR _("Parameters")
#define PAYMENT_STR _("Payment")
#define PORTFOLIO_STR _("Portfolio")
#define POS_STR _("POS") /* Point of Sale credit card machine */
#define PREFERENCES_STR _("Preferences")
#define PRICE_STR _("Price")
#define PRINT_STR _("Print")
#define PROFITS_STR _("Profits")
#define QUIT_STR _("Quit")
#define REBATE_STR _("Rebate")
#define RECEIVE_STR _("Receive")
#define RECONCILE_STR _("Reconcile")
#define RECORD_STR_N N_("Record")
#define RECORD_STR _(RECORD_STR_N)
#define REGISTER_STR _("Register")
#define REPORT_STR _("Report")
#define REPORTS_STR _("Reports")
#define SAVE_STR_N N_("Save")
#define SAVE_STR _(SAVE_STR_N)
#define SAVINGS_STR _("Savings")
#define SCRUB_STR _("Scrub")
#define SEARCH_RESULTS_STR _("Search Results")
#define SECURITY_STR _("Security")
#define SELL_STR _("Sell")
#define SETTINGS_STR _("Settings")
#define SIMPLE_STR _("Simple")
#define SOLD_STR _("Sold")
#define SPEND_STR _("Spend")
#define SPLIT_STR _("Split")
#define STCG_STR _("STCG") /* Short Term Captial Gains */
#define STOCK_STR _("Stock")
#define STYLE_STR _("Style")
#define SURPLUS_STR _("Surplus")
#define TELLER_STR _("Teller")
#define TO_STR _("To")
#define TODAY_STR _("Today")
#define TOTAL_STR _("Total")
#define TOTAL_EURO_STR _("Total")
#define TYPE_STR _("Type")
#define TRANSACTION_STR _("Transaction")
#define TRANSFER_STR_N N_("Transfer")
#define TRANSFER_STR _(TRANSFER_STR_N)
#define VALUE_STR _("Value")
#define WARN_STR _("WARNING")
#define WEEKS_STR _("Weeks")
#define WIRE_STR _("Wire") /* Electronic Wire transfer */
#define WITHDRAW_STR _("Withdraw")
#define YEARS_STR _("Years")
#define YES_STR _("Yes")
#endif /* __XACC_MESSAGES_I18N_H__ */

View File

@ -25,7 +25,6 @@ include @top_srcdir@/Makefile.init
INCLPATH = -I@top_srcdir@/ \
-I@top_srcdir@/src \
-I@top_srcdir@/include \
-I@top_srcdir@/src/engine \
-I@top_srcdir@/src/engine/guid \
-I@top_srcdir@/lib/ComboBox-1.33 \

View File

@ -23,7 +23,6 @@ include @top_srcdir@/Makefile.init
INCLPATH = -I@top_srcdir@/ \
-I@top_srcdir@/src \
-I@top_srcdir@/include \
-I@top_srcdir@/src/engine \
-I@top_srcdir@/src/engine/guid \
-I@top_srcdir@/src/gnome \

View File

@ -289,24 +289,26 @@ xaccSetPriceCellBlankZero (PriceCell *cell, gncBoolean blank_zero)
/* ================================================ */
void xaccSetDebCredCellValue (PriceCell * deb,
PriceCell * cred, double amt)
void xaccSetDebCredCellValue (PriceCell * debit,
PriceCell * credit,
double amount)
{
deb->cell.fg_color = 0xff0000;
cred->cell.fg_color = 0x0;
debit->cell.fg_color = 0xff0000;
credit->cell.fg_color = 0x0;
if (0.0 < amt) {
xaccSetPriceCellValue (cred, amt);
xaccSetPriceCellValue (deb, 0.0);
if (!deb->blank_zero) {
SET(&deb->cell, "");
/* debits are positive, credits are negative */
if (amount > 0.0) {
xaccSetPriceCellValue (debit, amount);
xaccSetPriceCellValue (credit, 0.0);
if (!credit->blank_zero) {
SET(&credit->cell, "");
}
} else {
xaccSetPriceCellValue (cred, 0.0);
if (!cred->blank_zero) {
SET(&deb->cell, "");
xaccSetPriceCellValue (debit, 0.0);
if (!debit->blank_zero) {
SET(&debit->cell, "");
}
xaccSetPriceCellValue (deb, -amt);
xaccSetPriceCellValue (credit, -amount);
}
}

View File

@ -43,6 +43,8 @@
/* This static indicates the debugging module that this .o belongs to. */
static short module = MOD_REGISTER;
static gncBoolean only_debit_credit_labels = FALSE;
typedef struct _CellBuffer CellBuffer;
struct _CellBuffer
{
@ -155,13 +157,21 @@ static SplitRegisterColors reg_colors = {
/* ============================================== */
void
xaccSplitRegisterSetLabelMode(gncBoolean only_debit_credit)
{
only_debit_credit_labels = only_debit_credit;
}
/* ============================================== */
#define LABEL(NAME,label) \
{ \
BasicCell *hcell; \
hcell = reg->header_label_cells[NAME##_CELL]; \
xaccSetBasicCellValue (hcell, label); \
}
/* ============================================== */
/* configLabels merely puts strings into the label cells
* it does *not* copy them to the header cursor */
@ -190,50 +200,52 @@ configLabels (SplitRegister *reg)
/* setup custom labels for the debit/credit columns */
switch (type) {
case BANK_REGISTER:
LABEL (DEBT, PAYMENT_STR);
LABEL (CRED, DEPOSIT_STR);
if (!only_debit_credit_labels) {
switch (type) {
case BANK_REGISTER:
LABEL (DEBT, DEPOSIT_STR);
LABEL (CRED, PAYMENT_STR);
break;
case CASH_REGISTER:
LABEL (DEBT, SPEND_STR);
LABEL (CRED, RECEIVE_STR);
case CASH_REGISTER:
LABEL (DEBT, RECEIVE_STR);
LABEL (CRED, SPEND_STR);
break;
case ASSET_REGISTER:
LABEL (DEBT, DEPR_STR);
LABEL (CRED, APPR_STR);
break;
case CREDIT_REGISTER:
LABEL (DEBT, CHARGE_STR);
LABEL (CRED, PAYMENT_STR);
break;
case LIABILITY_REGISTER:
LABEL (DEBT, INCREASE_STR);
LABEL (CRED, DECREASE_STR);
break;
case INCOME_LEDGER:
case INCOME_REGISTER:
LABEL (DEBT, INCOME_STR);
LABEL (CRED, CHARGE_STR);
break;
case EXPENSE_REGISTER:
LABEL (DEBT, REBATE_STR);
LABEL (CRED, EXPENSE_STR);
break;
case STOCK_REGISTER:
case PORTFOLIO_LEDGER:
case CURRENCY_REGISTER:
LABEL (DEBT, SOLD_STR);
LABEL (CRED, BOUGHT_STR);
break;
case GENERAL_LEDGER:
case EQUITY_REGISTER:
case SEARCH_LEDGER:
case ASSET_REGISTER:
LABEL (DEBT, DEBIT_STR);
LABEL (CRED, CREDIT_STR);
break;
default:
case CREDIT_REGISTER:
LABEL (DEBT, PAYMENT_STR);
LABEL (CRED, CHARGE_STR);
break;
case LIABILITY_REGISTER:
LABEL (DEBT, DEBIT_STR);
LABEL (CRED, CREDIT_STR);
break;
case INCOME_LEDGER:
case INCOME_REGISTER:
LABEL (DEBT, CHARGE_STR);
LABEL (CRED, INCOME_STR);
break;
case EXPENSE_REGISTER:
LABEL (DEBT, EXPENSE_STR);
LABEL (CRED, REBATE_STR);
break;
case STOCK_REGISTER:
case PORTFOLIO_LEDGER:
case CURRENCY_REGISTER:
LABEL (DEBT, BOUGHT_STR);
LABEL (CRED, SOLD_STR);
break;
case GENERAL_LEDGER:
case EQUITY_REGISTER:
case SEARCH_LEDGER:
LABEL (DEBT, DEBIT_STR);
LABEL (CRED, CREDIT_STR);
break;
default:
break;
}
}
/* copy debit, dredit strings to ndebit, ncredit cells */
@ -252,7 +264,7 @@ configAction (SplitRegister *reg)
{
int type = (reg->type) & REG_TYPE_MASK;
/* setup custom labels for the debit/credit columns */
/* setup strings in the action pull-down */
switch (type) {
case BANK_REGISTER:
case SEARCH_LEDGER: /* broken ! FIXME bg */

View File

@ -20,9 +20,9 @@
*
* FUNCTION:
* Implements a basic display register/ledger.
* This object makes specific cell have specific properties
* (price, text, date, etc). and specific names that correspond.
* it also determines the actual physical layout, arrangement
* This object makes specific cells have specific properties
* (price, text, date, etc.) and specific names that correspond.
* It also determines the actual physical layout, arrangement
* of columns, etc.
*
* Handles splits
@ -77,11 +77,14 @@
/*
* enumerated display styles
* REG_DOUBLE_LINE -- show two lines per transaction
* REG_MULTI_LINE -- show multiple lines per transaction
* REG_DYNAMIC -- dynamically expand edited transaction
* REG_SINGLE_LINE -- show one line per transaction
* REG_DOUBLE_LINE -- show two lines per transaction
* REG_MULTI_LINE -- show multiple lines per transaction
* REG_SINGLE_DYNAMIC -- dynamically expand edited transaction,
* all other transactions on one line
* REG_DOUBLE_DYNAMIC -- dynamically expand edited transaction,
* all other transactions on two lines
*/
#define REG_SINGLE_LINE (1 << 8)
#define REG_DOUBLE_LINE (2 << 8)
#define REG_MULTI_LINE (3 << 8)
@ -214,6 +217,10 @@ void xaccDestroySplitRegister (SplitRegister *);
void xaccSetSplitRegisterColors (SplitRegisterColors reg_colors);
void xaccSplitRegisterConfigColors (SplitRegister *reg);
/* determines whether the register uses only debit/credit as labels
* or uses 'informal' names like deposit/payment, etc. */
void xaccSplitRegisterSetLabelMode(gncBoolean only_debit_credit);
/* returns non-zero value if updates have been made to data */
unsigned int xaccSplitRegisterGetChangeFlag (SplitRegister *);

View File

@ -35,7 +35,3 @@ default:
@echo Nothing to do.
.PHONY: default
# Local Variables:
# tab-width: 2
# End:

View File

@ -154,6 +154,11 @@ the account instead of opening a register." #f))
#(auto_double "Auto Double" "Double line mode with a multi-line cursor")
)))
(gnc:register-configuration-option
(gnc:make-simple-boolean-option
"Register" "Always use debit/credit labels"
"aa" "Only use 'debit' and 'credit' as register column titles." #f))
(gnc:register-configuration-option
(gnc:make-simple-boolean-option
"Register" "Auto-Raise Lists"
@ -317,7 +322,6 @@ the account instead of opening a register." #f))
'default
(list #(default "Income & Expense" "Reverse Income and Expense Accounts")
#(credit "Credit Accounts" "Reverse Credit Card, Liability, Equity, and Income Accounts")
#(debit "Debit Accounts" "Reverse Bank, Cash, Asset, Stock, Mutual Fund, Currency, and Expense Accounts")
#(none "None" "Don't reverse any accounts"))))

View File

@ -28,7 +28,6 @@ INCLPATH = \
-I@top_srcdir@/src/swig\
-I@top_srcdir@/src/engine \
-I@top_srcdir@/src/engine/guid \
-I@top_srcdir@/include \
-I@PERLINCL@/CORE \
-I$(prefix)/include \
`glib-config --cflags glib`
@ -58,7 +57,7 @@ default: gnucash.so
gnucash.so: ${OBJS} ../../engine/libengine.a
gcc -shared ${GLIB_LIBS} ${OBJS} ../../engine/libengine.a -L@libdir@ ${LIBNANA} -o gnucash.so
SWIG_FILTER := %P.h %/util.h
SWIG_FILTER := %P.h %/util.h %gnc-common.h
SWIG_ENGINE_HDRS := \
$(filter-out ${SWIG_FILTER},$(wildcard @top_srcdir@/src/engine/*.h))
SWIG_ALL_HDRS := \