From 9e0712d5dca9b4c772733c1de57388ba0c6bff5b Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 12 Feb 2022 14:03:18 +0100 Subject: [PATCH] core: replace dive master by dive guide In general, replace "dive master" by "dive guide". However, do not change written dive logs for now. On reading, accept both versions. Signed-off-by: Berthold Stoeger --- CHANGELOG.md | 1 + backend-shared/exportfuncs.cpp | 2 +- commands/command.cpp | 4 +-- commands/command.h | 2 +- commands/command_edit.cpp | 30 +++++++++++------------ commands/command_edit.h | 6 ++--- core/dive.c | 8 +++--- core/dive.h | 4 +-- core/filterconstraint.cpp | 2 +- core/fulltext.cpp | 2 +- core/import-divinglog.c | 2 +- core/load-git.c | 9 ++++--- core/parse-xml.c | 5 +++- core/save-git.c | 2 +- core/save-html.c | 3 ++- core/save-xml.c | 2 +- core/subsurface-qt/divelistnotifier.h | 6 ++--- core/uemis-downloader.c | 2 +- desktop-widgets/divecomponentselection.ui | 4 +-- desktop-widgets/simplewidgets.cpp | 8 +++--- desktop-widgets/tab-widgets/maintab.cpp | 28 ++++++++++----------- desktop-widgets/tab-widgets/maintab.h | 4 +-- desktop-widgets/tab-widgets/maintab.ui | 6 ++--- desktop-widgets/templatelayout.cpp | 4 ++- mobile-widgets/qml/CopySettings.qml | 6 ++--- mobile-widgets/qml/DiveDetails.qml | 8 +++--- mobile-widgets/qml/DiveDetailsEdit.qml | 18 +++++++------- mobile-widgets/qml/DiveDetailsView.qml | 6 ++--- mobile-widgets/qml/main.qml | 6 ++--- mobile-widgets/qmlmanager.cpp | 28 ++++++++++----------- mobile-widgets/qmlmanager.h | 12 ++++----- qt-models/completionmodels.cpp | 8 +++--- qt-models/completionmodels.h | 2 +- qt-models/divetripmodel.cpp | 2 +- qt-models/mobilelistmodel.cpp | 2 +- qt-models/mobilelistmodel.h | 2 +- stats/statsvariables.cpp | 12 ++++----- theme/list_lib.js | 16 ++++++------ 38 files changed, 141 insertions(+), 133 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46f66907a..c7a2c3e33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ - desktop: Don't lose cursor position in notes when switching between windows [#3369] - Uemis support: fix the ability disconnect/reconnect the Zurich when its filesystem is full +- general: rename dive master to dive guide - libdivecomputer: add support for latest BLE hardware in OSTC dive computers --- diff --git a/backend-shared/exportfuncs.cpp b/backend-shared/exportfuncs.cpp index 6afaff742..8c123b54f 100644 --- a/backend-shared/exportfuncs.cpp +++ b/backend-shared/exportfuncs.cpp @@ -204,7 +204,7 @@ void export_TeX(const char *filename, bool selected_only, bool plain, ExportCall put_format(&buf, "\\def\\%sprofilename{profile%d}\n", ssrf, dive->number); put_format(&buf, "\\def\\%scomment{%s}\n", ssrf, dive->notes ? dive->notes : ""); put_format(&buf, "\\def\\%sbuddy{%s}\n", ssrf, dive->buddy ? dive->buddy : ""); - put_format(&buf, "\\def\\%sdivemaster{%s}\n", ssrf, dive->divemaster ? dive->divemaster : ""); + put_format(&buf, "\\def\\%sdivemaster{%s}\n", ssrf, dive->diveguide ? dive->diveguide : ""); put_format(&buf, "\\def\\%ssuit{%s}\n", ssrf, dive->suit ? dive->suit : ""); // Print cylinder data diff --git a/commands/command.cpp b/commands/command.cpp index ff53db16c..b466f1156 100644 --- a/commands/command.cpp +++ b/commands/command.cpp @@ -264,9 +264,9 @@ int editBuddies(const QStringList &newList, bool currentDiveOnly) return execute_edit(new EditBuddies(newList, currentDiveOnly)); } -int editDiveMaster(const QStringList &newList, bool currentDiveOnly) +int editDiveGuide(const QStringList &newList, bool currentDiveOnly) { - return execute_edit(new EditDiveMaster(newList, currentDiveOnly)); + return execute_edit(new EditDiveGuide(newList, currentDiveOnly)); } void pasteDives(const dive *d, dive_components what) diff --git a/commands/command.h b/commands/command.h index 303915ea7..39af8e7fb 100644 --- a/commands/command.h +++ b/commands/command.h @@ -91,7 +91,7 @@ int editDiveSite(struct dive_site *newValue, bool currentDiveOnly); int editDiveSiteNew(const QString &newName, bool currentDiveOnly); int editTags(const QStringList &newList, bool currentDiveOnly); int editBuddies(const QStringList &newList, bool currentDiveOnly); -int editDiveMaster(const QStringList &newList, bool currentDiveOnly); +int editDiveGuide(const QStringList &newList, bool currentDiveOnly); void pasteDives(const dive *d, dive_components what); void replanDive(dive *d); // dive computer(s) and cylinder(s) will be reset! void editProfile(dive *d); // dive computer(s) and cylinder(s) will be reset! diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp index 32c8b889a..5b89f24d3 100644 --- a/commands/command_edit.cpp +++ b/commands/command_edit.cpp @@ -600,22 +600,22 @@ QString EditBuddies::fieldName() const return Command::Base::tr("buddies"); } -// ***** DiveMaster ***** -QStringList EditDiveMaster::data(struct dive *d) const +// ***** DiveGuide ***** +QStringList EditDiveGuide::data(struct dive *d) const { - return stringToList(d->divemaster); + return stringToList(d->diveguide); } -void EditDiveMaster::set(struct dive *d, const QStringList &v) const +void EditDiveGuide::set(struct dive *d, const QStringList &v) const { QString text = v.join(", "); - free(d->divemaster); - d->divemaster = copy_qstring(text); + free(d->diveguide); + d->diveguide = copy_qstring(text); } -QString EditDiveMaster::fieldName() const +QString EditDiveGuide::fieldName() const { - return Command::Base::tr("dive master"); + return Command::Base::tr("dive guide"); } static void swapCandQString(QString &q, char *&c) @@ -633,8 +633,8 @@ PasteState::PasteState(dive *dIn, const dive *data, dive_components what) : d(dI memset(&weightsystems, 0, sizeof(weightsystems)); if (what.notes) notes = data->notes; - if (what.divemaster) - divemaster = data->divemaster; + if (what.diveguide) + diveguide = data->diveguide; if (what.buddy) buddy = data->buddy; if (what.suit) @@ -706,8 +706,8 @@ void PasteState::swap(dive_components what) { if (what.notes) swapCandQString(notes, d->notes); - if (what.divemaster) - swapCandQString(divemaster, d->divemaster); + if (what.diveguide) + swapCandQString(diveguide, d->diveguide); if (what.buddy) swapCandQString(buddy, d->buddy); if (what.suit) @@ -767,7 +767,7 @@ void PasteDives::undo() // Send signals. DiveField fields(DiveField::NONE); fields.notes = what.notes; - fields.divemaster = what.divemaster; + fields.diveguide = what.diveguide; fields.buddy = what.buddy; fields.suit = what.suit; fields.rating = what.rating; @@ -1322,8 +1322,8 @@ EditDive::EditDive(dive *oldDiveIn, dive *newDiveIn, dive_site *createDs, dive_s changedFields |= DiveField::ATM_PRESS; if (oldDive->dive_site != newDive->dive_site) changedFields |= DiveField::DIVESITE; - if (!same_string(oldDive->divemaster, newDive->divemaster)) - changedFields |= DiveField::DIVEMASTER; + if (!same_string(oldDive->diveguide, newDive->diveguide)) + changedFields |= DiveField::DIVEGUIDE; if (!same_string(oldDive->buddy, newDive->buddy)) changedFields |= DiveField::BUDDY; if (oldDive->rating != newDive->rating) diff --git a/commands/command_edit.h b/commands/command_edit.h index 78c596b6c..0772f8d56 100644 --- a/commands/command_edit.h +++ b/commands/command_edit.h @@ -229,7 +229,7 @@ public: QString fieldName() const override; }; -// Fields that work with tag-lists (tags, buddies, divemasters) work differently and therefore +// Fields that work with tag-lists (tags, buddies, dive guides) work differently and therefore // have their own base class. In this case, it's not a template, as all these lists are base // on strings. class EditTagsBase : public EditDivesBase { @@ -276,7 +276,7 @@ public: QString fieldName() const override; }; -class EditDiveMaster : public EditTagsTemplate { +class EditDiveGuide : public EditTagsTemplate { public: using EditTagsTemplate::EditTagsTemplate; // Use constructor of base class. QStringList data(struct dive *d) const override; @@ -289,7 +289,7 @@ struct PasteState { dive *d; dive_site *divesite; QString notes; - QString divemaster; + QString diveguide; QString buddy; QString suit; int rating; diff --git a/core/dive.c b/core/dive.c index f027d6c3c..ab7be3ba3 100644 --- a/core/dive.c +++ b/core/dive.c @@ -224,7 +224,7 @@ static void free_dive_structures(struct dive *d) fulltext_unregister(d); /* free the strings */ free(d->buddy); - free(d->divemaster); + free(d->diveguide); free(d->notes); free(d->suit); /* free tags, additional dive computers, and pictures */ @@ -272,7 +272,7 @@ static void copy_dive_nodc(const struct dive *s, struct dive *d) d->full_text = NULL; invalidate_dive_cache(d); d->buddy = copy_string(s->buddy); - d->divemaster = copy_string(s->divemaster); + d->diveguide = copy_string(s->diveguide); d->notes = copy_string(s->notes); d->suit = copy_string(s->suit); copy_cylinders(&s->cylinders, &d->cylinders); @@ -319,7 +319,7 @@ void selective_copy_dive(const struct dive *s, struct dive *d, struct dive_compo if (clear) clear_dive(d); CONDITIONAL_COPY_STRING(notes); - CONDITIONAL_COPY_STRING(divemaster); + CONDITIONAL_COPY_STRING(diveguide); CONDITIONAL_COPY_STRING(buddy); CONDITIONAL_COPY_STRING(suit); if (what.rating) @@ -2616,7 +2616,7 @@ struct dive *merge_dives(const struct dive *a, const struct dive *b, int offset, *trip = get_preferred_trip(a, b); MERGE_TXT(res, a, b, notes, "\n--\n"); MERGE_TXT(res, a, b, buddy, ", "); - MERGE_TXT(res, a, b, divemaster, ", "); + MERGE_TXT(res, a, b, diveguide, ", "); MERGE_MAX(res, a, b, rating); MERGE_TXT(res, a, b, suit, ", "); MERGE_MAX(res, a, b, number); diff --git a/core/dive.h b/core/dive.h index 76a32c45a..0e4f4f84e 100644 --- a/core/dive.h +++ b/core/dive.h @@ -32,7 +32,7 @@ struct dive { timestamp_t when; struct dive_site *dive_site; char *notes; - char *divemaster, *buddy; + char *diveguide, *buddy; struct cylinder_table cylinders; struct weightsystem_table weightsystems; char *suit; @@ -78,7 +78,7 @@ extern int same_gasmix_cylinder(const cylinder_t *cyl, int cylid, const struct d struct dive_components { unsigned int divesite : 1; unsigned int notes : 1; - unsigned int divemaster : 1; + unsigned int diveguide : 1; unsigned int buddy : 1; unsigned int suit : 1; unsigned int rating : 1; diff --git a/core/filterconstraint.cpp b/core/filterconstraint.cpp index 7a8e632ca..75bfaed0a 100644 --- a/core/filterconstraint.cpp +++ b/core/filterconstraint.cpp @@ -848,7 +848,7 @@ static bool has_people(const filter_constraint &c, const struct dive *d) QStringList dive_people; for (const QString &s: QString(d->buddy).split(",", SKIP_EMPTY)) dive_people.push_back(s.trimmed()); - for (const QString &s: QString(d->divemaster).split(",", SKIP_EMPTY)) + for (const QString &s: QString(d->diveguide).split(",", SKIP_EMPTY)) dive_people.push_back(s.trimmed()); return check(c, dive_people); } diff --git a/core/fulltext.cpp b/core/fulltext.cpp index acebc36ba..d8dfd9448 100644 --- a/core/fulltext.cpp +++ b/core/fulltext.cpp @@ -120,7 +120,7 @@ static std::vector getWords(const dive *d) { std::vector res; tokenize(QString(d->notes), res); - tokenize(QString(d->divemaster), res); + tokenize(QString(d->diveguide), res); tokenize(QString(d->buddy), res); tokenize(QString(d->suit), res); for (const tag_entry *tag = d->tag_list; tag; tag = tag->next) diff --git a/core/import-divinglog.c b/core/import-divinglog.c index a961a4e40..e60be025c 100644 --- a/core/import-divinglog.c +++ b/core/import-divinglog.c @@ -296,7 +296,7 @@ static int divinglog_dive(void *param, int columns, char **data, char **column) state->cur_dive->dc.duration.seconds = atoi(data[6]) * 60; if (data[7]) - utf8_string(data[7], &state->cur_dive->divemaster); + utf8_string(data[7], &state->cur_dive->diveguide); if (data[8]) state->cur_dive->airtemp.mkelvin = C_to_mkelvin(atol(data[8])); diff --git a/core/load-git.c b/core/load-git.c index 429ff0b71..e546e2dc0 100644 --- a/core/load-git.c +++ b/core/load-git.c @@ -214,8 +214,8 @@ static void parse_dive_location(char *line, struct membuffer *str, struct git_pa free(name); } -static void parse_dive_divemaster(char *line, struct membuffer *str, struct git_parser_state *state) -{ UNUSED(line); state->active_dive->divemaster = detach_cstring(str); } +static void parse_dive_diveguide(char *line, struct membuffer *str, struct git_parser_state *state) +{ UNUSED(line); state->active_dive->diveguide = detach_cstring(str); } static void parse_dive_buddy(char *line, struct membuffer *str, struct git_parser_state *state) { UNUSED(line); state->active_dive->buddy = detach_cstring(str); } @@ -1113,8 +1113,9 @@ static void divecomputer_parser(char *line, struct membuffer *str, struct git_pa struct keyword_action dive_action[] = { #undef D #define D(x) { #x, parse_dive_ ## x } - D(airpressure), D(airtemp), D(buddy), D(chill), D(current), D(cylinder), D(divemaster), D(divesiteid), D(duration), - D(gps), D(invalid), D(location), D(notes), D(notrip), D(rating), D(suit), D(surge), + /* For historical reasons, we accept divemaster and diveguide */ + D(airpressure), D(airtemp), D(buddy), D(chill), D(current), D(cylinder), D(diveguide), { "divemaster", parse_dive_diveguide }, + D(divesiteid), D(duration), D(gps), D(invalid), D(location), D(notes), D(notrip), D(rating), D(suit), D(surge), D(tags), D(visibility), D(watersalinity), D(watertemp), D(wavesize), D(weightsystem) }; diff --git a/core/parse-xml.c b/core/parse-xml.c index 8f823f653..94e059862 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -1322,7 +1322,10 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf, str return; if (MATCH("notes", utf8_string, &dive->notes)) return; - if (MATCH("divemaster", utf8_string, &dive->divemaster)) + // For historic reasons, we accept dive guide as well as dive master + if (MATCH("diveguide", utf8_string, &dive->diveguide)) + return; + if (MATCH("divemaster", utf8_string, &dive->diveguide)) return; if (MATCH("buddy", utf8_string, &dive->buddy)) return; diff --git a/core/save-git.c b/core/save-git.c index 4d536ee5e..5963d48ce 100644 --- a/core/save-git.c +++ b/core/save-git.c @@ -97,7 +97,7 @@ static void show_utf8(struct membuffer *b, const char *prefix, const char *value static void save_overview(struct membuffer *b, struct dive *dive) { - show_utf8(b, "divemaster ", dive->divemaster, "\n"); + show_utf8(b, "divemaster ", dive->diveguide, "\n"); show_utf8(b, "buddy ", dive->buddy, "\n"); show_utf8(b, "suit ", dive->suit, "\n"); show_utf8(b, "notes ", dive->notes, "\n"); diff --git a/core/save-html.c b/core/save-html.c index eeab875b9..80aa1f0bd 100644 --- a/core/save-html.c +++ b/core/save-html.c @@ -370,7 +370,7 @@ static void write_one_dive(struct membuffer *b, struct dive *dive, const char *p put_HTML_watertemp(b, dive, "\"water\":\"", "\""); put_string(b, " },"); write_attribute(b, "buddy", dive->buddy, ", "); - write_attribute(b, "divemaster", dive->divemaster, ", "); + write_attribute(b, "divemaster", dive->diveguide, ", "); write_attribute(b, "suit", dive->suit, ", "); put_HTML_tags(b, dive, "\"tags\":", ","); if (!list_only) { @@ -528,6 +528,7 @@ void export_translation(const char *file_name) write_attribute(b, "Surge", translate("gettextFromC", "Surge"), ", "); write_attribute(b, "Chill", translate("gettextFromC", "Chill"), ", "); write_attribute(b, "Duration", translate("gettextFromC", "Duration"), ", "); + write_attribute(b, "DiveGuide", translate("gettextFromC", "Diveguide"), ", "); write_attribute(b, "DiveMaster", translate("gettextFromC", "Divemaster"), ", "); write_attribute(b, "Buddy", translate("gettextFromC", "Buddy"), ", "); write_attribute(b, "Suit", translate("gettextFromC", "Suit"), ", "); diff --git a/core/save-xml.c b/core/save-xml.c index e2ffb7e7f..ebd1ceedf 100644 --- a/core/save-xml.c +++ b/core/save-xml.c @@ -162,7 +162,7 @@ static void save_salinity(struct membuffer *b, struct divecomputer *dc) static void save_overview(struct membuffer *b, struct dive *dive, bool anonymize) { - show_utf8_blanked(b, dive->divemaster, " ", "\n", 0, anonymize); + show_utf8_blanked(b, dive->diveguide, " ", "\n", 0, anonymize); show_utf8_blanked(b, dive->buddy, " ", "\n", 0, anonymize); show_utf8_blanked(b, dive->notes, " ", "\n", 0, anonymize); show_utf8_blanked(b, dive->suit, " ", "\n", 0, anonymize); diff --git a/core/subsurface-qt/divelistnotifier.h b/core/subsurface-qt/divelistnotifier.h index a778f7d91..f8c814440 100644 --- a/core/subsurface-qt/divelistnotifier.h +++ b/core/subsurface-qt/divelistnotifier.h @@ -25,7 +25,7 @@ struct DiveField { unsigned int water_temp : 1; unsigned int atm_press : 1; unsigned int divesite : 1; - unsigned int divemaster : 1; + unsigned int diveguide : 1; unsigned int buddy : 1; unsigned int rating : 1; unsigned int visibility : 1; @@ -49,7 +49,7 @@ struct DiveField { WATER_TEMP = 1 << 5, ATM_PRESS = 1 << 6, DIVESITE = 1 << 7, - DIVEMASTER = 1 << 8, + DIVEGUIDE = 1 << 8, BUDDY = 1 << 9, RATING = 1 << 10, VISIBILITY = 1 << 11, @@ -159,7 +159,7 @@ inline DiveField::DiveField(int flags) : water_temp((flags & WATER_TEMP) != 0), atm_press((flags & ATM_PRESS) != 0), divesite((flags & DIVESITE) != 0), - divemaster((flags & DIVEMASTER) != 0), + diveguide((flags & DIVEGUIDE) != 0), buddy((flags & BUDDY) != 0), rating((flags & RATING) != 0), visibility((flags & VISIBILITY) != 0), diff --git a/core/uemis-downloader.c b/core/uemis-downloader.c index 431034e43..68d6e93a3 100644 --- a/core/uemis-downloader.c +++ b/core/uemis-downloader.c @@ -860,7 +860,7 @@ static bool uemis_delete_dive(device_data_t *devdata, uint32_t diveid) free(dive->dc.sample); free((void *)dive->notes); - free((void *)dive->divemaster); + free((void *)dive->diveguide); free((void *)dive->buddy); free((void *)dive->suit); taglist_free(dive->tag_list); diff --git a/desktop-widgets/divecomponentselection.ui b/desktop-widgets/divecomponentselection.ui index 16b4d1589..be4848613 100644 --- a/desktop-widgets/divecomponentselection.ui +++ b/desktop-widgets/divecomponentselection.ui @@ -117,9 +117,9 @@ - + - Divemaster + Dive guide diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index d654ccac0..ddfb331fc 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -305,7 +305,7 @@ DiveComponentSelection::DiveComponentSelection(QWidget *parent, struct dive *tar ui.setupUi(this); what = _what; UI_FROM_COMPONENT(divesite); - UI_FROM_COMPONENT(divemaster); + UI_FROM_COMPONENT(diveguide); UI_FROM_COMPONENT(buddy); UI_FROM_COMPONENT(rating); UI_FROM_COMPONENT(visibility); @@ -327,7 +327,7 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button) { if (current_dive && ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) { COMPONENT_FROM_UI(divesite); - COMPONENT_FROM_UI(divemaster); + COMPONENT_FROM_UI(diveguide); COMPONENT_FROM_UI(buddy); COMPONENT_FROM_UI(rating); COMPONENT_FROM_UI(visibility); @@ -345,8 +345,8 @@ void DiveComponentSelection::buttonClicked(QAbstractButton *button) text.setString(&cliptext); if (what->divesite && current_dive->dive_site) text << tr("Dive site: ") << current_dive->dive_site->name << "\n"; - if (what->divemaster) - text << tr("Dive master: ") << current_dive->divemaster << "\n"; + if (what->diveguide) + text << tr("Dive guide: ") << current_dive->diveguide << "\n"; if (what->buddy) text << tr("Buddy: ") << current_dive->buddy << "\n"; if (what->rating) diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 06f44b7ef..3f45bf5f6 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -38,7 +38,7 @@ #include struct Completers { - QCompleter *divemaster; + QCompleter *diveguide; QCompleter *buddy; QCompleter *tags; }; @@ -129,13 +129,13 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), Completers completers; completers.buddy = new QCompleter(&buddyModel, ui.buddy); - completers.divemaster = new QCompleter(&diveMasterModel, ui.divemaster); + completers.diveguide = new QCompleter(&diveGuideModel, ui.diveguide); completers.tags = new QCompleter(&tagModel, ui.tagWidget); completers.buddy->setCaseSensitivity(Qt::CaseInsensitive); - completers.divemaster->setCaseSensitivity(Qt::CaseInsensitive); + completers.diveguide->setCaseSensitivity(Qt::CaseInsensitive); completers.tags->setCaseSensitivity(Qt::CaseInsensitive); ui.buddy->setCompleter(completers.buddy); - ui.divemaster->setCompleter(completers.divemaster); + ui.diveguide->setCompleter(completers.diveguide); ui.tagWidget->setCompleter(completers.tags); ui.diveNotesMessage->hide(); ui.multiDiveWarningMessage->hide(); @@ -260,8 +260,8 @@ void MainTab::divesChanged(const QVector &dives, DiveField field) ui.tagWidget->setText(get_taglist_string(current_dive->tag_list)); if (field.buddy) ui.buddy->setText(current_dive->buddy); - if (field.divemaster) - ui.divemaster->setText(current_dive->divemaster); + if (field.diveguide) + ui.diveguide->setText(current_dive->diveguide); // If duration or depth changed, the profile needs to be replotted if (field.duration || field.depth) @@ -384,8 +384,8 @@ void MainTab::updateDiveInfo() ui.tabWidget->setCurrentIndex(lastTabSelectedDiveTrip); lastSelectedDive = false; // only use trip relevant fields - ui.divemaster->setVisible(false); - ui.DivemasterLabel->setVisible(false); + ui.diveguide->setVisible(false); + ui.DiveguideLabel->setVisible(false); ui.buddy->setVisible(false); ui.BuddyLabel->setVisible(false); ui.rating->setVisible(false); @@ -426,12 +426,12 @@ void MainTab::updateDiveInfo() ui.location->show(); ui.locationPopupButton->show(); ui.editDiveSiteButton->show(); - ui.divemaster->setVisible(true); + ui.diveguide->setVisible(true); ui.buddy->setVisible(true); ui.rating->setVisible(true); ui.RatingLabel->setVisible(true); ui.BuddyLabel->setVisible(true); - ui.DivemasterLabel->setVisible(true); + ui.DiveguideLabel->setVisible(true); ui.TagLabel->setVisible(true); ui.tagWidget->setVisible(true); ui.dateEdit->setReadOnly(false); @@ -452,7 +452,7 @@ void MainTab::updateDiveInfo() updateNotes(current_dive); updateDiveSite(current_dive); updateDateTime(current_dive); - ui.divemaster->setText(current_dive->divemaster); + ui.diveguide->setText(current_dive->diveguide); ui.buddy->setText(current_dive->buddy); } ui.duration->setText(render_seconds_to_string(current_dive->duration.seconds)); @@ -467,7 +467,7 @@ void MainTab::updateDiveInfo() clearTabs(); ui.rating->setCurrentStars(0); ui.location->clear(); - ui.divemaster->clear(); + ui.diveguide->clear(); ui.buddy->clear(); ui.notes->clear(); /* set date and time to minimums which triggers showing the special value text */ @@ -558,12 +558,12 @@ void MainTab::on_buddy_editingFinished() divesEdited(Command::editBuddies(stringToList(ui.buddy->toPlainText()), false)); } -void MainTab::on_divemaster_editingFinished() +void MainTab::on_diveguide_editingFinished() { if (ignoreInput || !current_dive) return; - divesEdited(Command::editDiveMaster(stringToList(ui.divemaster->toPlainText()), false)); + divesEdited(Command::editDiveGuide(stringToList(ui.diveguide->toPlainText()), false)); } void MainTab::on_duration_editingFinished() diff --git a/desktop-widgets/tab-widgets/maintab.h b/desktop-widgets/tab-widgets/maintab.h index 4227c9cb0..96519e2e1 100644 --- a/desktop-widgets/tab-widgets/maintab.h +++ b/desktop-widgets/tab-widgets/maintab.h @@ -44,7 +44,7 @@ slots: void rejectChanges(); void on_location_diveSiteSelected(); void on_locationPopupButton_clicked(); - void on_divemaster_editingFinished(); + void on_diveguide_editingFinished(); void on_buddy_editingFinished(); void on_diveTripLocation_editingFinished(); void on_notes_editingFinished(); @@ -67,7 +67,7 @@ private: bool editMode; bool ignoreInput; // When computionally editing fields, we have to ignore changed-signals BuddyCompletionModel buddyModel; - DiveMasterCompletionModel diveMasterModel; + DiveGuideCompletionModel diveGuideModel; TagCompletionModel tagModel; bool lastSelectedDive; int lastTabSelectedDive; diff --git a/desktop-widgets/tab-widgets/maintab.ui b/desktop-widgets/tab-widgets/maintab.ui index aa8371dad..f9c13ad66 100644 --- a/desktop-widgets/tab-widgets/maintab.ui +++ b/desktop-widgets/tab-widgets/maintab.ui @@ -314,9 +314,9 @@ 0 - + - Divemaster + Dive guide true @@ -340,7 +340,7 @@ - + false diff --git a/desktop-widgets/templatelayout.cpp b/desktop-widgets/templatelayout.cpp index 7b0359cab..56865f7a8 100644 --- a/desktop-widgets/templatelayout.cpp +++ b/desktop-widgets/templatelayout.cpp @@ -542,7 +542,9 @@ QVariant TemplateLayout::getValue(QString list, QString property, const State &s } else if (property == "depth") { return get_depth_string(d->dc.maxdepth.mm, true, true); } else if (property == "divemaster") { - return d->divemaster; + return d->diveguide; + } else if (property == "diveguide") { + return d->diveguide; } else if (property == "buddy") { return d->buddy; } else if (property == "airTemp") { diff --git a/mobile-widgets/qml/CopySettings.qml b/mobile-widgets/qml/CopySettings.qml index 172a0173c..17bf8dbf0 100644 --- a/mobile-widgets/qml/CopySettings.qml +++ b/mobile-widgets/qml/CopySettings.qml @@ -57,15 +57,15 @@ Kirigami.ScrollablePage { } } Controls.Label { - text: qsTr("Dive master") + text: qsTr("Dive guide") font.pointSize: subsurfaceTheme.regularPointSize Layout.preferredWidth: gridWidth * 0.75 } SsrfSwitch { - checked: manager.toggleDiveMaster(false) + checked: manager.toggleDiveGuide(false) Layout.preferredWidth: gridWidth * 0.25 onClicked: { - manager.toggleDiveMaster(true) + manager.toggleDiveGuide(true) } } Controls.Label { diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index 8debd6c49..02da590fb 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -19,9 +19,9 @@ Kirigami.Page { property alias buddyIndex: detailsEdit.buddyIndex property alias buddyText: detailsEdit.buddyText property alias buddyModel: detailsEdit.buddyModel - property alias divemasterIndex: detailsEdit.divemasterIndex - property alias divemasterText: detailsEdit.divemasterText - property alias divemasterModel: detailsEdit.divemasterModel + property alias diveguideIndex: detailsEdit.diveguideIndex + property alias diveguideText: detailsEdit.diveguideText + property alias diveguideModel: detailsEdit.diveguideModel property alias tagText: detailsEdit.tagText property alias depth: detailsEdit.depthText property alias duration: detailsEdit.durationText @@ -351,7 +351,7 @@ Kirigami.Page { watertemp = modelData.waterTemp suitIndex = manager.suitList.indexOf(modelData.suit) buddyText = modelData.buddy; - divemasterText = modelData.diveMaster + diveguideText = modelData.diveGuide tagText = modelData.tags notes = modelData.notes if (modelData.singleWeight) { diff --git a/mobile-widgets/qml/DiveDetailsEdit.qml b/mobile-widgets/qml/DiveDetailsEdit.qml index d69247da4..4c9c1f8eb 100644 --- a/mobile-widgets/qml/DiveDetailsEdit.qml +++ b/mobile-widgets/qml/DiveDetailsEdit.qml @@ -20,8 +20,8 @@ Item { property alias suitText: suitBox.editText property alias buddyIndex: buddyBox.currentIndex property alias buddyText: buddyBox.editText - property alias divemasterIndex: divemasterBox.currentIndex - property alias divemasterText: divemasterBox.editText + property alias diveguideIndex: diveguideBox.currentIndex + property alias diveguideText: diveguideBox.editText property alias tagText: txtTag.text property alias cylinderIndex0: cylinderBox0.currentIndex property alias cylinderIndex1: cylinderBox1.currentIndex @@ -36,7 +36,7 @@ Item { property var endpressure: [] property var startpressure: [] property alias suitModel: suitBox.model - property alias divemasterModel: divemasterBox.model + property alias diveguideModel: diveguideBox.model property alias buddyModel: buddyBox.model property alias cylinderModel0: cylinderBox0.model property alias cylinderModel1: cylinderBox1.model @@ -64,11 +64,11 @@ Item { detailsEdit.depthText = "" detailsEdit.airtempText = "" detailsEdit.watertempText = "" - detailsEdit.divemasterText = "" + detailsEdit.diveguideText = "" detailsEdit.buddyText = "" suitBox.currentIndex = -1 buddyBox.currentIndex = -1 - divemasterBox.currentIndex = -1 + diveguideBox.currentIndex = -1 cylinderBox0.currentIndex = -1 cylinderBox1.currentIndex = -1 cylinderBox2.currentIndex = -1 @@ -118,7 +118,7 @@ Item { // apply the changes to the dive_table manager.commitChanges(dive_id, detailsEdit.number, detailsEdit.dateText, locationBox.editText, detailsEdit.gpsText, detailsEdit.durationText, detailsEdit.depthText, detailsEdit.airtempText, detailsEdit.watertempText, - suitBox.editText, buddyBox.editText, divemasterBox.editText, detailsEdit.tagText, + suitBox.editText, buddyBox.editText, diveguideBox.editText, detailsEdit.tagText, detailsEdit.weightText, detailsEdit.notesText, startpressure, endpressure, usedGas, usedCyl, detailsEdit.rating, @@ -296,13 +296,13 @@ Item { TemplateLabelSmall { Layout.preferredWidth: Kirigami.Units.gridUnit * 4 horizontalAlignment: Text.AlignRight - text: qsTr("Divemaster:") + text: qsTr("Dive guide:") } TemplateEditComboBox { - id: divemasterBox + id: diveguideBox flickable: detailsEditFlickable model: diveDetailsListView.currentItem && diveDetailsListView.currentItem.modelData !== null ? - manager.divemasterList : null + manager.diveguideList : null } } RowLayout { diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml index 3c726944a..3b5666b4e 100644 --- a/mobile-widgets/qml/DiveDetailsView.qml +++ b/mobile-widgets/qml/DiveDetailsView.qml @@ -481,7 +481,7 @@ Item { // fifth row //----------- TemplateLabelSmall { - text: qsTr("Divemaster:") + text: qsTr("Dive guide:") opacity: 0.6 wrapMode: Text.WrapAtWordBoundaryOrAnywhere Layout.maximumWidth: detailsView.col1Width @@ -501,8 +501,8 @@ Item { // sixth row //----------- TemplateLabelSmall { - id: txtDiveMaster - text: diveMaster + id: txtDiveGuide + text: diveGuide wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere Layout.maximumWidth: detailsView.col1Width color: subsurfaceTheme.textColor diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 917bc1652..40b397ce1 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -157,9 +157,9 @@ Kirigami.ApplicationWindow { detailsWindow.buddyIndex = -1 detailsWindow.buddyText = "" detailsWindow.depth = "" - detailsWindow.divemasterModel = manager.divemasterList - detailsWindow.divemasterIndex = -1 - detailsWindow.divemasterText = "" + detailsWindow.diveguideModel = manager.diveguideList + detailsWindow.diveguideIndex = -1 + detailsWindow.diveguideText = "" detailsWindow.notes = "" detailsWindow.location = "" detailsWindow.gps = "" diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index a0ae9770e..c85aa0965 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -306,7 +306,7 @@ QMLManager::QMLManager() : // Let's set some defaults to be copied so users don't necessarily need // to know how to configure this - what.divemaster = true; + what.diveguide = true; what.buddy = true; what.suit = true; what.tags = true; @@ -458,7 +458,7 @@ void QMLManager::updateAllGlobalLists() { emit buddyListChanged(); emit suitListChanged(); - emit divemasterListChanged(); + emit diveguideListChanged(); // TODO: It would be nice if we could export the list of locations via model/view instead of a Q_PROPERTY emit locationListChanged(); } @@ -1062,7 +1062,7 @@ bool QMLManager::checkDepth(dive *d, QString depth) // update the dive and return the notes field, stripped of the HTML junk void QMLManager::commitChanges(QString diveId, QString number, QString date, QString location, QString gps, QString duration, QString depth, - QString airtemp, QString watertemp, QString suit, QString buddy, QString diveMaster, QString tags, QString weight, QString notes, + QString airtemp, QString watertemp, QString suit, QString buddy, QString diveGuide, QString tags, QString weight, QString notes, QStringList startpressure, QStringList endpressure, QStringList gasmix, QStringList usedCylinder, int rating, int visibility, QString state) { struct dive *orig = get_dive_by_uniq_id(diveId.toInt()); @@ -1083,7 +1083,7 @@ void QMLManager::commitChanges(QString diveId, QString number, QString date, QSt QStringLiteral("watertmp:'%1'\n").arg(watertemp) << QStringLiteral("suit :'%1'\n").arg(suit) << QStringLiteral("buddy :'%1'\n").arg(buddy) << - QStringLiteral("diveMstr:'%1'\n").arg(diveMaster) << + QStringLiteral("diveGde :'%1'\n").arg(diveGuide) << QStringLiteral("tags :'%1'\n").arg(tags) << QStringLiteral("weight :'%1'\n").arg(weight) << QStringLiteral("state :'%1'\n").arg(state); @@ -1212,13 +1212,13 @@ void QMLManager::commitChanges(QString diveId, QString number, QString date, QSt free(d->buddy); d->buddy = copy_qstring(buddy); } - if (d->divemaster != diveMaster) { - if (diveMaster.contains(",")){ - diveMaster = diveMaster.replace(QRegularExpression("\\s*,\\s*"), ", "); + if (d->diveguide != diveGuide) { + if (diveGuide.contains(",")){ + diveGuide = diveGuide.replace(QRegularExpression("\\s*,\\s*"), ", "); } diveChanged = true; - free(d->divemaster); - d->divemaster = copy_qstring(diveMaster); + free(d->diveguide); + d->diveguide = copy_qstring(diveGuide); } // normalize the tag list we have and the one we get from the UI // try hard to deal with accidental white space issues @@ -1523,12 +1523,12 @@ bool QMLManager::toggleNotes(bool toggle) return what.notes; } -bool QMLManager::toggleDiveMaster(bool toggle) +bool QMLManager::toggleDiveGuide(bool toggle) { if (toggle) - what.divemaster = what.divemaster ? false : true; + what.diveguide = what.diveguide ? false : true; - return what.divemaster; + return what.diveguide; } bool QMLManager::toggleBuddy(bool toggle) @@ -1764,9 +1764,9 @@ QStringList QMLManager::buddyList() const return buddyModel.stringList(); } -QStringList QMLManager::divemasterList() const +QStringList QMLManager::diveguideList() const { - return divemasterModel.stringList(); + return diveguideModel.stringList(); } QStringList QMLManager::locationList() const diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index e43c666ec..7e77aa3ae 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -32,7 +32,7 @@ class QMLManager : public QObject { Q_PROPERTY(QString notificationText MEMBER m_notificationText WRITE setNotificationText NOTIFY notificationTextChanged) Q_PROPERTY(QStringList suitList READ suitList NOTIFY suitListChanged) Q_PROPERTY(QStringList buddyList READ buddyList NOTIFY buddyListChanged) - Q_PROPERTY(QStringList divemasterList READ divemasterList NOTIFY divemasterListChanged) + Q_PROPERTY(QStringList diveguideList READ diveguideList NOTIFY diveguideListChanged) Q_PROPERTY(QStringList locationList READ locationList NOTIFY locationListChanged) Q_PROPERTY(QStringList cylinderListInit READ cylinderListInit CONSTANT) Q_PROPERTY(QStringList defaultCylinderListInit READ defaultCylinderListInit CONSTANT) @@ -144,7 +144,7 @@ public: QStringList suitList() const; QStringList buddyList() const; - QStringList divemasterList() const; + QStringList diveguideList() const; QStringList locationList() const; QStringList cylinderListInit() const; QStringList defaultCylinderListInit() const; @@ -169,7 +169,7 @@ public slots: void commitChanges(QString diveId, QString number, QString date, QString location, QString gps, QString duration, QString depth, QString airtemp, QString watertemp, QString suit, QString buddy, - QString diveMaster, QString tags, QString weight, QString notes, QStringList startpressure, + QString diveGuide, QString tags, QString weight, QString notes, QStringList startpressure, QStringList endpressure, QStringList gasmix, QStringList usedCylinder, int rating, int visibility, QString state); void updateTripDetails(QString tripIdString, QString tripLocation, QString tripNotes); void removeDiveFromTrip(int id); @@ -185,7 +185,7 @@ public slots: void pasteDiveData(int id); bool toggleDiveSite(bool toggle); bool toggleNotes(bool toggle); - bool toggleDiveMaster(bool toggle); + bool toggleDiveGuide(bool toggle); bool toggleBuddy(bool toggle); bool toggleSuit(bool toggle); bool toggleRating(bool toggle); @@ -223,7 +223,7 @@ public slots: private: BuddyCompletionModel buddyModel; SuitCompletionModel suitModel; - DiveMasterCompletionModel divemasterModel; + DiveGuideCompletionModel diveguideModel; DiveSiteSortedModel locationModel; QString m_startPageText; QString m_lastError; @@ -280,7 +280,7 @@ signals: void btEnabledChanged(); void suitListChanged(); void buddyListChanged(); - void divemasterListChanged(); + void diveguideListChanged(); void locationListChanged(); void cloudCacheListChanged(); void waitingForPositionChanged(); diff --git a/qt-models/completionmodels.cpp b/qt-models/completionmodels.cpp index b3d633c40..74adc28d0 100644 --- a/qt-models/completionmodels.cpp +++ b/qt-models/completionmodels.cpp @@ -53,14 +53,14 @@ bool BuddyCompletionModel::relevantDiveField(const DiveField &f) return f.buddy; } -QStringList DiveMasterCompletionModel::getStrings() +QStringList DiveGuideCompletionModel::getStrings() { - return getCSVList(&dive::divemaster); + return getCSVList(&dive::diveguide); } -bool DiveMasterCompletionModel::relevantDiveField(const DiveField &f) +bool DiveGuideCompletionModel::relevantDiveField(const DiveField &f) { - return f.divemaster; + return f.diveguide; } QStringList SuitCompletionModel::getStrings() diff --git a/qt-models/completionmodels.h b/qt-models/completionmodels.h index 6d271c348..b2e9b294f 100644 --- a/qt-models/completionmodels.h +++ b/qt-models/completionmodels.h @@ -26,7 +26,7 @@ private: bool relevantDiveField(const DiveField &f) override; }; -class DiveMasterCompletionModel final : public CompletionModelBase { +class DiveGuideCompletionModel final : public CompletionModelBase { Q_OBJECT private: QStringList getStrings() override; diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index af0e232d4..831d9e4aa 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -234,7 +234,7 @@ QVariant DiveTripModelBase::diveData(const struct dive *d, int column, int role) case MobileListModel::WaterTempRole: return get_temperature_string(d->watertemp, true); case MobileListModel::SacRole: return formatSac(d); case MobileListModel::SumWeightRole: return formatSumWeight(d); - case MobileListModel::DiveMasterRole: return d->divemaster; + case MobileListModel::DiveGuideRole: return d->diveguide; case MobileListModel::BuddyRole: return d->buddy; case MobileListModel::TagsRole: return get_taglist_string(d->tag_list); case MobileListModel::NotesRole: return formatNotes(d); diff --git a/qt-models/mobilelistmodel.cpp b/qt-models/mobilelistmodel.cpp index 49e8f4641..493dbd9e9 100644 --- a/qt-models/mobilelistmodel.cpp +++ b/qt-models/mobilelistmodel.cpp @@ -31,7 +31,7 @@ QHash MobileListModelBase::roleNames() const roles[WaterTempRole] = "waterTemp"; roles[SacRole] = "sac"; roles[SumWeightRole] = "sumWeight"; - roles[DiveMasterRole] = "diveMaster"; + roles[DiveGuideRole] = "diveGuide"; roles[BuddyRole] = "buddy"; roles[TagsRole] = "tags"; roles[NotesRole]= "notes"; diff --git a/qt-models/mobilelistmodel.h b/qt-models/mobilelistmodel.h index 5c03a02a7..bd62cc413 100644 --- a/qt-models/mobilelistmodel.h +++ b/qt-models/mobilelistmodel.h @@ -39,7 +39,7 @@ public: WaterTempRole, SacRole, SumWeightRole, - DiveMasterRole, + DiveGuideRole, BuddyRole, TagsRole, NotesRole, diff --git a/stats/statsvariables.cpp b/stats/statsvariables.cpp index 1949a11c7..8855b003f 100644 --- a/stats/statsvariables.cpp +++ b/stats/statsvariables.cpp @@ -1429,7 +1429,7 @@ struct PeopleBinner : public StringBinner { std::vector dive_people; for (const QString &s: QString(d->buddy).split(",", SKIP_EMPTY)) dive_people.push_back(s.trimmed()); - for (const QString &s: QString(d->divemaster).split(",", SKIP_EMPTY)) + for (const QString &s: QString(d->diveguide).split(",", SKIP_EMPTY)) dive_people.push_back(s.trimmed()); return dive_people; } @@ -1442,10 +1442,10 @@ struct PeopleVariable : public StatsVariableTemplatebuddy).trimmed(); - QString divemaster = QString(d->divemaster).trimmed(); - if (!buddy.isEmpty() && !divemaster.isEmpty()) + QString diveguide = QString(d->diveguide).trimmed(); + if (!buddy.isEmpty() && !diveguide.isEmpty()) buddy += ", "; - return buddy + divemaster; + return buddy + diveguide; } std::vector binners() const override { return { &people_binner }; @@ -1477,7 +1477,7 @@ struct BuddyVariable : public StatsVariableTemplate { std::vector to_bin_values(const dive *d) const { std::vector dive_guides; - for (const QString &s: QString(d->divemaster).split(",", SKIP_EMPTY)) + for (const QString &s: QString(d->diveguide).split(",", SKIP_EMPTY)) dive_guides.push_back(s.trimmed()); return dive_guides; } @@ -1489,7 +1489,7 @@ struct DiveGuideVariable : public StatsVariableTemplatedivemaster).trimmed(); + return QString(d->diveguide).trimmed(); } std::vector binners() const override { return { &dive_guide_binner }; diff --git a/theme/list_lib.js b/theme/list_lib.js index 4761e2bb5..ecb1f93f5 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -223,13 +223,13 @@ function getExpanded(dive) { var res = '
' + translate.Date + ': ' + dive.date + '     ' + translate.Time + ': ' + dive.time + - '     ' + translate.Location + ': ' + '' + dive.location + '' + getDiveCoor(dive) + + '     ' + translate.Location + ': ' + '' + dive.location + '' + getDiveCoor(dive) + '
' + '
' + translate.Air_Temp + ': ' + dive.temperature.air + '    ' + translate.Water_Temp + ': ' + dive.temperature.water + '    ' + translate.Rating + ':' + putRating(dive.rating) + '
' + translate.Max_Depth + ': ' + put_depth_unit(dive.maxdepth) + " " + depth_unit + '
' + translate.Duration + ': ' + dive.dive_duration + - '
' + translate.DiveMaster + ': ' + dive.divemaster + + '
' + translate.DiveGuide + ': ' + dive.diveguide + '

