diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-01-26 16:23:35 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-01-26 16:32:17 +0100 |
| commit | e2028c66fea5fd3d4ee16de098ed596e8fc0688c (patch) | |
| tree | ad4b798a63f1e11d88656a0e3e9b2ee28b166ee6 /fluid | |
| parent | 1581662d007ca201d0e0655414154dd2efbd8e10 (diff) | |
STR 2936: FLUID: option to ignore syntax check in DeclBlock
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fl_Function_Type.cxx | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx index c19077b59..eeb11ee1a 100644 --- a/fluid/Fl_Function_Type.cxx +++ b/fluid/Fl_Function_Type.cxx @@ -1401,23 +1401,28 @@ void Fl_DeclBlock_Type::open() { declblock_panel->show(); const char* message = 0; for (;;) { // repeat as long as there are errors - if (message) fl_alert("%s", message); for (;;) { Fl_Widget* w = Fl::readqueue(); if (w == declblock_panel_cancel) goto BREAK2; else if (w == declblock_panel_ok) break; else if (!w) Fl::wait(); } - const char*c = decl_before_input->value(); - while (isspace(*c)) c++; - message = c_check(c&&c[0]=='#' ? c+1 : c); - if (message) continue; - name(c); - c = decl_after_input->value(); - while (isspace(*c)) c++; - message = c_check(c&&c[0]=='#' ? c+1 : c); - if (message) continue; - storestring(c,after); + const char* a = decl_before_input->value(); + while (isspace(*a)) a++; + const char* b = decl_after_input->value(); + while (isspace(*b)) b++; + message = c_check(a&&a[0]=='#' ? a+1 : a); + if (!message) + message = c_check(b&&b[0]=='#' ? b+1 : b); + if (message) { + int v = fl_choice("%s", "try again", "keep anyway", "cancel", message); + printf("%d\n", v); + if (v==0) continue; // try again + if (v==1) ; // keep input + if (v==2) goto BREAK2; + } + name(a); + storestring(b, after); if (public_ != declblock_public_choice->value()) { set_modflag(1); public_ = declblock_public_choice->value(); |
