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 id=cee3d7136b18d322ba1b1aa6b1d4ec4217092fa1'>base32.scm
AgeCommit message (Expand)Author
2018-09-04Switch to Guile-Gcrypt....This removes (guix hash) and (guix pk-crypto), which now live as part of Guile-Gcrypt (version 0.1.0.) * guix/gcrypt.scm, guix/hash.scm, guix/pk-crypto.scm, tests/hash.scm, tests/pk-crypto.scm: Remove. * configure.ac: Test for Guile-Gcrypt. Remove LIBGCRYPT and LIBGCRYPT_LIBDIR assignments. * m4/guix.m4 (GUIX_ASSERT_LIBGCRYPT_USABLE): Remove. * README: Add Guile-Gcrypt to the dependencies; move libgcrypt as "required unless --disable-daemon". * doc/guix.texi (Requirements): Likewise. * gnu/packages/bash.scm, guix/derivations.scm, guix/docker.scm, guix/git.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/cran.scm, guix/import/crate.scm, guix/import/elpa.scm, guix/import/gnu.scm, guix/import/hackage.scm, guix/import/texlive.scm, guix/import/utils.scm, guix/nar.scm, guix/pki.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/download.scm, guix/scripts/hash.scm, guix/scripts/pack.scm, guix/scripts/publish.scm, guix/scripts/refresh.scm, guix/scripts/substitute.scm, guix/store.scm, guix/store/deduplication.scm, guix/tests.scm, tests/base32.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/crate.scm, tests/derivations.scm, tests/gem.scm, tests/nar.scm, tests/opam.scm, tests/pki.scm, tests/publish.scm, tests/pypi.scm, tests/store-deduplication.scm, tests/store.scm, tests/substitute.scm: Adjust imports. * gnu/system/vm.scm: Likewise. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (expression->derivation-in-linux-vm)[config]: Remove. (iso9660-image)[config]: Remove. (qemu-image)[config]: Remove. (system-docker-image)[config]: Remove. * guix/scripts/pack.scm: Adjust imports. (guile-sqlite3&co): Rename to... (gcrypt-sqlite3&co): ... this. Add GUILE-GCRYPT. (self-contained-tarball)[build]: Call 'make-config.scm' without #:libgcrypt argument. (squashfs-image)[libgcrypt]: Remove. [build]: Call 'make-config.scm' without #:libgcrypt. (docker-image)[config, json]: Remove. [build]: Add GUILE-GCRYPT to the extensions Remove (guix config) from the imported modules. * guix/self.scm (specification->package): Remove "libgcrypt", add "guile-gcrypt". (compiled-guix): Remove #:libgcrypt. [guile-gcrypt]: New variable. [dependencies]: Add it. [*core-modules*]: Remove #:libgcrypt from 'make-config.scm' call. Add #:extensions. [*config*]: Remove #:libgcrypt from 'make-config.scm' call. (%dependency-variables): Remove %libgcrypt. (make-config.scm): Remove #:libgcrypt. * build-aux/build-self.scm (guile-gcrypt): New variable. (make-config.scm): Remove #:libgcrypt. (build-program)[fake-gcrypt-hash]: New variable. Add (gcrypt hash) to the imported modules. Adjust load path assignments. * gnu/packages/package-management.scm (guix)[propagated-inputs]: Add GUILE-GCRYPT. [arguments]: In 'wrap-program' phase, add GUILE-GCRYPT to the search path. Ludovic Courtès