From 71b8e77935bc9b0a3afc97d322037f2549165d2f Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 26 Sep 2023 15:01:03 +0100 Subject: 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 --- fluid/sourceview_panel.fl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'fluid/sourceview_panel.fl') 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(); -- cgit v1.2.3