Home | Trees | Indices | Help |
---|
|
1 # -*- coding: utf-8 -*- 2 # Elisa - Home multimedia server 3 # Copyright (C) 2006-2008 Fluendo Embedded S.L. (www.fluendo.com). 4 # All rights reserved. 5 # 6 # This file is available under one of two license agreements. 7 # 8 # This file is licensed under the GPL version 3. 9 # See "LICENSE.GPL" in the root of this distribution including a special 10 # exception to use Elisa with Fluendo's plugins. 11 # 12 # The GPL part of Elisa is also available under a commercial licensing 13 # agreement from Fluendo. 14 # See "LICENSE.Elisa" in the root directory of this distribution package 15 # for details on that license. 16 17 18 __maintainer__ = 'Lionel Martin <lionel@fluendo.com>' 19 20 from elisa.base_components.action import Action 21 from elisa.core.backend import Backend 22 from elisa.core.frontend import Frontend 23 from elisa.core.common import application 2426 """ 27 DOCME 28 """ 29 30 theme_path = None 31 32 label = 'switch theme action' 334935 if isinstance(origin, Backend): 36 for frontend in origin.frontends: 37 self._set_frontend_theme(frontend, self.theme_path) 38 elif isinstance(origin, Frontend): 39 self._set_frontend_theme(origin, self.theme_path) 40 else: 41 raise Exception("Cannot change the theme because origin of the \ 42 event is unknown")4345 theme = application.plugin_registry.create_component(theme_path) 46 frontend.theme = theme 47 application.config.set_option('theme', theme_path, 48 section=frontend.name)
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Jan 16 19:10:46 2008 | http://epydoc.sourceforge.net |