fix: the status bar named the settings database, not the logbook

Spotted by the author: on SQLite the database chip showed a.dbPath — the
settings/profile database — under a tooltip reading "Local SQLite logbook".

Those became two separate files when the logbook was split out, so an operator
checking where their QSOs live, or which file to copy before a trip, was pointed
at the wrong one. MySQL was already right.

It now resolves the logbook the same way connectLogbook does: the active
profile's own file if it names one, then the default logbook.db, and the settings
db only in the case where it genuinely doubles as the logbook.

Also moves the 4O3A mark beside its menu label instead of the far edge of the
row, as asked.
This commit is contained in:
2026-07-29 23:53:18 +02:00
parent e3b810b4ff
commit a8990ff29d
3 changed files with 26 additions and 4 deletions
+21 -1
View File
@@ -1893,7 +1893,27 @@ func (a *App) GetDBConnectionInfo() DBConnectionInfo {
}
return DBConnectionInfo{Backend: "mysql", Label: "MySQL"}
}
return DBConnectionInfo{Backend: "sqlite", Label: a.dbPath}
// The LOGBOOK file, not the settings database.
//
// This reported a.dbPath — the settings/profile database — under a tooltip
// reading "Local SQLite logbook". The two are separate files since the logbook
// split, so an operator checking where their QSOs live, or which file to back
// up, was pointed at the wrong one.
//
// Same resolution order as connectLogbook: the active profile's own file if it
// names one, then the default logbook.db, and only if neither exists does the
// settings db genuinely serve as the logbook.
lp := ""
if p, err := a.profiles.Active(a.ctx); err == nil {
lp = strings.TrimSpace(p.DB.Path)
}
if lp == "" {
lp = a.logbookPath
}
if lp == "" {
lp = a.dbPath
}
return DBConnectionInfo{Backend: "sqlite", Label: lp}
}
// connectLogbook opens the logbook connection for a profile's DB target: a