mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Replace "commodity" with "security" where it is user visible. If its
possible to determine that the user is operating on a currency instead of a commodity, update titles/labels to specify "security". Fixes 338382. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13789 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
c29ce7478d
commit
54374be00d
13
ChangeLog
13
ChangeLog
@ -1,5 +1,18 @@
|
||||
2006-04-15 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/gnome-utils/gnc-tree-view-price.c:
|
||||
* src/gnome-utils/dialog-account.c:
|
||||
* src/gnome-utils/glade/commodity.glade:
|
||||
* src/gnome-utils/dialog-commodity.c:
|
||||
* src/gnome/gnc-plugin-basic-commands.c:
|
||||
* src/gnome/glade/commodities.glade:
|
||||
* src/gnome/glade/account.glade:
|
||||
* src/gnome/glade/price.glade:
|
||||
* src/gnome/dialog-commodities.c: Replace "commodity" with
|
||||
"security" where it is user visible. If its possible to determine
|
||||
that the user is operating on a currency instead of a commodity,
|
||||
update titles/labels to specify "security". Fixes 338382.
|
||||
|
||||
* src/backend/file/io-gncxml-v2.c:
|
||||
* src/import-export/hbci/gnc-hbci-kvp.[ch]:
|
||||
* src/engine/Account.c:
|
||||
|
@ -1277,7 +1277,7 @@ gnc_account_window_create(AccountWindow *aw)
|
||||
gtk_box_pack_start(GTK_BOX(box), aw->commodity_edit, TRUE, TRUE, 0);
|
||||
gtk_widget_show (aw->commodity_edit);
|
||||
|
||||
label = glade_xml_get_widget (xml, "commodity_label");
|
||||
label = glade_xml_get_widget (xml, "security_label");
|
||||
gnc_general_select_make_mnemonic_target (GNC_GENERAL_SELECT(aw->commodity_edit), label);
|
||||
|
||||
g_signal_connect (G_OBJECT (aw->commodity_edit), "changed",
|
||||
|
@ -229,20 +229,21 @@ gnc_ui_select_commodity_create(const gnc_commodity * orig_sel,
|
||||
{
|
||||
SelectCommodityWindow * retval = g_new0(SelectCommodityWindow, 1);
|
||||
GladeXML *xml;
|
||||
const char * namespace, *title;
|
||||
GtkWidget *button;
|
||||
const char * namespace, *title, *text;
|
||||
GtkWidget *button, *label;
|
||||
|
||||
xml = gnc_glade_xml_new ("commodity.glade", "Commodity Selector Dialog");
|
||||
xml = gnc_glade_xml_new ("commodity.glade", "Security Selector Dialog");
|
||||
glade_xml_signal_autoconnect_full( xml,
|
||||
gnc_glade_autoconnect_full_func,
|
||||
retval );
|
||||
|
||||
retval->dialog = glade_xml_get_widget (xml, "Commodity Selector Dialog");
|
||||
retval->dialog = glade_xml_get_widget (xml, "Security Selector Dialog");
|
||||
retval->namespace_combo = glade_xml_get_widget (xml, "namespace_combo");
|
||||
retval->commodity_combo = glade_xml_get_widget (xml, "commodity_combo");
|
||||
retval->commodity_entry = glade_xml_get_widget (xml, "commodity_entry");
|
||||
retval->select_user_prompt = glade_xml_get_widget (xml, "select_user_prompt");
|
||||
retval->ok_button = glade_xml_get_widget (xml, "ok_button");
|
||||
label = glade_xml_get_widget (xml, "item_label");
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (retval->select_user_prompt), "");
|
||||
|
||||
@ -255,19 +256,23 @@ gnc_ui_select_commodity_create(const gnc_commodity * orig_sel,
|
||||
|
||||
switch (mode) {
|
||||
case DIAG_COMM_ALL:
|
||||
title = _("Select currency/security");
|
||||
title = _("Select security/currency");
|
||||
text = _("_Security/currency:");
|
||||
break;
|
||||
case DIAG_COMM_NON_CURRENCY:
|
||||
title = _("Select security");
|
||||
text = _("_Security:");
|
||||
break;
|
||||
case DIAG_COMM_CURRENCY:
|
||||
default:
|
||||
title = _("Select currency");
|
||||
text = _("Cu_rrency:");
|
||||
button = glade_xml_get_widget (xml, "new_button");
|
||||
gtk_widget_destroy(button);
|
||||
break;
|
||||
}
|
||||
gtk_window_set_title (GTK_WINDOW(retval->dialog), title);
|
||||
gtk_label_set_text_with_mnemonic (GTK_LABEL(label), text);
|
||||
|
||||
/* build the menus of namespaces and commodities */
|
||||
gnc_ui_update_namespace_picker(retval->namespace_combo,
|
||||
@ -825,29 +830,32 @@ gnc_ui_quote_tz_menu_create(void)
|
||||
/** Build the new/edit commodity dialog box
|
||||
*/
|
||||
static CommodityWindow *
|
||||
gnc_ui_new_commodity_dialog(const char * selected_namespace,
|
||||
gnc_ui_build_commodity_dialog(const char * selected_namespace,
|
||||
GtkWidget *parent,
|
||||
const char * fullname,
|
||||
const char * mnemonic,
|
||||
const char * cusip,
|
||||
int fraction)
|
||||
int fraction,
|
||||
gboolean edit)
|
||||
{
|
||||
CommodityWindow * retval = g_new0(CommodityWindow, 1);
|
||||
GtkWidget *help_button;
|
||||
GtkWidget *box;
|
||||
GtkWidget *menu;
|
||||
GtkWidget *widget;
|
||||
GtkWidget *widget, *sec_label;
|
||||
GladeXML *xml;
|
||||
gboolean include_iso;
|
||||
const gchar *title;
|
||||
gchar *text;
|
||||
|
||||
ENTER(" ");
|
||||
xml = gnc_glade_xml_new ("commodity.glade", "Commodity Dialog");
|
||||
xml = gnc_glade_xml_new ("commodity.glade", "Security Dialog");
|
||||
|
||||
glade_xml_signal_autoconnect_full( xml,
|
||||
gnc_glade_autoconnect_full_func,
|
||||
retval );
|
||||
|
||||
retval->dialog = glade_xml_get_widget (xml, "Commodity Dialog");
|
||||
retval->dialog = glade_xml_get_widget (xml, "Security Dialog");
|
||||
if (parent != NULL)
|
||||
gtk_window_set_transient_for (GTK_WINDOW (retval->dialog), GTK_WINDOW (parent));
|
||||
retval->edit_commodity = NULL;
|
||||
@ -858,8 +866,8 @@ gnc_ui_new_commodity_dialog(const char * selected_namespace,
|
||||
|
||||
/* Determine the commodity section of the dialog */
|
||||
retval->table = glade_xml_get_widget (xml, "edit_table");
|
||||
widget = glade_xml_get_widget (xml, "commodity_label");
|
||||
gtk_container_child_get(GTK_CONTAINER(retval->table), widget,
|
||||
sec_label = glade_xml_get_widget (xml, "security_label");
|
||||
gtk_container_child_get(GTK_CONTAINER(retval->table), sec_label,
|
||||
"bottom-attach", &retval->comm_section_top, NULL);
|
||||
widget = glade_xml_get_widget (xml, "quote_label");
|
||||
gtk_container_child_get(GTK_CONTAINER(retval->table), widget,
|
||||
@ -924,9 +932,16 @@ gnc_ui_new_commodity_dialog(const char * selected_namespace,
|
||||
retval->is_currency = TRUE;
|
||||
gnc_ui_update_commodity_info (retval);
|
||||
include_iso = TRUE;
|
||||
title = _("Edit currency");
|
||||
text = g_strdup_printf("<b>%s</b>", _("Currency Information"));
|
||||
} else {
|
||||
include_iso = FALSE;
|
||||
title = edit ? _("Edit security") : _("New security");
|
||||
text = g_strdup_printf("<b>%s</b>", _("Security Information"));
|
||||
}
|
||||
gtk_window_set_title(GTK_WINDOW(retval->dialog), title);
|
||||
gtk_label_set_markup(GTK_LABEL(sec_label), text);
|
||||
g_free(text);
|
||||
|
||||
/* Are price quotes supported */
|
||||
if (gnc_quote_source_fq_installed()) {
|
||||
@ -1032,8 +1047,9 @@ gnc_ui_common_commodity_modal(gnc_commodity *commodity,
|
||||
}
|
||||
}
|
||||
|
||||
win = gnc_ui_new_commodity_dialog(namespace, parent, fullname,
|
||||
mnemonic, cusip, fraction);
|
||||
win = gnc_ui_build_commodity_dialog(namespace, parent, fullname,
|
||||
mnemonic, cusip, fraction,
|
||||
(commodity != NULL));
|
||||
|
||||
/* Update stock quote info based on existing commodity */
|
||||
gnc_ui_commodity_update_quote_info(win, commodity);
|
||||
@ -1112,7 +1128,7 @@ gnc_ui_new_commodity_modal(const char * default_namespace,
|
||||
********************************************************************/
|
||||
|
||||
/** Given an existing commodity, uses the
|
||||
* gnc_ui_new_commodity_dialog() routine to build a basic edit
|
||||
* gnc_ui_build_commodity_dialog() routine to build a basic edit
|
||||
* dialog, then fills in the price quote information at the bottom of
|
||||
* the dialog.
|
||||
*/
|
||||
|
@ -4,9 +4,9 @@
|
||||
<glade-interface>
|
||||
<requires lib="gnome"/>
|
||||
|
||||
<widget class="GtkDialog" id="Commodity Selector Dialog">
|
||||
<widget class="GtkDialog" id="Security Selector Dialog">
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">Select currency/security </property>
|
||||
<property name="title" translatable="yes">Select security/currency </property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
@ -287,9 +287,9 @@
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label808">
|
||||
<widget class="GtkLabel" id="item_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Currency/security:</property>
|
||||
<property name="label">_Security/currency:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
@ -323,9 +323,9 @@
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkDialog" id="Commodity Dialog">
|
||||
<widget class="GtkDialog" id="Security Dialog">
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes">New Commodity</property>
|
||||
<property name="title">New Security</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">True</property>
|
||||
@ -645,9 +645,9 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="commodity_label">
|
||||
<widget class="GtkLabel" id="security_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Commodity Information</b></property>
|
||||
<property name="label"><b>Security Information</b></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
@ -430,7 +430,7 @@ 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, _("Commodity"), "commodity", NULL,
|
||||
gnc_tree_view_add_text_column (view, _("Security"), "security", NULL,
|
||||
sample_text2,
|
||||
GNC_TREE_MODEL_PRICE_COL_COMMODITY,
|
||||
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,
|
||||
|
@ -292,8 +292,8 @@ gnc_commodities_dialog_create (GtkWidget * parent, CommoditiesDialog *cd)
|
||||
GtkTreeView *view;
|
||||
GtkTreeSelection *selection;
|
||||
|
||||
xml = gnc_glade_xml_new ("commodities.glade", "Commodities Dialog");
|
||||
dialog = glade_xml_get_widget (xml, "Commodities Dialog");
|
||||
xml = gnc_glade_xml_new ("commodities.glade", "Securities Dialog");
|
||||
dialog = glade_xml_get_widget (xml, "Securities Dialog");
|
||||
|
||||
cd->dialog = dialog;
|
||||
cd->session = gnc_get_current_session();
|
||||
|
@ -238,9 +238,9 @@
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="commodity_label">
|
||||
<widget class="GtkLabel" id="security_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Co_mmodity:</property>
|
||||
<property name="label" translatable="yes">_Security/currency:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
<glade-interface>
|
||||
|
||||
<widget class="GtkDialog" id="Commodities Dialog">
|
||||
<property name="title" translatable="yes">Commodities</property>
|
||||
<widget class="GtkDialog" id="Securities Dialog">
|
||||
<property name="title" translatable="yes">Securities</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
@ -165,7 +165,7 @@
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Commodities</b></property>
|
||||
<property name="label" translatable="yes"><b>Securities</b></property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
@ -412,7 +412,7 @@
|
||||
<child>
|
||||
<widget class="GtkLabel" id="commodity_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Co_mmodity:</property>
|
||||
<property name="label" translatable="yes">_Security:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
@ -483,7 +483,7 @@
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="source_label">
|
||||
<property name="label" translatable="yes">_Source:</property>
|
||||
<property name="label" translatable="yes">S_ource:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
|
@ -147,7 +147,7 @@ static GtkActionEntry gnc_plugin_actions [] = {
|
||||
{ "ToolsPriceEditorAction", NULL, N_("_Price Editor"), NULL,
|
||||
N_("View and edit the prices for stocks and mutual funds"),
|
||||
G_CALLBACK (gnc_main_window_cmd_tools_price_editor) },
|
||||
{ "ToolsCommodityEditorAction", NULL, N_("_Commodity Editor"), NULL,
|
||||
{ "ToolsCommodityEditorAction", NULL, N_("_Security Editor"), NULL,
|
||||
N_("View and edit the commodities for stocks and mutual funds"),
|
||||
G_CALLBACK (gnc_main_window_cmd_tools_commodity_editor) },
|
||||
{ "ToolsFinancialCalculatorAction", NULL, N_("_Financial Calculator"), NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user