Package x2go :: Package backends :: Package settings :: Module gconf
[frames] | no frames]

Source Code for Module x2go.backends.settings.gconf

 1  # -*- coding: utf-8 -*- 
 2   
 3  # Copyright (C) 2010-2016 by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> 
 4  # 
 5  # Python X2Go is free software; you can redistribute it and/or modify 
 6  # it under the terms of the GNU Affero General Public License as published by 
 7  # the Free Software Foundation; either version 3 of the License, or 
 8  # (at your option) any later version. 
 9  # 
10  # Python X2Go is distributed in the hope that it will be useful, 
11  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
12  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
13  # GNU Affero General Public License for more details. 
14  # 
15  # You should have received a copy of the GNU Affero General Public License 
16  # along with this program; if not, write to the 
17  # Free Software Foundation, Inc., 
18  # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. 
19   
20  """\ 
21  X2GoClientSettings class - managing x2goclient settings file. 
22   
23  The L{X2GoClientSettings} class one of Python X2Go's a public API classes. 
24  Use this class (indirectly by retrieving it from an L{X2GoClient} instance) 
25  in your Python X2Go based applications to access the 
26  »settings« configuration file of your X2Go client application. 
27   
28  """ 
29  __NAME__ = 'x2gosettings-pylib' 
30   
31  # modules 
32  import copy 
33   
34  # Python X2Go modules 
35  import x2go.log as log 
36  from x2go.defaults import X2GO_CLIENTSETTINGS_DEFAULTS as _X2GO_CLIENTSETTINGS_DEFAULTS 
37   
38  from x2go.x2go_exceptions import X2GoNotImplementedYetException 
39   
40 -class X2GoClientSettings(object):
41 """\ 42 Configure settings for L{X2GoClient} instances with the GConf daemon. 43 44 """ 45 defaultValues = copy.deepcopy(_X2GO_CLIENTSETTINGS_DEFAULTS) 46
47 - def __init__(self, defaults=_X2GO_CLIENTSETTINGS_DEFAULTS, logger=None, loglevel=log.loglevel_DEFAULT):
48 """\ 49 Constructs an L{X2GoClientSettings} instance. This is normally done from within an L{X2GoClient} instance. 50 You can retrieve this L{X2GoClientSettings} instance with the L{X2GoClient.get_client_settings()} 51 method. 52 53 On construction the L{X2GoClientSettings} object is filled with values as found in GConf:: 54 55 <GConf paths, FIXME: give proper locations here> 56 57 """ 58 raise X2GoNotImplementedYetException('GCONF backend support is not implemented yet')
59