Skip to content

Commit

Permalink
Bug 122895 - general ledger should be named journal
Browse files Browse the repository at this point in the history
  • Loading branch information
gjanssens committed Feb 7, 2015
1 parent 51ebdcc commit 8f71769
Show file tree
Hide file tree
Showing 31 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion src/doc/TODO-schedxactions
Expand Up @@ -28,7 +28,7 @@ Main Scheduled Transaction todo list
X create a template register
X store account and amount data in kvp_frames.
. find a way to list multiple registers for template transaction purposes.
. this is a "normal" general ledger + a "stock" general ledger
. this is a "normal" general journal + a "stock" general journal
. warlord's business stuff may extend this to more ledgers...
. this is going to be: a tabbed notebook in which the tabs contain
the number of transactions the GL they hold contain.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/design/register.texi
Expand Up @@ -146,7 +146,7 @@ balances, transfer accounts, etc. The register is where the cells,
cursor and table get put together into a unified whole. The register
defines specific, actual layouts and widths of the date, price, etc.
cells in a table. It includes a table header, and defines more than
ten specific layouts: bank, credit-card, stock, general ledger, etc.
ten specific layouts: bank, credit-card, stock, general journal, etc.

The split register implementation is divided into two components. The
first component (src/register/splitreg.[ch]) defines the basic structure
Expand Down
2 changes: 1 addition & 1 deletion src/engine/SchedXaction.h
Expand Up @@ -81,7 +81,7 @@ typedef struct _SchedXaction SchedXaction;
* . copying the fields of the template
* . setting the date to the calculated "due" date.
*
* We should be able to use the GeneralLedger [or, yet-another-subtype
* We should be able to use the GeneralJournal [or, yet-another-subtype
* of the internal ledger] for this editing.
**/
struct _SchedXaction
Expand Down
2 changes: 1 addition & 1 deletion src/engine/design.txt
Expand Up @@ -310,7 +310,7 @@ where the Commit() routine triggers the actual update of the SQL database.

Note: 'Commit' is sometimes called 'post' in other systems: The
act of 'commiting' a transaction is the same as 'posting' the
transaction to the general ledger.
transaction to the general journal.

Some important implementation details to understand: the GUI currently
uses begin/end as a convenience, and thus, may hold a transaction in
Expand Down
2 changes: 1 addition & 1 deletion src/gnome-utils/gnc-tree-control-split-reg.c
Expand Up @@ -2120,7 +2120,7 @@ gnc_tree_control_split_reg_paste_trans (GncTreeViewSplitReg *view)

window = gnc_tree_view_split_reg_get_parent (view);
gnc_error_dialog (window, "%s",
_("You can not paste from the general ledger to a register."));
_("You can not paste from the general journal to a register."));
return;
}

Expand Down
6 changes: 3 additions & 3 deletions src/gnome-utils/gnc-tree-model-split-reg.c
Expand Up @@ -1088,7 +1088,7 @@ gnc_tree_model_split_reg_update_query (GncTreeModelSplitReg *model, Query *query
}

//FIXME Not sure why I need to do this, refresh / sort change segfaults on gl
if (model->priv->display_gl == TRUE && model->type == GENERAL_LEDGER2)
if (model->priv->display_gl == TRUE && model->type == GENERAL_JOURNAL2)
{
gnc_tm_get_today_start(&tm);
tm.tm_mon--; /* Default the register to the last month's worth of transactions. */
Expand Down Expand Up @@ -2647,7 +2647,7 @@ gnc_tree_model_split_reg_commit_blank_split (GncTreeModelSplitReg *model)
}


