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

*** empty log message ***

parent c6666f8f
No related branches found
No related tags found
No related merge requests found
...@@ -38,6 +38,7 @@ public : ...@@ -38,6 +38,7 @@ public :
char *error_filename; // the name of the error file char *error_filename; // the name of the error file
char *display; // forced display host:0.0 under X11 char *display; // forced display host:0.0 under X11
int terminal; // show we print to the terminal console? int terminal; // show we print to the terminal console?
char *editor; // text editor command (with included '%s')
int position[2]; // position of the menu window on the screen int position[2]; // position of the menu window on the screen
int gl_position[2]; // position of the graphic window on the screen int gl_position[2]; // position of the graphic window on the screen
......
...@@ -19,6 +19,11 @@ StringXString GeneralOptions_String[] = { ...@@ -19,6 +19,11 @@ StringXString GeneralOptions_String[] = {
{ F|S, "TmpFileName" , opt_general_tmp_filename , ".gmsh-tmp" }, { F|S, "TmpFileName" , opt_general_tmp_filename , ".gmsh-tmp" },
{ F|S, "ErrorFileName" , opt_general_error_filename , ".gmsh-errors" }, { F|S, "ErrorFileName" , opt_general_error_filename , ".gmsh-errors" },
{ F|S, "OptionsFileName" , opt_general_options_filename , ".gmsh-options" }, { F|S, "OptionsFileName" , opt_general_options_filename , ".gmsh-options" },
#ifdef WIN32
{ F|O, "Editor" , opt_general_editor , "wordpad %s" },
#else
{ F|O, "Editor" , opt_general_editor , "emacs %s &" },
#endif
{ 0, NULL , NULL , NULL } { 0, NULL , NULL , NULL }
} ; } ;
......
// $Id: Options.cpp,v 1.12 2001-04-22 18:13:02 geuzaine Exp $ // $Id: Options.cpp,v 1.13 2001-05-03 08:41:55 geuzaine Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "GmshUI.h" #include "GmshUI.h"
...@@ -435,6 +435,10 @@ char * opt_general_options_filename(OPT_ARGS_STR){ ...@@ -435,6 +435,10 @@ char * opt_general_options_filename(OPT_ARGS_STR){
#endif #endif
return CTX.options_filename; return CTX.options_filename;
} }
char * opt_general_editor(OPT_ARGS_STR){
if(action & GMSH_SET) CTX.editor = val;
return CTX.editor;
}
char * opt_view_name(OPT_ARGS_STR){ char * opt_view_name(OPT_ARGS_STR){
......
...@@ -23,6 +23,7 @@ char * opt_general_tmp_filename(OPT_ARGS_STR); ...@@ -23,6 +23,7 @@ char * opt_general_tmp_filename(OPT_ARGS_STR);
char * opt_general_error_filename(OPT_ARGS_STR); char * opt_general_error_filename(OPT_ARGS_STR);
char * opt_general_session_filename(OPT_ARGS_STR); char * opt_general_session_filename(OPT_ARGS_STR);
char * opt_general_options_filename(OPT_ARGS_STR); char * opt_general_options_filename(OPT_ARGS_STR);
char * opt_general_editor(OPT_ARGS_STR);
char * opt_view_name(OPT_ARGS_STR); char * opt_view_name(OPT_ARGS_STR);
char * opt_view_format(OPT_ARGS_STR); char * opt_view_format(OPT_ARGS_STR);
char * opt_view_filename(OPT_ARGS_STR); char * opt_view_filename(OPT_ARGS_STR);
......
// $Id: Callbacks.cpp,v 1.47 2001-05-03 00:09:42 geuzaine Exp $ // $Id: Callbacks.cpp,v 1.48 2001-05-03 08:41:55 geuzaine Exp $
#include <map> #include <map>
#include "Gmsh.h" #include "Gmsh.h"
...@@ -1325,7 +1325,10 @@ void getdp_file_open_cb(CALLBACK_ARGS){ ...@@ -1325,7 +1325,10 @@ void getdp_file_open_cb(CALLBACK_ARGS){
GetDP(GetDP_Info.file); GetDP(GetDP_Info.file);
} }
void getdp_file_edit_cb(CALLBACK_ARGS){ void getdp_file_edit_cb(CALLBACK_ARGS){
Msg(WARNING, "Should lauch a file editor"); char cmd[1000];
sprintf(cmd, CTX.editor, GetDP_Info.file);
Msg(INFO, "Starting text editor '%s'", cmd);
system(cmd);
} }
void getdp_choose_mesh_cb(CALLBACK_ARGS){ void getdp_choose_mesh_cb(CALLBACK_ARGS){
char *newfile; char *newfile;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment