Package elisa :: Package plugins :: Package bad :: Package gtk_frontend :: Module gtk_startup_view
[hide private]
[frames] | no frames]

Source Code for Module elisa.plugins.bad.gtk_frontend.gtk_startup_view

 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   
21  from elisa.base_components.view import View 
22   
23  import pygtk 
24  pygtk.require('2.0') 
25  import gtk 
26   
27   
28 -class GtkStartupView(View):
29 """ 30 This class implements gtk list view support 31 """ 32 33 supported_controllers = ('base:elisa_controller', ) 34 bindings = {'menu': 'menu', 35 'player': 'player'} 36
37 - def __init__(self):
38 View.__init__(self) 39 self.context_path = 'gtk:gtk_context' 40 self.box = gtk.VBox() 41 self.context_handle = self.box
42
43 - def controller_changed(self, old_controller, new_controller):
44 scrolled_treeview = gtk.ScrolledWindow() 45 scrolled_treeview.add(self.menu.treeview) 46 self.box.pack_start_defaults(scrolled_treeview) 47 self.box.pack_end(self.player.vbox, False, False, 0)
48
49 - def save_config(self, app_config):
50 View.save_config(self, app_config) 51 self.menu.save_config(app_config) 52 self.player.save_config(app_config)
53