Exemplo n.º 1
0
    def __init__(self, state, admin):
        BaseAdminGtkNode.__init__(self, state, admin, title=_("Component"))

        self._startTime = None
        self._debugging = None
        self._initialFluMask = ''
        self._initialGstMask = ''
Exemplo n.º 2
0
 def __init__(self, state, admin, title=None):
     BaseAdminGtkNode.__init__(self, state, admin, title)
     # create widget
     self.widget = gtk.Table(2, 1)
     self.radioButton = {}
     self.radioButton["backup"] = gtk.RadioButton(label="Backup")
     self.radioButton["master"] = gtk.RadioButton(
         self.radioButton["backup"], label="Master")
     self.radioButtonHandlers = {}
     currentRow = 0
     for eaterName in self.radioButton:
         self.widget.attach(self.radioButton[eaterName],
                            0,
                            1,
                            currentRow,
                            currentRow + 1,
                            yoptions=gtk.FILL,
                            xpadding=6,
                            ypadding=6)
         currentRow = currentRow + 1
         self.radioButton[eaterName].show()
         sigID = self.radioButton[eaterName].connect(
             "toggled", self.cb_toggled, eaterName)
         self.radioButtonHandlers[eaterName] = sigID
     self.widget.show()
    def setUIState(self, state):
        BaseAdminGtkNode.setUIState(self, state)
        if not self.widget:
            return

        self.haveMetadata(state.get('metadata', {}))
        self.haveCodecInfo(state.get('codec-info', {}))
Exemplo n.º 4
0
    def setDebugEnabled(self, enabled):
        BaseAdminGtkNode.setDebugEnabled(self, enabled)
        if self._debugging:
            self._debugging.set_property('visible', enabled)

        self._initialFluMask = getDebug()
        self._initialGstMask = os.environ.get('GST_DEBUG', '')
Exemplo n.º 5
0
    def setDebugEnabled(self, enabled):
        BaseAdminGtkNode.setDebugEnabled(self, enabled)
        if self._debugging:
            self._debugging.set_property('visible', enabled)

        self._initialFluMask = getDebug()
        self._initialGstMask = os.environ.get('GST_DEBUG', '')
Exemplo n.º 6
0
    def __init__(self, state, admin):
        BaseAdminGtkNode.__init__(self, state, admin, title=_("Component"))

        self._startTime = None
        self._debugging = None
        self._initialFluMask = ''
        self._initialGstMask = ''
Exemplo n.º 7
0
 def __init__(self, *args, **kwargs):
     BaseAdminGtkNode.__init__(self, *args, **kwargs)
     self._statistics = None
     self._shown = False
     self._stats = None
     self._link = None
     self._labels = {}
Exemplo n.º 8
0
 def __init__(self, *args, **kwargs):
     BaseAdminGtkNode.__init__(self, *args, **kwargs)
     self._statistics = None
     self._shown = False
     self._stats = None
     self._link = None
     self._labels = {}
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     self.model.clear()
     for profile in self.uiState.get("monitored-profiles"):
         self.stateAppend(self.uiState, "monitored-profiles", profile)
     for subkey, fileinfo in self.uiState.get("pending-files").items():
         self.stateSetitem(self.uiState, "pending-files", subkey, fileinfo)
Exemplo n.º 10
0
    def setUIState(self, uiState):
        BaseAdminGtkNode.setUIState(self, uiState)

        # Ick; we don't get these otherwise.
        for key in uiState.keys():
            val = uiState.get(key)
            if val is not None:
                self.stateSet(uiState, key, uiState.get(key))
Exemplo n.º 11
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if not self.uiStateHandlers:
         self.uiStateHandlers = {'wave': self.waveSet,
                                 'frequency': self.frequencySet,
                                 'samplerate': self.samplerateSet}
     for k, handler in self.uiStateHandlers.items():
         handler(state.get(k))
Exemplo n.º 12
0
    def setUIState(self, uiState):
        BaseAdminGtkNode.setUIState(self, uiState)

        # Ick; we don't get these otherwise.
        for key in uiState.keys():
            val = uiState.get(key)
            if val is not None:
                self.stateSet(uiState, key, uiState.get(key))
Exemplo n.º 13
0
 def __init__(self, state, admin, effectName, title=None):
     """
     @param state: state of component this is a UI for
     @type  state: L{flumotion.common.planet.AdminComponentState}
     @param admin: the admin model that interfaces with the manager for us
     @type  admin: L{flumotion.admin.admin.AdminModel}
     """
     BaseAdminGtkNode.__init__(self, state, admin, title)
     self.effectName = effectName
