Update code documentation

This commit is contained in:
Romain Vigier
2020-02-27 09:01:44 +01:00
parent d801a01bef
commit 1cb9608a3d
3 changed files with 14 additions and 11 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ const _ = Gettext.gettext;
/*
The Nightlighter establishes a connection with the session bus to get the
current Night Light status. It can also be asked to listen to status changes.
current Night Light status. It listens to changes and reports them.
As Night Light is essential for the extension to work, it continuously checks
if it is enabled and warns the user if that's not the case.
+11 -9
View File
@@ -29,17 +29,19 @@ const { Themer } = Me.imports.modules.Themer;
/*
The Switcher is the brain of the extension.
The Switcher is the orchestrator of the extension.
When the extension is enabled, it listens to theme changes from the user and
changes in the Night Light status:
- On theme changes, it asks for the new day and night variants for that
theme.
- On Night Light activation or deactivation, it asks for the relevant
variant to be applied.
When the extension is enabled, it asks the Themer to listen to theme changes
from the user and the Nightlighter to listen to changes in the Night Light
status:
- On theme change, it asks the Themer to guess the new day and night
variants for that theme, and to apply the relevant variant depending on the
Night Light status.
- On Night Light activation or deactivation, it asks the Themer to apply
the relevant variant.
When the extension is disabled, it resets the theme to the last one the user
explicitely selected, stops listening to changes and cleans itself.
When the extension is disabled, it asks the Themer and the Nightlighter to
disable themselves.
*/
var Switcher = class {
+2 -1
View File
@@ -29,7 +29,8 @@ const { Variants } = Me.imports.modules.Variants;
/*
The Themer communicates with the system to get the current theme or set a new
one. It can also be asked to listen to theme changes.
one, and get the day and night variants of a theme. It listens to theme changes
and reports them.
*/
var Themer = class {