more library structure

Derek Atkins warlord at MIT.EDU
Mon Jan 23 19:38:06 EST 2006


Chris Shoemaker <c.shoemaker at cox.net> writes:

> <side rant> BTW, the fact that you can just depend on all your
> libraries being loaded by guile so that you can just say
> scm_c_eval_string("blah") anytime and anywhere, even if it ends up
> using a symbol in some library that's not in your LIBADD, is _bad_.
> If you're going to pretend there's one global namespace why have
> libraries at all?  <end rant>

Unfortunately you're preaching to the converted here..  This was a
major "mistake" (IMNSHO) from the half-assed modularization effort
done to gnucash by the last round of devs.

> B) move init/shutdown functions into src/gnome-utils.
>   1) That means pretty much all of the functions in top-level.c
>   2) It may be necessary to split gnc_gui_init into two parts - the
> part that depends on other things in src/gnome and the lower-level
> init part, and then move only the low-level part to src/gnome-utils
> and call it from the part left in src/gnome.
>
> C) remove/change the distintion between src/gnome and src/gnome-utils.
>   1) I was never clear on what the distinction was, anyway.

gnome-utils is meant to be core internal widgets, dialogs, and other
parts that wrap the core engine objects..  It's built before the
register, so it cannot depend on the register or anything that depends
on the register.  Anything that's gnome-ish but doesn't depend on
the register (directly or indirectly) should go into gnome-utils.

The /gnome/ directory is everything else -- it pulls in gnome-utils
and the register and puts it all together.  So if you depend (directly
or indirectly) on the register, then you need to go into gnome, not
gnome-utils.

>   2) This could be a straight combination or a reshuffling along a
> different boundary.

> Any thoughts?

Umm... I would say B, if that works.  You MAY need to separate out the
initialization into two parts, but that's okay.  The distinction
between gnome and gnome-utils is quite clear, although it's certainly
possible that some files were put in the wrong place.

What you might want to do is have the first part, which is initialize
the gnome libraries and gnome environment so we can put up the splash
screen.  And then have the second part which pulls up the main window.
At least that's my back-of-the-napkin belief of what needs to happen.

I think it's perfectly reasonable to restructure the initialization code.

-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
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list