mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
889827aadb
commit
9e0712d5dc
38 changed files with 141 additions and 133 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue