]> Dogcows Code - chaz/homebank/blob - src/ui-currency.h
Merge branch 'upstream'
[chaz/homebank] / src / ui-currency.h
1 /* HomeBank -- Free, easy, personal accounting for everyone.
2 * Copyright (C) 1995-2012 Maxime DOYEN
3 *
4 * This file is part of HomeBank.
5 *
6 * HomeBank is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * HomeBank 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.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef __HB_CURRENCY_GTK_H__
21 #define __HB_CURRENCY_GTK_H__
22
23 enum
24 {
25 LST_DEFCUR_TOGGLE,
26 LST_DEFCUR_DATAS,
27 NUM_LST_DEFCUR
28 };
29
30 enum
31 {
32 LST_SELCUR_NAME,
33 LST_SELCUR_DATA,
34 NUM_LST_SELCUR
35 };
36
37
38 struct ui_cur_manage_dialog_data
39 {
40 GtkWidget *window;
41
42 GtkWidget *LV_cur;
43 // GtkWidget *CY_curr;
44 // GtkWidget *BT_curr;
45
46 GtkWidget *BB_update;
47 GtkWidget *BT_add;
48 GtkWidget *BT_rem;
49 GtkWidget *BT_edit;
50 GtkWidget *BT_base;
51
52 gint change;
53 };
54
55
56 struct ui_cur_edit_dialog_data
57 {
58 GtkWidget *window;
59
60 GtkWidget *LB_name;
61 GtkWidget *LB_rate;
62 GtkWidget *NB_rate;
63
64 GtkWidget *LB_sample;
65
66 GtkWidget *ST_symbol;
67 GtkWidget *CM_symisprefix;
68 GtkWidget *ST_decimalchar;
69 GtkWidget *ST_groupingchar;
70 GtkWidget *NB_fracdigits;
71
72 };
73
74 enum {
75 CUR_SELECT_MODE_NORMAL,
76 CUR_SELECT_MODE_BASE
77 };
78
79
80 struct ui_cur_select_dialog_data
81 {
82 GtkWidget *window;
83
84 GtkTreeModel *modelfilter;
85 GtkTreeModel *sortmodel;
86 GtkTreeModel *model;
87 GtkWidget *ST_search;
88 GtkWidget *LV_cur;
89 };
90
91 struct curPopContext
92 {
93 GtkTreeModel *model;
94 guint except_key;
95 };
96
97
98 gchar *ui_cur_combobox_get_name(GtkComboBox *entry_box);
99 guint32 ui_cur_combobox_get_key(GtkComboBox *entry_box);
100 guint32 ui_cur_combobox_get_key_add_new(GtkComboBox *entry_box);
101 gboolean ui_cur_combobox_set_active(GtkComboBox *entry_box, guint32 key);
102 void ui_cur_combobox_add(GtkComboBox *entry_box, Currency *cur);
103 void ui_cur_combobox_populate(GtkComboBox *entry_box, GHashTable *hash);
104 void ui_cur_combobox_populate_except(GtkComboBox *entry_box, GHashTable *hash, guint except_key);
105 GtkWidget *ui_cur_combobox_new(GtkWidget *label);
106
107 /* = = = = = = = = = = */
108
109 void ui_cur_listview_add(GtkTreeView *treeview, Currency *item);
110 guint32 ui_cur_listview_get_selected_key(GtkTreeView *treeview);
111 void ui_cur_listview_remove_selected(GtkTreeView *treeview);
112 void ui_cur_listview_populate(GtkWidget *view);
113 GtkWidget *ui_cur_listview_new(gboolean withtoggle);
114
115 gint ui_cur_manage_dialog_update_currencies(GtkWindow *parent);
116
117 GtkWidget *ui_cur_manage_dialog (void);
118
119 Currency4217 *ui_cur_select_dialog_new(GtkWindow *parent, gint select_mode);
120
121 void ui_cur_edit_dialog_new(GtkWindow *parent, Currency *cur);
122
123 #endif
124
This page took 0.03438 seconds and 4 git commands to generate.