mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: add additional notification callback
Especially on slower devices with a large dive list the startup time has become really long. This callback allows us to give the user an idea of what the app is doing during that time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a37499bccd
commit
f58bc91d8b
2 changed files with 10 additions and 0 deletions
|
@ -1642,6 +1642,15 @@ char *copy_qstring(const QString &s)
|
|||
return strdup(qPrintable(s));
|
||||
}
|
||||
|
||||
// function to call to allow the UI to show updates for longer running activities
|
||||
void (*uiNotificationCallback)(QString msg) = nullptr;
|
||||
|
||||
void uiNotification(const QString &msg)
|
||||
{
|
||||
if (uiNotificationCallback != nullptr)
|
||||
uiNotificationCallback(msg);
|
||||
}
|
||||
|
||||
// function to call to get changes for a git commit
|
||||
QString (*changesCallback)() = nullptr;
|
||||
|
||||
|
|
|
@ -85,6 +85,7 @@ QString getUserAgent();
|
|||
QString printGPSCoords(const location_t *loc);
|
||||
|
||||
extern QString (*changesCallback)();
|
||||
void uiNotification(const QString &msg);
|
||||
|
||||
#if defined __APPLE__
|
||||
#define TITLE_OR_TEXT(_t, _m) "", _t + "\n" + _m
|
||||
|
|
Loading…
Add table
Reference in a new issue