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 from elisa.core import common 19 from elisa.base_components.activity import Activity 2022 """ 23 DOCME 24 """ 2512427 registry = common.application.plugin_registry 28 29 # startup model 30 elisa_model = registry.create_component('base:elisa_model') 31 elisa_model.activity = self 32 #FIXME : it's not the right way to add new property to a model 33 #I have to create a new model or change the component 34 #The value of these properties are not correclty set everywhere... 35 elisa_model.menu_visible = True 36 elisa_model.stop_player = True 37 38 # player 39 player_activity = registry.create_component('base:player_activity') 40 player_model = player_activity.get_model() 41 42 # dvd player 43 #FIXME : Elisa Activity can't works without the dvd player plugin installed ! 44 dvd_player_activity = registry.create_component('dvd:dvd_player_activity') 45 dvd_player_model = dvd_player_activity.get_model() 46 47 # slideshow 48 slideshow_activity = registry.create_component('base:slideshow_activity') 49 slideshow_model = slideshow_activity.get_model() 50 51 # menu 52 menu_activity = registry.create_component('xmlmenu:xmltreemenu_activity') 53 menu_activity.player_model = player_model 54 menu_activity.dvd_player_model = dvd_player_model 55 menu_activity.slideshow_model = slideshow_model 56 menu_model = menu_activity.get_model() 57 58 menu_activity.elisa_model = elisa_model 59 60 elisa_model.slideshow = slideshow_model 61 elisa_model.player = player_model 62 elisa_model.dvd_player = dvd_player_model 63 elisa_model.menu = menu_model 64 65 manager_model = registry.create_component('raval:manager_model') 66 manager_model.activity = self 67 68 # bind manager model to the elisa_model 69 elisa_model.manager = manager_model 70 71 # select the root elisa menu in the manager model 72 manager_model.current = elisa_model.menu 73 74 location_model = registry.create_component('raval:location_model') 75 manager_model.location = location_model 76 77 context_model = registry.create_component('raval:context_model') 78 manager_model.context = context_model 79 80 model = registry.create_component('base:menu_node_model') 81 model.theme_icon = 'mini_player_play_icon' 82 action = registry.create_component('raval:show_player_action') 83 action.elisa_model = elisa_model 84 action.play_when_visible = True 85 action.player_model = player_model 86 model.activate_action = action 87 context_model.append(model) 88 89 model = registry.create_component('base:menu_node_model') 90 model.theme_icon = 'mini_player_stop_icon' 91 action = registry.create_component('raval:stop_playing_action') 92 action.elisa_model = elisa_model 93 model.activate_action = action 94 context_model.append(model) 95 96 #separator 97 model = registry.create_component('base:menu_node_model') 98 model.theme_icon = None 99 model.activate_action = None 100 context_model.append(model) 101 102 model = registry.create_component('base:menu_node_model') 103 model.theme_icon = 'list_button' 104 action = registry.create_component('raval:list_view_mode_action') 105 action.manager_model = manager_model 106 model.activate_action = action 107 context_model.append(model) 108 109 model = registry.create_component('base:menu_node_model') 110 model.theme_icon = 'coverflow_button' 111 action = registry.create_component('raval:coverflow_view_mode_action') 112 action.manager_model = manager_model 113 model.activate_action = action 114 context_model.append(model) 115 116 model = registry.create_component('base:menu_node_model') 117 model.theme_icon = 'grid_button' 118 action = registry.create_component('raval:grid_view_mode_action') 119 action.manager_model = manager_model 120 model.activate_action = action 121 context_model.append(model) 122 123 return elisa_model
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Jan 16 19:10:27 2008 | http://epydoc.sourceforge.net |