/* Update the display sub account and general ledger settings */
/* Update the display sub account and general journal settings */
void
gnc_tree_model_split_reg_set_display (GncTreeModelSplitReg *model, gboolean subacc, gboolean gl)
{
Expand Down Expand Up @@ -2952,7 +2952,7 @@ gnc_tree_model_split_reg_update_action_list (GncTreeModelSplitReg *model)
gtk_list_store_insert_with_values (store, &iter, 100, 0, _("Buy"), -1);
gtk_list_store_insert_with_values (store, &iter, 100, 0, _("Sell"), -1);
break;
case GENERAL_LEDGER2:
case GENERAL_JOURNAL2:
case EQUITY_REGISTER2:
gtk_list_store_insert_with_values (store, &iter, 100, 0, _("Buy"), -1);
gtk_list_store_insert_with_values (store, &iter, 100, 0, _("Sell"), -1);
Expand Down
4 changes: 2 additions & 2 deletions src/gnome-utils/gnc-tree-model-split-reg.h
Expand Up @@ -70,7 +70,7 @@ typedef enum
TRADING_REGISTER2, //12
NUM_SINGLE_REGISTER_TYPES2, //13

GENERAL_LEDGER2 = NUM_SINGLE_REGISTER_TYPES2, //13
GENERAL_JOURNAL2 = NUM_SINGLE_REGISTER_TYPES2, //13
INCOME_LEDGER2, //14
PORTFOLIO_LEDGER2, //15
SEARCH_LEDGER2, //16
Expand Down Expand Up @@ -233,7 +233,7 @@ Account * gnc_tree_model_split_reg_get_anchor (GncTreeModelSplitReg *model);
/** Commit the blank split. */
void gnc_tree_model_split_reg_commit_blank_split (GncTreeModelSplitReg *model);

/** Set display general ledger and show sub accounts. */
/** Set display general journal and show sub accounts. */
void gnc_tree_model_split_reg_set_display (GncTreeModelSplitReg *model, gboolean subacc, gboolean gl);

/** Change transactions in the tlist based on view movement. */
Expand Down
2 changes: 1 addition & 1 deletion src/gnome-utils/gnc-tree-util-split-reg.c
Expand Up @@ -298,7 +298,7 @@ gnc_tree_util_split_reg_has_rate (GncTreeViewSplitReg *view)
case EXPENSE_REGISTER2:
case EQUITY_REGISTER2:
case TRADING_REGISTER2:
case GENERAL_LEDGER2:
case GENERAL_JOURNAL2:
case INCOME_LEDGER2:
case SEARCH_LEDGER2:
return TRUE;
Expand Down
12 changes: 6 additions & 6 deletions src/gnome-utils/gnc-tree-view-split-reg.c
Expand Up @@ -661,7 +661,7 @@ gnc_tree_view_split_reg_get_colummn_list (GncTreeModelSplitReg *model)
}
break;

case GENERAL_LEDGER2:
case GENERAL_JOURNAL2:
{
static ViewCol col_list[] = {
COL_DATE, COL_NUMACT, COL_DESCNOTES, COL_TRANSFERVOID, COL_RECN,
Expand Down Expand Up @@ -1688,7 +1688,7 @@ gtv_sr_cdf0 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
{
Account *acct = xaccSplitGetAccount (split);

// This will be all but the General Ledger which has anchor == NULL
// This will be all but the General Journal which has anchor == NULL
if ((xaccTransCountSplits (trans) == 0) && (anchor != NULL)) // First split on blank transaction
acct = anchor;

Expand All @@ -1703,7 +1703,7 @@ gtv_sr_cdf0 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
else
string = g_strdup (" ");

if (anchor == acct && model->type != GENERAL_LEDGER2 && model->type != SEARCH_LEDGER2)
if (anchor == acct && model->type != GENERAL_JOURNAL2 && model->type != SEARCH_LEDGER2)
editable = FALSE;
else
editable = TRUE;
Expand Down Expand Up @@ -3098,7 +3098,7 @@ gtv_sr_titles (GncTreeViewSplitReg *view, RowDepth depth)
gtk_tree_view_column_set_title (tvc, _("Bill"));
break;

case GENERAL_LEDGER2:
case GENERAL_JOURNAL2:
if (depth == TRANS1 || depth == TRANS2 || depth == SPLIT3)
gtk_tree_view_column_set_title (tvc, _("Funds Out"));
break;
Expand Down Expand Up @@ -3179,7 +3179,7 @@ gtv_sr_titles (GncTreeViewSplitReg *view, RowDepth depth)
gtk_tree_view_column_set_title (tvc, _("Payment"));
break;

case GENERAL_LEDGER2:
case GENERAL_JOURNAL2:
if (depth == TRANS1 || depth == TRANS2 || depth == SPLIT3)
gtk_tree_view_column_set_title (tvc, _("Funds In"));
break;
Expand Down Expand Up @@ -5412,7 +5412,7 @@ gtv_sr_ed_key_press_cb (GtkWidget *widget, GdkEventKey *event, gpointer user_dat
{
gtk_tree_path_down (spath);

if (gtk_tree_view_row_expanded (GTK_TREE_VIEW (view), spath) && model->type == GENERAL_LEDGER2)
if (gtk_tree_view_row_expanded (GTK_TREE_VIEW (view), spath) && model->type == GENERAL_JOURNAL2)
{
gtk_tree_path_down (spath);

Expand Down
4 changes: 2 additions & 2 deletions src/gnome-utils/ui/osx_accel_map
Expand Up @@ -40,7 +40,7 @@
; (gtk_accel_path "<Actions>/gnc-plugin-log-replay-actions/LogReplayAction" "")
; (gtk_accel_path "<Actions>/gnc-plugin-business-actions/CustomerNewJobOpenAction" "")
; (gtk_accel_path "<Actions>/MenuAdditions/PayableAgingAction" "")
; (gtk_accel_path "<Actions>/MenuAdditions/GeneralLedgerAction" "")
; (gtk_accel_path "<Actions>/MenuAdditions/GeneralJournalAction" "")
; (gtk_accel_path "<Actions>/MainWindowActions/HelpTutorialAction" "")
; (gtk_accel_path "<Actions>/gnc-plugin-basic-commands-actions/ActionsSinceLastRunAction" "")
; (gtk_accel_path "<Actions>/gnc-plugin-business-actions/BusinessTestReloadOwnerAction" "")
Expand Down Expand Up @@ -97,7 +97,7 @@
; (gtk_accel_path "<Actions>/MenuAdditions/BudgetProfitLossAction" "")
; (gtk_accel_path "<Actions>/GncPluginPageRegisterActions/ScrubAllAction" "")
; (gtk_accel_path "<Actions>/gnc-plugin-basic-commands-actions/ActionsMortgageLoanAction" "")
; (gtk_accel_path "<Actions>/gnc-plugin-register-actions/ToolsGeneralLedgerAction" "")
; (gtk_accel_path "<Actions>/gnc-plugin-register-actions/ToolsGeneralJournalAction" "")
; (gtk_accel_path "<Actions>/GncPluginPageAccountTreeActions/EditDeleteAccountAction" "Delete")
; (gtk_accel_path "<Actions>/MenuAdditions/VendorReportAction" "")
; (gtk_accel_path "<Actions>/gnc-plugin-business-actions/CustomerFindCustomerOpenAction" "")
Expand Down
14 changes: 7 additions & 7 deletions src/gnome/gnc-plugin-page-register.c
Expand Up @@ -755,7 +755,7 @@ gnc_plugin_page_register_init (GncPluginPageRegister *plugin_page)
parent = GNC_PLUGIN_PAGE(plugin_page);
use_new = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_USE_NEW);
g_object_set(G_OBJECT(plugin_page),
"page-name", _("General Ledger"),
"page-name", _("General Journal"),
"page-uri", "default:",
"ui-description", "gnc-plugin-page-register-ui.xml",
"use-new-window", use_new,
Expand Down Expand Up @@ -1328,7 +1328,7 @@ gnc_plugin_page_register_save_page (GncPluginPage *plugin_page,
g_key_file_set_string(key_file, group_name, KEY_ACCOUNT_NAME, name);
g_free(name);
}
else if (reg->type == GENERAL_LEDGER)
else if (reg->type == GENERAL_JOURNAL)
{
g_key_file_set_string(key_file, group_name, KEY_REGISTER_TYPE,
LABEL_GL);
Expand Down Expand Up @@ -1603,9 +1603,9 @@ gnc_plugin_page_register_get_tab_name (GncPluginPage *plugin_page)
case LD_GL:
switch (reg->type)
{
case GENERAL_LEDGER:
case GENERAL_JOURNAL:
case INCOME_LEDGER:
return g_strdup(_("General Ledger"));
return g_strdup(_("General Journal"));
case PORTFOLIO_LEDGER:
return g_strdup(_("Portfolio"));
case SEARCH_LEDGER:
Expand Down Expand Up @@ -2557,10 +2557,10 @@ gnc_reg_get_name (GNCLedgerDisplay *ledger, gboolean for_window)

switch (reg->type)
{
case GENERAL_LEDGER:
case GENERAL_JOURNAL:
case INCOME_LEDGER:
if (for_window)
reg_name = _("General Ledger");
reg_name = _("General Journal");
else
reg_name = _("Transaction Report");
break;
Expand Down Expand Up @@ -2639,7 +2639,7 @@ report_helper (GNCLedgerDisplay *ledger, Split *split, Query *query)
arg = SCM_BOOL (reg->use_double_line);
args = scm_cons (arg, args);

arg = SCM_BOOL (reg->type == GENERAL_LEDGER || reg->type == INCOME_LEDGER
arg = SCM_BOOL (reg->type == GENERAL_JOURNAL || reg->type == INCOME_LEDGER
|| reg->type == SEARCH_LEDGER);
args = scm_cons (arg, args);

Expand Down
2 changes: 1 addition & 1 deletion src/gnome/gnc-plugin-page-register.h
Expand Up @@ -102,7 +102,7 @@ GncPluginPage *
gnc_plugin_page_register_new_ledger (GNCLedgerDisplay *ledger);


/** Create a new "register" plugin page containing a general ledger.
/** Create a new "register" plugin page containing a general journal.
*
* @return The newly created plugin page.
*/
Expand Down
18 changes: 9 additions & 9 deletions src/gnome/gnc-plugin-page-register2.c
Expand Up @@ -749,7 +749,7 @@ gnc_plugin_page_register2_init (GncPluginPageRegister2 *plugin_page)
parent = GNC_PLUGIN_PAGE(plugin_page);
use_new = gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL_REGISTER, GNC_PREF_USE_NEW);
g_object_set(G_OBJECT(plugin_page),
"page-name", _("General Ledger2"),
"page-name", _("General Journal2"),
"page-uri", "default:",
"ui-description", "gnc-plugin-page-register2-ui.xml",
"use-new-window", use_new,
Expand Down Expand Up @@ -1383,7 +1383,7 @@ gnc_plugin_page_register2_save_page (GncPluginPage *plugin_page,
g_key_file_set_string (key_file, group_name, KEY_ACCOUNT_NAME, name);
g_free (name);
}
else if (model->type == GENERAL_LEDGER2)
else if (model->type == GENERAL_JOURNAL2)
{
g_key_file_set_string (key_file, group_name, KEY_REGISTER_TYPE,
LABEL_GL);
Expand Down Expand Up @@ -1669,9 +1669,9 @@ gnc_plugin_page_register2_get_tab_name (GncPluginPage *plugin_page)
case LD2_GL:
switch (model->type)
{
case GENERAL_LEDGER:
case GENERAL_JOURNAL:
case INCOME_LEDGER:
return g_strdup(_("General Ledger"));
return g_strdup(_("General Journal"));
case PORTFOLIO_LEDGER:
return g_strdup(_("Portfolio"));
case SEARCH_LEDGER:
Expand Down Expand Up @@ -2389,12 +2389,12 @@ gnc_reg_get_name (GNCLedgerDisplay2 *ledger, gboolean for_window) // this works

switch (model->type)
{
case GENERAL_LEDGER:
case GENERAL_JOURNAL:
case INCOME_LEDGER:
if (for_window)
reg_name = _("General Ledger");
reg_name = _("General Journal");
else
reg_name = _("General Ledger Report");
reg_name = _("General Journal Report");
break;
case PORTFOLIO_LEDGER:
if (for_window)
Expand Down Expand Up @@ -2474,7 +2474,7 @@ report_helper (GNCLedgerDisplay2 *ledger, Split *split, Query *query) //this wor
arg = SCM_BOOL (model->use_double_line);
args = scm_cons (arg, args);

arg = SCM_BOOL (model->type == GENERAL_LEDGER2 || model->type == INCOME_LEDGER2
arg = SCM_BOOL (model->type == GENERAL_JOURNAL2 || model->type == INCOME_LEDGER2
|| model->type == SEARCH_LEDGER2);
args = scm_cons (arg, args);

Expand Down Expand Up @@ -3014,7 +3014,7 @@ gnc_plugin_page_register2_cmd_view_filter_by (GtkAction *action,
if (priv->fd.save_filter == TRUE)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);

// General Ledgers can not save filters so disable button.
// General Journals can not save filters so disable button.
ledger_type = gnc_ledger_display2_type (priv->ledger);
if (ledger_type == LD2_GL)
gtk_widget_set_sensitive (GTK_WIDGET (button), FALSE);
Expand Down
2 changes: 1 addition & 1 deletion src/gnome/gnc-plugin-page-register2.h
Expand Up @@ -102,7 +102,7 @@ GncPluginPage *
gnc_plugin_page_register2_new_ledger (GNCLedgerDisplay2 *ledger);


/** Create a new "register" plugin page containing a general ledger.
/** Create a new "register" plugin page containing a general journal.
*
* @return The newly created plugin page.
*/
Expand Down
8 changes: 4 additions & 4 deletions src/gnome/gnc-plugin-register.c
Expand Up @@ -51,12 +51,12 @@ static GtkActionEntry gnc_plugin_actions [] =
{
{
#ifdef REGISTER2_ENABLED
"ToolsGeneralLedgerAction", NULL, N_("Old St_yle General Ledger"), NULL,
N_("Open an old style general ledger window"),
"ToolsGeneralJournalAction", NULL, N_("Old St_yle General Journal"), NULL,
N_("Open an old style general journal window"),
G_CALLBACK (gnc_plugin_register_cmd_general_ledger)
#else
"ToolsGeneralLedgerAction", NULL, N_("_General Ledger"), NULL,
N_("Open general ledger window"),
"ToolsGeneralJournalAction", NULL, N_("_General Journal"), NULL,
N_("Open general journal window"),
G_CALLBACK (gnc_plugin_register_cmd_general_ledger)
#endif
},
Expand Down
4 changes: 2 additions & 2 deletions src/gnome/gnc-plugin-register2.c
Expand Up @@ -54,8 +54,8 @@ static GtkActionEntry gnc_plugin_actions [] =
{
#ifdef REGISTER2_ENABLED
{
"ToolsGeneralLedger2Action", NULL, N_("_General Ledger"), NULL,
N_("Open a general ledger window"),
"ToolsGeneralJournal2Action", NULL, N_("_General Journal"), NULL,
N_("Open a general journal window"),
G_CALLBACK (gnc_plugin_register2_cmd_general_ledger)
},
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/gnome/gnc-split-reg.c
Expand Up @@ -2110,7 +2110,7 @@ gnc_split_reg_get_placeholder( GNCSplitReg *gsr )

switch (reg->type)
{
case GENERAL_LEDGER:
case GENERAL_JOURNAL:
case INCOME_LEDGER:
case PORTFOLIO_LEDGER:
case SEARCH_LEDGER:
Expand Down
10 changes: 5 additions & 5 deletions src/gnome/gnc-split-reg2.c
Expand Up @@ -43,7 +43,7 @@
#include "dialog-utils.h"

#define STATE_SECTION_REG_PREFIX "Register"
#define STATE_SECTION_GEN_LEDGER "General Ledger"
#define STATE_SECTION_GEN_JOURNAL "General Journal"

static QofLogModule log_module = GNC_MOD_GUI;

Expand Down Expand Up @@ -259,8 +259,8 @@ gsr2_create_table (GNCSplitReg2 *gsr)

/* State_section is used to store per register state: column widths, sort order,... */
ledger_type = gnc_ledger_display2_type (gsr->ledger);
if (ledger_type == LD2_GL && model->type == GENERAL_LEDGER2)
state_section = g_strdup (STATE_SECTION_GEN_LEDGER);
if (ledger_type == LD2_GL && model->type == GENERAL_JOURNAL2)
state_section = g_strdup (STATE_SECTION_GEN_JOURNAL);
else if (ledger_type == LD2_SUBACCOUNT)
{
gchar guidstr[GUID_ENCODING_LENGTH+1];
Expand Down Expand Up @@ -322,7 +322,7 @@ gsr2_create_table (GNCSplitReg2 *gsr)

gnc_tree_view_configure_columns (GNC_TREE_VIEW (view));

if (ledger_type == LD2_GL && model->type == GENERAL_LEDGER2)
if (ledger_type == LD2_GL && model->type == GENERAL_JOURNAL2)
gnc_tree_view_set_show_column_menu (GNC_TREE_VIEW (view), TRUE);
else
gnc_tree_view_set_show_column_menu (GNC_TREE_VIEW (view), FALSE);
Expand Down Expand Up @@ -955,7 +955,7 @@ gnc_split_reg2_get_placeholder (GNCSplitReg2 *gsr)

switch (model->type)
{
case GENERAL_LEDGER2:
case GENERAL_JOURNAL2:
case INCOME_LEDGER2:
case PORTFOLIO_LEDGER2:
case SEARCH_LEDGER2:
Expand Down
2 changes: 1 addition & 1 deletion src/gnome/ui/gnc-plugin-register-ui.xml
Expand Up @@ -2,7 +2,7 @@
<menubar>
<menu name="Tools" action="ToolsAction">
<placeholder name="ToolsPlaceholder">
<menuitem name="ToolsGeneralLedger" action="ToolsGeneralLedgerAction"/>
<menuitem name="ToolsGeneralJournal" action="ToolsGeneralJournalAction"/>
</placeholder>
</menu>
</menubar>
Expand Down
2 changes: 1 addition & 1 deletion src/gnome/ui/gnc-plugin-register2-ui.xml
Expand Up @@ -2,7 +2,7 @@
<menubar>
<menu name="Tools" action="ToolsAction">
<placeholder name="ToolsPlaceholder">
<menuitem name="ToolsGeneralLedger2" action="ToolsGeneralLedger2Action"/>
<menuitem name="ToolsGeneralJournal2" action="ToolsGeneralJournal2Action"/>
</placeholder>
</menu>

Expand Down

0 comments on commit 8f71769

Please sign in to comment.