]> git.tdb.fi Git - ext/subsurface.git/blobdiff - info.c
XSLT to transform JDiveLog to Subsurface format
[ext/subsurface.git] / info.c
diff --git a/info.c b/info.c
index a9d007169c6200a39f77d69efd9b59c5a7f2700c..9b71b659166f6b41dd1474057d6e15531c7a4720 100644 (file)
--- a/info.c
+++ b/info.c
@@ -53,6 +53,7 @@ void flush_dive_info_changes(struct dive *dive)
                char *new_text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(location));
                old_text = dive->location;
                dive->location = new_text;
+               add_location(new_text);
                if (text_changed(old_text,dive->location))
                        changed = 1;
                if (old_text)
@@ -63,6 +64,7 @@ void flush_dive_info_changes(struct dive *dive)
                char *new_text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(divemaster));
                old_text = dive->divemaster;
                dive->divemaster = new_text;
+               add_people(new_text);
                if (text_changed(old_text,dive->divemaster))
                        changed = 1;
                if (old_text)
@@ -73,6 +75,7 @@ void flush_dive_info_changes(struct dive *dive)
                char *new_text = gtk_combo_box_get_active_text(GTK_COMBO_BOX(buddy));
                old_text = dive->buddy;
                dive->buddy = new_text;
+               add_people(new_text);
                if (text_changed(old_text,dive->buddy))
                        changed = 1;
                if (old_text)
@@ -149,6 +152,9 @@ static GtkComboBoxEntry *text_entry(GtkWidget *box, const char *label, GtkListSt
        completion = gtk_entry_completion_new();
        gtk_entry_completion_set_text_column(completion, 0);
        gtk_entry_completion_set_model(completion, GTK_TREE_MODEL(completions));
+       gtk_entry_completion_set_inline_completion(completion, TRUE);
+       gtk_entry_completion_set_inline_selection(completion, TRUE);
+       gtk_entry_completion_set_popup_single_match(completion, FALSE);
        gtk_entry_set_completion(entry, completion);
 
        return GTK_COMBO_BOX_ENTRY(combo_box);