Beispiel #1
0
 def extend(self, obj):
     name = obj.__class__.__name__
     if name == 'MainWindow':
         index = obj.ui.notebook.index  # XXX
         i_ext = self.get_extension(IconsIndexExtension, index=index)
         mw_ext = MainWindowExtension(self, obj, i_ext)
         self.extensions.add(mw_ext)
     else:
         PluginClass.extend(self, obj)
	def extend(self, obj):
		name = obj.__class__.__name__
		if name == 'MainWindow':
			index = obj.ui.notebook.index # XXX
			i_ext = self.get_extension(IndexExtension, index=index)
			mw_ext = MainWindowExtension(self, obj, i_ext)
			self.extensions.add(mw_ext)
		else:
			PluginClass.extend(self, obj)
Beispiel #3
0
	def extend(self, obj):
		name = obj.__class__.__name__
		if name == 'MainWindow':
			nb = obj.ui.notebook # XXX
			nb_ext = self.get_extension(NotebookExtension, notebook=nb)
			assert nb_ext, 'No notebook extension found for: %s' % nb
			mw_ext = MainWindowExtension(self, obj, nb_ext)
			self.extensions.add(mw_ext)
		else:
			PluginClass.extend(self, obj)