13
#include "advanced_dbox.h"
17
static gint calc_type;
20
gint display_calctype_dbox()
22
gtk_widget_show_all(create_calctype_dbox());
27
on_calctype_dbox_show1 (GtkWidget *widget,
30
calc_type = options.lp.calc_type;
31
if(calc_type == CALC_TI92P)
32
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
37
on_calctype_dbox_show2 (GtkWidget *widget,
40
calc_type = options.lp.calc_type;
41
if(calc_type == CALC_TI92)
42
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
47
on_calctype_dbox_show3 (GtkWidget *widget,
50
calc_type = options.lp.calc_type;
51
if(calc_type == CALC_TI89)
52
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
57
on_calctype_dbox_show4 (GtkWidget *widget,
60
calc_type = options.lp.calc_type;
61
if(calc_type == CALC_TI86)
62
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
67
on_calctype_dbox_show5 (GtkWidget *widget,
70
calc_type = options.lp.calc_type;
71
if(calc_type == CALC_TI85)
72
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
77
on_calctype_dbox_show6 (GtkWidget *widget,
80
calc_type = options.lp.calc_type;
81
if(calc_type == CALC_TI83P)
82
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
87
on_calctype_dbox_show7 (GtkWidget *widget,
90
calc_type = options.lp.calc_type;
91
if(calc_type == CALC_TI83)
92
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
97
on_calctype_dbox_show8 (GtkWidget *widget,
100
calc_type = options.lp.calc_type;
101
if(calc_type == CALC_TI82)
102
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
107
on_calctype_dbox_show9 (GtkWidget *widget,
110
calc_type = options.lp.calc_type;
111
if(calc_type == CALC_TI73)
112
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
117
on_radiobutton1_toggled (GtkToggleButton *togglebutton,
120
calc_type = CALC_TI92P;
125
on_radiobutton3_toggled (GtkToggleButton *togglebutton,
128
calc_type = CALC_TI89;
133
on_radiobutton6_toggled (GtkToggleButton *togglebutton,
136
calc_type = CALC_TI83P;
141
on_radiobutton9_toggled (GtkToggleButton *togglebutton,
144
calc_type = CALC_TI73;
149
on_radiobutton8_toggled (GtkToggleButton *togglebutton,
152
calc_type = CALC_TI82;
157
on_radiobutton5_toggled (GtkToggleButton *togglebutton,
160
calc_type = CALC_TI85;
165
on_radiobutton2_toggled (GtkToggleButton *togglebutton,
168
calc_type = CALC_TI92;
173
on_radiobutton4_toggled (GtkToggleButton *togglebutton,
176
calc_type = CALC_TI86;
181
on_radiobutton7_toggled (GtkToggleButton *togglebutton,
184
calc_type = CALC_TI83;
189
on_ok_button_clicked (GtkButton *button,
193
options.lp.calc_type = calc_type;
194
options.auto_detect = ad;
195
ticalc_set_calc(options.lp.calc_type, &ti_calc, &link_cable);
196
gtk_widget_destroy(GTK_WIDGET(user_data));
197
refresh_sensitive_toolbar_buttons();
202
on_cancel_button_clicked (GtkButton *button,
205
gtk_widget_destroy(GTK_WIDGET(user_data));
210
on_calctype_dbox_show10 (GtkWidget *widget,
213
ad = options.auto_detect;
215
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), TRUE);
217
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (user_data), FALSE);
222
calctype_on_checkbutton1_toggled (GtkToggleButton *togglebutton,
225
if(togglebutton->active == TRUE)