Beispiel #1
0
    def __init__(self, config, widget_properties, core):
        self.core = core
        self.widget_properties = widget_properties
        self.config = config
        self.locale = self.config['misc']['locale']
        self.octave = int(self.config['misc'].as_bool('octave'))
        self.helper = int(self.config['misc'].as_bool('helper'))
        self.allowed_difference = int(
            self.config['misc'].as_int('allowed_difference'))

        self.screen_res_x = self.config['screen'].as_int('resolution_x')
        self.screen_res_y = self.config['screen'].as_int('resolution_y')
        self.fullscreen_on = int(self.config['screen'].as_bool('fullscreen'))
        self.fps_label = int(self.config['screen'].as_bool('fps_label'))
        self.use_pil = int(self.config['screen'].as_bool('pil'))
        self.sound_player = self.config['sound']['player']
        self.sound_input = self.config['sound']['input']
        self.sound_preview = int(self.config['sound'].as_bool('preview'))
        self.theme_name = self.config['theme']['name']

        self.app_dir = os.path.dirname(sys.argv[0])

        self.lm = LocaleManager(self.app_dir)
        self.lm.install(self.locale)

        self.disp = DisplayProperties()

        self.valid_sound_players = ['Dummy', 'Gstreamer']
        self.valid_sound_inputs = ['Gstreamer']