X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=gtk-gui.c;h=1e053e52b22837b3ed9df9554b337e25bf9da749;hb=8add7917ce9da2faa7751798c3fb15a24715ae1e;hp=ca033835d31630a9144fdbb3505a2a612f9ca267;hpb=c8f3dc3594aa850829ab87ac7d290776dfb846bd;p=ext%2Fsubsurface.git
diff --git a/gtk-gui.c b/gtk-gui.c
index ca03383..1e053e5 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -32,12 +32,18 @@ static GtkWidget *dive_profile;
visible_cols_t visible_cols = {TRUE, FALSE};
static const char *default_dive_computer;
+static const char *default_dive_computer_device;
static int is_default_dive_computer(const char *name)
{
return default_dive_computer && !strcmp(name, default_dive_computer);
}
+static int is_default_dive_computer_device(const char *name)
+{
+ return default_dive_computer_device && !strcmp(name, default_dive_computer_device);
+}
+
static void set_default_dive_computer(const char *name)
{
if (!name || !*name)
@@ -48,6 +54,16 @@ static void set_default_dive_computer(const char *name)
subsurface_set_conf("dive_computer", PREF_STRING, name);
}
+static void set_default_dive_computer_device(const char *name)
+{
+ if (!name || !*name)
+ return;
+ if (is_default_dive_computer_device(name))
+ return;
+ default_dive_computer_device = name;
+ subsurface_set_conf("dive_computer_device", PREF_STRING, name);
+}
+
void repaint_dive(void)
{
update_dive(current_dive);
@@ -624,13 +640,13 @@ static const gchar* ui_string = " \
\
\
\
- \
- \
\
- \
+ \
\
\