From 96fda11a53a89c6647031f2c05ef12f1a9df6a08 Mon Sep 17 00:00:00 2001 From: Skylar Hill Date: Tue, 31 Jan 2023 21:02:18 -0600 Subject: [PATCH] Change default directory in file browser --- src/Gui_gtk/ots_gui2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Gui_gtk/ots_gui2.c b/src/Gui_gtk/ots_gui2.c index ff3366b..1247933 100644 --- a/src/Gui_gtk/ots_gui2.c +++ b/src/Gui_gtk/ots_gui2.c @@ -82,6 +82,7 @@ char ots_release_package[]="20.00"; #include #include #include +#include #include // #include "backcompat.c" #include "gtk_utils.c" /* Include the graphics library. */ @@ -109,6 +110,7 @@ char toolpath[MaxFname]="", *start_cmd; int pending_compute=0, supported_pdf_form=1; int filingstatus_mfj=1; int round_to_whole_nums=0; +char *working_dir[MaxFname+512]; void pick_file( GtkWidget *wdg, void *data ); /* Prototype */ void consume_leading_trailing_whitespace( char *line ); @@ -2364,7 +2366,7 @@ void save_taxfile( GtkWidget *wdg, void *data ) if (cpt != 0) strcpy( cpt, "_xxxx.txt" ); // printf("OTS_save_taxfile: dir='%s', wc='%s', fname='%s'\n", directory_dat, wildcards_fb, filename_fb ); - Browse_Files( "File to Save As:", 2048, directory_dat, wildcards_fb, filename_fb, Save_Tax_File ); + Browse_Files( "File to Save As:", 2048, working_dir, wildcards_fb, filename_fb, Save_Tax_File ); } @@ -3878,7 +3880,7 @@ void pick_file( GtkWidget *wdg, void *data ) strcpy( wildcards_fb, ".txt" ); strcpy( filename_fb, "" ); // printf("OTS_pick_file: dir='%s', wc='%s', fname='%s'\n", directory_dat, wildcards_fb, filename_fb ); - Browse_Files( "Select File", 2048, directory_dat, wildcards_fb, filename_fb, receive_filename ); + Browse_Files( "Select File", 2048, working_dir, wildcards_fb, filename_fb, receive_filename ); } @@ -4019,6 +4021,7 @@ int main(int argc, char *argv[] ) invocation_path[k] = '\0'; // printf("Invocation path = '%s'\n", invocation_path); set_ots_path(); + getcwd(working_dir, MaxFname+512); /* Decode any command-line arguments. */ argn = 1; k=1; -- 2.38.1 5229396729309d63589'>build-aux/test-driver.scm
AgeCommit message (Expand)Author
2021-02-02build: Add a --show-duration option to the SCM test-driver....* build-aux/test-driver.scm (script-version): Update. (show-help): Document it. (%options): Add the 'show-duration' option. (test-runner-gnu): Pass as a new argument. [test-cases-start-time]: New inner variable. [test-on-test-begin-gnu]: New hook, used to record the start time. [test-on-test-end-gnu]: Conditionally print elapsed time. Record it as the optional metadata in the test result file (.trs). * doc/guix.texi (Running the Test Suite): Document it. Maxim Cournoyer
2021-01-31build: test-driver.scm: Allow running as a standalone script....* build-aux/test-driver.scm: Add an exec-based shebang and set the script executable bit. (main): Insert a newline after the version string is printed with --version. Maxim Cournoyer
2021-01-31build: test-driver.scm: Add a new '--errors-only' option....* build-aux/test-driver.scm (show-help): Add the help text for the new '--errors-only' option. (%options): Add the errors-only option. (test-runner-gnu): Add the errors-only? parameter and update doc. Move the logging of the test data after the test has completed, so a choice can be made whether to keep it or discard it based on the value of the test result. (main): Pass the errors-only? option to the driver. * doc/guix.texi (Running the Test Suite): Document the new option. Maxim Cournoyer
2021-01-31build: test-driver.scm: Add test cases filtering options....* build-aux/test-driver.scm (show-help): Add help text for the new --select and --exclude options. (%options): Add the new select and exclude options. (test-runner-gnu): Pass them to the test runner. Update doc. (test-match-name*, test-match-name*/negated, %test-match-all): New variables. (main): Compute the test specifier based on the values of the new options and apply it to the current test runner when running the test file. * doc/guix.texi (Running the Test Suite): Document the new options. Maxim Cournoyer
2021-01-31build: test-driver.scm: Enable colored test results by default....The Automake parallel test harness does its own smart detection of the terminal color capability and always provides the --color-tests argument to the driver. This change defaults the --color-tests argument to true when the test driver is run on its own (not via Automake). * build-aux/test-driver.scm (main): Set the default value of the --color-tests argument to true when it's not explicitly provided. Maxim Cournoyer
2021-01-31build: test-driver.scm: Make output redirection optional....This makes it easier (and less surprising) for users to experiment with the custom Scheme test driver directly. The behavior is unchanged from Automake's point of view. * build-aux/test-driver.scm (main): Make the --log-file and --trs-file arguments optional and update doc. Only open, redirect and close a port to a log file when the --log-file option is provided. Only open and close a port to a trs file when the --trs-file option is provided. (test-runner-gnu): Set OUT-PORT parameter default value to the current output port. Set the TRS-PORT parameter default value to a void port. Update doc. Maxim Cournoyer