summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-27 22:10:35 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2011-10-27 22:10:35 -0700
commitbf7d70fe8b9b8c2a1f6d381ae000cb0d91e36961 (patch)
treedcbf6958078dbacaaf88919c5a760005dad14726
parent89610335744582b29acb08da0e29837aa34a3dfa (diff)
downloadsubsurface-bf7d70fe8b9b8c2a1f6d381ae000cb0d91e36961.tar.gz
Don't use gconf on Windows
So far this just removes the gconf code - so no preferences for Windows. It also removes the unsused gconf references in main.c Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--gtk-gui.c13
-rw-r--r--main.c5
2 files changed, 11 insertions, 7 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index f4b9989d3..04fdbece3 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -8,7 +8,9 @@
#include <stdlib.h>
#include <time.h>
+#ifndef WIN32
#include <gconf/gconf-client.h>
+#endif
#include "dive.h"
#include "divelist.h"
@@ -26,10 +28,12 @@ int error_count;
#define DIVELIST_DEFAULT_FONT "Sans 8"
const char *divelist_font;
+#ifndef WIN32
GConfClient *gconf;
-struct units output_units;
-
#define GCONF_NAME(x) "/apps/subsurface/" #x
+#endif
+
+struct units output_units;
static GtkWidget *dive_profile;
@@ -400,6 +404,7 @@ static void preferences_dialog(GtkWidget *w, gpointer data)
update_dive_list_units();
repaint_dive();
update_dive_list_col_visibility();
+#ifndef WIN32
gconf_client_set_bool(gconf, GCONF_NAME(feet), output_units.length == FEET, NULL);
gconf_client_set_bool(gconf, GCONF_NAME(psi), output_units.pressure == PSI, NULL);
gconf_client_set_bool(gconf, GCONF_NAME(cuft), output_units.volume == CUFT, NULL);
@@ -410,6 +415,7 @@ static void preferences_dialog(GtkWidget *w, gpointer data)
gconf_client_set_bool(gconf, GCONF_NAME(SAC), visible_cols.sac, NULL);
gconf_client_set_bool(gconf, GCONF_NAME(OTU), visible_cols.otu, NULL);
gconf_client_set_string(gconf, GCONF_NAME(divelist_font), divelist_font, NULL);
+#endif
}
gtk_widget_destroy(dialog);
}
@@ -706,6 +712,8 @@ void init_ui(int argc, char **argv)
gtk_settings_set_long_property(settings, "gtk_tooltip_timeout", 10, "subsurface setting");
g_type_init();
+
+#ifndef WIN32
gconf = gconf_client_get_default();
if (gconf_client_get_bool(gconf, GCONF_NAME(feet), NULL))
@@ -724,6 +732,7 @@ void init_ui(int argc, char **argv)
visible_cols.sac = gconf_client_get_bool(gconf, GCONF_NAME(SAC), NULL);
divelist_font = gconf_client_get_string(gconf, GCONF_NAME(divelist_font), NULL);
+#endif
if (!divelist_font)
divelist_font = DIVELIST_DEFAULT_FONT;
diff --git a/main.c b/main.c
index a82cffc2b..f34e3ae51 100644
--- a/main.c
+++ b/main.c
@@ -4,16 +4,11 @@
#include <stdlib.h>
#include <time.h>
-#include <gconf/gconf-client.h>
-
#include "dive.h"
#include "divelist.h"
-GConfClient *gconf;
struct units output_units;
-#define GCONF_NAME(x) "/apps/subsurface/" #x
-
/* random helper functions, used here or elsewhere */
static int sortfn(const void *_a, const void *_b)
{