Skip to content
Snippets Groups Projects
Commit 5ce5a354 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Save the chosen FLTK theme in the per-session resources
parent cf9fb7e1
No related branches found
No related tags found
No related merge requests found
// $Id: CommandLine.cpp,v 1.20 2003-06-13 22:41:41 geuzaine Exp $
// $Id: CommandLine.cpp,v 1.21 2003-08-11 16:23:20 geuzaine Exp $
//
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
//
......@@ -96,7 +96,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 (default: 12)");
Msg(DIRECT, " -scheme string specify FLTK scheme");
Msg(DIRECT, " -scheme string specify FLTK GUI scheme");
Msg(DIRECT, " -alpha enable alpha blending");
Msg(DIRECT, " -notrack don't use trackball mode for rotations");
Msg(DIRECT, " -display string specify display");
......@@ -580,7 +580,7 @@ void Get_Options(int argc, char *argv[], int *nbfiles)
else if(!strcmp(argv[i] + 1, "scheme")) {
i++;
if(argv[i] != NULL) {
CTX.theme = argv[i];
CTX.scheme = argv[i];
i++;
}
else {
......
......@@ -64,7 +64,7 @@ public :
int terminal; // show we print to the terminal console?
char *editor; // text editor command (with included '%s')
char home_dir[256]; // the home directory
char *theme; // GUI theme
char *scheme; // FLTK GUI theme
int tooltips; // show tootips in GUI?
int position[2]; // position of the menu window on the screen
......
......@@ -60,8 +60,8 @@ StringXString GeneralOptions_String[] = {
{ F|O, "TextEditor" , opt_general_editor , "emacs %s &" ,
#endif
"System command to launch a text editor (OS-dependent)" },
{ F|O, "Theme" , opt_general_theme , "" ,
"FLTK graphical user interface theme (try e.g. plastic)" },
{ F|S, "Scheme" , opt_general_scheme , "" ,
"FLTK graphical user interface scheme (try e.g. plastic)" },
{ F|S, "TmpFileName" , opt_general_tmp_filename , ".gmsh-tmp" ,
"Temporary file used by the geometry module" },
......
// $Id: Options.cpp,v 1.112 2003-06-23 16:52:17 geuzaine Exp $
// $Id: Options.cpp,v 1.113 2003-08-11 16:23:20 geuzaine Exp $
//
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
//
......@@ -776,11 +776,11 @@ char *opt_general_editor(OPT_ARGS_STR)
return CTX.editor;
}
char *opt_general_theme(OPT_ARGS_STR)
char *opt_general_scheme(OPT_ARGS_STR)
{
if(action & GMSH_SET)
CTX.theme = val;
return CTX.theme;
CTX.scheme = val;
return CTX.scheme;
}
char *opt_mesh_triangle_options(OPT_ARGS_STR){
......
......@@ -43,7 +43,7 @@ char * opt_general_error_filename(OPT_ARGS_STR);
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_theme(OPT_ARGS_STR);
char * opt_general_scheme(OPT_ARGS_STR);
char * opt_mesh_triangle_options(OPT_ARGS_STR);
char * opt_solver_name(OPT_ARGS_STR);
char * opt_solver_name0(OPT_ARGS_STR);
......
// $Id: GUI.cpp,v 1.245 2003-07-21 23:31:16 geuzaine Exp $
// $Id: GUI.cpp,v 1.246 2003-08-11 16:23:20 geuzaine Exp $
//
// Copyright (C) 1997-2003 C. Geuzaine, J.-F. Remacle
//
......@@ -688,8 +688,8 @@ GUI::GUI(int argc, char **argv)
// handle themes and tooltip font size
#if !((FL_MAJOR_VERSION == 1 || FL_MAJOR_VERSION == 2) && (FL_MINOR_VERSION == 0))
if(strlen(CTX.theme))
Fl::scheme(CTX.theme);
if(strlen(CTX.scheme))
Fl::scheme(CTX.scheme);
Fl_Tooltip::size(fontsize);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment