Update code documentation
This commit is contained in:
@@ -31,7 +31,7 @@ const _ = Gettext.gettext;
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
The Nightlighter establishes a connection with the session bus to get the
|
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
|
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.
|
if it is enabled and warns the user if that's not the case.
|
||||||
|
|||||||
+11
-9
@@ -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
|
When the extension is enabled, it asks the Themer to listen to theme changes
|
||||||
changes in the Night Light status:
|
from the user and the Nightlighter to listen to changes in the Night Light
|
||||||
- On theme changes, it asks for the new day and night variants for that
|
status:
|
||||||
theme.
|
- On theme change, it asks the Themer to guess the new day and night
|
||||||
- On Night Light activation or deactivation, it asks for the relevant
|
variants for that theme, and to apply the relevant variant depending on the
|
||||||
variant to be applied.
|
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
|
When the extension is disabled, it asks the Themer and the Nightlighter to
|
||||||
explicitely selected, stops listening to changes and cleans itself.
|
disable themselves.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var Switcher = class {
|
var Switcher = class {
|
||||||
|
|||||||
@@ -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
|
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 {
|
var Themer = class {
|
||||||
|
|||||||
Reference in New Issue
Block a user