Provide a way to tell the user why the GUI is busy

Registered by battmanux

I don't like waiting... especially when I do not know why I am waiting.
As my personal patience is about 200ms, I coded this class to provide a way to report any 'blocking' action such as loading a project, importing files, or calculating a frame (when cursor is moved on h264 HD video, my laptop takes about 5s to show the new picture)

The way it works?
A class offers a declare_running_task and declare_completed_task functions. Both functions takes the task_type as argument so that multiple concurent tasks can be declared as running at the same time.
the class has a update_ui function called in order to display the status of background tasks. By default it update a button icon and change player header text.
at a fixed interval the class checks for equality between video producer and video concumer image. If not equals, we are busy decoding a frame. declare_running_task is called internally.

Note:
there is no underlaying thread, all is done in gtk event stack. Therefore, loading file actions induce a 'forced' processing of gtk pending events. I experienced gtk lock if I force processing of gtk events while 'calculating frames' task_type. I belive it is because it is called from a timer and not from a widget event...

Blueprint information

Status:
Started
Approver:
OpenShot Developers
Priority:
Low
Drafter:
battmanux
Direction:
Approved
Assignee:
battmanux
Definition:
Approved
Series goal:
Proposed for 1.4
Implementation:
Needs Code Review
Milestone target:
milestone icon 1.5.0
Started by
battmanux

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.