Beispiel #1
0
    def _init_frontend(self, fields):
        _Configuration._init_frontend(self, fields)
        self.window = self.frontend_instance

        self.window.add_profiles(self.profiles)

        self.window.connect('profile-changed', self.frontend_profile_changed)
        self.window.connect('add-profile', self.frontend_add_profile)
        self.window.connect('remove-profile', self.frontend_remove_profile)

        self.window.set_active_profile_index(self.profiles.active_index)
Beispiel #2
0
    def __init__(self, scheme_path, path, **kwargs):
        # Make sure this instance's `fields` dict is *not* the classes'
        # `fields` dict (hence, the `fields` attribute of class `cls`),
        # but a copy of it.
        # TODO: There has to be a better way.
        self.fields = self.fields.copy()

        backend = CreamXMLBackend(scheme_path, path)

        try:
            configuration_scheme = backend.read_scheme()
            for name, field in configuration_scheme.iteritems():
                self._add_field(name, field)
        except MissingConfigurationDefinitionFile:
            pass

        _Configuration.__init__(self, backend_instance=backend, **kwargs)
Beispiel #3
0
 def run_frontend(self):
     _Configuration.run_frontend(self)
     del self.frontend_instance
Beispiel #4
0
 def frontend_field_value_changed(self, *args):
     if not self._ignore_frontend:
         _Configuration.frontend_field_value_changed(self, *args)