2 /* implements Linux specific functions */
3 #include "display-gtk.h"
4 #include <gconf/gconf-client.h>
5 #define DIVELIST_DEFAULT_FONT "Sans 8"
9 static char *gconf_name(char *name)
11 static char buf[255] = "/apps/subsurface/";
13 snprintf(buf, 255, "/apps/subsurface/%s", name);
18 void subsurface_open_conf(void)
20 gconf = gconf_client_get_default();
23 void subsurface_set_conf(char *name, pref_type_t type, const void *value)
27 gconf_client_set_bool(gconf, gconf_name(name), value != NULL, NULL);
30 gconf_client_set_string(gconf, gconf_name(name), value, NULL);
34 const void *subsurface_get_conf(char *name, pref_type_t type)
38 return gconf_client_get_bool(gconf, gconf_name(name), NULL) ? (void *) 1 : NULL;
40 return gconf_client_get_string(gconf, gconf_name(name), NULL);
42 /* we shouldn't get here */
46 void subsurface_flush_conf(void)
51 void subsurface_close_conf(void)
56 const char *subsurface_USB_name()
58 return "/dev/ttyUSB0";
61 const char *subsurface_icon_name()
63 return "subsurface.svg";
66 void subsurface_ui_setup(GtkSettings *settings, GtkWidget *menubar,
67 GtkWidget *vbox, GtkUIManager *ui_manager)
70 divelist_font = DIVELIST_DEFAULT_FONT;
71 gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0);