def __init__(self, type, buffer): TextViewWidget.__init__(self, buffer) #~ self.view.set_editable(False) # object knows best how to manage content # TODO set background grey ? plugin = ObjectManager.find_plugin(type) if type else None if plugin: self._add_load_plugin_bar(plugin) else: label = gtk.Label(_("No plugin is available to display this object.")) # T: Label for object manager self.vbox.pack_start(label)
def __init__(self, type, buffer): TextViewWidget.__init__(self, buffer) #~ self.view.set_editable(False) # object knows best how to manage content # TODO set background grey ? plugin = ObjectManager.find_plugin(type) if type else None if plugin: self._add_load_plugin_bar(plugin) else: label = gtk.Label(_("No plugin is available to display this object.")) # T: Label for object manager self.vbox.pack_start(label)
def __init__(self, buffer): TextViewWidget.__init__(self, buffer) #~ self.view.set_editable(False) # object knows best how to manage content # TODO set background grey ? type = buffer.object_attrib.get('type') plugin = ObjectManager.find_plugin(type) if type else None if plugin: header = self._add_load_plugin_bar(plugin) self.add_header(header) else: label = Gtk.Label( _("No plugin available to display objects of type: %s") % type # T: Label for object manager ) self.add_header(label)