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.
|
||||
COMMON_SRCS := Ledger.c SplitLedger.c
|
||||
CLEAN_SUBDIRS := engine gnome motif register qt
|
||||
CLEAN_SUBDIRS := engine gnome motif register guile qt
|
||||
######################################################################
|
||||
|
||||
all: default
|
||||
@ -53,7 +53,8 @@ motif: ${MOTIF_OBJS}
|
||||
gnome: ${GNOME_OBJS}
|
||||
@cd engine; $(MAKE) default
|
||||
@cd register; $(MAKE) gnome
|
||||
@cd gnome; $(MAKE) gnome
|
||||
@cd guile; $(MAKE) default
|
||||
@cd gnome; $(MAKE) gnome
|
||||
|
||||
qt: $(QT_OBJS)
|
||||
@cd engine; $(MAKE) default
|
||||
|
@ -31,7 +31,8 @@ includedir=@includedir@
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
@ -39,22 +40,20 @@ CFLAGS = @CFLAGS@ @X_CFLAGS@ ${INCLPATH}
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = -L$(prefix)/lib @LIBS@ @X_PRE_LIBS@ @X_LIBS@ \
|
||||
$(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
|
||||
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.
|
||||
GNOME_SRCS := main.c MainWindow.c MenuBar.c RegWindow.c Add_Dialog.c xtutil.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)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/********************************************************************\
|
||||
/*-*-gnucash-c-*-****************************************************\
|
||||
* main.c -- main for xacc (X-Accountant) *
|
||||
* Copyright (C) 1997 Robin D. Clark *
|
||||
* *
|
||||
@ -24,8 +24,11 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <gnome.h>
|
||||
#include <gnucash.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <guile/gh.h> /* This will go away once "datafile" is handled better. */
|
||||
|
||||
#include "config.h"
|
||||
#include "main.h"
|
||||
@ -222,8 +225,9 @@ foreach_split_in_group(AccountGroup *g, void (*f)(Split *)) {
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
* main *
|
||||
* the entry point for the program... sets up the top level widget *
|
||||
* gnome_main *
|
||||
* called after the guile engine is up and running *
|
||||
* sets up the top level widget *
|
||||
* and calls the mainWindow() function which creates the main *
|
||||
* window. *
|
||||
* *
|
||||
@ -233,22 +237,18 @@ foreach_split_in_group(AccountGroup *g, void (*f)(Split *)) {
|
||||
* Global: topgroup - the data from the datafile *
|
||||
* datafile - the name of the user's datafile *
|
||||
\********************************************************************/
|
||||
int
|
||||
main( int argc, char *argv[] )
|
||||
{
|
||||
// gtk_init ( &argc, &argv );
|
||||
|
||||
if(argc > 1) {
|
||||
/* Gnome is a pain about this if we don't handle it first
|
||||
We need real arg parsing here later */
|
||||
datafile = argv[1];
|
||||
argc--;
|
||||
argv++;
|
||||
static int
|
||||
gnome_main(int argc, char *argv[])
|
||||
{
|
||||
SCM datafile_scm = gh_lookup("gnucash:datafile-tmp_");
|
||||
if(datafile_scm != SCM_BOOL_F)
|
||||
{
|
||||
datafile = gh_scm2newstr(datafile_scm, NULL);
|
||||
}
|
||||
|
||||
gnome_init ("GnuCash", NULL, argc, argv,
|
||||
0, NULL);
|
||||
|
||||
/* argc and argv have been cleared by guile at this point */
|
||||
gnome_init("GnuCash", NULL, argc, argv, 0, &argc);
|
||||
|
||||
prepare_app();
|
||||
|
||||
{
|
||||
@ -332,6 +332,26 @@ main( int argc, char *argv[] )
|
||||
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
|
||||
prepare_app()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user