2013-01-11 11:24:15 +00:00
|
|
|
#define UNITCALLBACK(name, type, value) \
|
|
|
|
static void name(GtkWidget *w, gpointer data) \
|
|
|
|
{ \
|
|
|
|
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))) \
|
|
|
|
prefs.units.type = value; \
|
|
|
|
update_screen(); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define OPTIONCALLBACK(name, option) \
|
|
|
|
static void name(GtkWidget *w, gpointer data) \
|
|
|
|
{ \
|
2013-04-01 10:51:49 +00:00
|
|
|
GtkWidget **entry = (GtkWidget**)data; \
|
2013-01-27 21:40:54 +00:00
|
|
|
option = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); \
|
2013-01-11 11:24:15 +00:00
|
|
|
update_screen(); \
|
|
|
|
if (entry) \
|
|
|
|
gtk_widget_set_sensitive(*entry, option);\
|
|
|
|
}
|