FLUID: Removes non-obvious option "Cancel Dialog"
from message boxes, pointing out potential syntax errors in code related dialogs.
This commit is contained in:
parent
5667dfc51b
commit
aa2d058f10
@ -300,10 +300,9 @@ void Fl_Function_Type::open() {
|
||||
// - alert user
|
||||
if (message) {
|
||||
int v = fl_choice("Potential syntax error detected: %s",
|
||||
"Cancel Dialog", "Ignore Error", "Continue Editing", message);
|
||||
if (v==0) goto BREAK2; // Cancel Dialog
|
||||
//if (v==1) { } // Ignore Error
|
||||
if (v==2) continue; // Continue Editing
|
||||
"Continue Editing", "Ignore Error", NULL, message);
|
||||
if (v==0) continue; // Continue Editing
|
||||
//if (v==1) { } // Ignore Error and close dialog
|
||||
}
|
||||
// - copy dialog data to target variables
|
||||
int mod = 0;
|
||||
@ -630,10 +629,9 @@ void Fl_Code_Type::open() {
|
||||
message = c_check(c);
|
||||
if (message) {
|
||||
int v = fl_choice("Potential syntax error detected: %s",
|
||||
"Cancel Dialog", "Ignore Error", "Continue Editing", message);
|
||||
if (v==0) { free(c); goto BREAK2; } // Cancel Dialog
|
||||
//if (v==1) { } // Ignore Error
|
||||
if (v==2) { free(c); continue; } // Continue Editing
|
||||
"Continue Editing", "Ignore Error", NULL, message);
|
||||
if (v==0) continue; // Continue Editing
|
||||
//if (v==1) { } // Ignore Error and close dialog
|
||||
}
|
||||
name(c);
|
||||
free(c);
|
||||
@ -812,10 +810,9 @@ void Fl_CodeBlock_Type::open() {
|
||||
// alert user
|
||||
if (message) {
|
||||
int v = fl_choice("Potential syntax error detected: %s",
|
||||
"Cancel Dialog", "Ignore Error", "Continue Editing", message);
|
||||
if (v==0) goto BREAK2; // Cancel Dialog
|
||||
//if (v==1) { } // Ignore Error
|
||||
if (v==2) continue; // Continue Editing
|
||||
"Continue Editing", "Ignore Error", NULL, message);
|
||||
if (v==0) continue; // Continue Editing
|
||||
//if (v==1) { } // Ignore Error and close dialog
|
||||
}
|
||||
// write to variables
|
||||
name(code_before_input->value());
|
||||
@ -968,10 +965,9 @@ void Fl_Decl_Type::open() {
|
||||
// alert user
|
||||
if (message) {
|
||||
int v = fl_choice("Potential syntax error detected: %s",
|
||||
"Cancel Dialog", "Ignore Error", "Continue Editing", message);
|
||||
if (v==0) goto BREAK2; // Cancel Dialog
|
||||
//if (v==1) { } // Ignore Error
|
||||
if (v==2) continue; // Continue Editing
|
||||
"Continue Editing", "Ignore Error", NULL, message);
|
||||
if (v==0) continue; // Continue Editing
|
||||
//if (v==1) { } // Ignore Error and close dialog
|
||||
}
|
||||
// copy vlaues
|
||||
name(c);
|
||||
@ -1208,11 +1204,10 @@ void Fl_Data_Type::open() {
|
||||
if (n==q) {
|
||||
OOPS:
|
||||
int v = fl_choice("%s",
|
||||
"Cancel Dialog", "Ignore Error", "Continue Editing",
|
||||
"Continue Editing", "Ignore Error", NULL,
|
||||
"Variable name must be a C identifier");
|
||||
if (v==0) { free(s); goto BREAK2; } // Cancel Dialog
|
||||
//if (v==1) { } // Ignore Error
|
||||
if (v==2) { free(s); continue; } // Continue Editing
|
||||
if (v==0) { free(s); continue; } // Continue Editing
|
||||
//if (v==1) { } // Ignore Error and close dialog
|
||||
}
|
||||
name(n);
|
||||
free(s);
|
||||
@ -1468,10 +1463,9 @@ void Fl_DeclBlock_Type::open() {
|
||||
message = c_check(b&&b[0]=='#' ? b+1 : b);
|
||||
if (message) {
|
||||
int v = fl_choice("Potential syntax error detected: %s",
|
||||
"Cancel Dialog", "Ignore Error", "Continue Editing", message);
|
||||
if (v==0) goto BREAK2; // Cancel Dialog
|
||||
//if (v==1) { } // Ignore Error
|
||||
if (v==2) continue; // Continue Editing
|
||||
"Continue Editing", "Ignore Error", NULL, message);
|
||||
if (v==0) continue; // Continue Editing
|
||||
//if (v==1) { } // Ignore Error and close dialog
|
||||
}
|
||||
name(a);
|
||||
storestring(b, after);
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
|
||||
\tableofcontents
|
||||
|
||||
- Explain how to integrate code into FLUID, including code nodes and event handling.
|
||||
- Explain how to integrate FLUID into build systems like Makefiles, CMake,
|
||||
or IDEs.
|
||||
|
||||
*/
|
||||
|
||||
@ -2154,9 +2154,10 @@ int main(int argc,char **argv) {
|
||||
setlocale(LC_NUMERIC, "C"); // make sure numeric values are written correctly
|
||||
g_launch_path = end_with_slash(fl_getcwd()); // store the current path at launch
|
||||
|
||||
if ( (Fl::args(argc,argv,i,arg) == 0) // unsupported argument found
|
||||
|| (batch_mode && (i != argc-1)) // .fl filename missing
|
||||
|| (!batch_mode && (i < argc-1)) ) { // more than one filename found
|
||||
if ( (Fl::args(argc,argv,i,arg) == 0) // unsupported argument found
|
||||
|| (batch_mode && (i != argc-1)) // .fl filename missing
|
||||
|| (!batch_mode && (i < argc-1)) // more than one filename found
|
||||
|| (argv[i] && (argv[i][0] == '-'))) { // unknown option
|
||||
static const char *msg =
|
||||
"usage: %s <switches> name.fl\n"
|
||||
" -u : update .fl file and exit (may be combined with '-c' or '-cs')\n"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user