devel questions

Derek Atkins warlord at MIT.EDU
Thu Sep 16 11:38:27 EDT 2004


Chris Shoemaker <c.shoemaker at> writes:

> I've been using gnucash lightly for several (6?) months now.  I'm pretty
> impressed with it, but I've always wondered why there wasn't more development
> activity.  I code for fun (and profit) so any open source software I use
> is theoretically fair game for playing with.

Mostly because the major devs are busy with other aspects in their lives.

> What's the status of libegg stuff?  On its way out?  on its way in?
> static?

It's code that's there until we decide that a minimum requirement is
gtk2.4.  We always have a "base OS" that we use and require our code
to build on that base OS with the minimum of additional dependencies.
As of our last discussion, FC1 was the base OS.  We may decide to
change that to FC2, in which case I think we could drop libegg and
migrate to the gtk2.4 integration.

> Why does removing/commenting out "gtk_container_add(GTK_CONTAINER(box),
> GTK_WIDGET(dlg->relatedView));" from category_dialog_create(), prevent
> the consistent SEGV upon closing the dialog?

Perhaps it's double-freed?  I dont know, you tell me.

> Is it valid to cast a (GtkTreeModel *) using GTK_TREE_MODEL_SORT()?

Maybe, if the runtime object is a GtkTreeModelSort or subclass

> Why do I get:
> (gnucash:18491): GLib-GObject-WARNING **: invalid cast from
> `GncTreeModelAccount' to `GtkTreeModelSort'
>  (gnucash:18491): Gtk-CRITICAL **: file gtktreemodelsort.c: line 2016
>  (gtk_tree_model_sort_get_model): assertion `GTK_IS_TREE_MODEL_SORT
>  (tree_model)' failed
> when executing:   
> f_model = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(s_model));
> where f_model and s_model are (GtkTreeModel *).

Because the runtime object is a GncTreeModelAccount which apparantly
is not a subclass of GtkTreeModelSort (but it IS a subclass of

> Am I confusing compile-time types (which are clear) with the
> run-time typing (which I haven't totally figured out yet)?


> Finally, the most important question:  What tips do you have for
> development environment/style?
> Here's what I got:  
> 	CVS code checked out, editting w/ emacs, ran etags,
> 	gtk docs at /usr/share/gtk-doc/html/gtk, I snipped "-02" out of
> 	CFLAGS in Makefile.  (already had -g)  I'm usually doing "make;
> 	sudo make install" in the highest dir I'm modifying (currently
> 	gnucash/src/gnome/)  Then 10 min. later I run from
> 	/usr/local/bin/gnucash, along with "gdb /usr/local/bin/gnucash
> 	12345"

I would suggest you build into /opt/gnucash-<vers> instead of
/usr/local, and you don't need to wait 10 minutes after the make
install before you run the program.  Also, if you do use the /opt
model then you don't need to use sudo make install, you can just chown
the /opt/gnucash-<vers> directory and make install as yourself.

> Oh, and I grabbed glade2 just to see what that was about.  Am I
> missing anything?  Should I recomp all my libs with similar CFLAGS?
> (I think _most_ of them have symbol info, but I suspect they're also -02 because gdb jumps a little erratically in the libs.

I dont feel the need to remove optimization unless I'm really getting
confused by a particular function.  Usually I can figure out what's
going on even with optimization turned on.  But that's all up to you.

> What tools/techniques are other devs using?
> I realize that I probably don't know as much as I should about autoconf,
> automake, libtool, GTK, GLib, Glade, and many more.  I'm trying to "pick it up
> along the way."  It all seems reasonably accessible.  I'm trying to steer clear
> of gdk, pango, guile (but scheme's ok), and others.  Is this strategy
> feasible, or am I going to have to learn _everything_ before being able
> to intelligently hack on gnucash?

You can learn it peacemeal.  You can certainly delay learning about
auto*, libtool, and probably glade (unless you intend to build/modify
the UIs) for a while.  Gtk and Glib you should learn, but again you
can learn on the fly.  They have pretty decent online docs for most of

I look forward to seeing your patches.  :)

> -chris


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list