Exemplo n.º 14
0
 def __init__(self, state, admin, effectName, title=None):
     """
     @param state: state of component this is a UI for
     @type  state: L{flumotion.common.planet.AdminComponentState}
     @param admin: the admin model that interfaces with the manager for us
     @type  admin: L{flumotion.admin.admin.AdminModel}
     """
     BaseAdminGtkNode.__init__(self, state, admin, title)
     self.effectName = effectName
Exemplo n.º 15
0
 def setUIState(self, state):
     # will only be called when we have a widget tree
     BaseAdminGtkNode.setUIState(self, state)
     self.widget.show_all()
     for feeder in state.get("feeders"):
         self.addFeeder(state, feeder)
     sel = self.treeview.get_selection()
     if sel is not None:
         sel.select_iter(self.treemodel.get_iter_first())
Exemplo n.º 16
0
 def setUIState(self, state):
     # will only be called when we have a widget tree
     BaseAdminGtkNode.setUIState(self, state)
     self.widget.show_all()
     for feeder in state.get('feeders'):
         self.addFeeder(state, feeder)
     sel = self.treeview.get_selection()
     if sel is not None:
         sel.select_iter(self.treemodel.get_iter_first())
Exemplo n.º 17
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if not self.uiStateHandlers:
         self.uiStateHandlers = {
             'wave': self.waveSet,
             'frequency': self.frequencySet,
             'samplerate': self.samplerateSet
         }
     for k, handler in self.uiStateHandlers.items():
         handler(state.get(k))
Exemplo n.º 18
0
 def __init__(self, state, admin):
     BaseAdminGtkNode.__init__(self, state, admin, title=_("Eaters"))
     # tree model is a model of id, uiState, StateWatcher
     # tree model contains eaters
     self.treemodel = None
     self.treeview = None
     self._selected = None  # the watcher of the currently selected row
     self.labels = {}
     self._lastConnect = 0
     self._lastDisconnect = 0
Exemplo n.º 19
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if not self.uiStateHandlers:
         self.uiStateHandlers = {'signal': self.signalSet,
                                 'snr': self.snrSet,
                                 'ber': self.berSet,
                                 'unc': self.uncSet,
                                 'lock': self.lockSet}
     for k, handler in self.uiStateHandlers.items():
         handler(state.get(k))
Exemplo n.º 20
0
 def __init__(self, state, admin):
     BaseAdminGtkNode.__init__(self, state, admin, title=_("Eaters"))
     # tree model is a model of id, uiState, StateWatcher
     # tree model contains eaters
     self.treemodel = None
     self.treeview = None
     self._selected = None # the watcher of the currently selected row
     self.labels = {}
     self._lastConnect = 0
     self._lastDisconnect = 0
Exemplo n.º 21
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if self._path and state.hasKey('allow-browsing') \
        and state.get('allow-browsing'):
         self.browser.setBaseUri(state.get('stream-url'))
     else:
         self.browser.hide_all()
         warning = gtk.Label()
         warning.set_markup(_('Browsing files is not allowed.'))
         warning.show()
         self.widget.pack_start(warning)
Exemplo n.º 22
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if self._path and state.hasKey('allow-browsing') \
        and state.get('allow-browsing'):
         self.browser.setBaseUri(state.get('stream-url'))
     else:
         self.browser.hide_all()
         warning = gtk.Label()
         warning.set_markup(_('Browsing files is not allowed.'))
         warning.show()
         self.widget.pack_start(warning)
Exemplo n.º 23
0
 def __init__(self, state, admin):
     BaseAdminGtkNode.__init__(self, state, admin, title=_("Feeders"))
     # tree model is a model of id, uiState, StateWatcher, type
     # tree model contains feeders and their feeder clients
     # type is a str, 'feeder' or 'client'
     self.treemodel = None
     self.treeview = None
     self.selected = None
     self.labels = {}
     self._lastConnect = 0
     self._lastDisconnect = 0
Exemplo n.º 24
0
 def __init__(self, state, admin):
     BaseAdminGtkNode.__init__(self, state, admin, title=_("Feeders"))
     # tree model is a model of id, uiState, StateWatcher, type
     # tree model contains feeders and their feeder clients
     # type is a str, 'feeder' or 'client'
     self.treemodel = None
     self.treeview = None
     self.selected = None
     self.labels = {}
     self._lastConnect = 0
     self._lastDisconnect = 0
