1
/********************************************************************\
2
* dialog-tax-info.c -- tax information dialog *
3
* Copyright (C) 2001 Gnumatic, Inc. *
4
* Author: Dave Peticolas <dave@krondo.com> *
6
* This program is free software; you can redistribute it and/or *
7
* modify it under the terms of the GNU General Public License as *
8
* published by the Free Software Foundation; either version 2 of *
9
* the License, or (at your option) any later version. *
11
* This program is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
16
* You should have received a copy of the GNU General Public License*
17
* along with this program; if not, contact: *
19
* Free Software Foundation Voice: +1-617-542-5942 *
20
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21
* Boston, MA 02110-1301, USA gnu@gnu.org *
22
\********************************************************************/
27
#include <glib/gi18n.h>
29
#include "guile-mappings.h"
32
#include "gnc-ui-util.h"
33
#include "dialog-utils.h"
34
#include "gnc-gconf-utils.h"
35
#include "gnc-tree-view-account.h"
36
#include "gnc-component-manager.h"
41
#define DIALOG_TAX_INFO_CM_CLASS "dialog-tax-info"
42
#define GCONF_SECTION "dialogs/tax_info"
43
#define PANED_POSITION "paned_position"
45
/* This static indicates the debugging module that this .o belongs to. */
46
/* static short module = MOD_GUI; */
50
SCM payer_name_source;
61
char *payer_name_source;
71
GtkWidget * account_treeview;
72
GtkWidget * select_button;
74
GtkWidget * tax_related_button;
75
GtkWidget * txf_category_view;
76
GtkWidget * txf_help_text;
77
GtkWidget * current_account_button;
78
GtkWidget * parent_account_button;
80
GList * income_txf_infos;
81
GList * expense_txf_infos;
86
GNCAccountType account_type;
90
static gboolean getters_initialized = FALSE;
94
initialize_getters (void)
96
if (getters_initialized)
99
getters.payer_name_source = scm_c_eval_string ("gnc:txf-get-payer-name-source");
100
getters.form = scm_c_eval_string ("gnc:txf-get-form");
101
getters.description = scm_c_eval_string ("gnc:txf-get-description");
102
getters.help = scm_c_eval_string ("gnc:txf-get-help");
104
getters.codes = scm_c_eval_string ("gnc:txf-get-codes");
106
getters_initialized = TRUE;
110
destroy_txf_info (gpointer data, gpointer user_data)
112
TXFInfo *txf_info = data;
114
g_free (txf_info->code);
115
txf_info->code = NULL;
117
g_free (txf_info->payer_name_source);
118
txf_info->payer_name_source = NULL;
120
g_free (txf_info->form);
121
txf_info->form = NULL;
123
g_free (txf_info->description);
124
txf_info->description = NULL;
126
g_free (txf_info->help);
127
txf_info->help = NULL;
133
destroy_txf_infos (GList *infos)
135
g_list_foreach (infos, destroy_txf_info, NULL);
140
gnc_tax_info_set_changed (TaxInfoDialog *ti_dialog, gboolean changed)
142
ti_dialog->changed = changed;
146
load_txf_info (gboolean income)
152
initialize_getters ();
154
category = scm_c_eval_string (income ?
155
"txf-income-categories" :
156
"txf-expense-categories");
157
if (category == SCM_UNDEFINED)
159
destroy_txf_infos (infos);
163
codes = scm_call_1 (getters.codes, category);
164
if (!SCM_LISTP (codes))
166
destroy_txf_infos (infos);
170
while (!SCM_NULLP (codes))
177
code_scm = SCM_CAR (codes);
178
codes = SCM_CDR (codes);
180
scm = scm_call_2 (getters.payer_name_source, category, code_scm);
181
str = SCM_SYMBOL_CHARS (scm);
182
if (safe_strcmp (str, "not-impl") == 0)
187
txf_info = g_new0 (TXFInfo, 1);
189
if (safe_strcmp (str, "none") == 0)
190
txf_info->payer_name_source = NULL;
192
txf_info->payer_name_source = g_strdup (str);
194
str = SCM_SYMBOLP(code_scm) ? SCM_SYMBOL_CHARS(code_scm) : "";
195
txf_info->code = g_strdup (str);
197
scm = scm_call_2 (getters.form, category, code_scm);
198
str = SCM_STRINGP(scm) ? SCM_STRING_CHARS(scm) : "";
199
txf_info->form = g_strdup (str);
201
scm = scm_call_2 (getters.description, category, code_scm);
202
str = SCM_STRINGP(scm) ? SCM_STRING_CHARS(scm) : "";
203
txf_info->description = g_strdup (str);
205
scm = scm_call_2 (getters.help, category, code_scm);
206
str = SCM_STRINGP(scm) ? SCM_STRING_CHARS(scm) : "";
207
txf_info->help = g_strdup (str);
209
infos = g_list_prepend (infos, txf_info);
212
return g_list_reverse (infos);
216
tax_infos (TaxInfoDialog *ti_dialog)
220
ti_dialog->income_txf_infos : ti_dialog->expense_txf_infos;
224
load_category_list (TaxInfoDialog *ti_dialog)
231
view = GTK_TREE_VIEW(ti_dialog->txf_category_view);
232
store = GTK_LIST_STORE(gtk_tree_view_get_model(view));
234
gtk_tree_view_set_model(view, NULL);
236
gtk_list_store_clear(store);
238
codes = tax_infos (ti_dialog);
239
for ( ; codes; codes = codes->next)
241
TXFInfo *txf_info = codes->data;
243
gtk_list_store_append(store, &iter);
244
gtk_list_store_set(store, &iter,
246
1, txf_info->description,
250
gtk_tree_view_set_model(view, GTK_TREE_MODEL(store));
251
g_object_unref(store);
255
clear_gui (TaxInfoDialog *ti_dialog)
258
GtkTreeSelection *selection;
260
gtk_toggle_button_set_active
261
(GTK_TOGGLE_BUTTON (ti_dialog->tax_related_button), FALSE);
263
view = GTK_TREE_VIEW(ti_dialog->txf_category_view);
264
selection = gtk_tree_view_get_selection(view);
265
gtk_tree_selection_unselect_all(selection);
267
gtk_toggle_button_set_active
268
(GTK_TOGGLE_BUTTON (ti_dialog->current_account_button), TRUE);
272
gnc_tax_info_dialog_account_filter_func (Account *account,
275
TaxInfoDialog *dialog = data;
277
return xaccAccountGetType (account) == dialog->account_type;
281
txf_infos_find_code (GList *infos, const char *code)
283
for (; infos; infos = infos->next)
285
TXFInfo *info = infos->data;
287
if (safe_strcmp (code, info->code) == 0)
295
account_to_gui (TaxInfoDialog *ti_dialog, Account *account)
298
GtkTreeSelection *selection;
300
gboolean tax_related;
308
clear_gui (ti_dialog);
312
tax_related = xaccAccountGetTaxRelated (account);
313
gtk_toggle_button_set_active
314
(GTK_TOGGLE_BUTTON (ti_dialog->tax_related_button), tax_related);
316
infos = tax_infos (ti_dialog);
318
str = xaccAccountGetTaxUSCode (account);
319
info = txf_infos_find_code (infos, str);
321
index = g_list_index (infos, info);
327
view = GTK_TREE_VIEW(ti_dialog->txf_category_view);
328
selection = gtk_tree_view_get_selection(view);
329
path = gtk_tree_path_new_from_indices(index, -1);
330
gtk_tree_selection_select_path(selection, path);
331
gtk_tree_view_scroll_to_cell(view, path, NULL, FALSE, 0, 0);
332
gtk_tree_path_free(path);
334
str = xaccAccountGetTaxUSPayerNameSource (account);
335
if (safe_strcmp (str, "parent") == 0)
336
gtk_toggle_button_set_active
337
(GTK_TOGGLE_BUTTON (ti_dialog->parent_account_button), TRUE);
339
gtk_toggle_button_set_active
340
(GTK_TOGGLE_BUTTON (ti_dialog->current_account_button), TRUE);
344
gui_to_accounts (TaxInfoDialog *ti_dialog)
348
GtkTreeSelection *selection;
352
gboolean tax_related;
360
tax_related = gtk_toggle_button_get_active
361
(GTK_TOGGLE_BUTTON (ti_dialog->tax_related_button));
363
infos = tax_infos (ti_dialog);
365
view = GTK_TREE_VIEW(ti_dialog->txf_category_view);
366
selection = gtk_tree_view_get_selection(view);
367
if (!gtk_tree_selection_get_selected(selection, &model, &iter))
369
path = gtk_tree_model_get_path(model, &iter);
370
indices = gtk_tree_path_get_indices(path);
371
info = g_list_nth_data (infos, indices[0]);
372
gtk_tree_path_free(path);
373
g_return_if_fail (info != NULL);
375
code = tax_related ? info->code : NULL;
377
if (tax_related && info->payer_name_source)
381
current = gtk_toggle_button_get_active
382
(GTK_TOGGLE_BUTTON (ti_dialog->current_account_button));
384
pns = current ? "current" : "parent";
389
accounts = gnc_tree_view_account_get_selected_accounts
390
(GNC_TREE_VIEW_ACCOUNT(ti_dialog->account_treeview));
392
for (node = accounts; node; node = node->next)
394
Account *account = node->data;
396
xaccAccountBeginEdit (account);
398
xaccAccountSetTaxRelated (account, tax_related);
399
xaccAccountSetTaxUSCode (account, code);
400
xaccAccountSetTaxUSPayerNameSource (account, pns);
402
xaccAccountCommitEdit (account);
407
window_destroy_cb (GtkObject *object, gpointer data)
409
TaxInfoDialog *ti_dialog = data;
411
gnc_unregister_gui_component_by_data (DIALOG_TAX_INFO_CM_CLASS, ti_dialog);
413
destroy_txf_infos (ti_dialog->income_txf_infos);
414
ti_dialog->income_txf_infos = NULL;
416
destroy_txf_infos (ti_dialog->expense_txf_infos);
417
ti_dialog->expense_txf_infos = NULL;
423
cursor_changed_cb (GtkWidget *widget, gpointer data)
425
TaxInfoDialog *ti_dialog = data;
426
GncTreeViewAccount *account_tree;
430
account_tree = GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview);
431
account = gnc_tree_view_account_get_cursor_account (account_tree);
433
gtk_widget_set_sensitive(ti_dialog->select_button, FALSE);
437
num_children = gnc_tree_view_account_count_children(account_tree, account);
438
gtk_widget_set_sensitive(ti_dialog->select_button, num_children > 0);
442
select_subaccounts_clicked (GtkWidget *widget, gpointer data)
444
TaxInfoDialog *ti_dialog = data;
445
GncTreeViewAccount *account_tree;
448
account_tree = GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview);
449
account = gnc_tree_view_account_get_cursor_account (account_tree);
453
gnc_tree_view_account_select_subaccounts (account_tree, account);
455
gtk_widget_grab_focus (ti_dialog->account_treeview);
459
gnc_tax_info_dialog_response (GtkDialog *dialog, gint response, gpointer data)
461
TaxInfoDialog *ti_dialog = data;
463
if (response == GTK_RESPONSE_OK && ti_dialog->changed)
464
gui_to_accounts (ti_dialog);
466
gnc_close_gui_component_by_data (DIALOG_TAX_INFO_CM_CLASS, ti_dialog);
470
tax_info_show_income_accounts (TaxInfoDialog *ti_dialog, gboolean show_income)
472
GncTreeViewAccount *tree;
473
AccountViewInfo info;
475
GNCAccountType show_type;
477
ti_dialog->income = show_income;
479
tree = GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview);
480
show_type = show_income ? ACCT_TYPE_INCOME : ACCT_TYPE_EXPENSE;
482
gnc_tree_view_account_get_view_info (tree, &info);
484
for (type = 0; type < NUM_ACCOUNT_TYPES; type++)
485
info.include_type[type] = (type == show_type);
487
gnc_tree_view_account_set_view_info (tree, &info);
489
load_category_list (ti_dialog);
490
cursor_changed_cb(GTK_WIDGET(tree), ti_dialog);
494
gnc_tax_info_update_accounts (TaxInfoDialog *ti_dialog)
496
GncTreeViewAccount *tree;
497
GtkTreeSelection* selection;
503
tree = GNC_TREE_VIEW_ACCOUNT(ti_dialog->account_treeview);
504
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(tree));
505
num_accounts = gtk_tree_selection_count_selected_rows (selection);
507
label = gnc_glade_lookup_widget (ti_dialog->dialog, "num_accounts_label");
508
vbox = gnc_glade_lookup_widget (ti_dialog->dialog, "tax_info_vbox");
510
string = g_strdup_printf ("%d", num_accounts);
511
gtk_label_set_text (GTK_LABEL (label), string);
514
gtk_widget_set_sensitive (vbox, num_accounts > 0);
520
gnc_tax_info_income_cb (GtkWidget *w, gpointer data)
522
TaxInfoDialog *ti_dialog = data;
523
gboolean show_income;
525
show_income = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w));
527
tax_info_show_income_accounts (ti_dialog, show_income);
529
ti_dialog->account_type = show_income ? ACCT_TYPE_INCOME : ACCT_TYPE_EXPENSE;
530
gnc_tree_view_account_refilter (GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview));
532
gnc_tax_info_update_accounts (ti_dialog);
534
clear_gui (ti_dialog);
538
gnc_tax_info_account_changed_cb (GtkTreeSelection *selection,
541
TaxInfoDialog *ti_dialog = data;
542
GncTreeViewAccount *view;
546
g_return_if_fail(GTK_IS_TREE_SELECTION(selection));
548
num_accounts = gnc_tax_info_update_accounts (ti_dialog);
549
switch (num_accounts) {
551
clear_gui (ti_dialog);
552
gnc_tax_info_set_changed (ti_dialog, FALSE);
556
/* Get the account. This view is set for multiple selection, so we
557
can only get a list of accounts. */
558
view = GNC_TREE_VIEW_ACCOUNT(ti_dialog->account_treeview);
559
accounts = gnc_tree_view_account_get_selected_accounts (view);
560
account_to_gui (ti_dialog, accounts->data);
561
g_list_free(accounts);
563
gnc_tax_info_set_changed (ti_dialog, FALSE);
567
gnc_tax_info_set_changed (ti_dialog, TRUE);
573
txf_code_select_row_cb (GtkTreeSelection *selection,
576
TaxInfoDialog *ti_dialog = user_data;
588
if (!gtk_tree_selection_get_selected(selection, &model, &iter))
590
path = gtk_tree_model_get_path(model, &iter);
591
indices = gtk_tree_path_get_indices(path);
592
txf_info = g_list_nth_data (tax_infos (ti_dialog), indices[0]);
593
gtk_tree_path_free(path);
595
tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ti_dialog->txf_help_text));
597
text = (txf_info && txf_info->help) ? txf_info->help : "";
598
gtk_text_buffer_set_text (tb, text, -1);
600
scroll = gnc_glade_lookup_widget (GTK_WIDGET (ti_dialog->dialog),
603
adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scroll));
604
gtk_adjustment_set_value (adj, 0.0);
606
vbox = gnc_glade_lookup_widget (GTK_WIDGET (ti_dialog->dialog),
607
"payer_name_source_vbox");
609
if (txf_info && txf_info->payer_name_source)
613
gtk_widget_set_sensitive (vbox, TRUE);
615
current = (strcmp ("current", txf_info->payer_name_source) == 0);
618
gtk_toggle_button_set_active
619
(GTK_TOGGLE_BUTTON (ti_dialog->current_account_button), TRUE);
621
gtk_toggle_button_set_active
622
(GTK_TOGGLE_BUTTON (ti_dialog->parent_account_button), TRUE);
626
gtk_widget_set_sensitive (vbox, FALSE);
627
gtk_toggle_button_set_active
628
(GTK_TOGGLE_BUTTON (ti_dialog->current_account_button), TRUE);
631
gnc_tax_info_set_changed (ti_dialog, TRUE);
635
tax_related_toggled_cb (GtkToggleButton *togglebutton,
638
TaxInfoDialog *ti_dialog = user_data;
642
on = gtk_toggle_button_get_active (togglebutton);
644
vbox = gnc_glade_lookup_widget (GTK_WIDGET (togglebutton),
645
"txf_categories_vbox");
646
gtk_widget_set_sensitive (vbox, on);
648
gnc_tax_info_set_changed (ti_dialog, TRUE);
652
current_account_toggled_cb (GtkToggleButton *togglebutton,
655
TaxInfoDialog *ti_dialog = user_data;
657
gnc_tax_info_set_changed (ti_dialog, TRUE);
661
gnc_tax_info_dialog_create (GtkWidget * parent, TaxInfoDialog *ti_dialog)
666
GtkTreeView *tree_view;
667
GtkTreeSelection *selection;
670
xml = gnc_glade_xml_new ("tax.glade", "Tax Information Dialog");
672
dialog = glade_xml_get_widget (xml, "Tax Information Dialog");
673
ti_dialog->dialog = dialog;
674
tido = GTK_OBJECT (dialog);
676
ti_dialog->account_type = ACCT_TYPE_EXPENSE;
677
ti_dialog->income_txf_infos = load_txf_info (TRUE);
678
ti_dialog->expense_txf_infos = load_txf_info (FALSE);
680
g_signal_connect (G_OBJECT (dialog), "response",
681
G_CALLBACK (gnc_tax_info_dialog_response), ti_dialog);
683
g_signal_connect (G_OBJECT (dialog), "destroy",
684
G_CALLBACK (window_destroy_cb), ti_dialog);
688
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
691
gtk_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_OK);
693
/* tax information */
696
GtkTreeViewColumn *column;
697
GtkCellRenderer *renderer;
701
button = glade_xml_get_widget (xml, "tax_related_button");
702
ti_dialog->tax_related_button = button;
704
g_signal_connect (G_OBJECT (button), "toggled",
705
G_CALLBACK (tax_related_toggled_cb), ti_dialog);
707
text = glade_xml_get_widget (xml, "txf_help_text");
708
gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
709
ti_dialog->txf_help_text = text;
711
tree_view = GTK_TREE_VIEW(glade_xml_get_widget(xml, "txf_category_view"));
712
store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING);
713
gtk_tree_view_set_model(tree_view, GTK_TREE_MODEL(store));
714
g_object_unref(store);
715
renderer = gtk_cell_renderer_text_new();
716
column = gtk_tree_view_column_new_with_attributes
717
(_("Form"), renderer, "text", 0, NULL);
718
gtk_tree_view_append_column(tree_view, GTK_TREE_VIEW_COLUMN(column));
719
renderer = gtk_cell_renderer_text_new();
720
column = gtk_tree_view_column_new_with_attributes
721
(_("Description"), renderer, "text", 1, NULL);
722
gtk_tree_view_append_column(tree_view, GTK_TREE_VIEW_COLUMN(column));
723
ti_dialog->txf_category_view = GTK_WIDGET(tree_view);
725
selection = gtk_tree_view_get_selection(tree_view);
726
g_signal_connect (G_OBJECT (selection), "changed",
727
G_CALLBACK (txf_code_select_row_cb), ti_dialog);
729
label = glade_xml_get_widget(xml, "txf_category_label");
730
gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(tree_view));
732
button = glade_xml_get_widget (xml, "current_account_button");
733
ti_dialog->current_account_button = button;
735
button = glade_xml_get_widget (xml, "parent_account_button");
736
ti_dialog->parent_account_button = button;
738
g_signal_connect (G_OBJECT (button), "toggled",
739
G_CALLBACK (current_account_toggled_cb),
745
GtkWidget *income_radio, *expense_radio, *box;
747
box = glade_xml_get_widget (xml, "account_scroll");
748
tree_view = gnc_tree_view_account_new (FALSE);
749
gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT(tree_view),
750
gnc_tax_info_dialog_account_filter_func,
752
ti_dialog->account_treeview = GTK_WIDGET(tree_view);
754
selection = gtk_tree_view_get_selection (tree_view);
755
gtk_tree_selection_set_mode (selection, GTK_SELECTION_EXTENDED);
756
g_signal_connect (G_OBJECT (selection), "changed",
757
G_CALLBACK (gnc_tax_info_account_changed_cb),
760
gtk_widget_show (ti_dialog->account_treeview);
761
gtk_container_add (GTK_CONTAINER (box), ti_dialog->account_treeview);
763
label = glade_xml_get_widget(xml, "accounts_label");
764
gtk_label_set_mnemonic_widget(GTK_LABEL(label), GTK_WIDGET(tree_view));
766
income_radio = glade_xml_get_widget (xml, "income_radio");
767
expense_radio = glade_xml_get_widget (xml, "expense_radio");
768
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(expense_radio), TRUE);
769
g_signal_connect (G_OBJECT (income_radio), "toggled",
770
G_CALLBACK (gnc_tax_info_income_cb),
772
// gtk_button_clicked (GtkButton *button);
775
/* select subaccounts button */
779
button = glade_xml_get_widget (xml, "select_subaccounts_button");
780
ti_dialog->select_button = button;
782
g_signal_connect (G_OBJECT (button), "clicked",
783
G_CALLBACK (select_subaccounts_clicked),
785
g_signal_connect (G_OBJECT (ti_dialog->account_treeview), "cursor_changed",
786
G_CALLBACK (cursor_changed_cb),
790
tax_info_show_income_accounts (ti_dialog, FALSE);
791
gnc_tax_info_update_accounts (ti_dialog);
792
clear_gui (ti_dialog);
793
gnc_tax_info_set_changed (ti_dialog, FALSE);
795
gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(ti_dialog->dialog));
797
if (gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL)) {
798
GtkWidget *paned = glade_xml_get_widget(xml, "paned");
799
gint position = gnc_gconf_get_int(GCONF_SECTION, PANED_POSITION, NULL);
800
gtk_paned_set_position(GTK_PANED(paned), position);
805
close_handler (gpointer user_data)
807
TaxInfoDialog *ti_dialog = user_data;
809
if (gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL)) {
810
GtkWidget *paned = gnc_glade_lookup_widget(ti_dialog->dialog, "paned");
811
gnc_gconf_set_int(GCONF_SECTION, PANED_POSITION,
812
gtk_paned_get_position(GTK_PANED(paned)), NULL);
815
gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(ti_dialog->dialog));
816
gtk_widget_destroy (ti_dialog->dialog);
820
refresh_handler (GHashTable *changes, gpointer user_data)
822
TaxInfoDialog *ti_dialog = user_data;
824
/* gnc_account_tree_refresh (GNC_ACCOUNT_TREE (ti_dialog->account_tree));*/
826
gnc_tax_info_update_accounts (ti_dialog);
829
/********************************************************************\
830
* gnc_tax_info_dialog *
831
* opens up a window to set account tax information *
833
* Args: parent - the parent of the window to be created *
835
\********************************************************************/
837
gnc_tax_info_dialog (GtkWidget * parent)
839
TaxInfoDialog *ti_dialog;
842
ti_dialog = g_new0 (TaxInfoDialog, 1);
844
gnc_tax_info_dialog_create (parent, ti_dialog);
846
component_id = gnc_register_gui_component (DIALOG_TAX_INFO_CM_CLASS,
847
refresh_handler, close_handler,
850
gnc_gui_component_watch_entity_type (component_id,
852
QOF_EVENT_MODIFY | QOF_EVENT_DESTROY);
854
gtk_widget_grab_focus (ti_dialog->account_treeview);
856
gtk_widget_show (ti_dialog->dialog);