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 s/guix-external.el
AgeCommit message (Expand)Author
2016-01-02emacs: Use "cl-list*" instead of "apply #'list"....* emacs/guix-command.el (guix-run-view-build-log): Use cl-list*. (guix-run-view-size-map): Likewise. * emacs/guix-external.el (guix-dot-arguments): Likewise. Alex Kost
2015-10-20emacs: config: Use "emacs-config-" prefix for constants....* emacs/guix-config.el.in (guix-emacs-interface-directory, guix-state-directory): Rename to ... (guix-config-emacs-interface-directory, guix-config-state-directory): ...this. (guix-config-guile-program): New constant. (guix-guile-program): Move to ... * emacs/guix-external.el (guix-guile-program): ...here. Make it a 'defcustom'. * emacs/guix-profiles.el (guix-default-profile): Use 'guix-config-state-directory'. * emacs/guix-backend.el (guix-load-path): Use 'guix-config-emacs-interface-directory'. Alex Kost
2015-10-20build: Set DOT_USER_PROGRAM for Emacs interface....Suggested by Ludovic Courtès <ludo@gnu.org>. * configure.ac: Set DOT_USER_PROGRAM variable. * emacs/guix-config.el.in (guix-config-dot-program): New constant. * emacs/guix-external.el (guix-dot-program): Use it. Alex Kost
2015-10-17emacs: Improve file names of generated graphs....Suggested by Ludovic Courtès <ludo@gnu.org>. * emacs/guix-external.el (guix-png-file-name): Change prefix of a file name to "guix-emacs-graph-" to avoid possible conflicts. Alex Kost
2015-09-01emacs: Add code to run 'dot' program....* emacs/guix-external.el: New file. * emacs.am (ELFILES): Add it. Alex Kost