Re: Build and run in separate directory

2006-02-15 Thread Derek Atkins
Mike Alexander <[EMAIL PROTECTED]> writes:

>> I am unclear why this change has any effect.  What are the values of
>> srcdir, top_srcdir, and top_builddir in intl-scm/Makefile.

I see the problem now; it's unclear just from the patch -- you need
to see the rest of the Makefile.am to understand the issue...

> That's the heart of the problem.  For the situation that causes 
> problems they are
>
> srcdir=../../../gnucash-1.9/intl-scm
> top_srcdir=../../../gnucash-1.9
> top_builddir=..
...

The original Makefile has this:

SCMFILES = $(shell find ${top_srcdir}/src -name test -prune -o -name '*.scm' 
-print )

# This needs to be generated in srcdir
guile-strings.c: $(SCMFILES)
rm -f guile-strings.c
cd ${srcdir} && rm -f guile-strings.c \
&& ${GUILE} -s ./xgettext.scm $(SCMFILES)

So it builds the list relative to ${builddir} but then USES the list
from $(srcdir).  This is why it doesn't work if builddir and srcdir
are in different levels of the hierarchy.  It should build the list
from the same directory it's used in.

An alternate approach is:

guile-strings.c: $(SCMFILES)
rm -f guile-strings.c ${srcdir}/guile-strings.c \
&& ${GUILE} -s ${srcdir}/xgettext.scm $(SCMFILES)
   
I'm not sure which approach is better, honestly.

-derek

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Build and run in separate directory

2006-02-15 Thread Peter O'Gorman

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Derek Atkins wrote:
| Mike Alexander <[EMAIL PROTECTED]> writes:
|
|
|>>I am unclear why this change has any effect.  What are the values of
|>>srcdir, top_srcdir, and top_builddir in intl-scm/Makefile.
|
|
| I see the problem now; it's unclear just from the patch -- you need
| to see the rest of the Makefile.am to understand the issue...
|
|
|>That's the heart of the problem.  For the situation that causes
|>problems they are
|>
|>srcdir=../../../gnucash-1.9/intl-scm
|>top_srcdir=../../../gnucash-1.9
|>top_builddir=..
|
| ...
|
| The original Makefile has this:
|
| SCMFILES = $(shell find ${top_srcdir}/src -name test -prune -o -name
'*.scm' -print )

Why not just use ${abs_top_srcdir} so the .scm files will have absolute paths?

Peter
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Darwin)

iQCVAwUBQ/M0ALiDAg3OZTLPAQJNEQP9EAy30yI6wlVwcVAWvz8iheddPOWTJlq0
OCJuWAgt8EyI+iuZSi50ggydlr4X2afD9VR3Ov//j3ZWfc1kMzvoNR7fDccLaum1
w8R88PE2IExUimdtz6zyW8BwBJsSA3CwkCuiGkXhTmi7zoat/AxF2dZC75lEilRD
50zNIoVNthY=
=3ncK
-END PGP SIGNATURE-
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Build and run in separate directory

2006-02-15 Thread Derek Atkins

Quoting Peter O'Gorman <[EMAIL PROTECTED]>:


| SCMFILES = $(shell find ${top_srcdir}/src -name test -prune -o -name
'*.scm' -print )

Why not just use ${abs_top_srcdir} so the .scm files will have 
absolute paths?


[EMAIL PROTECTED] src]$ grep abs_top_srcdir ../build/intl-scm/Makefile
[EMAIL PROTECTED] src]$

Um, because there is no such thing?

-derek

--
  Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
  Member, MIT Student Information Processing Board  (SIPB)
  URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
  [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Build and run in separate directory

2006-02-15 Thread Peter O'Gorman

Derek Atkins wrote:

Quoting Peter O'Gorman <[EMAIL PROTECTED]>:


| SCMFILES = $(shell find ${top_srcdir}/src -name test -prune -o -name
'*.scm' -print )

Why not just use ${abs_top_srcdir} so the .scm files will have 
absolute paths?



[EMAIL PROTECTED] src]$ grep abs_top_srcdir ../build/intl-scm/Makefile
[EMAIL PROTECTED] src]$

Um, because there is no such thing?


Autoconf will make the substitution if you put

abs_top_srcdir = @abs_top_srcdir@

in your Makefile.am

Honest :)

(autoconf-2.59 here)

Peter
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Build and run in separate directory

2006-02-15 Thread Derek Atkins
Mike,

Could you send the actual make failure you get without this patch
to intl-scm/Makefile.am?   David and I are trying to reproduce this
ourselves and are failing to do so.

-derek
-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Error on invoice reports

2006-02-15 Thread micwise
When I try to pull up any invoice to print (easy, fancy, or printable) I 
receive an error and the report says

Report error
An error occurred while running the report.
. 
The error is:

