mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Andreas Köhler's patch to perform the i18n on column headers before
calling the generic tree view code instead of performing it a couple steps removed. It also introduces the translatable strings "P" (placeholder) and "Q" (quotes) used in toggle column headers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13098 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
12
ChangeLog
12
ChangeLog
@@ -1,3 +1,15 @@
|
||||
2006-02-04 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/gnome-utils/gnc-tree-view-commodity.c:
|
||||
* src/gnome-utils/gnc-tree-view-price.c:
|
||||
* src/gnome-utils/gnc-tree-view-account.c:
|
||||
* src/gnome-utils/gnc-tree-view.c: Andreas Köhler's patch to
|
||||
perform the i18n on column headers before calling the generic tree
|
||||
view code instead of performing it a couple steps removed. This
|
||||
is a leftover from several years ago when the columns were defined
|
||||
in an array. It also introduces the translatable strings
|
||||
"P" (placeholder) and "Q" (quotes) used in toggle column headers.
|
||||
|
||||
2006-02-04 Joshua Sled <jsled@asynchronous.org>
|
||||
|
||||
* src/gnome-utils/glade/preferences.glade: Fix name of
|
||||
|
||||
@@ -392,121 +392,121 @@ gnc_tree_view_account_new_with_group (AccountGroup *group, gboolean show_root)
|
||||
sample_commodity = gnc_commodity_get_fullname(gnc_default_currency());
|
||||
|
||||
priv->name_column
|
||||
= gnc_tree_view_add_text_column(view, N_("Account Name"), "name",
|
||||
= gnc_tree_view_add_text_column(view, _("Account Name"), "name",
|
||||
GNC_STOCK_ACCOUNT, "Expenses:Entertainment",
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_NAME,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
NULL);
|
||||
gnc_tree_view_add_text_column(view, N_("Type"), "type", NULL, sample_type,
|
||||
gnc_tree_view_add_text_column(view, _("Type"), "type", NULL, sample_type,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_TYPE,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
NULL);
|
||||
gnc_tree_view_add_text_column(view, N_("Commodity"), "commodity", NULL,
|
||||
gnc_tree_view_add_text_column(view, _("Commodity"), "commodity", NULL,
|
||||
sample_commodity,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COMMODITY,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
NULL);
|
||||
priv->code_column
|
||||
= gnc_tree_view_add_text_column(view, N_("Account Code"), "account-code", NULL,
|
||||
= gnc_tree_view_add_text_column(view, _("Account Code"), "account-code", NULL,
|
||||
"1-123-1234",
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_CODE,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
NULL);
|
||||
priv->desc_column
|
||||
= gnc_tree_view_add_text_column(view, N_("Description"), "description", NULL,
|
||||
= gnc_tree_view_add_text_column(view, _("Description"), "description", NULL,
|
||||
"Sample account description.",
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_DESCRIPTION,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
NULL);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Last Num"), "lastnum", "12345",
|
||||
gnc_tree_view_add_numeric_column(view, _("Last Num"), "lastnum", "12345",
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_LASTNUM,
|
||||
GNC_TREE_VIEW_COLUMN_COLOR_NONE,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
NULL);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Present"), "present",
|
||||
gnc_tree_view_add_numeric_column(view, _("Present"), "present",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_PRESENT,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_PRESENT,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_present_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Present (Report)"), "present_report",
|
||||
gnc_tree_view_add_numeric_column(view, _("Present (Report)"), "present_report",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_PRESENT_REPORT,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_PRESENT,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_present_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Balance"), "balance",
|
||||
gnc_tree_view_add_numeric_column(view, _("Balance"), "balance",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_BALANCE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_BALANCE,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_balance_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Balance (Report)"), "balance_report",
|
||||
gnc_tree_view_add_numeric_column(view, _("Balance (Report)"), "balance_report",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_BALANCE_REPORT,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_BALANCE,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_balance_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Cleared"), "cleared",
|
||||
gnc_tree_view_add_numeric_column(view, _("Cleared"), "cleared",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_CLEARED,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_CLEARED,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_cleared_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Cleared (Report)"), "cleared_report",
|
||||
gnc_tree_view_add_numeric_column(view, _("Cleared (Report)"), "cleared_report",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_CLEARED_REPORT,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_CLEARED,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_cleared_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Reconciled"), "reconciled",
|
||||
gnc_tree_view_add_numeric_column(view, _("Reconciled"), "reconciled",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_RECONCILED,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_RECONCILED,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_reconciled_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Reconciled (Report)"), "reconciled_report",
|
||||
gnc_tree_view_add_numeric_column(view, _("Reconciled (Report)"), "reconciled_report",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_RECONCILED_REPORT,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_RECONCILED,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_reconciled_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Future Minimum"), "future_min",
|
||||
gnc_tree_view_add_numeric_column(view, _("Future Minimum"), "future_min",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_FUTURE_MIN,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_FUTURE_MIN,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_future_min_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Future Minimum (Report)"), "future_min_report",
|
||||
gnc_tree_view_add_numeric_column(view, _("Future Minimum (Report)"), "future_min_report",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_FUTURE_MIN_REPORT,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_FUTURE_MIN,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_future_min_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Total"), "total",
|
||||
gnc_tree_view_add_numeric_column(view, _("Total"), "total",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_TOTAL,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_TOTAL,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_total_value);
|
||||
gnc_tree_view_add_numeric_column(view, N_("Total (Report)"), "total_report",
|
||||
gnc_tree_view_add_numeric_column(view, _("Total (Report)"), "total_report",
|
||||
SAMPLE_ACCOUNT_VALUE,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_TOTAL_REPORT,
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_COLOR_TOTAL,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_total_value);
|
||||
priv->notes_column
|
||||
= gnc_tree_view_add_text_column(view, N_("Notes"), "notes", NULL,
|
||||
= gnc_tree_view_add_text_column(view, _("Notes"), "notes", NULL,
|
||||
"Sample account notes.",
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_NOTES,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
NULL);
|
||||
gnc_tree_view_add_text_column(view, N_("Tax Info"), "tax-info", NULL,
|
||||
gnc_tree_view_add_text_column(view, _("Tax Info"), "tax-info", NULL,
|
||||
"Sample tax info.",
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_TAX_INFO,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
NULL);
|
||||
gnc_tree_view_add_toggle_column(view, N_("Placeholder"), "P", "placeholder",
|
||||
gnc_tree_view_add_toggle_column(view, _("Placeholder"), _("P"), "placeholder",
|
||||
GNC_TREE_MODEL_ACCOUNT_COL_PLACEHOLDER,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_placeholder,
|
||||
|
||||
@@ -477,52 +477,52 @@ gnc_tree_view_commodity_new (QofBook *book,
|
||||
/* Set default visibilities */
|
||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(view), FALSE);
|
||||
|
||||
gnc_tree_view_add_text_column (view, N_("Namespace"), "namespace", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Namespace"), "namespace", NULL,
|
||||
"NASDAQ",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_NAMESPACE,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_namespace);
|
||||
gnc_tree_view_add_text_column (view, N_("Symbol"), "symbol", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Symbol"), "symbol", NULL,
|
||||
"ACMEACME",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_MNEMONIC,
|
||||
GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY,
|
||||
sort_by_mnemonic);
|
||||
gnc_tree_view_add_text_column (view, N_("Name"), "name", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Name"), "name", NULL,
|
||||
"Acme Corporation, Inc.",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_FULLNAME,
|
||||
GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY,
|
||||
sort_by_fullname);
|
||||
gnc_tree_view_add_text_column (view, N_("Print Name"), "printname", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Print Name"), "printname", NULL,
|
||||
"ACMEACME (Acme Corporation, Inc.)",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_PRINTNAME,
|
||||
GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY,
|
||||
sort_by_printname);
|
||||
gnc_tree_view_add_text_column (view, N_("Unique Name"), "uniquename", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Unique Name"), "uniquename", NULL,
|
||||
"NASDAQ::ACMEACME",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_UNIQUE_NAME,
|
||||
GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY,
|
||||
sort_by_unique_name);
|
||||
gnc_tree_view_add_text_column (view, N_("CUSIP code"), "cusip_code", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("CUSIP code"), "cusip_code", NULL,
|
||||
"QWERTYUIOP",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_EXCHANGE_CODE,
|
||||
GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY,
|
||||
sort_by_cusip_code);
|
||||
gnc_tree_view_add_numeric_column (view, N_("Fraction"), "fraction", "10000",
|
||||
gnc_tree_view_add_numeric_column (view, _("Fraction"), "fraction", "10000",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_FRACTION,
|
||||
GNC_TREE_VIEW_COLUMN_COLOR_NONE,
|
||||
GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY,
|
||||
sort_by_fraction);
|
||||
gnc_tree_view_add_toggle_column (view, N_("Get Quotes"), "Q", "quote_flag",
|
||||
gnc_tree_view_add_toggle_column (view, _("Get Quotes"), _("Q"), "quote_flag",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_QUOTE_FLAG,
|
||||
GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY,
|
||||
sort_by_quote_flag,
|
||||
NULL);
|
||||
gnc_tree_view_add_text_column (view, N_("Source"), "quote_source", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Source"), "quote_source", NULL,
|
||||
"yahoo",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_QUOTE_SOURCE,
|
||||
GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY,
|
||||
sort_by_quote_source);
|
||||
gnc_tree_view_add_text_column (view, N_("Timezone"), "quote_timezone", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Timezone"), "quote_timezone", NULL,
|
||||
"America/New_York",
|
||||
GNC_TREE_MODEL_COMMODITY_COL_QUOTE_TZ,
|
||||
GNC_TREE_MODEL_COMMODITY_COL_VISIBILITY,
|
||||
|
||||
@@ -417,32 +417,32 @@ gnc_tree_view_price_new (QofBook *book,
|
||||
|
||||
sample_text = gnc_commodity_get_printname(gnc_default_currency());
|
||||
sample_text2 = g_strdup_printf("%s%s", sample_text, sample_text);
|
||||
gnc_tree_view_add_text_column (view, N_("Commodity"), "commodity", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Commodity"), "commodity", NULL,
|
||||
sample_text2,
|
||||
GNC_TREE_MODEL_PRICE_COL_COMMODITY,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
sort_by_name);
|
||||
g_free(sample_text2);
|
||||
gnc_tree_view_add_text_column (view, N_("Currency"), "currency", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Currency"), "currency", NULL,
|
||||
sample_text,
|
||||
GNC_TREE_MODEL_PRICE_COL_CURRENCY,
|
||||
GNC_TREE_MODEL_PRICE_COL_VISIBILITY,
|
||||
sort_by_name);
|
||||
gnc_tree_view_add_text_column (view, N_("Date"), "date", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Date"), "date", NULL,
|
||||
"2005-05-20",
|
||||
GNC_TREE_MODEL_PRICE_COL_DATE,
|
||||
GNC_TREE_MODEL_PRICE_COL_VISIBILITY,
|
||||
sort_by_date);
|
||||
gnc_tree_view_add_text_column (view, N_("Source"), "source", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Source"), "source", NULL,
|
||||
"Finance::Quote",
|
||||
GNC_TREE_MODEL_PRICE_COL_SOURCE,
|
||||
GNC_TREE_MODEL_PRICE_COL_VISIBILITY,
|
||||
sort_by_source);
|
||||
gnc_tree_view_add_text_column (view, N_("Type"), "type", NULL, "last",
|
||||
gnc_tree_view_add_text_column (view, _("Type"), "type", NULL, "last",
|
||||
GNC_TREE_MODEL_PRICE_COL_TYPE,
|
||||
GNC_TREE_MODEL_PRICE_COL_VISIBILITY,
|
||||
sort_by_type);
|
||||
gnc_tree_view_add_numeric_column (view, N_("Price"), "price", "100.00000",
|
||||
gnc_tree_view_add_numeric_column (view, _("Price"), "price", "100.00000",
|
||||
GNC_TREE_MODEL_PRICE_COL_VALUE,
|
||||
GNC_TREE_VIEW_COLUMN_COLOR_NONE,
|
||||
GNC_TREE_MODEL_PRICE_COL_VISIBILITY,
|
||||
|
||||
@@ -1841,7 +1841,7 @@ gnc_tree_view_add_toggle_column (GncTreeView *view,
|
||||
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
column =
|
||||
gtk_tree_view_column_new_with_attributes (gettext(column_short_title),
|
||||
gtk_tree_view_column_new_with_attributes (column_short_title,
|
||||
renderer,
|
||||
"active", model_data_column,
|
||||
NULL);
|
||||
@@ -1901,7 +1901,7 @@ gnc_tree_view_add_text_column (GncTreeView *view,
|
||||
g_return_val_if_fail (GNC_IS_TREE_VIEW(view), NULL);
|
||||
|
||||
column = gtk_tree_view_column_new ();
|
||||
gtk_tree_view_column_set_title (column, gettext(column_title));
|
||||
gtk_tree_view_column_set_title (column, column_title);
|
||||
|
||||
/* Set up an icon renderer if requested */
|
||||
if (stock_icon_name) {
|
||||
|
||||
Reference in New Issue
Block a user