Commit eceb5f1f by Christophe Geuzaine

new options to display option or message window at startup (request from Michael Asam)

1 parent f3702eda
......@@ -93,7 +93,7 @@ opt(ZIPPER "Enable Zip file compression/decompression" OFF)
set(GMSH_MAJOR_VERSION 3)
set(GMSH_MINOR_VERSION 0)
set(GMSH_PATCH_VERSION 1)
set(GMSH_PATCH_VERSION 2)
set(GMSH_EXTRA_VERSION "" CACHE STRING "Gmsh extra version string")
set(GMSH_VERSION "${GMSH_MAJOR_VERSION}.${GMSH_MINOR_VERSION}")
......
......@@ -146,6 +146,8 @@ class CTX {
int meshDiscrete;
// initial menu (0: automatic, 1: geom, 2: mesh, 3: solver, 4: post)
int initialContext;
// show some windows on startup?
int showOptionsOnStartup, showMessagesOnStartup;
// never popup dialogs in scripts (use default values instead)?
int noPopup;
// make all windows "non modal"?
......
......@@ -744,6 +744,10 @@ StringXNumber GeneralOptions_Number[] = {
"Material shininess" },
{ F|O, "ShininessExponent" , opt_general_shine_exponent , 40. ,
"Material shininess exponent (between 0 and 128)" },
{ F|O, "ShowOptionsOnStartup", opt_general_show_options_on_startup, 0. ,
"Show option window on startup" },
{ F|O, "ShowMessagesOnStartup", opt_general_show_messages_on_startup, 0. ,
"Show message window on startup" },
{ F|O, "SmallAxes" , opt_general_small_axes , 1. ,
"Display the small axes" },
{ F|O, "SmallAxesPositionX" , opt_general_small_axes_position0 , -60. ,
......
......@@ -2095,6 +2095,20 @@ double opt_general_initial_context(OPT_ARGS_NUM)
return CTX::instance()->initialContext;
}
double opt_general_show_options_on_startup(OPT_ARGS_NUM)
{
if(action & GMSH_SET)
CTX::instance()->showOptionsOnStartup = (int)val;
return CTX::instance()->showOptionsOnStartup;
}
double opt_general_show_messages_on_startup(OPT_ARGS_NUM)
{
if(action & GMSH_SET)
CTX::instance()->showMessagesOnStartup = (int)val;
return CTX::instance()->showMessagesOnStartup;
}
double opt_general_fontsize(OPT_ARGS_NUM)
{
if(action & GMSH_SET){
......
......@@ -140,6 +140,8 @@ std::string opt_print_parameter_command(OPT_ARGS_STR);
// NUMBERS
double opt_general_initial_context(OPT_ARGS_NUM);
double opt_general_show_options_on_startup(OPT_ARGS_NUM);
double opt_general_show_messages_on_startup(OPT_ARGS_NUM);
double opt_general_fontsize(OPT_ARGS_NUM);
double opt_general_gui_color_scheme(OPT_ARGS_NUM);
double opt_general_graphics_fontsize(OPT_ARGS_NUM);
......
......@@ -494,6 +494,11 @@ FlGui::FlGui(int argc, char **argv)
for(unsigned int i = 0; i < graph.size(); i++)
for(unsigned int j = 0; j < graph[i]->gl.size(); j++)
graph[i]->gl[j]->redraw();
if(CTX::instance()->showOptionsOnStartup)
options->win->show();
if(CTX::instance()->showMessagesOnStartup)
graph[0]->showMessages();
}
FlGui *FlGui::_instance = 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!