@@ -2585,27 +2585,27 @@ First, modules are imported and initialized in command line order.
25852585After successful import, `get_handlers()` is called in the following
25862586state:
25872587
2588- - the widget tree is created, but not yet realized (no toplevel
2589- `window.show()` has been executed yet)
2590- - the halcomp HAL component is set up and all HAL widget's pins have
2591- already been added to it
2592- - it is safe to add more HAL pins because `halcomp.ready()` has not yet
2588+ - The widget tree is created, but not yet realized (no toplevel
2589+ `window.show()` has been executed yet).
2590+ - The halcomp HAL component is set up and all HAL widget's pins have
2591+ already been added to it.
2592+ - It is safe to add more HAL pins because `halcomp.ready()` has not yet
25932593 been called at this point, so you may add your own pins, for instance
25942594 in the class `__init__()` method.
25952595
25962596Once all modules have been imported and method names extracted, the
25972597following steps happen:
25982598
2599- - all qualifying method names will be connected to the widget tree with
2599+ - All qualifying method names will be connected to the widget tree with
26002600 `connect_signals()/signal_autoconnect()` (depending on the type of UI
26012601 imported - GtkBuilder vs the old libglade format).
2602- - the HAL component is finalized with halcomp.ready()
2603- - if a window ID was passed as argument, the widget tree is re-parented
2602+ - The HAL component is finalized with halcomp.ready().
2603+ - If a window ID was passed as argument, the widget tree is re-parented
26042604 to run in this window, and Glade's toplevel window1 is abandoned (see
2605- FAQ)
2606- - if a HAL command file was passed with `-H halfile`, it is executed
2607- with halcmd
2608- - the Gtk main loop is run.
2605+ FAQ).
2606+ - If a HAL command file was passed with `-H halfile`, it is executed
2607+ with halcmd.
2608+ - The Gtk main loop is run.
26092609
26102610So when your handler class is initialized, all widgets are existent
26112611but not yet realized (displayed on screen). And the HAL component isn't
@@ -2659,7 +2659,7 @@ This should set debug to 2 and confirm that your module actually did it.
26592659
26602660=== Persistent variables in GladeVCP
26612661
2662- A annoying aspect of GladeVCP in its earlier form and pyvcp is the
2662+ A annoying aspect of GladeVCP in its earlier form and PyVCP is the
26632663fact that you may change values and HAL pins through text entry,
26642664sliders, spin boxes, toggle buttons etc, but their settings are not
26652665saved and restored at the next run of LinuxCNC - they start at the default
@@ -2690,11 +2690,11 @@ If you want any of Gtk widget state, HAL widgets output pin's values
26902690and/or class attributes of your handler class to be retained across
26912691invocations, proceed as follows:
26922692
2693- - import the `gladevcp.persistence` module
2694- - decide which instance attributes, and their default values you want to
2695- have retained, if any
2696- - decide which widgets should have their state retained
2697- - describe these decisions in your handler class' +__init__()+ method
2693+ - Import the `gladevcp.persistence` module.
2694+ - Decide which instance attributes, and their default values you want to
2695+ have retained, if any.
2696+ - Decide which widgets should have their state retained.
2697+ - Describe these decisions in your handler class' +__init__()+ method
26982698 through a nested dictionary as follows:
26992699
27002700[source,python]
@@ -2745,21 +2745,21 @@ ini.save_state(obj)::
27452745 Saves objs's attributes as per `IniFile.vars` dictionary and the widget
27462746 state as described in `IniFile.widgets` in `self.defaults`.
27472747ini.create_default_ini()::
2748- Create an INI file with default values
2748+ Create an INI file with default values.
27492749ini.restore_state(obj)::
27502750 Restore HAL out pins and obj's attributes as
2751- saved/initialized to default as above
2751+ saved/initialized to default as above.
27522752
27532753=== Saving the state on GladeVCP shutdown
27542754
27552755To save the widget and/or variable state on exit, proceed as follows:
27562756
2757- - select some interior widget (type is not important, for instance a
2757+ - Select some interior widget (type is not important, for instance a
27582758 table).
2759- - in the 'Signals' tab, select 'GtkObject'. It should show a 'destroy'
2759+ - In the 'Signals' tab, select 'GtkObject'. It should show a 'destroy'
27602760 signal in the first column.
2761- - add the handler name, e.g. 'on_destroy' to the second column.
2762- - add a Python handler like below:
2761+ - Add the handler name, e.g. 'on_destroy' to the second column.
2762+ - Add a Python handler like below:
27632763
27642764[source,python]
27652765----
0 commit comments