screenlets.options.account_option.AccountOption

Package screenlets :: Package options :: Module account_option :: Class AccountOption |
[hide private]
[frames] | no frames]

# Class AccountOption

source code

    object --+
             |
    ??.GObject --+
                 |
       base.Option --+
                     |
                    AccountOption

    An Option-type for username/password combos. Stores the password in
    the gnome-keyring (if available) and only saves username and auth_token
    through the screenlets-backend.
    TODO:
    - not create new token for any change (use "set" instead of "create" if
      the given item already exists)
    - use usual storage if no keyring is available but output warning
    - on_delete-function for removing the data from keyring when the
      Screenlet holding the option gets deleted

Instance Methods | [hide private]
__init__(self, group, name, *attr, **args) Creates a new Option with the given information. | source code
on_import(self, strvalue) Import account info from a string (like 'username:auth_token'),. | source code
on_export(self, value) Export the given tuple/list containing a username and a password. | source code
generate_widget(self, value) Generate a textbox for a account options | source code
set_value(self, value) Set the account value as required. | source code
has_changed(self, widget) Executed when the widget event kicks off. | source code
Inherited from `unreachable.GObject`: `__copy__`, `__deepcopy__`, `__delattr__`, `__eq__`, `__gdoc__`, `__ge__`, `__gobject_init__`, `__gt__`, `__hash__`, `__le__`, `__lt__`, `__ne__`, `__new__`, `__repr__`, `__setattr__`, `chain`, `connect`, `connect_after`, `connect_object`, `connect_object_after`, `disconnect`, `disconnect_by_func`, `emit`, `emit_stop_by_name`, `freeze_notify`, `get_data`, `get_properties`, `get_property`, `handler_block`, `handler_block_by_func`, `handler_disconnect`, `handler_is_connected`, `handler_unblock`, `handler_unblock_by_func`, `notify`, `props`, `set_data`, `set_properties`, `set_property`, `stop_emission`, `thaw_notify`, `weak_ref` Inherited from `object`: `__format__`, `__getattribute__`, `__reduce__`, `__reduce_ex__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| protected = `True`
Inherited from `base.Option`: `__gsignals__`, `__gtype__`, `default`, `desc`, `disabled`, `hidden`, `label`, `realtime`, `widget`

Properties | [hide private]
Inherited from `unreachable.GObject`: `__grefcount__` Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, group, name, *attr, **args) (Constructor) | source code
Creates a new Option with the given information. Overrides: object.__init__ (inherited documentation)

### on_import(self, strvalue) | source code
Import account info from a string (like 'username:auth_token'),. retrieve the password from the storage and return a tuple containing username and password. Overrides: base.Option.on_import

### on_export(self, value) | source code
Export the given tuple/list containing a username and a password. The function stores the password in the gnomekeyring and returns a string in form 'username:auth_token'. Overrides: base.Option.on_export

### generate_widget(self, value) | source code
Generate a textbox for a account options Overrides: base.Option.generate_widget

### set_value(self, value) | source code
Set the account value as required. Overrides: base.Option.set_value

### has_changed(self, widget) | source code
Executed when the widget event kicks off. Overrides: base.Option.has_changed