source selection in nsclient after dropping g5 uploader
This commit is contained in:
parent
17b9a4b951
commit
04af3eb806
5 changed files with 24 additions and 14 deletions
|
@ -172,17 +172,12 @@ public class MainApp extends Application {
|
|||
pluginsList.add(TreatmentsPlugin.getPlugin());
|
||||
if (Config.SAFETY) pluginsList.add(SafetyPlugin.getPlugin());
|
||||
if (Config.APS) pluginsList.add(ObjectivesPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceXdripPlugin.getPlugin());
|
||||
pluginsList.add(SourceXdripPlugin.getPlugin());
|
||||
pluginsList.add(SourceNSClientPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceMM640gPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceGlimpPlugin.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourceDexcomG5Plugin.getPlugin());
|
||||
if (!Config.NSCLIENT)
|
||||
pluginsList.add(SourcePoctechPlugin.getPlugin());
|
||||
pluginsList.add(SourceMM640gPlugin.getPlugin());
|
||||
pluginsList.add(SourceGlimpPlugin.getPlugin());
|
||||
pluginsList.add(SourceDexcomG5Plugin.getPlugin());
|
||||
pluginsList.add(SourcePoctechPlugin.getPlugin());
|
||||
if (Config.SMSCOMMUNICATORENABLED) pluginsList.add(SmsCommunicatorPlugin.getPlugin());
|
||||
pluginsList.add(FoodPlugin.getPlugin());
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@ public class SourceDexcomG5Plugin extends PluginBase implements BgSourceInterfac
|
|||
.fragmentClass(BGSourceFragment.class.getName())
|
||||
.pluginName(R.string.DexcomG5)
|
||||
.shortName(R.string.dexcomG5_shortname)
|
||||
.showInList(!Config.NSCLIENT)
|
||||
.preferencesId(R.xml.pref_dexcomg5)
|
||||
.description(R.string.description_source_dexcom_g5)
|
||||
);
|
||||
|
|
|
@ -44,8 +44,6 @@ public class SourceNSClientPlugin extends PluginBase implements BgSourceInterfac
|
|||
.mainType(PluginType.BGSOURCE)
|
||||
.fragmentClass(BGSourceFragment.class.getName())
|
||||
.pluginName(R.string.nsclientbg)
|
||||
.showInList(!Config.NSCLIENT)
|
||||
.alwaysEnabled(Config.NSCLIENT)
|
||||
.description(R.string.description_source_ns_client)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ public class SourcePoctechPlugin extends PluginBase implements BgSourceInterface
|
|||
.mainType(PluginType.BGSOURCE)
|
||||
.fragmentClass(BGSourceFragment.class.getName())
|
||||
.pluginName(R.string.poctech)
|
||||
.showInList(!Config.NSCLIENT)
|
||||
.preferencesId(R.xml.pref_poctech)
|
||||
.description(R.string.description_source_poctech)
|
||||
);
|
||||
|
|
|
@ -545,6 +545,25 @@ public class SWDefinition {
|
|||
.validator(() -> NSClientPlugin.getPlugin().nsClientService != null && NSClientPlugin.getPlugin().nsClientService.isConnected && NSClientPlugin.getPlugin().nsClientService.hasWriteAuth)
|
||||
.visibility(() -> !(NSClientPlugin.getPlugin().nsClientService != null && NSClientPlugin.getPlugin().nsClientService.isConnected && NSClientPlugin.getPlugin().nsClientService.hasWriteAuth))
|
||||
)
|
||||
.add(new SWScreen(R.string.configbuilder_bgsource)
|
||||
.skippable(false)
|
||||
.add(new SWPlugin()
|
||||
.option(PluginType.BGSOURCE, R.string.configbuilder_bgsource_description)
|
||||
.label(R.string.configbuilder_bgsource))
|
||||
.add(new SWBreak())
|
||||
.add(new SWButton()
|
||||
.text(R.string.bgsourcesetup)
|
||||
.action(() -> {
|
||||
final PluginBase plugin = (PluginBase) MainApp.getConfigBuilder().getActiveBgSource();
|
||||
PasswordProtection.QueryPassword(activity, R.string.settings_password, "settings_password", () -> {
|
||||
Intent i = new Intent(activity, PreferencesActivity.class);
|
||||
i.putExtra("id", plugin.getPreferencesId());
|
||||
activity.startActivity(i);
|
||||
}, null);
|
||||
})
|
||||
.visibility(() -> MainApp.getConfigBuilder().getActiveBgSource()!= null && ((PluginBase) MainApp.getConfigBuilder().getActiveBgSource()).getPreferencesId() > 0))
|
||||
.validator(() -> MainApp.getConfigBuilder().getActiveBgSource() != null)
|
||||
)
|
||||
.add(new SWScreen(R.string.patientage)
|
||||
.skippable(false)
|
||||
.add(new SWInfotext()
|
||||
|
|
Loading…
Reference in a new issue