Skip to content

RFC: Activity feature #11826

@promag

Description

@promag

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() and IsCancelled();
  • add something like SetSource(string) (for instance SetSource("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.

dec-05-2017 02-01-28

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions