mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 14:40:28 +00:00
578d633d01
Rename gtk-gui.c to qt-gui.cpp, and make the necessary changes so that the project still builds. Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
17 lines
520 B
C
17 lines
520 B
C
#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) \
|
|
{ \
|
|
GtkWidget **entry = (GtkWidget**)data; \
|
|
option = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); \
|
|
update_screen(); \
|
|
if (entry) \
|
|
gtk_widget_set_sensitive(*entry, option);\
|
|
}
|