mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
updates to preference code from Rob Browning
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@964 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
6e9b4f9943
commit
b0b8338fe0
@ -34,7 +34,7 @@ CFLAGS = @CFLAGS@ @X_CFLAGS@ ${INCLPATH}
|
|||||||
######################################################################
|
######################################################################
|
||||||
# See Makefile.common for information about these variables.
|
# See Makefile.common for information about these variables.
|
||||||
COMMON_SRCS := Ledger.c SplitLedger.c
|
COMMON_SRCS := Ledger.c SplitLedger.c
|
||||||
CLEAN_SUBDIRS := engine gnome motif register qt
|
CLEAN_SUBDIRS := engine gnome motif register guile qt
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
all: default
|
all: default
|
||||||
@ -53,6 +53,7 @@ motif: ${MOTIF_OBJS}
|
|||||||
gnome: ${GNOME_OBJS}
|
gnome: ${GNOME_OBJS}
|
||||||
@cd engine; $(MAKE) default
|
@cd engine; $(MAKE) default
|
||||||
@cd register; $(MAKE) gnome
|
@cd register; $(MAKE) gnome
|
||||||
|
@cd guile; $(MAKE) default
|
||||||
@cd gnome; $(MAKE) gnome
|
@cd gnome; $(MAKE) gnome
|
||||||
|
|
||||||
qt: $(QT_OBJS)
|
qt: $(QT_OBJS)
|
||||||
|
@ -31,7 +31,8 @@ includedir=@includedir@
|
|||||||
|
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
INCLPATH = -I.. -I../.. -I../engine -I../register -I@srcdir@/../../include \
|
INCLPATH = -I.. -I../.. -I../engine -I../register -I../guile \
|
||||||
|
-I@srcdir@/../../include \
|
||||||
-I$(includedir) -I$(prefix)/lib/gnome-libs/include
|
-I$(includedir) -I$(prefix)/lib/gnome-libs/include
|
||||||
|
|
||||||
|
|
||||||
@ -39,22 +40,20 @@ CFLAGS = @CFLAGS@ @X_CFLAGS@ ${INCLPATH}
|
|||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
LIBS = -L$(prefix)/lib @LIBS@ @X_PRE_LIBS@ @X_LIBS@ \
|
LIBS = -L$(prefix)/lib @LIBS@ @X_PRE_LIBS@ @X_LIBS@ \
|
||||||
$(shell gtk-config --libs) @X_EXTRA_LIBS@ -lgnomeui -lgnome \
|
$(shell gtk-config --libs) @X_EXTRA_LIBS@ -lgnomeui -lgnome \
|
||||||
-lgnomesupport -lintl -lgdk_imlib -ltiff
|
-lgnomesupport -lgdk_imlib -ltiff \
|
||||||
|
-ldl -lguile -lqthreads -lguile -lreadline
|
||||||
|
|
||||||
|
|
||||||
TARGET = ../../xacc.gtk.bin
|
TARGET = ../../xacc.gtk.bin
|
||||||
STATIC = ../../xacc-static.gtk.bin
|
STATIC = ../../xacc-static.gtk.bin
|
||||||
|
|
||||||
OTHER_OBJS := ../obj/gnome/*.o ../engine/obj/*.o ../register/obj/gnome/*.o
|
OTHER_OBJS := ../obj/gnome/*.o ../engine/obj/*.o ../register/obj/gnome/*.o \
|
||||||
|
../guile/obj/*.o
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# See Makefile.common for information about these variables.
|
# See Makefile.common for information about these variables.
|
||||||
GNOME_SRCS := main.c MainWindow.c MenuBar.c RegWindow.c Add_Dialog.c xtutil.c \
|
GNOME_SRCS := main.c MainWindow.c MenuBar.c RegWindow.c Add_Dialog.c xtutil.c \
|
||||||
RecnWindow.c
|
RecnWindow.c
|
||||||
# AccWindow.c AccountMenu.c AdjBWindow.c \
|
|
||||||
# BuildMenu.c Destroy.c FileBox.c HelpWindow.c \
|
|
||||||
# RecnWindow.c RegWindow.c Reports.c TextBox.c \
|
|
||||||
# XferWindow.c date.c xtutil.c
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
default: $(TARGET)
|
default: $(TARGET)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/********************************************************************\
|
/*-*-gnucash-c-*-****************************************************\
|
||||||
* main.c -- main for xacc (X-Accountant) *
|
* main.c -- main for xacc (X-Accountant) *
|
||||||
* Copyright (C) 1997 Robin D. Clark *
|
* Copyright (C) 1997 Robin D. Clark *
|
||||||
* *
|
* *
|
||||||
@ -24,8 +24,11 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
|
#include <gnucash.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
#include <guile/gh.h> /* This will go away once "datafile" is handled better. */
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
@ -222,8 +225,9 @@ foreach_split_in_group(AccountGroup *g, void (*f)(Split *)) {
|
|||||||
|
|
||||||
|
|
||||||
/********************************************************************\
|
/********************************************************************\
|
||||||
* main *
|
* gnome_main *
|
||||||
* the entry point for the program... sets up the top level widget *
|
* called after the guile engine is up and running *
|
||||||
|
* sets up the top level widget *
|
||||||
* and calls the mainWindow() function which creates the main *
|
* and calls the mainWindow() function which creates the main *
|
||||||
* window. *
|
* window. *
|
||||||
* *
|
* *
|
||||||
@ -233,21 +237,17 @@ foreach_split_in_group(AccountGroup *g, void (*f)(Split *)) {
|
|||||||
* Global: topgroup - the data from the datafile *
|
* Global: topgroup - the data from the datafile *
|
||||||
* datafile - the name of the user's datafile *
|
* datafile - the name of the user's datafile *
|
||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
int
|
static int
|
||||||
main( int argc, char *argv[] )
|
gnome_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
// gtk_init ( &argc, &argv );
|
SCM datafile_scm = gh_lookup("gnucash:datafile-tmp_");
|
||||||
|
if(datafile_scm != SCM_BOOL_F)
|
||||||
if(argc > 1) {
|
{
|
||||||
/* Gnome is a pain about this if we don't handle it first
|
datafile = gh_scm2newstr(datafile_scm, NULL);
|
||||||
We need real arg parsing here later */
|
|
||||||
datafile = argv[1];
|
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gnome_init ("GnuCash", NULL, argc, argv,
|
/* argc and argv have been cleared by guile at this point */
|
||||||
0, NULL);
|
gnome_init("GnuCash", NULL, argc, argv, 0, &argc);
|
||||||
|
|
||||||
prepare_app();
|
prepare_app();
|
||||||
|
|
||||||
@ -332,6 +332,26 @@ main( int argc, char *argv[] )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/********************************************************************\
|
||||||
|
* main *
|
||||||
|
* the entry point for the program *
|
||||||
|
* call gnucash_main to startup guile and then run gnome_main *
|
||||||
|
* and calls the mainWindow() function which creates the main *
|
||||||
|
* window. *
|
||||||
|
* *
|
||||||
|
* Args: argc, the number of command line arguments, and argv, *
|
||||||
|
* the array of command line args *
|
||||||
|
\********************************************************************/
|
||||||
|
int
|
||||||
|
main( int argc, char *argv[] )
|
||||||
|
{
|
||||||
|
gnucash_main(argc, argv, gnome_main);
|
||||||
|
/* This will never return. */
|
||||||
|
|
||||||
|
assert(0); /* Just to be anal */
|
||||||
|
return 0; /* Just to shut gcc up. */
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
prepare_app()
|
prepare_app()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user