Exemplo n.º 25
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if not self.uiStateHandlers:
         self.uiStateHandlers = {
             'info-duration': self.fileinfowidget.set_duration,
             'info-location': self.fileinfowidget.set_location,
             'info-audio': self.fileinfowidget.set_audio,
             'info-video': self.fileinfowidget.set_video,
             'position': self.positionSet,
             'num-iterations': self.numIterationsSet
         }
     for k, handler in self.uiStateHandlers.items():
         handler(state.get(k))
Exemplo n.º 26
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if not self.uiStateHandlers:
         self.uiStateHandlers = {'info-duration':
                                 self.fileinfowidget.set_duration,
                                 'info-location':
                                 self.fileinfowidget.set_location,
                                 'info-audio':
                                 self.fileinfowidget.set_audio,
                                 'info-video':
                                 self.fileinfowidget.set_video,
                                 'position': self.positionSet,
                                 'num-iterations': self.numIterationsSet}
     for k, handler in self.uiStateHandlers.items():
         handler(state.get(k))
    def setUIState(self, state):
        BaseAdminGtkNode.setUIState(self, state)
        if not self.widget:
            return

        if not self.uiStateHandlers:
            self.uiStateHandlers = {
                'upload-bw': self.uploadBandwidthSet,
                'upload-fps': self.uploadFPSSet,
                'total-connections': self.totalConnectionsSet,
                'encoder-host': self.encoderHostSet,
                'last-connect': self.lastConnectSet,
                'client-events': self.clientEventsSet,
            }

        for k, handler in self.uiStateHandlers.items():
            handler(state.get(k))
 def __init__(self, *args, **kwargs):
     BaseAdminGtkNode.__init__(self, *args, **kwargs)
     self._progress = None
     self._model = gtk.TreeStore(str, str, str, int)
     self._view = None
     self._errorText = None
     self._uiInitialized = False
     self._fields = {}
     self._valFormats = {}
     self._lblFormats = {}
     self._labels = {}
     self._iterIndex = {}
     self._targetsWarnings = {}
     self._targetsError = {}
     self._jobWarnings = []
     self._jobError = None
     self._status = None
Exemplo n.º 29
0
 def __init__(self, state, admin, title=None):
     BaseAdminGtkNode.__init__(self, state, admin, title)
     # create widget
     self.widget = gtk.Table(2, 1)
     self.radioButton = {}
     self.radioButton["backup"] = gtk.RadioButton(label="Backup")
     self.radioButton["master"] = gtk.RadioButton(
         self.radioButton["backup"],
         label="Master")
     self.radioButtonHandlers = {}
     currentRow = 0
     for eaterName in self.radioButton:
         self.widget.attach(self.radioButton[eaterName], 0, 1, currentRow,
             currentRow+1, yoptions=gtk.FILL, xpadding=6, ypadding=6)
         currentRow = currentRow + 1
         self.radioButton[eaterName].show()
         sigID = self.radioButton[eaterName].connect(
             "toggled", self.cb_toggled, eaterName)
         self.radioButtonHandlers[eaterName] = sigID
     self.widget.show()
Exemplo n.º 30
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     self._watcher = _StateWatcher(state,
        {
             'channelnames': self._setChannelName,
             'whatson': self._setWhatsOn,
        },
        {},
        {},
        setitemers={
             'channelnames': self._setChannelNameItem,
             'whatson': self._setWhatsOnItem,
        },
        delitemers={
             'channelnames': self._delChannelNameItem,
             'whatson': self._delWhatsOnItem,
        })
     self._watcher.show()
     for chan in self.channels:
         self.siwidget.append(chan)
Exemplo n.º 31
0
 def render(self):
     # FIXME: gladify
     self.widget = gtk.Table(1, 2)
     label = gtk.Label(_("Pattern:"))
     self.widget.attach(label, 0, 1, 0, 1, 0, 0, 6, 6)
     label.show()
     self.combobox_pattern = fgtk.FProxyComboBox()
     self.combobox_pattern.set_enum(VideoTestPattern)
     self.pattern_changed_id = self.combobox_pattern.connect('changed',
         self.cb_pattern_changed)
     self.widget.attach(self.combobox_pattern, 1, 2, 0, 1, 0, 0, 6, 6)
     self.combobox_pattern.show()
     return BaseAdminGtkNode.render(self)