' + translate.Buddy + ':

' + dive.buddy + '
' + translate.Suit + ': ' + dive.suit + '
' + translate.Tags + ': ' + putTags(dive.tags) + @@ -244,7 +244,7 @@ function putTags(tags) { var result = ""; for (var i in tags) { - result += '' + tags[i] + ''; + result += '' + tags[i] + ''; if (i < tags.length - 1) result += ', '; } @@ -556,7 +556,7 @@ function SearchModules(searchfor, searchOptions) if (searchOptions === null) { searchOptions = {}; searchOptions.location = searchingModules["location"].enabled; - searchOptions.divemaster = searchingModules["divemaster"].enabled; + searchOptions.diveguide = searchingModules["diveguide"].enabled; searchOptions.buddy = searchingModules["buddy"].enabled; searchOptions.notes = searchingModules["notes"].enabled; searchOptions.tags = searchingModules["tags"].enabled; @@ -568,8 +568,8 @@ function SearchModules(searchfor, searchOptions) if (searchOptions.location === true) keywordResult.Union(searchingModules["location"].search(keywords[i])); - if (searchOptions.divemaster === true) - keywordResult.Union(searchingModules["divemaster"].search(keywords[i])); + if (searchOptions.diveguide === true) + keywordResult.Union(searchingModules["diveguide"].search(keywords[i])); if (searchOptions.buddy === true) keywordResult.Union(searchingModules["buddy"].search(keywords[i])); @@ -965,7 +965,7 @@ function get_dive_HTML(dive) { var table1 = '

' + translate.Dive_information + '

' + getDiveCoor(dive) + + '' + getDiveCoor(dive) + '
' + translate.Date + ': ' + dive.date + '     ' + translate.Time + ': ' + dive.time + - '     ' + translate.Location + ': ' + '' + dive.location + '     ' + translate.Location + ': ' + '' + dive.location + '
'; var table2 = ''; if (dive.wavesize > 0) @@ -982,7 +982,7 @@ function get_dive_HTML(dive) var table3 = '
' + translate.Rating + ':' + putRating(dive.rating) + '
' + translate.Air_Temp + ': ' + dive.temperature.air + '    ' + translate.Water_Temp + ': ' + dive.temperature.water + '
' + translate.Max_Depth + ': ' + put_depth_unit(dive.maxdepth) + " " + depth_unit + '
' + translate.Duration + ': ' + dive.dive_duration + - '
' + translate.DiveMaster + ': ' + dive.divemaster + + '
' + translate.DiveGuide + ': ' + dive.diveguide + '

' + translate.Buddy + ':

' + dive.buddy + '
' + translate.Suit + ': ' + dive.suit + '
' + translate.Tags + ': ' + putTags(dive.tags) +