Trees | Indices | Help |
---|
|
1 # -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- 2 # vi:si:et:sw=4:sts=4:ts=4 3 4 # Flumotion - a streaming media server 5 # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. 6 # Copyright (C) 2010,2011 Flumotion Services, S.A. 7 # All rights reserved. 8 # 9 # This file may be distributed and/or modified under the terms of 10 # the GNU Lesser General Public License version 2.1 as published by 11 # the Free Software Foundation. 12 # This file is distributed without any warranty; without even the implied 13 # warranty of merchantability or fitness for a particular purpose. 14 # See "LICENSE.LGPL" in the source distribution for more information. 15 # 16 # Headers in this file shall remain intact. 17 18 """ 19 Properties tab in the component UI 20 """ 21 22 import gettext 23 import os 24 25 import gtk 26 from kiwi.python import Settable 27 from kiwi.ui.objectlist import ObjectList, Column 28 29 from flumotion.component.base.baseadminnode import BaseAdminGtkNode 30 31 _ = gettext.gettext 32 __version__ = "$Rev$" 33 3436 gladeFile = os.path.join('flumotion', 'component', 'base', 37 'properties.glade') 38 39 uiStateHandlers = None 40 _properties = {} 41 447746 self.widget = gtk.VBox() 47 self.widget.set_border_width(6) 48 49 self.properties = ObjectList( 50 [Column('name'), 51 Column('value')]) 52 self.properties.set_size_request(-1, 200) 53 self.widget.pack_start(self.properties, False, False) 54 self.properties.show() 55 56 self._reloadProperties(self.state.get('config')['properties']) 57 return self.widget58 59 # IStateListener Interface 60 64 65 ### Private methods 6668 if properties is None: 69 return 70 self.properties.clear() 71 propertyNames = properties.keys()[:] 72 propertyNames.sort() 73 74 for name in propertyNames: 75 self.properties.append( 76 Settable(name=name, value=properties[name]))
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Aug 13 06:17:25 2013 | http://epydoc.sourceforge.net |