Trees | Indices | Help |
---|
|
1 # -*- Mode: Python -*- 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 """dialog to display debug markers""" 19 20 import gettext 21 22 import gobject 23 24 from flumotion.common.pygobject import gsignal 25 from flumotion.extern.log import log 26 from flumotion.ui.glade import GladeWindow 27 28 __version__ = "$Rev: 6581 $" 29 _ = gettext.gettext 30 3133 gladeFile = 'debug-marker.glade' 34 35 gsignal('set-marker', str, int) 3674 75 gobject.type_register(DebugMarkerDialog) 7638 debugLevels = log.getLevelNames() 39 GladeWindow.__init__(self) 40 pos = 0 41 self._debugLevelCode = {} 42 for level in debugLevels: 43 if level == 'ERROR': 44 continue 45 self.level_selection.get_model().insert(pos, [level]) 46 self._debugLevelCode[pos] = log.getLevelInt(level) 47 pos = pos+14850 if (self.marker_entry.get_text() and 51 self.level_selection.get_active()!=-1): 52 self.ok_button.set_sensitive(True) 53 else: 54 self.ok_button.set_sensitive(False)5557 level = self._debugLevelCode[self.level_selection.get_active()] 58 self.emit('set-marker', self.marker_entry.get_text(), level)59 60 # Callbacks 61 65 6870 self._updateOkButtonSensitiveness()7173 self._updateOkButtonSensitiveness()
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Aug 13 06:17:36 2013 | http://epydoc.sourceforge.net |