In /home/michael.wise/usr/local/gnucash//share/gnucash/scm/report.scm:
...
 433: 10  (set! html (gnc:report-render-html report #t))
 433: 11* [gnc:report-render-html # #t]
 398: 12  (if (and (not #) (gnc:report-ctext report)) (gnc:report-ctext report) 
...)
 406: 13  (let ((template #) (doc #f)) (set! doc (if template # #f)) doc)
 409: 14* (set! doc (if template (let* # # # ...) #f))
 409: 15* (if template (let* # # # ...) #f)
 410: 16  (let* (# # # ...) (gnc:html-document-set-style-sheet! doc stylesheet) 
...)
 412: 17* [reg-renderer #]
In unknown file:
   ?: 18  (letrec ((opt-val #)) (let* (# # # # ...) (letrec # # # ...)))
...
   ?: 19  (letrec ((add-order #)) (if invoice (begin # # ...)) ...)
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/report/fancy-invoice.scm:
 788: 20* (if invoice (let* (# # # ...) (set! table #) ...) ...)
 789: 21  (let* (# # # ...) (set! table #) ...)
 856: 22* [gnc:html-table-append-row! # ...
 858: 23*  [list ...
 858: 24*   [make-client-table # 0x8817e6c> ()]
 609: 25(let (# #) (gnc:html-table-set-style! table "table" ...) ...)
 616: 26*   [gnc:html-table-cell-append-objects! # ...
 617: 27*[gnc:owner-get-name-dep # 0x8817e6c>]
In unknown file:
   ?: 28 (letrec ((just-name #)) (let (#) (case type # #)))
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/business-core.scm:
   ...
  43: 29 (gnc:owner-get-dep-name (gnc:job-get-owner (gnc:owner-get-job 
owner)))
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/business-core.scm:43:8:
 In expression (gnc:owner-get-dep-name (gnc:job-get-owner #)):
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/business-core.scm:43:8:
 Unbound variable: gnc:owner-get-dep-name

I am running r13266 on an updated rawhide. I'll be happy to open a bug report 
if I need too.

MIchael

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Error on invoice reports

2006-02-15 Thread Derek Atkins

Quoting [EMAIL PROTECTED]:

When I try to pull up any invoice to print (easy, fancy, or 
printable) I receive an error and the report says

[snip]
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/business-core.scm:43:8:
In expression (gnc:owner-get-dep-name (gnc:job-get-owner

#)):
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/business-core.scm:43:8: Unbound variable: 
gnc:owner-get-dep-name


I am running r13266 on an updated rawhide. I'll be happy to open a 
bug report if I need too.


Sorry about that..  Missed one.  This is fixed in 13268.


MIchael


-derek

--
  Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
  Member, MIT Student Information Processing Board  (SIPB)
  URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
  [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


make check fails in test-load-xml2

2006-02-15 Thread Derek Atkins
Hi,

I was trying to test a buildsystem change and noticed that "make check"
is failing now.  I suspect this is due to adding gconf into the
xml backend.   Here's the backtrace from test-load-xml2.

-derek

(gdb) run
Starting program: 
/home/warlord/src/gnucash/gnucash-svn/build/src/backend/file/test/.libs/lt-test-load-xml2
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xb7f2
[Thread debugging using libthread_db enabled]
[New Thread -1210086848 (LWP 9129)]

(process:9129): GLib-GObject-CRITICAL **: gtype.c:2253: initialization 
assertion failed, use g_type_init() prior to this function

(process:9129): GLib-GObject-CRITICAL **: file gobject.c: line 819 
(g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed

(process:9129): GLib-GObject-CRITICAL **: file gobject.c: line 1561 
(g_object_ref): assertion `G_IS_OBJECT (object)' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210086848 (LWP 9129)]
0x0399a06c in gconf_client_get_type () from /usr/lib/libgconf-2.so.4
(gdb) where
#0  0x0399a06c in gconf_client_get_type () from /usr/lib/libgconf-2.so.4
#1  0x0399a5cb in gconf_client_get_default () from /usr/lib/libgconf-2.so.4
#2  0xb7e7732f in gnc_gconf_get_float (section=0xb7dbc145 "general",
name=0xb7dbc139 "retain_days", caller_error=0x0) at gnc-gconf-utils.c:500
#3  0xb7da43fc in gnc_backend_new () at gnc-backend-file.c:972
#4  0xb7e4d243 in qof_session_load_backend (session=0x87f4188,
access_method=0xb7e55366 "file") at qofsession.c:937
#5  0xb7e4d610 in qof_session_begin (session=0x87f4188,
book_id=0x87f4160 "./test-files/xml2/every.gml2", ignore_lock=0,
create_if_nonexistent=0) at qofsession.c:1036
#6  0x0804906b in test_load_file (
filename=0x87f4160 "./test-files/xml2/every.gml2") at test-load-xml2.c:87
#7  0x0804926a in main (argc=1, argv=0xbf81e1b4) at test-load-xml2.c:147

-- 
   Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
   Member, MIT Student Information Processing Board  (SIPB)
   URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
   [EMAIL PROTECTED]PGP key available
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Re: Error on invoice reports

2006-02-15 Thread micwise

> 
> From: Derek Atkins <[EMAIL PROTECTED]>
> Date: 2006/02/15 Wed AM 09:17:42 CST
> To: [EMAIL PROTECTED]
> CC: gnucash-devel@gnucash.org
> Subject: Re: Error on invoice reports
> 
> Quoting [EMAIL PROTECTED]:
> 
> > When I try to pull up any invoice to print (easy, fancy, or 
> > printable) I receive an error and the report says
> [snip]
> /home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/business-core.scm:43:8:
> In expression (gnc:owner-get-dep-name (gnc:job-get-owner
> > #)):
> > /home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/business-core.scm:43:8:
> >  Unbound variable: 
> > gnc:owner-get-dep-name
> >
> > I am running r13266 on an updated rawhide. I'll be happy to open a 
> > bug report if I need too.
> 
> Sorry about that..  Missed one.  This is fixed in 13268.
> 

Thanks that fixed the invoices.  I'm seeing another problem with other business 
reports.  I'm getting the error.

In unknown file:
   ?: 15  (letrec ((dumper #)) (catch (quote ignore) (lambda () #) (lambda # 
#f)))
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/main.scm:
 156: 16  [catch ignore # #]
In unknown file:
   ?: 17* [#]
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/main.scm:
 159: 18* [lazy-catch #t # #]
In unknown file:
   ?: 19* [#]
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/main.scm:
 160: 20* [apply # ()]
In unknown file:
   ?: 21  [#]
In /home/michael.wise/usr/local/gnucash//share/gnucash/scm/report.scm:
...
 433: 22  (set! html (gnc:report-render-html report #t))
 433: 23* [gnc:report-render-html # #t]
 398: 24  (if (and (not #) (gnc:report-ctext report)) (gnc:report-ctext report) 
...)
 406: 25  (let ((template #) (doc #f)) (set! doc (if template # #f)) doc)
 409: 26* (set! doc (if template (let* # # # ...) #f))
 409: 27* (if template (let* # # # ...) #f)
 410: 28  (let* (# # # ...) (gnc:html-document-set-style-sheet! doc stylesheet) 
...)
 412: 29* [reg-renderer #]
In unknown file:
   ?: 30  (letrec ((opt-val #)) (let* (# # # ...) (case owner-type # ...) ...))
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/report/owner-report.scm:
 531: 31  (let* (# # # ...) (case owner-type # ...) ...)
 558: 32* (if (gnc:owner-is-valid? owner) (begin # # ...) ...)
 559: 33  (begin (setup-query query owner ...) (gnc:html-document-set-title! #) 
...)
 562: 34* (gnc:html-document-set-title! (string-append (_ type-str) " " ...))
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/report/owner-report.scm:562:11:
 In expression (gnc:html-document-set-title! (string-append # " " ...)):
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/report/owner-report.scm:562:11:
 Wrong number of arguments to #
In unknown file:
   ?: 12  (letrec ((dumper #)) (catch (quote ignore) (lambda () #) (lambda # 
#f)))
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/main.scm:
 156: 13  [catch ignore # #]
In unknown file:
   ?: 14* [#]
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/main.scm:
 159: 15* [lazy-catch #t # #]
In unknown file:
   ?: 16* [#]
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/main.scm:
 160: 17* [apply # ()]
In unknown file:
   ?: 18  [#]
In /home/michael.wise/usr/local/gnucash//share/gnucash/scm/report.scm:
...
 433: 19  (set! html (gnc:report-render-html report #t))
 433: 20* [gnc:report-render-html # #t]
 398: 21  (if (and (not #) (gnc:report-ctext report)) (gnc:report-ctext report) 
...)
 406: 22  (let ((template #) (doc #f)) (set! doc (if template # #f)) doc)
 409: 23* (set! doc (if template (let* # # # ...) #f))
 409: 24* (if template (let* # # # ...) #f)
 410: 25  (let* (# # # ...) (gnc:html-document-set-style-sheet! doc stylesheet) 
...)
 412: 26* [reg-renderer #]
In unknown file:
   ?: 27  (letrec ((opt-val #)) (let* (# # # ...) (case owner-type # ...) ...))
In 
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/report/owner-report.scm:
 531: 28  (let* (# # # ...) (case owner-type # ...) ...)
 558: 29* (if (gnc:owner-is-valid? owner) (begin # # ...) ...)
 559: 30  (begin (setup-query query owner ...) (gnc:html-document-set-title! #) 
...)
 562: 31* (gnc:html-document-set-title! (string-append (_ type-str) " " ...))
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/report/owner-report.scm:562:11:
 In expression (gnc:html-document-set-title! (string-append # " " ...)):
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/report/owner-report.scm:562:11:
 Wrong number of arguments to #


Do I need to open a ticket?

Michael
> > MIchael
> 
> -derek


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Re: Error on invoice reports

2006-02-15 Thread Derek Atkins

Quoting [EMAIL PROTECTED]:


562: 31* (gnc:html-document-set-title! (string-append (_ type-str) " " ...))
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/report/owner-report.scm:562:11: In expression (gnc:html-document-set-title! (string-append # " " 
...)):
/home/michael.wise/usr/local/gnucash//share/gnucash/guile-modules/gnucash/report/owner-report.scm:562:11: Wrong number of arguments to #val)>


*SIGH*   I /thought/ I tested these reports..  Clearly not well enough.
Fixed in r13270.

Thank you for testing!

-derek
--
  Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
  Member, MIT Student Information Processing Board  (SIPB)
  URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
  [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Error also on other reports

2006-02-15 Thread Eildert Groeneveld
for the extended portfolio I am also getting errors:
perhaps some general problem? 
(rev  13270)


: In procedure scm-error in expression (scm-error (quote 
misc-error) #f ...):
: not-a-record #f

;;; WARNING (wrong arguments for gnc:make-gnc-monetary:  #f #< 
num: -736000 denom: 100>)
In /usr/local/share/gnucash/guile-modules/gnucash/report/advanced-portfolio.scm:
...
 184: 51  (let* (# # # # ...) (for-each # #) (moneyincoll # dividendcoll 
#f) ...)
 275: 52* (if (or include-empty #) (let # # ...) ...)
 276: 53  (let (# # # #) (total-value # # #) (total-moneyin # moneyincoll 
#f) ...)
 276: 54* [gnc:monetary-neg ...
 277: 55*  [gnc:sum-collector-commodity # # #]
In /usr/local/share/gnucash/scm/commodity-utilities.scm:
 885: 56   (cond ((and foreign exchange-fn) (let (#) (foreign # # ...) ...)) 
(#t #f))
 886: 57   (let ((balance #)) (foreign (quote format) (lambda # #) ...) ...)
 887: 58*  [# format # #f]
In /usr/local/share/gnucash/scm/report-utilities.scm:
 448: 59   (case action ((quote add) (add-commodity-value commodity 
amount)) ...)
 ...
 414: 60   [map # ((#f #))]
In unknown file:
   ?: 61*  [# (#f #)]
In /usr/local/share/gnucash/scm/report-utilities.scm:
 415: 62*  [# #f #< num: -736000 denom: 
100>]
In /usr/local/share/gnucash/scm/commodity-utilities.scm:
 890: 63   (if (gnc:commodity-equiv? domestic curr) (balance # 
domestic ...) ...)
 892: 64   [# add # ...
 893: 65*   [gnc:gnc-monetary-amount #f]
In unknown file:
   ?: 66(and (eq? (quote #) (record-type-descriptor obj)) (struct-ref obj 
1))
   ?: 67*   [eq? #> ...
   ?: 68*[record-type-descriptor #f]
   ?: 69 (if (struct? obj) (struct-vtable obj) (error (quote not-a-record) 
obj))
   ...
   ?: 70 [scm-error misc-error #f "~A ~S" (not-a-record #f) #f]
: In procedure scm-error in expression (scm-error (quote 
misc-error) #f ...):
: not-a-record #f 
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [PATCH] Updated add/edit account window

2006-02-15 Thread Andreas Köhler
Hi,

On Monday, 16 Jan 2006, 16:49 CET, Eskil Bylund wrote:
> Here's a patch that updates the add/edit account window. Changes are:
> 
>  * src/gnome/glade/account.glade
>  * src/gnome-utils/dialog-account.c: Clean up the Account dialog.
> Replace the account type clist with a GtkComboBox. Update the title
> when changing parent account.
> 
> By the way. The GnomeDateEdit in the opening balance notebook allows
> one to set not only the date but also the time. Is this time ever
> used? If not, the GnomeDateEdit should be set to only display the
> date.

@Eskil:
I am sorry, I did not follow/remember this thread, so my patch
([13259]) did not make use of your work. I rather saw a CList and
thought that nobody has cared yet.

Here is a patch that tries to replace the list store with a filtered
GncTreeModelAccountTypes. If you do not want to go this way (do not
think so), there are still two open bugs in my own code ;)

What it does:

* uses a filtered GncTreeModelAccountTypes with eigher
  aw->valid_types or xaccAccountTypesValid | 1<< aw->type

* adds gnc_tree_model_account_types_get_iter_from_type to set an
  iter to a specific type

* some minor changes, including one to
  gnc_tree_model_account_types_get_flags

What do you think?

-- andi5
Index: src/gnome-utils/gnc-tree-model-account-types.c
===
--- src/gnome-utils/gnc-tree-model-account-types.c  (revision 13259)
+++ src/gnome-utils/gnc-tree-model-account-types.c  (working copy)
@@ -199,7 +199,7 @@
 
 void
 gnc_tree_model_account_types_set_selected (GncTreeModelAccountTypes * model,
-  guint32 selected)
+   guint32 selected)
 {
GncTreeModelAccountTypesPrivate *priv;
 
@@ -248,7 +248,7 @@
 {
 GtkTreePath *path;
 gint *path_idx;
-guint i;
+gint i;
 GtkTreeSelection *sel;
 
 
@@ -271,10 +271,10 @@
 
 /* Static functions implementing GtkTreeModel */
 
-static guint
+static GtkTreeModelFlags
 gnc_tree_model_account_types_get_flags (GtkTreeModel * tree_model)
 {
-return 0;
+return GTK_TREE_MODEL_ITERS_PERSIST | GTK_TREE_MODEL_LIST_ONLY;
 }
 
 static int
@@ -294,7 +294,7 @@
 
 switch (index) {
 case GNC_TREE_MODEL_ACCOUNT_TYPES_COL_TYPE:
-return G_TYPE_UINT;
+return G_TYPE_INT;
 case GNC_TREE_MODEL_ACCOUNT_TYPES_COL_NAME:
 return G_TYPE_STRING;
 case GNC_TREE_MODEL_ACCOUNT_TYPES_COL_SELECTED:
@@ -327,6 +327,23 @@
 return FALSE;
 }
 
+gboolean
+gnc_tree_model_account_types_get_iter_from_type (
+GncTreeModelAccountTypes * tree_model,
+GtkTreeIter * iter,
+GNCAccountType type)
+{
+GtkTreePath *path;
+gboolean retval;
+
+path = gtk_tree_path_new_from_indices (type, -1);
+retval = gnc_tree_model_account_types_get_iter (GTK_TREE_MODEL 
(tree_model),
+iter, path);
+gtk_tree_path_free (path);
+
+return retval;
+}
+
 static GtkTreePath *
 gnc_tree_model_account_types_get_path (GtkTreeModel * tree_model,
GtkTreeIter * iter)
@@ -347,7 +364,7 @@
 
 static void
 gnc_tree_model_account_types_get_value (GtkTreeModel * tree_model,
-   GtkTreeIter * iter, int column,
+GtkTreeIter * iter, int column,
 GValue * value)
 {
 GncTreeModelAccountTypes *model = GNC_TREE_MODEL_ACCOUNT_TYPES(tree_model);
@@ -400,7 +417,7 @@
 
 static gboolean
 gnc_tree_model_account_types_iter_children (GtkTreeModel * tree_model,
-   GtkTreeIter * iter,
+GtkTreeIter * iter,
 GtkTreeIter * parent)
 {
 
@@ -439,7 +456,7 @@
 
 static gboolean
 gnc_tree_model_account_types_iter_nth_child (GtkTreeModel * tree_model,
-GtkTreeIter * iter,
+ GtkTreeIter * iter,
  GtkTreeIter * parent, int n)
 {
 GncTreeModelAccountTypes *model;
Index: src/gnome-utils/gnc-tree-model-account-types.h
===
--- src/gnome-utils/gnc-tree-model-account-types.h  (revision 13259)
+++ src/gnome-utils/gnc-tree-model-account-types.h  (working copy)
@@ -38,6 +38,8 @@
 #ifndef __GNC_TREE_MODEL_ACCOUNT_TYPES_H
 #define __GNC_TREE_MODEL_ACCOUNT_TYPES_H
 
+#include "Account.h"
+
 G_BEGIN_DECLS
 
 /* type macros */
@@ -94,7 +96,8 @@
 
 /* Get the static GtkTreeModel representing the list of all possible
account types.  You may not modify this model, but you can use if
-   for multiple views.  You probably want gnc_tree_model_types_valid(). */
+   for multiple views.  You probably want
+   gnc_tree_model_account_types_valid(). */
 GtkTreeModel * 

Re: Error also on other reports

2006-02-15 Thread Andrew Sackville-West
On Wed, 15 Feb 2006 18:39:20 +0100
Eildert Groeneveld <[EMAIL PROTECTED]> wrote:

> for the extended portfolio I am also getting errors:
> perhaps some general problem? 
> (rev  13270)

Well, I just made a bunch of changes to that report, so I probably broke it. 
I'm completeing a 13270 build right now, and will see what happens. 

A

> 
> 
> : In procedure scm-error in expression (scm-error (quote 
> misc-error) #f ...):
> : not-a-record #f
> 
> ;;; WARNING (wrong arguments for gnc:make-gnc-monetary:  #f #< 
> num: -736000 denom: 100>)
> In 
> /usr/local/share/gnucash/guile-modules/gnucash/report/advanced-portfolio.scm:
> ...
>  184: 51  (let* (# # # # ...) (for-each # #) (moneyincoll # dividendcoll 
> #f) ...)
>  275: 52* (if (or include-empty #) (let # # ...) ...)
>  276: 53  (let (# # # #) (total-value # # #) (total-moneyin # moneyincoll 
> #f) ...)
>  276: 54* [gnc:monetary-neg ...
>  277: 55*  [gnc:sum-collector-commodity # # #]
> In /usr/local/share/gnucash/scm/commodity-utilities.scm:
>  885: 56   (cond ((and foreign exchange-fn) (let (#) (foreign # # ...) ...)) 
> (#t #f))
>  886: 57   (let ((balance #)) (foreign (quote format) (lambda # #) ...) ...)
>  887: 58*  [# format # #f]
> In /usr/local/share/gnucash/scm/report-utilities.scm:
>  448: 59   (case action ((quote add) (add-commodity-value commodity 
> amount)) ...)
>  ...
>  414: 60   [map # ((#f #))]
> In unknown file:
>?: 61*  [# (#f #)]
> In /usr/local/share/gnucash/scm/report-utilities.scm:
>  415: 62*  [# #f #< num: -736000 denom: 
> 100>]
> In /usr/local/share/gnucash/scm/commodity-utilities.scm:
>  890: 63   (if (gnc:commodity-equiv? domestic curr) (balance # 
> domestic ...) ...)
>  892: 64   [# add # ...
>  893: 65*   [gnc:gnc-monetary-amount #f]
> In unknown file:
>?: 66(and (eq? (quote #) (record-type-descriptor obj)) (struct-ref obj 
> 1))
>?: 67*   [eq? #> ...
>?: 68*[record-type-descriptor #f]
>?: 69 (if (struct? obj) (struct-vtable obj) (error (quote 
> not-a-record) 
> obj))
>...
>?: 70 [scm-error misc-error #f "~A ~S" (not-a-record #f) #f]
> : In procedure scm-error in expression (scm-error (quote 
> misc-error) #f ...):
> : not-a-record #f 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


pgpeJYPv9dApr.pgp
Description: PGP signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [PATCH] Updated add/edit account window

2006-02-15 Thread Chris Shoemaker
On Wed, Feb 15, 2006 at 06:40:10PM +0100, Andreas Köhler wrote:
> Hi,
> 
> On Monday, 16 Jan 2006, 16:49 CET, Eskil Bylund wrote:
> > Here's a patch that updates the add/edit account window. Changes are:
> > 
> >  * src/gnome/glade/account.glade
> >  * src/gnome-utils/dialog-account.c: Clean up the Account dialog.
> > Replace the account type clist with a GtkComboBox. Update the title
> > when changing parent account.
> > 
> > By the way. The GnomeDateEdit in the opening balance notebook allows
> > one to set not only the date but also the time. Is this time ever
> > used? If not, the GnomeDateEdit should be set to only display the
> > date.
> 
> @Eskil:
> I am sorry, I did not follow/remember this thread, so my patch
> ([13259]) did not make use of your work. I rather saw a CList and
> thought that nobody has cared yet.

I share some blame here.  I asked Eskil to generalize parts of the
patch.  He did that and I committed them to
gnc-tree-model-account-types.[ch].  But, I never followed up with him
about rewriting the original patch to use the generalized functions.

> Here is a patch that tries to replace the list store with a filtered
> GncTreeModelAccountTypes. If you do not want to go this way (do not
> think so), there are still two open bugs in my own code ;)

Much of these changes apply equally to using a treeview or a
combobox. So, we can consider a later patch that would switch from
treeview to combobox, but at least this patch will use the global
filtered model.

> 
> What it does:
> 
> * uses a filtered GncTreeModelAccountTypes with eigher
>   aw->valid_types or xaccAccountTypesValid | 1<< aw->type

good.

> 
> * adds gnc_tree_model_account_types_get_iter_from_type to set an
>   iter to a specific type

You probably felt the need to add this because the existing
gnc_tree_model_account_types_set_selected() operated only on a view
that had attached the unfiltered model instead of the filtered model.
That was an oversight and should be fixed.  I think this change
removes the last use of the unfiltered model, so we can just remove
access to it from gnc_tree_model_account_types.h.

> 
> * some minor changes, including one to
>   gnc_tree_model_account_types_get_flags

good.

> What do you think?

I'll convert the existing gnc_tree_model_account_types_set_selected()
to use the filtered model.  That should simplify this patch just a bit
by hiding some of this stuff:

> +  if (gnc_tree_model_account_types_get_iter_from_type (
> + GNC_TREE_MODEL_ACCOUNT_TYPES (model), &iter, aw->type)) {
> +if ((path = gtk_tree_model_get_path (model, &iter)) != NULL) {
> +  if ((f_path = gtk_tree_model_filter_convert_child_path_to_path (
> +  GTK_TREE_MODEL_FILTER (f_model), path)) != NULL) {
> + gtk_tree_selection_select_path (selection, f_path);
> + gtk_tree_view_scroll_to_cell (view, f_path, NULL, FALSE, 0.0, 0.0);
> + gtk_tree_path_free (f_path);
> +  }
> +  gtk_tree_path_free (path);
> +}


-chris
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Error also on other reports

2006-02-15 Thread Andrew Sackville-West
On Wed, 15 Feb 2006 18:39:20 +0100
Eildert Groeneveld <[EMAIL PROTECTED]> wrote:

> for the extended portfolio I am also getting errors:
> perhaps some general problem? 
> (rev  13270)

I need some more information on what you are doing here? What currency(ies) are 
you using? more than one? what currency are you setting the report to?

A

> 
> 
> : In procedure scm-error in expression (scm-error (quote 
> misc-error) #f ...):
> : not-a-record #f
> 
> ;;; WARNING (wrong arguments for gnc:make-gnc-monetary:  #f #< 
> num: -736000 denom: 100>)
> In 
> /usr/local/share/gnucash/guile-modules/gnucash/report/advanced-portfolio.scm:
> ...
>  184: 51  (let* (# # # # ...) (for-each # #) (moneyincoll # dividendcoll 
> #f) ...)
>  275: 52* (if (or include-empty #) (let # # ...) ...)
>  276: 53  (let (# # # #) (total-value # # #) (total-moneyin # moneyincoll 
> #f) ...)
>  276: 54* [gnc:monetary-neg ...
>  277: 55*  [gnc:sum-collector-commodity # # #]
> In /usr/local/share/gnucash/scm/commodity-utilities.scm:
>  885: 56   (cond ((and foreign exchange-fn) (let (#) (foreign # # ...) ...)) 
> (#t #f))
>  886: 57   (let ((balance #)) (foreign (quote format) (lambda # #) ...) ...)
>  887: 58*  [# format # #f]
> In /usr/local/share/gnucash/scm/report-utilities.scm:
>  448: 59   (case action ((quote add) (add-commodity-value commodity 
> amount)) ...)
>  ...
>  414: 60   [map # ((#f #))]
> In unknown file:
>?: 61*  [# (#f #)]
> In /usr/local/share/gnucash/scm/report-utilities.scm:
>  415: 62*  [# #f #< num: -736000 denom: 
> 100>]
> In /usr/local/share/gnucash/scm/commodity-utilities.scm:
>  890: 63   (if (gnc:commodity-equiv? domestic curr) (balance # 
> domestic ...) ...)
>  892: 64   [# add # ...
>  893: 65*   [gnc:gnc-monetary-amount #f]
> In unknown file:
>?: 66(and (eq? (quote #) (record-type-descriptor obj)) (struct-ref obj 
> 1))
>?: 67*   [eq? #> ...
>?: 68*[record-type-descriptor #f]
>?: 69 (if (struct? obj) (struct-vtable obj) (error (quote 
> not-a-record) 
> obj))
>...
>?: 70 [scm-error misc-error #f "~A ~S" (not-a-record #f) #f]
> : In procedure scm-error in expression (scm-error (quote 
> misc-error) #f ...):
> : not-a-record #f 
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


pgpMGsuX5B4Ti.pgp
Description: PGP signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Error also on other reports

2006-02-15 Thread Eildert Groeneveld
On Wednesday 15 February 2006 21:09, Andrew Sackville-West wrote:
> I need some more information on what you are doing here? What currency(ies)
> are you using? more than one? what currency are you setting the report to?
there are some 16 entries  (stocks that is) all in Euro on is a straight 
account also in Euro 

What else can I tell you?

Eildert
> A
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Error also on other reports

2006-02-15 Thread Andrew Sackville-West
On Wed, 15 Feb 2006 21:26:30 +0100
Eildert Groeneveld <[EMAIL PROTECTED]> wrote:

> On Wednesday 15 February 2006 21:09, Andrew Sackville-West wrote:
> > I need some more information on what you are doing here? What currency(ies)
> > are you using? more than one? what currency are you setting the report to?
> there are some 16 entries  (stocks that is) all in Euro on is a straight 
> account also in Euro 
> 
> What else can I tell you?

Well, the report works fine for me in my all USD accounts. do you have a test 
data file you can send me?

A
> 
> Eildert
> > A
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


pgpbwnBAfQkIa.pgp
Description: PGP signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [PATCH] Updated add/edit account window

2006-02-15 Thread Chris Shoemaker
On Wed, Feb 15, 2006 at 06:40:10PM +0100, Andreas Köhler wrote:
> Here is a patch that tries to replace the list store with a filtered
> GncTreeModelAccountTypes. If you do not want to go this way (do not
> think so), there are still two open bugs in my own code ;)

Just out of curiousity, were you referring to bugs in this patch?
Anyway...

> What it does:
> 
> * uses a filtered GncTreeModelAccountTypes with eigher
>   aw->valid_types or xaccAccountTypesValid | 1<< aw->type
> 
> * adds gnc_tree_model_account_types_get_iter_from_type to set an
>   iter to a specific type
> 
> * some minor changes, including one to
>   gnc_tree_model_account_types_get_flags
> 
> What do you think?

I just applied a rather extended version of this patch as r13271.
Take a look.  I think you'll see that it's much nicer to hide the
complex conversions of paths and iters between the filter model and
the child model _inside_ gnc-tree-model-account-types.c, where it has
to be considered anyway.

But, in the account dialog, this becomes as simple as using

GNCAccountType
gnc_tree_model_account_types_get_selection_single(GtkTreeSelection *sel);

and

void 
gnc_tree_model_account_types_set_selection(GtkTreeSelection *sel,
guint32 selected);

Now, I didn't commit the
gnc_tree_model_account_types_get_iter_from_type(), but we should hold
on to the idea, because, if we decide to use a GtkComboBox, the
GtkTreeSelection functions won't help.  We'd need something very much
like gnc_tree_model_account_types_get_iter_from_type() [ and
...get_type_from_iter() ], _except_ they should work with the
_filter-model's_ iters, not the child model's iters.  The goal here is
that there be only one kind of account-types treemodel - the filtered
kind - so we want to hide the child model and _all_ its iters.

Thanks for the patch.

-chris
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [Gnucash-changes] r13272 - gnucash/branches/cashutil - Halting the cashutil branch until further notice - development continues outside svn

2006-02-15 Thread Derek Atkins

If you're going to kill it, kill it.  Don't "move" development outside of
the SVN tree..  That does nobody any good.

it should either be dead dead, or it should continue in SVN.

-derek

Quoting Neil Williams <[EMAIL PROTECTED]>:


Author: codehelp
Date: 2006-02-15 18:20:31 -0500 (Wed, 15 Feb 2006)
New Revision: 13272
Trac: http://svn.gnucash.org/trac/changeset/13272

Modified:
  gnucash/branches/cashutil/ChangeLog
  gnucash/branches/cashutil/autogen.sh
  gnucash/branches/cashutil/configure.ac
Log:
Halting the cashutil branch until further notice - development 
continues outside svn


Modified: gnucash/branches/cashutil/ChangeLog
===
--- gnucash/branches/cashutil/ChangeLog 2006-02-15 22:06:37 UTC (rev 13271)
+++ gnucash/branches/cashutil/ChangeLog 2006-02-15 23:20:31 UTC (rev 13272)
@@ -1,3 +1,15 @@
+2006-02-15  Neil Williams  <[EMAIL PROTECTED]>
+
+   * autogen.sh :
+   * configure.ac : Add notice:
+   CashUtil development within gnucash has halted.
+   It may or may not be revived after gnucash 2.0.0 -
+   development has restarted outside gnucash, see
+   http://www.linux.codehelp.co.uk/cashutil/
+
+   This branch is NOT suitable for merging back into
+   the svn trunk.
+
2006-01-11  Neil Williams  <[EMAIL PROTECTED]>

Preparing the gnucash2 binary and shutting

Modified: gnucash/branches/cashutil/autogen.sh
===
--- gnucash/branches/cashutil/autogen.sh2006-02-15 22:06:37 UTC (rev 
13271)
+++ gnucash/branches/cashutil/autogen.sh2006-02-15 23:20:31 UTC (rev 
13272)
@@ -1,6 +1,12 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

+echo CashUtil development within gnucash has halted.
+echo It may or may not be revived after gnucash 2.0.0 -
+echo development has restarted outside gnucash, see
+echo http://www.linux.codehelp.co.uk/cashutil/
+exit 1
+
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.


Modified: gnucash/branches/cashutil/configure.ac
===
--- gnucash/branches/cashutil/configure.ac	2006-02-15 22:06:37 UTC 
(rev 13271)
+++ gnucash/branches/cashutil/configure.ac	2006-02-15 23:20:31 UTC 
(rev 13272)

@@ -1,7 +1,12 @@
## -*-m4-*-

-dnl Process this file with autoconf to produce a configure script.
+`echo CashUtil development within gnucash has halted.`
+`echo It may or may not be revived after gnucash 2.0.0 -`
+`echo development has restarted outside gnucash, see`
+`echo http://www.linux.codehelp.co.uk/cashutil/`
+exit 1

+
# FILE:
# configure.in
#

___
gnucash-changes mailing list
[EMAIL PROTECTED]
https://lists.gnucash.org/mailman/listinfo/gnucash-changes





--
  Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
  Member, MIT Student Information Processing Board  (SIPB)
  URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
  [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [Gnucash-changes] r13272 - gnucash/branches/cashutil - Halting the cashutil branch until further notice - development continues outside svn

2006-02-15 Thread Neil Williams
On Wednesday 15 February 2006 11:26 pm, you wrote:
> If you're going to kill it, kill it.  Don't "move" development outside of
> the SVN tree..  That does nobody any good.

Sorry, I simply cannot continue with the gnucash branch - I have said that 
off-list. The code is not in a maintanable state due to problems with svn 
merge, the builds take far too long because of the extra GUI code and keeping 
the branch updated with trunk changes has proved to be simply not worth the 
effort. 'svn merge' is nowhere near as easy as is frequently claimed. The 
basic problem of having separate translations for cashutil and gnucash has 
not gone away - in fact it has added to the complexity of the branch.

No-one here probably believes me, but IMHO it's actually easier to use CVS, 
makepatch and manifest files rather than svn merge. Why? Because I don't have 
to keep track of arbitrary numbers that are outside my control. r numbers may 
be the bees knees to others here but I just wish that trunk/ had separate r 
numbers for a branch and that different trees had their own r sequence, not a 
single sequential number for the entire repository. It perturbs me each time 
a commit to htdocs increments the revision number for trunk. Completely 
bizarre in my book. We'll have r numbers in the tens of millions by the time 
we get to gnucash3. With CVS and makepatch, I can script the entire process 
and just get on with viewing the changes, before applying the entire patch in 
a single operation.

As I'm the one doing the updates, I choose to step away from a system that 
simply does not work for me. It can only be good for development of the 
cashutil project.

> it should either be dead dead, or it should continue in SVN.

The only way cashutil can continue in gnucash svn is what I mentioned off-list 
- changing the branch into a tree. I understand why you don't like that 
option. I'm happy with that, I knew it was a longshot and that it has 
significant problems of it's own.

I'm not killing cashutil, cashutil continues. What has to die is a development 
method that simply failed to work - cashutil in a gnucash svn branch.

I tried it, I messed it up trying to get it to do what I wanted. There is more 
to free software development than an svn branch - it didn't work out for me, 
sorry, time to move on to a model that does work for me. It wasted several 
months and it's time to give up the branch as lost. No-one else appears 
likely to work on cashutil so it's up to me. GnuCash changed to svn to suit 
the development needs of the developers; cashutil is changing away from svn 
to suit the development needs of it's sole developer. Hey-ho, around we go. 
It's a no-op really.

Anyway, free software never dies - it just reaches a pause in development. 
There's nothing wrong with cashutil that a separate development tree can't 
fix. What IS wrong is the idea that it can be built as part of a gnucash 
branch. That idea, sadly, is dead. The project remains.

I've already got a new version of cashutil in the wings, updated to use 
gnucash 1.9.0 code. CashUtil is very much alive and is likely to go to 
SourceForge CVS in due course.

If anyone comes up with a solution for building multiple packages from a 
single tarball with separate translations (and dependencies) for each, then 
I'll look at it again AFTER G2 is released.

Until then, cashutil will revert to the development method prior to the svn 
branch creation and move to SF once a usable release is ready.

I see no reason to kill the project, I see no future in the svn branch. 
Something has to give.

-- 

Neil Williams
=
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/



pgpoyF3ms3HWz.pgp
Description: PGP signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [Gnucash-changes] r13272 - gnucash/branches/cashutil - Halting the cashutil branch until further notice - development continues outside svn

2006-02-15 Thread Josh Sled
On Thu, 2006-02-16 at 00:15 +, Neil Williams wrote:
> No-one here probably believes me, but IMHO it's actually easier to use CVS, 
> makepatch and manifest files rather than svn merge. Why? Because I don't have 
> to keep track of arbitrary numbers that are outside my control. r numbers may 
> be the bees knees to others here but I just wish that trunk/ had separate r 
> numbers for a branch and that different trees had their own r sequence, not a 
> single sequential number for the entire repository. It perturbs me each time 
> a commit to htdocs increments the revision number for trunk. Completely 
> bizarre in my book. We'll have r numbers in the tens of millions by the time 
> we get to gnucash3. With CVS and makepatch, I can script the entire process 
> and just get on with viewing the changes, before applying the entire patch in 
> a single operation.

SVN only has a single revision number -- that of the repository.  We
could have made seperate repositories for each of the htdocs,
gnucash-docs and meta "module[s]"... but, the reasoning goes: why have 4
different repositories where one would suffice?

I don't understand why you need to keep track of any more than 1 number
-- that of revision at which point you branched.  And I don't see why
that can't be in a comment, as the SVN docs suggest.  Frankly, I don't
understand why you're doing any merges at all...?


I think a CLI front-end is a valuable (future) addition to gnucash, and
I think cashutil should be part of the gnucash source tree ... in fact,
using the same translations and build system.  It's just another
front-end...  `./configure --enable-cli --disable-gtk` ... is it not?

-- 
...jsled
http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo [EMAIL PROTECTED]
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [Gnucash-changes] r13272 - gnucash/branches/cashutil - Halting the cashutil branch until further notice - development continues outside svn

2006-02-15 Thread Neil Williams
On Thursday 16 February 2006 12:44 am, Josh Sled wrote:
> On Thu, 2006-02-16 at 00:15 +, Neil Williams wrote:
> > No-one here probably believes me, but IMHO it's actually easier to use
> > CVS, makepatch and manifest files rather than svn merge. 
>
> I don't understand why you need to keep track of any more than 1 number
> -- that of revision at which point you branched. 

That's the point, with my preferred system, I don't even have to do that. It's 
the files that matter, not some arbitrary r number.

> And I don't see why 
> that can't be in a comment, as the SVN docs suggest. 

Because it's actually quite hard to find that comment amongst the other 13,000 
- especially when the last merge was a little while ago. svn doesn't even 
tell me WHEN. Once that r number is lost, as it was, merge becomes impossible 
within any reasonable limits of effort.

> Frankly, I don't 
> understand why you're doing any merges at all...?

Because I can't build and test cashutil if I haven't got the updated gnucash 
objects and backend. Frankly, what on earth is the point of having an svn 
branch if I don't have easy update access to the trunk?

> I think a CLI front-end is a valuable (future) addition to gnucash, and
> I think cashutil should be part of the gnucash source tree ... in fact,
> using the same translations and build system.  It's just another
> front-end...  `./configure --enable-cli --disable-gtk` ... is it not?

No, it is not. It is separate, it deserves to be separate and more important 
than anything else, despite it being in svn I'm the only one working on it 
and I can no longer work within the svn branch.

-- 

Neil Williams
=
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/



pgpi31TVBW6yf.pgp
Description: PGP signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [Gnucash-changes] r13272 - gnucash/branches/cashutil - Halting the cashutil branch until further notice - development continues outside svn

2006-02-15 Thread Josh Sled
On Thu, 2006-02-16 at 01:10 +, Neil Williams wrote:
> On Thursday 16 February 2006 12:44 am, Josh Sled wrote:
> > On Thu, 2006-02-16 at 00:15 +, Neil Williams wrote:
> > > No-one here probably believes me, but IMHO it's actually easier to use
> > > CVS, makepatch and manifest files rather than svn merge. 
> >
> > I don't understand why you need to keep track of any more than 1 number
> > -- that of revision at which point you branched. 
> 
> That's the point, with my preferred system, I don't even have to do that. 
> It's 
> the files that matter, not some arbitrary r number.

It's not arbitrary; the revision number reflects a particular version of
the state of the files.  You can "simplify" it to "[it's] the files that
matter", but you can't get away from the fact that that it is a
particular state of those files.


> Because I can't build and test cashutil if I haven't got the updated gnucash 
> objects and backend. Frankly, what on earth is the point of having an svn 
> branch if I don't have easy update access to the trunk?

Could you explain a bit more?  I don't understand why you need to merge
to get the updated gnucash objects and backend.

If you are not making conflicting changes, then the merge should be
trivial and easy... `svn merge -r «last merge id»:HEAD` ... and there
should never be a conflict or even manual intervention needed.  It
should basically be the equivalent to an `svn update`.  If you *are*
making conflicting changes, then it can't *possibly* be easier to work
out of tree: you'll still have the same conflicting code changes but
zero tool support for merging them together.  And it only gets worse
over time.

To ask another way: if you've branched a point T, you have two options:
either
- stick with the gnucash sources as of time T and develop cash util  
  against them, ignoring what's going on in the gnucash sources.
- track changes to the gnucash sources after time T.
By repeated merging, you seem to be trying to do the latter.  But moving
outside of the source tree seems to imply the former.  So, I'm confused
about how you're working with this branch that's making things hard.


And, no, the point of branching isn't to make access to trunk easier,
but instead to isolate changes; remember that 'trunk' is just the name
of a special branch.  If you should be developing against the trunk,
then you should.  I claim that cashutil should be developed against the
trunk.  It sounds like you're experiencing evidence that it should, as
well.


> > I think a CLI front-end is a valuable (future) addition to gnucash, and
> > I think cashutil should be part of the gnucash source tree ... in fact,
> > using the same translations and build system.  It's just another
> > front-end...  `./configure --enable-cli --disable-gtk` ... is it not?
> 
> No, it is not. It is separate, it deserves to be separate and more important 
> than anything else, despite it being in svn I'm the only one working on it 
> and I can no longer work within the svn branch.

Why not?

CashUtil seems to strive to be a command-line interface to the gnucash
engine, application-logic and backend. In the gnucash world, that's a
front-end.  Sure, we'll need to refactor a lot of the application logic
out over the next year to make a cli a real possibility.  Not to say
that what cashutil demonstrates now isn't nifty, but it's not really
going to be realized fully until some of those other changes happen.

In any case, I don't see how *anything* is made easier by working
outside of the source tree.

-- 
...jsled
http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo [EMAIL PROTECTED]

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: make check fails in test-load-xml2

2006-02-15 Thread Josh Sled
On Wed, 2006-02-15 at 11:24 -0500, Derek Atkins wrote:
> I was trying to test a buildsystem change and noticed that "make check"
> is failing now.  I suspect this is due to adding gconf into the
> xml backend.   Here's the backtrace from test-load-xml2.

It was due to the g-types system not being initialized before calling
gconf code, as is documented in the gconf API.  :/  I fixed this
instance by calling g_type_init() at the top of the test's main.

-- 
...jsled
http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo [EMAIL PROTECTED]
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: make check fails in test-load-xml2

2006-02-15 Thread Derek Atkins

Quoting Josh Sled <[EMAIL PROTECTED]>:


On Wed, 2006-02-15 at 11:24 -0500, Derek Atkins wrote:

I was trying to test a buildsystem change and noticed that "make check"
is failing now.  I suspect this is due to adding gconf into the
xml backend.   Here's the backtrace from test-load-xml2.


It was due to the g-types system not being initialized before calling
gconf code, as is documented in the gconf API.  :/  I fixed this
instance by calling g_type_init() at the top of the test's main.


Is it legal to call g_type_init() multiple times?  If so, then perhaps
we should add it to the gncmod initialization routine?  I'm not sure that
every test should need to remember to initialize this.

-derek
--
  Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
  Member, MIT Student Information Processing Board  (SIPB)
  URL: http://web.mit.edu/warlord/PP-ASEL-IA N1NWH
  [EMAIL PROTECTED]PGP key available

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: Error also on other reports

2006-02-15 Thread Andrew Sackville-West
On Wed, 15 Feb 2006 21:26:30 +0100
Eildert Groeneveld <[EMAIL PROTECTED]> wrote:

> On Wednesday 15 February 2006 21:09, Andrew Sackville-West wrote:
> > I need some more information on what you are doing here? What currency(ies)
> > are you using? more than one? what currency are you setting the report to?
> there are some 16 entries  (stocks that is) all in Euro on is a straight 
> account also in Euro 
> 
> What else can I tell you?

I have been able to reproduce your error. You have at least one stock that was 
purchased but has not had its price entered through the price editor. I'm 
working on a patch to solve this, but to rescue your report for now, be sure to 
enter a price for every commodity in the price editor.

A

> 
> Eildert
> > A
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


pgpzHBXyTZIYf.pgp
Description: PGP signature
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel