-
Notifications
You must be signed in to change notification settings - Fork 334
Open
Labels
Description
Moved from bitcoin/bitcoin#11826.
This is a RFC regarding adding a new Activity window in the UI, which allows to:
- have activity history (truncated, etc);
- pause or cancel tasks if supported individually;
- have multiple progresses concurrently.
In terms of patch, ShowProgress() signal is removed everywhere and a RAII class is added along with some UI classes:
class Activity
{
std::shared_ptr<ActivityData> const d;
public:
Activity(const std::string& title);
~Activity();
void SetTitle(const std::string& title);
void SetProgress(int progress);
};Consider this the minimal interface for an activity. Some other ideas:
- custom progress range (so the caller doesn't have to calculate percentage)
- add something like
SetPause(bool),IsPaused(); - also
Cancel()andIsCancelled(); - add something like
SetSource(string)(for instanceSetSource("wallet1")).
The current implementation is thread safe. For now, I've also added a new menu item Window where I think we could add Console too (another discussion thou).
Please see the capture below.
