Search in sources :

Example 1 with MetaSearchManager

use of com.biglybt.core.metasearch.MetaSearchManager in project BiglyBT by BiglySoftware.

the class SearchUI method delayedInit.

private void delayedInit() {
    final MetaSearchManager manager = MetaSearchManagerFactory.getSingleton();
    if (manager == null) {
        return;
    }
    BasicPluginConfigModel configModel = ui_manager.createBasicPluginConfigModel(ConfigSection.SECTION_ROOT, CONFIG_SECTION_ID);
    // proxy enable
    final BooleanParameter proxy_enable = configModel.addBooleanParameter2("search.proxy.enable", "search.proxy.enable", manager.getProxyRequestsEnabled());
    proxy_enable.addListener(new ParameterListener() {

        @Override
        public void parameterChanged(Parameter param) {
            manager.setProxyRequestsEnabled(proxy_enable.getValue());
        }
    });
    // open rcm on search
    final BooleanParameter paramRCMWindow = configModel.addBooleanParameter2("search.showRCMView", "search.showRCMView", false);
}
Also used : ParameterListener(com.biglybt.pif.ui.config.ParameterListener) BooleanParameter(com.biglybt.pif.ui.config.BooleanParameter) Parameter(com.biglybt.pif.ui.config.Parameter) MetaSearchManager(com.biglybt.core.metasearch.MetaSearchManager) BooleanParameter(com.biglybt.pif.ui.config.BooleanParameter) BasicPluginConfigModel(com.biglybt.pif.ui.model.BasicPluginConfigModel)

Aggregations

MetaSearchManager (com.biglybt.core.metasearch.MetaSearchManager)1 BooleanParameter (com.biglybt.pif.ui.config.BooleanParameter)1 Parameter (com.biglybt.pif.ui.config.Parameter)1 ParameterListener (com.biglybt.pif.ui.config.ParameterListener)1 BasicPluginConfigModel (com.biglybt.pif.ui.model.BasicPluginConfigModel)1