Skip to content

Commit

Permalink
use armed_msp_placebo to disable armed MSP functions
Browse files Browse the repository at this point in the history
  • Loading branch information
stronnag committed Jan 4, 2025
1 parent e3a7b7f commit 00d6e4b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion data/org.stronnag.mwp.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@
</description>
</key>

<key name="armed-red-pill" type="b">
<key name="armed-msp-placebo" type="b">
<summary>Antidote to armed menus placebo</summary>
<default>false</default>
<description>Whether to suppress desensitising of MSP action items when armed.</description>
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -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')
Expand Down
2 changes: 1 addition & 1 deletion src/mwp/mwp-handle_mspmsg.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/mwp/mwp-safehomes.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions src/mwp/mwp-settings.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/mwp/mwp-window.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/mwp/winres.rc
Original file line number Diff line number Diff line change
@@ -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
{
Expand All @@ -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"
}
}
Expand Down

0 comments on commit 00d6e4b

Please sign in to comment.