summaryrefslogtreecommitdiff
path: root/test/ask.cxx
diff options
context:
space:
mode:
authormaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 04:21:03 +0500
committermaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 04:21:03 +0500
commit4810610dafb8ed93dd3672e32256997e22eca950 (patch)
treee0db960825627acbe94a71f773ca3ac36617869f /test/ask.cxx
parentf93978aba486bf0fea8d9ee857d014a02f3f7d96 (diff)
wip
Diffstat (limited to 'test/ask.cxx')
-rw-r--r--test/ask.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/ask.cxx b/test/ask.cxx
index 93483b757..8681bc940 100644
--- a/test/ask.cxx
+++ b/test/ask.cxx
@@ -34,17 +34,16 @@
void rename_button(Fl_Widget *o, void *v) {
int what = fl_int(v);
- int ret = 0;
- std::string input;
+ const char *input;
if (what == 0) {
fl_message_icon_label("§");
- input = fl_input_str(ret, 0, "Input (no size limit, use ctrl/j for newline):", o->label());
+ input = fl_input("Input (no size limit, use ctrl/j for newline):", o->label());
} else {
fl_message_icon_label("€");
- input = fl_password_str(ret, 20, "Enter password (max. 20 characters):", o->label());
+ input = fl_password(20, "Enter password (max. 20 characters):", o->label());
}
- if (ret == 0) {
- o->copy_label(input.c_str());
+ if (input) {
+ o->copy_label(input);
o->redraw();
}
}