def update_output_modules(self, *args, **kwargs):
        # need to find all currently loaded output modes (need to
        # check after modules are loaded and spin through registery)
        # and display them here
        reg = get_module_registry()
        output_d = reg.get_descriptor_by_name(get_vistrails_basic_pkg_id(),
                                              "OutputModule")
        sublist = reg.get_descriptor_subclasses(output_d)
        modes = {}
        for d in sublist:
            if hasattr(d.module, '_output_modes_dict'):
                for mode_type, (mode, _) in (d.module._output_modes_dict
                                                     .iteritems()):
                    modes[mode_type] = mode

        found_modes = set()
        for mode_type, mode in modes.iteritems():
            found_modes.add(mode_type)
            if mode_type not in self.mode_widgets:
                mode_config = None
                output_settings = self.persistent_config.outputDefaultSettings
                if output_settings.has(mode_type):
                    mode_config = getattr(output_settings, mode_type)
                widget = OutputModeConfigurationWidget(mode, mode_config)
                widget.fieldChanged.connect(self.field_was_changed)
                self.inner_layout.addWidget(widget)
                self.mode_widgets[mode_type] = widget
        
        for mode_type, widget in self.mode_widgets.items():
            if mode_type not in found_modes:
                self.inner_layout.removeWidget(self.mode_widgets[mode_type])
                del self.mode_widgets[mode_type]
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/preferences.py/QOutputConfigurationPane.update_output_modules/original