diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-09-26 15:01:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-26 16:01:03 +0200 |
| commit | 71b8e77935bc9b0a3afc97d322037f2549165d2f (patch) | |
| tree | a7e5e0cfec35b0ab30d6369d7b9ecd9eb3ddd48b /fluid/sourceview_panel.fl | |
| parent | 2bbdd4946561444fffba2bf047b0926a2cf9f5fe (diff) | |
FLUID: adds greatly enhanced Shell Commands (#774)
The user can add an arbitrary number of highly configurable
shell commands through the setting panel. The commands can
be saved as user preferences, inside the .fl file, or exported
to an external file. Shell scripts can be limited to individual
platforms, can have shortcut keys, etc. .
* documentation will follow
* support to call `fltk-config` will follow
Diffstat (limited to 'fluid/sourceview_panel.fl')
| -rw-r--r-- | fluid/sourceview_panel.fl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fluid/sourceview_panel.fl b/fluid/sourceview_panel.fl index e78224677..61f6242a9 100644 --- a/fluid/sourceview_panel.fl +++ b/fluid/sourceview_panel.fl @@ -102,17 +102,17 @@ and load those into the Code Viewer widgets.} open return_type void if (!sv_source_filename) { sv_source_filename = (char*)malloc(FL_PATH_MAX); - fluid_prefs.getUserdataPath(sv_source_filename, FL_PATH_MAX); + fl_strlcpy(sv_source_filename, get_tmpdir().c_str(), FL_PATH_MAX); fl_strlcat(sv_source_filename, "source_view_tmp.cxx", FL_PATH_MAX); } if (!sv_header_filename) { sv_header_filename = (char*)malloc(FL_PATH_MAX); - fluid_prefs.getUserdataPath(sv_header_filename, FL_PATH_MAX); + fl_strlcpy(sv_header_filename, get_tmpdir().c_str(), FL_PATH_MAX); fl_strlcat(sv_header_filename, "source_view_tmp.h", FL_PATH_MAX); } if (!sv_design_filename) { sv_design_filename = (char*)malloc(FL_PATH_MAX); - fluid_prefs.getUserdataPath(sv_design_filename, FL_PATH_MAX); + fl_strlcpy(sv_design_filename, get_tmpdir().c_str(), FL_PATH_MAX); fl_strlcat(sv_design_filename, "source_view_tmp.fl", FL_PATH_MAX); } @@ -123,8 +123,9 @@ and load those into the Code Viewer widgets.} open return_type void sv_project->scroll(top, 0); } else if (sv_strings->visible_r()) { static const char *exts[] = { ".txt", ".po", ".msg" }; - char fn[FL_PATH_MAX]; - fluid_prefs.getUserdataPath(fn, FL_PATH_MAX); + char fn[FL_PATH_MAX+1]; + fl_strlcpy(fn, get_tmpdir().c_str(), FL_PATH_MAX); + fl_strlcat(fn, "strings", FL_PATH_MAX); fl_filename_setext(fn, FL_PATH_MAX, exts[g_project.i18n_type]); write_strings(fn); int top = sv_strings->top_line(); |
