From 30f082d19929d4ea38fde80a08fc1ef13f972fa3 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 18 Jun 2017 11:02:05 +0100 Subject: [PATCH] Files linked to dialog-account.glade --- src/gnome-utils/dialog-account.c | 24 +- src/gnome-utils/gnc-tree-view-account.c | 4 +- .../gtkbuilder/dialog-account.glade | 2356 ++++++++--------- src/gnome/gnc-plugin-page-account-tree.c | 4 +- 4 files changed, 1137 insertions(+), 1251 deletions(-) diff --git a/src/gnome-utils/dialog-account.c b/src/gnome-utils/dialog-account.c index a373433eeb..2468b03e3d 100644 --- a/src/gnome-utils/dialog-account.c +++ b/src/gnome-utils/dialog-account.c @@ -667,12 +667,16 @@ verify_children_compatible (AccountWindow *aw) { gint size; PangoFontDescription *font_desc; + GtkStyleContext *style; - size = pango_font_description_get_size (gtk_widget_get_style (label)->font_desc); + style = gtk_widget_get_style_context(label); + gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL, GTK_STYLE_PROPERTY_FONT, &font_desc, NULL); + + size = pango_font_description_get_size (font_desc); font_desc = pango_font_description_new (); pango_font_description_set_weight (font_desc, PANGO_WEIGHT_BOLD); pango_font_description_set_size (font_desc, size * PANGO_SCALE_LARGE); - gtk_widget_modify_font (label, font_desc); + gtk_widget_override_font(label, font_desc); pango_font_description_free (font_desc); } gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); @@ -704,9 +708,6 @@ verify_children_compatible (AccountWindow *aw) gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); gtk_container_set_border_width (GTK_CONTAINER (hbox), 5); gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14); - gtk_container_set_border_width ( - GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), 5); - gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), 6); gtk_widget_show_all (hbox); @@ -1314,9 +1315,9 @@ gnc_account_window_create(AccountWindow *aw) ENTER("aw %p, modal %d", aw, aw->modal); builder = gtk_builder_new(); gnc_builder_add_from_file (builder, "dialog-account.glade", "fraction_liststore"); - gnc_builder_add_from_file (builder, "dialog-account.glade", "Account Dialog"); + gnc_builder_add_from_file (builder, "dialog-account.glade", "account_dialog"); - aw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Account Dialog")); + aw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "account_dialog")); awo = G_OBJECT (aw->dialog); g_object_set_data (awo, "dialog_info", aw); @@ -2012,12 +2013,9 @@ gnc_account_renumber_create_dialog (GtkWidget *window, Account *account) data->num_children = gnc_account_n_children(account); builder = gtk_builder_new(); - gnc_builder_add_from_file (builder, "dialog-account.glade", - "interval_adjustment"); - gnc_builder_add_from_file (builder, "dialog-account.glade", - "Renumber Accounts"); - data->dialog = GTK_WIDGET(gtk_builder_get_object (builder, - "Renumber Accounts")); + gnc_builder_add_from_file (builder, "dialog-account.glade", "interval_adjustment"); + gnc_builder_add_from_file (builder, "dialog-account.glade", "account_renumber_dialog"); + data->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "account_renumber_dialog")); gtk_window_set_transient_for(GTK_WINDOW(data->dialog), GTK_WINDOW(window)); g_object_set_data_full(G_OBJECT(data->dialog), "builder", builder, g_object_unref); diff --git a/src/gnome-utils/gnc-tree-view-account.c b/src/gnome-utils/gnc-tree-view-account.c index 5f41d2ce57..ccfa794706 100644 --- a/src/gnome-utils/gnc-tree-view-account.c +++ b/src/gnome-utils/gnc-tree-view-account.c @@ -2180,8 +2180,8 @@ account_filter_dialog_create(AccountFilterDialog *fd, GncPluginPage *page) /* Create the dialog */ builder = gtk_builder_new(); - gnc_builder_add_from_file (builder, "dialog-account.glade", "Filter By"); - dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Filter By")); + gnc_builder_add_from_file (builder, "dialog-account.glade", "account_filter_by"); + dialog = GTK_WIDGET(gtk_builder_get_object (builder, "account_filter_by")); fd->dialog = dialog; gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(GNC_PLUGIN_PAGE(page)->window)); diff --git a/src/gnome-utils/gtkbuilder/dialog-account.glade b/src/gnome-utils/gtkbuilder/dialog-account.glade index d4091f176f..aadb7c22c8 100644 --- a/src/gnome-utils/gtkbuilder/dialog-account.glade +++ b/src/gnome-utils/gtkbuilder/dialog-account.glade @@ -1,7 +1,700 @@ - + + - - + + + False + 6 + Delete Account + True + True + dialog + + + True + False + True + vertical + 6 + + + True + False + end + + + _Cancel + True + True + True + False + True + + + False + False + 0 + + + + + _Delete + True + True + True + False + True + + + False + False + 1 + + + + + False + True + end + 0 + + + + + True + False + True + vertical + 12 + + + True + False + Deleting account xxx + + + False + False + 0 + + + + + True + False + True + vertical + + + True + False + start + <b>Transactions</b> + True + + + False + False + 0 + + + + + True + False + True + 12 + + + M_ove to: + True + True + False + start + 15 + True + True + True + + + 0 + 3 + + + + + Delete all _transactions + True + True + False + start + 15 + True + True + trans_mrb + + + + 0 + 2 + 2 + + + + + True + False + start + 15 + This account contains transactions. What would you like to do with these transactions? + True + + + 0 + 1 + 2 + + + + + True + False + start + 15 + This account contains read-only transactions which may not be deleted. + True + + + 0 + 0 + 2 + + + + + True + False + True + + + + + + 1 + 3 + + + + + False + True + 1 + + + + + False + False + 1 + + + + + True + False + True + vertical + + + True + False + start + <b>Sub-accounts</b> + True + + + False + False + 0 + + + + + True + False + True + 12 + + + True + False + start + 15 + This account contains sub-accounts. What would you like to do with these sub-accounts? + True + + + 0 + 0 + 2 + + + + + _Move to: + True + True + False + start + 15 + True + True + True + + + + + 0 + 2 + + + + + Delete all _subaccounts + True + True + False + start + 15 + True + True + sa_mrb + + + + 0 + 1 + 2 + + + + + True + False + True + + + + + + 1 + 2 + + + + + False + True + 1 + + + + + False + False + 2 + + + + + True + False + False + True + vertical + + + True + False + start + <b>Sub-account Transactions</b> + True + + + False + False + 0 + + + + + True + False + True + 12 + + + M_ove to: + True + True + False + start + 15 + True + True + True + + + 0 + 3 + + + + + Delete all _transactions + True + True + False + start + 15 + True + True + sa_trans_mrb + + + + 0 + 2 + 2 + + + + + True + False + start + 15 + One or more sub-accounts contain transactions. What would you like to do with these transactions? + True + + + 0 + 1 + 2 + + + + + True + False + start + 15 + One or more sub-accounts contain read-only transactions which may not be deleted. + True + + + 0 + 0 + 2 + + + + + True + False + True + + + + + + 1 + 3 + + + + + False + True + 1 + + + + + False + False + 3 + + + + + False + False + 2 + + + + + + cancelbutton + deletebutton + + + + True + False + 6 + Filter By... + dialog + + + + True + False + vertical + 6 + + + True + False + end + + + _Cancel + True + True + True + False + True + + + False + False + 0 + + + + + _OK + True + True + True + False + True + + + False + False + 1 + + + + + False + True + end + 0 + + + + + True + True + 6 + + + True + False + 6 + 6 + 6 + + + True + True + True + False + True + + + + + + 0 + 0 + 3 + + + + + True + False + vertical + spread + + + _Select All + True + True + True + False + True + + + + False + False + 0 + + + + + C_lear All + True + True + True + False + True + + + + False + False + 1 + + + + + _Default + True + True + True + False + True + + + + False + False + 2 + + + + + 1 + 1 + + + + + + + + + + + + + True + False + Account Type + + + False + + + + + True + False + vertical + + + Show _hidden accounts + True + True + False + Show accounts which have the option "Hidden" checked. + start + 12 + True + True + + + + False + False + 0 + + + + + Show _unused accounts + True + True + False + Show accounts which do not have any transactions. + start + 12 + True + True + + + + False + False + 1 + + + + + Show _zero total accounts + True + True + False + Show accounts which have a zero total value. + start + 12 + True + True + + + + False + False + 1 + + + + + 1 + + + + + True + False + Other + + + 1 + False + + + + + False + True + 2 + + + + + + cancelbutton1 + okbutton1 + + @@ -34,183 +727,236 @@ - + + False 6 New Account center dialog - + - + True + False vertical 6 + + + True + False + end + + + _Cancel + True + True + True + False + True + + + False + False + 0 + + + + + _OK + True + True + True + True + False + True + + + False + False + 1 + + + + + _Help + True + True + True + False + True + + + False + False + 2 + + + + + False + True + end + 0 + + True True 5 - + True + False + True + True 6 vertical 18 - + True - 2 - 2 + False + True 6 - + True - 0 + False + start <b>Identification</b> True - 2 - GTK_FILL - + 0 + 0 - + True - 0 - - - - 1 - 2 - GTK_FILL - - - - - - True - 9 - 2 - 12 + False + True 6 + 12 - + True - 0 + False + start + 12 Account _name: True name_entry + middle - GTK_FILL - + 0 + 0 - + True - 0 + False + start + 12 _Account code: True code_entry + 0 1 - 2 - GTK_FILL - - + True - 0 + False + start + 12 _Description: True description_entry + 0 2 - 3 - GTK_FILL - True - 0 + False + start + 12 _Security/currency: True + 0 3 - 4 - GTK_FILL - - + True + False 1 - 2 3 - 4 - GTK_FILL - GTK_FILL - + True - 0 + False + start + 12 Smallest _fraction: True account_scu + 0 4 - 5 - GTK_FILL - - + True - 0 + False + start + 12 Account _Color: True - color_entry_button + 0 5 - 6 - GTK_FILL - - + True - 3 + False + 2 + True True True True - #ededececebeb - 0 + False + True + 1 @@ -219,37 +965,34 @@ True True True - + False - 1 + True + 2 1 - 2 5 - 6 - GTK_FILL - GTK_FILL - + True - 0 - 0 + False + start + start + 12 No_tes: True notes_text + 0 6 - 7 - GTK_FILL - GTK_FILL @@ -260,14 +1003,14 @@ True False Use Edit->Tax Report Options to set the tax-related flag and assign a tax code to this account. + start + 12 True True + 0 7 - 8 - GTK_FILL - @@ -277,14 +1020,14 @@ True False This account is present solely as a placeholder in the hierarchy. Transactions may not be posted to this account, only to sub-accounts of this account. + start + 12 True True + 0 8 - 9 - GTK_FILL - @@ -294,16 +1037,13 @@ True False This account (and any sub-accounts) will be hidden in the account tree and will not appear in the popup account list in the register. To reset this option, you will first need to open the "Filter By..." dialog for the account tree and check the "show hidden accounts" option. Doing so will allow you to select the account and reopen this dialog. + start True True 1 - 2 7 - 8 - GTK_FILL - @@ -311,14 +1051,14 @@ True True True + True True - - + + 1 - 2 - + 0 @@ -329,10 +1069,7 @@ 1 - 2 1 - 2 - @@ -343,19 +1080,15 @@ 1 - 2 2 - 3 - - + True False - automatic - automatic in + 60 True @@ -366,20 +1099,18 @@ 1 - 2 6 - 7 - GTK_FILL - GTK_FILL - + True + False Smallest fraction of this commodity that can be referenced. True + False fraction_liststore @@ -392,11 +1123,7 @@ 1 - 2 4 - 5 - GTK_FILL - GTK_FILL @@ -404,149 +1131,120 @@ - 1 - 2 + 0 1 - 2 - GTK_FILL False + True 0 - + True - 2 - 5 + False 6 + True True - 0 + False + start <b>Acco_unt Type</b> True True type_view - 2 - GTK_FILL - + 0 + 0 True - 0 + False + 1 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 0 - - - - 2 - 3 - 2 - GTK_FILL - GTK_FILL True - 0 + False + start <b>_Parent Account</b> True True - 3 - 5 - GTK_FILL - - - - - - True - 0 - - - - 3 - 4 - 1 - 2 - GTK_FILL - GTK_FILL + 1 + 0 True True + 12 never - automatic in True True + start + True False + + + - 1 - 2 + 0 1 - 2 - GTK_FILL True False - automatic - automatic + 12 + True in - 4 - 5 + 1 1 - 2 - GTK_FILL + True + True 1 + + True + - + True + False General center @@ -555,208 +1253,163 @@ - + True + False 6 vertical - + True - 8 - 2 - 12 + False 6 - - - True - 0 - - - 3 - 4 - GTK_FILL - - - + 12 True - 0 + False + start + start <b>Balance Information</b> True - 2 - GTK_FILL - + 0 + 0 + 2 True - 0 + False + start <b>Initial Balance Transfer</b> True - 2 + 0 + 3 + 2 + + + + + True + False + True + + + + + + 1 + 1 + + + + + True + False + True + + + + + + 1 + 2 + + + + + True + False + start + 12 + _Balance: + True + right + + + 0 + 1 + + + + + True + False + start + 12 + _Date: + True + right + + + 0 + 2 + + + + + _Use equity 'Opening Balances' account + True + True + False + start + 12 + True + True + + + + 0 4 - 5 - GTK_FILL - + 2 - + + _Select transfer account True - - - + True + False + start + 12 + True + True + opening_equity_radio - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 24 - - - True - False - False - 3 - automatic - automatic - - - - - - - - 2 - 7 - 8 - GTK_FILL - - - - - True - - - - - - 1 - 2 - 2 - 3 - GTK_FILL - - - - - True - 12 - - - True - 0 - _Balance: - True - right - - - - - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 12 - - - True - 0 - _Date: - True - right - - - - - 2 - 3 - GTK_FILL - GTK_FILL - - - - - True - 12 - - - _Use equity 'Opening Balances' account - True - True - False - True - True - - - - - - 2 + 0 5 - 6 - GTK_FILL - GTK_FILL + 2 - + True - 12 + False + False + 12 + True + True + 3 - - _Select transfer account - True - True - False - True - True - opening_equity_radio - + - 2 + 0 6 - 7 - GTK_FILL - GTK_FILL + 2 - - - + False + True 0 @@ -766,8 +1419,9 @@ - + True + False Opening Balance center @@ -778,891 +1432,53 @@ + True + True 1 - - - True - end - - - gtk-cancel - True - True - True - False - True - - - False - False - 0 - - - - - gtk-ok - True - True - True - True - False - True - - - False - False - 1 - - - - - gtk-help - True - True - True - False - True - - - False - False - 2 - - - - - False - end - 0 - - cancel_button ok_button - button72 + help_button - - 6 - Delete Account - True - True - dialog - - - True - vertical - 6 - - - True - vertical - 12 - - - True - Deleting account xxx - - - False - False - 0 - - - - - True - vertical - - - True - 0 - <b>Transactions</b> - True - - - False - False - 0 - - - - - True - 12 - - - True - 4 - 2 - 12 - - - M_ove to: - True - True - False - True - True - True - - - 3 - 4 - GTK_FILL - - - - - - Delete all _transactions - True - True - False - True - True - trans_mrb - - - - 2 - 2 - 3 - GTK_FILL - - - - - - True - 0 - This account contains transactions. What would you like to do with these transactions? - True - - - 2 - 1 - 2 - GTK_FILL - - - - - - True - 0 - This account contains read-only transactions which may not be deleted. - True - - - 2 - GTK_FILL - - - - - - True - - - - - - 1 - 2 - 3 - 4 - - - - - - - 1 - - - - - False - False - 1 - - - - - True - vertical - - - True - 0 - <b>Sub-accounts</b> - True - - - False - False - 0 - - - - - True - 12 - - - True - 3 - 2 - 12 - - - True - 0 - This account contains sub-accounts. What would you like to do with these sub-accounts? - True - - - 2 - GTK_FILL - - - - - - _Move to: - True - True - False - True - True - True - - - - - 2 - 3 - - - - - - - Delete all _subaccounts - True - True - False - True - True - sa_mrb - - - - 2 - 1 - 2 - GTK_FILL - - - - - - True - - - - - - 1 - 2 - 2 - 3 - - - - - - - False - False - 1 - - - - - False - False - 2 - - - - - True - False - vertical - - - True - 0 - <b>Sub-account Transactions</b> - True - - - False - False - 0 - - - - - True - 12 - - - True - 4 - 2 - 12 - - - M_ove to: - True - True - False - True - True - True - - - 3 - 4 - GTK_FILL - - - - - - Delete all _transactions - True - True - False - True - True - sa_trans_mrb - - - - 2 - 2 - 3 - GTK_FILL - - - - - - True - 0 - One or more sub-accounts contain transactions. What would you like to do with these transactions? - True - - - 2 - 1 - 2 - GTK_FILL - - - - - - True - 0 - One or more sub-accounts contain read-only transactions which may not be deleted. - True - - - 2 - GTK_FILL - - - - - - True - - - - - - 1 - 2 - 3 - 4 - - - - - - - 1 - - - - - False - False - 3 - - - - - 2 - - - - - True - end - - - gtk-cancel - True - True - True - False - True - - - False - False - 0 - - - - - gtk-delete - True - True - True - False - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - cancelbutton - deletebutton - + + 1 + 10000 + 10 + 5 + 100 - - True - 6 - Filter By... - dialog - - - - True - vertical - 6 - - - True - True - 6 - - - True - 6 - 3 - 2 - 6 - 6 - - - True - True - False - True - - - 3 - - - - - True - vertical - spread - - - _Select All - True - True - True - False - True - - - - False - False - 0 - - - - - C_lear All - True - True - True - False - True - - - - False - False - 1 - - - - - _Default - True - True - True - False - True - - - - False - False - 2 - - - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - - - - - - - - - True - Account Type - - - False - - - - - True - vertical - - - Show _hidden accounts - True - True - False - Show accounts which have the option "Hidden" checked. - True - True - - - - False - False - 0 - - - - - Show _zero total accounts - True - True - False - Show accounts which have a zero total value. - True - True - - - - False - False - 1 - - - - - Show _unused accounts - True - True - False - Show accounts which do not have any transactions. - True - True - - - - False - False - 1 - - - - - - - - 1 - - - - - True - Other - - - 1 - False - - - - - 2 - - - - - True - end - - - gtk-cancel - True - True - True - False - True - - - False - False - 0 - - - - - gtk-ok - True - True - True - False - True - - - False - False - 1 - - - - - False - end - 0 - - - - - - cancelbutton1 - okbutton1 - - - + True + False 6 Renumber sub-accounts True dialog - + - + True + False vertical 6 - - - True - 5 - 2 - 12 - 6 - - - True - 0 - Prefix: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Renumber the immediate sub-accounts of xxx. - True - - - 2 - GTK_FILL - - - - - - True - True - - - - 1 - 2 - 1 - 2 - - - - - - True - 0 - Examples: - - - 3 - 4 - GTK_FILL - - - - - - True - 0 - - - 1 - 2 - 3 - 4 - GTK_FILL - - - - - - True - 0 - Interval: - - - 2 - 3 - GTK_FILL - - - - - - True - True - interval_adjustment - 10 - 1 - - - - 1 - 2 - 2 - 3 - - - - - - True - 0 - - - 1 - 2 - 4 - 5 - GTK_FILL - - - - - - - - - 2 - - - + True + False end - gtk-cancel + _Cancel True True True False - True + True False @@ -1672,46 +1488,12 @@ + _Renumber True True True False - - - True - 0 - 0 - - - True - 2 - - - True - gtk-execute - - - False - False - 0 - - - - - True - _Renumber - True - - - False - False - 1 - - - - - - + True False @@ -1722,10 +1504,123 @@ False + True end 0 + + + True + False + 6 + 12 + + + True + False + start + Prefix: + + + 0 + 1 + + + + + True + False + Renumber the immediate sub-accounts of xxx. + True + + + 0 + 0 + 2 + + + + + True + True + + + + 1 + 1 + + + + + True + False + start + Examples: + + + 0 + 3 + + + + + True + False + start + + + 1 + 3 + + + + + True + False + start + Interval: + + + 0 + 2 + + + + + True + True + interval_adjustment + 1 + 10 + + + + 1 + 2 + + + + + True + False + start + + + 1 + 4 + + + + + + + + False + True + 2 + + @@ -1733,11 +1628,4 @@ okbutton2 - - 10 - 1 - 10000 - 5 - 100 - diff --git a/src/gnome/gnc-plugin-page-account-tree.c b/src/gnome/gnc-plugin-page-account-tree.c index 3df50f1d65..4e07a0af17 100644 --- a/src/gnome/gnc-plugin-page-account-tree.c +++ b/src/gnome/gnc-plugin-page-account-tree.c @@ -1297,9 +1297,9 @@ gnc_plugin_page_account_tree_cmd_delete_account (GtkAction *action, GncPluginPag gchar *title = NULL; builder = gtk_builder_new(); - gnc_builder_add_from_file (builder, "dialog-account.glade", "Delete Account"); + gnc_builder_add_from_file (builder, "dialog-account.glade", "account_delete_dialog"); - dialog = GTK_WIDGET(gtk_builder_get_object (builder, "Delete Account")); + dialog = GTK_WIDGET(gtk_builder_get_object (builder, "account_delete_dialog")); gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(window)); widget = GTK_WIDGET(gtk_builder_get_object (builder, "header"));