X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=instimg;a=blobdiff_plain;f=src%2Fmain.c;h=5f4de5d360894a3962cd6b7c45914ee572a15234;hp=12c6cedffafed962303a2bcba241162ce0daf794;hb=b1499ac7c1fce954a3f79e9a059466de3554e8d6;hpb=9f8f8c6cde6f5d9174aa8bc88f530436aecb70d9 diff --git a/src/main.c b/src/main.c index 12c6ced..5f4de5d 100644 --- 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 ck_usbonly_handler(struct wgt_widget *w); 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, - 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); @@ -128,3 +129,8 @@ static void onmodify(struct wgt_widget *w) MessageBox(0, selstr, "selected item", MB_OK); } } + +static void ck_usbonly_handler(struct wgt_widget *w) +{ + update_disks(); +}