Exemplo n.º 32
0
 def render(self):
     # FIXME: gladify
     self.widget = gtk.Table(1, 2)
     label = gtk.Label(_("Pattern:"))
     self.widget.attach(label, 0, 1, 0, 1, 0, 0, 6, 6)
     label.show()
     self.combobox_pattern = fgtk.FProxyComboBox()
     self.combobox_pattern.set_enum(VideoTestPattern)
     self.pattern_changed_id = self.combobox_pattern.connect(
         'changed', self.cb_pattern_changed)
     self.widget.attach(self.combobox_pattern, 1, 2, 0, 1, 0, 0, 6, 6)
     self.combobox_pattern.show()
     return BaseAdminGtkNode.render(self)
Exemplo n.º 33
0
    def render(self):

        def returnWidget(res):
            return self.siwidget
        self.siwidget = ObjectList([Column('programnumber',
            'Program Number', data_type=str),
            Column('name', data_type=str),
            Column('whatson', 'What\'s On', data_type=str)])
        whatsontvcolumn = self.siwidget.get_treeview_column(\
            self.siwidget.get_column_by_name('whatson'))
        import pango
        for renderer in whatsontvcolumn.get_cell_renderers():
            renderer.set_property('wrap-width', 200)
            renderer.set_property('wrap-mode', pango.WRAP_WORD)
        self.widget = self.siwidget
        d = BaseAdminGtkNode.render(self)
        d.addCallback(returnWidget)
        return d
Exemplo n.º 34
0
 def __init__(self, state, admin, title=None):
     BaseAdminGtkNode.__init__(self, state, admin, title)
     self.browser = self._create_browser()
     self._path = self.state.get('config').get('properties').get('path')
Exemplo n.º 35
0
 def setUIState(self, state):
     # will only be called when we have a widget tree
     BaseAdminGtkNode.setUIState(self, state)
     #self.widget.show_all()
     for eater in state.get('eaters'):
         self.addEater(state, eater)
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     self.refreshUIState()
     self._uiInitialized = True
Exemplo n.º 37
0
 def __init__(self, *args, **kwargs):
     BaseAdminGtkNode.__init__(self, *args, **kwargs)
     self._shown = False
     self._state = None
     self._reqStats = {}  # {name: (widget, converter, format, default)}
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if not self.widget:
         return
     self.setMetadata(state.get('metadata'))
Exemplo n.º 39
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     self.stateSet(state, 'active-eater', state.get('active-eater'))
Exemplo n.º 40
0
 def __init__(self, state, admin):
     BaseAdminGtkNode.__init__(self, state, admin, title=_("Properties"))
Exemplo n.º 41
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     self.stateSet(state, 'filename', state.get('filename'))
     self.stateSet(state, 'recording', state.get('recording'))
     self.stateSet(state, 'can-schedule', state.get('can-schedule'))
Exemplo n.º 42
0
 def __init__(self, state, admin, title=None):
     BaseAdminGtkNode.__init__(self, state, admin, title)
     self.browser = self._create_browser()
     self._path = self.state.get('config').get('properties').get('path')
Exemplo n.º 43
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if not self.uiStateHandlers:
         self.uiStateHandlers = {'pattern': self.patternSet}
     for k, handler in self.uiStateHandlers.items():
         handler(state.get(k))
Exemplo n.º 44
0
 def setUIState(self, state):
     # will only be called when we have a widget tree
     BaseAdminGtkNode.setUIState(self, state)
     #self.widget.show_all()
     for eater in state.get('eaters'):
         self.addEater(state, eater)
Exemplo n.º 45
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     if not self.uiStateHandlers:
         self.uiStateHandlers = {'pattern': self.patternSet}
     for k, handler in self.uiStateHandlers.items():
         handler(state.get(k))
Exemplo n.º 46
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     self.stateSet(state, 'active-eater', state.get('active-eater'))
Exemplo n.º 47
0
 def setUIState(self, state):
     BaseAdminGtkNode.setUIState(self, state)
     self.stateSet(state, 'filename', state.get('filename'))
     self.stateSet(state, 'recording', state.get('recording'))
     self.stateSet(state, 'can-schedule', state.get('can-schedule'))
Exemplo n.º 48
0
 def __init__(self, *args, **kwargs):
     BaseAdminGtkNode.__init__(self, *args, **kwargs)
     self._shown = False
     self._state = None
     self._reqStats = {} # {name: (widget, converter, format, default)}
 def __init__(self, *args, **kwargs):
     BaseAdminGtkNode.__init__(self, *args, **kwargs)
     self.view = None
     self.model = gtk.TreeStore(str, str)
     self.model_lookup = {}