1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
/* HomeBank -- Free, easy, personal accounting for everyone.
* Copyright (C) 1995-2019 Maxime DOYEN
*
* This file is part of HomeBank.
*
* HomeBank is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* HomeBank is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __HB_ACCOUNT_GTK_H__
#define __HB_ACCOUNT_GTK_H__
enum
{
LST_DEFACC_TOGGLE,
LST_DEFACC_DATAS,
NUM_LST_DEFACC
};
enum
{
ACC_LST_INSERT_NORMAL,
ACC_LST_INSERT_REPORT
};
gchar *ui_acc_comboboxentry_get_name(GtkComboBox *entry_box);
guint32 ui_acc_comboboxentry_get_key(GtkComboBox *entry_box);
gboolean ui_acc_comboboxentry_set_active(GtkComboBox *entry_box, guint32 key);
void ui_acc_comboboxentry_add(GtkComboBox *entry_box, Account *acc);
void ui_acc_comboboxentry_populate(GtkComboBox *entry_box, GHashTable *hash, gint insert_type);
void ui_acc_comboboxentry_populate_except(GtkComboBox *entry_box, GHashTable *hash, guint except_key, gint insert_type);
GtkWidget *ui_acc_comboboxentry_new(GtkWidget *label);
/* = = = = = = = = = = */
void ui_acc_listview_add(GtkTreeView *treeview, Account *item);
guint32 ui_acc_listview_get_selected_key(GtkTreeView *treeview);
void ui_acc_listview_remove_selected(GtkTreeView *treeview);
void ui_acc_listview_populate(GtkWidget *view, gint insert_type);
GtkWidget *ui_acc_listview_new(gboolean withtoggle);
/* = = = = = = = = = = */
enum
{
ACTION_NEW,
ACTION_MODIFY,
ACTION_REMOVE,
};
enum
{
FIELD_NAME,
//todo: for stock account
//FIELD_TYPE,
FIELD_BANK,
FIELD_NUMBER,
FIELD_BUDGET,
FIELD_CLOSED,
FIELD_INITIAL,
FIELD_MINIMUM,
FIELD_CHEQUE1,
FIELD_CHEQUE2,
MAX_ACC_FIELD
};
struct ui_acc_manage_data
{
GList *tmp_list;
gint change;
gint action;
guint32 lastkey;
GtkWidget *window;
GtkWidget *LV_acc;
GtkWidget *BT_add, *BT_rem;
GtkWidget *notebook;
GtkWidget *CY_type;
GtkWidget *CY_curr;
GtkWidget *ST_institution;
GtkWidget *ST_number;
GtkWidget *TB_notes;
GtkWidget *CM_closed;
GtkWidget *ST_initial;
//GtkWidget *ST_warning;
GtkWidget *ST_overdraft;
GtkWidget *CY_template;
GtkWidget *CM_nosummary;
GtkWidget *CM_nobudget;
GtkWidget *CM_noreport;
GtkWidget *ST_cheque1;
GtkWidget *ST_cheque2;
};
struct accPopContext
{
GtkTreeModel *model;
guint32 except_key;
guint32 kcur;
gint insert_type;
};
GtkWidget *ui_acc_manage_dialog (void);
#endif
|