From a38242c346b2add7875bcc742e9ad46512bca6e2 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 4 Dec 2003 02:10:31 +0000 Subject: [PATCH] New option pane ("Helpers") with text editor and web brower commands. --- Common/Options.cpp | 6 +++++- Fltk/Callbacks.cpp | 3 ++- Fltk/GUI.cpp | 14 +++++++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Common/Options.cpp b/Common/Options.cpp index 047b1593ca..ffdedf9274 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.125 2003-12-03 04:14:17 geuzaine Exp $ +// $Id: Options.cpp,v 1.126 2003-12-04 02:10:30 geuzaine Exp $ // // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle // @@ -780,6 +780,10 @@ char *opt_general_web_browser(OPT_ARGS_STR) { if(action & GMSH_SET) CTX.web_browser = val; +#if defined(HAVE_FLTK) + if(WID && (action & GMSH_GUI)) + WID->gen_input[5]->value(CTX.web_browser); +#endif return CTX.web_browser; } diff --git a/Fltk/Callbacks.cpp b/Fltk/Callbacks.cpp index 0601d99ce6..58a66f91a8 100644 --- a/Fltk/Callbacks.cpp +++ b/Fltk/Callbacks.cpp @@ -1,4 +1,4 @@ -// $Id: Callbacks.cpp,v 1.194 2003-12-03 22:22:49 geuzaine Exp $ +// $Id: Callbacks.cpp,v 1.195 2003-12-04 02:10:31 geuzaine Exp $ // // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle // @@ -967,6 +967,7 @@ void general_options_ok_cb(CALLBACK_ARGS) opt_general_error_filename(0, GMSH_SET, (char *)WID->gen_input[2]->value()); opt_general_options_filename(0, GMSH_SET, (char *)WID->gen_input[3]->value()); opt_general_editor(0, GMSH_SET, (char *)WID->gen_input[4]->value()); + opt_general_web_browser(0, GMSH_SET, (char *)WID->gen_input[5]->value()); } // Geometry options diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index a450479819..ff4fcf228f 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.263 2003-12-03 22:32:52 geuzaine Exp $ +// $Id: GUI.cpp,v 1.264 2003-12-04 02:10:31 geuzaine Exp $ // // Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle // @@ -1482,8 +1482,7 @@ void GUI::create_option_window() gen_input[1] = new Fl_Input(2 * WB, 2 * WB + 7 * BH, IW, BH, "Temporary file"); gen_input[2] = new Fl_Input(2 * WB, 2 * WB + 8 * BH, IW, BH, "Error file"); gen_input[3] = new Fl_Input(2 * WB, 2 * WB + 9 * BH, IW, BH, "Option file"); - gen_input[4] = new Fl_Input(2 * WB, 2 * WB + 10 * BH, IW, BH, "Text editor command"); - for(i = 0; i < 5; i++) { + for(i = 0; i < 4; i++) { gen_input[i]->align(FL_ALIGN_RIGHT); } @@ -1492,6 +1491,15 @@ void GUI::create_option_window() o->end(); } + { + Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Helpers"); + gen_input[4] = new Fl_Input(2 * WB, 2 * WB + 1 * BH, IW, BH, "Text editor command"); + gen_input[5] = new Fl_Input(2 * WB, 2 * WB + 2 * BH, IW, BH, "Web browser command"); + for(i = 4; i < 6; i++) { + gen_input[i]->align(FL_ALIGN_RIGHT); + } + o->end(); + } { Fl_Group *o = new Fl_Group(WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Aspect"); o->hide(); -- GitLab