From 00d6e4b17b78e73538602753f4ec586e220e6f43 Mon Sep 17 00:00:00 2001 From: Jonathan Hudson Date: Sat, 4 Jan 2025 10:36:43 +0000 Subject: [PATCH] use `armed_msp_placebo` to disable armed MSP functions --- data/org.stronnag.mwp.gschema.xml | 2 +- meson.build | 2 +- src/mwp/mwp-handle_mspmsg.vala | 2 +- src/mwp/mwp-safehomes.vala | 2 +- src/mwp/mwp-settings.vala | 4 ++-- src/mwp/mwp-window.vala | 6 +++--- src/mwp/winres.rc | 8 ++++---- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/data/org.stronnag.mwp.gschema.xml b/data/org.stronnag.mwp.gschema.xml index 52b8869d..47cb741e 100644 --- a/data/org.stronnag.mwp.gschema.xml +++ b/data/org.stronnag.mwp.gschema.xml @@ -664,7 +664,7 @@ - + Antidote to armed menus placebo false Whether to suppress desensitising of MSP action items when armed. diff --git a/meson.build b/meson.build index 3b9ce2e2..b697dcf2 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('mwptools', 'vala', 'c', version : '25.01.03', meson_version : '>= 1.4.0') +project('mwptools', 'vala', 'c', version : '25.01.04', meson_version : '>= 1.4.0') nogo = get_option('nogo') force_s = get_option('force-static') diff --git a/src/mwp/mwp-handle_mspmsg.vala b/src/mwp/mwp-handle_mspmsg.vala index 92a42d84..20081d7f 100644 --- a/src/mwp/mwp-handle_mspmsg.vala +++ b/src/mwp/mwp-handle_mspmsg.vala @@ -1790,7 +1790,7 @@ namespace Mwp { } public void handle_misc_startup() { - if (armed == 0 || conf.armed_red_pill) { + if (armed == 0 || conf.armed_msp_placebo == false) { if (STATUS in starttasks) { MWPLog.message("Inital starttask %x\n", starttasks); starttasks -= StartupTasks.STATUS; diff --git a/src/mwp/mwp-safehomes.vala b/src/mwp/mwp-safehomes.vala index b4cf9ba4..86773d33 100644 --- a/src/mwp/mwp-safehomes.vala +++ b/src/mwp/mwp-safehomes.vala @@ -367,7 +367,7 @@ public class SafeHomeDialog : Adw.Window { } private void menu_armed_state(bool s) { - if(!Mwp.conf.armed_red_pill) { + if(Mwp.conf.armed_msp_placebo) { MwpMenu.set_menu_state(dg, "loadfc", !s); MwpMenu.set_menu_state(dg, "savefc", !s); } diff --git a/src/mwp/mwp-settings.vala b/src/mwp/mwp-settings.vala index 37b482ea..8bac8ee1 100644 --- a/src/mwp/mwp-settings.vala +++ b/src/mwp/mwp-settings.vala @@ -108,7 +108,7 @@ public class MWPSettings : GLib.Object { public int ident_limit {get; set; default=60;} public double touch_factor {get; set; default=0.0;} public int p_pane_width {get; set; default=0;} - public bool armed_red_pill {get; set; default=false;} + public bool armed_msp_placebo {get; set; default=false;} construct { #if DARWIN @@ -151,7 +151,7 @@ public class MWPSettings : GLib.Object { settings = new Settings (sname); #endif settings.bind("adjust-tz", this, "adjust-tz", SettingsBindFlags.DEFAULT); - settings.bind("armed-red-pill", this, "armed-red-pill", SettingsBindFlags.DEFAULT); + settings.bind("armed-msp-placebo", this, "armed-msp-placebo", SettingsBindFlags.DEFAULT); settings.bind("arming-speak", this, "arming-speak", SettingsBindFlags.DEFAULT); settings.bind("atexit", this, "atexit", SettingsBindFlags.GET); settings.bind("atstart", this, "atstart", SettingsBindFlags.GET); diff --git a/src/mwp/mwp-window.vala b/src/mwp/mwp-window.vala index 39edea8d..c6f65b6f 100644 --- a/src/mwp/mwp-window.vala +++ b/src/mwp/mwp-window.vala @@ -239,8 +239,8 @@ namespace Mwp { armed_state.connect((s) => { s = !s; - MWPLog.message("Armed changed set menus %s\n", s.to_string()); - if(!conf.armed_red_pill) { + if(conf.armed_msp_placebo) { + MWPLog.message("Armed changed MSP menus %s\n", s.to_string()); set_mission_menus(s); } update_state(); @@ -502,7 +502,7 @@ namespace Mwp { // MWPLog.message(":DBG: window state %d (%s)\n", msp.td.state.ltmstate, wpstate.to_string()); MwpMenu.set_menu_state(Mwp.window, "followme", mstate); - if (!conf.armed_red_pill) { + if (conf.armed_msp_placebo) { MwpMenu.set_menu_state(Mwp.window, "upload-mission", !wpstate); } } diff --git a/src/mwp/winres.rc b/src/mwp/winres.rc index deee33a7..588b292e 100644 --- a/src/mwp/winres.rc +++ b/src/mwp/winres.rc @@ -1,8 +1,8 @@ 2 ICON "../../data/mwp.ico" 1 VERSIONINFO -FILEVERSION 25,01,3,0 -FILEVERSION 25,01,3,0 +FILEVERSION 25,01,4,0 +FILEVERSION 25,01,4,0 FILEOS 0x40004 FILETYPE 1 { @@ -12,12 +12,12 @@ FILETYPE 1 { VALUE "CompanyName", "Stronnag MegaCorp" VALUE "FileDescription", "mwp" - VALUE "FileVersion", "25.01.03" + VALUE "FileVersion", "25.01.04" VALUE "InternalName", "mwp GCS and MissionPlanner" VALUE "LegalCopyright", "Copyright (c) 2014-2025 Jonathan Hudson" VALUE "OriginalFilename", "mwp.exe" VALUE "ProductName", "mwptools" - VALUE "ProductVersion", "25.01.03" + VALUE "ProductVersion", "25.01.04" VALUE "Comments", "Licence GPL3 or later" } }