opt.hidden and opt.disabled is replaced by opt.properties

This commit is contained in:
gwen 2012-08-13 12:57:18 +02:00
parent 753b0a55c7
commit 7006091c9c
3 changed files with 10 additions and 20 deletions

View File

@ -60,6 +60,11 @@ glossary
always know who has modified it. It's the owner of the option, see always know who has modified it. It's the owner of the option, see
:doc:`status` for more details. :doc:`status` for more details.
**option with properties**
an option wich has property like 'hidden' or 'disabled' is an option
wich has restricted acces rules
**hidden option** **hidden option**
a hidden option has a different behaviour on regards to the access a hidden option has a different behaviour on regards to the access

View File

@ -58,7 +58,7 @@ Restricted access to an `Option()`
----------------------------------- -----------------------------------
Configuration options access statuses are defined at configuration level Configuration options access statuses are defined at configuration level
that corresponds to theses :api:`option.Option()`'s attribute: that corresponds to the :api:`option.Option()`'s `properties` attribute.
**hidden** **hidden**
@ -92,21 +92,6 @@ corresponding convenience API provided:
`enable()`: `enable()`:
set the `disabled` attribute to `False` set the `disabled` attribute to `False`
..
mode
a mode is `normal` or `expert`, just a category of `Option()` or
group wich determines if an option is easy to choose or not,
available methods are:
`get_mode()`:
returns the current mode
`set_mode(mode)`:
sets a new mode
see it in :api:`option.ModeBaseType`
Value owners Value owners
------------- -------------

View File

@ -435,16 +435,16 @@ class Config(object):
# hung up on freeze, hidden and disabled concepts # hung up on freeze, hidden and disabled concepts
self.cfgimpl_freeze() self.cfgimpl_freeze()
rootconfig = self._cfgimpl_get_toplevel() rootconfig = self._cfgimpl_get_toplevel()
rootconfig._cfgimpl_hidden = False rootconfig.cfgimpl_hide()
rootconfig._cfgimpl_disabled = True rootconfig.cfgimpl_disable()
rootconfig._cfgimpl_mandatory = True rootconfig._cfgimpl_mandatory = True
def cfgimpl_read_write(self): def cfgimpl_read_write(self):
# hung up on freeze, hidden and disabled concepts # hung up on freeze, hidden and disabled concepts
self.cfgimpl_unfreeze() self.cfgimpl_unfreeze()
rootconfig = self._cfgimpl_get_toplevel() rootconfig = self._cfgimpl_get_toplevel()
rootconfig._cfgimpl_hidden = True rootconfig.cfgimpl_hide()
rootconfig._cfgimpl_disabled = True rootconfig.cfgimpl_disable()
rootconfig._cfgimpl_mandatory = False rootconfig._cfgimpl_mandatory = False
# ____________________________________________________________ # ____________________________________________________________
def getkey(self): def getkey(self):