From 62ca8c2f30c50354a02d857864fde317afcff26d Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Sun, 24 Sep 2006 05:59:14 +0000
Subject: [PATCH] spec fltk theme with -theme + minor tweaks

---
 Common/CommandLine.cpp        | 8 ++++----
 Common/Context.h              | 2 +-
 Common/DefaultOptions.h       | 4 ++--
 Common/Options.cpp            | 8 ++++----
 Common/Options.h              | 2 +-
 Fltk/GUI.cpp                  | 8 ++++----
 doc/texinfo/command_line.texi | 4 ++--
 doc/texinfo/opt_general.texi  | 4 ++--
 doc/texinfo/opt_mesh.texi     | 6 +++---
 9 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/Common/CommandLine.cpp b/Common/CommandLine.cpp
index f77e3a6315..ea1a81e51e 100644
--- a/Common/CommandLine.cpp
+++ b/Common/CommandLine.cpp
@@ -1,4 +1,4 @@
-// $Id: CommandLine.cpp,v 1.80 2006-09-07 16:03:32 remacle Exp $
+// $Id: CommandLine.cpp,v 1.81 2006-09-24 05:59:13 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -103,7 +103,7 @@ void Print_Usage(char *name){
   Msg(DIRECT, "Display options:");    
   Msg(DIRECT, "  -nodb                 Disable double buffering");
   Msg(DIRECT, "  -fontsize int         Specify the font size for the GUI");
-  Msg(DIRECT, "  -scheme string        Specify FLTK GUI scheme");
+  Msg(DIRECT, "  -theme string         Specify FLTK GUI theme");
   Msg(DIRECT, "  -display string       Specify display");
 #endif
   Msg(DIRECT, "Other options:");      
@@ -533,10 +533,10 @@ void Get_Options(int argc, char *argv[])
           exit(1);
         }
       }
