source / check (pull_request) Skipped
verify / verify (pull_request) Canceled after 12m59s
Restore-to-stock dialog overhaul (issues #46, #47, #48, #51): a two-source restore -- the board's on-board stock backup (checkbox, auto-detected via the merged alkane-flash onboard_stock_backup_present and greyed out with set_enabled when absent) or a Bitmain stock firmware file picked with a Browse button (OTA .tar.gz or SD .zip, any X17-series model). The alkane root login comes from Settings (no per-dialog password field); on-board restore uses the new stock_ops::start_restore_onboard over DSH's restore_from_onboard_backup. Install dialog: password field removed too (#46); the login comes from Settings. Dialogs during scan (#43): install/uninstall dialogs open and can be prepared while a scan runs (new flash_busy gate); the scan is stopped only when the operation actually starts (stop_scan_for_op) so the two never touch a board at once. Bug report (#50): the always-present "Open issue" button is gone; filing turns it into a clickable "View issue #N" link. wx-rs: add set_enabled (grey out a control); captured as patch 0013. Merges DSH's alkane-flash on-board backup/restore method (sealed in stock_method.rs). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
Subject: [PATCH 0013] linux: Enable/disable (grey out) a control
|
|
|
|
--- a/cpp_src/widgets_bridge.cpp
|
|
+++ b/cpp_src/widgets_bridge.cpp
|
|
@@ -945,6 +945,11 @@
|
|
((wxCheckBox*)win)->SetValue(v != 0);
|
|
}
|
|
|
|
+// Enable or disable (grey out) any window/control.
|
|
+void wxbr_enable(void* win, int on) {
|
|
+ ((wxWindow*)win)->Enable(on != 0);
|
|
+}
|
|
+
|
|
// ---- check list box ---------------------------------------------------------
|
|
|
|
void* wxbr_check_list_box(void* parent) {
|
|
--- a/src/widgets.rs
|
|
+++ b/src/widgets.rs
|
|
@@ -49,6 +49,7 @@
|
|
pub fn wxbr_check_box(parent: *mut c_void, label: *const c_char) -> *mut c_void;
|
|
pub fn wxbr_check_box_get(win: *mut c_void) -> c_int;
|
|
pub fn wxbr_check_box_set(win: *mut c_void, v: c_int);
|
|
+ pub fn wxbr_enable(win: *mut c_void, on: c_int);
|
|
pub fn wxbr_check_list_box(parent: *mut c_void) -> *mut c_void;
|
|
pub fn wxbr_clb_append(win: *mut c_void, label: *const c_char);
|
|
pub fn wxbr_clb_clear(win: *mut c_void);
|
|
@@ -508,6 +509,11 @@
|
|
unsafe { notsafe::wxbr_check_box_set(self.0, v as c_int) }
|
|
}
|
|
|
|
+ /// Enable or disable (grey out) this control.
|
|
+ pub fn set_enabled(&self, on: bool) {
|
|
+ unsafe { notsafe::wxbr_enable(self.0, on as c_int) }
|
|
+ }
|
|
+
|
|
pub fn check_list_box(parent: Widget) -> Widget {
|
|
Widget(unsafe { notsafe::wxbr_check_list_box(parent.0) })
|
|
}
|