projects
/
instimg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5890e34
)
usbonly checkbox callback
author
John Tsiombikas
<nuclear@member.fsf.org>
Fri, 10 Jan 2020 11:00:04 +0000
(13:00 +0200)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Fri, 10 Jan 2020 11:00:04 +0000
(13:00 +0200)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index
12c6ced
..
10b3a25
100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-16,6
+16,7
@@
static int num_rawdev;
static void update_disks(void);
static void onclick(struct wgt_widget *w);
static void onmodify(struct wgt_widget *w);
static void update_disks(void);
static void onclick(struct wgt_widget *w);
static void onmodify(struct wgt_widget *w);
+static void ck_usbonly_handler(struct wgt_widget *w);
int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hprevinst, char *cmdline, int showcmd)
int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hprevinst, char *cmdline, int showcmd)
@@
-34,7
+35,7
@@
int WINAPI WinMain(HINSTANCE hinst, HINSTANCE hprevinst, char *cmdline, int show
y = wgt_ypos_after(cb_devs, 16);
ck_usbonly = wgt_checkbox(win, "only show USB devices", 1, x, y,
y = wgt_ypos_after(cb_devs, 16);
ck_usbonly = wgt_checkbox(win, "only show USB devices", 1, x, y,
- WGT_AUTO, WGT_AUTO, 0);
+ WGT_AUTO, WGT_AUTO, ck_usbonly_handler);
y = wgt_ypos_after(ck_usbonly, 16);
bn_inst = wgt_button(win, "Install", 10, y, WGT_AUTO, WGT_AUTO, onclick);
y = wgt_ypos_after(ck_usbonly, 16);
bn_inst = wgt_button(win, "Install", 10, y, WGT_AUTO, WGT_AUTO, onclick);
@@
-128,3
+129,9
@@
static void onmodify(struct wgt_widget *w)
MessageBox(0, selstr, "selected item", MB_OK);
}
}
MessageBox(0, selstr, "selected item", MB_OK);
}
}
+
+static void ck_usbonly_handler(struct wgt_widget *w)
+{
+ printf("FOO\n");
+ update_disks();
+}