summaryrefslogtreecommitdiff
path: root/test/ask.cxx
diff options
context:
space:
mode:
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();
}
}