mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-24 18:25:50 +00:00
![Mathieu Lacage](/assets/img/avatar_default.png)
2000-10-13 Mathieu Lacage <mathieu@eazel.com> * docs/state-machines.txt: new design for the state machine taking into account the new async states. * libnautilus-extensions/nautilus-bonobo-extensions.c: (nautilus_bonobo_set_icon), (oaf_activation_callback), (nautilus_bonobo_activate_from_id), (nautilus_bonobo_activate_stop), (nautilus_bonobo_activate_free): add async activation call. * libnautilus-extensions/nautilus-bonobo-extensions.h: add prototypes. * src/nautilus-view-frame.c: (nautilus_view_frame_initialize_class), (view_frame_activating), (view_frame_not_activated), (view_frame_activated), (view_frame_stop_activation), (view_frame_wait), (view_frame_underway), (view_frame_wait_is_over), (view_frame_loaded), (view_frame_failed), (nautilus_view_frame_set_to_component), (activation_callback), (nautilus_view_frame_load_client_async), (nautilus_view_frame_load_client), (nautilus_view_frame_stop_activation), (nautilus_view_frame_load_location): implement new state machine. add comments to explain by which stimulus the state-chaging functions are triggered. * src/nautilus-view-frame.h: add prototype for new async activation function of ViewFrames.
78 lines
4.3 KiB
Plaintext
78 lines
4.3 KiB
Plaintext
|
|
Proposal for the loading state machines
|
|
|
|
|
|
ViewFrame state machine
|
|
|
|
States are:
|
|
|
|
|
|
E: Empty (the initial state right after construction)
|
|
A: Activating (waiting for component to be activated)
|
|
N: No load_location request (a view component has been loaded, but no load_location request has been sent yet)
|
|
W: Waiting (waiting for a response after a load request)
|
|
U: Underway (the component has responded and the load is assumed underway)
|
|
L: Loaded (the component has finished loading successfully)
|
|
F: Failed (there was a fatal error somewhere)
|
|
|
|
X: this stimulus is guaranteed impossible in this state
|
|
|
|
|
|
Things I was unsure about:
|
|
|
|
?2: Once a load has failed at some stage, should it be OK for Nautilus
|
|
to try to make further calls of any kind?
|
|
|
|
Missing:
|
|
|
|
1) "Component stops responding" stimulus.
|
|
2) Distinction of failure loading vs. crash of the component.
|
|
|
|
Note:
|
|
|
|
A "*" means that this is illegal but non-fatal, so we want to use g_warning.
|
|
|
|
|
|
State Transition Chart
|
|
|
|
|
|
Initial State
|
|
|
|
| E | A | N | W | U | L | F |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
successful load_client call | A | X | X | X | X | X | ?2 |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
unsuccessful load_client call | F | X | X | X | X | X | ?2 |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
successful activated_component call | X | N | X | X | X | X | ?2 |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
unsuccessful activated_component call | X | F | X | X | X | X | ?2 |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
stop activation | E | E | X | X | X | X | ?2 |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
nautilus_view_frame_load_location call | X | F | W | W | W | W | ?2 |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
open_location call from component | X | X | N* | U | U | L | X |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
open_location_in_new_window | X | X | N* | U | U | L | X |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
report_location_change | X | X | N* | U | U | U | X |
|
|
S ----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
t report_selection_change | X | X | N* | U | U | L | X |
|
|
i ----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
m report_status | X | X | N* | U | U | L | X |
|
|
u ----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
l report_load_underway | X | X | N* | U | U | U | X |
|
|
u ----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
s report_load_progress | X | X | N* | U | U | U | X |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
report_load_complete | X | X | N* | L | L | L | X |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
report_load_failed | X | X | N* | F | F | F | X |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
set_title | X | X | N* | U | U | L | X |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
user hits cancel on timer dialog | X | X | X | F | X | X | X |
|
|
----------------------------------------|-----|-----|-----|-----|-----|-----|-----|
|
|
|