X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=gtk-gui.c;h=98c0111eab530ef11de4027f54217f45eed45a27;hb=fb504b50d0f2b881d2be6dcc657f74cca663d217;hp=6f48c734f06d990e0f70e005a6af37068ce519fd;hpb=725e4582d9c7174b70fe197bb27345960457549e;p=ext%2Fsubsurface.git
diff --git a/gtk-gui.c b/gtk-gui.c
index 6f48c73..98c0111 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -31,6 +31,23 @@ static GtkWidget *dive_profile;
visible_cols_t visible_cols = {TRUE, FALSE};
+static const char *default_dive_computer;
+
+static int is_default_dive_computer(const char *name)
+{
+ return default_dive_computer && !strcmp(name, default_dive_computer);
+}
+
+static void set_default_dive_computer(const char *name)
+{
+ if (!name || !*name)
+ return;
+ if (is_default_dive_computer(name))
+ return;
+ default_dive_computer = name;
+ subsurface_set_conf("dive_computer", PREF_STRING, name);
+}
+
void repaint_dive(void)
{
update_dive(current_dive);
@@ -607,13 +624,13 @@ static const gchar* ui_string = " \
\
\
\
- \
- \
\
- \
+ \
\
\