-      else if(!strcmp(argv[i] + 1, "scheme")) {
+      else if(!strcmp(argv[i] + 1, "theme") || !strcmp(argv[i] + 1, "scheme")) {
         i++;
         if(argv[i] != NULL) {
-          CTX.scheme = argv[i];
+          CTX.gui_theme = argv[i];
           i++;
         }
         else {
diff --git a/Common/Context.h b/Common/Context.h
index d4fc3f081f..d6e791b8ae 100644
--- a/Common/Context.h
+++ b/Common/Context.h
@@ -52,7 +52,7 @@ public :
   char *editor;               // text editor command (with included '%s')
   char *web_browser;          // web browser command (with included '%s')
   char home_dir[256];         // the home directory
-  char *scheme;               // FLTK GUI theme
+  char *gui_theme;            // FLTK GUI theme
   int  tooltips;              // show tootips in GUI?
 
   int position[2];            // position of the menu window on the screen
diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index 59e42ee8d4..97a4886dbb 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -71,8 +71,8 @@ StringXString GeneralOptions_String[] = {
 
   { 0,   "SessionFileName" , opt_general_session_filename , ".gmshrc" ,
     "Option file into which session specific information is saved; automatically read on startup" },
-  { F|O, "Scheme" , opt_general_scheme , "" ,
-    "FLTK user interface scheme (try e.g. plastic)" },
+  { F|O, "FltkTheme" , opt_general_gui_theme , "" ,
+    "FLTK user interface theme (try e.g. plastic or gtk+)" },
 
   { F|O, "TextEditor" , opt_general_editor , 
 #if defined(WIN32)
diff --git a/Common/Options.cpp b/Common/Options.cpp
index 457f3b4921..8e78bd5988 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.311 2006-09-22 19:28:49 geuzaine Exp $
+// $Id: Options.cpp,v 1.312 2006-09-24 05:59:13 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -969,11 +969,11 @@ char *opt_general_web_browser(OPT_ARGS_STR)
   return CTX.web_browser;
 }
 
-char *opt_general_scheme(OPT_ARGS_STR)
+char *opt_general_gui_theme(OPT_ARGS_STR)
 {
   if(action & GMSH_SET)
-    CTX.scheme = val;
-  return CTX.scheme;
+    CTX.gui_theme = val;
+  return CTX.gui_theme;
 }
 
 char *opt_general_graphics_font(OPT_ARGS_STR)
diff --git a/Common/Options.h b/Common/Options.h
index d070e04baa..78f5b802c0 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -51,7 +51,7 @@ char * opt_general_session_filename(OPT_ARGS_STR);
 char * opt_general_options_filename(OPT_ARGS_STR);
 char * opt_general_editor(OPT_ARGS_STR);
 char * opt_general_web_browser(OPT_ARGS_STR);
-char * opt_general_scheme(OPT_ARGS_STR);
+char * opt_general_gui_theme(OPT_ARGS_STR);
 char * opt_general_graphics_font(OPT_ARGS_STR);
 char * opt_mesh_triangle_options(OPT_ARGS_STR);
 char * opt_solver_socket_name(OPT_ARGS_STR);
diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp
index 34c871f665..042d95cbf1 100644
--- a/Fltk/GUI.cpp
+++ b/Fltk/GUI.cpp
@@ -1,4 +1,4 @@
-// $Id: GUI.cpp,v 1.551 2006-09-23 15:54:20 geuzaine Exp $
+// $Id: GUI.cpp,v 1.552 2006-09-24 05:59:13 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -860,8 +860,8 @@ GUI::GUI(int argc, char **argv)
   FL_NORMAL_SIZE = fontsize;
 
   // handle themes and tooltip font size
-  if(strlen(CTX.scheme))
-    Fl::scheme(CTX.scheme);
+  if(strlen(CTX.gui_theme))
+    Fl::scheme(CTX.gui_theme);
   Fl_Tooltip::size(fontsize);
 
   // register image formats not in core fltk library (jpeg/png)
@@ -2848,7 +2848,7 @@ void GUI::create_option_window()
       view_choice[8] = new Fl_Choice(L + 2 * WB, 2 * WB + 1 * BH, IW, BH, "Axes mode");
       view_choice[8]->menu(menu_axes_mode);
       view_choice[8]->align(FL_ALIGN_RIGHT);
-      view_choice[8]->tooltip("(Alt+g)");
+      view_choice[8]->tooltip("(Alt+a)");
       view_choice[8]->callback(view_options_ok_cb, (void*)"view_axes");
 
       view_value[3] = new Fl_Value_Input(L + 2 * WB, 2 * WB + 2 * BH, IW/3, BH);
diff --git a/doc/texinfo/command_line.texi b/doc/texinfo/command_line.texi
index 82886b8ae1..d0367a74ab 100644
--- a/doc/texinfo/command_line.texi
+++ b/doc/texinfo/command_line.texi
@@ -70,8 +70,8 @@ Combine views having identical names into multi-time-step views
 Disable double buffering
 @item -fontsize int
 Specify the font size for the GUI
-@item -scheme string
-Specify FLTK GUI scheme
+@item -theme string
+Specify FLTK GUI theme
 @item -display string
 Specify display
 @end ftable
diff --git a/doc/texinfo/opt_general.texi b/doc/texinfo/opt_general.texi
index c77f751a37..36d765a124 100644
--- a/doc/texinfo/opt_general.texi
+++ b/doc/texinfo/opt_general.texi
@@ -69,8 +69,8 @@ Option file into which session specific information is saved; automatically read
 Default value: @code{".gmshrc"}@*
 Saved in: @code{-}
 
-@item General.Scheme
-FLTK user interface scheme (try e.g. plastic)@*
+@item General.FltkTheme
+FLTK user interface theme (try e.g. plastic or gtk+)@*
 Default value: @code{""}@*
 Saved in: @code{General.OptionsFileName}
 
diff --git a/doc/texinfo/opt_mesh.texi b/doc/texinfo/opt_mesh.texi
index 14eb045957..92025fafe0 100644
--- a/doc/texinfo/opt_mesh.texi
+++ b/doc/texinfo/opt_mesh.texi
@@ -321,7 +321,7 @@ Saved in: @code{General.OptionsFileName}
 
 @item Mesh.RandomFactor
 Random factor used in 2D and 3D meshing algorithm (test other values when the algorithm fails)@*
-Default value: @code{0.0001}@*
+Default value: @code{1e-10}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.RecombineAlgo
@@ -351,7 +351,7 @@ Saved in: @code{General.OptionsFileName}
 
 @item Mesh.SecondOrderLinear
 Should second order vertices simply be created by linear interpolation?@*
-Default value: @code{1}@*
+Default value: @code{0}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Smoothing
@@ -436,7 +436,7 @@ Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Points
 Mesh node color@*
-Default value: @code{@{0,0,128@}}@*
+Default value: @code{@{0,0,255@}}@*
 Saved in: @code{General.OptionsFileName}
 
 @item Mesh.Color.Lines
-- 
GitLab